gdbserver: btrace enums
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2015-10-29 Pedro Alves <palves@redhat.com>
2
3 * linux-low.h (NULL_REGSET): Define.
4 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5 * linux-arm-low.c (arm_regsets): Likewise.
6 * linux-crisv32-low.c (cris_regsets): Likewise.
7 * linux-m68k-low.c (m68k_regsets): Likewise.
8 * linux-mips-low.c (mips_regsets): Likewise.
9 * linux-nios2-low.c (nios2_regsets): Likewise.
10 * linux-ppc-low.c (ppc_regsets): Likewise.
11 * linux-s390-low.c (s390_regsets): Likewise.
12 * linux-sh-low.c (sh_regsets): Likewise.
13 * linux-sparc-low.c (sparc_regsets): Likewise.
14 * linux-tic6x-low.c (tic6x_regsets): Likewise.
15 * linux-tile-low.c (tile_regsets): Likewise.
16 * linux-x86-low.c (x86_regsets): Likewise.
17 * linux-xtensa-low.c (xtensa_regsets): Likewise.
18
19 2015-10-29 Pedro Alves <palves@redhat.com>
20
21 * linux-low.h (NULL_REGSET): Define.
22 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
23 * linux-arm-low.c (arm_regsets): Likewise.
24 * linux-crisv32-low.c (cris_regsets): Likewise.
25 * linux-m68k-low.c (m68k_regsets): Likewise.
26 * linux-mips-low.c (mips_regsets): Likewise.
27 * linux-nios2-low.c (nios2_regsets): Likewise.
28 * linux-ppc-low.c (ppc_regsets): Likewise.
29 * linux-s390-low.c (s390_regsets): Likewise.
30 * linux-sh-low.c (sh_regsets): Likewise.
31 * linux-sparc-low.c (sparc_regsets): Likewise.
32 * linux-tic6x-low.c (tic6x_regsets): Likewise.
33 * linux-tile-low.c (tile_regsets): Likewise.
34 * linux-x86-low.c (x86_regsets): Likewise.
35 * linux-xtensa-low.c (xtensa_regsets): Likewise.
36
37 2015-10-26 Doug Evans <dje@google.com>
38
39 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
40
41 2015-10-26 Doug Evans <dje@google.com>
42
43 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
44
45 2015-10-26 Doug Evans <dje@google.com>
46
47 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
48 for debug_printf.
49 (attach_thread, find_new_threads_callback): Ditto.
50
51 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
52
53 * mem-break.h (set_breakpoint_data): Remove.
54
55 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
56
57 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
58 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
59 (initialize_low): Remove set_breakpoint_data call.
60 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
61 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
62 (initialize_low): Remove set_breakpoint_data call.
63 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
64 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
65 (initialize_low): Remove set_breakpoint_data call.
66
67 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
68
69 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
70 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
71 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
72 * target.h (target_breakpoint_kind_from_pc): New macro.
73
74 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
75
76 * linux-low.c (default_breakpoint_kind_from_pc): New function.
77 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
78 the default breakpoint kind.
79
80 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
81
82 * linux-arm-low.c (arm_supports_z_point_type): Add software
83 breakpoint support.
84
85 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
86
87 * linux-arm-low.c: Refactor breakpoint definitions.
88 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
89 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
90
91 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
92
93 * Makefile.in: Add arm.c/o.
94 * configure.srv: Likewise.
95 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
96 (arm_breakpoint_kind_from_pc): New function.
97 (arm_sw_breakpoint_from_kind): Return proper kind.
98 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
99
100 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
101
102 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
103 removal.
104 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
105 (struct raw_breakpoint) <size>: Remove.
106 (struct raw_breakpoint) <kind>: Add.
107 (bp_size): New function.
108 (bp_opcode): Likewise.
109 (find_raw_breakpoint_at): Adjust for kind.
110 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
111 (remove_memory_breakpoint): Adjust for kind call bp_size.
112 (set_raw_breakpoint_at): Adjust for kind.
113 (set_breakpoint): Likewise.
114 (set_breakpoint_at): Call breakpoint_kind_from_pc.
115 (delete_raw_breakpoint): Adjust for kind.
116 (delete_breakpoint): Likewise.
117 (find_gdb_breakpoint): Likewise.
118 (set_gdb_breakpoint_1): Likewise.
119 (set_gdb_breakpoint): Likewise.
120 (delete_gdb_breakpoint_1): Likewise.
121 (delete_gdb_breakpoint): Likewise.
122 (uninsert_raw_breakpoint): Likewise.
123 (reinsert_raw_breakpoint): Likewise.
124 (set_breakpoint_data): Remove.
125 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
126 (check_mem_read): Adjust for kind call bp_size.
127 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
128 (clone_one_breakpoint): Adjust for kind.
129 * mem-break.h (set_gdb_breakpoint): Likewise.
130 (delete_gdb_breakpoint): Likewise.
131 * server.c (process_serial_event): Likewise.
132
133 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
134
135 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
136 (struct linux_target_ops) <breakpoint>: Remove.
137 (struct linux_target_ops) <breakpoint_len>: Remove.
138 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
139 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
140 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
141 (arm_sw_breakpoint_from_kind): New function.
142 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
143 (struct linux_target_ops) <breakpoint>: Remove.
144 (struct linux_target_ops) <breakpoint_len>: Remove.
145 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
146 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
147 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
148 (struct linux_target_ops) <breakpoint>: Remove.
149 (struct linux_target_ops) <breakpoint_len>: Remove.
150 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
151 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
152 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
153 (struct linux_target_ops) <breakpoint>: Remove.
154 (struct linux_target_ops) <breakpoint_len>: Remove.
155 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
156 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
157 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
158 and sw_breakpoint_from_kind to increment the pc.
159 (linux_breakpoint_kind_from_pc): New function.
160 (linux_sw_breakpoint_from_kind): New function.
161 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
162 (initialize_low): Call breakpoint_kind_from_pc and
163 sw_breakpoint_from_kind to replace breakpoint_data/len.
164 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
165 New field.
166 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
167 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
168 (struct linux_target_ops) <breakpoint>: Remove.
169 (struct linux_target_ops) <breakpoint_len>: Remove.
170 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
171 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
172 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
173 (struct linux_target_ops) <breakpoint>: Remove.
174 (struct linux_target_ops) <breakpoint_len>: Remove.
175 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
176 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
177 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
178 (struct linux_target_ops) <breakpoint>: Remove.
179 (struct linux_target_ops) <breakpoint_len>: Remove.
180 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
181 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
182 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
183 (struct linux_target_ops) <breakpoint>: Remove.
184 (struct linux_target_ops) <breakpoint_len>: Remove.
185 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
186 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
187 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
188 (struct linux_target_ops) <breakpoint>: Remove.
189 (struct linux_target_ops) <breakpoint_len>: Remove.
190 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
191 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
192 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
193 (struct linux_target_ops) <breakpoint>: Remove.
194 (struct linux_target_ops) <breakpoint_len>: Remove.
195 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
196 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
197 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
198 (struct linux_target_ops) <breakpoint>: Remove.
199 (struct linux_target_ops) <breakpoint_len>: Remove.
200 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
201 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
202 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
203 (struct linux_target_ops) <breakpoint>: Remove.
204 (struct linux_target_ops) <breakpoint_len>: Remove.
205 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
206 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
207 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
208 (struct linux_target_ops) <breakpoint>: Remove.
209 (struct linux_target_ops) <breakpoint_len>: Remove.
210 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
211 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
212 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
213 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
214 (struct linux_target_ops) <breakpoint>: Remove.
215 (struct linux_target_ops) <breakpoint_len>: Remove.
216 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
217 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
218 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
219 (struct linux_target_ops) <breakpoint>: Remove.
220 (struct linux_target_ops) <breakpoint_len>: Remove.
221 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
222 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
223
224 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
225
226 * linux-cris-low.c (cris_get_pc): Remove void arg.
227
228 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
229
230 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
231 variable name.
232
233 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
234
235 * inferiors.c (thread_pid_matches_callback): New function.
236 (find_thread_process): New function.
237 (remove_thread): Reset current_thread.
238 (remove_process): Assert threads have been removed first.
239
240 2015-10-15 Yao Qi <yao.qi@linaro.org>
241
242 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
243 if it is 3.
244 (aarch64_remove_point): Likewise.
245 * regcache.c (regcache_register_size): New function.
246
247 2015-10-12 Yao Qi <yao.qi@linaro.org>
248
249 * linux-aarch64-low.c: Update all callers as emit_load_store
250 is renamed to aarch64_emit_load_store.
251
252 2015-10-12 Yao Qi <yao.qi@linaro.org>
253
254 * linux-aarch64-low.c: Update all callers of function renaming
255 from emit_insn to aarch64_emit_insn.
256
257 2015-10-12 Yao Qi <yao.qi@linaro.org>
258
259 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
260 arch/aarch64-insn.h.
261 (struct aarch64_memory_operand): Likewise.
262 (ENCODE): Likewise.
263 (emit_insn): Move to arch/aarch64-insn.c.
264 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
265 (emit_load_store): Move to arch/aarch64-insn.c.
266 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
267 (can_encode_int32): Remove.
268
269 2015-10-12 Yao Qi <yao.qi@linaro.org>
270
271 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
272 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
273 (aarch64_relocate_instruction): Likewise.
274 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
275 (struct aarch64_insn_visitor): Likewise.
276
277 2015-10-12 Yao Qi <yao.qi@linaro.org>
278
279 * linux-aarch64-low.c (struct aarch64_insn_data): New.
280 (struct aarch64_insn_visitor): New.
281 (struct aarch64_insn_relocation_data): New.
282 (aarch64_ftrace_insn_reloc_b): New function.
283 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
284 (aarch64_ftrace_insn_reloc_cb): Likewise.
285 (aarch64_ftrace_insn_reloc_tb): Likewise.
286 (aarch64_ftrace_insn_reloc_adr): Likewise.
287 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
288 (aarch64_ftrace_insn_reloc_others): Likewise.
289 (visitor): New.
290 (aarch64_relocate_instruction): Use visitor.
291
292 2015-10-12 Yao Qi <yao.qi@linaro.org>
293
294 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
295 int. Add argument buf.
296 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
297 aarch64_relocate_instruction.
298
299 2015-10-12 Yao Qi <yao.qi@linaro.org>
300
301 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
302 argument insn. Remove local variable insn. Don't call
303 target_read_uint32.
304 (aarch64_install_fast_tracepoint_jump_pad): Call
305 target_read_uint32.
306
307 2015-09-30 Yao Qi <yao.qi@linaro.org>
308
309 * linux-aarch64-low.c (emit_movk): Shorten a long line.
310 (emit_load_store_pair): Likewise.
311
312 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
313
314 * dll.c (match_dll): Add cast(s).
315 (unloaded_dll): Likewise.
316 * linux-low.c (second_thread_of_pid_p): Likewise.
317 (delete_lwp_callback): Likewise.
318 (count_events_callback): Likewise.
319 (select_event_lwp_callback): Likewise.
320 (linux_set_resume_request): Likewise.
321 * server.c (accumulate_file_name_length): Likewise.
322 (emit_dll_description): Likewise.
323 (handle_qxfer_threads_worker): Likewise.
324 (visit_actioned_threads): Likewise.
325 * thread-db.c (any_thread_of): Likewise.
326 * tracepoint.c (same_process_p): Likewise.
327 (match_blocktype): Likewise.
328 (build_traceframe_info_xml): Likewise.
329
330 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
331
332 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
333 assignment.
334 (gdb_unparse_agent_expr): Likewise.
335 * hostio.c (require_data): Likewise.
336 (handle_pread): Likewise.
337 * linux-low.c (disable_regset): Likewise.
338 (fetch_register): Likewise.
339 (store_register): Likewise.
340 (get_dynamic): Likewise.
341 (linux_qxfer_libraries_svr4): Likewise.
342 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
343 (set_fast_tracepoint_jump): Likewise.
344 (uninsert_fast_tracepoint_jumps_at): Likewise.
345 (reinsert_fast_tracepoint_jumps_at): Likewise.
346 (validate_inserted_breakpoint): Likewise.
347 (clone_agent_expr): Likewise.
348 * regcache.c (init_register_cache): Likewise.
349 * remote-utils.c (putpkt_binary_1): Likewise.
350 (decode_M_packet): Likewise.
351 (decode_X_packet): Likewise.
352 (look_up_one_symbol): Likewise.
353 (relocate_instruction): Likewise.
354 (monitor_output): Likewise.
355 * server.c (handle_search_memory): Likewise.
356 (handle_qxfer_exec_file): Likewise.
357 (handle_qxfer_libraries): Likewise.
358 (handle_qxfer): Likewise.
359 (handle_query): Likewise.
360 (handle_v_cont): Likewise.
361 (handle_v_run): Likewise.
362 (captured_main): Likewise.
363 * target.c (write_inferior_memory): Likewise.
364 * thread-db.c (try_thread_db_load_from_dir): Likewise.
365 * tracepoint.c (init_trace_buffer): Likewise.
366 (add_tracepoint_action): Likewise.
367 (add_traceframe): Likewise.
368 (add_traceframe_block): Likewise.
369 (cmd_qtdpsrc): Likewise.
370 (cmd_qtdv): Likewise.
371 (cmd_qtstatus): Likewise.
372 (response_source): Likewise.
373 (response_tsv): Likewise.
374 (cmd_qtnotes): Likewise.
375 (gdb_collect): Likewise.
376 (initialize_tracepoint): Likewise.
377
378 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
379
380 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
381 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
382 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
383 <NOP>: New.
384 (enum aarch64_condition_codes): New enum.
385 (w0): New static global.
386 (fp): Likewise.
387 (lr): Likewise.
388 (struct aarch64_memory_operand) <type>: New
389 MEMORY_OPERAND_POSTINDEX type.
390 (postindex_memory_operand): New helper function.
391 (emit_ret): New function.
392 (emit_load_store_pair): New function, factored out of emit_stp
393 with support for MEMORY_OPERAND_POSTINDEX.
394 (emit_stp): Rewrite using emit_load_store_pair.
395 (emit_ldp): New function.
396 (emit_load_store): Likewise.
397 (emit_ldr): Mention post-index instruction in comment.
398 (emit_ldrh): New function.
399 (emit_ldrb): New function.
400 (emit_ldrsw): Mention post-index instruction in comment.
401 (emit_str): Likewise.
402 (emit_subs): New function.
403 (emit_cmp): Likewise.
404 (emit_and): Likewise.
405 (emit_orr): Likewise.
406 (emit_orn): Likewise.
407 (emit_eor): Likewise.
408 (emit_mvn): Likewise.
409 (emit_lslv): Likewise.
410 (emit_lsrv): Likewise.
411 (emit_asrv): Likewise.
412 (emit_mul): Likewise.
413 (emit_sbfm): Likewise.
414 (emit_sbfx): Likewise.
415 (emit_ubfm): Likewise.
416 (emit_ubfx): Likewise.
417 (emit_csinc): Likewise.
418 (emit_cset): Likewise.
419 (emit_nop): Likewise.
420 (emit_ops_insns): New helper function.
421 (emit_pop): Likewise.
422 (emit_push): Likewise.
423 (aarch64_emit_prologue): New function.
424 (aarch64_emit_epilogue): Likewise.
425 (aarch64_emit_add): Likewise.
426 (aarch64_emit_sub): Likewise.
427 (aarch64_emit_mul): Likewise.
428 (aarch64_emit_lsh): Likewise.
429 (aarch64_emit_rsh_signed): Likewise.
430 (aarch64_emit_rsh_unsigned): Likewise.
431 (aarch64_emit_ext): Likewise.
432 (aarch64_emit_log_not): Likewise.
433 (aarch64_emit_bit_and): Likewise.
434 (aarch64_emit_bit_or): Likewise.
435 (aarch64_emit_bit_xor): Likewise.
436 (aarch64_emit_bit_not): Likewise.
437 (aarch64_emit_equal): Likewise.
438 (aarch64_emit_less_signed): Likewise.
439 (aarch64_emit_less_unsigned): Likewise.
440 (aarch64_emit_ref): Likewise.
441 (aarch64_emit_if_goto): Likewise.
442 (aarch64_emit_goto): Likewise.
443 (aarch64_write_goto_address): Likewise.
444 (aarch64_emit_const): Likewise.
445 (aarch64_emit_call): Likewise.
446 (aarch64_emit_reg): Likewise.
447 (aarch64_emit_pop): Likewise.
448 (aarch64_emit_stack_flush): Likewise.
449 (aarch64_emit_zero_ext): Likewise.
450 (aarch64_emit_swap): Likewise.
451 (aarch64_emit_stack_adjust): Likewise.
452 (aarch64_emit_int_call_1): Likewise.
453 (aarch64_emit_void_call_2): Likewise.
454 (aarch64_emit_eq_goto): Likewise.
455 (aarch64_emit_ne_goto): Likewise.
456 (aarch64_emit_lt_goto): Likewise.
457 (aarch64_emit_le_goto): Likewise.
458 (aarch64_emit_gt_goto): Likewise.
459 (aarch64_emit_ge_got): Likewise.
460 (aarch64_emit_ops_impl): New static global variable.
461 (aarch64_emit_ops): New target function, return
462 &aarch64_emit_ops_impl.
463 (struct linux_target_ops): Install it.
464
465 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
466
467 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
468 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
469 aarch64-ipa.o.
470 * linux-aarch64-ipa.c: New file.
471 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
472 and endian.h.
473 (aarch64_get_thread_area): New target method.
474 (extract_signed_bitfield): New helper function.
475 (aarch64_decode_ldr_literal): New function.
476 (enum aarch64_opcodes): New enum.
477 (struct aarch64_register): New struct.
478 (struct aarch64_operand): New struct.
479 (x0): New static global.
480 (x1): Likewise.
481 (x2): Likewise.
482 (x3): Likewise.
483 (x4): Likewise.
484 (w2): Likewise.
485 (ip0): Likewise.
486 (sp): Likewise.
487 (xzr): Likewise.
488 (aarch64_register): New helper function.
489 (register_operand): Likewise.
490 (immediate_operand): Likewise.
491 (struct aarch64_memory_operand): New struct.
492 (offset_memory_operand): New helper function.
493 (preindex_memory_operand): Likewise.
494 (enum aarch64_system_control_registers): New enum.
495 (ENCODE): New macro.
496 (emit_insn): New helper function.
497 (emit_b): New function.
498 (emit_bcond): Likewise.
499 (emit_cb): Likewise.
500 (emit_tb): Likewise.
501 (emit_blr): Likewise.
502 (emit_stp): Likewise.
503 (emit_ldp_q_offset): Likewise.
504 (emit_stp_q_offset): Likewise.
505 (emit_load_store): Likewise.
506 (emit_ldr): Likewise.
507 (emit_ldrsw): Likewise.
508 (emit_str): Likewise.
509 (emit_ldaxr): Likewise.
510 (emit_stxr): Likewise.
511 (emit_stlr): Likewise.
512 (emit_data_processing_reg): Likewise.
513 (emit_data_processing): Likewise.
514 (emit_add): Likewise.
515 (emit_sub): Likewise.
516 (emit_mov): Likewise.
517 (emit_movk): Likewise.
518 (emit_mov_addr): Likewise.
519 (emit_mrs): Likewise.
520 (emit_msr): Likewise.
521 (emit_sevl): Likewise.
522 (emit_wfe): Likewise.
523 (append_insns): Likewise.
524 (can_encode_int32_in): New helper function.
525 (aarch64_relocate_instruction): New function.
526 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
527 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
528 (struct linux_target_ops): Install aarch64_get_thread_area,
529 aarch64_install_fast_tracepoint_jump_pad and
530 aarch64_get_min_fast_tracepoint_insn_len.
531
532 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
533
534 * Makefile.in (aarch64-insn.o): New rule.
535 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
536
537 2015-09-21 Yao Qi <yao.qi@linaro.org>
538
539 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
540
541 2015-09-21 Yao Qi <yao.qi@linaro.org>
542
543 * tracepoint.c (max_jump_pad_size): Remove.
544
545 2015-09-18 Yao Qi <yao.qi@linaro.org>
546
547 * linux-aarch64-low.c: Don't include sys/uio.h.
548 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
549
550 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
551
552 * tracepoint.c (eval_result_type): Change prototype.
553 (condition_true_at_tracepoint): Fix argument to compiled_cond.
554
555 2015-09-15 Pedro Alves <palves@redhat.com>
556
557 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
558 Check whether to report exec events instead of checking whether
559 multiprocess is enabled.
560
561 2015-09-15 Pedro Alves <palves@redhat.com>
562
563 PR remote/18965
564 * remote-utils.c (prepare_resume_reply): Merge
565 TARGET_WAITKIND_VFORK_DONE switch case with the
566 TARGET_WAITKIND_FORKED case.
567
568 2015-09-15 Yao Qi <yao.qi@linaro.org>
569
570 * server.c (handle_query): Check string comparison using
571 "else if" instead of "if".
572
573 2015-09-15 Yao Qi <yao.qi@linaro.org>
574
575 * server.c (vCont_supported): New global variable.
576 (handle_query): Set vCont_supported to 1 if "vContSupported+"
577 matches. Append ";vContSupported+" to own_buf.
578 (handle_v_requests): Append ";s;S" to own_buf if target supports
579 hardware single step or vCont_supported is false.
580 (capture_main): Set vCont_supported to zero.
581
582 2015-09-15 Yao Qi <yao.qi@linaro.org>
583
584 * linux-low.c (linux_supports_conditional_breakpoints): Rename
585 it to ...
586 (linux_supports_hardware_single_step): ... New function.
587 (linux_target_ops): Update.
588 * lynx-low.c (lynx_target_ops): Set field
589 supports_hardware_single_step to target_can_do_hardware_single_step.
590 * nto-low.c (nto_target_ops): Likewise.
591 * spu-low.c (spu_target_ops): Likewise.
592 * win32-low.c (win32_target_ops): Likewise.
593 * target.c (target_can_do_hardware_single_step): New function.
594 * target.h (struct target_ops) <supports_conditional_breakpoints>:
595 Remove. <supports_hardware_single_step>: New field.
596 (target_supports_conditional_breakpoints): Remove.
597 (target_supports_hardware_single_step): New macro.
598 (target_can_do_hardware_single_step): Declare.
599 * server.c (handle_query): Use target_supports_hardware_single_step
600 instead of target_supports_conditional_breakpoints.
601
602 2015-09-15 Yao Qi <yao.qi@linaro.org>
603
604 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
605 function.
606 (struct linux_target_ops the_low_target): Install
607 aarch64_linux_siginfo_fixup.
608
609 2015-09-11 Don Breazeal <donb@codesourcery.com>
610 Luis Machado <lgustavo@codesourcery.com>
611
612 * linux-low.c (linux_mourn): Static declaration.
613 (linux_arch_setup): Move in front of
614 handle_extended_wait.
615 (linux_arch_setup_thread): New function.
616 (handle_extended_wait): Handle exec events. Call
617 linux_arch_setup_thread. Make event_lwp argument a
618 pointer-to-a-pointer.
619 (check_zombie_leaders): Do not check stopped threads.
620 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
621 (linux_low_filter_event): Add lwp and thread for exec'ing
622 non-leader thread if leader thread has been deleted.
623 Refactor code into linux_arch_setup_thread and call it.
624 Pass child lwp pointer by reference to handle_extended_wait.
625 (linux_wait_for_event_filtered): Update comment.
626 (linux_wait_1): Prevent clobbering exec event status.
627 (linux_supports_exec_events): New function.
628 (linux_target_ops) <supports_exec_events>: Initialize new member.
629 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
630 new member.
631 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
632 * server.c (report_exec_events): New global variable.
633 (handle_query): Handle qSupported query for exec-events feature.
634 (captured_main): Initialize report_exec_events.
635 * server.h (report_exec_events): Declare new global variable.
636 * target.h (struct target_ops) <supports_exec_events>: New
637 member.
638 (target_supports_exec_events): New macro.
639 * win32-low.c (win32_target_ops) <supports_exec_events>:
640 Initialize new member.
641
642 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
643
644 * linux-low.c (linux_low_enable_btrace): Remove.
645 (linux_target_ops): Replace linux_low_enable_btrace with
646 linux_enable_btrace.
647
648 2015-09-03 Yao Qi <yao.qi@linaro.org>
649
650 * linux-aarch64-low.c (aarch64_insert_point): Call
651 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
652 returns true.
653
654 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
655
656 * linux-low.c (check_stopped_by_breakpoint): Use
657 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
658
659 2015-08-27 Pedro Alves <palves@redhat.com>
660
661 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
662
663 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
664
665 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
666 the XNEW-family equivalent.
667 (compile_bytecodes): Likewise.
668 * dll.c (loaded_dll): Likewise.
669 * event-loop.c (append_callback_event): Likewise.
670 (create_file_handler): Likewise.
671 (create_file_event): Likewise.
672 * hostio.c (handle_open): Likewise.
673 * inferiors.c (add_thread): Likewise.
674 (add_process): Likewise.
675 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
676 * linux-arm-low.c (arm_new_process): Likewise.
677 (arm_new_thread): Likewise.
678 * linux-low.c (add_to_pid_list): Likewise.
679 (linux_add_process): Likewise.
680 (handle_extended_wait): Likewise.
681 (add_lwp): Likewise.
682 (enqueue_one_deferred_signal): Likewise.
683 (enqueue_pending_signal): Likewise.
684 (linux_resume_one_lwp_throw): Likewise.
685 (linux_resume_one_thread): Likewise.
686 (linux_read_memory): Likewise.
687 (linux_write_memory): Likewise.
688 * linux-mips-low.c (mips_linux_new_process): Likewise.
689 (mips_linux_new_thread): Likewise.
690 (mips_add_watchpoint): Likewise.
691 * linux-x86-low.c (initialize_low_arch): Likewise.
692 * lynx-low.c (lynx_add_process): Likewise.
693 * mem-break.c (set_raw_breakpoint_at): Likewise.
694 (set_breakpoint): Likewise.
695 (add_condition_to_breakpoint): Likewise.
696 (add_commands_to_breakpoint): Likewise.
697 (clone_agent_expr): Likewise.
698 (clone_one_breakpoint): Likewise.
699 * regcache.c (new_register_cache): Likewise.
700 * remote-utils.c (look_up_one_symbol): Likewise.
701 * server.c (queue_stop_reply): Likewise.
702 (start_inferior): Likewise.
703 (queue_stop_reply_callback): Likewise.
704 (handle_target_event): Likewise.
705 * spu-low.c (fetch_ppc_memory): Likewise.
706 (store_ppc_memory): Likewise.
707 * target.c (set_target_ops): Likewise.
708 * thread-db.c (thread_db_load_search): Likewise.
709 (try_thread_db_load_1): Likewise.
710 * tracepoint.c (add_tracepoint): Likewise.
711 (add_tracepoint_action): Likewise.
712 (create_trace_state_variable): Likewise.
713 (cmd_qtdpsrc): Likewise.
714 (cmd_qtro): Likewise.
715 (add_while_stepping_state): Likewise.
716 * win32-low.c (child_add_thread): Likewise.
717 (get_image_name): Likewise.
718
719 2015-08-25 Yao Qi <yao.qi@linaro.org>
720
721 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
722
723 2015-08-25 Yao Qi <yao.qi@linaro.org>
724
725 * Makefile.in (aarch64-linux.o): New rule.
726 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
727 srv_tgtobj.
728 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
729 (aarch64_init_debug_reg_state): Make it extern.
730 (aarch64_linux_prepare_to_resume): Remove.
731
732 2015-08-25 Yao Qi <yao.qi@linaro.org>
733
734 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
735 lwp_arch_private_info and ptid_of_lwp.
736
737 2015-08-25 Yao Qi <yao.qi@linaro.org>
738
739 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
740 Find proc_info by find_process_pid. All callers updated.
741
742 2015-08-25 Yao Qi <yao.qi@linaro.org>
743
744 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
745 Remove.
746 (debug_reg_change_callback): Remove.
747 (aarch64_notify_debug_reg_change): Remove.
748
749 2015-08-25 Yao Qi <yao.qi@linaro.org>
750
751 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
752 Call current_lwp_ptid.
753
754 2015-08-25 Yao Qi <yao.qi@linaro.org>
755
756 * linux-aarch64-low.c (debug_reg_change_callback): Use
757 debug_printf.
758
759 2015-08-25 Yao Qi <yao.qi@linaro.org>
760
761 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
762
763 2015-08-25 Yao Qi <yao.qi@linaro.org>
764
765 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
766
767 2015-08-25 Yao Qi <yao.qi@linaro.org>
768
769 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
770 the code.
771
772 2015-08-25 Yao Qi <yao.qi@linaro.org>
773
774 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
775 Remove.
776 (debug_reg_change_callback): Remove argument entry and add argument
777 lwp. Remove local variable thread. Don't print thread id in the
778 debugging output. Don't check whether pid of thread equals to pid.
779 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
780 iterate_over_lwps instead find_inferior.
781
782 2015-08-24 Pedro Alves <palves@redhat.com>
783
784 * inferiors.c (get_first_process): New function.
785 * inferiors.h (get_first_process): New declaration.
786 * remote-utils.c (read_ptid): Default to the first process in the
787 list, instead of to the current thread's process.
788
789 2015-08-24 Pedro Alves <palves@redhat.com>
790
791 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
792 * event-loop.c: Likewise.
793 * remote-utils.c: Likewise.
794 * tracepoint.c: Likewise.
795
796 2015-08-24 Pedro Alves <palves@redhat.com>
797
798 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
799 ptid_get_lwp.
800
801 2015-08-21 Pedro Alves <palves@redhat.com>
802
803 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
804 instead of literal 1.
805
806 2015-08-21 Pedro Alves <palves@redhat.com>
807
808 * tdesc.c (default_description): Explicitly zero-initialize.
809
810 2015-08-21 Pedro Alves <palves@redhat.com>
811
812 PR gdb/18749
813 * inferiors.c (remove_thread): Discard any pending stop reply for
814 this thread.
815 * server.c (remove_all_on_match_pid): Rename to ...
816 (remove_all_on_match_ptid): ... this. Work with a filter ptid
817 instead of a pid.
818 (discard_queued_stop_replies): Change parameter to a ptid. Now
819 extern.
820 (handle_v_kill, kill_inferior_callback, captured_main)
821 (process_serial_event): Adjust.
822 * server.h (discard_queued_stop_replies): Declare.
823
824 2015-08-21 Pedro Alves <palves@redhat.com>
825
826 * linux-low.c (wait_for_sigstop): Always switch to no thread
827 selected if the previously current thread dies.
828 * lynx-low.c (lynx_request_interrupt): Use the first thread's
829 process instead of the current thread's.
830 * remote-utils.c (input_interrupt): Don't check if there's no
831 current thread.
832 * server.c (gdb_read_memory, gdb_write_memory): If setting the
833 current thread to the general thread fails, error out.
834 (handle_qxfer_auxv, handle_qxfer_libraries)
835 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
836 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
837 (handle_query): Check if there's a thread selected instead of
838 checking whether there's any thread in the thread list.
839 (handle_qxfer_threads, handle_qxfer_btrace)
840 (handle_qxfer_btrace_conf): Don't error out early if there's no
841 thread in the thread list.
842 (handle_v_cont, myresume): Don't set the current thread to the
843 continue thread.
844 (process_serial_event) <Hg handling>: Also set thread_id if the
845 previous general thread is still alive.
846 (process_serial_event) <g/G handling>: If setting the current
847 thread to the general thread fails, error out.
848 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
849 thread's lwp instead of the current thread's.
850 * target.c (set_desired_thread): If the desired thread was not
851 found, leave the current thread pointing to NULL. Return an int
852 (boolean) indicating success.
853 * target.h (set_desired_thread): Change return type to int.
854
855 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
856
857 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
858 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
859 #includes.
860 (ps_get_thread_area): New function.
861
862 2015-08-19 Gary Benson <gbenson@redhat.com>
863
864 * hostio.c (handle_pread): Do not attempt to read more data
865 than hostio_reply_with_data can fit in a packet.
866
867 2015-08-18 Joel Brobecker <brobecker@adacore.com>
868
869 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
870
871 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
872
873 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
874
875 2015-08-06 Pedro Alves <palves@redhat.com>
876
877 * tracepoint.c (expr_eval_result): Now an int.
878
879 2015-08-06 Pedro Alves <palves@redhat.com>
880
881 * gdbthread.h (struct regcache): Forward declare.
882 (struct thread_info) <regcache_data>: Now a struct regcache
883 pointer.
884 * inferiors.c (inferior_regcache_data)
885 (set_inferior_regcache_data): Now work with struct regcache
886 pointers.
887 * inferiors.h (struct regcache): Forward declare.
888 (inferior_regcache_data, set_inferior_regcache_data): Now work
889 with struct regcache pointers.
890 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
891 (free_register_cache_thread): Remove struct regcache pointer
892 casts.
893
894 2015-08-06 Pedro Alves <palves@redhat.com>
895
896 * server.c (captured_main): On error, print the exception message
897 to stderr, and if run_once is set, throw a quit.
898
899 2015-08-06 Pedro Alves <palves@redhat.com>
900
901 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
902 the current thread.
903
904 2015-08-06 Pedro Alves <palves@redhat.com>
905
906 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
907 reading beyond the passed in buffer length.
908
909 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
910
911 * tracepoint.c (symbol_list) <required>: Remove.
912
913 2015-08-06 Pedro Alves <palves@redhat.com>
914
915 * linux-low.c (handle_extended_wait): Set the fork child's suspend
916 count if stopping and suspending threads.
917 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
918 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
919 (linux_detach): Complete an ongoing step-over.
920 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
921 throughout.
922 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
923 (linux_wait_1): If passing a signal to the inferior after
924 finishing a step-over, unsuspend and re-resume all lwps. If we
925 see a single-step event but the thread should be continuing, don't
926 pass the trap to gdb.
927 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
928 internal_error instead of gdb_assert.
929 (enqueue_pending_signal): New function.
930 (check_ptrace_stopped_lwp_gone): Add debug output.
931 (start_step_over): Use internal_error instead of gdb_assert.
932 (complete_ongoing_step_over): New function.
933 (linux_resume_one_thread): Don't resume a suspended thread.
934 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
935 it stepping.
936
937 2015-08-06 Pedro Alves <palves@redhat.com>
938
939 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
940 (linux_thread_alive): Use lwp_is_marked_dead.
941 (extended_event_reported): Delete.
942 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
943 instead of extended_event_reported.
944 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
945 as well.
946 (lwp_is_marked_dead): New function.
947 (lwp_running): Use lwp_is_marked_dead.
948 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
949 comment.
950
951 2015-08-06 Pedro Alves <palves@redhat.com>
952
953 * linux-low.c (linux_wait_1): Move fork event output out of the
954 !report_to_gdb check. Pass event_child->waitstatus to
955 target_waitstatus_to_string instead of ourstatus.
956
957 2015-08-04 Yao Qi <yao.qi@linaro.org>
958
959 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
960 if current_thread is 32 bit.
961
962 2015-08-04 Yao Qi <yao.qi@linaro.org>
963
964 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
965 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
966 * server.c (extended_protocol): Remove "static".
967 * server.h (extended_protocol): Declare it.
968
969 2015-08-04 Yao Qi <yao.qi@linaro.org>
970
971 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
972 both aarch64 and aarch32.
973 (aarch64_set_pc): Likewise.
974
975 2015-08-04 Yao Qi <yao.qi@linaro.org>
976
977 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
978 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
979 arm-with-neon.xml to srv_xmlfiles.
980 * linux-aarch64-low.c: Include linux-aarch32-low.h.
981 (is_64bit_tdesc): New function.
982 (aarch64_linux_read_description): New function.
983 (aarch64_arch_setup): Call aarch64_linux_read_description.
984 (regs_info): Rename to regs_info_aarch64.
985 (aarch64_regs_info): Return right regs_info.
986 (initialize_low_arch): Call initialize_low_arch_aarch32.
987
988 2015-08-04 Yao Qi <yao.qi@linaro.org>
989
990 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
991 * linux-aarch32-low.c: New file.
992 * linux-aarch32-low.h: New file.
993 * linux-arm-low.c (arm_fill_gregset): Move it to
994 linux-aarch32-low.c.
995 (arm_store_gregset): Likewise.
996 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
997 (arm_store_vfpregset): Call arm_store_vfpregset_num.
998 (arm_arch_setup): Check if PTRACE_GETREGSET works.
999 (regs_info): Rename to regs_info_arm.
1000 (arm_regs_info): Return regs_info_aarch32 if
1001 have_ptrace_getregset is 1 and target description is
1002 arm_with_neon or arm_with_vfpv3.
1003 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1004 Call initialize_low_arch_aarch32 instead.
1005
1006 2015-08-04 Yao Qi <yao.qi@linaro.org>
1007
1008 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1009 * linux-low.c: ... here.
1010 * linux-low.h (have_ptrace_getregset): Declare it.
1011
1012 2015-08-04 Pedro Alves <palves@redhat.com>
1013
1014 * thread-db.c (struct thread_db): Use new typedefs.
1015 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1016 CHK calls.
1017 (disable_thread_event_reporting): Cast result of dlsym to
1018 destination function pointer type.
1019 (thread_db_mourn): Use td_ta_delete_ftype.
1020
1021 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1022
1023 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1024 arch variant.
1025 (CDX_BREAKPOINT): Define for R2.
1026 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1027 (the_low_target): Add comments.
1028
1029 2015-07-30 Yao Qi <yao.qi@linaro.org>
1030
1031 * linux-arm-low.c (arm_hwcap): Remove it.
1032 (arm_read_description): New local variable arm_hwcap. Don't
1033 set arm_hwcap to zero.
1034
1035 2015-07-30 Yao Qi <yao.qi@linaro.org>
1036
1037 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1038 Use regcache->tdesc instead.
1039 (arm_store_wmmxregset): Likewise.
1040 (arm_fill_vfpregset): Likewise.
1041 (arm_store_vfpregset): Likewise.
1042
1043 2015-07-30 Yao Qi <yao.qi@linaro.org>
1044
1045 * linux-arm-low.c: Include arch/arm.h.
1046 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1047 (arm_store_gregset): Likewise.
1048
1049 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1050
1051 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1052 ptrace's 4th parameter.
1053
1054 2015-07-27 Yao Qi <yao.qi@linaro.org>
1055
1056 * configure.srv (case aarch64*-*-linux*): Don't set
1057 srv_linux_usrregs.
1058
1059 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1060
1061 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1062 sys/ptrace.h.
1063 * linux-arm-low.c: Likewise.
1064 * linux-cris-low.c: Likewise.
1065 * linux-crisv32-low.c: Likewise.
1066 * linux-low.c: Likewise.
1067 * linux-m68k-low.c: Likewise.
1068 * linux-mips-low.c: Likewise.
1069 * linux-nios2-low.c: Likewise.
1070 * linux-s390-low.c: Likewise.
1071 * linux-sparc-low.c: Likewise.
1072 * linux-tic6x-low.c: Likewise.
1073 * linux-tile-low.c: Likewise.
1074 * linux-x86-low.c: Likewise.
1075
1076 2015-07-24 Pedro Alves <palves@redhat.com>
1077
1078 * config.in: Regenerate.
1079 * configure: Regenerate.
1080
1081 2015-07-24 Pedro Alves <palves@redhat.com>
1082
1083 * acinclude.m4: Include ../ptrace.m4.
1084 * configure.ac: Call GDB_AC_PTRACE.
1085 * config.in, configure: Regenerate.
1086
1087 2015-07-24 Yao Qi <yao.qi@linaro.org>
1088
1089 * linux-low.c (linux_create_inferior): Remove setting to
1090 proc->priv->new_inferior.
1091 (linux_attach): Likewise.
1092 (linux_low_filter_event): Likewise.
1093 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1094
1095 2015-07-24 Yao Qi <yao.qi@linaro.org>
1096
1097 * linux-low.c (linux_arch_setup): New function.
1098 (linux_low_filter_event): If proc->tdesc is NULL and
1099 proc->attached is true, call the_low_target.arch_setup.
1100 Otherwise, keep status pending, and return.
1101 (linux_resume_one_lwp_throw): Don't call get_pc if
1102 thread->while_stepping isn't NULL. Don't call
1103 get_thread_regcache if proc->tdesc is NULL.
1104 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1105 (linux_target_ops): Install arch_setup.
1106 * server.c (start_inferior): Call the_target->arch_setup.
1107 * target.h (struct target_ops) <arch_setup>: New field.
1108 (target_arch_setup): New marco.
1109 * lynx-low.c (lynx_target_ops): Update.
1110 * nto-low.c (nto_target_ops): Update.
1111 * spu-low.c (spu_target_ops): Update.
1112 * win32-low.c (win32_target_ops): Update.
1113
1114 2015-07-24 Yao Qi <yao.qi@linaro.org>
1115
1116 * linux-low.c (linux_add_process): Don't set
1117 proc->priv->new_inferior.
1118 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1119 (linux_attach): Likewise.
1120
1121 2015-07-24 Yao Qi <yao.qi@linaro.org>
1122
1123 * server.c (start_inferior): Code refactor.
1124
1125 2015-07-24 Yao Qi <yao.qi@linaro.org>
1126
1127 * server.c (process_serial_event): Set general_thread.
1128
1129 2015-07-21 Yao Qi <yao.qi@linaro.org>
1130
1131 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1132 aarch64_linux_get_debug_reg_capacity.
1133
1134 2015-07-17 Yao Qi <yao.qi@linaro.org>
1135
1136 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1137 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1138 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1139 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1140 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1141 (AARCH64_HWP_ALIGNMENT): Likewise.
1142 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1143 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1144 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1145 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1146 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1147 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1148 (struct aarch64_debug_reg_state): Likewise.
1149 (struct arch_lwp_info): Likewise.
1150 (aarch64_align_watchpoint): Likewise.
1151 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1152 (aarch64_watchpoint_length): Likewise.
1153 (aarch64_point_encode_ctrl_reg): Likewise
1154 (aarch64_point_is_aligned): Likewise.
1155 (aarch64_align_watchpoint): Likewise.
1156 (aarch64_linux_set_debug_regs):
1157 (aarch64_dr_state_insert_one_point): Likewise.
1158 (aarch64_dr_state_remove_one_point): Likewise.
1159 (aarch64_handle_breakpoint): Likewise.
1160 (aarch64_handle_aligned_watchpoint): Likewise.
1161 (aarch64_handle_unaligned_watchpoint): Likewise.
1162 (aarch64_handle_watchpoint): Likewise.
1163
1164 2015-07-17 Yao Qi <yao.qi@linaro.org>
1165
1166 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1167 and don't aarch64_get_debug_reg_state. All callers update.
1168 (aarch64_handle_aligned_watchpoint): Likewise.
1169 (aarch64_handle_unaligned_watchpoint): Likewise.
1170 (aarch64_handle_watchpoint): Likewise.
1171 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1172 (aarch64_remove_point): Likewise.
1173
1174 2015-07-17 Yao Qi <yao.qi@linaro.org>
1175
1176 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1177 debug_printf.
1178 (aarch64_handle_unaligned_watchpoint): Likewise.
1179
1180 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1181
1182 Revert the previous 3 commits:
1183 Move gdb_regex* to common/
1184 Move linux_find_memory_regions_full & co.
1185 gdbserver build-id attribute generator
1186
1187 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1188 Jan Kratochvil <jan.kratochvil@redhat.com>
1189
1190 gdbserver build-id attribute generator.
1191 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1192 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1193 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1194 (find_phdr): New.
1195 (get_dynamic): Use find_pdhr to traverse program headers.
1196 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1197 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1198 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1199 (get_hex_build_id): New.
1200 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1201 to reply XML document.
1202
1203 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1204 Jan Kratochvil <jan.kratochvil@redhat.com>
1205
1206 * target.c: Include target/target-utils.h and fcntl.h.
1207 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1208 (target_fileio_read_stralloc): New functions.
1209
1210 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1211
1212 * Makefile.in (OBS): Add gdb_regex.o.
1213 (gdb_regex.o): New.
1214 * config.in: Rebuilt.
1215 * configure: Rebuilt.
1216
1217 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1218 Jan Kratochvil <jan.kratochvil@redhat.com>
1219
1220 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1221 * Makefile.in (OBS): Add target-utils.o.
1222 (linux-maps.o, target-utils.o): New.
1223 * configure.srv (srv_linux_obj): Add linux-maps.o.
1224
1225 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1226
1227 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1228 function, return 1.
1229 (the_low_target): Install it.
1230
1231 2015-07-14 Pedro Alves <palves@redhat.com>
1232
1233 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1234 Instead, ignore ECHILD, and throw an error for other errnos.
1235
1236 2015-07-10 Pedro Alves <palves@redhat.com>
1237
1238 * event-loop.c (struct callback_event) <data>: Change type to
1239 gdb_client_data instance instead of gdb_client_data pointer.
1240 (append_callback_event): Adjust.
1241
1242 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1243
1244 * linux-aarch64-low.c: Add comments for each linux_target_ops
1245 method. Remove comments already covered in target_ops and
1246 linux_target_ops definitions.
1247 (the_low_target): Add comments for each unimplemented method.
1248
1249 2015-07-09 Yao Qi <yao.qi@linaro.org>
1250
1251 * linux-aarch64-low.c (aarch64_regmap): Remove.
1252 (aarch64_usrregs_info): Remove.
1253 (regs_info): Set field usrregs to NULL.
1254
1255 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1256
1257 * linux-low.c: Include "rsp-low.h"
1258 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1259 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1260 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1261 (handle_btrace_enable_pt): New.
1262 (handle_btrace_general_set): Support "pt".
1263 (handle_btrace_conf_general_set): Support "pt:size".
1264
1265 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1266
1267 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1268 Z_PACKET_SW_BP.
1269
1270 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1271
1272 * linux-aarch64-low.c: Remove comment about endianness.
1273 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1274 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1275 memcmp.
1276
1277 2015-06-24 Gary Benson <gbenson@redhat.com>
1278
1279 * linux-i386-ipa.c (stdint.h): Do not include.
1280 * lynx-i386-low.c (stdint.h): Likewise.
1281 * lynx-ppc-low.c (stdint.h): Likewise.
1282 * mem-break.c (stdint.h): Likewise.
1283 * thread-db.c (stdint.h): Likewise.
1284 * tracepoint.c (stdint.h): Likewise.
1285 * win32-low.c (stdint.h): Likewise.
1286
1287 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1288
1289 * server.c (write_qxfer_response): Update call to
1290 remote_escape_output.
1291
1292 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1293 Jan Kratochvil <jan.kratochvil@redhat.com>
1294
1295 Merge multiple hex conversions.
1296 * gdbreplay.c (tohex): Rename to 'fromhex'.
1297 (logchar): Use fromhex.
1298
1299 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1300
1301 * server.c (handle_qxfer_libraries): Set `version' attribute for
1302 <library-list>.
1303
1304 2015-06-10 Gary Benson <gbenson@redhat.com>
1305
1306 * target.h (struct target_ops) <multifs_open>: New field.
1307 <multifs_unlink>: Likewise.
1308 <multifs_readlink>: Likewise.
1309 * linux-low.c (nat/linux-namespaces.h): New include.
1310 (linux_target_ops): Initialize the_target->multifs_open,
1311 the_target->multifs_unlink and the_target->multifs_readlink.
1312 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1313 * hostio.c (hostio_fs_pid): New static variable.
1314 (hostio_handle_new_gdb_connection): New function.
1315 (handle_setfs): Likewise.
1316 (handle_open): Use the_target->multifs_open as appropriate.
1317 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1318 (handle_readlink): Use the_target->multifs_readlink as
1319 appropriate.
1320 (handle_vFile): Handle vFile:setfs packets.
1321 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1322 after target_handle_new_gdb_connection.
1323
1324 2015-06-10 Gary Benson <gbenson@redhat.com>
1325
1326 * configure.ac (AC_CHECK_FUNCS): Add setns.
1327 * config.in: Regenerate.
1328 * configure: Likewise.
1329 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1330 (linux-namespaces.o): New rule.
1331 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1332
1333 2015-06-09 Gary Benson <gbenson@redhat.com>
1334
1335 * hostio.c (handle_open): Process mode argument with
1336 fileio_to_host_mode.
1337
1338 2015-06-01 Yao Qi <yao.qi@linaro.org>
1339
1340 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1341 * linux-x86-low.c: Likewise.
1342
1343 2015-05-28 Don Breazeal <donb@codesourcery.com>
1344
1345 * linux-low.c (handle_extended_wait): Initialize
1346 thread_info.last_resume_kind for new fork children.
1347
1348 2015-05-15 Pedro Alves <palves@redhat.com>
1349
1350 * target.h (target_handle_new_gdb_connection): Rewrite using if
1351 wrapped in do/while.
1352
1353 2015-05-14 Joel Brobecker <brobecker@adacore.com>
1354
1355 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1356 * configure, config.in: Regenerate.
1357 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1358 Declare typedef.
1359
1360 2015-05-12 Don Breazeal <donb@codesourcery.com>
1361
1362 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1363 PTRACE_EVENT_VFORK_DONE.
1364 (linux_low_ptrace_options, extended_event_reported): Add vfork
1365 events.
1366 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1367 and "vforkdone" for RSP 'T' Stop Reply Packet.
1368 * server.h (report_vfork_events): Declare
1369 global variable.
1370
1371 2015-05-12 Don Breazeal <donb@codesourcery.com>
1372
1373 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1374 (the_low_target) <new_fork>: Initialize new member.
1375 * linux-arm-low.c (arm_new_fork): New function.
1376 (the_low_target) <new_fork>: Initialize new member.
1377 * linux-low.c (handle_extended_wait): Call new target function
1378 new_fork.
1379 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1380 * linux-mips-low.c (mips_add_watchpoint): New function
1381 extracted from mips_insert_point.
1382 (the_low_target) <new_fork>: Initialize new member.
1383 (mips_linux_new_fork): New function.
1384 (mips_insert_point): Call mips_add_watchpoint.
1385 * linux-x86-low.c (x86_linux_new_fork): New function.
1386 (the_low_target) <new_fork>: Initialize new member.
1387
1388 2015-05-12 Don Breazeal <donb@codesourcery.com>
1389
1390 * linux-low.c (handle_extended_wait): Implement return value,
1391 rename argument 'event_child' to 'event_lwp', handle
1392 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1393 (linux_low_ptrace_options): New function.
1394 (linux_low_filter_event): Call linux_low_ptrace_options,
1395 use different argument fo linux_enable_event_reporting,
1396 use return value from handle_extended_wait.
1397 (extended_event_reported): New function.
1398 (linux_wait_1): Call extended_event_reported and set
1399 status to report fork events.
1400 (linux_write_memory): Add pid to debug message.
1401 (reset_lwp_ptrace_options_callback): New function.
1402 (linux_handle_new_gdb_connection): New function.
1403 (linux_target_ops): Initialize new structure member.
1404 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1405 * lynx-low.c: Initialize new structure member.
1406 * remote-utils.c (prepare_resume_reply): Implement stop reason
1407 "fork" for "T" stop message.
1408 * server.c (handle_query): Call handle_new_gdb_connection.
1409 * server.h (report_fork_events): Declare global flag.
1410 * target.h (struct target_ops) <handle_new_gdb_connection>:
1411 New member.
1412 (target_handle_new_gdb_connection): New macro.
1413 * win32-low.c: Initialize new structure member.
1414
1415 2015-05-12 Don Breazeal <donb@codesourcery.com>
1416
1417 * mem-break.c (APPEND_TO_LIST): Define macro.
1418 (clone_agent_expr): New function.
1419 (clone_one_breakpoint): New function.
1420 (clone_all_breakpoints): New function.
1421 * mem-break.h: Declare new functions.
1422
1423 2015-05-12 Don Breazeal <donb@codesourcery.com>
1424
1425 * linux-low.c (linux_supports_fork_events): New function.
1426 (linux_supports_vfork_events): New function.
1427 (linux_target_ops): Initialize new structure members.
1428 (initialize_low): Call linux_check_ptrace_features.
1429 * lynx-low.c (lynx_target_ops): Initialize new structure
1430 members.
1431 * server.c (report_fork_events, report_vfork_events):
1432 New global flags.
1433 (handle_query): Add new features to qSupported packet and
1434 response.
1435 (captured_main): Initialize new global variables.
1436 * target.h (struct target_ops) <supports_fork_events>:
1437 New member.
1438 <supports_vfork_events>: New member.
1439 (target_supports_fork_events): New macro.
1440 (target_supports_vfork_events): New macro.
1441 * win32-low.c (win32_target_ops): Initialize new structure
1442 members.
1443
1444 2015-05-12 Gary Benson <gbenson@redhat.com>
1445
1446 * server.c (handle_qxfer_exec_file): Use current process
1447 if annex is empty.
1448
1449 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1450
1451 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1452 Remove HAVE_PTRACE_GETREGS conditionals.
1453 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1454 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1455
1456 2015-05-08 Yao Qi <yao.qi@linaro.org>
1457
1458 * linux-low.c (linux_supports_conditional_breakpoints): New
1459 function.
1460 (linux_target_ops): Install new target method.
1461 * lynx-low.c (lynx_target_ops): Install NULL hook for
1462 supports_conditional_breakpoints.
1463 * nto-low.c (nto_target_ops): Likewise.
1464 * spu-low.c (spu_target_ops): Likewise.
1465 * win32-low.c (win32_target_ops): Likewise.
1466 * server.c (handle_query): Check
1467 target_supports_conditional_breakpoints.
1468 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1469 New field.
1470 (target_supports_conditional_breakpoints): New macro.
1471
1472 2015-05-06 Pedro Alves <palves@redhat.com>
1473
1474 PR server/18081
1475 * server.c (start_inferior): If the process exits, mourn it.
1476
1477 2015-04-21 Gary Benson <gbenson@redhat.com>
1478
1479 * hostio.c (fileio_open_flags_to_host): Factored out to
1480 fileio_to_host_openflags in common/fileio.c. Single use
1481 updated.
1482
1483 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1484
1485 * linux-xtensa-low.c (xtensa_fill_gregset)
1486 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1487 XCHAL_HAVE_LOOP.
1488
1489 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1490
1491 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1492 (regs_info): Replace usrregs pointer with NULL.
1493
1494 2015-04-17 Gary Benson <gbenson@redhat.com>
1495
1496 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1497 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1498 * server.c (handle_qxfer_exec_file): New function.
1499 (qxfer_packets): Add exec-file entry.
1500 (handle_query): Report qXfer:exec-file:read as supported packet.
1501
1502 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1503
1504 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1505
1506 2015-04-09 Gary Benson <gbenson@redhat.com>
1507
1508 * hostio-errno.c (errno_to_fileio_error): Remove function.
1509 Update caller to use remote_fileio_to_fio_error.
1510
1511 2015-04-09 Yao Qi <yao.qi@linaro.org>
1512
1513 * linux-low.c (linux_insert_point): Call
1514 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1515 (linux_remove_point): Call remove_memory_breakpoint if type is
1516 raw_bkpt_type_sw.
1517 * linux-x86-low.c (x86_insert_point): Don't call
1518 insert_memory_breakpoint.
1519 (x86_remove_point): Don't call remove_memory_breakpoint.
1520
1521 2015-04-01 Pedro Alves <palves@redhat.com>
1522 Cleber Rosa <crosa@redhat.com>
1523
1524 * server.c (gdbserver_usage): Reorganize and extend the usage
1525 message.
1526
1527 2015-03-24 Pedro Alves <palves@redhat.com>
1528
1529 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1530 output. Also dump TRAP_TRACE.
1531 (linux_low_filter_event): In debug output, distinguish a
1532 resume_stop SIGSTOP from a delayed SIGSTOP.
1533
1534 2015-03-24 Gary Benson <gbenson@redhat.com>
1535
1536 * linux-x86-low.c (x86_linux_new_thread): Moved to
1537 nat/x86-linux.c.
1538 (x86_linux_prepare_to_resume): Likewise.
1539
1540 2015-03-24 Gary Benson <gbenson@redhat.com>
1541
1542 * Makefile.in (x86-linux-dregs.o): New rule.
1543 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1544 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1545 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1546 (x86_linux_dr_get): Likewise.
1547 (x86_linux_dr_set): Likewise.
1548 (update_debug_registers_callback): Likewise.
1549 (x86_linux_dr_set_addr): Likewise.
1550 (x86_linux_dr_get_addr): Likewise.
1551 (x86_linux_dr_set_control): Likewise.
1552 (x86_linux_dr_get_control): Likewise.
1553 (x86_linux_dr_get_status): Likewise.
1554 (x86_linux_update_debug_registers): Likewise.
1555
1556 2015-03-24 Gary Benson <gbenson@redhat.com>
1557
1558 * linux-x86-low.c (x86_linux_update_debug_registers):
1559 New function, factored out from...
1560 (x86_linux_prepare_to_resume): ...this.
1561
1562 2015-03-24 Gary Benson <gbenson@redhat.com>
1563
1564 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1565 (x86_linux_dr_set): Likewise.
1566 (update_debug_registers_callback): Likewise.
1567 (x86_linux_dr_set_addr): Likewise.
1568 (x86_linux_dr_get_addr): Likewise.
1569 (x86_linux_dr_set_control): Likewise.
1570 (x86_linux_dr_get_control): Likewise.
1571 (x86_linux_dr_get_status): Likewise.
1572 (x86_linux_prepare_to_resume): Likewise.
1573
1574 2015-03-24 Gary Benson <gbenson@redhat.com>
1575
1576 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1577 Use perror_with_name. Pass string through gettext.
1578 (x86_linux_dr_set): Likewise.
1579
1580 2015-03-24 Gary Benson <gbenson@redhat.com>
1581
1582 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1583 (x86_linux_dr_set_addr): ...this.
1584 (x86_dr_low_get_addr): Rename to...
1585 (x86_linux_dr_get_addr): ...this.
1586 (x86_dr_low_set_control): Rename to...
1587 (x86_linux_dr_set_control): ...this.
1588 (x86_dr_low_get_control): Rename to...
1589 (x86_linux_dr_get_control): ...this.
1590 (x86_dr_low_get_status): Rename to...
1591 (x86_linux_dr_get_status): ...this.
1592 (x86_dr_low): Update with new function names.
1593
1594 2015-03-24 Gary Benson <gbenson@redhat.com>
1595
1596 * Makefile.in (x86-linux.o): New rule.
1597 * configure.srv: Add x86-linux.o to relevant targets.
1598 * linux-low.c (lwp_set_arch_private_info): New function.
1599 (lwp_arch_private_info): Likewise.
1600 * linux-x86-low.c: Include nat/x86-linux.h.
1601 (arch_lwp_info): Removed structure.
1602 (update_debug_registers_callback):
1603 Use lwp_set_debug_registers_changed.
1604 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1605 and lwp_set_debug_registers_changed.
1606 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1607
1608 2015-03-24 Gary Benson <gbenson@redhat.com>
1609
1610 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1611 * linux-arm-low.c (arm_new_thread): Likewise.
1612 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1613 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1614 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1615 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1616
1617 2015-03-24 Gary Benson <gbenson@redhat.com>
1618
1619 * linux-low.c (ptid_of_lwp): New function.
1620 (lwp_is_stopped): Likewise.
1621 (lwp_stop_reason): Likewise.
1622 * linux-x86-low.c (update_debug_registers_callback):
1623 Use lwp_is_stopped.
1624 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1625 lwp_stop_reason.
1626
1627 2015-03-24 Gary Benson <gbenson@redhat.com>
1628
1629 * linux-low.h (linux_stop_lwp): Remove declaration.
1630
1631 2015-03-24 Gary Benson <gbenson@redhat.com>
1632
1633 * linux-low.h: Include nat/linux-nat.h.
1634 * linux-low.c (iterate_over_lwps_args): New structure.
1635 (iterate_over_lwps_filter): New function.
1636 (iterate_over_lwps): Likewise.
1637 * linux-x86-low.c (update_debug_registers_callback):
1638 Update signature to what iterate_over_lwps expects.
1639 Remove PID check that iterate_over_lwps now performs.
1640 (x86_dr_low_set_addr): Use iterate_over_lwps.
1641 (x86_dr_low_set_control): Likewise.
1642
1643 2015-03-24 Gary Benson <gbenson@redhat.com>
1644
1645 * linux-x86-low.c (x86_debug_reg_state): New function.
1646 (x86_linux_prepare_to_resume): Use the above.
1647
1648 2015-03-24 Gary Benson <gbenson@redhat.com>
1649
1650 * linux-low.c (current_lwp_ptid): New function.
1651 * linux-x86-low.c: Include nat/linux-nat.h.
1652 (x86_dr_low_get_addr): Use current_lwp_ptid.
1653 (x86_dr_low_get_control): Likewise.
1654 (x86_dr_low_get_status): Likewise.
1655
1656 2015-03-20 Pedro Alves <palves@redhat.com>
1657
1658 * tracepoint.c (cmd_qtstatus): Make "str" const.
1659
1660 2015-03-20 Pedro Alves <palves@redhat.com>
1661
1662 * server.c (handle_general_set): Make "req_str" const.
1663
1664 2015-03-19 Pedro Alves <palves@redhat.com>
1665
1666 * linux-low.c (linux_resume_one_lwp): Rename to ...
1667 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1668 instead call perror_with_name.
1669 (check_ptrace_stopped_lwp_gone): New function.
1670 (linux_resume_one_lwp): Reimplement as wrapper around
1671 linux_resume_one_lwp_throw that swallows errors if the LWP is
1672 gone.
1673
1674 2015-03-19 Pedro Alves <palves@redhat.com>
1675
1676 * linux-low.c (count_events_callback, select_event_lwp_callback):
1677 No longer check whether the thread has resume_stop as last resume
1678 kind.
1679
1680 2015-03-19 Pedro Alves <palves@redhat.com>
1681
1682 * linux-low.c (count_events_callback, select_event_lwp_callback):
1683 Use the lwp's status_pending_p field, not the thread's.
1684
1685 2015-03-19 Pedro Alves <palves@redhat.com>
1686
1687 * linux-low.c (select_event_lwp_callback): Update comments to
1688 no longer mention SIGTRAP.
1689
1690 2015-03-18 Gary Benson <gbenson@redhat.com>
1691
1692 * server.c (handle_query): Do not report vFile:fstat as supported.
1693
1694 2015-03-11 Gary Benson <gbenson@redhat.com>
1695
1696 * hostio.c (sys/types.h): New include.
1697 (sys/stat.h): Likewise.
1698 (common-remote-fileio.h): Likewise.
1699 (handle_fstat): New function.
1700 (handle_vFile): Handle vFile:fstat packets.
1701
1702 2015-03-11 Gary Benson <gbenson@redhat.com>
1703
1704 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1705 struct stat.st_blocks and struct stat.st_blksize.
1706 * configure: Regenerate.
1707 * config.in: Likewise.
1708 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1709 (OBS): Add common-remote-fileio.o.
1710 (common-remote-fileio.o): New rule.
1711
1712 2015-03-09 Pedro Alves <palves@redhat.com>
1713
1714 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1715 'struct sockaddr' pointer in 'accept' call.
1716
1717 2015-03-09 Pedro Alves <palves@redhat.com>
1718
1719 Revert:
1720 2015-03-07 Pedro Alves <palves@redhat.com>
1721 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1722 or <winsock2.h> here. Instead include "gdb_socket.h".
1723 (remote_open): Use union gdb_sockaddr_u.
1724 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1725 or <winsock2.h> here. Instead include "gdb_socket.h".
1726 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1727 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1728 or <sys/un.h>.
1729 (init_named_socket, gdb_agent_helper_thread): Use union
1730 gdb_sockaddr_u.
1731
1732 2015-03-07 Pedro Alves <palves@redhat.com>
1733
1734 * configure.ac (build_warnings): Move
1735 -Wdeclaration-after-statement to the C-specific set.
1736 * configure: Regenerate.
1737
1738 2015-03-07 Pedro Alves <palves@redhat.com>
1739
1740 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1741 or <winsock2.h> here. Instead include "gdb_socket.h".
1742 (remote_open): Use union gdb_sockaddr_u.
1743 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1744 or <winsock2.h> here. Instead include "gdb_socket.h".
1745 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1746 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1747 or <sys/un.h>.
1748 (init_named_socket, gdb_agent_helper_thread): Use union
1749 gdb_sockaddr_u.
1750
1751 2015-03-07 Pedro Alves <palves@redhat.com>
1752
1753 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1754 instead.
1755
1756 2015-03-06 Yao Qi <yao.qi@linaro.org>
1757
1758 * linux-aarch64-low.c (aarch64_insert_point): Use
1759 show_debug_regs as a boolean.
1760 (aarch64_remove_point): Likewise.
1761
1762 2015-03-05 Pedro Alves <palves@redhat.com>
1763
1764 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1765 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1766 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1767 * nto-low.c (nto_target_ops): Likewise.
1768 * spu-low.c (spu_target_ops): Likewise.
1769 * win32-low.c (win32_target_ops): Likewise.
1770
1771 2015-03-04 Pedro Alves <palves@redhat.com>
1772
1773 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
1774 Decide whether a breakpoint triggered based on the SIGTRAP's
1775 siginfo.si_code.
1776 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1777 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
1778 (linux_low_filter_event): Check for breakpoints before checking
1779 watchpoints.
1780 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1781 siginfo.si_code.
1782 (linux_stopped_by_sw_breakpoint)
1783 (linux_supports_stopped_by_sw_breakpoint)
1784 (linux_stopped_by_hw_breakpoint)
1785 (linux_supports_stopped_by_hw_breakpoint): New functions.
1786 (linux_target_ops): Install new target methods.
1787
1788 2015-03-04 Pedro Alves <palves@redhat.com>
1789
1790 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1791 * server.c (swbreak_feature, hwbreak_feature): New globals.
1792 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1793 (captured_main): Clear swbreak_feature and hwbreak_feature.
1794 * server.h (swbreak_feature, hwbreak_feature): Declare.
1795 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1796 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1797 supports_stopped_by_hw_breakpoint>: New fields.
1798 (target_supports_stopped_by_sw_breakpoint)
1799 (target_stopped_by_sw_breakpoint)
1800 (target_supports_stopped_by_hw_breakpoint)
1801 (target_stopped_by_hw_breakpoint): Declare.
1802
1803 2015-03-04 Pedro Alves <palves@redhat.com>
1804
1805 enum lwp_stop_reason -> enum target_stop_reason
1806 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1807 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1808 (linux_wait_1, stuck_in_jump_pad_callback)
1809 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1810 (linux_stopped_by_watchpoint):
1811 * linux-low.h (enum lwp_stop_reason): Delete.
1812 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1813 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1814
1815 2015-03-04 Yao Qi <yao.qi@linaro.org>
1816
1817 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1818
1819 2015-03-03 Gary Benson <gbenson@redhat.com>
1820
1821 * hostio.c (handle_vFile): Fix prefix lengths.
1822
1823 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1824
1825 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1826 ptr_bits.
1827
1828 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1829
1830 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1831 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1832 (clean): Add "rm -f" for above C files.
1833 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1834 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1835 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1836 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1837 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1838 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1839 (init_registers_s390x_vx_linux64)
1840 (init_registers_s390x_tevx_linux64)
1841 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1842 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1843 declarations.
1844 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1845 (s390_store_vxrs_high): New functions.
1846 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1847 NT_S390_VXRS_HIGH.
1848 (s390_arch_setup): Add logic for selecting one of the new target
1849 descriptions. Activate the new vector regsets if applicable.
1850 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1851 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1852 and init_registers_s390x_tevx_linux64.
1853
1854 2015-03-01 Pedro Alves <palves@redhat.com>
1855
1856 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1857 parameter.
1858
1859 2015-02-27 Pedro Alves <palves@redhat.com>
1860
1861 * linux-x86-low.c (u_debugreg_offset): New function.
1862 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1863
1864 2015-02-27 Pedro Alves <palves@redhat.com>
1865
1866 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1867 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1868 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1869 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1870 (ps_lsetfpregs, ps_getpid)
1871 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1872 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1873 (ps_lsetxregs, ps_plog): Declare.
1874
1875 2015-02-27 Pedro Alves <palves@redhat.com>
1876
1877 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1878 IP_AGENT_EXPORT_FUNC.
1879 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1880 IP_AGENT_EXPORT_FUNC.
1881 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1882 (IP_AGENT_EXPORT): Delete.
1883 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1884 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1885 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1886 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1887 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1888 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1889 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1890 (traceframe_read_count, traceframe_write_count)
1891 (traceframes_created, trace_state_variables, get_raw_reg)
1892 (get_trace_state_variable_value, set_trace_state_variable_value)
1893 (ust_loaded, helper_thread_id, cmd_buf): Use
1894 IPA_SYM_EXPORTED_NAME.
1895 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1896 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1897 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1898 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1899 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1900 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1901 EXTERN_C_PUSH/EXTERN_C_POP.
1902 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1903 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1904 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1905 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1906 (traceframe_write_count, traceframe_read_count)
1907 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1908 (about_to_request_buffer_space, get_trace_state_variable_value)
1909 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1910 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1911 EXTERN_C_PUSH/EXTERN_C_POP.
1912 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1913 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1914 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1915 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1916 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1917 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1918 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1919 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1920 Define.
1921 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1922 (IP_AGENT_EXPORT_VAR_DECL): Define.
1923 (tracing): Declare.
1924 (gdb_agent_get_raw_reg): Declare.
1925
1926 2015-02-27 Tom Tromey <tromey@redhat.com>
1927 Pedro Alves <palves@redhat.com>
1928
1929 Rename symbols whose names are reserved C++ keywords throughout.
1930
1931 2015-02-27 Pedro Alves <palves@redhat.com>
1932
1933 * Makefile.in (COMPILER): New, get it from autoconf.
1934 (CXX): Get from autoconf instead.
1935 (COMPILE.pre): Use COMPILER.
1936 (CC-LD): Rename to ...
1937 (CC_LD): ... this. Use COMPILER.
1938 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
1939 (CXX_FOR_TARGET): Default to g++ instead of gcc.
1940 * acinclude.m4: Include build-with-cxx.m4.
1941 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
1942 Disable -Werror by default if building in C++ mode.
1943 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
1944 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
1945 the C++ compiler. Save/restore CXXFLAGS too.
1946 * configure: Regenerate.
1947
1948 2015-02-27 Pedro Alves <palves@redhat.com>
1949
1950 * acinclude.m4: Include libiberty.m4.
1951 * configure.ac: Call libiberty_INIT.
1952 * config.in, configure: Regenerate.
1953
1954 2015-02-26 Pedro Alves <palves@redhat.com>
1955
1956 * linux-low.c (linux_wait_1): When incrementing the PC past a
1957 program breakpoint always use the_low_target.breakpoint_len as
1958 increment, rather than the maximum between that and
1959 the_low_target.decr_pc_after_break.
1960
1961 2015-02-23 Pedro Alves <palves@redhat.com>
1962
1963 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
1964 thread was doing a step-over; always adjust the PC if
1965 we stepped over a permanent breakpoint.
1966 (linux_wait_1): If we stepped over breakpoint that was on top of a
1967 permanent breakpoint, manually advance the PC past it.
1968
1969 2015-02-23 Pedro Alves <palves@redhat.com>
1970
1971 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
1972 modes.
1973 (x86_fill_gregset, x86_store_gregset): Use it when handling
1974 $orig_eax.
1975
1976 2015-02-20 Pedro Alves <palves@redhat.com>
1977
1978 * thread-db.c: Include "nat/linux-procfs.h".
1979 (thread_db_init): Skip listing new threads if the kernel supports
1980 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
1981
1982 2015-02-20 Pedro Alves <palves@redhat.com>
1983
1984 * linux-low.c (status_pending_p_callback): Use ptid_match.
1985
1986 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
1987
1988 PR breakpoints/16812
1989 * linux-low.c (wstatus_maybe_breakpoint): Remove.
1990 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
1991 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
1992
1993 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
1994
1995 PR breakpoints/15956
1996 * tracepoint.c (cmd_qtinit): Add check for current_thread.
1997
1998 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1999
2000 * linux-low.c (linux_low_btrace_conf): Print size.
2001 * server.c (handle_btrace_conf_general_set): New.
2002 (hanle_general_set): Call handle_btrace_conf_general_set.
2003 (handle_query): Report Qbtrace-conf:bts:size as supported.
2004
2005 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2006
2007 * linux-low.c (linux_low_enable_btrace): Update parameters.
2008 (linux_low_btrace_conf): New.
2009 (linux_target_ops)<to_btrace_conf>: Initialize.
2010 * server.c (current_btrace_conf): New.
2011 (handle_btrace_enable): Rename to ...
2012 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
2013 to target_enable_btrace. Update comment. Update users.
2014 (handle_qxfer_btrace_conf): New.
2015 (qxfer_packets): Add btrace-conf entry.
2016 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2017 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2018 (target_ops)<read_btrace_conf>: New.
2019 (target_enable_btrace): Update parameters.
2020 (target_read_btrace_conf): New.
2021
2022 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2023
2024 * server.c (handle_btrace_general_set): Remove call to
2025 target_supports_btrace.
2026 (supported_btrace_packets): New.
2027 (handle_query): Call supported_btrace_packets.
2028 * target.h: include btrace-common.h.
2029 (btrace_target_info): Removed.
2030 (supports_btrace, target_supports_btrace): Update parameters.
2031
2032 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2033
2034 * Makefile.in (SFILES): Add common/btrace-common.c.
2035 (OBS): Add common/btrace-common.o.
2036 (btrace-common.o): Add build rules.
2037 * linux-low: Include btrace-common.h.
2038 (linux_low_read_btrace): Use struct btrace_data. Call
2039 btrace_data_init and btrace_data_fini.
2040
2041 2015-02-06 Pedro Alves <palves@redhat.com>
2042
2043 * thread-db.c (find_new_threads_callback): Add debug output.
2044
2045 2015-02-04 Pedro Alves <palves@redhat.com>
2046
2047 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2048 (resume_stopped_resumed_lwps): New function.
2049 (linux_wait_for_event_filtered): Use it.
2050
2051 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2052
2053 * Makefile.in (SFILES): Add linux-personality.c.
2054 (linux-personality.o): New rule.
2055 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2056 list of objects to be built.
2057 * linux-low.c: Include nat/linux-personality.h.
2058 (linux_create_inferior): Remove code to disable address space
2059 randomization (moved to ../nat/linux-personality.c). Create
2060 cleanup to disable address space randomization.
2061
2062 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2063
2064 * Makefile.in (posix-strerror.o): New rule.
2065 (mingw-strerror.o): Likewise.
2066 * configure: Regenerated.
2067 * configure.ac: Source file ../common/common.host. Initialize new
2068 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2069
2070 2015-01-14 Yao Qi <yao@codesourcery.com>
2071
2072 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2073 (ppc-linux.o): New rule.
2074 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2075 * configure.ac: AC_CHECK_FUNCS(getauxval).
2076 * config.in: Re-generated.
2077 * configure: Re-generated.
2078 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2079 ppc64_64bit_inferior_p
2080
2081 2015-01-14 Yao Qi <yao@codesourcery.com>
2082
2083 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2084 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2085 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2086 (PT_ORIG_R3, PT_TRAP): Likewise.
2087 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2088 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2089 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2090
2091 2015-01-10 Joel Brobecker <brobecker@adacore.com>
2092
2093 * i387-fp.c (i387_cache_to_xsave): In look over
2094 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2095 zmmh_low_space field by use of zmmh_high_space.
2096
2097 2015-01-09 Pedro Alves <palves@redhat.com>
2098
2099 * linux-low.c (step_over_bkpt): Move higher up in the file.
2100 (handle_extended_wait): Don't store the stop_pc here.
2101 (get_stop_pc): Adjust comments and rename to ...
2102 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2103 stopped for a software breakpoint or hardware breakpoint.
2104 (thread_still_has_status_pending_p): New function.
2105 (status_pending_p_callback): Use
2106 thread_still_has_status_pending_p. If the event is no longer
2107 interesting, resume the LWP.
2108 (handle_tracepoints): Add assert.
2109 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2110 (wstatus_maybe_breakpoint): New function.
2111 (cancel_breakpoint): Delete function.
2112 (check_stopped_by_watchpoint): New function, factored out from
2113 linux_low_filter_event.
2114 (lp_status_maybe_breakpoint): Delete function.
2115 (linux_low_filter_event): Remove filter_ptid argument.
2116 Leave thread group exits pending here. Store the LWP's stop PC.
2117 Always leave events pending.
2118 (linux_wait_for_event_filtered): Pull all events out of the
2119 kernel, and leave them all pending.
2120 (count_events_callback, select_event_lwp_callback): Consider all
2121 events.
2122 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2123 (select_event_lwp): Only give preference to the stepping LWP in
2124 all-stop mode. Adjust comments.
2125 (ignore_event): New function.
2126 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2127 references to cancel_breakpoints. Adjust to renames. Also give
2128 equal priority to all LWPs that have had events in non-stop mode.
2129 If reporting a software breakpoint event, unadjust the LWP's PC.
2130 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2131 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2132 Adjust.
2133 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2134 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2135 (linux_stopped_by_watchpoint): Adjust.
2136 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2137 * linux-low.h (enum lwp_stop_reason): New.
2138 (struct lwp_info) <stop_pc>: Adjust comment.
2139 <stopped_by_watchpoint>: Delete field.
2140 <stop_reason>: New field.
2141 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2142 * mem-break.c (software_breakpoint_inserted_here)
2143 (hardware_breakpoint_inserted_here): New function.
2144 * mem-break.h (software_breakpoint_inserted_here)
2145 (hardware_breakpoint_inserted_here): Declare.
2146 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2147 (cancel_breakpoints): Delete.
2148 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2149 (upload_fast_traceframes): Remove references to
2150 cancel_breakpoints.
2151
2152 2015-01-09 Pedro Alves <palves@redhat.com>
2153
2154 * thread-db.c (find_new_threads_callback): Ignore thread if the
2155 kernel thread ID is -1.
2156
2157 2015-01-09 Pedro Alves <palves@redhat.com>
2158
2159 * linux-low.c (linux_attach_fail_reason_string): Move to
2160 nat/linux-ptrace.c, and rename.
2161 (linux_attach_lwp): Update comment.
2162 (attach_proc_task_lwp_callback): New function.
2163 (linux_attach): Adjust to rename and use
2164 linux_proc_attach_tgid_threads.
2165 (linux_attach_fail_reason_string): Delete declaration.
2166
2167 2015-01-01 Joel Brobecker <brobecker@adacore.com>
2168
2169 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2170 * server.c (gdbserver_version): Likewise.
2171
2172 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2173
2174 * remote-utils.c: Include ctype.h.
2175 (input_interrupt): Explicitly handle the case when the char
2176 received is the NUL byte. Improve the printing of non-ASCII
2177 characters.
2178
2179 2014-12-16 Joel Brobecker <brobecker@adacore.com>
2180
2181 * linux-low.c (linux_low_filter_event): Update call to
2182 linux_enable_event_reporting following the addition of
2183 a new parameter to that function.
2184
2185 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
2186
2187 PR server/17457
2188 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2189 (AARCH64_FPCR_REGNO): Likewise.
2190 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2191 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2192 (aarch64_store_fpregset): Likewise.
2193
2194 2014-12-15 Joel Brobecker <brobecker@adacore.com>
2195
2196 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2197 Remove FIXME comment about assumption about N.
2198
2199 2014-12-13 Joel Brobecker <brobecker@adacore.com>
2200
2201 * configure.ac: If large-file support is disabled in GDBserver,
2202 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2203 * configure: Regenerate.
2204
2205 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2206
2207 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2208 warning upon ENODATA from ptrace.
2209 * linux-s390-low.c (s390_store_tdb): New.
2210 (s390_regsets): Add regset for NT_S390_TDB.
2211
2212 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2213
2214 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2215 without a fill_function.
2216 * linux-s390-low.c (s390_fill_last_break): Remove.
2217 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2218 (s390_arch_setup): Use regset's size instead of fill_function for
2219 loop end condition.
2220
2221 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2222
2223 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2224 the regset's store function when ptrace returned an error.
2225 * regcache.c (get_thread_regcache): Invalidate register cache
2226 before fetching inferior's registers.
2227
2228 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2229
2230 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2231 while-loop as for-loop.
2232 (regsets_store_inferior_registers): Likewise.
2233
2234 2014-11-28 Yao Qi <yao@codesourcery.com>
2235
2236 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2237 * config.in, configure: Re-generate.
2238 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2239 is defined.
2240
2241 2014-11-21 Yao Qi <yao@codesourcery.com>
2242
2243 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2244 (AC_CHECK_HEADERS): Remove malloc.h.
2245 * configure: Re-generated.
2246 * config.in: Re-generated.
2247 * server.h: Don't include alloca.h and malloc.h.
2248 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2249 Don't include malloc.h.
2250
2251 2014-11-17 Joel Brobecker <brobecker@adacore.com>
2252
2253 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2254 corresponding ERRNO check in same block.
2255
2256 2014-11-12 Pedro Alves <palves@redhat.com>
2257
2258 * server.c (cont_thread): Update comment.
2259 (start_inferior, attach_inferior): No longer clear cont_thread.
2260 (handle_v_cont): No longer set cont_thread.
2261 (captured_main): Clear cont_thread each time a GDB connects.
2262
2263 2014-11-12 Pedro Alves <palves@redhat.com>
2264
2265 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2266 thread, and don't resume all threads if the Hc thread has exited.
2267
2268 2014-11-12 Pedro Alves <palves@redhat.com>
2269
2270 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2271 the process group instead of to a specific LWP.
2272
2273 2014-10-15 Pedro Alves <palves@redhat.com>
2274
2275 PR server/17487
2276 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2277 parameter.
2278 (arm_set_thread_context): Delete.
2279 (the_low_target): Adjust.
2280 * win32-i386-low.c (debug_registers_changed)
2281 (debug_registers_used): Delete.
2282 (update_debug_registers_callback): New function.
2283 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2284 needing to update their debug registers.
2285 (win32_get_current_dr): New function.
2286 (x86_dr_low_get_addr, x86_dr_low_get_control)
2287 (x86_dr_low_get_status): Fetch the debug register from the thread
2288 record's context.
2289 (i386_initial_stuff): Adjust.
2290 (i386_get_thread_context): Remove current_event parameter. Don't
2291 clear debug_registers_changed nor copy DR values to
2292 debug_reg_state.
2293 (i386_set_thread_context): Delete.
2294 (i386_prepare_to_resume): New function.
2295 (i386_thread_added): Mark the thread as needing to update irs
2296 debug registers.
2297 (the_low_target): Remove i386_set_thread_context and install
2298 i386_prepare_to_resume.
2299 * win32-low.c (win32_get_thread_context): Adjust.
2300 (win32_set_thread_context): Use SetThreadContext
2301 directly.
2302 (win32_prepare_to_resume): New function.
2303 (win32_require_context): New function, factored out from ...
2304 (thread_rec): ... this.
2305 (continue_one_thread): Call win32_prepare_to_resume on each thread
2306 we're about to continue.
2307 (win32_resume): Call win32_prepare_to_resume on the event thread.
2308 * win32-low.h (struct win32_thread_info)
2309 <debug_registers_changed>: New field.
2310 (struct win32_target_ops): Change prototype of set_thread_context,
2311 delete set_thread_context and add prepare_to_resume.
2312 (win32_require_context): New declaration.
2313
2314 2014-10-08 Gary Benson <gbenson@redhat.com>
2315
2316 * server.h: Do not include common-exceptions.h.
2317
2318 2014-10-08 Gary Benson <gbenson@redhat.com>
2319
2320 * server.h: Do not include cleanups.h.
2321
2322 2014-09-30 James Hogan <james.hogan@imgtec.com>
2323
2324 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2325 mips64-dsp-linux.c.
2326
2327 2014-09-23 Yao Qi <yao@codesourcery.com>
2328
2329 * linux-low.c (lp_status_maybe_breakpoint): New function.
2330 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2331 (count_events_callback): Likewise.
2332 (select_event_lwp_callback): Likewise.
2333 (cancel_breakpoints_callback): Likewise.
2334
2335 2014-09-19 Don Breazeal <donb@codesourcery.com>
2336
2337 * linux-low.c (handle_extended_wait): Call
2338 linux_ptrace_get_extended_event.
2339 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2340 linux_is_extended_waitstatus.
2341
2342 2014-09-16 Joel Brobecker <brobecker@adacore.com>
2343
2344 * Makefile.in (CPPFLAGS): Define.
2345 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2346 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2347
2348 2014-09-16 Gary Benson <gbenson@redhat.com>
2349
2350 * inferiors.h (current_inferior): Renamed as...
2351 (current_thread): New variable. All uses updated.
2352 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2353 (maybe_move_out_of_jump_pad): Likewise.
2354 (cancel_breakpoint): Likewise.
2355 (linux_low_filter_event): Likewise.
2356 (wait_for_sigstop): Likewise.
2357 (linux_resume_one_lwp): Likewise.
2358 (need_step_over_p): Likewise.
2359 (start_step_over): Likewise.
2360 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2361 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2362 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2363 and save_inferior as saved_thread.
2364 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2365 saved_thread.
2366 (regcache_invalidate_thread): Likewise.
2367 * remote-utils.c (prepare_resume_reply): Likewise.
2368 * thread-db.c (thread_db_get_tls_address): Likewise.
2369 (disable_thread_event_reporting): Likewise.
2370 (remove_thread_event_breakpoints): Likewise.
2371 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2372 as saved_thread.
2373 * target.h (set_desired_inferior): Renamed as...
2374 (set_desired_thread): New declaration. All uses updated.
2375 * server.c (myresume): Updated comment to reference thread instead
2376 of inferior.
2377 (handle_serial_event): Likewise.
2378 (handle_target_event): Likewise.
2379
2380 2014-09-12 Tom Tromey <tromey@redhat.com>
2381 Gary Benson <gbenson@redhat.com>
2382
2383 * regcache.h: Include common-regcache.h.
2384 (regcache_read_pc): Don't declare.
2385 * regcache.c (get_thread_regcache_for_ptid): New function.
2386
2387 2014-09-11 Tom Tromey <tromey@redhat.com>
2388 Gary Benson <gbenson@redhat.com>
2389
2390 * symbol.c: New file.
2391 * Makefile.in (SFILES): Add symbol.c.
2392 (OBS): Add symbol.o.
2393
2394 2014-09-11 Gary Benson <gbenson@redhat.com>
2395
2396 * target.c (target_stop_ptid, target_continue_ptid): New
2397 functions.
2398
2399 2014-09-11 Tom Tromey <tromey@redhat.com>
2400 Gary Benson <gbenson@redhat.com>
2401
2402 * target.h: Include target/target.h.
2403 * target.c (target_read_memory, target_read_uint32)
2404 (target_write_memory): New functions.
2405
2406 2014-09-11 Gary Benson <gbenson@redhat.com>
2407
2408 * server.h (debug_hw_points): Don't declare.
2409 * server.c (debug_hw_points): Don't define. Replace all uses
2410 with show_debug_regs.
2411 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2412 all uses with show_debug_regs.
2413
2414 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2415
2416 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2417 endianness into account.
2418 (ppc_supply_ptrace_register): Likewise.
2419
2420 2014-09-03 James Hogan <james.hogan@imgtec.com>
2421
2422 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2423 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2424
2425 2014-09-03 Gary Benson <gbenson@redhat.com>
2426
2427 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2428 ALL_DEBUG_ADDRESS_REGISTERS.
2429
2430 2014-09-02 Gary Benson <gbenson@redhat.com>
2431
2432 * i386-low.h: Renamed as...
2433 * x86-low.h: New file. All type, function and variable name
2434 prefixes changed from "i386_" to "x86_". All references updated.
2435 * i386-low.c: Renamed as...
2436 * x86-low.c: New file. All type, function and variable name
2437 prefixes changed from "i386_" to "x86_". All references updated.
2438
2439 2014-09-02 Gary Benson <gbenson@redhat.com>
2440
2441 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2442 (x86_linux_new_thread): Likewise.
2443
2444 2014-08-29 Gary Benson <gbenson@redhat.com>
2445
2446 * server.h (setjmp.h): Do not include.
2447 (toplevel): Do not declare.
2448 (common-exceptions.h): Include.
2449 (cleanups.h): Likewise.
2450 * server.c (toplevel): Do not define.
2451 (exit_code): New static global.
2452 (detach_or_kill_for_exit_cleanup): New function.
2453 (main): New function. Original main renamed to...
2454 (captured_main): New function.
2455 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2456
2457 2014-08-29 Gary Benson <gbenson@redhat.com>
2458
2459 * Makefile.in (SFILES): Add common/common-exceptions.c.
2460 (OBS): Add common-exceptions.o.
2461 (common-exceptions.o): New rule.
2462 * utils.c (prepare_to_throw_exception): New function.
2463
2464 2014-08-29 Gary Benson <gbenson@redhat.com>
2465
2466 * config.in: Regenerate.
2467 * configure: Likewise.
2468
2469 2014-08-29 Gary Benson <gbenson@redhat.com>
2470
2471 * Makefile.in (SFILES): Add common/cleanups.c.
2472 (OBS): cleanups.o.
2473 (cleanups.o): New rule.
2474
2475 2014-08-29 Gary Benson <gbenson@redhat.com>
2476
2477 * utils.c (internal_vwarning): New function.
2478
2479 2014-08-28 Gary Benson <gbenson@redhat.com>
2480
2481 * utils.h (fatal): Remove declaration.
2482 * utils.c (fatal): Remove function.
2483
2484 2014-08-28 Gary Benson <gbenson@redhat.com>
2485
2486 * tracepoint.c (gdb_agent_init): Replace fatal with
2487 perror_with_name.
2488 (initialize_tracepoint): Likewise.
2489
2490 2014-08-28 Gary Benson <gbenson@redhat.com>
2491
2492 * remote-utils.c (remote_prepare): Replace fatal with error.
2493
2494 2014-08-28 Gary Benson <gbenson@redhat.com>
2495
2496 * linux-low.c (linux_async): Replace fatal with warning.
2497 Tidy up and return.
2498 (linux_start_non_stop): Return -1 if linux_async failed.
2499
2500 2014-08-28 Gary Benson <gbenson@redhat.com>
2501
2502 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2503 gdb_assert.
2504 (i386_dr_low_get_addr): Remove vague comment.
2505 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2506 gdb_assert.
2507
2508 2014-08-28 Gary Benson <gbenson@redhat.com>
2509
2510 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2511 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2512 internal_error.
2513 (linux_resume_one_lwp): Likewise.
2514 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2515 gdb_assert.
2516 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2517 with internal_error.
2518 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2519 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2520 (find_register_by_name): Replace fatal with internal_error.
2521 (find_regno): Likewise.
2522 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2523 * thread-db.c (thread_db_create_event): Likewise.
2524 (thread_db_load_search): Likewise.
2525 (try_thread_db_load_1): Likewise.
2526 * tracepoint.c (get_jump_space_head): Replace fatal with
2527 internal_error.
2528 (claim_trampoline_space): Likewise.
2529 (have_fast_tracepoint_trampoline_buffer): Likewise.
2530 (cmd_qtstart): Likewise.
2531 (stop_tracing): Likewise.
2532 (fast_tracepoint_collecting): Likewise.
2533 (target_malloc): Likewise.
2534 (download_tracepoint): Likewise.
2535 (download_trace_state_variables): Replace check with gdb_assert.
2536 (upload_fast_traceframes): Replace fatal with internal_error.
2537
2538 2014-08-19 Tom Tromey <tromey@redhat.com>
2539 Gary Benson <gbenson@redhat.com>
2540
2541 * Makefile.in (SFILES): Add common/common-debug.c.
2542 (OBS): Add common-debug.o.
2543 (common-debug.o): New rule.
2544 * debug.h (debug_printf): Don't declare.
2545 * debug.c (debug_printf): Renamed and rewritten as...
2546 (debug_vprintf): New function.
2547
2548 2014-08-19 Gary Benson <gbenson@redhat.com>
2549
2550 * utils.h: Do not include print-utils.h.
2551
2552 2014-08-19 Tom Tromey <tromey@redhat.com>
2553 Gary Benson <gbenson@redhat.com>
2554
2555 * server.h: Add static assertion.
2556 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2557
2558 2014-08-19 Tom Tromey <tromey@redhat.com>
2559 Gary Benson <gbenson@redhat.com>
2560
2561 * Makefile.in (SFILES): Add common/errors.c.
2562 (OBS): Add errors.o.
2563 (IPA_OBS): Add errors-ipa.o.
2564 (errors.o): New rule.
2565 (errors-ipa.o): Likewise.
2566 * utils.h (perror_with_name, error, warning): Don't declare.
2567 * utils.c (warning): Renamed and rewritten as...
2568 (vwarning): New function.
2569 (error): Renamed and rewritten as...
2570 (verror): New function.
2571 (internal_error): Renamed and rewritten as...
2572 (internal_verror): New function.
2573
2574 2014-08-07 Gary Benson <gbenson@redhat.com>
2575
2576 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2577 * configure: Regenerate.
2578 * config.in: Likewise.
2579 * server.h: Do not include errno.h.
2580 * event-loop.c: Likewise.
2581 * hostio-errno.c: Likewise.
2582 * linux-low.c: Likewise.
2583 * remote-utils.c: Likewise.
2584 * spu-low.c: Likewise.
2585 * utils.c: Likewise.
2586 * gdbreplay.c: Unconditionally include errno.h.
2587
2588 2014-08-07 Gary Benson <gbenson@redhat.com>
2589
2590 * server.h: Do not include string.h.
2591 * event-loop.c: Likewise.
2592 * linux-low.c: Likewise.
2593 * regcache.c: Likewise.
2594 * remote-utils.c: Likewise.
2595 * spu-low.c: Likewise.
2596 * utils.c: Likewise.
2597
2598 2014-08-07 Gary Benson <gbenson@redhat.com>
2599
2600 * server.h: Do not include gdb_assert.h.
2601
2602 2014-08-07 Gary Benson <gbenson@redhat.com>
2603
2604 * server.h: Do not include common-utils.h.
2605
2606 2014-08-07 Gary Benson <gbenson@redhat.com>
2607
2608 * server.h: Do not include ptid.h.
2609 * notif.h: Likewise.
2610
2611 2014-08-07 Gary Benson <gbenson@redhat.com>
2612
2613 * server.h: Do not include gdb_locale.h.
2614
2615 2014-08-07 Gary Benson <gbenson@redhat.com>
2616
2617 * server.h: Do not include gdb/signals.h.
2618 * win32-low.c: Likewise.
2619
2620 2014-08-07 Gary Benson <gbenson@redhat.com>
2621
2622 * server.h: Do not include pathmax.h.
2623
2624 2014-08-07 Gary Benson <gbenson@redhat.com>
2625
2626 * server.h: Do not include libiberty.h.
2627 * linux-bfin-low.c: Likewise.
2628
2629 2014-08-07 Gary Benson <gbenson@redhat.com>
2630
2631 * server.h: Do not include ansidecl.h.
2632
2633 2014-08-07 Gary Benson <gbenson@redhat.com>
2634
2635 * linux-x86-low.c: Do not include stddef.h.
2636 * lynx-ppc-low.c: Likewise.
2637 * tracepoint.c: Likewise.
2638
2639 2014-08-07 Gary Benson <gbenson@redhat.com>
2640
2641 * server.h: Do not include stdarg.h.
2642 * nto-low.c: Likewise.
2643
2644 2014-08-07 Gary Benson <gbenson@redhat.com>
2645
2646 * server.h: Do not include stdlib.h.
2647 * inferiors.c: Likewise.
2648 * linux-low.c: Likewise.
2649 * regcache.c: Likewise.
2650 * spu-low.c: Likewise.
2651 * tracepoint.c: Likewise.
2652 * utils.c: Likewise.
2653
2654 2014-08-07 Gary Benson <gbenson@redhat.com>
2655
2656 * server.h: Do not include stdio.h.
2657 * linux-low.c: Likewise.
2658 * remote-utils.c: Likewise.
2659 * spu-low.c: Likewise.
2660 * utils.c: Likewise.
2661 * wincecompat.c: Likewise.
2662
2663 2014-08-06 Gary Benson <gbenson@redhat.com>
2664
2665 * regcache.c (init_register_cache): Move conditionals inside if.
2666
2667 2014-08-06 Gary Benson <gbenson@redhat.com>
2668
2669 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2670
2671 2014-07-31 Gary Benson <gbenson@redhat.com>
2672
2673 * ax.h: Do not include server.h.
2674 * gdbthread.h: Likewise.
2675 * lynx-low.h: Likewise.
2676 * notif.h: Likewise.
2677
2678 2014-07-30 Gary Benson <gbenson@redhat.com>
2679
2680 * server.h: Include common-defs.h.
2681 Do not include config.h or build-gnulib-gdbserver/config.h.
2682
2683 2014-07-30 Gary Benson <gbenson@redhat.com>
2684
2685 * hostio-errno.c: Move server.h to top of includes list.
2686 * inferiors.c: Likewise.
2687 * linux-x86-low.c: Likewise.
2688 * notif.c: Include server.h.
2689
2690 2014-07-24 Tom Tromey <tromey@redhat.com>
2691 Gary Benson <gbenson@redhat.com>
2692
2693 * server.h (CORE_ADDR): Now unsigned.
2694
2695 2014-07-16 Pedro Alves <palves@redhat.com>
2696
2697 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2698
2699 2014-07-15 Pedro Alves <palves@redhat.com>
2700
2701 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2702 copy.
2703
2704 2014-07-11 Pedro Alves <palves@redhat.com>
2705
2706 * linux-low.c (kill_wait_lwp): New function, based on
2707 kill_one_lwp_callback, but use my_waitpid directly.
2708 (kill_one_lwp_callback, linux_kill): Use it.
2709
2710 2014-06-23 Pedro Alves <palves@redhat.com>
2711
2712 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2713 before setting DR0..DR3.
2714
2715 2014-06-20 Gary Benson <gbenson@redhat.com>
2716
2717 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2718 * configure: Regenerated.
2719 * config.in: Likewise.
2720
2721 2014-06-20 Gary Benson <gbenson@redhat.com>
2722
2723 * Makefile.in (SFILES): Update locations for files moved
2724 from common to nat.
2725 (object file files): Reordered.
2726
2727 2014-06-20 Gary Benson <gbenson@redhat.com>
2728
2729 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2730 (i386_dr_low_set_addr): Likewise.
2731 (i386_dr_low_get_addr): Likewise.
2732 (i386_dr_low_can_set_control): Likewise.
2733 (i386_dr_low_set_control): Likewise.
2734 (i386_dr_low_get_control): Likewise.
2735 (i386_dr_low_get_status): Likewise.
2736 (i386_get_debug_register_length): Likewise.
2737 * linux-x86-low.c (i386_dr_low_set_addr):
2738 Changed signature. Made static.
2739 (i386_dr_low_get_addr): Likewise.
2740 (i386_dr_low_set_control): Likewise.
2741 (i386_dr_low_get_control): Likewise.
2742 (i386_dr_low_get_status): Likewise.
2743 (i386_dr_low): New global variable.
2744 * win32-i386-low.c (i386_dr_low_set_addr):
2745 Changed signature. Made static.
2746 (i386_dr_low_get_addr): Likewise.
2747 (i386_dr_low_set_control): Likewise.
2748 (i386_dr_low_get_control): Likewise.
2749 (i386_dr_low_get_status): Likewise.
2750 (i386_dr_low): New global variable.
2751
2752 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2753
2754 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2755 * Makefile.in (AR, AR_FLAGS): Define.
2756 * configure: Regenerate.
2757
2758 2014-06-19 Gary Benson <gbenson@redhat.com>
2759
2760 * Makefile.in (i386-dregs.o): New rule.
2761 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2762 * i386-low.c (target.h): Remove include.
2763 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2764 (DR_CONTROL_SHIFT): Likewise.
2765 (DR_CONTROL_SIZE): Likewise.
2766 (DR_RW_EXECUTE): Likewise.
2767 (DR_RW_WRITE): Likewise.
2768 (DR_RW_READ): Likewise.
2769 (DR_RW_IORW): Likewise.
2770 (DR_LEN_1): Likewise.
2771 (DR_LEN_2): Likewise.
2772 (DR_LEN_4): Likewise.
2773 (DR_LEN_8): Likewise.
2774 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2775 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2776 (DR_ENABLE_SIZE): Likewise.
2777 (DR_LOCAL_SLOWDOWN): Likewise.
2778 (DR_GLOBAL_SLOWDOWN): Likewise.
2779 (DR_CONTROL_RESERVED): Likewise.
2780 (I386_DR_CONTROL_MASK): Likewise.
2781 (I386_DR_VACANT): Likewise.
2782 (I386_DR_LOCAL_ENABLE): Likewise.
2783 (I386_DR_GLOBAL_ENABLE): Likewise.
2784 (I386_DR_DISABLE): Likewise.
2785 (I386_DR_SET_RW_LEN): Likewise.
2786 (I386_DR_GET_RW_LEN): Likewise.
2787 (I386_DR_WATCH_HIT): Likewise.
2788 (i386_wp_op_t): Likewise.
2789 (i386_show_dr): Likewise.
2790 (i386_length_and_rw_bits): Likewise.
2791 (i386_insert_aligned_watchpoint): Likewise.
2792 (i386_remove_aligned_watchpoint): Likewise.
2793 (i386_handle_nonaligned_watchpoint): Likewise.
2794 i386_update_inferior_debug_regs(): Likewise.
2795 (i386_dr_insert_watchpoint): Likewise.
2796 (i386_dr_remove_watchpoint): Likewise.
2797 (i386_dr_region_ok_for_watchpoint): Likewise.
2798 (i386_dr_stopped_data_address): Likewise.
2799 (i386_dr_stopped_by_watchpoint): Likewise.
2800
2801 2014-06-19 Gary Benson <gbenson@redhat.com>
2802
2803 * i386-low.c (i386_dr_show): Renamed to
2804 i386_show_dr and made static. All uses updated.
2805 (i386_dr_length_and_rw_bits): Renamed to
2806 i386_length_and_rw_bits and made static.
2807 All uses updated.
2808 (i386_dr_insert_aligned_watchpoint): Renamed to
2809 i386_insert_aligned_watchpoint and made static.
2810 All uses updated.
2811 (i386_dr_remove_aligned_watchpoint): Renamed to
2812 i386_remove_aligned_watchpoint and made static.
2813 All uses updated.
2814 (i386_dr_update_inferior_debug_regs): Renamed to
2815 i386_update_inferior_debug_regs and made static.
2816 All uses updated.
2817
2818 2014-06-18 Gary Benson <gbenson@redhat.com>
2819
2820 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2821 (i386_dr_low_can_set_control): Likewise.
2822 (i386_get_debug_register_length): Likewise.
2823 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2824 (i386_dr_low_can_set_control): Likewise.
2825 (i386_get_debug_register_length): Likewise.
2826
2827 2014-06-17 Gary Benson <gbenson@redhat.com>
2828
2829 * i386-low.h (i386-dregs.h): New include.
2830 (DR_FIRSTADDR): Now in i386-dregs.h.
2831 (DR_LASTADDR): Likewise.
2832 (DR_NADDR): Likewise.
2833 (DR_STATUS): Likewise.
2834 (DR_CONTROL): Likewise.
2835 (i386_debug_reg_state): Likewise.
2836 (i386_dr_insert_watchpoint): Likewise.
2837 (i386_dr_remove_watchpoint): Likewise.
2838 (i386_dr_region_ok_for_watchpoint): Likewise.
2839 (i386_dr_stopped_data_address): Likewise.
2840 (i386_dr_stopped_by_watchpoint): Likewise.
2841 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2842
2843 2014-06-18 Gary Benson <gbenson@redhat.com>
2844
2845 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2846 i386_dr_insert_watchpoint.
2847 (i386_low_remove_watchpoint): Renamed to
2848 i386_dr_remove_watchpoint.
2849 (i386_low_region_ok_for_watchpoint): Renamed to
2850 i386_dr_region_ok_for_watchpoint.
2851 (i386_low_stopped_data_address): Renamed to
2852 i386_dr_stopped_data_address.
2853 (i386_low_stopped_by_watchpoint): Renamed to
2854 i386_dr_stopped_by_watchpoint.
2855 * i386-low.c (i386_show_dr): Renamed to
2856 i386_dr_show and made nonstatic. All uses updated.
2857 (i386_length_and_rw_bits): Renamed to
2858 i386_dr_length_and_rw_bits and made nonstatic.
2859 All uses updated.
2860 (i386_insert_aligned_watchpoint): Renamed to
2861 i386_dr_insert_aligned_watchpoint and made nonstatic.
2862 All uses updated.
2863 (i386_remove_aligned_watchpoint): Renamed to
2864 i386_dr_remove_aligned_watchpoint and made nonstatic.
2865 All uses updated.
2866 (i386_update_inferior_debug_regs): Renamed to
2867 i386_dr_update_inferior_debug_regs and made nonstatic.
2868 All uses updated.
2869 (i386_low_insert_watchpoint): Renamed to
2870 i386_dr_insert_watchpoint. All uses updated.
2871 (i386_low_remove_watchpoint): Renamed to
2872 i386_dr_remove_watchpoint. All uses updated.
2873 (i386_low_region_ok_for_watchpoint): Renamed to
2874 i386_dr_region_ok_for_watchpoint. All uses updated.
2875 (i386_low_stopped_data_address): Renamed to
2876 i386_dr_stopped_data_address. All uses updated.
2877 (i386_low_stopped_by_watchpoint): Renamed to
2878 i386_dr_stopped_by_watchpoint. All uses updated.
2879
2880 2014-06-18 Gary Benson <gbenson@redhat.com>
2881
2882 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2883 (i386_dr_low_can_set_control): Likewise.
2884 (i386_insert_aligned_watchpoint): New check.
2885
2886 2014-06-18 Gary Benson <gbenson@redhat.com>
2887
2888 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2889 Renamed to state.
2890
2891 2014-06-18 Gary Benson <gbenson@redhat.com>
2892
2893 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2894 instead of fatal and error.
2895 (i386_handle_nonaligned_watchpoint): Likewise.
2896
2897 2014-06-18 Gary Benson <gbenson@redhat.com>
2898
2899 * i386-low.c (i386_get_debug_register_length): New macro.
2900 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2901 (i386_show_dr): Use debug_printf instead of fprintf. Use
2902 phex to format values.
2903
2904 2014-06-18 Gary Benson <gbenson@redhat.com>
2905
2906 * i386-low.h: Comment changes.
2907 * i386-low.c: Likewise.
2908
2909 2014-06-18 Gary Benson <gbenson@redhat.com>
2910
2911 * i386-low.c: Whitespace changes.
2912
2913 2014-06-12 Tom Tromey <tromey@redhat.com>
2914
2915 * utils.c (freeargv): Remove.
2916
2917 2014-06-12 Tom Tromey <tromey@redhat.com>
2918
2919 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2920 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2921 (parse_debug_format_options): Likewise.
2922 (gdbserver_usage): Likewise.
2923 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2924 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2925 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2926 against libiberty.
2927 ($(LIBGNU)): Depend on libiberty.
2928 (all-lib): Recurse into all subdirs.
2929 (install-only): Invoke "install" target in subdirs.
2930 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2931 targets.
2932 * configure: Rebuild.
2933 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
2934 for vasprintf, vsnprintf, or gettimeofday.
2935 * configure.srv: Don't add safe-ctype.o or lbasename.o to
2936 srv_tgtobj.
2937
2938 2014-06-05 Joel Brobecker <brobecker@adacore.com>
2939
2940 * development.sh: Delete.
2941 * Makefile.in (config.status): Adjust dependency on development.sh.
2942 * configure.ac: Adjust development.sh source call.
2943 * configure: Regenerate.
2944
2945 2014-06-02 Pedro Alves <palves@redhat.com>
2946
2947 * ax.c (gdb_free_agent_expr): New function.
2948 * ax.h (gdb_free_agent_expr): New declaration.
2949 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
2950 list.
2951 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
2952 static.
2953 (clear_breakpoint_conditions_and_commands): New function.
2954 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
2955 (clear_breakpoint_conditions_and_commands): New declaration.
2956
2957 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2958
2959 * linux-aarch64-low.c (asm/ptrace.h): Include.
2960
2961 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2962
2963 Fix TLS access for -static -pthread.
2964 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
2965 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
2966 (thread_db_load_search, try_thread_db_load_1): Initialize it.
2967
2968 2014-05-20 Pedro Alves <palves@redhat.com>
2969
2970 * linux-aarch64-low.c (aarch64_insert_point)
2971 (aarch64_remove_point): No longer check whether the type is
2972 supported here. Adjust to new interface.
2973 (the_low_target): Install aarch64_supports_z_point_type as
2974 supports_z_point_type method.
2975 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
2976 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
2977 instead of a Z packet char. Adjust.
2978 (arm_supports_z_point_type): New function.
2979 (arm_insert_point, arm_remove_point): Adjust to new interface.
2980 (the_low_target): Install arm_supports_z_point_type.
2981 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
2982 (cris_insert_point, cris_remove_point): Adjust to new interface.
2983 Don't check whether the type is supported here.
2984 (the_low_target): Install cris_supports_z_point_type.
2985 * linux-low.c (linux_supports_z_point_type): New function.
2986 (linux_insert_point, linux_remove_point): Adjust to new interface.
2987 * linux-low.h (struct linux_target_ops) <insert_point,
2988 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
2989 raw_breakpoint pointer parameter.
2990 <supports_z_point_type>: New method.
2991 * linux-mips-low.c (mips_supports_z_point_type): New function.
2992 (mips_insert_point, mips_remove_point): Adjust to new interface.
2993 Use mips_supports_z_point_type.
2994 (the_low_target): Install mips_supports_z_point_type.
2995 * linux-ppc-low.c (the_low_target): Install NULL as
2996 supports_z_point_type method.
2997 * linux-s390-low.c (the_low_target): Install NULL as
2998 supports_z_point_type method.
2999 * linux-sparc-low.c (the_low_target): Install NULL as
3000 supports_z_point_type method.
3001 * linux-x86-low.c (x86_supports_z_point_type): New function.
3002 (x86_insert_point): Adjust to new insert_point interface. Use
3003 insert_memory_breakpoint. Adjust to new
3004 i386_low_insert_watchpoint interface.
3005 (x86_remove_point): Adjust to remove_point interface. Use
3006 remove_memory_breakpoint. Adjust to new
3007 i386_low_remove_watchpoint interface.
3008 (the_low_target): Install x86_supports_z_point_type.
3009 * lynx-low.c (lynx_target_ops): Install NULL as
3010 supports_z_point_type callback.
3011 * nto-low.c (nto_supports_z_point_type): New.
3012 (nto_insert_point, nto_remove_point): Adjust to new interface.
3013 (nto_target_ops): Install nto_supports_z_point_type.
3014 * mem-break.c: Adjust intro comment.
3015 (struct raw_breakpoint) <raw_type, size>: New fields.
3016 <inserted>: Update comment.
3017 <shlib_disabled>: Delete field.
3018 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3019 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3020 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3021 (raw_bkpt_type_to_target_hw_bp_type): New function.
3022 (find_enabled_raw_code_breakpoint_at): New function.
3023 (find_raw_breakpoint_at): New type and size parameters. Use them.
3024 (insert_memory_breakpoint): New function, based off
3025 set_raw_breakpoint_at.
3026 (remove_memory_breakpoint): New function.
3027 (set_raw_breakpoint_at): Reimplement.
3028 (set_breakpoint): New, based on set_breakpoint_at.
3029 (set_breakpoint_at): Reimplement.
3030 (delete_raw_breakpoint): Go through the_target->remove_point
3031 instead of assuming memory breakpoints.
3032 (find_gdb_breakpoint_at): Delete.
3033 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3034 (find_gdb_breakpoint): New function.
3035 (set_gdb_breakpoint_at): Delete.
3036 (z_type_supported): New function.
3037 (set_gdb_breakpoint_1): New function, loosely based off
3038 set_gdb_breakpoint_at.
3039 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3040 (delete_gdb_breakpoint_at): Delete.
3041 (delete_gdb_breakpoint_1): New function, loosely based off
3042 delete_gdb_breakpoint_at.
3043 (delete_gdb_breakpoint): New function.
3044 (clear_gdb_breakpoint_conditions): Rename to ...
3045 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3046 breakpoint.
3047 (add_condition_to_breakpoint): Make static.
3048 (add_breakpoint_condition): Take a struct breakpoint pointer
3049 instead of an address. Adjust.
3050 (gdb_condition_true_at_breakpoint): Rename to ...
3051 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3052 z_type parameter.
3053 (gdb_condition_true_at_breakpoint): Reimplement.
3054 (add_breakpoint_commands): Take a struct breakpoint pointer
3055 instead of an address. Adjust.
3056 (gdb_no_commands_at_breakpoint): Rename to ...
3057 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3058 parameter. Return true if no breakpoint was found. Change debug
3059 output.
3060 (gdb_no_commands_at_breakpoint): Reimplement.
3061 (run_breakpoint_commands): Rename to ...
3062 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3063 and change return type to boolean.
3064 (run_breakpoint_commands): New function.
3065 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3066 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3067 breakpoint. Go through the_target->remove_point instead of
3068 assuming memory breakpoint.
3069 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3070 software and hardware breakpoints.
3071 (reinsert_raw_breakpoint): Go through the_target->insert_point
3072 instead of assuming memory breakpoint.
3073 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3074 software and hardware breakpoints.
3075 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3076 Check both software and hardware breakpoints.
3077 (validate_inserted_breakpoint): Assert the breakpoint is a
3078 software breakpoint. Set the inserted flag to -1 instead of
3079 setting shlib_disabled.
3080 (delete_disabled_breakpoints): Adjust.
3081 (validate_breakpoints): Only validate software breakpoints.
3082 Adjust to inserted flag change.
3083 (check_mem_read, check_mem_write): Skip breakpoint types other
3084 than software breakpoints. Adjust to inserted flag change.
3085 * mem-break.h (enum raw_bkpt_type): New enum.
3086 (raw_breakpoint, struct process_info): Forward declare.
3087 (Z_packet_to_target_hw_bp_type): Delete declaration.
3088 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3089 (set_gdb_breakpoint, delete_gdb_breakpoint)
3090 (clear_breakpoint_conditions): New declarations.
3091 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3092 (breakpoint_inserted_here): Update comment.
3093 (add_breakpoint_condition, add_breakpoint_commands): Replace
3094 address parameter with a breakpoint pointer parameter.
3095 (gdb_breakpoint_here): Update comment.
3096 (delete_gdb_breakpoint_at): Delete.
3097 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3098 * server.c (process_point_options): Take a struct breakpoint
3099 pointer instead of an address. Adjust.
3100 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3101 delete_gdb_breakpoint.
3102 * spu-low.c (spu_target_ops): Install NULL as
3103 supports_z_point_type method.
3104 * target.h: Include mem-break.h.
3105 (struct target_ops) <prepare_to_access_memory>: Update comment.
3106 <supports_z_point_type>: New field.
3107 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3108 instead of a char. Also take a raw breakpoint pointer.
3109 * win32-arm-low.c (the_low_target): Install NULL as
3110 supports_z_point_type.
3111 * win32-i386-low.c (i386_supports_z_point_type): New function.
3112 (i386_insert_point, i386_remove_point): Adjust to new interface.
3113 (the_low_target): Install i386_supports_z_point_type.
3114 * win32-low.c (win32_supports_z_point_type): New function.
3115 (win32_insert_point, win32_remove_point): Adjust to new interface.
3116 (win32_target_ops): Install win32_supports_z_point_type.
3117 * win32-low.h (struct win32_target_ops):
3118 <supports_z_point_type>: New method.
3119 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3120 instead of a char. Also take a raw breakpoint pointer.
3121
3122 2014-05-20 Pedro Alves <palves@redhat.com>
3123
3124 * mem-break.h: Include break-common.h.
3125 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3126 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3127 (Z_packet_to_target_hw_bp_type): New declaration.
3128 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3129 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3130 (Z_PACKET_ACCESS_WP): Delete macros.
3131 (Z_packet_to_hw_type): Delete function.
3132 * i386-low.h: Don't include break-common.h here.
3133 (Z_packet_to_hw_type): Delete declaration.
3134 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3135 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3136 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3137 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3138 * linux-aarch64-low.c: Don't include break-common.h here.
3139 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3140 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3141 (Z_packet_to_target_hw_bp_type): Delete function.
3142 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3143 function.
3144 (mips_insert_point, mips_remove_point): Use
3145 Z_packet_to_target_hw_bp_type.
3146
3147 2014-05-20 Pedro Alves <palves@redhat.com>
3148
3149 * linux-aarch64-low.c: Include break-common.h.
3150 (enum target_point_type): Delete.
3151 (Z_packet_to_point_type): Rename to ...
3152 (Z_packet_to_target_hw_bp_type): ... this, and return a
3153 target_hw_bp_type instead.
3154 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3155 instead of an enum target_point_type.
3156 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3157 breakpoint type.
3158 (aarch64_dr_state_insert_one_point)
3159 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3160 (aarch64_handle_aligned_watchpoint)
3161 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3162 Take an enum target_hw_bp_type instead of an enum
3163 target_point_type.
3164 (aarch64_supports_z_point_type): New function.
3165 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3166 use Z_packet_to_target_hw_bp_type.
3167
3168 2014-05-20 Joel Brobecker <brobecker@adacore.com>
3169
3170 * configure.ac: Only use -Werror by default when DEVELOPMENT
3171 is true.
3172 * configure: Regenerate.
3173
3174 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3175
3176 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3177 * linux-x86-low.c (X86_64_USER_REGS): New.
3178 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3179
3180 2014-04-28 Yao Qi <yao@codesourcery.com>
3181
3182 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3183 name.
3184
3185 2014-04-25 Pedro Alves <palves@redhat.com>
3186
3187 PR server/16255
3188 * linux-low.c (linux_attach_fail_reason_string): New function.
3189 (linux_attach_lwp): Delete.
3190 (linux_attach_lwp_1): Rename to ...
3191 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3192 argument. Remove "initial" parameter. Return int instead of
3193 void. Don't error or warn here.
3194 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3195 failure to attach to the tgid. Call warning when failing to
3196 attach to an lwp.
3197 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3198 argument. Remove "initial" parameter. Return int instead of
3199 void. Don't error or warn here.
3200 (linux_attach_fail_reason_string): New declaration.
3201 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3202 interface change. Use linux_attach_fail_reason_string.
3203
3204 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
3205 Walfred Tedeschi <walfred.tedeschi@intel.com>
3206
3207 * Makefile.in: Added rules to handle new files
3208 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3209 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3210 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3211 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3212 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3213 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3214 x32-avx512-linux.o.
3215 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3216 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3217 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3218 i386/x32-avx512.xml.
3219 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3220 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3221 i386/x32-avx512-linux.xml.
3222 * i387-fp.c (num_avx512_k_registers): New constant for number
3223 of K registers.
3224 (num_avx512_zmmh_low_registers): New constant for number of
3225 lower ZMM registers (0-15).
3226 (num_avx512_zmmh_high_registers): New constant for number of
3227 higher ZMM registers (16-31).
3228 (num_avx512_ymmh_registers): New contant for number of higher
3229 YMM registers (ymm16-31 added by avx521 on x86_64).
3230 (num_avx512_xmm_registers): New constant for number of higher
3231 XMM registers (xmm16-31 added by AVX512 on x86_64).
3232 (struct i387_xsave): Add space for AVX512 registers.
3233 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3234 Add code to handle AVX512 registers.
3235 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3236 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3237 prototypei from generated file.
3238 (tdesc_amd64_avx512_linux): Likewise.
3239 (init_registers_x32_avx512_linux): Likewise.
3240 (tdesc_x32_avx512_linux): Likewise.
3241 (init_registers_i386_avx512_linux): Likewise.
3242 (tdesc_i386_avx512_linux): Likewise.
3243 (x86_64_regmap): Add AVX512 registers.
3244 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3245 mask.
3246 (initialize_low_arch): Add code to initialize AVX512 registers.
3247
3248 2014-04-23 Pedro Alves <palves@redhat.com>
3249
3250 * mem-break.c (find_gdb_breakpoint_at): Make static.
3251 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3252
3253 2014-04-23 Pedro Alves <palves@redhat.com>
3254
3255 * i386-low.c: Don't include break-common.h here.
3256 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3257 prototype to take target_hw_bp_type as argument instead of a Z
3258 packet char.
3259 * i386-low.h: Include break-common.h here.
3260 (Z_packet_to_hw_type): Declare.
3261 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3262 prototypes.
3263 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3264 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3265 (x86_remove_point): Convert the packet number to a
3266 target_hw_bp_type before calling i386_low_remove_watchpoint.
3267 * win32-i386-low.c (i386_insert_point): Convert the packet number
3268 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3269 (i386_remove_point): Convert the packet number to a
3270 target_hw_bp_type before calling i386_low_remove_watchpoint.
3271
3272 2014-04-23 Pedro Alves <palves@redhat.com>
3273
3274 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3275
3276 2014-04-10 Pedro Alves <palves@redhat.com>
3277
3278 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3279 Check if the condition or command is NULL before checking if the
3280 breakpoint is known. On success, return true.
3281 * mem-break.h (add_breakpoint_condition): Document return.
3282 (add_breakpoint_commands): Add describing comment.
3283 * server.c (skip_to_semicolon): New function.
3284 (process_point_options): Use it.
3285
3286 2014-04-09 Pedro Alves <palves@redhat.com>
3287
3288 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3289 to lwpid_of.
3290
3291 2014-02-27 Pedro Alves <palves@redhat.com>
3292
3293 PR 12702
3294 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3295 macros.
3296 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3297 output.
3298 (last_thread_of_process_p): Take a PID argument instead of a
3299 thread pointer.
3300 (linux_wait_for_lwp): Delete.
3301 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3302 functions.
3303 (linux_low_filter_event): New function, party factored out from
3304 linux_wait_for_event.
3305 (linux_wait_for_event): Rename to ...
3306 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3307 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3308 sigsuspend. Check for zombie leaders.
3309 (linux_wait_for_event): Reimplement as wrapper around
3310 linux_wait_for_event_filtered.
3311 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3312 a normal or signal exit is seen, it's the whole process exiting.
3313 (wait_for_sigstop): No longer a for_each_inferior callback.
3314 Rewrite on top of linux_wait_for_event_filtered.
3315 (stop_all_lwps): Call wait_for_sigstop directly.
3316 * server.c (resume, handle_target_event): Handle
3317 TARGET_WAITKIND_NO_RESUMED.
3318
3319 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3320
3321 * win32-low.c (psapi_get_dll_name,
3322 * win32_CreateToolhelp32Snapshot): Delete.
3323 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3324 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3325 Delete.
3326 (handle_load_dll): Add function description.
3327 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3328
3329 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3330
3331 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3332 Add comment.
3333 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3334 base address when calling win32_add_one_solib.
3335 (handle_load_dll): Delete local variable load_addr.
3336 Remove 0x1000 offset applied to DLL base address when calling
3337 win32_add_one_solib.
3338 (handle_unload_dll): Add comment.
3339
3340 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3341
3342 * win32-low.c (win32_add_all_dlls): Renames
3343 win32_ensure_ntdll_loaded. Rewrite function documentation.
3344 Adjust implementation to always load all DLLs.
3345 Add 0x1000 offset to DLL base address when calling
3346 win32_add_one_solib.
3347 (child_initialization_done): New static global.
3348 (do_initial_child_stuff): Set child_initialization_done to
3349 zero during child initialization, and 1 after. Replace call
3350 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3351 Add comment.
3352 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3353 (handle_unload_dll): Add function documentation.
3354 (get_child_debug_event): Ignore load and unload DLL events
3355 during child initialization.
3356
3357 2014-02-20 Doug Evans <dje@google.com>
3358
3359 Remove global all_lwps.
3360 * inferiors.h (ptid_of): Move here from linux-low.h.
3361 (pid_of, lwpid_of): Ditto.
3362 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3363 parameter is a struct thread_info * now.
3364 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3365 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3366 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3367 directly.
3368 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3369 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3370 * linux-arm-low.c (update_registers_callback): Update, "entry"
3371 parameter is a struct thread_info * now.
3372 Fetch lwpid from current_inferior directly.
3373 (arm_insert_point): Pass &all_threads to find_inferior instead of
3374 &all_lwps.
3375 (arm_remove_point): Ditto.
3376 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3377 (arm_prepare_to_resume): Fetch pid from thread.
3378 (arm_read_description): Fetch lwpid from current_inferior directly.
3379 * linux-low.c (all_lwps): Delete.
3380 (delete_lwp): Delete call to remove_inferior.
3381 (handle_extended_wait): Fetch lwpid from thread.
3382 (add_lwp): Don't set lwp->entry.id. Remove call to
3383 add_inferior_to_list.
3384 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3385 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3386 (kill_one_lwp_callback): Ditto.
3387 (linux_kill): Don't dereference NULL pointer.
3388 Fetch ptid,lwpid from thread.
3389 (get_detach_signal): Fetch ptid from thread.
3390 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3391 Simplify call to regcache_invalidate_thread.
3392 (delete_lwp_callback): Update, "entry" parameter is a
3393 struct thread_info * now. Fetch pid from thread.
3394 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3395 (status_pending_p_callback): Update, "entry" parameter is a
3396 struct thread_info * now. Fetch ptid from thread.
3397 (find_lwp_pid): Update, "entry" parameter is a
3398 struct thread_info * now.
3399 (linux_wait_for_lwp): Fetch pid from thread.
3400 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3401 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3402 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3403 (dequeue_one_deferred_signal): Ditto.
3404 (cancel_breakpoint): Fetch ptid from current_inferior.
3405 (linux_wait_for_event): Pass &all_threads to find_inferior,
3406 not &all_lwps. Fetch ptid, lwpid from thread.
3407 (count_events_callback): Update, "entry" parameter is a
3408 struct thread_info * now.
3409 (select_singlestep_lwp_callback): Ditto.
3410 (select_event_lwp_callback): Ditto.
3411 (cancel_breakpoints_callback): Ditto.
3412 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3413 not &all_lwps.
3414 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3415 (unsuspend_one_lwp): Update, "entry" parameter is a
3416 struct thread_info * now.
3417 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3418 not &all_lwps.
3419 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3420 Fetch lwpid from thread, not lwp.
3421 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3422 Pass &all_threads to find_inferior, not &all_lwps.
3423 (send_sigstop): Fetch lwpid from thread, not lwp.
3424 (send_sigstop_callback): Update, "entry" parameter is a
3425 struct thread_info * now.
3426 (suspend_and_send_sigstop_callback): Ditto.
3427 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3428 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3429 struct thread_info * now.
3430 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3431 from thread, lwp.
3432 (lwp_running): Update, "entry" parameter is a
3433 struct thread_info * now.
3434 (stop_all_lwps): Fetch ptid from thread.
3435 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3436 (linux_resume_one_lwp): Fetch lwpid from thread.
3437 (linux_set_resume_request): Update, "entry" parameter is a
3438 struct thread_info * now. Fetch pid, lwpid from thread.
3439 (resume_status_pending_p): Update, "entry" parameter is a
3440 struct thread_info * now.
3441 (need_step_over_p): Ditto. Fetch lwpid from thread.
3442 (start_step_over): Fetch lwpid from thread.
3443 (linux_resume_one_thread): Update, "entry" parameter is a
3444 struct thread_info * now. Fetch lwpid from thread.
3445 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3446 (proceed_one_lwp): Update, "entry" parameter is a
3447 struct thread_info * now. Fetch lwpid from thread.
3448 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3449 struct thread_info * now.
3450 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3451 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3452 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3453 directly.
3454 (regsets_store_inferior_registers): Ditto.
3455 (fetch_register, store_register): Ditto.
3456 (linux_read_memory, linux_write_memory): Ditto.
3457 (linux_request_interrupt): Ditto.
3458 (linux_read_auxv): Ditto.
3459 (linux_xfer_siginfo): Ditto.
3460 (linux_qxfer_spu): Ditto.
3461 (linux_qxfer_libraries_svr4): Ditto.
3462 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3463 moved to inferiors.h.
3464 (get_lwp): Delete.
3465 (get_thread_lwp): Update.
3466 (struct lwp_info): Delete member "entry". Simplify comment for
3467 member "thread".
3468 (all_lwps): Delete.
3469 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3470 current_inferior directly.
3471 (update_watch_registers_callback): Update, "entry" parameter is a
3472 struct thread_info * now. Fetch pid from thread.
3473 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3474 (mips_insert_point): Fetch lwpid from current_inferior.
3475 Pass &all_threads to find_inferior, not &all_lwps.
3476 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3477 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3478 directly.
3479 (mips_stopped_data_address): Ditto.
3480 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3481 directly.
3482 * linux-tile-low.c (tile_arch_setup): Ditto.
3483 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3484 (update_debug_registers_callback): Update, "entry" parameter is a
3485 struct thread_info * now. Fetch pid from thread.
3486 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3487 Pass &all_threads to find_inferior, not &all_lwps.
3488 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3489 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3490 Pass &all_threads to find_inferior, not &all_lwps.
3491 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3492 (i386_dr_low_get_status): Ditto.
3493 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3494 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3495 (x86_linux_read_description): Ditto.
3496 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3497
3498 2014-02-20 Doug Evans <dje@google.com>
3499
3500 * inferiors.c (get_first_inferior): Fix buglet.
3501
3502 2014-02-19 Doug Evans <dje@google.com>
3503
3504 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3505 * inferiors.c (add_thread): Change result type to struct thread_info *.
3506 All callers updated.
3507 (add_lwp): Call add_thread here instead of in callers.
3508 All callers updated.
3509 * linux-low.h (get_lwp_thread): Rewrite.
3510 (struct lwp_info): New member "thread".
3511
3512 2014-02-19 Doug Evans <dje@google.com>
3513
3514 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3515 All callers updated.
3516
3517 2014-02-19 Doug Evans <dje@google.com>
3518
3519 * inferiors.c (add_thread): Fix whitespace.
3520
3521 2014-02-19 Doug Evans <dje@google.com>
3522
3523 * dll.c (clear_dlls): Replace accessing list implemention details
3524 with API function.
3525 * gdbthread.h (get_first_thread): Declare.
3526 * inferiors.c (for_each_inferior_with_data): New function.
3527 (get_first_thread): New function.
3528 (find_thread_ptid): Simplify.
3529 (get_first_inferior): New function.
3530 (clear_list): Delete.
3531 (one_inferior_p): New function.
3532 (clear_inferior_list): New function.
3533 (clear_inferiors): Update.
3534 * inferiors.h (for_each_inferior_with_data): Declare.
3535 (clear_inferior_list): Declare.
3536 (one_inferior_p): Declare.
3537 (get_first_inferior): Declare.
3538 * linux-low.c (linux_wait_for_event): Replace accessing list
3539 implemention details with API function.
3540 * server.c (target_running): Ditto.
3541 (accumulate_file_name_length): New function.
3542 (emit_dll_description): New function.
3543 (handle_qxfer_libraries): Replace accessing list implemention
3544 details with API function.
3545 (handle_qxfer_threads_worker): New function.
3546 (handle_qxfer_threads_proper): Replace accessing list implemention
3547 details with API function.
3548 (handle_query): Ditto.
3549 (visit_actioned_threads_callback_ftype): New typedef.
3550 (visit_actioned_threads_data): New struct.
3551 (visit_actioned_threads): Rewrite to be find_inferior callback.
3552 (resume): Call find_inferior.
3553 (handle_status): Replace accessing list implemention
3554 details with API function.
3555 (process_serial_event): Replace accessing list implemention details
3556 with API function.
3557 * target.c (set_desired_inferior): Replace accessing list implemention
3558 details with API function.
3559 * tracepoint.c (same_process_p): New function.
3560 (gdb_agent_about_to_close): Replace accessing list implemention
3561 details with API function.
3562 * win32-low.c (child_delete_thread): Replace accessing list
3563 implemention details with API function.
3564 (match_dll_by_basename): New function.
3565 (dll_is_loaded_by_basename): New function.
3566 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3567 details call to dll_is_loaded_by_basename.
3568
3569 2014-02-19 Doug Evans <dje@google.com>
3570
3571 * dll.h (struct dll_info): Add comment.
3572 * gdbthread.h (struct thread_info): Add comment.
3573 (current_ptid): Simplify.
3574 * inferiors.c (add_process): Update.
3575 (remove_process): Update.
3576 * inferiors.h (struct process_info): Rename member "head" to "entry".
3577 * linux-low.c (delete_lwp): Update.
3578 (add_lwp): Update.
3579 (last_thread_of_process_p): Update.
3580 (kill_one_lwp_callback, linux_kill): Update.
3581 (status_pending_p_callback): Update.
3582 (wait_for_sigstop): Update. Simplify read of ptid.
3583 (start_step_over): Update.
3584 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3585 (get_lwp_thread): Update.
3586 (struct lwp_info): Rename member "head" to "entry".
3587 * regcache.h (inferior_list_entry): Delete.
3588 * server.c (kill_inferior_callback): Update.
3589 (detach_or_kill_inferior_callback): Update.
3590 (print_started_pid): Update.
3591 (print_attached_pid): Update.
3592 (process_serial_event): Simplify read of ptid.
3593 * thread-db.c (thread_db_create_event): Update.
3594 (thread_db_get_tls_address): Update.
3595 * win32-low.c (current_inferior_ptid): Simplify.
3596
3597 2014-02-19 Tom Tromey <tromey@redhat.com>
3598
3599 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3600 argument.
3601 (target_supports_btrace): Update.
3602
3603 2014-02-14 Yao Qi <yao@codesourcery.com>
3604
3605 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3606 (rsp-low-ipa.o): New target.
3607
3608 2014-02-12 Tom Tromey <tromey@redhat.com>
3609
3610 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3611 convert_ascii_to_int.
3612 * regcache.c (registers_to_string): Likewise.
3613 * remote-utils.c (decode_M_packet): Likewise.
3614 * server.c (process_serial_event): Likewise.
3615
3616 2014-02-12 Tom Tromey <tromey@redhat.com>
3617
3618 * server.c (handle_query, handle_v_run): Use hex2bin, not
3619 unhexify.
3620 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3621
3622 2014-02-12 Tom Tromey <tromey@redhat.com>
3623
3624 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3625 convert_int_to_ascii.
3626 * regcache.c (registers_to_string, collect_register_as_string):
3627 Likewise.
3628 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3629 Likewise.
3630 * server.c (process_serial_event): Likewise.
3631 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3632 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3633
3634 2014-02-12 Tom Tromey <tromey@redhat.com>
3635
3636 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3637 bin2hex, not hexify.
3638 * tracepoint.c (cmd_qtstatus): Likewise.
3639
3640 2014-02-12 Tom Tromey <tromey@redhat.com>
3641
3642 * remote-utils.c (monitor_output): Pass explicit length to
3643 hexify.
3644
3645 2014-02-12 Tom Tromey <tromey@redhat.com>
3646
3647 * tracepoint.c: Include rsp-low.h.
3648 * server.c: Include rsp-low.h.
3649 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3650 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3651 declare.
3652 * remote-utils.c: Include rsp-low.h.
3653 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3654 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3655 (convert_int_to_ascii, convert_ascii_to_int): Move to
3656 common/rsp-low.c.
3657 * regcache.c: Include rsp-low.h.
3658 * ax.c: Include rsp-low.h.
3659 * Makefile.in (SFILES): Add common/rsp-low.c.
3660 (OBS): Add rsp-low.o.
3661 (rsp-low.o): New target.
3662
3663 2014-02-12 Tom Tromey <tromey@redhat.com>
3664
3665 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3666 Include print-utils.h.
3667 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3668 (plongest, thirty_two, phex_nz): Remove.
3669 * Makefile.in (SFILES): Add common/print-utils.c.
3670 (OBS): Add print-utils.o.
3671 (print-utils-ipa.o): New target.
3672 (print-utils.o): New target.
3673 (IPA_OBJS): Add print-utils-ipa.o.
3674
3675 2014-02-06 Tom Tromey <tromey@redhat.com>
3676
3677 * Makefile.in (SFILES): Fix indentation.
3678
3679 2014-02-05 Doug Evans <dje@google.com>
3680
3681 * linux-low.c (linux_wait_for_event): Improve comment.
3682 (linux_wait_1): Keep current_inferior in sync with event_child.
3683
3684 2014-01-22 Doug Evans <dje@google.com>
3685
3686 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3687
3688 2014-01-22 Doug Evans <dje@google.com>
3689
3690 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3691 * configure: Regenerate.
3692 * config.in: Regenerate.
3693 * Makefile.in (SFILES): Add debug.c.
3694 (OBS): Add debug.o.
3695 * debug.c: New file.
3696 * debug.h: New file.
3697 * linux-aarch64-low.c (*): Update all debugging printfs to use
3698 debug_printf instead of fprintf.
3699 * linux-arm-low.c (*): Ditto.
3700 * linux-cris-low.c (*): Ditto.
3701 * linux-crisv32-low.c (*): Ditto.
3702 * linux-m32r-low.c (*): Ditto.
3703 * linux-sparc-low.c (*): Ditto.
3704 * linux-x86.c (*): Ditto.
3705 * linux-low.c (*): Ditto.
3706 (linux_wait_1): Add calls to debug_enter, debug_exit.
3707 (linux_wait): Remove redundant debugging printf.
3708 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3709 (linux_resume, unstop_all_lwps): Ditto.
3710 * mem-break.c (*): Update all debugging printfs to use
3711 debug_printf instead of fprintf.
3712 * remote-utils.c (*): Ditto.
3713 * thread-db.c (*): Ditto.
3714 * server.c #include <ctype.h>, "gdb_vecs.h".
3715 (debug_threads): Moved to debug.c.
3716 (*): Update all debugging printfs to use debug_printf instead of
3717 fprintf.
3718 (start_inferior): Replace call to fflush with call to debug_flush.
3719 (monitor_show_help): Mention set debug-format.
3720 (parse_debug_format_options): New function.
3721 (handle_monitor_command): Handle "monitor set debug-format".
3722 (gdbserver_usage): Mention --debug-format.
3723 (main): Parse --debug-format.
3724 * server.h (debug_threads): Declaration moved to debug.h.
3725 #include "debug.h".
3726 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3727 trace_debug_1 that uses debug_printf.
3728 (tracepoint_look_up_symbols): Update all debugging printfs to use
3729 debug_printf instead of fprintf.
3730
3731 2014-01-20 Baruch Siach <baruch@tkos.co.il>
3732
3733 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3734 sys/ptrace.h.
3735
3736 2014-01-17 Pedro Alves <palves@redhat.com>
3737
3738 PR build/16445
3739 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3740 defined after including gdb_proc_service.h.
3741
3742 2014-01-16 Doug Evans <dje@google.com>
3743
3744 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3745 (match_dll): Use it.
3746
3747 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3748
3749 * target.h (target_ops) <read_btrace>: Change parameters and
3750 return type to allow error reporting.
3751 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3752 trace reading errors on.
3753 * linux-low.c (linux_low_read_btrace): Pass trace reading
3754 errors on.
3755 (linux_low_disable_btrace): New.
3756
3757 2014-01-15 Doug Evans <dje@google.com>
3758
3759 * inferiors.c (thread_id_to_gdb_id): Delete.
3760 * inferiors.h (thread_id_to_gdb_id): Delete.
3761
3762 2014-01-13 Eli Zaretskii <eliz@gnu.org>
3763
3764 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3765 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3766 versions.
3767
3768 2014-01-08 Pedro Alves <palves@redhat.com>
3769
3770 * server.c (handle_status): Don't discard previous queued stop
3771 replies or thread's pending status here.
3772 (main) <disconnection>: Do it here instead.
3773
3774 2014-01-08 Pedro Alves <palves@redhat.com>
3775
3776 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3777 * server.c (visit_actioned_threads, handle_pending_status): New
3778 function.
3779 (handle_v_cont): Factor out parts to ...
3780 (resume): ... this new function. If in all-stop, and a thread
3781 being resumed has a pending status, report it without actually
3782 resuming.
3783 (myresume): Adjust to use the new 'resume' function.
3784 (clear_pending_status_callback, set_pending_status_callback)
3785 (find_status_pending_thread_callback): New functions.
3786 (handle_status): Handle the case of multiple threads having
3787 interesting statuses to report. Report threads' real last signal
3788 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3789 with an interesting thread to report the status for, instead of
3790 always reporting the status of the first thread.
3791
3792 2014-01-01 Joel Brobecker <brobecker@adacore.com>
3793
3794 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3795 * gdbreplay.c (gdbreplay_version): Likewise.
3796
3797 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3798
3799 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3800 iov.iov_len with the real length in use.
3801
3802 2013-12-13 Joel Brobecker <brobecker@adacore.com>
3803
3804 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3805 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3806 for all targets that use win32-low.c.
3807 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3808 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3809
3810 2013-12-13 Pedro Alves <palves@redhat.com>
3811
3812 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3813 if equal to TARGET_WAITKIND_LOADED.
3814 * win32-low.c (cached_status): New static global.
3815 (win32_wait): Add declaration.
3816 (do_initial_child_stuff): Flush all initial pending debug events
3817 up to the initial breakpoint.
3818 (win32_wait): If CACHED_STATUS was set, return that instead
3819 of doing a real wait. Remove the code resuming the execution
3820 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3821 during the initial phase. Also remove the code changing
3822 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3823 TARGET_WAITKIND_STOPPED.
3824
3825 2013-12-11 Yao Qi <yao@codesourcery.com>
3826
3827 * notif.c (handle_notif_ack): Return 0 if no notification
3828 matches.
3829
3830 2013-11-20 Doug Evans <dje@google.com>
3831
3832 * linux-low.c (linux_set_resume_request): Fix comment.
3833
3834 2013-11-20 Doug Evans <dje@google.com>
3835
3836 * linux-low.c (resume_status_pending_p): Tweak comment.
3837
3838 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3839
3840 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3841 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3842 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3843 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3844 (srv_amd64_regobj): Add amd64-mpx.o.
3845 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3846 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3847 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3848 * i387-fp.c (num_pl_bnd_register) Added constant.
3849 (num_pl_bnd_cfg_registers) Added constant.
3850 (struct i387_xsave) Added reserved area and MPX fields.
3851 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3852 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3853 function.
3854 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3855 (init_registers_amd64_mpx_linux): Declare new function.
3856 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3857 (x86_64_regmap): Add MPX registers.
3858 (x86_linux_read_description): Add MPX case.
3859 (initialize_low_arch): Initialize MPX targets.
3860
3861 2013-11-18 Tom Tromey <tromey@redhat.com>
3862
3863 * configure: Rebuild.
3864 * configure.ac: Don't check for stdlib.h.
3865 * gdbreplay.c: Unconditionally include stdlib.h.
3866
3867 2013-11-18 Tom Tromey <tromey@redhat.com>
3868
3869 * config.in: Rebuild.
3870 * configure: Rebuild.
3871 * configure.ac: Don't use AC_HEADER_DIRENT.
3872
3873 2013-11-18 Tom Tromey <tromey@redhat.com>
3874
3875 * server.h: Don't check HAVE_STRING_H.
3876 * gdbreplay.c: Don't check HAVE_STRING_H.
3877 * configure: Rebuild.
3878
3879 2013-11-18 Tom Tromey <tromey@redhat.com>
3880
3881 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3882 LIBGNU.
3883
3884 2013-11-08 Tom Tromey <tromey@redhat.com>
3885
3886 * configure, config.in: Rebuild.
3887 * configure.ac: Remove unused configury.
3888
3889 2013-11-08 Tom Tromey <tromey@redhat.com>
3890
3891 * acinclude.m4: Include common.m4, codeset.m4.
3892 * configure, config.in: Rebuild.
3893 * configure.ac: Use GDB_AC_COMMON.
3894
3895 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3896
3897 * linux-s390-low.c (HWCAP_S390_TE): New define.
3898 (s390_arch_setup): Consider the TE field in the HWCAP for
3899 determining 'have_regset_tdb'.
3900
3901 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3902
3903 PR gdb/16014
3904 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3905 call to sizeof.
3906
3907 2013-10-02 Pedro Alves <palves@redhat.com>
3908
3909 * server.c (process_serial_event): Don't output "GDBserver
3910 exiting" if GDB is connected through stdio.
3911 * target.c (mywait): Likewise, be silent if GDB is connected
3912 through stdio.
3913
3914 2013-10-01 Joel Brobecker <brobecker@adacore.com>
3915
3916 * lynx-low.c (lynx_add_threads_after_attach): New function.
3917 (lynx_attach): Remove call to add_thread. Add call to
3918 lynx_add_threads_after_attach instead.
3919
3920 2013-09-28 Mike Frysinger <vapier@gentoo.org>
3921
3922 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3923 * config.in, configure: Regenerated.
3924
3925 2013-09-18 Yao Qi <yao@codesourcery.com>
3926
3927 PR server/15959
3928 * server.c (start_inferior): Clear 'resume_info'.
3929
3930 2013-09-16 Jiong Wang <jiwang@tilera.com>
3931
3932 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
3933 for each register.
3934
3935 2013-09-16 Jiong Wang <jiwang@tilera.com>
3936
3937 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
3938 linux-tile-low.o to srv_tgtobj.
3939
3940 2013-09-16 Will Newton <will.newton@linaro.org>
3941
3942 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
3943 out regs.
3944
3945 2013-09-06 Pedro Alves <palves@redhat.com>
3946
3947 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
3948 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
3949 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
3950 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
3951 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
3952 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
3953
3954 2013-09-06 Pedro Alves <palves@redhat.com>
3955
3956 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
3957 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
3958
3959 2013-09-06 Pedro Alves <palves@redhat.com>
3960
3961 * linux-amd64-ipa.c: Include tracepoint.h.
3962 * linux-i386-ipa.c: Include tracepoint.h.
3963
3964 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
3965
3966 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
3967 (ps_get_thread_area): New function.
3968
3969 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
3970
3971 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
3972 (initialize_low_arch): Call init_registers_crisv32 rather than
3973 init_register_crisv32.
3974
3975 2013-09-05 Pedro Alves <palves@redhat.com>
3976
3977 * server.h (handle_vFile, hostio_last_error_from_errno): Move
3978 to ...
3979 * hostio.h: ... this new file.
3980 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
3981 win32-low.c: Include hostio.h.
3982
3983 2013-09-05 Pedro Alves <palves@redhat.com>
3984
3985 * server.h (gdb_client_data, handler_func, callback_handler_func)
3986 (delete_file_handler, add_file_handler, append_callback_event)
3987 (delete_callback_event, start_event_loop, initialize_event_loop):
3988 Move to event-loop.h and include it.
3989 * event-loop.h: New file.
3990
3991 2013-09-05 Pedro Alves <palves@redhat.com>
3992
3993 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
3994 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
3995 (loaded_dll, unloaded_dll): Move to ...
3996 * dll.h: ... this new file.
3997 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
3998
3999 2013-09-05 Pedro Alves <palves@redhat.com>
4000
4001 * server.h (current_process, get_thread_process, all_processes)
4002 (add_inferior_to_list, for_each_inferior, current_inferior)
4003 (remove_inferior, add_process, remove_process, find_process_pid)
4004 (have_started_inferiors_p, have_attached_inferiors_p)
4005 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4006 (clear_inferiors, find_inferior, find_inferior_id)
4007 (inferior_target_data, set_inferior_target_data)
4008 (inferior_regcache_data, set_inferior_regcache_data): Move to
4009 inferiors.h, and include it.
4010 * inferiors.h: New file.
4011
4012 2013-09-05 Pedro Alves <palves@redhat.com>
4013
4014 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4015 Move ...
4016 * ax.h: ... here.
4017
4018 2013-09-05 Pedro Alves <palves@redhat.com>
4019
4020 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4021 tracepoint.h.
4022 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4023 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4024 (handle_tracepoint_general_set, handle_tracepoint_query)
4025 (tracepoint_finished_step, tracepoint_was_hit)
4026 (release_while_stepping_state_list, current_traceframe)
4027 (in_readonly_region, traceframe_read_mem)
4028 (fetch_traceframe_registers, traceframe_read_sdata)
4029 (traceframe_read_info, struct fast_tpoint_collect_status)
4030 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4031 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4032 (supply_fast_tracepoint_registers)
4033 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4034 (ipa_tdesc, claim_trampoline_space)
4035 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4036 (agent_mem_read, agent_get_trace_state_variable_value)
4037 (agent_set_trace_state_variable_value, agent_tsv_read)
4038 (agent_mem_read_string, get_raw_reg_func_addr)
4039 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4040 * tracepoint.h: ... this new file.
4041
4042 2013-09-05 Pedro Alves <palves@redhat.com>
4043
4044 * server.h (perror_with_name, error, fatal, warning, paddress)
4045 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4046 include it.
4047 * utils.h: New file.
4048
4049 2013-09-05 Pedro Alves <palves@redhat.com>
4050
4051 * server.h (remote_debug, noack_mode, transport_is_reliable)
4052 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4053 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4054 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4055 (write_enn, initialize_async_io, enable_async_io)
4056 (disable_async_io, check_remote_input_interrupt_request)
4057 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4058 (dead_thread_notify, prepare_resume_reply)
4059 (decode_address_to_semicolon, decode_address, decode_m_packet)
4060 (decode_M_packet, decode_X_packet, decode_xfer_write)
4061 (decode_search_memory_packet, unhexify, hexify)
4062 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4063 (look_up_one_symbol, relocate_instruction)
4064 (monitor_output): Move to remote-utils.h, and include it.
4065 * remote-utils.h: New file.
4066
4067 2013-09-05 Pedro Alves <palves@redhat.com>
4068
4069 * server.h (_): Delete.
4070
4071 2013-09-02 Pedro Alves <palves@redhat.com>
4072
4073 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4074 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4075 allocated.
4076 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4077
4078 2013-09-02 Pierre Muller <muller@sourceware.org>
4079
4080 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4081 or WriteProcessMemory complete successfully and handle
4082 ERROR_PARTIAL_COPY error.
4083
4084 2013-09-02 Pedro Alves <palves@redhat.com>
4085
4086 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4087 error instead of EIO.
4088
4089 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4090
4091 PR server/15604
4092 * linux-low.c: Include filestuff.h.
4093 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4094 * lynx-low.c: Include filestuff.h.
4095 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4096 * server.c: Include filestuff.h.
4097 (main): Call notice_open_fds.
4098 * spu-low.c: Include filestuff.h.
4099 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4100
4101 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
4102
4103 * Makefile.in: Explain why ../target and ../nat are not
4104 listed as include file search paths.
4105 (linux-waitpid.o): New object file rule.
4106 * configure.srv (srv_native_linux_obj): New variable.
4107 Replace all occurrences of linux native object files with
4108 $srv_native_linux_obj.
4109 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4110 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4111 (linux_enable_event_reporting): Remove declaration.
4112 (my_waitpid): Moved to common/linux-waitpid.c.
4113 (linux_wait_for_event): Pass ptid when calling
4114 linux_enable_event_reporting.
4115 (linux_supports_tracefork_flag): Remove.
4116 (linux_enable_event_reporting): Likewise.
4117 (linux_tracefork_grandchild): Remove.
4118 (STACK_SIZE): Moved to common/linux-ptrace.c.
4119 (linux_tracefork_child): Remove.
4120 (linux_test_for_tracefork): Remove.
4121 (linux_look_up_symbols): Call linux_supports_traceclone.
4122 (initialize_low): Remove call to linux_test_for_tracefork.
4123 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4124 common/linux-ptrace.h.
4125 (PTRACE_TYPE_ARG4): Likewise.
4126 Include linux-ptrace.h.
4127
4128 2013-08-21 Pedro Alves <palves@redhat.com>
4129
4130 * config.in: Renegerate.
4131
4132 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
4133
4134 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4135 (SFILES): Remove $(srcdir)/common/target-common.c and
4136 add $(srcdir)/target/waitstatus.c.
4137 (OBS): Remove target-common.o and add waitstatus.o.
4138 (server_h): Remove $(srcdir)/../common/target-common.h and
4139 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4140 and $(srcdir)/../target/waitstatus.h.
4141 (target-common.o): Remove.
4142 (waitstatus.o): New target object file.
4143 * target.h: Do not include target-common.h and
4144 include target/resume.h, target/wait.h and
4145 target/waitstatus.h.
4146
4147 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
4148
4149 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4150 to PTRACE_TYPE_ARG3.
4151 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4152 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4153 PTRACE_TYPE_ARG4.
4154 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4155 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4156
4157 2013-07-27 Jie Zhang <jie@codesourcery.com>
4158 Daniel Jacobowitz <dan@codesourcery.com>
4159 Yao Qi <yao@codesourcery.com>
4160
4161 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4162 (mips-linux-watch.o): New rule.
4163 (mips_linux_watch_h): New variable.
4164 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4165 srv_tgtobj.
4166 * linux-mips-low.c: Include mips-linux-watch.h.
4167 (struct arch_process_info, struct arch_lwp_info): New.
4168 (update_watch_registers_callback): New function.
4169 (mips_linux_new_process, mips_linux_new_thread) New functions.
4170 (mips_linux_prepare_to_resume, mips_insert_point): New
4171 functions.
4172 (mips_remove_point, mips_stopped_by_watchpoint): New
4173 functions.
4174 (rsp_bp_type_to_target_hw_bp_type): New function.
4175 (mips_stopped_data_address): New function.
4176 (the_low_target): Add watchpoint support functions.
4177
4178 2013-07-27 Yao Qi <yao@codesourcery.com>
4179
4180 * i386-low.c: Include break-common.h.
4181 (enum target_hw_bp_type): Remove.
4182
4183 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
4184
4185 * Makefile.in (SFILES): /common/target-common.c.
4186 (OBS): Add target-common.o.
4187 (server_h): Add $(srcdir)/../common/target-common.h.
4188 (target-common.o): New target.
4189 * server.c (queue_stop_reply_callback): Free
4190 status string after use.
4191 * target.c (target_waitstatus_to_string): Remove.
4192 * target.h: Include target-common.h.
4193 (resume_kind): Likewise.
4194 (target_waitkind): Likewise.
4195 (target_waitstatus): Likewise.
4196 (TARGET_WNOHANG): Likewise.
4197
4198 2013-07-04 Yao Qi <yao@codesourcery.com>
4199
4200 * Makefile.in (host_alias): Use @host_noncanonical@.
4201 (target_alias): Use @target_noncanonical@.
4202 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4203 ACX_NONCANONICAL_HOST.
4204 * configure: Regenerated.
4205
4206 Revert:
4207 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4208
4209 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4210 * configure: Rebuild.
4211 * Makefile.in (version_host, version_target): Get from configure.
4212 (version.c): Use $(version_host) and $(version_target).
4213
4214 2013-07-03 Pedro Alves <palves@redhat.com>
4215
4216 * Makefile.in (config.status): Depend on development.sh.
4217 * acinclude.m4: Include libmcheck.m4.
4218 * configure: Regenerate.
4219
4220 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4221
4222 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4223 attribute inside the parentheses.
4224 (winapi_DebugSetProcessKillOnExit): Ditto.
4225 (winapi_DebugBreakProcess): Ditto.
4226 (winapi_GenerateConsoleCtrlEvent): Ditto.
4227
4228 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4229
4230 * notif.h (notif_event): Add a dummy member to avoid compiler
4231 errors.
4232
4233 2013-07-01 Pedro Alves <palves@redhat.com>
4234
4235 * hostio.c (HOSTIO_PATH_MAX): Define.
4236 (require_filename, handle_open, handle_unlink, handle_readlink):
4237 Use it.
4238
4239 2013-07-01 Pedro Alves <palves@redhat.com>
4240
4241 * server.h: Include "pathmax.h".
4242 * linux-low.c: Don't include sys/param.h.
4243 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4244 MAXPATHLEN.
4245 * win32-low.c: Don't include sys/param.h.
4246 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4247
4248 2013-07-01 Pedro Alves <palves@redhat.com>
4249
4250 * event-loop.c: Don't check HAVE_UNISTD_H before including
4251 <unistd.h>.
4252 * gdbreplay.c: Likewise.
4253 * remote-utils.c: Likewise.
4254 * server.c: Likewise.
4255 * configure.ac: Don't check for unistd.h.
4256 * configure: Regenerate.
4257
4258 2013-06-28 Tom Tromey <tromey@redhat.com>
4259
4260 * Makefile.in (version.c): Use version.in, not
4261 common/version.in.
4262
4263 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4264
4265 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4266 * configure: Rebuild.
4267 * Makefile.in (version_host, version_target): Get from configure.
4268 (version.c): Use $(version_host) and $(version_target).
4269
4270 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4271
4272 Fix trace-status to output user name without trailing colon.
4273 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4274
4275 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4276
4277 Fix trace-status to output proper start-time and stop-time.
4278 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4279 output start time and stop time in hex as gdb expects.
4280
4281 2013-06-26 Pedro Alves <pedro@codesourcery.com>
4282
4283 * tracepoint.c (build_traceframe_info_xml): Output trace state
4284 variables present in the trace buffer.
4285
4286 2013-06-24 Tom Tromey <tromey@redhat.com>
4287
4288 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4289 create-version.sh.
4290 (version.o): Remove.
4291 * gdbreplay.c: Include version.h.
4292 (version, host_name): Don't declare.
4293 * server.h: Include version.h.
4294 (version, host_name): Don't declare.
4295
4296 2013-06-12 Pedro Alves <palves@redhat.com>
4297
4298 * linux-x86-low.c (linux_is_elf64): Delete global.
4299 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4300 with local linux_pid_exe_is_elf_64_file use.
4301
4302 2013-06-11 Pedro Alves <palves@redhat.com>
4303
4304 * linux-low.c (regset_disabled, disable_regset): New functions.
4305 (regsets_fetch_inferior_registers)
4306 (regsets_store_inferior_registers): Use them.
4307 (initialize_regsets_info); Don't allocate the disabled_regsets
4308 array here.
4309 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4310 comment.
4311
4312 2013-06-11 Pedro Alves <palves@redhat.com>
4313
4314 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4315 xmalloc.
4316
4317 2013-06-11 Pedro Alves <palves@redhat.com>
4318
4319 * linux-x86-low.c (initialize_low_arch): Call
4320 init_registers_x32_avx_linux.
4321
4322 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4323
4324 Fix compatibility with Android Bionic.
4325 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4326 it is not empty.
4327
4328 2013-06-07 Pedro Alves <palves@redhat.com>
4329
4330 PR server/14823
4331 * Makefile.in (OBS): Add tdesc.o.
4332 (IPA_OBJS): Add tdesc-ipa.o.
4333 (tdesc-ipa.o): New rule.
4334 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4335 interface.
4336 * linux-low.c (new_inferior): Delete.
4337 (disabled_regsets, num_regsets): Delete.
4338 (linux_add_process): Adjust to set the new per-process
4339 new_inferior flag.
4340 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4341 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4342 was a stop. When calling arch_setup, switch the current inferior
4343 to the thread that got an event.
4344 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4345 (regsets_fetch_inferior_registers)
4346 (regsets_store_inferior_registers): New regsets_info parameter.
4347 Adjust to use it.
4348 (linux_register_in_regsets): New regs_info parameter. Adjust to
4349 use it.
4350 (register_addr, fetch_register, store_register): New usrregs_info
4351 parameter. Adjust to use it.
4352 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4353 parameter regs_info. Adjust to use it.
4354 (linux_fetch_registers): Get the current inferior's regs_info, and
4355 adjust to use it.
4356 (linux_store_registers): Ditto.
4357 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4358 (initialize_low): Don't initialize the target_regsets here. Call
4359 initialize_low_arch.
4360 * linux-low.h (target_regsets): Delete declaration.
4361 (struct regsets_info): New.
4362 (struct usrregs_info): New.
4363 (struct regs_info): New.
4364 (struct process_info_private) <new_inferior>: New field.
4365 (struct linux_target_ops): Delete the num_regs, regmap, and
4366 regset_bitmap fields. New field regs_info.
4367 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4368 * i387-fp.c (num_xmm_registers): Delete.
4369 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4370 calls to new interface.
4371 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4372 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4373 Infer the number of xmm registers from the regcache's target
4374 description.
4375 * i387-fp.h (num_xmm_registers): Delete.
4376 * inferiors.c (add_thread): Don't install the thread's regcache
4377 here.
4378 * proc-service.c (gregset_info): Fetch the current inferior's
4379 regs_info. Adjust to use it.
4380 * regcache.c: Include tdesc.h.
4381 (register_bytes, reg_defs, num_registers)
4382 (gdbserver_expedite_regs): Delete.
4383 (get_thread_regcache): If the thread doesn't have a regcache yet,
4384 create one, instead of aborting gdbserver.
4385 (regcache_invalidate_one): Rename to ...
4386 (regcache_invalidate_thread): ... this.
4387 (regcache_invalidate_one): New.
4388 (regcache_invalidate): Only invalidate registers of the current
4389 process.
4390 (init_register_cache): Add target_desc parameter, and use it.
4391 (new_register_cache): Ditto. Assert the target description has a
4392 non zero registers_size.
4393 (regcache_cpy): Add assertions. Adjust.
4394 (realloc_register_cache, set_register_cache): Delete.
4395 (registers_to_string, registers_from_string): Adjust.
4396 (find_register_by_name, find_regno, find_register_by_number)
4397 (register_cache_size): Add target_desc parameter, and use it.
4398 (free_register_cache_thread, free_register_cache_thread_one)
4399 (regcache_release, register_cache_size): New.
4400 (register_size): Add target_desc parameter, and use it.
4401 (register_data, supply_register, supply_register_zeroed)
4402 (supply_regblock, supply_register_by_name, collect_register)
4403 (collect_register_as_string, collect_register_by_name): Adjust.
4404 * regcache.h (struct target_desc): Forward declare.
4405 (struct regcache) <tdesc>: New field.
4406 (init_register_cache, new_register_cache): Add target_desc
4407 parameter.
4408 (regcache_invalidate_thread): Declare.
4409 (regcache_invalidate_one): Delete declaration.
4410 (regcache_release): Declare.
4411 (find_register_by_number, register_cache_size, register_size)
4412 (find_regno): Add target_desc parameter.
4413 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4414 declarations.
4415 * remote-utils.c: Include tdesc.h.
4416 (outreg, prepare_resume_reply): Adjust.
4417 * server.c: Include tdesc.h.
4418 (gdbserver_xmltarget): Delete declaration.
4419 (get_features_xml, process_serial_event): Adjust.
4420 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4421 declare.
4422 (struct process_info) <tdesc>: New field.
4423 (ipa_tdesc): Declare.
4424 * tdesc.c: New file.
4425 * tdesc.h: New file.
4426 * tracepoint.c: Include tdesc.h.
4427 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4428 (get_context_regcache): Adjust to pass ipa_tdesc down.
4429 (do_action_at_tracepoint): Adjust to get the register cache size
4430 from the context regcache's description.
4431 (traceframe_walk_blocks): Adjust to get the register cache size
4432 from the current trace frame's description.
4433 (traceframe_get_pc): Adjust to get current trace frame's
4434 description and pass it down.
4435 (gdb_collect): Adjust to get the register cache size from the
4436 IPA's description.
4437 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4438 (gdbserver_xmltarget): Delete.
4439 (initialize_low_tracepoint): Set the ipa's target description.
4440 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4441 (initialize_low_tracepoint): Set the ipa's target description.
4442 * linux-x86-low.c: Include tdesc.h.
4443 [__x86_64__] (is_64bit_tdesc): New.
4444 (ps_get_thread_area, x86_get_thread_area): Use it.
4445 (i386_cannot_store_register): Rename to ...
4446 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4447 (i386_cannot_fetch_register): Rename to ...
4448 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4449 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4450 to new interface.
4451 (target_regsets): Rename to ...
4452 (x86_regsets): ... this.
4453 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4454 interface.
4455 (x86_siginfo_fixup): Use is_64bit_tdesc.
4456 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4457 (tdesc_x32_avx_linux, tdesc_x32_linux)
4458 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4459 Declare.
4460 (x86_linux_update_xmltarget): Delete.
4461 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4462 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4463 (AMD64_LINUX_USER64_CS): New.
4464 (x86_linux_read_description): New, based on
4465 x86_linux_update_xmltarget.
4466 (same_process_callback): New.
4467 (x86_arch_setup_process_callback): New.
4468 (x86_linux_update_xmltarget): New.
4469 (x86_regsets_info): New.
4470 (amd64_linux_regs_info): New.
4471 (i386_linux_usrregs_info): New.
4472 (i386_linux_regs_info): New.
4473 (x86_linux_regs_info): New.
4474 (x86_arch_setup): Reimplement.
4475 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4476 (x86_emit_ops): Ditto.
4477 (the_low_target): Adjust. Install x86_linux_regs_info,
4478 x86_cannot_fetch_register, and x86_cannot_store_register.
4479 (initialize_low_arch): New.
4480 * linux-ia64-low.c (tdesc_ia64): Declare.
4481 (ia64_fetch_register): Adjust.
4482 (ia64_usrregs_info, regs_info): New globals.
4483 (ia64_regs_info): New function.
4484 (the_low_target): Adjust.
4485 (initialize_low_arch): New function.
4486 * linux-sparc-low.c (tdesc_sparc64): Declare.
4487 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4488 Adjust.
4489 (sparc_arch_setup): New function.
4490 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4491 (the_low_target): Adjust.
4492 (initialize_low_arch): New function.
4493 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4494 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4495 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4496 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4497 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4498 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4499 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4500 (tdesc_powerpc_isa205_vsx64l): Declare.
4501 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4502 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4503 (ppc_set_pc, ppc_get_hwcap): Adjust.
4504 (ppc_usrregs_info): Forward declare.
4505 (!__powerpc64__) ppc_regmap_adjusted: New global.
4506 (ppc_arch_setup): Adjust to the current process'es target
4507 description.
4508 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4509 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4510 (ppc_store_evrregset): Adjust.
4511 (target_regsets): Rename to ...
4512 (ppc_regsets): ... this, and make static.
4513 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4514 (ppc_regs_info): New function.
4515 (the_low_target): Adjust.
4516 (initialize_low_arch): New function.
4517 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4518 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4519 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4520 (tdesc_s390x_linux64v2): Declare.
4521 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4522 (s390_fill_gregset, s390_store_last_break): Adjust.
4523 (target_regsets): Rename to ...
4524 (s390_regsets): ... this, and make static.
4525 (s390_get_pc, s390_set_pc): Adjust.
4526 (s390_get_hwcap): New target_desc parameter, and use it.
4527 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4528 (s390_arch_setup): Adjust to set the current process'es target
4529 description. Don't adjust the regmap.
4530 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4531 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4532 (regs_info_3264): New globals.
4533 (s390_regs_info): New function.
4534 (the_low_target): Adjust.
4535 (initialize_low_arch): New function.
4536 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4537 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4538 [__mips64] (init_registers_mips_linux)
4539 (init_registers_mips_dsp_linux): Delete defines.
4540 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4541 (have_dsp): New global.
4542 (mips_read_description): New, based on mips_arch_setup.
4543 (mips_arch_setup): Reimplement.
4544 (get_usrregs_info): New function.
4545 (mips_cannot_fetch_register, mips_cannot_store_register)
4546 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4547 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4548 (target_regsets): Rename to ...
4549 (mips_regsets): ... this, and make static.
4550 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4551 (dsp_regs_info, regs_info): New globals.
4552 (mips_regs_info): New function.
4553 (the_low_target): Adjust.
4554 (initialize_low_arch): New function.
4555 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4556 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4557 Declare.
4558 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4559 (arm_read_description): New, with bits factored from
4560 arm_arch_setup.
4561 (arm_arch_setup): Reimplement.
4562 (target_regsets): Rename to ...
4563 (arm_regsets): ... this, and make static.
4564 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4565 (arm_regs_info): New function.
4566 (the_low_target): Adjust.
4567 (initialize_low_arch): New function.
4568 * linux-m68k-low.c (tdesc_m68k): Declare.
4569 (target_regsets): Rename to ...
4570 (m68k_regsets): ... this, and make static.
4571 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4572 (m68k_regs_info): New function.
4573 (m68k_arch_setup): New function.
4574 (the_low_target): Adjust.
4575 (initialize_low_arch): New function.
4576 * linux-sh-low.c (tdesc_sharch): Declare.
4577 (target_regsets): Rename to ...
4578 (sh_regsets): ... this, and make static.
4579 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4580 (sh_regs_info, sh_arch_setup): New functions.
4581 (the_low_target): Adjust.
4582 (initialize_low_arch): New function.
4583 * linux-bfin-low.c (tdesc_bfin): Declare.
4584 (bfin_arch_setup): New function.
4585 (bfin_usrregs_info, regs_info): New globals.
4586 (bfin_regs_info): New function.
4587 (the_low_target): Adjust.
4588 (initialize_low_arch): New function.
4589 * linux-cris-low.c (tdesc_cris): Declare.
4590 (cris_arch_setup): New function.
4591 (cris_usrregs_info, regs_info): New globals.
4592 (cris_regs_info): New function.
4593 (the_low_target): Adjust.
4594 (initialize_low_arch): New function.
4595 * linux-cris-low.c (tdesc_crisv32): Declare.
4596 (cris_arch_setup): New function.
4597 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4598 (cris_regs_info): New function.
4599 (the_low_target): Adjust.
4600 (initialize_low_arch): New function.
4601 * linux-m32r-low.c (tdesc_m32r): Declare.
4602 (m32r_arch_setup): New function.
4603 (m32r_usrregs_info, regs_info): New globals.
4604 (m32r_regs_info): Adjust.
4605 (initialize_low_arch): New function.
4606 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4607 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4608 (tic6x_usrregs_info): Forward declare.
4609 (tic6x_read_description): New function, based on ...
4610 (tic6x_arch_setup): ... this. Reimplement.
4611 (target_regsets): Rename to ...
4612 (tic6x_regsets): ... this, and make static.
4613 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4614 (tic6x_regs_info): New function.
4615 (the_low_target): Adjust.
4616 (initialize_low_arch): New function.
4617 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4618 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4619 (target_regsets): Rename to ...
4620 (xtensa_regsets): ... this, and make static.
4621 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4622 globals.
4623 (xtensa_arch_setup, xtensa_regs_info): New functions.
4624 (the_low_target): Adjust.
4625 (initialize_low_arch): New function.
4626 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4627 (nios2_arch_setup): Set the current process'es tdesc.
4628 (target_regsets): Rename to ...
4629 (nios2_regsets): ... this.
4630 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4631 (nios2_regs_info): New function.
4632 (the_low_target): Adjust.
4633 (initialize_low_arch): New function.
4634 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4635 (aarch64_arch_setup): Set the current process'es tdesc.
4636 (target_regsets): Rename to ...
4637 (aarch64_regsets): ... this.
4638 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4639 (aarch64_regs_info): New function.
4640 (the_low_target): Adjust.
4641 (initialize_low_arch): New function.
4642 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4643 globals.
4644 (target_regsets): Rename to ...
4645 (tile_regsets): ... this.
4646 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4647 (tile_regs_info): New function.
4648 (tile_arch_setup): Set the current process'es tdesc.
4649 (the_low_target): Adjust.
4650 (initialize_low_arch): New function.
4651 * spu-low.c (tdesc_spu): Declare.
4652 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4653 * win32-arm-low.c (tdesc_arm): Declare.
4654 (arm_arch_setup): New function.
4655 (the_low_target): Install arm_arch_setup instead of
4656 init_registers_arm.
4657 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4658 (init_windows_x86): Rename to ...
4659 (i386_arch_setup): ... this. Set `win32_tdesc'.
4660 (the_low_target): Adjust.
4661 * win32-low.c (win32_tdesc): New global.
4662 (child_add_thread): Don't create the thread cache here.
4663 (do_initial_child_stuff): Set the new process'es tdesc.
4664 * win32-low.h (struct target_desc): Forward declare.
4665 (win32_tdesc): Declare.
4666 * lynx-i386-low.c (tdesc_i386): Declare global.
4667 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4668 * lynx-low.c (lynx_tdesc): New global.
4669 (lynx_add_process): Set the new process'es tdesc.
4670 * lynx-low.h (struct target_desc): Forward declare.
4671 (lynx_tdesc): Declare global.
4672 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4673 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4674 * nto-low.c (nto_tdesc): New global.
4675 (do_attach): Set the new process'es tdesc.
4676 * nto-low.h (struct target_desc): Forward declare.
4677 (nto_tdesc): Declare.
4678 * nto-x86-low.c (tdesc_i386): Declare.
4679 (nto_x86_arch_setup): Set `nto_tdesc'.
4680
4681 2013-06-04 Gary Benson <gbenson@redhat.com>
4682
4683 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4684 to qSupported response when appropriate.
4685 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4686 with nonzero-length annex.
4687 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4688 arguments supplied in annex.
4689
4690 2013-05-31 Doug Evans <dje@google.com>
4691
4692 PR server/15594
4693 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4694 64 bits in 64-cross-32 environment.
4695
4696 2013-05-28 Pedro Alves <palves@redhat.com>
4697
4698 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4699 (aarch64-without-fpu.c): Delete rule.
4700 * configure.srv (aarch64*-*-linux*): Remove references to
4701 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4702 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4703 declaration.
4704
4705 2013-05-24 Pedro Alves <palves@redhat.com>
4706
4707 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4708 instead of strchr/decode_address. Error if the range isn't split
4709 with a ','. Don't assume there's be a ':' in the action.
4710
4711 2013-05-23 Yao Qi <yao@codesourcery.com>
4712 Pedro Alves <palves@redhat.com>
4713
4714 * linux-low.c (lwp_in_step_range): New function.
4715 (linux_wait_1): If the thread was range stepping and stopped
4716 outside the stepping range, report the stop to GDB. Otherwise,
4717 continue stepping. Add range stepping debug output.
4718 (linux_set_resume_request): Copy the step range from the resume
4719 request to the lwp.
4720 (linux_supports_range_stepping): New.
4721 (linux_target_ops) <supports_range_stepping>: Set to
4722 linux_supports_range_stepping.
4723 * linux-low.h (struct linux_target_ops)
4724 <supports_range_stepping>: New field.
4725 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4726 * linux-x86-low.c (x86_supports_range_stepping): New.
4727 (the_low_target) <supports_range_stepping>: Set to
4728 x86_supports_range_stepping.
4729 * server.c (handle_v_cont): Handle 'r' action.
4730 (handle_v_requests): Append ";r" if the target supports range
4731 stepping.
4732 * target.h (struct thread_resume) <step_range_start,
4733 step_range_end>: New fields.
4734 (struct target_ops) <supports_range_stepping>:
4735 New field.
4736 (target_supports_range_stepping): New macro.
4737
4738 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4739
4740 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4741 confusion in comment.
4742
4743 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4744
4745 * lynx-low.c (struct process_info_private): New type.
4746 (lynx_add_process): New function.
4747 (lynx_create_inferior, lynx_attach): Replace calls to
4748 add_process by calls to lynx_add_process.
4749 (lynx_resume): If PTID is null, then try using
4750 current_process()->private->last_wait_event_ptid.
4751 Add comments.
4752 (lynx_clear_inferiors): Delete. The contents of that function
4753 has been inlined in lynx_mourn;
4754 (lynx_wait_1): Save the ptid in the process's private data.
4755 (lynx_mourn): Free the process' private data. Replace call
4756 to lynx_clear_inferiors by call to clear_inferiors.
4757
4758 2013-05-17 Yao Qi <yao@codesourcery.com>
4759
4760 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4761 the right place.
4762
4763 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
4764
4765 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4766 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4767 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4768 PT_TEXT_END_ADDR guards. Update comments.
4769 (linux_target_op) <read_offsets>: Conditionally define to
4770 linux_read_offsets if the target is UCLIBC and if it defines
4771 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4772
4773 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4774 Andrew Jenner <andrew@codesourcery.com>
4775
4776 * Makefile.in (SFILES): Add linux-nios2-low.c.
4777 (clean): Add action to delete nios2-linux.c.
4778 (nios2-linux.c): New rule.
4779 * configure.srv: Add nios2*-*-linux*.
4780 * linux-nios2-low.c: New.
4781
4782 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4783
4784 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4785
4786 2013-04-25 Hui Zhu <hui@codesourcery.com>
4787
4788 PR gdb/15186
4789 * ax.c (ax_printf): Add fflush.
4790
4791 2013-04-22 Tom Tromey <tromey@redhat.com>
4792
4793 * Makefile.in (SFILES): Add filestuff.c.
4794 (OBS): Add filestuff.o.
4795 (filestuff.o): New target.
4796 * config.in, configure: Rebuild.
4797 * configure.ac: Check for fdwalk, pipe2.
4798
4799 2013-04-17 Pedro Alves <palves@redhat.com>
4800
4801 * configure.ac (USE_THREAD_DB): Delete variable.
4802 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4803 Don't AC_SUBST USE_THREAD_DB.
4804 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4805 * config.in, configure: Regenerate.
4806
4807 2013-04-16 Pedro Alves <palves@redhat.com>
4808
4809 * linux-low.h (struct lwp_info) <thread_known>: Move under
4810 the USE_THREAD_DB #ifdef.
4811
4812 2013-04-16 Pedro Alves <palves@redhat.com>
4813
4814 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4815 (linux-low.o): Delete rule.
4816 * linux-low.h: Always include "gdb_thread_db.h" instead of
4817 conditionally including thread_db.h.
4818 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4819 HAVE_THREAD_DB_H.
4820
4821 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4822
4823 * Makefile.in (install-only): Fix make install regression.
4824
4825 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4826
4827 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4828 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4829 installation.
4830 * gdbserver.1: Remove.
4831
4832 2013-03-22 Pedro Alves <palves@redhat.com>
4833
4834 * linux-low.c (handle_extended_wait): Don't call
4835 linux_enable_event_reporting.
4836
4837 2013-03-15 Tony Theodore <tonyt@logyst.com>
4838
4839 PR build/9098:
4840 * Makefile.in (SHELL): Use @SHELL@.
4841
4842 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4843
4844 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4845 compiler warning.
4846
4847 2013-03-13 Joel Brobecker <brobecker@adacore.com>
4848
4849 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4850 Remove extraneous NULL element.
4851
4852 2013-03-13 Yao Qi <yao@codesourcery.com>
4853
4854 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4855 'V' block in trace frame.
4856
4857 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4858
4859 * target.h (struct target_ops): Add btrace ops.
4860 (target_supports_btrace): New macro.
4861 (target_enable_btrace): New macro.
4862 (target_disable_btrace): New macro.
4863 (target_read_btrace): New macro.
4864 * gdbthread.h (struct thread_info): Add btrace field.
4865 * server.c: Include btrace-common.h.
4866 (handle_btrace_general_set): New function.
4867 (handle_btrace_enable): New function.
4868 (handle_btrace_disable): New function.
4869 (handle_general_set): Call handle_btrace_general_set.
4870 (handle_qxfer_btrace): New function.
4871 (struct qxfer qxfer_packets[]): Add btrace entry.
4872 * inferiors.c (remove_thread): Disable btrace.
4873 * linux-low: Include linux-btrace.h.
4874 (linux_low_enable_btrace): New function.
4875 (linux_low_read_btrace): New function.
4876 (linux_target_ops): Add btrace ops.
4877 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4878 Add srv_linux_btrace=yes.
4879 (x86_64-*-linux*): Add linux-btrace.o.
4880 Add srv_linux_btrace=yes.
4881 * configure.ac: Define HAVE_LINUX_BTRACE.
4882 * config.in: Regenerated.
4883 * configure: Regenerated.
4884
4885 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4886
4887 * server.c (handle_qxfer): Preserve error message if -3 is
4888 returned.
4889 (qxfer): Document the -3 return value.
4890
4891 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4892
4893 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4894 (linux_btrace_h): New variable.
4895 (linux-btrace.o): New rule.
4896
4897 2013-03-08 Stan Shebs <stan@codesourcery.com>
4898 Hafiz Abid Qadeer <abidh@codesourcery.com>
4899
4900 * tracepoint.c (trace_buffer_size): New global.
4901 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4902 (init_trace_buffer): Change to one-argument function. Allocate
4903 trace buffer memory.
4904 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4905 handle QTBuffer:size packet.
4906 (cmd_bigqtbuffer_size): New function.
4907 (initialize_tracepoint): Call init_trace_buffer with
4908 DEFAULT_TRACE_BUFFER_SIZE.
4909 * server.c (handle_query): Add QTBuffer:size in the
4910 supported packets.
4911
4912 2013-03-07 Yao Qi <yao@codesourcery.com>
4913
4914 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4915 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4916 of -1.
4917 (cmd_qtsp): Adjust condition. Do post increment.
4918 Set cur_action and cur_step_action back to 0.
4919
4920 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
4921
4922 PR server/15236
4923 * linux-low.c (linux_write_memory): Return early success if LEN is
4924 zero.
4925
4926 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
4927
4928 * configure.srv: Add x86_64-*-cygwin* as target.
4929
4930 2013-02-28 Tom Tromey <tromey@redhat.com>
4931
4932 * configure.ac: Invoke AC_SYS_LARGEFILE.
4933 * configure, config.in: Rebuild.
4934
4935 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
4936
4937 * win32-low.c: Throughout, fix format strings and casts of
4938 printf-like functions to avoid type related warnings on all
4939 platforms.
4940 (get_child_debug_event): Print dwDebugEventCode as hex since
4941 that's how it's usually documented.
4942
4943 2013-02-28 Yao Qi <yao@codesourcery.com>
4944
4945 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
4946 pulongest.
4947
4948 2013-02-27 Jiong Wang <jiwang@tilera.com>
4949
4950 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
4951 (reg-tilegx32.c): New rule.
4952 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
4953 * linux-tile-low.c (tile_arch_setup): New function. Invoke
4954 different register info initializer according to elf class.
4955 (init_registers_tilgx32): New function. The tilegx32 register info
4956 initializer.
4957 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
4958 (tile_store_gregset): Likewise.
4959
4960 2013-02-27 Yao Qi <yao@codesourcery.com>
4961
4962 * server.c (process_point_options): Print debug message when
4963 debug_threads is true.
4964
4965 2013-02-26 Yao Qi <yao@codesourcery.com>
4966
4967 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
4968
4969 2013-02-19 Pedro Alves <palves@redhat.com>
4970 Kai Tietz <ktietz@redhat.com>
4971
4972 PR gdb/15161
4973
4974 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
4975 instead of strtoul to extract address from packet.
4976 (process_serial_event) <'z'>: Likewise.
4977
4978 2013-02-18 Yao Qi <yao@codesourcery.com>
4979
4980 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
4981
4982 2013-02-14 Pedro Alves <palves@redhat.com>
4983
4984 Plug memory leak.
4985
4986 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
4987 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
4988
4989 2013-02-14 Pedro Alves <palves@redhat.com>
4990
4991 * tracepoint.c (cmd_qtdpsrc): Use savestring.
4992
4993 2013-02-14 Pedro Alves <palves@redhat.com>
4994
4995 * tracepoint.c (save_string): Delete.
4996 (add_tracepoint_action): Use savestring instead of save_string.
4997
4998 2013-02-12 Pedro Alves <palves@redhat.com>
4999
5000 * linux-xtensa-low.c: Ditto.
5001 * xtensa-xtregs.c: Ditto.
5002
5003 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5004
5005 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5006 thread_db.
5007
5008 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5009
5010 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5011 aarch64_num_wp_regs and aarch64_num_bp_regs to
5012 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5013
5014 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5015
5016 * linux-aarch64-low.c (ps_get_thread_area): Replace
5017 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5018
5019 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5020 Marcus Shawcroft <marcus.shawcroft@arm.com>
5021 Nigel Stephens <nigel.stephens@arm.com>
5022 Yufeng Zhang <yufeng.zhang@arm.com>
5023
5024 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5025 (aarch64.c, aarch64-without-fpu.c): New targets.
5026 * configure.srv (aarch64*-*-linux*): New.
5027 * linux-aarch64-low.c: New file.
5028
5029 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5030
5031 * linux-low.c (handle_extended_wait, linux_create_inferior)
5032 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5033 (dequeue_one_deferred_signal, linux_resume_one_thread)
5034 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5035 (linux_tracefork_grandchild, linux_test_for_tracefork)
5036 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5037 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5038 where the argument is 0.
5039
5040 2013-01-25 Yao Qi <yao@codesourcery.com>
5041
5042 * event-loop.c: Include "queue.h".
5043 (gdb_event_p): New typedef.
5044 (struct gdb_event) <next_event>: Remove.
5045 (event_queue): Change to QUEUE(gdb_event_p).
5046 (async_queue_event): Remove.
5047 (gdb_event_xfree): New.
5048 (initialize_event_loop): New.
5049 (process_event): Use API from QUEUE.
5050 (wait_for_event): Likewise.
5051 * server.c (main): Call initialize_event_loop.
5052 * server.h (initialize_event_loop): Declare.
5053
5054 2013-01-18 Yao Qi <yao@codesourcery.com>
5055
5056 * ax.h (struct eval_agent_expr_context): New.
5057 (gdb_eval_agent_expr): Update declaration.
5058 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5059 TFRAME. Add new argument CTX.
5060 * server.h (struct eval_agent_expr_context): Declare.
5061 (agent_mem_read, agent_tsv_read): Update declaration.
5062 (agent_mem_read_string): Likewise.
5063 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5064 (add_traceframe_block): Add new argument TPOINT.
5065 Increase TPOINT->traceframe_usage.
5066 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5067 eval_tracepoint_agent_expr.
5068 (condition_true_at_tracepoint): Likewise.
5069 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5070 (agent_mem_read_string, agent_tsv_read): Likewise.
5071
5072 2013-01-16 Yao Qi <yao@codesourcery.com>
5073
5074 * linux-low.c (linux_resume_one_lwp): Don't check
5075 'lwp->bp_reinsert != 0'.
5076
5077 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5078 Pedro Alves <palves@redhat.com>
5079
5080 * lynx-low.c (ptrace_request_to_str): Define a temporary
5081 macro and use it to simplify this function's implementation.
5082
5083 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5084
5085 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5086 sets errno.
5087
5088 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5089
5090 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5091
5092 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5093
5094 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5095
5096 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5097
5098 * lynx-low.c (lynx_resume): Use the resume_info parameter
5099 to determine the ptid for the lynx_ptrace call, unless
5100 it is equal to minus_one_ptid, in which case we use the
5101 ptid of the current_inferior.
5102 (lynx_wait_1): After having received a thread create/exit
5103 event, resume the inferior's execution using the signaling
5104 thread's ptid, rather than the old ptid.
5105
5106 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5107
5108 * lynx-low.c (lynx_resume): Delete variable ret.
5109
5110 2013-01-01 Joel Brobecker <brobecker@adacore.com>
5111
5112 * gdbreplay.c (gdbreplay_version): Update copyright year.
5113 * server.c (gdbserver_version): Likewise.
5114
5115 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5116
5117 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5118 new thread.
5119
5120 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5121
5122 * lynx-low.c (ptrace_request_to_str): Add handling for
5123 PTRACE_GETTRACESIG.
5124
5125 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5126
5127 * lynx-low.c (lynx_attach): Delete variable new_process.
5128
5129 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5130
5131 * lynx-low.c (lynx_create_inferior): Delete variable
5132 new_process.
5133
5134 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5135
5136 * lynx-low.c (ptrace_request_to_str): Do not handle
5137 PTRACE_GETTHREADLIST if this macro does not exist.
5138
5139 2012-12-15 Yao Qi <yao@codesourcery.com>
5140
5141 * Makefile.in (OBS): Add notif.o.
5142 * notif.c, notif.h: New.
5143 * server.c: Include "notif.h".
5144 (struct vstop_notif) <next>: Remove.
5145 <base>: New field.
5146 (queue_stop_reply): Update.
5147 (push_event, send_next_stop_reply): Remove.
5148 (discard_queued_stop_replies): Update.
5149 (notif_stop): New variable.
5150 (handle_v_stopped): Remove.
5151 (handle_v_requests): Don't call handle_v_stopped. Call
5152 handle_ack_notif instead.
5153 (queue_stop_reply_callback): Call notif_event_enque instead
5154 of queue_stop_reply.
5155 (handle_status): Don't call send_next_stop_reply, call
5156 notif_write_event instead.
5157 (kill_inferior_callback): Likewise.
5158 (detach_or_kill_inferior_callback): Likewise.
5159 (main): Call initialize_notif.
5160 (process_serial_event): Call QUEUE_is_empty.
5161 (handle_target_event): Call notif_push instead of push event.
5162 * server.h (push_event): Remove declaration.
5163
5164 2012-12-10 Tom Tromey <tromey@redhat.com>
5165
5166 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5167 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5168 macros.
5169 (.c.o): Rewrite.
5170 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5171 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5172 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5173 (amd64-linux-ipa.o, ax.o): Rewrite.
5174 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5175 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5176 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5177 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5178 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5179 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5180 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5181 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5182 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5183 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5184 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5185 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5186 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5187 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5188 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5189 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5190 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5191 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5192 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5193 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5194 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5195 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5196 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5197 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5198 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5199 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5200 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5201 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5202 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5203 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5204 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5205 (reg-tilegx.o): Remove.
5206 (all_object_files): New macro.
5207 Include .deps files.
5208 * aclocal.m4, configure: Rebuild.
5209 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5210 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5211 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5212
5213 2012-12-05 Tom Tromey <tromey@redhat.com>
5214
5215 PR gdb/14917:
5216 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5217
5218 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
5219
5220 * configure.ac: Check for linux/perf_event.h.
5221 * config.in: Regenerated.
5222 * configure: Regenerated.
5223
5224 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5225
5226 * hostio.c (handle_readlink): Decrease buffer size
5227 parameter passed to readlink by one byte.
5228
5229 2012-11-26 Yao Qi <yao@codesourcery.com>
5230
5231 * configure.ac (build_warnings): Append '-Wempty-body'.
5232 * configure: Regenerated.
5233 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5234 body.
5235
5236 2012-11-15 Pierre Muller <muller@sourceware.org>
5237
5238 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5239 * config.in: Regenerate.
5240 * configure: Regenerate.
5241 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5242 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5243 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5244 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5245 header.
5246 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5247 instead of <sys/wait.h> header.
5248 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5249
5250 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
5251
5252 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5253 (various make rules): Remove -DGDBSERVER
5254
5255 2012-11-09 Yao Qi <yao@codesourcery.com>
5256
5257 * spu-low.c (current_ptid): Move it to ..
5258 * gdbthread.h: ... here. New.
5259 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5260 * server.c (myresume, process_serial_event): Likewise.
5261 * thread-db.c (thread_db_find_new_threads): Likewise.
5262 * tracepoint.c (run_inferior_command): Likewise.
5263
5264 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
5265
5266 * server.c (handle_search_memory_1): Include access length in
5267 warning message.
5268
5269 2012-09-05 Michael Brandt <michael.brandt@axis.com>
5270
5271 * linux-crisv32-low.c: Fix compile errors.
5272
5273 2012-09-04 Yao Qi <yao@codesourcery.com>
5274
5275 * tracepoint.c (cmd_qtsv): Adjust debug message.
5276 Don't check CUR_TPOINT.
5277
5278 2012-08-28 Yao Qi <yao@codesourcery.com>
5279
5280 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5281 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5282 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5283 Remove declarations of xmalloc, xreallloc, xstrdup and
5284 freeargv.
5285 * Makefile.in (libiberty_h): New.
5286 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5287 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5288
5289 2012-08-23 Yao Qi <yao@codesourcery.com>
5290
5291 * server.h: Remove declaration of 'xsnprintf'.
5292
5293 2012-08-22 Keith Seitz <keiths@redhat.com>
5294
5295 * server.h: Include build-gnulib-gbserver/config.h.
5296 * gdbreplay.c: Likewise.
5297
5298 2012-08-08 Doug Evans <dje@google.com>
5299
5300 * Makefile.in (SFILES): Add gdb_vecs.c.
5301 (OBS): Add gdb_vecs.o.
5302 (gdb_vecs_h, host_defs_h): New variables.
5303 (thread-db.o): Add $(gdb_vecs_h) dependency.
5304 (gdb_vecs.o): New rule.
5305 * thread-db.c: #include "gdb_vecs.h".
5306 (thread_db_load_search): Use a vector to iterate over path elements.
5307 Handle text appearing after "$pdir".
5308
5309 * configure.ac: Add check for strstr.
5310 * config.in: Regenerate.
5311 * configure: Regenerate.
5312
5313 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5314
5315 * hostio.c (handle_pread): If pread fails, fall back to attempting
5316 lseek/read.
5317 (handle_pwrite): Likewise for pwrite.
5318
5319 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5320
5321 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5322 between unsupported TYPE and unimplementable ADDR/LEN combination.
5323 (arm_insert_point): Act on new return value.
5324
5325 2012-07-31 Pedro Alves <palves@redhat.com>
5326
5327 * server.c (process_point_options): Only skip tokens if we find
5328 one that is unrecognized. Don't treat 'X' specially while
5329 skipping unrecognized tokens.
5330
5331 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5332
5333 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5334 to 4-byte-align HW breakpoint addresses for Thumb.
5335
5336 2012-07-27 Yao Qi <yao@codesourcery.com>
5337
5338 PR remote/14161.
5339
5340 * server.h: Declare gdb_agent_about_to_close.
5341 * target.c (kill_inferior): Include "agent.h".
5342 New. Send command 'kill'.
5343 * target.h (kill_inferior): Removed macro.
5344 * tracepoint.c (gdb_agent_about_to_close): New.
5345 (gdb_agent_helper_thread): Handle command 'close'.
5346 Wait endlessly until the inferior stops.
5347 Install gdb_agent_remove_socket to atexit hook.
5348 (agent_socket_name): New static variable.
5349 (gdb_agent_socket_init): Replace local variable 'name' with
5350 'agent_socket_name'.
5351 (gdb_agent_remove_socket): New.
5352
5353 2012-07-27 Yao Qi <yao@codesourcery.com>
5354
5355 * server.c (process_point_options): Stop at 'X' when parsing.
5356
5357 2012-07-19 Michael Eager <eager@eagercon.com>
5358
5359 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
5360 to hw_execute.
5361 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5362 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5363 hardware breakpoint.
5364
5365 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5366
5367 * gdbserver/linux-low.c (initialize_low): Call
5368 linux_ptrace_init_warnings.
5369
5370 2012-07-02 Doug Evans <dje@google.com>
5371
5372 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5373 pointer to int.
5374
5375 2012-07-02 Stan Shebs <stan@codesourcery.com>
5376
5377 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5378 (ax.o): Add it to build rule.
5379 (ax-ipa.o): Ditto.
5380 (OBS): Add format.o.
5381 (IPA_OBS): Add format.o.
5382 * server.c (handle_query): Claim support for breakpoint commands.
5383 (process_point_options): Add command case.
5384 (process_serial_event): Leave running if there are printfs in
5385 effect.
5386 * mem-break.h (any_persistent_commands): Declare.
5387 (add_breakpoint_commands): Declare.
5388 (gdb_no_commands_at_breakpoint): Declare.
5389 (run_breakpoint_commands): Declare.
5390 * mem-break.c (struct point_command_list): New struct.
5391 (struct breakpoint): New field command_list.
5392 (any_persistent_commands): New function.
5393 (add_commands_to_breakpoint): New function.
5394 (add_breakpoint_commands): New function.
5395 (gdb_no_commands_at_breakpoint): New function.
5396 (run_breakpoint_commands): New function.
5397 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5398 locally.
5399 * ax.c: Include format.h.
5400 (ax_printf): New function.
5401 (gdb_eval_agent_expr): Add printf opcode.
5402
5403 2012-06-13 Yao Qi <yao@codesourcery.com>
5404
5405 * server.c (start_inferior): Remove duplicated writes to fields
5406 'last_resume_kind' and 'last_status' of 'current_inferior'.
5407
5408 2012-06-12 Yao Qi <yao@codesourcery.com>
5409 Pedro Alves <palves@redhat.com>
5410
5411 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5412 comment.
5413 * server.c (handle_v_cont): Extend comment.
5414
5415 2012-06-11 Yao Qi <yao@codesourcery.com>
5416
5417 * linux-low.c (linux_attach): Add 'static'.
5418
5419 2012-06-06 Yao Qi <yao@codesourcery.com>
5420
5421 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5422
5423 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5424
5425 Fix gcc -flto compilation warning.
5426 * server.c (main): Make variable multi_mode and attach volatile.
5427
5428 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5429
5430 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5431 if the platform doesn't know about it.
5432
5433 2012-05-30 Jeff Kenton <jkenton@tilera.com>
5434
5435 * Makefile.in (SFILES): Add linux-tile-low.c.
5436 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5437 * configure.srv: Handle tilegx-*-linux*.
5438 * linux-tile-low.c: New file.
5439
5440 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5441
5442 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5443
5444 2012-05-24 Pedro Alves <palves@redhat.com>
5445
5446 PR gdb/7205
5447
5448 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
5449
5450 2012-05-24 Pedro Alves <palves@redhat.com>
5451
5452 PR gdb/7205
5453
5454 Replace target_signal with gdb_signal throughout.
5455
5456 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5457
5458 * linux-low.c (linux_store_registers): Avoid the copying sequence
5459 when no data has been retrieved by ptrace.
5460
5461 2012-05-22 Will Deacon <will.deacon@arm.com>
5462
5463 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5464 Include asm/ptrace.h.
5465 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5466 already defined.
5467
5468 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5469
5470 * linux-low.c (linux_store_registers): Don't re-retrieve data
5471 with ptrace that has already been obtained from /proc. Always
5472 copy any data retrieved with ptrace to the buffer supplied.
5473
5474 2012-05-11 Yao Qi <yao@codesourcery.com>
5475 Pedro Alves <palves@redhat.com>
5476
5477 * linux-low.c (enum stopping_threads_kind): New.
5478 (stopping_threads): Change type to `enum stopping_threads_kind'.
5479 (handle_extended_wait): If stopping and suspending threads, leave
5480 the new_lwp suspended too.
5481 (linux_wait_for_event): Adjust.
5482 (stop_all_lwps): Set `stopping_threads' to
5483 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5484 whether we're suspending threads or just stopping them. Assert no
5485 recursion happens.
5486
5487 2012-04-29 Yao Qi <yao@codesourcery.com>
5488
5489 * server.h: Move some code to ...
5490 * gdbthread.h: ... here. New.
5491 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5492 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5493 (nto-low.o, win32-low.o): Likewise.
5494 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5495 * regcache.c, remote-utils.c, server.c: Likewise.
5496 * target.c, tracepoint.c, win32-low.c: Likewise.
5497
5498 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5499
5500 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5501 (PTRACE_ARG4_TYPE): Likewise.
5502 (PTRACE_XFER_TYPE): Likewise.
5503 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5504 ptrace to PTRACE_ARG3_TYPE.
5505 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5506 (PTRACE_ARG4_TYPE): Likewise.
5507 (PTRACE_XFER_TYPE): Likewise.
5508 (linux_detach_one_lwp): Cast fourth argument of
5509 ptrace to long then PTRACE_ARG4_TYPE.
5510 (regsets_fetch_inferior_registers): Cast third argument of
5511 ptrace to long then PTRACE_ARG3_TYPE.
5512 (regsets_store_inferior_registers): Likewise.
5513
5514 2012-04-20 Pedro Alves <palves@redhat.com>
5515
5516 * configure: Regenerate.
5517
5518 2012-04-19 Pedro Alves <palves@redhat.com>
5519
5520 * Makefile.in (GNULIB_BUILDDIR): New.
5521 (LIBGNU, INCGNU, GNULIB_H): Adjust.
5522 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5523 (all, install-only, uninstall, clean-info, all-lib, clean): No
5524 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5525 (maintainer-clean realclean distclean): Use subdir_do.
5526 (subdir_do): New.
5527 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
5528 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
5529 * acinclude.m4: Include acx_configure_dir.m4.
5530 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5531 calls. Call AC_PROG_RANLIB. Configure gnulib using
5532 ACX_CONFIGURE_DIR.
5533 (GNULIB): New.
5534 (GNULIB_STDINT_H): Adjust.
5535 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5536 * gdbreplay.c: Include build-gnulib/config.h.
5537 * server.h: Likewise.
5538 * aclocal.m4: Regenerate.
5539 * config.in: Regenerate.
5540 * configure: Regenerate.
5541
5542 2012-04-19 Pedro Alves <palves@redhat.com>
5543
5544 * Makefile.in (LIBGNU, INCGNU): Adjust.
5545 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5546 (all, install-only, uninstall, clean-info, all-lib, clean)
5547 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5548 * configure.ac: Adjust AC_OUTPUT output.
5549 * aclocal.m4: Regenerate.
5550 * configure: Regenerate.
5551
5552 2012-04-19 Pedro Alves <palves@redhat.com>
5553
5554 * Makefile.in (generated_files): New.
5555 (server_h): Remove the explicit dependency on config.h, and depend
5556 on $generated_files.
5557
5558 2012-04-19 Pedro Alves <palves@redhat.com>
5559
5560 * Makefile.in (INCGNU): Add -Ignulib.
5561
5562 2012-04-19 Pedro Alves <palves@redhat.com>
5563
5564 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5565 (INCGNU): ... this, and spell out -I here.
5566 (GNULIB_LIB): Rename to ...
5567 (LIBGNU): ... this.
5568 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5569
5570 2012-04-19 Pedro Alves <palves@redhat.com>
5571
5572 * config.in: Regenerate.
5573
5574 2012-04-19 Pedro Alves <palves@redhat.com>
5575
5576 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5577 * server.h (memmem): Remove declaration.
5578 * config.in: Regenerate.
5579 * configure: Regenerate.
5580
5581 2012-04-19 Yao Qi <yao@codesourcery.com>
5582
5583 * Makefile.in (SFILES): Add common/vec.c.
5584 (OBS): Add vec.o.
5585 (vec.o): New rule.
5586
5587 2012-04-19 Yao Qi <yao@codesourcery.com>
5588
5589 * remote-utils.c (prepare_resume_reply): Replace with macro
5590 target_core_of_thread.
5591 * server.c (handle_qxfer_threads_proper): Likewise.
5592 * target.h (traget_core_of_thread): New macro.
5593
5594 2012-04-18 Pedro Alves <palves@redhat.com>
5595
5596 * aclocal.m4: Regenerate.
5597 * configure: Regenerate.
5598
5599 2012-04-16 Yao Qi <yao@codesourcery.com>
5600
5601 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5602 duplicated on address.
5603
5604 2012-04-16 Yao Qi <yao@codesourcery.com>
5605
5606 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5607 (struct tracepoint_action_ops) <send>: New field.
5608 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5609 (agent_expr_send, x_tracepoint_action_send): New.
5610 (l_tracepoint_action_send): New.
5611 (cmd_qtdp): Download and install tracepoint
5612 according to `use_agent'.
5613 (run_inferior_command): Add one more parameter `len'.
5614 Update callers.
5615 (tracepoint_send_agent): New.
5616 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5617
5618 2012-04-16 Yao Qi <yao@codesourcery.com>
5619
5620 * tracepoint.c (download_tracepoints): Moved to ...
5621 (cmd_qtstart): ... here.
5622
5623 2012-04-14 Yao Qi <yao@codesourcery.com>
5624
5625 * tracepoint.c: Include inttypes.h.
5626 (struct collect_memory_action): Use sized types.
5627 (struct tracepoint): Likewise.
5628 (cmd_qtdp, stop_tracing): Update print specifiers.
5629 (cmd_qtp, response_tracepoint): Likewise.
5630 (collect_data_at_tracepoint): Likewise.
5631 (collect_data_at_step): Likewise.
5632
5633 2012-04-14 Yao Qi <yao@codesourcery.com>
5634
5635 Import gnulib module inttypes.
5636 * aclocal.m4, config.in, configure: Regenerated.
5637
5638 2012-04-14 Yao Qi <yao@codesourcery.com>
5639
5640 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5641 Makefile and config.status at last.
5642
5643 2012-04-13 Yao Qi <yao@codesourcery.com>
5644
5645 * tracepoint.c: Include stdint.h unconditionally.
5646
5647 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5648
5649 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5650 on BFD_HAVE_SYS_PROCFS_TYPE.
5651 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5652 * configure: Regenerate.
5653 * config.in: Likewise.
5654
5655 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5656
5657 * Makefile.in (clean): Also remove x32.c x32-linux.c
5658 x32-avx.c x32-avx-linux.c.
5659 (x32.o): New target.
5660 (x32.c): Likewise.
5661 (x32-linux.o): Likewise.
5662 (x32-linux.c): Likewise.
5663 (x32-avx.o): Likewise.
5664 (x32-avx.c): Likewise.
5665 (x32-avx-linux.o): Likewise.
5666 (x32-avx-linux.c): Likewise.
5667
5668 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5669 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5670 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5671 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5672 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5673 i386/x32-avx-linux.xml.
5674
5675 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5676 (init_registers_x32_avx_linux): Likwise.
5677 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5678 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5679
5680 2012-04-13 Pedro Alves <palves@redhat.com>
5681
5682 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5683 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5684 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5685 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5686 the sub-make.
5687
5688 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5689
5690 * linux-x86-low.c (compat_x32_clock_t): New.
5691 (compat_x32_siginfo_t): Likewise.
5692 (compat_x32_siginfo_from_siginfo): Likewise.
5693 (siginfo_from_compat_x32_siginfo): Likewise.
5694 (linux_is_elf64): Likewise.
5695 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5696 and siginfo_from_compat_x32_siginfo for x32.
5697 (x86_arch_setup): Set linux_is_elf64.
5698
5699 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5700
5701 PR gdb/13969
5702 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5703 e_machine field.
5704 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5705 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5706 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5707 compatible with process.
5708
5709 2012-04-12 Yao Qi <yao@codesourcery.com>
5710
5711 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5712 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5713 (install-only, install-info, clean): Handle sub dir gnulib.
5714 (all-lib, am--refresh): New targets.
5715 (memmem.o): Remove target.
5716 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5717 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5718 (AC_REPLACE_FUNCS): Remove memmem.
5719 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5720 (AC_OUTPUT): Generate Makefile in gnulib/.
5721 * aclocal.m4, config.in, configure: Regenerated.
5722
5723 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5724
5725 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5726
5727 2012-04-05 Pedro Alves <palves@redhat.com>
5728
5729 -Werror=strict-aliasing
5730
5731 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5732 pointer.
5733
5734 2012-04-04 Pedro Alves <palves@redhat.com>
5735
5736 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5737 (sparc_store_gregset_from_stack, sparc_store_gregset)
5738 (sparc_breakpoint_at): Fix formatting.
5739
5740 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5741
5742 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5743 are available.
5744 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5745 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5746 * config.in: Regenerate.
5747 * configure: Likewise.
5748
5749 2012-03-29 Pedro Alves <palves@redhat.com>
5750
5751 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5752 Correct ptrace arguments.
5753
5754 2012-03-28 Pedro Alves <palves@redhat.com>
5755
5756 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5757 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5758 (IA64_FR1_REGNUM): New defines.
5759 (ia64_fetch_register): New.
5760 (the_low_target): Install it.
5761 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5762 field.
5763 * linux-low.c (linux_fetch_registers): Try the
5764 the_low_target.fetch_register hook first.
5765
5766 * linux-arm-low.c (the_low_target): Adjust.
5767 * linux-bfin-low.c (the_low_target): Adjust.
5768 * linux-cris-low.c (the_low_target): Adjust.
5769 * linux-crisv32-low.c (the_low_target): Adjust.
5770 * linux-m32r-low.c (the_low_target): Adjust.
5771 * linux-m68k-low.c (the_low_target): Adjust.
5772 * linux-mips-low.c (the_low_target): Adjust.
5773 * linux-ppc-low.c (the_low_target): Adjust.
5774 * linux-s390-low.c (the_low_target): Adjust.
5775 * linux-sh-low.c (the_low_target): Adjust.
5776 * linux-sparc-low.c (the_low_target): Adjust.
5777 * linux-tic6x-low.c (the_low_target): Adjust.
5778 * linux-x86-low.c (the_low_target): Adjust.
5779 * linux-xtensa-low.c (the_low_target): Adjust.
5780
5781 2012-03-26 Pedro Alves <palves@redhat.com>
5782
5783 * server.c (handle_qxfer_libraries): Don't bail early if
5784 the_target->qxfer_libraries_svr4 is not NULL.
5785
5786 2012-03-26 Pedro Alves <palves@redhat.com>
5787
5788 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5789
5790 2012-03-23 Pedro Alves <palves@redhat.com>
5791
5792 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5793 "library-list-svr4" element's start tag when the the DSO list is
5794 empty.
5795
5796 2012-03-23 Pedro Alves <palves@redhat.com>
5797
5798 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5799 a variable whose type size is the same as the inferior's pointer
5800 size.
5801
5802 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5803
5804 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5805 struct siginfo.
5806 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5807 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5808 * linux-low.h: Include <signal.h>.
5809 (struct siginfo): Remove forward declaration.
5810 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5811 struct siginfo.
5812
5813 2012-03-21 Mike Frysinger <vapier@gentoo.org>
5814
5815 * .gitignore: Ignore more files.
5816
5817 2012-03-19 Pedro Alves <palves@redhat.com>
5818 Jan Kratochvil <jan.kratochvil@redhat.com>
5819
5820 * server.c (cont_thread, general_thread): Add describing comments.
5821 (start_inferior): Clear `cont_thread'.
5822 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5823 of a process.
5824
5825 2012-03-15 Yao Qi <yao@codesourcery.com>
5826
5827 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5828 handling to ...
5829 (cmd_qtdp): ... here.
5830
5831 2012-03-15 Yao Qi <yao@codesourcery.com>
5832
5833 * tracepoint.c (struct tracepoint_action_ops): New.
5834 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5835 (m_tracepoint_action_download): New.
5836 (r_tracepoint_action_download): New.
5837 (x_tracepoint_action_download): New.
5838 (l_tracepoint_action_download): New.
5839 (add_tracepoint_action): Install `action->ops' according type.
5840 (download_tracepoint_1): Move code `download' function pointer
5841 of various tracepoint_action_ops.
5842
5843 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5844
5845 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5846 linux_ptrace_attach_warnings.
5847
5848 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5849
5850 * Makefile.in (linux-ptrace.o): New.
5851 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5852 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5853 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5854 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5855 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5856 of these targets.
5857 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5858
5859 2012-03-08 Yao Qi <yao@codesourcery.com>
5860 Pedro Alves <palves@redhat.com>
5861
5862 Fix PR server/13392.
5863 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5864 offset of JMP insn.
5865 * tracepoint.c (remove_tracepoint): New.
5866 (cmd_qtdp): Call remove_tracepoint when failed to install.
5867
5868 2012-03-07 Pedro Alves <palves@redhat.com>
5869
5870 * linux-low.c (get_detach_signal): New.
5871 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5872 Pass on pending signals to PTRACE_DETACH. Check the result of the
5873 ptrace call.
5874 * server.c (program_signals, program_signals_p): New.
5875 (handle_general_set): Handle QProgramSignals.
5876 * server.h (program_signals, program_signals_p): Declare.
5877
5878 2012-03-05 Pedro Alves <palves@redhat.com>
5879 Jan Kratochvil <jan.kratochvil@redhat.com>
5880
5881 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5882 New comment why.
5883
5884 2012-03-03 Yao Qi <yao@codesourcery.com>
5885
5886 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5887 agent_look_up_symbols.
5888
5889 2012-03-03 Yao Qi <yao@codesourcery.com>
5890
5891 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5892 (linux-x86-low.o): Likewise.
5893 * server.h: Remove in_process_agent_loaded.
5894 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5895 common/agent.c.
5896 Update callers.
5897
5898 2012-03-03 Yao Qi <yao@codesourcery.com>
5899
5900 * tracepoint.c (gdb_agent_capability): New global.
5901 (in_process_agent_loaded_ust): Renamed to
5902 `in_process_agent_supports_ust'.
5903 Update callers.
5904 (in_process_agent_supports_ust): Call agent_capability_check.
5905 (clear_installed_tracepoints): Assert that agent supports
5906 agent.
5907
5908 2012-03-03 Yao Qi <yao@codesourcery.com>
5909
5910 * linux-low.c (linux_supports_agent): New.
5911 (linux_target_ops): Initialize field `supports_agent' with
5912 linux_supports_agent.
5913 * target.h (struct target_ops) <supports_agent>: New.
5914 (target_supports_agent): New macro.
5915 * server.c (handle_general_set): Handle packet 'QAgent'.
5916 (handle_query): Send `QAgent+'.
5917 * Makefile.in (server.o): Depends on agent.h.
5918
5919 2012-03-03 Yao Qi <yao@codesourcery.com>
5920
5921 * Makefile.in (OBS): Add agent.o.
5922 Add new rule for agent.o.
5923 Track dependence of tracepoint.c on agent.h.
5924 * tracepoint.c (run_inferior_command_1):
5925 (run_inferior_command): Call agent_run_command.
5926 (gdb_ust_connect_sync_socket): Deleted. Move it to
5927 common/agent.c.
5928 (resume_thread, stop_thread): Likewise.
5929 (gdb_ust_socket_init): Renamed to ...
5930 (gdb_agent_socket_init): ... New.
5931 (gdb_ust_thread): Renamed to ...
5932 (gdb_agent_helper_thread): ... New.
5933 (gdb_ust_init): Move some code to ...
5934 (gdb_agent_init): ... here. New.
5935 [HAVE_UST]: Call gdb_ust_init.
5936 (initialize_tracepoint_ftlib): Call gdb_agent_init.
5937 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
5938 * config.in, configure: Regenerated.
5939
5940 2012-03-02 Pedro Alves <palves@redhat.com>
5941
5942 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
5943 * linux-low.c (struct simple_pid_list): New.
5944 (stopped_pids): New a struct simple_pid_list pointer.
5945 (add_to_pid_list, pull_pid_from_list): New.
5946 (handle_extended_wait): Don't assume the first signal new children
5947 report is SIGSTOP. Adjust call to pull_pid_from_list.
5948 (linux_wait_for_lwp): Adjust.
5949
5950 2012-03-02 Yao Qi <yao@codesourcery.com>
5951
5952 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
5953 debug log.
5954
5955 2012-03-02 Yao Qi <yao@codesourcery.com>
5956
5957 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
5958 `stop_pc' and `tpoint'. Update caller.
5959
5960 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
5961
5962 * linux-low.h (linux_target_ops): Add regset_bitmap member.
5963 * linux-low.c (use_linux_regsets): New macro.
5964 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
5965 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
5966 (linux_register_in_regsets): New function.
5967 (usr_fetch_inferior_registers): Skip registers covered by
5968 regsets.
5969 (usr_store_inferior_registers): Likewise.
5970 (usr_fetch_inferior_registers): New macro.
5971 (usr_store_inferior_registers): Likewise.
5972 (linux_fetch_registers): Handle mixed regset/non-regset targets.
5973 (linux_store_registers): Likewise.
5974 * linux-mips-low.c (init_registers_mips_dsp_linux): New
5975 prototype.
5976 (init_registers_mips64_dsp_linux): Likewise.
5977 (init_registers_mips_linux): New macro.
5978 (init_registers_mips_dsp_linux): Likewise.
5979 (mips_dsp_num_regs): Likewise.
5980 (DSP_BASE, DSP_CONTROL): New fallback macros.
5981 (mips_base_regs): New macro.
5982 (mips_regmap): Use it. Fix the size.
5983 (mips_dsp_regmap): New variable.
5984 (mips_dsp_regset_bitmap): Likewise.
5985 (mips_arch_setup): New function.
5986 (mips_cannot_fetch_register): Use the_low_target.regmap rather
5987 than mips_regmap.
5988 (mips_cannot_store_register): Likewise.
5989 (the_low_target): Update .arch_setup, .num_regs and .regmap
5990 initializers. Add .regset_bitmap initializer.
5991 * linux-arm-low.c (the_low_target): Add .regset_bitmap
5992 initializer.
5993 * linux-bfin-low.c (the_low_target): Likewise.
5994 * linux-cris-low.c (the_low_target): Likewise.
5995 * linux-crisv32-low.c (the_low_target): Likewise.
5996 * linux-ia64-low.c (the_low_target): Likewise.
5997 * linux-m32r-low.c (the_low_target): Likewise.
5998 * linux-m68k-low.c (the_low_target): Likewise.
5999 * linux-ppc-low.c (the_low_target): Likewise.
6000 * linux-s390-low.c (the_low_target): Likewise.
6001 * linux-sh-low.c (the_low_target): Likewise.
6002 * linux-sparc-low.c (the_low_target): Likewise.
6003 * linux-tic6x-low.c (the_low_target): Likewise.
6004 * linux-x86-low.c (the_low_target): Likewise.
6005 * linux-xtensa-low.c (the_low_target): Likewise.
6006 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6007 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6008 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6009 srv_xmlfiles.
6010 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6011 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6012
6013 2012-02-29 Yao Qi <yao@codesourcery.com>
6014 Pedro Alves <palves@redhat.com>
6015
6016 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6017 `step_over_finished' is true.
6018
6019 2012-02-27 Pedro Alves <palves@redhat.com>
6020
6021 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6022 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6023
6024 2012-02-27 Pedro Alves <palves@redhat.com>
6025
6026 PR server/9684
6027 * linux-low.c (pid_is_stopped): New.
6028 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6029
6030 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
6031
6032 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6033 of conditions.
6034
6035 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6036
6037 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6038
6039 2012-02-24 Luis Machado <lgustavo@codesourcery>
6040
6041 * server.c (handle_query): Advertise support for target-side
6042 breakpoint condition evaluation.
6043 (process_point_options): New function.
6044 (process_serial_event): When inserting a breakpoint, check for
6045 a target-side condition that should be evaluated.
6046
6047 * mem-break.c: Include regcache.h and ax.h.
6048 (point_cond_list_t): New data structure.
6049 (breakpoint) <cond_list>: New field.
6050 (find_gdb_breakpoint_at): Make non-static.
6051 (delete_gdb_breakpoint_at): Clear any target-side
6052 conditions.
6053 (clear_gdb_breakpoint_conditions): New function.
6054 (add_condition_to_breakpoint): Likewise.
6055 (add_breakpoint_condition): Likewise.
6056 (gdb_condition_true_at_breakpoint): Likewise.
6057 (gdb_breakpoint_here): Return result directly instead
6058 of going through a local variable.
6059
6060 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6061 (clear_gdb_breakpoint_conditions): Likewise.
6062 (add_breakpoint_condition): Likewise.
6063 (gdb_condition_true_at_breakpoint): Likewise.
6064
6065 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6066 (need_step_over_p): Take target-side breakpoint condition into
6067 consideration.
6068
6069 2012-02-24 Luis Machado <lgustavo@codesourcery>
6070
6071 * server.h: Include tracepoint.h.
6072 (agent_mem_read, agent_get_trace_state_variable_value,
6073 agent_set_trace_state_variable_value,
6074 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6075 get_set_tsv_func_addr): New prototypes.
6076
6077 * ax.h: New include file.
6078 * ax.c: New source file.
6079
6080 * tracepoint.c: Include ax.h.
6081 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6082 agent_expr, eval_result_type): Move to ax.h.
6083 (parse_agent_expr): Rename to ...
6084 (gdb_parse_agent_expr): ... this, make it non-static and move
6085 to ax.h.
6086 (unparse_agent_expr) Rename to ...
6087 (gdb_unparse_agent_expr): ... this, make it non-static and move
6088 to ax.h.
6089 (eval_agent_expr): Rename to ...
6090 (eval_tracepoint_agent_expr): ... this.
6091 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6092 forward declarations.
6093 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6094 (agent_get_trace_state_variable_value): New function.
6095 (agent_set_trace_state_variable_value): New function.
6096 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6097 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6098 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6099 (condition_true_at_tracepoint): Likewise.
6100 (parse_agent_expr): Rename to ...
6101 (gdb_parse_agent_expr): ... this and move to ax.c.
6102 (unparse_agent_expr): Rename to ...
6103 (gdb_unparse_agent_expr): ... this and move to ax.c.
6104 (gdb_agent_op_name): Move to ax.c.
6105 (eval_agent_expr): Rename to ...
6106 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6107 and move to ax.c.
6108 (eval_tracepoint_agent_expr): New function.
6109 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
6110 non-static.
6111 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6112 ax.c.
6113 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6114 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6115 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6116 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6117 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6118 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6119 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6120 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6121 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6122 (compile_bytecodes): Remove forward declaration.
6123 (is_goto_target): Move to ax.c.
6124 (compile_bytecodes): Move to ax.c and call
6125 agent_get_trace_state_variable_value (...) and
6126 agent_set_trace_state_variable_value (...).
6127
6128 * Makefile.in: Update ax.c and IPA dependencies.
6129
6130 2012-02-24 Pedro Alves <palves@redhat.com>
6131
6132 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6133 (cmd_bigqtbuffer_circular): ... this. Only handle
6134 'QTBuffer:circular:'.
6135 (handle_tracepoint_general_set): Adjust.
6136
6137 2012-02-16 Yao Qi <yao@codesourcery.com>
6138
6139 * inferiors.c: Move code to ...
6140 * dll.c: .... here. New.
6141 * server.h: Declare clear_dlls.
6142 * Makefile.in (SFILES): Add dll.c.
6143 (OBS): Add dll.o
6144 (dll.o): New rule.
6145
6146 2012-02-11 Yao Qi <yao@codesourcery.com>
6147
6148 * server.c: (handle_monitor_command): Add a new parameter
6149 `own_buf'.
6150 (handle_query): Update caller.
6151
6152 2012-02-09 Joel Brobecker <brobecker@adacore.com>
6153
6154 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6155 * configure, config.in: Regenerate.
6156 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6157 is not defined.
6158
6159 2012-02-02 Pedro Alves <palves@redhat.com>
6160
6161 Try SIGKILL first, then PTRACE_KILL.
6162 * linux-low.c (linux_kill_one_lwp): New.
6163 (linux_kill_one_lwp): Rename to ...
6164 (kill_one_lwp_callback): ... this. Use the new
6165 linux_kill_one_lwp.
6166
6167 2012-02-02 Pedro Alves <palves@redhat.com>
6168
6169 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6170 inferior.
6171
6172 2012-01-27 Pedro Alves <palves@redhat.com>
6173
6174 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6175 (elf_64_file_p): Make static.
6176 (linux_pid_exe_is_elf_64_file): New.
6177 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6178 Delete declarations.
6179 (linux_pid_exe_is_elf_64_file): Declare.
6180 * linux-x86-low.c (x86_arch_setup): Use
6181 linux_pid_exe_is_elf_64_file.
6182
6183 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6184
6185 * linux-low.c (linux_wait_for_event_1): Rename to ...
6186 (linux_wait_for_event): ... here and merge it with former
6187 linux_wait_for_event - new variable wait_ptid, use it.
6188 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6189
6190 2012-01-23 Pedro Alves <palves@redhat.com>
6191
6192 * server.c (main): Avoid yet another case of infinite loop while
6193 detaching/killing after a longjmp.
6194
6195 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6196
6197 Code cleanup.
6198 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6199
6200 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6201
6202 * hostio.c (handle_readlink): New function.
6203 (handle_vFile): Call it to handle "vFile:readlink" packets.
6204
6205 2012-01-20 Pedro Alves <palves@redhat.com>
6206 Ulrich Weigand <ulrich.weigand@linaro.org>
6207
6208 * server.c (handle_v_requests): Only support vAttach and vRun to
6209 start multiple processes when in extended protocol mode.
6210
6211 2012-01-17 Pedro Alves <palves@redhat.com>
6212
6213 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6214 memalign plus mprotect to allocate the scratch buffer.
6215
6216 2012-01-13 Pedro Alves <palves@redhat.com>
6217
6218 * server.c (attach_inferior): Clear `cont_thread'.
6219
6220 2012-01-13 Pedro Alves <palves@redhat.com>
6221
6222 * server.c (main): Avoid infinite loop while detaching/killing
6223 after a longjmp.
6224
6225 2012-01-09 Doug Evans <dje@google.com>
6226
6227 * server.c (start_inferior): Set last_ptid in --wrapper case.
6228
6229 2012-01-06 Yao Qi <yao@codesourcery.com>
6230
6231 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6232 defined.
6233 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6234
6235 2012-01-04 Yao Qi <yao@codesourcery.com>
6236
6237 * tracepoint.c (cmd_qtdp): Print debug message
6238 for static tracepoint.
6239
6240 2012-01-04 Yao Qi <yao@codesourcery.com>
6241
6242 * tracepoint.c (trace_vdebug): Differentiate debug message
6243 between gdbserver and IPA.
6244
6245 2012-01-03 Yao Qi <yao@codesourcery.com>
6246
6247 * tracepoint.c (tracepoint_was_hit): Don't collect for
6248 static tracepoint.
6249
6250 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6251
6252 * terminal.h: Reformat copyright header.
6253
6254 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6255
6256 * server.c (gdbserver_version): Update copyright year.
6257 * gdbreplay.c (gdbreplay_version): Likewise.
6258
6259 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6260
6261 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6262
6263 Revert:
6264 2011-12-18 Hui Zhu <teawater@gmail.com>
6265 * linux-low.c (linux_create_inferior): Save return value to ret.
6266
6267 2011-12-18 Hui Zhu <teawater@gmail.com>
6268
6269 * linux-low.c (linux_create_inferior): Save return value to ret.
6270
6271 2011-12-16 Doug Evans <dje@google.com>
6272
6273 * linux-low.c (linux_create_inferior): If stdio connection,
6274 redirect stdin from /dev/null, stdout to stderr.
6275 * remote-utils.c (remote_is_stdio): New static global.
6276 (remote_connection_is_stdio): New function.
6277 (remote_prepare): Handle stdio connection.
6278 (remote_open): Ditto.
6279 (remote_close): Don't close stdin for stdio connections.
6280 (read_prim,write_prim): New functions. Replace all calls to
6281 read/write to these.
6282 * server.c (main): Watch for "-" argument. Move call to
6283 remote_prepare before start_inferior.
6284 * server.h (STDIO_CONNECTION_NAME): New macro.
6285 (remote_connection_is_stdio): Declare.
6286
6287 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6288 in debugging output.
6289
6290 2011-12-15 Yao Qi <yao@codesourcery.com>
6291
6292 * tracepoint.c: Include sys/syscall.h.
6293 (gdb_ust_thread): Remove preprocessor conditional.
6294
6295 2011-12-14 Pedro Alves <pedro@codesourcery.com>
6296
6297 * linux-low.c (linux_detach_one_lwp): Call
6298 the_low_target.prepare_to_resume before detaching.
6299
6300 2011-12-14 Yao Qi <yao@codesourcery.com>
6301
6302 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6303 of write.
6304
6305 2011-12-14 Yao Qi <yao@codesourcery.com>
6306
6307 * i386-low.c (i386_low_stopped_data_address): Initialize local
6308 variable `control'.
6309
6310 2011-12-13 Pedro Alves <pedro@codesourcery.com>
6311
6312 PR remote/13492
6313
6314 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6315 DR_CONTROL unless necessary. Extend comments.
6316 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6317 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6318
6319 2011-12-13 Yao Qi <yao@codesourcery.com>
6320
6321 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6322 macros.
6323 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6324
6325 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6326
6327 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6328 Print new debug message for such case.
6329
6330 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6331
6332 Fix overlapping memcpy.
6333 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6334 the read_inferior_memory transfer.
6335 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6336 write_inferior_memory transfer.
6337 (set_fast_tracepoint_jump): New variable buf. Use it for the
6338 read_inferior_memory and write_inferior_memory transfers.
6339 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6340 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6341 Use it for the write_inferior_memory transfer.
6342 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6343 buffers.
6344
6345 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6346
6347 * linux-low.c (fetch_register, store_register): Make code
6348 consistent, fix formatting.
6349
6350 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6351
6352 * linux-low.c (usr_store_inferior_registers): Factor out code
6353 to handle individual registers into...
6354 (store_register): ... this new function.
6355
6356 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6357
6358 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6359 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6360 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6361 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6362 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6363 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6364 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6365 (srv_xmlfiles): Add new XML files.
6366
6367 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6368 and <sys/uio.h>.
6369 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6370 (init_registers_s390_linux32v1): Add prototype.
6371 (init_registers_s390_linux32v2): Likewise.
6372 (init_registers_s390_linux64v1): Likewise.
6373 (init_registers_s390_linux64v2): Likewise.
6374 (init_registers_s390x_linux64v1): Likewise.
6375 (init_registers_s390x_linux64v2): Likewise.
6376 (s390_num_regs): Increment to 52.
6377 (s390_regmap): Add orig_r2 register.
6378 (s390_num_regs_3264): Increment to 68.
6379 (s390_regmap_3264): Add orig_r2 register.
6380 (s390_collect_ptrace_register): Handle orig_r2 register.
6381 (s390_supply_ptrace_register): Likewise.
6382 (s390_fill_last_break): New function.
6383 (s390_store_last_break): Likewise.
6384 (s390_fill_system_call): New function.
6385 (s390_store_system_call): Likewise.
6386 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6387 register sets.
6388 (s390_check_regset): New function.
6389 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6390 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6391 Update target_regsets for available register sets.
6392
6393 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6394 Jan Kratochvil <jan.kratochvil@redhat.com>
6395
6396 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6397 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6398 New.
6399 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6400 * linux-low.h (struct process_info_private): New member r_debug.
6401 * server.c (handle_qxfer_libraries): Call
6402 the_target->qxfer_libraries_svr4.
6403 (handle_qxfer_libraries_svr4): New function.
6404 (qxfer_packets): New entry "libraries-svr4".
6405 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6406 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6407 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6408 PACKET_qXfer_libraries_svr4.
6409
6410 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6411
6412 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6413 PSW address/mask between 8-byte and 16-byte formats.
6414 (s390_supply_ptrace_register): Likewise.
6415 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6416 basic addressing mode bit.
6417
6418 2011-11-24 Stan Shebs <stan@codesourcery.com>
6419
6420 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6421
6422 2011-11-17 Stan Shebs <stan@codesourcery.com>
6423
6424 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6425 (tracing_start_time): New global.
6426 (tracing_stop_time): New global.
6427 (tracing_user_name): New global.
6428 (tracing_notes): New global.
6429 (tracing_stop_note): New global.
6430 (cmd_qtstart): Set traceframe_usage, start_time.
6431 (stop_tracing): Set stop_time.
6432 (cmd_qtstatus): Report additional status.
6433 (cmd_qtp): New function.
6434 (handle_tracepoint_query): Call it.
6435 (cmd_qtnotes): New function.
6436 (handle_tracepoint_general_set): Call it.
6437 (get_timestamp): Rename from tsv_get_timestamp.
6438
6439 2011-11-14 Stan Shebs <stan@codesourcery.com>
6440 Kwok Cheung Yeung <kcy@codesourcery.com>
6441
6442 * linux-x86-low.c (small_jump_insn): New.
6443 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6444 trampoline and error message, build a trampoline and issue a small
6445 jump instruction to it.
6446 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6447 trampoline and error message.
6448 (x86_get_min_fast_tracepoint_insn_len): New.
6449 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6450 * linux-low.h (struct linux_target_ops): Add arguments to
6451 install_fast_tracepoint_jump_pad operation, add new operation.
6452 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6453 arguments.
6454 (linux_get_min_fast_tracepoint_insn_len): New function.
6455 (linux_target_op): Add new operation.
6456 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6457 (gdb_trampoline_buffer_end): Ditto.
6458 (gdb_trampoline_buffer_error): Ditto.
6459 (struct ipa_sym_addresses): Add fields for new IPA variables.
6460 (symbol_list): Add entries for new IPA variables.
6461 (struct tracepoint): Add fields to hold the address range of the
6462 trampoline used by the tracepoint.
6463 (trampoline_buffer_head): New static variable.
6464 (trampoline_buffer_tail): Ditto.
6465 (claim_trampoline_space): New function.
6466 (have_fast_tracepoint_trampoline_buffer): New function.
6467 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6468 structure.
6469 (install_fast_tracepoint): Ditto, also add error buffer argument.
6470 (cmd_qtminftpilen): New function.
6471 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6472 (fast_tracepoint_from_trampoline_address): New function.
6473 (fast_tracepoint_collecting): Handle trampoline as part of jump
6474 pad space.
6475 (set_trampoline_buffer_space): New function.
6476 (initialize_tracepoint): Initialize new IPA variables.
6477 * target.h (struct target_ops): Add arguments to
6478 install_fast_tracepoint_jump_pad operation, add new
6479 get_min_fast_tracepoint_insn_len operation.
6480 (target_get_min_fast_tracepoint_insn_len): New.
6481 (install_fast_tracepoint_jump_pad): Add arguments.
6482 * server.h (IPA_BUFSIZ): Define.
6483 * linux-i386-ipa.c: Include extra header files.
6484 (initialize_fast_tracepoint_trampoline_buffer): New function.
6485 (initialize_low_tracepoint): Call it.
6486 * server.h (set_trampoline_buffer_space): Declare.
6487 (claim_trampoline_space): Ditto.
6488 (have_fast_tracepoint_trampoline_buffer): Ditto.
6489
6490 2011-11-14 Yao Qi <yao@codesourcery.com>
6491
6492 * server.c (handle_query): Handle InstallInTrace for qSupported.
6493 * tracepoint.c (add_tracepoint): Sort list.
6494 (install_tracepoint, download_tracepoint): New.
6495 (cmd_qtdp): Call them to install and download tracepoints.
6496 (sort_tracepoints): Removed.
6497 (cmd_qtstart): Update.
6498
6499 2011-11-14 Yao Qi <yao@codesourcery.com>
6500
6501 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6502 * mem-break.h: Declare.
6503 * tracepoint.c (cmd_qtstart): Move some code to ...
6504 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6505 New.
6506 (download_tracepoints): Move some code to ...
6507 (download_tracepoint_1): ... here. New.
6508
6509 2011-11-08 Yao Qi <yao@codesourcery.com>
6510
6511 * remote-utils.c (relocate_instruction): A comment fix.
6512
6513 2011-11-07 Joel Brobecker <brobecker@adacore.com>
6514
6515 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6516 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6517 dr_status_mirror and dr_control_mirror from debug_reg_state.
6518 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6519 (i386_initial_stuff): Remove use of deleted globals.
6520 (i386_get_thread_context, i386_set_thread_context,
6521 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6522 from debug_reg_state.
6523
6524 2011-11-05 Yao Qi <yao@codesourcery.com>
6525
6526 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6527 address as TPOINT's.
6528
6529 2011-11-02 Stan Shebs <stan@codesourcery.com>
6530
6531 * tracepoint.c (agent_mem_read_string): New function.
6532 (eval_agent_expr): Call it for tracenz.
6533 * server.c (handle_query): Report support for tracenz.
6534
6535 2011-11-02 Yao Qi <yao@codesourcery.com>
6536
6537 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6538
6539 2011-11-02 Yao Qi <yao@codesourcery.com>
6540
6541 * target.h: Fix a typo in comment.
6542
6543 2011-10-31 Pedro Alves <pedro@codesourcery.com>
6544
6545 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6546 clobber the breakpoints' shadows with fast tracepoint jumps.
6547 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6548 * target.c (write_inferior_memory): Also pass MYADDR down to
6549 check_mem_write.
6550
6551 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6552
6553 * configure.ac: Check support for personality routine.
6554 * configure: Regenerate.
6555 * config.in: Likewise.
6556 * linux-low.c: Include <sys/personality.h>.
6557 Define ADDR_NO_RANDOMIZE if necessary.
6558 (linux_create_inferior): Disable address space randomization when
6559 forking inferior, if requested.
6560 (linux_supports_disable_randomization): New function.
6561 (linux_target_ops): Install it.
6562 * server.h (disable_randomization): Declare.
6563 * server.c (disable_randomization): New global variable.
6564 (handle_general_set): Handle QDisableRandomization.
6565 (handle_query): Likewise for qSupported.
6566 (main): Support --disable-randomization and --no-disable-randomization
6567 command line arguments.
6568 * target.h (struct target_ops): Add supports_disable_randomization.
6569 (target_supports_disable_randomization): New macro.
6570
6571 2011-09-29 Mike Frysinger <vapier@gentoo.org>
6572
6573 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6574 ifdef check.
6575 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6576 [!PT_GETDSBT] (target_loadmap): New definition.
6577 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6578 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6579 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6580 and PT_GETDSBT to LINUX_LOADMAP.
6581 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6582 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6583
6584 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6585
6586 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6587 (arm_linux_hwbp_cap): New static variable.
6588 (arm_linux_get_hwbp_cap): Replace by ...
6589 (arm_linux_init_hwbp_cap): ... this new function.
6590 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6591 (arm_linux_get_hw_watchpoint_count): Likewise.
6592 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6593 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6594 (arm_prepare_to_resume): Use perror_with_name instead of error.
6595
6596 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6597
6598 * linux-arm-low.c: Include <signal.h>.
6599 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6600 (struct arm_linux_hwbp_cap): New data type.
6601 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6602 (struct arm_linux_hw_breakpoint): New data type.
6603 (MAX_BPTS, MAX_WPTS): Define.
6604 (struct arch_process_info, struct arch_lwp_info): New data types.
6605 (arm_linux_get_hwbp_cap): New function.
6606 (arm_linux_get_hw_breakpoint_count): Likewise.
6607 (arm_linux_get_hw_watchpoint_count): Likewise.
6608 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6609 (arm_hwbp_control_initialize): Likewise.
6610 (arm_hwbp_control_is_enabled): Likewise.
6611 (arm_hwbp_control_is_initialized): Likewise.
6612 (arm_hwbp_control_disable): Likewise.
6613 (arm_linux_hw_breakpoint_equal): Likewise.
6614 (arm_linux_hw_point_initialize): Likewise.
6615 (struct update_registers_data): New data structure.
6616 (update_registers_callback: New function.
6617 (arm_insert_point): Likewise.
6618 (arm_remove_point): Likewise.
6619 (arm_stopped_by_watchpoint): Likewise.
6620 (arm_stopped_data_address): Likewise.
6621 (arm_new_process): Likewise.
6622 (arm_new_thread): Likewise.
6623 (arm_prepare_to_resume): Likewise.
6624 (the_low_target): Register arm_insert_point, arm_remove_point,
6625 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6626 arm_new_thread, and arm_prepare_to_resume.
6627
6628 2011-09-15 Stan Shebs <stan@codesourcery.com>
6629
6630 * server.h (struct emit_ops): Add compare-goto fields.
6631 * tracepoint.c (gdb_agent_op_sizes): New table.
6632 (emit_eq_goto): New function.
6633 (emit_ne_goto): New function.
6634 (emit_lt_goto): New function.
6635 (emit_le_goto): New function.
6636 (emit_gt_goto): New function.
6637 (emit_ge_goto): New function.
6638 (is_goto_target): New function.
6639 (compile_bytecodes): Recognize special cases of compare-goto
6640 combinations and call specialized emitters for them.
6641 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6642 (amd64_emit_ne_goto): New function.
6643 (amd64_emit_lt_goto): New function.
6644 (amd64_emit_le_goto): New function.
6645 (amd64_emit_gt_goto): New function.
6646 (amd64_emit_ge_goto): New function.
6647 (amd64_emit_ops): Add the new functions.
6648 (i386_emit_eq_goto): New function.
6649 (i386_emit_ne_goto): New function.
6650 (i386_emit_lt_goto): New function.
6651 (i386_emit_le_goto): New function.
6652 (i386_emit_gt_goto): New function.
6653 (i386_emit_ge_goto): New function.
6654 (i386_emit_ops): Add the new functions.
6655
6656 2011-09-08 Stan Shebs <stan@codesourcery.com>
6657
6658 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6659 (i386_emit_epilogue): Restore %ebx.
6660
6661 2011-08-31 Jie Zhang <jzhang918@gmail.com>
6662
6663 * server.c (step_thread): Remove definition.
6664 (process_serial_event): Don't handle Hs.
6665 * server.h (step_thread): Remove declaration.
6666 * target.c (set_desired_inferior): Remove use of step_thread.
6667
6668 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6669
6670 * linux-low.c: Include linux-procfs.h.
6671 (linux_attach_lwp_1): Update comments.
6672 (linux_attach): Scan for existing threads when attaching to a
6673 process that is the tgid.
6674 * Makefile.in: Update dependencies.
6675
6676 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6677
6678 * configure.srv: Add linux-procfs.o dependencies.
6679
6680 2011-08-14 Yao Qi <yao@codesourcery.com>
6681
6682 * target.h (struct target_ops): Fix indent.
6683 * win32-low.c (win32_target_ops): Fix comment.
6684
6685 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
6686 Yao Qi <yao@codesourcery.com>
6687
6688 * Makefile.in (clean): Remove tic6x-*.c files.
6689 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6690 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6691 (tic6x-c64xp-linux.c): Likewise.
6692 * configure.srv: Add support for tic6x-*-uclinux.
6693 * linux-tic6x-low.c: New.
6694 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6695
6696 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
6697 Yao Qi <yao@codesourcery.com>
6698
6699 * target.h (struct target_ops): Add read_loadmap.
6700 * linux-low.c (struct target_loadseg): New type.
6701 (struct target_loadmap): New type.
6702 (linux_read_loadmap): New function.
6703 (linux_target_ops): Add linux_read_loadmap.
6704 * server.c (handle_query): Support qXfer:fdpic:read packet.
6705 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6706 to NULL.
6707
6708 2011-08-05 Eli Zaretskii <eliz@gnu.org>
6709
6710 * win32-low.c: Include <stdint.h>.
6711
6712 2011-07-22 Pedro Alves <pedro@codesourcery.com>
6713
6714 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6715 to the inferior here.
6716 (i386_remove_aligned_watchpoint): Ditto.
6717 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6718 fit part of the watchpoint in the debug registers.
6719 (i386_update_inferior_debug_regs): New.
6720 (i386_low_insert_watchpoint): Work on a local mirror of the debug
6721 registers, and only update the inferior on success.
6722 (i386_low_remove_watchpoint): Ditto.
6723
6724 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6725
6726 * linux-low.c (compare_ints, unique, list_threads, show_process,
6727 linux_core_of_thread): Delete.
6728 (linux_target_ops): Change linux_core_of_thread to
6729 linux_common_core_of_thread.
6730 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6731 * utils.c (malloc_failure): Change type of argument.
6732 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6733 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6734 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6735 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6736 (IPA_OBJS): Add common-utils-ipa.o.
6737 (ptid_h, linux_osdata_h): New macros.
6738 (server_h): Add common/common-utils.h, common/xml-utils.h,
6739 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6740 common/ptid.h.
6741 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6742 ptid.o, buffer.o): New rules.
6743 (linux-low.o): Add common/linux-osdata.h as a dependency.
6744 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6745 * configure.ac: Add AC_HEADER_DIRENT check.
6746 * config.in: Regenerate.
6747 * configure: Regenerate.
6748 * remote-utils.c (xml_escape_text): Delete.
6749 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6750 buffer_xml_printf): Move to common/buffer.c.
6751 * server.c (main): Remove call to initialize_inferiors.
6752 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6753 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6754 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6755 internal_error, gdb_assert, gdb_assert_fail): Delete.
6756 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6757 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6758 common/buffer.h.
6759 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6760 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6761 initialize_inferiors): Delete.
6762
6763 2011-07-20 Pedro Alves <pedro@codesourcery.com>
6764
6765 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6766 symbol error.
6767
6768 2011-05-31 Pedro Alves <pedro@codesourcery.com>
6769
6770 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6771 assertion.
6772 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6773
6774 2011-05-26 Yao Qi <yao@codesourcery.com>
6775
6776 * Makefile.in (thread-db.o): Track dependence to
6777 common/gdb_thread_db.h.
6778 * thread-db.c: include gdb_thread_db.h from right place.
6779
6780 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6781
6782 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6783 __FILE__ and __LINE__ to internal_error.
6784
6785 2011-05-13 Doug Evans <dje@google.com>
6786
6787 * thread-db.c (try_thread_db_load_from_sdir): New function.
6788 (try_thread_db_load_from_dir): New function.
6789 (thread_db_load_search): Handle $sdir, ignore $pdir.
6790 Remove trying of system directories if search of
6791 libthread-db-search-path fails, that is now done via $sdir.
6792
6793 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6794
6795 * server.c (handle_query): Add EnableDisableTracepoints to the list
6796 of supported features.
6797 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
6798 tracepoints.
6799 (cmd_qtenable_disable): New.
6800 (cmd_qtstart): Install tracepoints even if disabled.
6801 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6802 receiving a QTEnable or QTDisable packet.
6803 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6804 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6805 tracepoints.
6806 (gdb_probe): Skip data collection if static tracepoint is disabled.
6807
6808 2011-05-10 Doug Evans <dje@google.com>
6809
6810 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6811
6812 2011-05-04 Doug Evans <dje@google.com>
6813
6814 * linux-low.c (linux_join): Skip process lookup.
6815 * spu-low.c (spu_join): Ditto.
6816 * server.c (join_inferiors_callback): Delete.
6817 (process_serial_event): For 'D' packet (detach) call join_inferior
6818 directly.
6819
6820 2011-05-04 Joseph Myers <joseph@codesourcery.com>
6821
6822 * README: Don't mention xscale*-*-linux*.
6823 * configure.srv (xscale*-*-linux*): Don't handle target.
6824
6825 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6826
6827 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6828 casting pointers.
6829 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6830 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6831 (i386_emit_void_call_2): Likewise.
6832
6833 2011-04-26 Yao Qi <yao@codesourcery.com>
6834
6835 * linux-low.c: Move common macros to linux-ptrace.h.
6836 Include linux-ptrace.h.
6837 * Makefile.in (linux_ptrace_h): New.
6838 (linux-low.o): Depends on linux-ptrace.h.
6839
6840 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6841
6842 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6843 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6844 (remote_prepare): New function with most of the TCP code from ...
6845 (remote_open): ... here. Detect PORT here unconditionally. Move also
6846 setting transport_is_reliable.
6847 * server.c (run_once): New variable.
6848 (gdbserver_usage): Document it.
6849 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6850 the first run if RUN_ONCE.
6851 * server.h (run_once, remote_prepare): New declarations.
6852
6853 2011-04-19 Tom Tromey <tromey@redhat.com>
6854
6855 * win32-low.c (handle_load_dll): Remove duplicate "the".
6856
6857 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6858
6859 Remove support for old Cygwin 1.5 versions.
6860 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6861 function to avoid warning.
6862 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6863 warning.
6864
6865 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6866
6867 * gdbserver/server.h (Macro _): Define it if not available.
6868
6869 2011-03-14 Michael Snyder <msnyder@vmware.com>
6870
6871 * hostio.c (handle_close): Remove unnecessary null test.
6872
6873 2011-03-10 Joel Brobecker <brobecker@adacore.com>
6874
6875 * Makefile.in (maintainer-clean realclean distclean): Remove
6876 "make ... subdir_do" command.
6877
6878 2011-03-10 Michael Snyder <msnyder@vmware.com>
6879
6880 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6881
6882 * server.c (handle_v_run): Free alloced buffer on early return.
6883
6884 2011-03-09 Yao Qi <yao@codesourcery.com>
6885
6886 Revert:
6887 2011-03-04 Yao Qi <yao@codesourcery.com>
6888
6889 * Makefile.in: Remove GNU make feature --directory.
6890
6891 2011-03-05 Yao Qi <yao@codesourcery.com>
6892
6893 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6894 (subdir_do): New make target. Copied from gdb/Makefile.
6895 (maintainer-clean, realclean, distclean, clean): Call corresponding
6896 make targets in common/Makefile.
6897
6898 2011-02-11 Yao Qi <yao@codesourcery.com>
6899
6900 * configure.ac: Call AC_PROG_RANLIB.
6901 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6902 * configure: Regenerate.
6903
6904 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6905
6906 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6907
6908 2011-03-06 Yao Qi <yao@codesourcery.com>
6909
6910 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6911
6912 2011-03-05 Yao Qi <yao@codesourcery.com>
6913
6914 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6915 (subdir_do): New make target. Copied from gdb/Makefile.
6916 (maintainer-clean, realclean, distclean, clean): Call corresponding
6917 make targets in common/Makefile.
6918
6919 2011-03-04 Yao Qi <yao@codesourcery.com>
6920
6921 * Makefile.in: Remove GNU make feature --directory.
6922
6923 2011-03-04 Michael Snyder <msnyder@vmware.com>
6924
6925 * server.c (queue_stop_reply): Call xmalloc not malloc.
6926
6927 2011-03-02 Michael Snyder <msnyder@vmware.com>
6928
6929 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6930
6931 2011-02-28 Michael Snyder <msnyder@vmware.com>
6932
6933 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6934 (cmd_qtframe): Ditto.
6935 (cmd_qtbuffer): Ditto.
6936 (cmd_bigqtbuffer): Ditto.
6937
6938 * utils.c (decimal2str): Initialize 'width' to nine, then
6939 don't mess with it.
6940
6941 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6942
6943 * hostio.c (require_data): Free *data, not data.
6944
6945 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6946
6947 * hostio.c (require_data): Use free, not xfree.
6948
6949 2011-02-27 Michael Snyder <msnyder@vmware.com>
6950
6951 * server.c (handle_query): Discard unused value.
6952
6953 * hostio.c (require_data): Free malloc memory before returning
6954 error.
6955
6956 2011-02-26 Michael Snyder <msnyder@vmware.com>
6957
6958 * linux-low.c (list_threads): Call closedir for dirent.
6959
6960 2011-02-27 Michael Snyder <msnyder@vmware.com>
6961
6962 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
6963 a case statement falls through.
6964
6965 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
6966
6967 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
6968 in comparison.
6969
6970 2011-02-26 Michael Snyder <msnyder@vmware.com>
6971
6972 * utils.c (decimal2str): Eliminate dead code and dead param.
6973 (pulongest): Drop dead param from call to decimal2str.
6974 (plongest): Ditto.
6975
6976 2011-02-24 Joel Brobecker <brobecker@adacore.com>
6977
6978 Revert the following patch (not approved yet):
6979 2011-02-21 Hui Zhu <teawater@gmail.com>
6980 * tracepoint.c (tp_printf): New function.
6981 (eval_agent_expr): Handle gdb_agent_op_printf.
6982
6983 2011-02-21 Hui Zhu <teawater@gmail.com>
6984
6985 * tracepoint.c (tp_printf): New function.
6986 (eval_agent_expr): Handle gdb_agent_op_printf.
6987
6988 2011-02-18 Tom Tromey <tromey@redhat.com>
6989
6990 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
6991 (tracepoint.o): Likewise.
6992 * tracepoint.c (enum gdb_agent_op): Use ax.def.
6993 (gdb_agent_op_names): Likewise.
6994
6995 2011-02-18 Tom Tromey <tromey@redhat.com>
6996
6997 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
6998 gdb_agent_op_rot>: New constants.
6999 (gdb_agent_op_names): Add pick and roll.
7000 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7001 cases.
7002
7003 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7004
7005 * aclocal.m4: Regenerated with aclocal-1.11.1.
7006
7007 2011-02-14 Pedro Alves <pedro@codesourcery.com>
7008
7009 * server.c (handle_qxfer_traceframe_info): New.
7010 (qxfer_packets): Register "traceframe-info".
7011 (handle_query): Report support for qXfer:traceframe-info:read+.
7012 * tracepoint.c (match_blocktype): New.
7013 (traceframe_find_block_type): Rename to ...
7014 (traceframe_walk_blocks): ... this. Add callback filter argument,
7015 and use it.
7016 (traceframe_find_block_type): New, reimplemented on top of
7017 traceframe_walk_blocks.
7018 (build_traceframe_info_xml): New.
7019 (traceframe_read_info): New.
7020 * server.h (traceframe_read_info): Declare.
7021
7022 2011-02-11 Yao Qi <yao@codesourcery.com>
7023
7024 * configure.ac: Call AC_PROG_RANLIB.
7025 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7026 * configure: Regenerate.
7027
7028 2011-02-07 Pedro Alves <pedro@codesourcery.com>
7029
7030 * server.c (gdb_read_memory): Change return semantics to allow
7031 partial transfers.
7032 (handle_search_memory_1): Adjust.
7033 (process_serial_event) <'m' packet>: Handle partial transfers.
7034 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7035
7036 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7037
7038 * regcache.c (init_register_cache): Initialize
7039 regcache->register_status.
7040 (free_register_cache): Release regcache->register_status.
7041 (regcache_cpy): Copy register_status.
7042 (registers_to_string): Print 'x's for unavailable registers.
7043 (supply_register): Mark the register's status valid or
7044 unavailable, depending on whether a buffer was passed in or not.
7045 (supply_register_zeroed): New.
7046 (supply_regblock): Mark the registers' status valid or
7047 unavailable, depending on whether a buffer was passed in or not.
7048 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7049 (struct regcache): New `register_status' field.
7050 (supply_register_zeroed): Declare.
7051 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7052 supply_register_zeroed, rather than passing a NULL buffer to
7053 supply_register.
7054 * tracepoint.c (fetch_traceframe_registers): Update comment.
7055
7056 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7057
7058 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7059 buffer explicit.
7060
7061 2011-01-25 Pedro Alves <pedro@codesourcery.com>
7062
7063 * server.h (decode_xfer_write): Change prototype.
7064 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7065 and don't extract the annex here.
7066 * server.c (decode_xfer_read): Remove `annex' parameter,
7067 and don't extract the annex here.
7068 (decode_xfer): New.
7069 (struct qxfer): New.
7070 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7071 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7072 (handle_qxfer_statictrace): New functions, abstracted out from
7073 handle_query, and made to use the struct qxfer interface.
7074 (handle_threads_qxfer_proper): Rename to ...
7075 (handle_qxfer_threads_proper): ... this.
7076 (handle_threads_qxfer): Rename to ...
7077 (handle_qxfer_threads): ... this. Adjust.
7078 (qxfer_packets): New array.
7079 (handle_qxfer): New function.
7080 (handle_query): Use handle_qxfer.
7081
7082 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7083
7084 * gdbreplay.c: Shorten lines of >= 80 columns.
7085 * linux-low.c: Ditto.
7086 * linux-ppc-low.c: Ditto.
7087 * linux-s390-low.c: Ditto.
7088 * linux-sparc-low.c: Ditto.
7089 * linux-x86-low.c: Ditto.
7090 * linux-xtensa-low.c: Ditto.
7091 * mem-break.c: Ditto.
7092 * nto-low.c: Ditto.
7093 * regcache.h: Ditto.
7094 * remote-utils.c: Ditto.
7095 * server.c: Ditto.
7096 * server.h: Ditto.
7097 * thread-db.c: Ditto.
7098 * tracepoint.c: Ditto.
7099 * utils.c: Ditto.
7100 * win32-low.h: Ditto.
7101
7102 2011-01-05 Joel Brobecker <brobecker@adacore.com>
7103
7104 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7105 update.
7106
7107 2011-01-01 Joel Brobecker <brobecker@adacore.com>
7108
7109 * server.c (gdbserver_version): Update copyright year in version
7110 output.
7111 * gdbreplay.c (gdbreplay_version): Ditto.
7112
7113 2010-12-29 Jie Zhang <jie.zhang@analog.com>
7114
7115 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7116 * linux-bfin-low.c: New file.
7117 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7118 PT_DATA_ADDR for BFIN targets.
7119 * Makefile.in (SFILES): Add linux-bfin-low.c.
7120 (clean): Remove reg-bfin.c.
7121 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7122 * README: Mention supported Blackfin targets.
7123
7124 2010-12-23 Mike Frysinger <vapier@gentoo.org>
7125
7126 * .gitignore: New file.
7127
7128 2010-11-16 Mike Frysinger <vapier@gentoo.org>
7129
7130 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7131
7132 2010-10-22 Jie Zhang <jie@codesourcery.com>
7133
7134 * Makefile.in: Add FLAGS_TO_PASS variable.
7135 (install): Remove dependency of install-only and recursively
7136 invoke make for install-only.
7137
7138 2010-10-04 Doug Evans <dje@google.com>
7139
7140 * Makefile.in (uninstall): Use $(DESTDIR).
7141
7142 2010-09-24 Pedro Alves <pedro@codesourcery.com>
7143
7144 PR gdb/11842
7145
7146 * linux-x86-low.c (compat_siginfo_from_siginfo)
7147 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7148 si_code is < 0. Check for si_code == SI_TIMER before checking for
7149 si_code < 0.
7150
7151 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7152
7153 * lynx-i386-low.c: New file.
7154 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7155
7156 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7157
7158 * lynx-low.c (ptrace_request_to_str): Remove handling for
7159 request values that have been removed in LynxOS 5.x.
7160
7161 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7162
7163 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7164 <ptrace.h>
7165
7166 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7167
7168 * configure.ac: Add --enable-inprocess-agent option.
7169 * configure: Rebuilt.
7170
7171 2010-09-06 Yao Qi <yao@codesourcery.com>
7172
7173 * linux-low.c (linux_kill): Remove unused variable.
7174 (linux_stabilize_threads): Likewise.
7175 * server.c (start_inferior): Likewise.
7176 (queue_stop_reply_callback): Likewise.
7177 * tracepoint.c (do_action_at_tracepoint): Likewise.
7178
7179 2010-09-06 Yao Qi <yao@codesourcery.com>
7180
7181 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7182 on return.
7183
7184 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7185
7186 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7187
7188 2010-09-06 Pedro Alves <pedro@codesourcery.com>
7189
7190 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7191 "$(IPA_DEPFILES)".
7192
7193 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7194
7195 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7196 gdbserver/lynx-ppc-low.c: New files.
7197 * Makefile.in (lynx_low_h): New variable.
7198 (lynx-low.o, lynx-ppc-low.o): New rules.
7199 * configure.ac: On LynxOS, link with -lnetinet.
7200 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7201 * configure: regenerate.
7202
7203 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7204
7205 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7206 * configure.ac: Add check for vasprintf and vsnprintf.
7207 * configure, config.in: Regenerate.
7208 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7209
7210 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7211
7212 * gdbreplay.c: Move include of alloca.h up, next to include of
7213 malloc.h.
7214 * server.h: Add include of malloc.h.
7215 * mem-break.c: Remove include of malloc.h.
7216 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7217
7218 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7219
7220 * Makefile.in (memmem.o): Build with -Wno-error.
7221
7222 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7223
7224 * utils.c (xsnprintf): Make non-static.
7225 * server.h: Add xsnprintf declaration.
7226 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7227 replace calls to snprintf by calls to xsnprintf throughout.
7228
7229 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7230
7231 * configure.ac: Add configure check for alloca.
7232 * configure, config.in: Regenerate.
7233 * server.h: Include alloca.h if it exists.
7234 * gdbreplay.c: Include alloca.h if it exists.
7235
7236 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7237
7238 * linux-low.c (__SIGRTMIN): Define if not already defined.
7239 (linux_create_inferior): Check for __ANDROID__ rather than
7240 __SIGRTMIN.
7241 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7242 are already deferred.
7243 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7244 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7245 stopped and already has a pending signal to report.
7246 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7247 a pending signal to report or is moving out of a jump pad.
7248 (linux_init_signals): Check for __ANDROID__ rather than
7249 __SIGRTMIN.
7250
7251 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7252
7253 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7254 debug_threads check. Avoid a linear search when not doing debug
7255 output.
7256
7257 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7258
7259 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7260 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7261 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7262 (process_event): Change local fd's type to gdb_fildes_t.
7263 (create_file_handler): Adjust prototype.
7264 (delete_file_handler): Adjust prototype.
7265 (handle_file_event): Adjust prototype. Use pfildes.
7266 (create_file_event): Adjsut prototype.
7267 * remote-utils.c (remote_desc, listen_desc): Change type to
7268 gdb_fildes_t.
7269 * server.h: New gdb_fildes_t typedef.
7270 [USE_WIN32API]: Include winsock2.h.
7271 (delete_file_handler, add_file_handler): Adjust prototypes.
7272 (pfildes): Declare.
7273 * utils.c (pfildes): New.
7274
7275 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7276
7277 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7278 * configure: Regenerate.
7279
7280 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7281
7282 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7283 (linux_done_accessing_memory): ... this.
7284 (linux_target_ops): Adjust.
7285 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7286 * nto-low.c (nto_target_ops): Adjust comment.
7287 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7288 * spu-low.c (spu_target_ops): Adjust comment.
7289 * target.h (target_ops): Rename unprepare_to_access_memory field
7290 to done_accessing_memory.
7291 (unprepare_to_access_memory): Rename to ...
7292 (done_accessing_memory): ... this.
7293
7294 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7295
7296 * linux-low.c (linux_prepare_to_access_memory): New.
7297 (linux_unprepare_to_access_memory): New.
7298 (linux_target_ops): Install them.
7299 * server.c (read_memory): Rename to ...
7300 (gdb_read_memory): ... this. Use
7301 prepare_to_access_memory/prepare_to_access_memory.
7302 (write_memory): Rename to ...
7303 (gdb_write_memory): ... this. Use
7304 prepare_to_access_memory/prepare_to_access_memory.
7305 (handle_search_memory_1): Adjust.
7306 (process_serial_event): Adjust.
7307 * target.h (struct target_ops): New fields
7308 prepare_to_access_memory and unprepare_to_access_memory.
7309 (prepare_to_access_memory, unprepare_to_access_memory): New.
7310 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7311 prepare_to_access_memory/prepare_to_access_memory.
7312 * nto-low.c (nto_target_ops): Adjust.
7313 * spu-low.c (spu_target_ops): Adjust.
7314 * win32-low.c (win32_target_ops): Adjust.
7315
7316 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7317
7318 * Makefile.in (WARN_CFLAGS): Get it from configure.
7319 (WERROR_CFLAGS): New.
7320 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7321 * configure.ac: Introduce --enable-werror, which adds -Werror to
7322 the compiler command line. Enabled by default. Disable with
7323 --disable-werror. Add -Wdeclaration-after-statement
7324 Wpointer-arith and -Wformat-nonliteral to warning flags.
7325 * configure: Regenerate.
7326
7327 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7328
7329 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7330
7331 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7332
7333 * gdbreplay.c (remote_error): New.
7334 (gdbchar): New.
7335 (expect): Use gdbchar. Check for error reading from GDB.
7336 Clarify sync error output.
7337 (play): Check for errors writing to GDB.
7338 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7339 * remote-utils.c (getpkt): Check for errors writing to the remote
7340 descriptor.
7341
7342 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7343
7344 * linux-low.c (linux_wait_1): Move non-debugging code out of
7345 `debug_threads' control.
7346
7347 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7348
7349 * linux-low.c (linux_wait_1): Don't set last_status here.
7350 * server.c (push_event, queue_stop_reply_callback): Assert we're
7351 not pushing a TARGET_WAITKIND_IGNORE event.
7352 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7353 (myresume, handle_target_event): Set the thread's last_resume_kind
7354 and last_status from the target returned status.
7355
7356 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7357
7358 PR threads/10729
7359
7360 * linux-x86-low.c (update_debug_registers_callback): New.
7361 (i386_dr_low_set_addr): Use it.
7362 (i386_dr_low_get_addr): New.
7363 (i386_dr_low_set_control): Use update_debug_registers_callback.
7364 (i386_dr_low_get_control): New.
7365 (i386_dr_low_get_status): Adjust.
7366 * linux-low.c (linux_stop_lwp): New.
7367 * linux-low.h (linux_stop_lwp): Declare.
7368
7369 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7370 argument instead of a i386_debug_reg_state.
7371 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7372 a i386_debug_reg_state.
7373 (i386_insert_aligned_watchpoint): Adjust.
7374 (i386_remove_aligned_watchpoint): Adjust.
7375 (i386_low_stopped_data_address): Read the debug registers from the
7376 inferior instead of from the mirrors.
7377 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7378 (i386_dr_low_get_addr): Declare.
7379 (i386_dr_low_get_control): Declare.
7380 (i386_dr_low_get_status): Change prototype.
7381
7382 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7383 (i386_dr_low_get_addr): New.
7384 (i386_dr_low_get_control): New.
7385 (i386_dr_low_get_status): Adjust prototype. Return
7386 dr_status_mirror.
7387 (i386_initial_stuff): Clear dr_status_mirror and
7388 dr_control_mirror.
7389 (i386_get_thread_context): Adjust.
7390 (i386_set_thread_context): Adjust.
7391 (i386_thread_added): Adjust.
7392
7393 2010-08-24 Pedro Alves <pedro@codesourcery.com>
7394
7395 * linux-low.h (linux_thread_area): Delete declaration.
7396
7397 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7398
7399 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7400 after its termination.
7401
7402 2010-08-09 Pedro Alves <pedro@codesourcery.com>
7403
7404 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7405 (gdb_wants_all_stopped): Delete.
7406 (linux_wait_1): Don't call them.
7407 * server.c (handle_v_cont): Tag all threads as want-stopped.
7408 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7409 stopped as "client-wants-stopped".
7410
7411 2010-07-31 Pedro Alves <pedro@codesourcery.com>
7412
7413 * Makefile.in (signals_h): New.
7414 (server_h): Depend on it.
7415 (server.o): Don't depend on $(signals_def).
7416 (signals.o): Depend on $(signals_def).
7417
7418 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7419
7420 * Makefile.in (signals_def): New.
7421 (server_h): Append include/gdb/signals.h and signals_def.
7422 (server.o): Append signals_def.
7423
7424 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7425
7426 * server.c (handle_target_event): Use target_signal_to_host for
7427 resume_info.sig initialization.
7428 * target.h (struct thread_resume) <sig>: New comment.
7429
7430 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7431
7432 * server.c (handle_query): strcpy() the returned string from paddress()
7433 instead of sprintf().
7434 * utils.c (paddress): Return phex_nz().
7435
7436 2010-07-07 Joel Brobecker <brobecker@adacore.com>
7437
7438 * server.c (handle_v_cont): Call mourn_inferior if process
7439 just exited.
7440 (myresume): Likewise.
7441
7442 2010-07-01 Pedro Alves <pedro@codesourcery.com>
7443
7444 Static tracepoints, and integration with UST.
7445
7446 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7447 * mem-break.c (uninsert_all_breakpoints)
7448 (reinsert_all_breakpoints): New.
7449 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7450 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7451 (gdb_agent_ust_loaded, helper_thread_id)
7452 (gdb_agent_helper_thread_id): New macros.
7453 (struct ipa_sym_addresses): Add addr_ust_loaded,
7454 addr_helper_thread_id, addr_cmd_buf.
7455 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7456 (in_process_agent_loaded_ust): New.
7457 (write_e_ust_not_loaded): New.
7458 (maybe_write_ipa_ust_not_loaded): New.
7459 (struct collect_static_trace_data_action): New.
7460 (enum tracepoint_type) <static_tracepoint>: New.
7461 (struct tracepoint) <handle>: Mention static tracepoints.
7462 (struct static_tracepoint_ctx): New.
7463 (CMD_BUF_SIZE): New.
7464 (add_tracepoint_action): Handle static tracepoint actions.
7465 (unprobe_marker_at): New.
7466 (clear_installed_tracepoints): Handle static tracepoints.
7467 (cmd_qtdp): Handle static tracepoints.
7468 (probe_marker_at): New.
7469 (cmd_qtstart): Handle static tracepoints.
7470 (response_tracepoint): Handle static tracepoints.
7471 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7472 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7473 (get_context_regcache): Handle static tracepoints.
7474 (do_action_at_tracepoint): Handle static tracepoint actions.
7475 (traceframe_find_block_type): Handle static trace data blocks.
7476 (traceframe_read_sdata): New.
7477 (download_tracepoints): Download static tracepoint actions.
7478 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7479 (GDB_PROBE_NAME): New.
7480 (ust_ops): New.
7481 (GET_UST_SYM): New.
7482 (USTF): New.
7483 (dlsym_ust): New.
7484 (ust_marker_to_static_tracepoint): New.
7485 (gdb_probe): New.
7486 (collect_ust_data_at_tracepoint): New.
7487 (gdb_ust_probe): New.
7488 (UNIX_PATH_MAX, SOCK_DIR): New.
7489 (gdb_ust_connect_sync_socket): New.
7490 (resume_thread, stop_thread): New.
7491 (run_inferior_command): New.
7492 (init_named_socket): New.
7493 (gdb_ust_socket_init): New.
7494 (cstr_to_hexstr): New.
7495 (next_st): New.
7496 (first_marker, next_marker): New.
7497 (response_ust_marker): New.
7498 (cmd_qtfstm, cmd_qtsstm): New.
7499 (unprobe_marker_at, probe_marker_at): New.
7500 (cmd_qtstmat, gdb_ust_thread): New.
7501 (gdb_ust_init): New.
7502 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7503 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7504 (ST_REGENTRY): New.
7505 (x86_64_st_collect_regmap): New.
7506 (X86_64_NUM_ST_COLLECT_GREGS): New.
7507 (AMD64_RIP_REGNUM): New.
7508 (supply_static_tracepoint_registers): New.
7509 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7510 (ST_REGENTRY): New.
7511 (i386_st_collect_regmap): New.
7512 (i386_NUM_ST_COLLECT_GREGS): New.
7513 (supply_static_tracepoint_registers): New.
7514 * server.c (handle_query): Handle qXfer:statictrace:read.
7515 <qSupported>: Report support for StaticTracepoints, and
7516 qXfer:statictrace:read features.
7517 * server.h (traceframe_read_sdata)
7518 (supply_static_tracepoint_registers): Declare.
7519 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7520 (unpack_varlen_hex): Include in IPA build.
7521 * Makefile.in (ustlibs, ustinc): New.
7522 (IPA_OBJS): Add remote-utils-ipa.o.
7523 ($(IPA_LIB)): Link -ldl and -lpthread.
7524 (UST_CFLAGS): New.
7525 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7526 * config.in, configure: Regenerate.
7527
7528 2010-06-20 Ian Lance Taylor <iant@google.com>
7529 Pedro Alves <pedro@codesourcery.com>
7530
7531 * linux-x86-low.c (always_true): Delete.
7532 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7533 trying to fool the compiler with always_true.
7534
7535 2010-06-20 Pedro Alves <pedro@codesourcery.com>
7536
7537 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7538 conditions in gdbserver.
7539
7540 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7541
7542 * spu-low.c (spu_read_memory): Wrap around local store limit.
7543 (spu_write_memory): Likewise.
7544
7545 2010-06-15 Pedro Alves <pedro@codesourcery.com>
7546
7547 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7548 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7549 LONGEST uses.
7550 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7551 uses.
7552 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7553 uses with LONGEST uses.
7554
7555 2010-06-14 Stan Shebs <stan@codesourcery.com>
7556 Pedro Alves <pedro@codesourcery.com>
7557
7558 Bytecode compiler.
7559
7560 * linux-x86-low.c: Include limits.h.
7561 (add_insns): New.
7562 (always_true): New.
7563 (EMIT_ASM): New.
7564 (EMIT_ASM32): New.
7565 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7566 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7567 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7568 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7569 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7570 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7571 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7572 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7573 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7574 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7575 (amd64_emit_void_call_2): New.
7576 (amd64_emit_ops): New.
7577 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7578 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7579 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7580 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7581 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7582 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7583 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7584 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7585 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7586 (i386_emit_stack_adjust, i386_emit_int_call_1)
7587 (i386_emit_void_call_2): New.
7588 (i386_emit_ops): New.
7589 (x86_emit_ops): New.
7590 (the_low_target): Install x86_emit_ops.
7591 * server.h (struct emit_ops): New.
7592 (get_raw_reg_func_addr): Declare.
7593 (current_insn_ptr, emit_error): Declare.
7594 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7595 (set_trace_state_variable_value): New defines.
7596 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7597 addr_get_trace_state_variable_value and
7598 addr_set_trace_state_variable_value.
7599 (symbol_list): New fields for get_raw_reg,
7600 get_trace_state_variable_value and set_trace_state_variable_value.
7601 (condfn): New typedef.
7602 (struct tracepoint): New field `compiled_cond'.
7603 (do_action_at_tracepoint): Clear compiled_cond.
7604 (get_trace_state_variable_value, set_trace_state_variable_value):
7605 Export in the IPA.
7606 (condition_true_at_tracepoint): If there's a compiled condition,
7607 run that.
7608 (current_insn_ptr, emit_error): New globals.
7609 (struct bytecode_address): New.
7610 (get_raw_reg_func_addr): New.
7611 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7612 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7613 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7614 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7615 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7616 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7617 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7618 (compile_tracepoint_condition, compile_bytecodes): New.
7619 * target.h (emit_ops): Forward declare.
7620 (struct target_ops): New field emit_ops.
7621 (target_emit_ops): New.
7622 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7623 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7624 * linux-low.c (linux_emit_ops): New.
7625 (linux_target_ops): Install it.
7626 * linux-low.h (struct linux_target_ops): New field emit_ops.
7627
7628 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7629
7630 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7631 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7632
7633 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7634 Stan Shebs <stan@codesourcery.com>
7635
7636 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7637 (all): Depend on $(extra_libraries).
7638 (install-only): Install the IPA.
7639 (IPA_OBJS, IPA_LIB): New.
7640 (clean): Remove the IPA lib.
7641 (IPAGENT_CFLAGS): New.
7642 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7643 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7644 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7645 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7646 * configure.ac: Check for atomic builtins support in the compiler.
7647 (IPA_DEPFILES, extra_libraries): Define.
7648 * configure.srv (ipa_obj): Add description.
7649 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7650 (i[34567]86-*-linux*): Set ipa_obj.
7651 (x86_64-*-linux*): Set ipa_obj.
7652 * linux-low.c (stabilizing_threads): New.
7653 (supports_fast_tracepoints): New.
7654 (linux_detach): Stabilize threads before detaching.
7655 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7656 the lwp is either not stabilizing, or is moving out of a jump pad.
7657 (linux_fast_tracepoint_collecting): New.
7658 (maybe_move_out_of_jump_pad): New.
7659 (enqueue_one_deferred_signal): New.
7660 (dequeue_one_deferred_signal): New.
7661 (linux_wait_for_event_1): If moving out of a jump pad, defer
7662 pending signals to later.
7663 (linux_stabilize_threads): New.
7664 (linux_wait_1): Check if threads need moving out of jump pads, and
7665 do it if so.
7666 (stuck_in_jump_pad_callback): New.
7667 (move_out_of_jump_pad_callback): New.
7668 (lwp_running): New.
7669 (linux_resume_one_lwp): Handle moving out of jump pads.
7670 (linux_set_resume_request): Dequeue deferred signals.
7671 (need_step_over_p): Also step over fast tracepoint jumps.
7672 (start_step_over): Also uninsert fast tracepoint jumps.
7673 (finish_step_over): Also reinsert fast tracepoint jumps.
7674 (linux_install_fast_tracepoint_jump): New.
7675 (linux_target_ops): Install linux_stabilize_threads and
7676 linux_install_fast_tracepoint_jump_pad.
7677 * linux-low.h (linux_target_ops) <get_thread_area,
7678 install_fast_tracepoint_jump_pad>: New fields.
7679 (struct lwp_info) <collecting_fast_tracepoint,
7680 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7681 (linux_get_thread_area): Declare.
7682 * linux-x86-low.c (jump_insn): New.
7683 (x86_get_thread_area): New.
7684 (append_insns): New.
7685 (push_opcode): New.
7686 (amd64_install_fast_tracepoint_jump_pad): New.
7687 (i386_install_fast_tracepoint_jump_pad): New.
7688 (x86_install_fast_tracepoint_jump_pad): New.
7689 (the_low_target): Install x86_get_thread_area and
7690 x86_install_fast_tracepoint_jump_pad.
7691 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7692 (struct fast_tracepoint_jump): New.
7693 (fast_tracepoint_jump_insn): New.
7694 (fast_tracepoint_jump_shadow): New.
7695 (find_fast_tracepoint_jump_at): New.
7696 (fast_tracepoint_jump_here): New.
7697 (delete_fast_tracepoint_jump): New.
7698 (set_fast_tracepoint_jump): New.
7699 (uninsert_fast_tracepoint_jumps_at): New.
7700 (reinsert_fast_tracepoint_jumps_at): New.
7701 (set_breakpoint_at): Use write_inferior_memory.
7702 (uninsert_raw_breakpoint): Use write_inferior_memory.
7703 (check_mem_read): Mask out fast tracepoint jumps.
7704 (check_mem_write): Mask out fast tracepoint jumps.
7705 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7706 (set_fast_tracepoint_jump): Declare.
7707 (delete_fast_tracepoint_jump)
7708 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7709 (reinsert_fast_tracepoint_jumps_at): Declare.
7710 * regcache.c: Don't compile many functions when building the
7711 in-process agent library.
7712 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7713 the register buffer in the heap.
7714 (free_register_cache): If the register buffer isn't owned by the
7715 regcache, don't free it.
7716 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7717 pre-existing register caches.
7718 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7719 type.
7720 (convert_ascii_to_int): : Constify `from' parameter type.
7721 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7722 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7723 the needed buffer in-place.
7724 (relocate_instruction): New.
7725 * server.c (handle_query) <qSymbols>: If the target supports
7726 tracepoints, give it a chance of looking up symbols. Report
7727 support for fast tracepoints.
7728 (handle_status): Stabilize threads.
7729 (process_serial_event): Adjust.
7730 * server.h (struct fast_tracepoint_jump): Forward declare.
7731 (struct process_info) <fast_tracepoint_jumps>: New field.
7732 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7733 (decode_X_packet, decode_M_packet): Adjust.
7734 (relocate_instruction): Declare.
7735 (in_process_agent_loaded): Declare.
7736 (tracepoint_look_up_symbols): Declare.
7737 (struct fast_tpoint_collect_status): Declare.
7738 (fast_tracepoint_collecting): Declare.
7739 (force_unlock_trace_buffer): Declare.
7740 (handle_tracepoint_bkpts): Declare.
7741 (initialize_low_tracepoint)
7742 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7743 * target.h (struct target_ops) <stabilize_threads,
7744 install_fast_tracepoint_jump_pad>: New fields.
7745 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7746 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7747 [HAVE_STDINT_H]: Include stdint.h.
7748 (trace_debug_1): Rename to ...
7749 (trace_vdebug): ... this.
7750 (trace_debug): Rename to ...
7751 (trace_debug_1): ... this. Add `level' parameter.
7752 (trace_debug): New.
7753 (ATTR_USED, ATTR_NOINLINE): New.
7754 (IP_AGENT_EXPORT): New.
7755 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7756 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7757 (about_to_request_buffer_space, trace_buffer_is_full)
7758 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7759 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7760 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7761 (traceframe_write_count, traceframes_created)
7762 (trace_state_variables)
7763 New renaming defines.
7764 (struct ipa_sym_addresses): New.
7765 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7766 (symbol_list): New.
7767 (ipa_sym_addrs): New.
7768 (all_tracepoint_symbols_looked_up): New.
7769 (in_process_agent_loaded): New.
7770 (write_e_ipa_not_loaded): New.
7771 (maybe_write_ipa_not_loaded): New.
7772 (tracepoint_look_up_symbols): New.
7773 (debug_threads) [IN_PROCESS_AGENT]: New.
7774 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7775 (UNKNOWN_SIDE_EFFECTS): New.
7776 (stop_tracing): New.
7777 (flush_trace_buffer): New.
7778 (stop_tracing_bkpt): New.
7779 (flush_trace_buffer_bkpt): New.
7780 (read_inferior_integer): New.
7781 (read_inferior_uinteger): New.
7782 (read_inferior_data_pointer): New.
7783 (write_inferior_data_pointer): New.
7784 (write_inferior_integer): New.
7785 (write_inferior_uinteger): New.
7786 (struct collect_static_trace_data_action): Delete.
7787 (enum tracepoint_type): New.
7788 (struct tracepoint) <type>: New field `type'.
7789 <actions_str, step_actions, step_actions_str>: Only include in
7790 GDBserver.
7791 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7792 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7793 (tracepoints): Use IP_AGENT_EXPORT.
7794 (last_tracepoint): Don't include in the IPA.
7795 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7796 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7797 (alloced_trace_state_variables): New.
7798 (trace_state_variables): Use IP_AGENT_EXPORT.
7799 (traceframe_t): Delete unused variable.
7800 (circular_trace_buffer): Don't include in the IPA.
7801 (trace_buffer_start): Delete.
7802 (struct trace_buffer_control): New.
7803 (trace_buffer_free): Delete.
7804 (struct ipa_trace_buffer_control): New.
7805 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7806 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7807 New.
7808 (trace_buffer_ctrl): New.
7809 (TRACE_BUFFER_CTRL_CURR): New.
7810 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7811 Reimplement as macros.
7812 (trace_buffer_wrap): Delete.
7813 (traceframe_write_count, traceframe_read_count)
7814 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7815 (struct tracepoint_hit_ctx) <type>: New field.
7816 (struct fast_tracepoint_ctx): New.
7817 (memory_barrier): New.
7818 (cmpxchg): New.
7819 (record_tracepoint_error): Update atomically in the IPA.
7820 (clear_inferior_trace_buffer): New.
7821 (about_to_request_buffer_space): New.
7822 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7823 updating the same buffer.
7824 (add_tracepoint): Default the tracepoint's type to trap
7825 tracepoint, and orig_size to -1.
7826 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7827 internal variables.
7828 (create_trace_state_variable): New parameter `gdb'. Handle it.
7829 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7830 (cmd_qtdp): Handle fast tracepoints.
7831 (cmd_qtdv): Adjust.
7832 (max_jump_pad_size): New.
7833 (gdb_jump_pad_head): New.
7834 (get_jump_space_head): New.
7835 (claim_jump_space): New.
7836 (sort_tracepoints): New.
7837 (MAX_JUMP_SIZE): New.
7838 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7839 IPA.
7840 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7841 support. Upload fast traceframes, and delete internal IPA
7842 breakpoints.
7843 (stop_tracing_handler): New.
7844 (flush_trace_buffer_handler): New.
7845 (cmd_qtstop): Upload fast tracepoints.
7846 (response_tracepoint): Handle fast tracepoints.
7847 (tracepoint_finished_step): Upload fast traceframes. Set the
7848 tracepoint hit context's tracepoint type.
7849 (handle_tracepoint_bkpts): New.
7850 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7851 type. Add comment about fast tracepoints.
7852 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7853 non-existing action_str field.
7854 (get_context_regcache): Handle fast tracepoints.
7855 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7856 to the regcache.
7857 (fast_tracepoint_from_jump_pad_address): New.
7858 (fast_tracepoint_from_ipa_tpoint_address): New.
7859 (collecting_t): New.
7860 (force_unlock_trace_buffer): New.
7861 (fast_tracepoint_collecting): New.
7862 (collecting): New.
7863 (gdb_collect): New.
7864 (write_inferior_data_ptr): New.
7865 (target_tp_heap): New.
7866 (target_malloc): New.
7867 (download_agent_expr): New.
7868 (UALIGN): New.
7869 (download_tracepoints): New.
7870 (download_trace_state_variables): New.
7871 (upload_fast_traceframes): New.
7872 (IPA_FIRST_TRACEFRAME): New.
7873 (IPA_NEXT_TRACEFRAME_1): New.
7874 (IPA_NEXT_TRACEFRAME): New.
7875 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7876 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7877 (gdb_jump_pad_buffer_end): New.
7878 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7879 (initialize_tracepoint): Adjust.
7880 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7881 buffer. Initialize the low module.
7882 * utils.c (PREFIX, TOOLNAME): New.
7883 (malloc_failure): Use PREFIX.
7884 (error): In the IPA, an error causes an exit.
7885 (fatal, warning): Use PREFIX.
7886 (internal_error): Use TOOLNAME.
7887 (NUMCELLS): Increase to 10.
7888 * configure, config.in: Regenerate.
7889
7890 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7891
7892 * server.c (handle_query) <qSupported>: Do two passes over the
7893 qSupported string to avoid nesting strtok.
7894
7895 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7896
7897 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7898 (CDEPS): New.
7899 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7900 -Wl,--dynamic-list.
7901 * configure: Regenerate.
7902 * proc-service.list: New.
7903
7904 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7905
7906 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7907 New comment.
7908
7909 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
7910
7911 * gdbreplay.c (remote_open): Check error return from socket() call by
7912 its equality to -1 not by it being negative.
7913 * remote-utils.c (remote_open): Likewise.
7914
7915 2010-05-23 Pedro Alves <pedro@codesourcery.com>
7916
7917 * config.h: Regenerate.
7918
7919 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7920
7921 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7922 doesn't provide PTRACE_GET_THREAD_AREA.
7923
7924 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7925
7926 * linux-m68k-low.c: Include <asm/ptrace.h>
7927 (ps_get_thread_area): Implement.
7928
7929 2010-05-03 Doug Evans <dje@google.com>
7930
7931 * event-loop.c (struct callback_event): New struct.
7932 (callback_list): New global.
7933 (append_callback_event, delete_callback_event): New functions.
7934 (process_callback): New function.
7935 (start_event_loop): Call it.
7936 * remote-utils.c (NOT_SCHEDULED): Define.
7937 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
7938 moved out of readchar.
7939 (readchar): Rewrite. Call reschedule before returning.
7940 (reset_readchar): New function.
7941 (remote_close): Call it.
7942 (process_remaining, reschedule): New functions.
7943 * server.h (callback_handler_func): New typedef.
7944 (append_callback_event, delete_callback_event): Declare.
7945
7946 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7947
7948 * proc-service.c (ps_pglobal_lookup): Use
7949 thread_db_look_up_one_symbol.
7950 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
7951 parameter. Use it instead of all_symbols_looked_up.
7952 * server.h (struct process_info) <all_symbols_looked_up>: Delete
7953 field.
7954 (all_symbols_looked_up): Don't declare.
7955 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
7956 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
7957 field.
7958 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
7959 Set all_symbols_looked_up here.
7960 (thread_db_look_up_one_symbol): New.
7961 (thread_db_get_tls_address): Adjust.
7962 (thread_db_load_search, try_thread_db_load_1): Always allocate the
7963 thread_db object on the heap, and tentatively set it in the
7964 process structure.
7965 (thread_db_init): Don't set all_symbols_looked_up here.
7966 * linux-low.h (thread_db_look_up_one_symbol): Declare.
7967
7968 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7969
7970 * linux-low.c (linux_kill, linux_detach): Adjust.
7971 (status_pending_p_callback): Remove redundant statement. Check
7972 for !TARGET_WAITIKIND_IGNORE, instead of
7973 TARGET_WAITKIND_STOPPED.
7974 (handle_tracepoints): Make sure LWP is locked. Adjust.
7975 (linux_wait_for_event_1): Adjust.
7976 (linux_cancel_breakpoints): New.
7977 (unsuspend_one_lwp): New.
7978 (unsuspend_all_lwps): New.
7979 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
7980 (send_sigstop_callback): Change return type to int, add new
7981 `except' parameter and handle it.
7982 (suspend_and_send_sigstop_callback): New.
7983 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
7984 pass them down. If SUSPEND, also increment the lwp's suspend
7985 count.
7986 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
7987 (need_step_over_p): Don't consider suspended LWPs.
7988 (start_step_over): Adjust.
7989 (proceed_one_lwp): Change return type to int, add new `except'
7990 parameter and handle it.
7991 (unsuspend_and_proceed_one_lwp): New.
7992 (proceed_all_lwps): Use find_inferior instead of
7993 for_each_inferior.
7994 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
7995 also decrement the suspend count of LWPs. Pass `except' down,
7996 instead of hacking its suspend count.
7997 (linux_pause_all): Add `freeze' parameter. Adjust.
7998 (linux_unpause_all): New.
7999 (linux_target_ops): Install linux_unpause_all.
8000 * server.c (handle_status): Adjust.
8001 * target.h (struct target_ops): New fields `unpause_all' and
8002 `cancel_breakpoints'. Add new parameter to `pause_all'.
8003 (pause_all): Add new `freeze' parameter.
8004 (unpause_all): New.
8005 (cancel_breakpoints): New.
8006 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8007 cancel breakpoints.
8008 (cmd_qtstart): Pause threads.
8009 (stop_tracing): Pause threads, and cancel breakpoints.
8010 * win32-low.c (win32_target_ops): Adjust.
8011
8012 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8013
8014 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8015 the inferior right away from here...
8016 (linux_wait_1): ... to here, and adjust to check the thread's
8017 last_resume_kind instead of the lwp's step or stop_expected flags.
8018
8019 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8020
8021 * README: Use consistent `GDB' and `GDBserver' spellings.
8022
8023 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8024
8025 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8026 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8027 (linux_detach_one_lwp): Assume the lwp is stopped.
8028 (any_thread_of): Delete.
8029 (linux_detach): Stop all lwps here. Don't blindly delete all
8030 breakpoints.
8031 (delete_lwp_callback): New.
8032 (linux_mourn): Delete all lwps of the process that is gone.
8033 (linux_wait_1): Don't delete the last lwp of the process here.
8034 * mem-break.h (mark_breakpoints_out): Declare.
8035 * mem-break.c (mark_breakpoints_out): New.
8036 (free_all_breakpoints): Use it.
8037 * server.c (handle_target_event): If the process is gone, mark
8038 breakpoints out.
8039 * thread-db.c (struct thread_db) <create_bp>: New field.
8040 (thread_db_enable_reporting): Fix prototype. Store a thread event
8041 breakpoint reference in the thread_db struct.
8042 (thread_db_load_search): Clear the thread_db object.
8043 (try_thread_db_load_1): Ditto.
8044 (switch_to_process): New.
8045 (disable_thread_event_reporting): Use it.
8046 (remove_thread_event_breakpoints): New.
8047 (thread_db_detach, thread_db_mourn): Use it.
8048
8049 2010-05-01 Pedro Alves <pedro@codesourcery.com>
8050
8051 * linux-low.c (linux_enable_event_reporting): New.
8052 (linux_wait_for_event_1, handle_extended_wait): Use it.
8053
8054 2010-04-30 Pedro Alves <pedro@codesourcery.com>
8055
8056 * linux-low.c (linux_kill_one_lwp, linux_kill)
8057 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8058 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8059 SIGSTOP even if the LWP is stopped.
8060 (send_sigstop_callback): New.
8061 (stop_all_lwps): Use send_sigstop_callback instead.
8062 (linux_resume_one_thread): Adjust.
8063 (proceed_one_lwp): Still proceed an LWP that the client has
8064 requested to stop, if we haven't reported it as stopped yet. Make
8065 sure that LWPs the client want stopped, have a pending SIGSTOP.
8066
8067 2010-04-26 Doug Evans <dje@google.com>
8068
8069 * server.c (handle_general_set): Make static.
8070
8071 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8072 Print received char after testing for error/eof instead of before.
8073 (input_interrupt): Tweak comment.
8074
8075 2010-04-23 Doug Evans <dje@google.com>
8076
8077 * server.c (start_inferior): Print inferior argv if --debug.
8078
8079 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8080
8081 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8082 * nto-x86-low.c: Include server.h
8083
8084 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8085
8086 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8087 be consistent with other sources of this directory.
8088 (init_registers_amd64): Correct name of source file of this function
8089 in the comment.
8090
8091 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8092
8093 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8094 64-bit executables.
8095
8096 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8097
8098 * win32-i386-low.c: Add 64-bit support.
8099 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8100 (init_registers_amd64): Declare.
8101 (mappings): Add 64-bit version of array.
8102 (init_windows_x86): New function.
8103 (the_low_target): Change init_arch field to init_windows_x86.
8104
8105 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8106
8107 * win32-low.c: Adapt to support also 64-bit architecture.
8108 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8109 (get_image_name): Use SIZE_T type for local variable `done'.
8110 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8111 (toolhelp_get_dll_name): Idem.
8112 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8113 Use uintptr_t typecast to avoid warning.
8114 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8115 (handle_exception): Use phex_nz to avoid warning.
8116 (win32_wait): Remove unused local variable `process'.
8117
8118 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8119
8120 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8121 `amd64-avx.o'.
8122
8123 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8124
8125 * configure.ac: Use `ws2_32' library for srv_mingw.
8126 * configure: Regenerate.
8127 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8128 * remote-utils.c: Likewise.
8129
8130 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8131
8132 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8133 if __x86_64__ is defined.
8134
8135 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8136
8137 * configure: Regenerate.
8138
8139 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8140
8141 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8142 * target.h (target_ops): New get_tib_address field.
8143 * win32-low.h (win32_thread_info): Add thread_local_base field.
8144 * win32-low.c (child_add_thread): Add tlb argument.
8145 Set thread_local_base field to TLB.
8146 (get_child_debug_event): Adapt to child_add_thread change.
8147 (win32_get_tib_address): New function.
8148 (win32_target_ops): Set get_tib_address field to
8149 win32_get_tib_address.
8150 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8151
8152 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8153
8154 * linux-low.c (linux_mourn): Also remove the process.
8155 * server.c (handle_target_event): Don't remove the process here.
8156 * nto-low.c (nto_mourn): New.
8157 (nto_target_ops): Install it.
8158 * spu-low.c (spu_mourn): New.
8159 (spu_target_ops): Install it.
8160 * win32-low.c (win32_mourn): New.
8161 (win32_target_ops): Install it.
8162
8163 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8164
8165 * server.h (buffer_xml_printf): Remove redundant `;'.
8166
8167 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8168
8169 * regcache.c (set_register_cache): Invalidate regcaches before
8170 changing the register cache layout.
8171 (regcache_invalidate_one): Allow a NULL regcache.
8172 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8173 regcaches before changing the register cache layout or the target
8174 regsets.
8175
8176 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8177
8178 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8179 variable warning on Linux/x86-64.
8180
8181 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8182
8183 GDBserver disconnected tracing support.
8184
8185 * linux-low.c (linux_remove_process): Delete.
8186 (add_lwp): Don't set last_resume_kind here.
8187 (linux_kill): Use `mourn'.
8188 (linux_detach): Use `thread_db_detach', and `mourn'.
8189 (linux_mourn): New.
8190 (linux_attach_lwp_1): Adjust comment.
8191 (linux_attach): last_resume_kind moved the thread_info; adjust.
8192 (status_pending_p_callback): Adjust.
8193 (linux_wait_for_event_1): Adjust.
8194 (count_events_callback, select_singlestep_lwp_callback)
8195 (select_event_lwp_callback, cancel_breakpoints_callback)
8196 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8197 (proceed_one_lwp): Adjust.
8198 (linux_async): Add debug output.
8199 (linux_thread_stopped): New.
8200 (linux_pause_all): New.
8201 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8202 linux_pause_all.
8203 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8204 (thread_db_free): Delete declaration.
8205 (thread_db_detach, thread_db_mourn): Declare.
8206 * thread-db.c (thread_db_init): Use thread_db_mourn.
8207 (thread_db_free): Delete, split in two.
8208 (disable_thread_event_reporting): New.
8209 (thread_db_detach): New.
8210 (thread_db_mourn): New.
8211
8212 * server.h (struct thread_info) <last_resume_kind>: New field.
8213 <attached>: Add comment.
8214 <gdb_detached>: New field.
8215 (handler_func): Change return type to int.
8216 (handle_serial_event, handle_target_event): Ditto.
8217 (gdb_connected): Declare.
8218 (tracing): Delete.
8219 (disconnected_tracing): Declare.
8220 (stop_tracing): Declare.
8221
8222 * server.c (handle_query) <qSupported>: Report support for
8223 disconnected tracing.
8224 (queue_stop_reply_callback): Account for running threads.
8225 (gdb_wants_thread_stopped): New.
8226 (gdb_wants_all_threads_stopped): New.
8227 (gdb_reattached_process): New.
8228 (handle_status): Clear the `gdb_detached' flag of all processes.
8229 In all-stop, stop all threads.
8230 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8231 (process_serial_event): If the remote connection breaks, or if an
8232 exit was forced with "monitor exit", force an event loop exit.
8233 Handle disconnected tracing on detach.
8234 (handle_serial_event): Adjust.
8235 (handle_target_event): If GDB isn't connected, forward events back
8236 to the inferior, unless the last process exited, in which case,
8237 exit gdbserver. Adjust interface.
8238
8239 * remote-utils.c (remote_open): Don't block in accept. Instead
8240 register an event loop source on the listen socket file
8241 descriptor. Refactor bits into ...
8242 (listen_desc): ... this new global.
8243 (gdb_connected): ... this new function.
8244 (enable_async_notification): ... this new function.
8245 (handle_accept_event): ... this new function.
8246 (remote_close): Clear remote_desc.
8247
8248 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8249
8250 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8251 New fields.
8252 (mourn_inferior): Define.
8253 (target_process_qsupported): Avoid the dangling else problem.
8254 (thread_stopped): Define.
8255 (pause_all): Define.
8256 (target_waitstatus_to_string): Declare.
8257 * target.c (target_waitstatus_to_string): New.
8258
8259 * tracepoint.c (tracing): Make extern.
8260 (disconnected_tracing): New.
8261 (stop_tracing): Make extern. Handle tracing stops due to GDB
8262 disconnecting.
8263 (cmd_qtdisconnected): New.
8264 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8265 (handle_tracepoint_general_set): Handle QTDisconnected.
8266
8267 * event-loop.c (event_handler_func): Change return type to int.
8268 (process_event): Bail out if the event handler wants the event
8269 loop to stop.
8270 (handle_file_event): Ditto.
8271 (start_event_loop): Bail out if the event handler wants the event
8272 loop to stop.
8273
8274 * nto-low.c (nto_target_ops): Adjust.
8275 * spu-low.c (spu_wait): Don't remove the process here.
8276 (spu_target_ops): Adjust.
8277 * win32-low.c (win32_wait): Don't remove the process here.
8278 (win32_target_ops): Adjust.
8279
8280 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8281
8282 * regcache.c (realloc_register_cache): Invalidate inferior's
8283 regcache before recreating it.
8284
8285 2010-04-09 Pedro Alves <pedro@codesourcery.com>
8286
8287 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8288
8289 2010-04-09 Stan Shebs <stan@codesourcery.com>
8290 Pedro Alves <pedro@codesourcery.com>
8291
8292 * server.h (LONGEST): New.
8293 (struct thread_info) <while_stepping>: New field.
8294 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8295 Declare.
8296 (initialize_tracepoint, handle_tracepoint_general_set)
8297 (handle_tracepoint_query, tracepoint_finished_step)
8298 (tracepoint_was_hit, release_while_stepping_state_list):
8299 (current_traceframe): Declare.
8300 * server.c (handle_general_set): Handle tracepoint packets.
8301 (read_memory): New.
8302 (write_memory): New.
8303 (handle_search_memory_1): Use read_memory.
8304 (handle_query): Report support for conditional tracepoints, trace
8305 state variables, and tracepoint sources. Handle tracepoint
8306 queries.
8307 (main): Initialize the tracepoints module.
8308 (process_serial_event): Handle traceframe reads/writes.
8309
8310 * linux-low.c (handle_tracepoints): New.
8311 (linux_wait_1): Call it.
8312 (linux_resume_one_lwp): Handle while-stepping.
8313 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8314 (linux_target_ops): Install them.
8315 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8316 New field.
8317 * linux-x86-low.c (x86_supports_tracepoints): New.
8318 (the_low_target). Install it.
8319
8320 * mem-break.h (delete_breakpoint): Declare.
8321 * mem-break.c (delete_breakpoint): Make external.
8322
8323 * target.h (struct target_ops): Add `supports_tracepoints',
8324 `read_pc', and `write_pc' fields.
8325 (target_supports_tracepoints): Define.
8326 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8327 (phex_nz): New.
8328
8329 * regcache.h (struct regcache) <registers_owned>: New field.
8330 (init_register_cache, regcache_cpy): Declare.
8331 (regcache_read_pc, regcache_write_pc): Declare.
8332 (register_cache_size): Declare.
8333 (supply_regblock): Declare.
8334 * regcache.c (init_register_cache): New.
8335 (new_register_cache): Use it.
8336 (regcache_cpy): New.
8337 (register_cache_size): New.
8338 (supply_regblock): New.
8339 (regcache_read_pc, regcache_write_pc): New.
8340
8341 * tracepoint.c: New.
8342
8343 * Makefile.in (OBS): Add tracepoint.o.
8344 (tracepoint.o): New rule.
8345
8346 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8347
8348 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8349 (i386-mmx.o): New.
8350 (i386-mmx.c): Likewise.
8351 (i386-mmx-linux.o): Likewise.
8352 (i386-mmx-linux.c): Likewise.
8353
8354 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8355 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8356 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8357 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8358
8359 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8360 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8361 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8362
8363 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8364
8365 * Makefile.in (clean): Updated.
8366 (i386-avx.o): New.
8367 (i386-avx.c): Likewise.
8368 (i386-avx-linux.o): Likewise.
8369 (i386-avx-linux.c): Likewise.
8370 (amd64-avx.o): Likewise.
8371 (amd64-avx.c): Likewise.
8372 (amd64-avx-linux.o): Likewise.
8373 (amd64-avx-linux.c): Likewise.
8374
8375 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8376 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8377 (srv_amd64_regobj): Add amd64-avx.o.
8378 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8379 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8380 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8381 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8382 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8383 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8384 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8385
8386 * i387-fp.c: Include "i386-xstate.h".
8387 (i387_xsave): New.
8388 (i387_cache_to_xsave): Likewise.
8389 (i387_xsave_to_cache): Likewise.
8390 (x86_xcr0): Likewise.
8391
8392 * i387-fp.h (i387_cache_to_xsave): Likewise.
8393 (i387_xsave_to_cache): Likewise.
8394 (x86_xcr0): Likewise.
8395
8396 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8397 * linux-crisv32-low.c (target_regsets): Likewise.
8398 * linux-m68k-low.c (target_regsets): Likewise.
8399 * linux-mips-low.c (target_regsets): Likewise.
8400 * linux-ppc-low.c (target_regsets): Likewise.
8401 * linux-s390-low.c (target_regsets): Likewise.
8402 * linux-sh-low.c (target_regsets): Likewise.
8403 * linux-sparc-low.c (target_regsets): Likewise.
8404 * linux-xtensa-low.c (target_regsets): Likewise.
8405
8406 * linux-low.c: Include <sys/uio.h>.
8407 (regsets_fetch_inferior_registers): Support nt_type.
8408 (regsets_store_inferior_registers): Likewise.
8409 (linux_process_qsupported): New.
8410 (linux_target_ops): Add linux_process_qsupported.
8411
8412 * linux-low.h (regset_info): Add nt_type.
8413 (linux_target_ops): Add process_qsupported.
8414
8415 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8416 and <sys/uio.h>.
8417 (init_registers_i386_avx_linux): New.
8418 (init_registers_amd64_avx_linux): Likewise.
8419 (xmltarget_i386_linux_no_xml): Likewise.
8420 (xmltarget_amd64_linux_no_xml): Likewise.
8421 (PTRACE_GETREGSET): Likewise.
8422 (PTRACE_SETREGSET): Likewise.
8423 (x86_fill_xstateregset): Likewise.
8424 (x86_store_xstateregset): Likewise.
8425 (use_xml): Likewise.
8426 (x86_linux_update_xmltarget): Likewise.
8427 (x86_linux_process_qsupported): Likewise.
8428 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8429 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8430 init_registers_i386_linux here. Call
8431 x86_linux_update_xmltarget.
8432 (the_low_target): Add x86_linux_process_qsupported.
8433
8434 * server.c (handle_query): Call target_process_qsupported.
8435
8436 * target.h (target_ops): Add process_qsupported.
8437 (target_process_qsupported): New.
8438
8439 2010-04-03 Pedro Alves <pedro@codesourcery.com>
8440
8441 * inferiors.c (add_thread): Set last_status kind to
8442 TARGET_WAITKIND_IGNORE.
8443 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8444 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8445 (linux_wait_1): Move `thread' local definition to block that uses
8446 it. Don't NULL initialize `event_child'.
8447 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8448 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8449 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8450
8451 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8452
8453 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8454 an extended waitstatus, or by a watchpoint.
8455 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8456 thread was stepping or has been stopped by a watchpoint.
8457
8458 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8459
8460 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8461 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8462 of another, then delete the previous, and validate all
8463 breakpoints.
8464 (validate_inserted_breakpoint): New.
8465 (delete_disabled_breakpoints): New.
8466 (validate_breakpoints): New.
8467 (check_mem_read): Validate breakpoints before trusting their
8468 shadow. Delete disabled breakpoints.
8469 (check_mem_write): Validate breakpoints before trusting they
8470 should be inserted. Delete disabled breakpoints.
8471 * mem-break.h (validate_breakpoints):
8472 * server.c (handle_query): Validate breakpoints when we see a
8473 qSymbol query.
8474
8475 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8476
8477 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8478 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8479 if we could tell there's a GDB breakpoint at stop_pc.
8480 (need_step_over_p): Don't do a step over if we find a GDB
8481 breakpoint at the resume PC.
8482
8483 * mem-break.c (struct raw_breakpoint): New.
8484 (enum bkpt_type): New type `gdb_breakpoint'.
8485 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8486 fields. New field `raw'.
8487 (find_raw_breakpoint_at): New.
8488 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8489 breakpoint instead.
8490 (set_breakpoint_at): Adjust.
8491 (delete_raw_breakpoint): New.
8492 (release_breakpoint): New.
8493 (delete_breakpoint): Rename to...
8494 (delete_breakpoint_1): ... this. Add proc parameter. Use
8495 release_breakpoint. Return ENOENT.
8496 (delete_breakpoint): Reimplement.
8497 (find_breakpoint_at): Delete.
8498 (find_gdb_breakpoint_at): New.
8499 (delete_breakpoint_at): Delete.
8500 (set_gdb_breakpoint_at): New.
8501 (delete_gdb_breakpoint_at): New.
8502 (gdb_breakpoint_here): New.
8503 (set_reinsert_breakpoint): Use release_breakpoint.
8504 (uninsert_breakpoint): Rename to ...
8505 (uninsert_raw_breakpoint): ... this.
8506 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8507 (reinsert_raw_breakpoint): Change parameter type to
8508 raw_breakpoint.
8509 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8510 instead.
8511 (check_breakpoints): Adjust. Use release_breakpoint.
8512 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8513 (breakpoint_inserted_here): Ditto.
8514 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8515 Don't trust the breakpoint's shadow if it is not inserted.
8516 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8517 (delete_all_breakpoints): Adjust.
8518 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8519 use delete_breakpoint_1.
8520
8521 * mem-break.h (breakpoints_supported): Delete declaration.
8522 (set_gdb_breakpoint_at): Declare.
8523 (gdb_breakpoint_here): Declare.
8524 (delete_breakpoint_at): Delete.
8525 (delete_gdb_breakpoint_at): Declare.
8526
8527 * server.h (struct raw_breakpoint): Forward declare.
8528 (struct process_info): New field `raw_breakpoints'.
8529
8530 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8531 breakpoints.
8532
8533 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8534
8535 * linux-low.c (status_pending_p_callback): Fix comment.
8536 (linux_wait_for_event_1): Move most of the internal breakpoint
8537 handling from here...
8538 (linux_wait_1): ... to here.
8539 (count_events_callback): New.
8540 (select_singlestep_lwp_callback): New.
8541 (select_event_lwp_callback): New.
8542 (cancel_breakpoints_callback): New.
8543 (select_event_lwp): New.
8544 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8545 priority to all LWPs that have had events that should be reported
8546 to the client. Cancel breakpoints when about to reporting the
8547 event to the client, not while stopping lwps. No longer cancel
8548 finished single-steps here.
8549 (cancel_finished_single_step): Delete.
8550 (cancel_finished_single_steps): Delete.
8551
8552 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8553
8554 * mem-break.c (enum bkpt_type): New.
8555 (struct breakpoint): New field `type'.
8556 (set_breakpoint_at): Change return type to struct breakpoint
8557 pointer. Set type to `other_breakpoint' by default.
8558 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8559 in the breakpoint list.
8560 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8561 (reinsert_breakpoint): Rename to ...
8562 (reinsert_raw_breakpoint): ... this.
8563 (reinsert_breakpoints_at): Adjust.
8564 * mem-break.h (struct breakpoint): Declare.
8565 (set_breakpoint_at): Change return type to struct breakpoint
8566 pointer.
8567
8568 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8569
8570 * server.c (handle_query): Assign, not compare.
8571
8572 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8573
8574 Teach linux gdbserver to step-over-breakpoints.
8575
8576 * linux-low.c (can_hardware_single_step): New.
8577 (supports_breakpoints): New.
8578 (handle_extended_wait): If stopping threads, read the stop pc of
8579 the new cloned LWP.
8580 (get_pc): New.
8581 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8582 low target doesn't support retrieving the PC.
8583 (add_lwp): Set last_resume_kind to resume_continue.
8584 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8585 (linux_attach): Don't clear stop_expected. Set the lwp's
8586 last_resume_kind to resume_stop.
8587 (linux_detach_one_lwp): Don't check for removed breakpoints.
8588 (check_removed_breakpoint): Delete.
8589 (status_pending_p): Rename to ...
8590 (status_pending_p_callback): ... this. Don't check for removed
8591 breakpoints. Don't consider threads that are stopped from GDB's
8592 perspective.
8593 (linux_wait_for_lwp): Always read the stop_pc here.
8594 (cancel_breakpoint): New.
8595 (step_over_bkpt): New global.
8596 (linux_wait_for_event_1): Implement stepping over breakpoints.
8597 (gdb_wants_lwp_stopped): New.
8598 (gdb_wants_all_stopped): New.
8599 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8600 single-step traps here. Store the thread's last reported target
8601 wait status.
8602 (send_sigstop): Don't clear stop_expected. Always set it,
8603 instead.
8604 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8605 (cancel_finished_single_step): New.
8606 (cancel_finished_single_steps): New.
8607 (wait_for_sigstop): Don't cancel finished single-step traps here.
8608 (linux_resume_one_lwp): Don't check for removed breakpoints.
8609 Don't set `step' on non-hardware step archs.
8610 (linux_set_resume_request): Ignore resume_stop requests if already
8611 stopping or stopped. Set the lwp's last_resume_kind.
8612 (resume_status_pending_p): Don't check for removed breakpoints.
8613 (need_step_over_p): New.
8614 (start_step_over): New.
8615 (finish_step_over): New.
8616 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8617 requests. Clear the thread's last reported target waitstatus.
8618 Don't use the `suspended' flag. Don't consider pending breakpoints.
8619 (linux_resume): Start a step-over if necessary.
8620 (proceed_one_lwp): New.
8621 (proceed_all_lwps): New.
8622 (unstop_all_lwps): New.
8623 * linux-low.h (struct lwp_info): Rewrite comment for the
8624 `suspended' flag. Add the `stop_pc' field. Delete the
8625 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8626 Add `'last_resume_kind' and `need_step_over' fields.
8627 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8628 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8629 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8630 (set_raw_breakpoint_at): New.
8631 (set_breakpoint_at): Rewrite to use it.
8632 (reinsert_breakpoint_handler): Delete.
8633 (set_reinsert_breakpoint): New.
8634 (reinsert_breakpoint_by_bp): Delete.
8635 (delete_reinsert_breakpoints): New.
8636 (uninsert_breakpoint): Rewrite.
8637 (uninsert_breakpoints_at): New.
8638 (reinsert_breakpoint): Rewrite.
8639 (reinsert_breakpoints_at): New.
8640 (check_breakpoints): Rewrite.
8641 (breakpoint_here): New.
8642 (breakpoint_inserted_here): New.
8643 (check_mem_read): Adjust.
8644 * mem-break.h (breakpoints_supported, breakpoint_here)
8645 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8646 (reinsert_breakpoint_by_bp): Delete declaration.
8647 (delete_reinsert_breakpoints): Declare.
8648 (reinsert_breakpoint): Delete declaration.
8649 (reinsert_breakpoints_at): Declare.
8650 (uninsert_breakpoint): Delete declaration.
8651 (uninsert_breakpoints_at): Declare.
8652 (check_breakpoints): Adjust prototype.
8653 * server.h: Adjust include order.
8654 (struct thread_info): Declare here. Add a `last_status' field.
8655
8656 2010-03-23 Michael Snyder <msnyder@vmware.com>
8657
8658 * server.c (crc32): New function.
8659 (handle_query): Add handling for 'qCRC:' request.
8660
8661 2010-03-23 Pedro Alves <pedro@codesourcery.com>
8662
8663 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8664 lwp had been stopped by a watchpoint.
8665
8666 2010-03-16 Pedro Alves <pedro@codesourcery.com>
8667
8668 * server.h (internal_error): Declare.
8669 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8670 * utils.c (internal_error): New function.
8671
8672 2010-03-15 Andreas Schwab <schwab@redhat.com>
8673
8674 * configure.srv: Fix typo setting srv_regobj.
8675
8676 2010-03-15 Pedro Alves <pedro@codesourcery.com>
8677
8678 * linux-low.c (fetch_register): Avoid passing a non string literal
8679 format to `error'.
8680 (usr_store_inferior_registers): Ditto.
8681
8682 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8683
8684 * linux-low.c (linux_write_memory): Bail out early if peeking
8685 memory failed.
8686
8687 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8688
8689 * linux-low.h (struct lwp_info): New fields
8690 `stopped_by_watchpoint' and `stopped_data_address'.
8691 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8692 here, and cache them in the lwp object.
8693 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8694 directly.
8695 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8696 field.
8697 (linux_stopped_by_watchpoint): Rewrite.
8698 (linux_stopped_data_address): Rewrite.
8699
8700 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
8701
8702 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8703 switching the current inferior, not before.
8704
8705 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8706
8707 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8708 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8709 i386-linux.c and amd64-linux.c.
8710 (reg-i386.o): Removed.
8711 (reg-i386.c): Likewise.
8712 (reg-i386-linux.o): Likewise.
8713 (reg-i386-linux.c): Likewise.
8714 (reg-x86-64.o): Likewise.
8715 (reg-x86-64.c): Likewise.
8716 (reg-x86-64-linux.o): Likewise.
8717 (reg-x86-64-linux.c): Likewise.
8718 (i386.o): New.
8719 (i386.c): Likewise.
8720 (i386-linux.o): Likewise.
8721 (i386-linux.c): Likewise.
8722 (amd64.o): Likewise.
8723 (amd64.c): Likewise.
8724 (amd64-linux.o): Likewise.
8725 (amd64-linux.c): Likewise.
8726
8727 * configure.srv (srv_i386_regobj): New.
8728 (srv_i386_linux_regobj): Likewise.
8729 (srv_amd64_regobj): Likewise.
8730 (srv_amd64_linux_regobj): Likewise.
8731 (srv_i386_32bit_xmlfiles): Likewise.
8732 (srv_i386_64bit_xmlfiles): Likewise.
8733 (srv_i386_xmlfiles): Likewise.
8734 (srv_amd64_xmlfiles): Likewise.
8735 (srv_i386_linux_xmlfiles): Likewise.
8736 (srv_amd64_linux_xmlfiles): Likewise.
8737 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8738 srv_xmlfiles to $srv_i386_xmlfiles.
8739 (i[34567]86-*-mingw32ce*): Likewise.
8740 (i[34567]86-*-mingw*): Likewise.
8741 (i[34567]86-*-nto*): Likewise.
8742 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8743 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8744 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8745 (x86_64-*-linux*): Likewise.
8746
8747 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8748 (init_registers_amd64_linux): New.
8749 (x86_arch_setup): Replace init_registers_x86_64_linux with
8750 init_registers_amd64_linux.
8751
8752 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8753
8754 * configure.ac: Check for libdl. If it is not available link against
8755 static libthread_db.
8756 * configure: Regenerate.
8757
8758 2010-02-22 Pedro Alves <pedro@codesourcery.com>
8759
8760 PR9605
8761
8762 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8763 handing a read watchpoint.
8764 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8765
8766 2010-02-12 Doug Evans <dje@google.com>
8767
8768 * linux-low.c (linux_supports_tracefork_flag): Document.
8769 (linux_look_up_symbols): Add comment.
8770
8771 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8772
8773 * regcache.c (supply_register): Clear regcache if buf is NULL.
8774
8775 2010-02-02 Nicolas Roche <roche@sourceware.org>
8776 Joel Brobecker <brobecker@adacore.com>
8777
8778 * inferiors.c (find_inferior): Add function documentation.
8779 (unloaded_dll): Handle the case where the unloaded dll has not
8780 been previously registered in the dll list.
8781
8782 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8783
8784 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8785 (thumb2_breakpoint): New.
8786 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8787
8788 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8789
8790 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8791 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8792 breakpoints.
8793
8794 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8795
8796 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8797
8798 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8799
8800 * linux-s390-low.c (s390_collect_ptrace_register)
8801 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8802
8803 2010-01-21 Doug Evans <dje@google.com>
8804
8805 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8806 (PTRACE_ARG4_TYPE): New macro.
8807 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8808 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8809 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8810 (usr_store_inferior_registers): Ditto.
8811 (linux_read_memory, linux_write_memory): Ditto.
8812 (linux_test_for_tracefork): Ditto.
8813
8814 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8815 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8816
8817 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8818
8819 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8820 target.
8821
8822 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8823
8824 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8825 prototype to take a regcache. Adjust.
8826
8827 2010-01-20 Pedro Alves <pedro@codesourcery.com>
8828
8829 * regcache.h (struct thread_info): Forward declare.
8830 (struct regcache): New.
8831 (new_register_cache): Adjust prototype.
8832 (get_thread_regcache): Declare.
8833 (free_register_cache): Adjust prototype.
8834 (registers_to_string, registers_from_string): Ditto.
8835 (supply_register, supply_register_by_name, collect_register)
8836 (collect_register_as_string, collect_register_by_name): Ditto.
8837 * regcache.c (struct inferior_regcache_data): Delete.
8838 (get_regcache): Rename to ...
8839 (get_thread_regcache): ... this. Adjust. Switch inferior before
8840 fetching registers.
8841 (regcache_invalidate_one): Adjust.
8842 (regcache_invalidate): Fix prototype.
8843 (new_register_cache): Return the new register cache.
8844 (free_register_cache): Change prototype.
8845 (realloc_register_cache): Adjust.
8846 (registers_to_string): Change prototype to take a regcache. Adjust.
8847 (registers_from_string): Ditto.
8848 (register_data): Ditto.
8849 (supply_register): Ditto.
8850 (supply_register_by_name): Ditto.
8851 (collect_register): Ditto.
8852 (collect_register_as_string): Ditto.
8853 (collect_register_by_name): Ditto.
8854 * server.c (process_serial_event): Adjust.
8855 * linux-low.h (regset_fill_func, regset_store_func): Change
8856 prototype.
8857 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8858 Change prototype.
8859 * linux-low.c (get_stop_pc): Adjust.
8860 (check_removed_breakpoint): Adjust.
8861 (linux_wait_for_event): Adjust.
8862 (linux_resume_one_lwp): Adjust.
8863 (fetch_register): Add regcache parameter. Adjust.
8864 (usr_store_inferior_registers): Ditto.
8865 (regsets_fetch_inferior_registers): Ditto.
8866 (regsets_store_inferior_registers): Ditto.
8867 (linux_fetch_registers, linux_store_registers): Ditto.
8868 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8869 regcache. Adjust.
8870 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8871 Ditto.
8872 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8873 prototype to take a regcache.
8874 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8875 * remote-utils.c (convert_ascii_to_int, outreg)
8876 (prepare_resume_reply): Change prototype to take a regcache.
8877 Adjust.
8878 * target.h (struct target_ops) <fetch_registers, store_registers>:
8879 Change prototype to take a regcache.
8880 (fetch_inferior_registers, store_inferior_registers): Change
8881 prototype to take a regcache. Adjust.
8882 * proc-service.c (ps_lgetregs): Adjust.
8883 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8884 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8885 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8886 take a regcache. Adjust.
8887 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8888 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8889 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8890 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8891 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8892 (cris_cannot_fetch_register):
8893 (cris_breakpoint_at): Change prototype to take a regcache.
8894 Adjust.
8895 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8896 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8897 to take a regcache. Adjust.
8898 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8899 Adjust.
8900 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8901 take a regcache. Adjust.
8902 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8903 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8904 (m68k_set_pc): Change prototype to take a regcache. Adjust.
8905 * linux-mips-low.c (mips_get_pc):
8906 (mips_set_pc): Change prototype to take a regcache. Adjust.
8907 (mips_reinsert_addr): Adjust.
8908 (mips_collect_register): Change prototype to take a regcache.
8909 Adjust.
8910 (mips_supply_register):
8911 (mips_collect_register_32bit, mips_supply_register_32bit)
8912 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8913 (mips_store_fpregset): Ditto.
8914 * linux-ppc-low.c (ppc_supply_ptrace_register)
8915 (ppc_supply_ptrace_register): Ditto.
8916 (parse_spufs_run): Adjust.
8917 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8918 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8919 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8920 take a regcache. Adjust.
8921 * linux-s390-low.c (s390_collect_ptrace_register)
8922 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8923 (s390_set_pc): Change prototype to take a regcache. Adjust.
8924 (s390_arch_setup): Adjust.
8925 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8926 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
8927 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8928 (sparc_fill_gregset, sparc_store_gregset_from_stack)
8929 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8930 regcache. Adjust.
8931 (sparc_breakpoint_at): Adjust.
8932 * linux-xtensa-low.c (xtensa_fill_gregset):
8933 (xtensa_store_gregset):
8934 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
8935 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
8936 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
8937 prototype to take a regcache. Adjust.
8938 * win32-arm-low.c (arm_fetch_inferior_register)
8939 (arm_store_inferior_register): Change prototype to take a
8940 regcache. Adjust.
8941 * win32-i386-low.c (i386_fetch_inferior_register)
8942 (i386_store_inferior_register): Change prototype to take a
8943 regcache. Adjust.
8944 * win32-low.c (child_fetch_inferior_registers)
8945 (child_store_inferior_registers): Change prototype to take a
8946 regcache. Adjust.
8947 (win32_wait): Adjust.
8948 (win32_fetch_inferior_registers): Change prototype to take a
8949 regcache. Adjust.
8950 (win32_store_inferior_registers): Adjust.
8951 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
8952 store_inferior_register>: Change prototype to take a regcache.
8953
8954 2010-01-20 Doug Evans <dje@google.com>
8955
8956 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
8957 #ifdef.
8958 (linux_wait_for_event1, linux_init_signals): Ditto.
8959 (W_STOPCODE): Provide definition if missing.
8960
8961 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
8962
8963 * linux-low.c (linux_core_of_thread): New.
8964 (compare_ints, show_process, list_threads): New.
8965 (linux_qxfer_osdata): Report threads and cores.
8966 (linux_target_op): Register linux_core_of_thread.
8967 * remote-utils.c (prepare_resume_reply): Report the core.
8968 (buffer_xml_printf): Support %d specifier.
8969 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
8970 New.
8971 (handle_query): Handle qXfer:threads. Announce availability
8972 thereof.
8973 * target.h (struct target_ops): New field core_of_thread.
8974
8975 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
8976
8977 * Makefile.in (clean): Remove new generated files.
8978 (reg-s390.o, reg-s390.c): Remove rules.
8979 (reg-s390x.o, reg-s390x.c): Likewise.
8980 (s390-linux32.o, s390-linux32.c): Add rules.
8981 (s390-linux64.o, s390-linux64.c): Likewise.
8982 (s390x-linux64.o, s390x-linux64.c): Likewise.
8983 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
8984 * linux-s390-low.c: Include <elf.h>.
8985 (HWCAP_S390_HIGH_GPRS): Define if undefined.
8986 (init_registers_s390): Remove prototype.
8987 (init_registers_s390x): Likewise.
8988 (init_registers_s390_linux32): Add prototype.
8989 (init_registers_s390_linux64): Likewise.
8990 (init_registers_s390x_linux64): Likewise.
8991 (s390_num_regs_3264): New define.
8992 (s390_regmap_3264): New global variable.
8993 (s390_cannot_fetch_register): Remove obsolete check.
8994 (s390_cannot_store_register): Likewise.
8995 (s390_collect_ptrace_register): Handle upper/lower register halves.
8996 (s390_supply_ptrace_register): Likewise.
8997 (s390_fill_gregset): Update to register number changes.
8998 (s390_get_hwcap): New routine.
8999 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9000 Install appropriate regmap and register set.
9001
9002 2010-01-01 Joel Brobecker <brobecker@adacore.com>
9003
9004 * server.c (gdbserver_version): Update copyright year to 2010.
9005 * gdbreplay.c (gdbreplay_version): Likewise.
9006
9007 2009-12-28 Doug Evans <dje@google.com>
9008
9009 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9010 elf/external.h. Include <elf.h> instead but only if necessary.
9011
9012 2009-12-28 Pedro Alves <pedro@codesourcery.com>
9013
9014 * linux-low.c (linux_remove_process): Remove `detaching'
9015 parameter. Don't release/detach from thread_db here.
9016 (linux_kill): Release/detach from thread_db here, ...
9017 (linux_detach): ... and here, before actually detaching.
9018 (linux_wait_1): ... and here, when a process exits.
9019 * thread-db.c (any_thread_of): New.
9020 (thread_db_free): Switch the current inferior to a thread of the
9021 passed in process.
9022
9023 2009-12-21 Doug Evans <dje@google.com>
9024
9025 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9026
9027 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9028 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9029 warning ifndef __NR_tkill. Move setting of errno there too.
9030 Delete unnecessary resetting of errno after syscall.
9031 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9032
9033 * configure.ac: Check for dladdr.
9034 * config.in: Regenerate.
9035 * configure: Regenerate.
9036 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9037 (try_thread_db_load): Update.
9038
9039 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9040
9041 2009-12-18 Doug Evans <dje@google.com>
9042
9043 * event-loop.c: Include unistd.h if it exists.
9044
9045 * linux-low.c (my_waitpid): Move definition away from being in
9046 between linux_tracefork_child/linux_test_for_tracefork.
9047
9048 * gdb_proc_service.h (psaddr_t): Fix type.
9049 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9050 signature to match glibc.
9051
9052 2009-12-16 Doug Evans <dje@google.com>
9053
9054 * linux-low.c (linux_read_memory): Fix argument to read.
9055
9056 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9057
9058 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9059 events, don't leave current_inferior pointing at null.
9060
9061 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9062
9063 * win32-low.c (LOG): Delete.
9064 (OUTMSG): Output to stderr.
9065 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9066 on compile time LOG macro.
9067 (win32_wait): Fix debug output.
9068
9069 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9070
9071 * win32-low.c (win32_add_one_solib): If the dll name is
9072 "ntdll.dll", prepend the system directory to the dll path.
9073
9074 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9075
9076 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9077
9078 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
9079 Vladimir Prus <vladimir@codesourcery.com>
9080
9081 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9082 * configure.ac: Check for __mcoldfire__ and set
9083 gdb_cv_m68k_is_coldfire.
9084 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9085 reg-cf.o and reg-m68k.o.
9086 * configure: Regenerated.
9087
9088 2009-11-16 Pedro Alves <pedro@codesourcery.com>
9089
9090 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9091 Pass it to thread_db_free.
9092 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9093 proper `detaching' argument to linux_remove_process.
9094 * linux-low.h (thread_db_free): Add `detaching' parameter.
9095 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9096 to thread_db_free.
9097 (thread_db_free): Add `detaching' parameter. Only
9098 call td_ta_clear_event if detaching from process.
9099
9100 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9101
9102 * thread-db.c (thread_db_free): Fix typo.
9103
9104 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9105
9106 PR gdb/10838
9107 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9108
9109 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9110
9111 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9112 with an i686 compiler.
9113 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9114 needed.
9115 * configure: Rebuilt.
9116
9117 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9118
9119 PR gdb/10783
9120
9121 * server.c (handle_search_memory_1): Correct read_addr initialization
9122 in loop for searching subsequent chunks.
9123
9124 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9125
9126 * configure.ac: New --with-libthread-db option.
9127 * thread-db.c: Allow direct dependence on libthread_db.
9128 (thread_db_free): Adjust.
9129 * config.in: Regenerate.
9130 * configure: Likewise.
9131
9132 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9133
9134 PR gdb/10757
9135 * thread-db.c (attach_thread): New function.
9136 (maybe_attach_thread): Return success/failure.
9137 (find_new_threads_callback): Adjust.
9138 (thread_db_find_new_threads): Loop until no new threads.
9139
9140 2009-10-13 Pedro Alves <pedro@codesourcery.com>
9141
9142 * proc-service.c (ps_lgetregs): Formatting.
9143
9144 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9145
9146 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9147 * configure.ac: Adjust.
9148 * linux-low.h (struct process_info_private): Move members to struct
9149 thread_db.
9150 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9151 * linux-low.c (linux_remove_process): Adjust.
9152 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9153 * server.c (handle_query): Move code ...
9154 (handle_monitor_command): ... here. New function.
9155 * target.h (struct target_ops): New member.
9156 * thread-db.c (struct thread_db): New.
9157 (libthread_db_search_path): New variable.
9158 (thread_db_create_event, thread_db_enable_reporting)
9159 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9160 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9161 (try_thread_db_load_1, dladdr_to_soname): New functions.
9162 (try_thread_db_load, thread_db_load_search): New functions.
9163 (thread_db_init): Search for libthread_db.
9164 (thread_db_free): New function.
9165 (thread_db_handle_monitor_command): Likewise.
9166 * config.in: Regenerate.
9167 * configure: Regenerate.
9168
9169 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9170
9171 * spu-low.c (spu_kill): Wait for inferior to terminate.
9172 Call clear_inferiors.
9173 (spu_detach): Call clear_inferiors.
9174
9175 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9176
9177 * aclocal.m4: Regenerate.
9178 * config.in: Likewise.
9179 * configure: Likewise.
9180
9181 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9182
9183 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9184 (parse_spufs_run): New function.
9185 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9186 (ppc_breakpoint_at): Handle SPU breakpoints.
9187
9188 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9189
9190 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9191 (SPUFS_MAGIC): Define.
9192 (spu_enumerate_spu_ids): New function.
9193 (linux_qxfer_spu): New function.
9194 (linux_target_ops): Install linux_qxfer_spu.
9195
9196 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9197
9198 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9199 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9200 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9201 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9202 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9203 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9204 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9205 (init_registers_powerpc_cell32l): Add prototype.
9206 (init_registers_powerpc_cell64l): Likewise.
9207 (ppc_arch_setup): Detect Cell/B.E. architecture.
9208
9209 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9210
9211 * Makefile.in (datarootdir): New variable.
9212
9213 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9214
9215 * linux-low.c (linux_write_memory): Update debugging output.
9216 * Makefile.in (clean): Add new descriptions.
9217 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9218 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9219 * configure.srv: Add new files for arm*-*-linux*.
9220 * linux-arm-low.c: Add new declarations.
9221 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9222 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9223 (HWCAP_VFPv3D16): New.
9224 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9225 instead of __IWMMXT__.
9226 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9227 (arm_arch_setup): New.
9228 (target_regsets): Remove #ifdef. Add VFP regset.
9229 (the_low_target): Use arm_arch_setup.
9230
9231 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9232
9233 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9234 the main thread again.
9235
9236 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9237
9238 Adding Neutrino gdbserver.
9239 * configure: Regenerated.
9240 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9241 * configure.srv (i[34567]86-*-nto*): New target.
9242 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9243 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9244 (nto_comctrl) [__QNX__]: New function.
9245 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9246
9247 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
9248
9249 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9250 srv_tgtobj.
9251
9252 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9253 Pedro Alves <pedro@codesourcery.com>
9254
9255 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9256 don't support CONTEXT_EXTENDED_REGISTERS.
9257 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9258 (the_low_target): Install them.
9259 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9260 failing with ERROR_PIPE_NOT_CONNECTED.
9261
9262 2009-06-30 Doug Evans <dje@google.com>
9263 Pierre Muller <muller@ics.u-strasbg.fr>
9264
9265 Add h/w watchpoint support to x86-linux, win32-i386.
9266 * Makefile.in (SFILES): Add i386-low.c
9267 (i386_low_h): Define.
9268 (i386-low.o): Add dependencies.
9269 (linux-x86-low.o): Add i386-low.h dependency.
9270 (win32-i386-low.o): Ditto.
9271 * i386-low.c: New file.
9272 * i386-low.h: New file.
9273 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9274 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9275 * linux-low.c (linux_add_process): Initialize arch_private.
9276 (linux_remove_process): Free arch_private.
9277 (add_lwp): Initialize arch_private.
9278 (delete_lwp): Free arch_private.
9279 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9280 provided.
9281 * linux-low.h (process_info_private): New member arch_private.
9282 (lwp_info): New member arch_private.
9283 (linux_target_ops): New members new_process, new_thread,
9284 prepare_to_resume.
9285 (ptid_of): New macro.
9286 * linux-x86-low.c: Include stddef.h, i386-low.h.
9287 (arch_process_info): New struct.
9288 (arch_lwp_info): New struct.
9289 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9290 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9291 (i386_dr_low_get_status): New function.
9292 (x86_insert_point, x86_remove_point): New functions.
9293 (x86_stopped_by_watchpoint): New function.
9294 (x86_stopped_data_address): New function.
9295 (x86_linux_new_process, x86_linux_new_thread): New functions.
9296 (x86_linux_prepare_to_resume): New function.
9297 (the_low_target): Add entries for insert_point, remove_point,
9298 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9299 prepare_to_resume.
9300 * server.c (debug_hw_points): New global.
9301 (monitor_show_help): Document set debug-hw-points.
9302 (handle_query): Process "set debug-hw-points".
9303 * server.h (debug_hw_points): Declare.
9304 (paddress): Declare.
9305 * utils.c (NUMCELLS, CELLSIZE): New macros.
9306 (get_sell, xsnprintf, paddress): New functions.
9307 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9308 remove_point, stopped_by_watchpoint, stopped_data_address.
9309 * win32-i386-low.c: Include i386-low.h.
9310 (debug_reg_state): Replaces dr.
9311 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9312 (i386_dr_low_get_status): New function.
9313 (i386_insert_point, i386_remove_point): New functions.
9314 (i386_stopped_by_watchpoint): New function.
9315 (i386_stopped_data_address): New function.
9316 (i386_initial_stuff): Update.
9317 (get_thread_context,set_thread_context,i386_thread_added): Update.
9318 (the_low_target): Add entries for insert_point,
9319 remove_point, stopped_by_watchpoint, stopped_data_address.
9320 * win32-low.c (win32_insert_watchpoint): New function.
9321 (win32_remove_watchpoint): New function.
9322 (win32_stopped_by_watchpoint): New function.
9323 (win32_stopped_data_address): New function.
9324 (win32_target_ops): Add entries for insert_watchpoint,
9325 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9326 * win32-low.h (win32_target_ops): New members insert_point,
9327 remove_point, stopped_by_watchpoint, stopped_data_address.
9328
9329 2009-06-25 Pedro Alves <pedro@codesourcery.com>
9330
9331 * server.c (process_serial_event): Re-return unsupported, not
9332 error, if the type isn't recognized. Re-allow supporting only
9333 insert or remove packets. Also call require_running for
9334 breakpoints. Add missing break statement to default case. Tidy.
9335 * target.h (struct target_ops): Rename insert_watchpoint to
9336 insert_point, and remove_watchpoint to remove_point.
9337
9338 * linux-low.h (struct linux_target_ops): Likewise.
9339 * linux-low.c (linux_insert_watchpoint): Rename to ...
9340 (linux_insert_point): ... this. Adjust.
9341 (linux_remove_watchpoint): Rename to ...
9342 (linux_remove_point): ... this. Adjust.
9343 (linux_target_ops): Adjust.
9344 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9345 (cris_insert_point): ... this.
9346 (cris_remove_watchpoint): Rename to ...
9347 (cris_remove_point): ... this.
9348 (the_low_target): Adjust.
9349
9350 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9351
9352 * server.c (handle_v_kill): Pass signal_pid to
9353 kill_inferior if multi_process is zero.
9354
9355 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9356
9357 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9358 * target.h (target_ops): Comment for *_watchpoint to make it clear
9359 the functions can get types '0' and '1'.
9360
9361 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9362
9363 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9364 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9365 * regcache.c (get_regcache): Likewise.
9366 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9367 * win32-low.c (child_fetch_inferior_registers): Remove check for
9368 regno 0.
9369
9370 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9371 Pedro Alves <pedro@codesourcery.com>
9372
9373 * target.h (struct target_ops) <supports_multi_process>: New
9374 callback.
9375 (target_supports_multi_process): New.
9376 * server.c (handle_query): Even if GDB reports support, only
9377 enable multi-process if the target also supports it. Report
9378 multi-process support only if the target backend supports it.
9379 * linux-low.c (linux_supports_multi_process): New function.
9380 (linux_target_ops): Install it as target_supports_multi_process
9381 callback.
9382
9383 2009-05-24 Doug Evans <dje@google.com>
9384
9385 Global renaming of find_thread_pid to find_thread_ptid.
9386 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9387 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9388 All callers updated.
9389
9390 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9391 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9392 directly.
9393
9394 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9395 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9396 (linux_resume_one_lwp): Ditto.
9397
9398 2009-05-23 Doug Evans <dje@google.com>
9399
9400 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9401 from struct inferior_list_entry * to struct lwp_info *.
9402 All callers updated.
9403
9404 2009-05-13 Doug Evans <dje@google.com>
9405
9406 * linux-x86-low.c: Don't include assert.h.
9407 (x86_siginfo_fixup): Use fatal, not assert.
9408 (x86_arch_setup): Fix comment.
9409
9410 2009-05-12 Doug Evans <dje@google.com>
9411
9412 Biarch support for i386/amd64 gdbserver.
9413 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9414 Add linux-x86-low.c.
9415 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9416 (linux-x86-low.o): Add.
9417 * linux-x86-64-low.c: Delete.
9418 * linux-i386-low.c: Delete.
9419 * linux-x86-low.c: New file.
9420 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9421 linux-x86-low.o.
9422 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9423 linux-x86-low.o.
9424 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9425 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9426 (linux_child_pid_to_exec_file): New function.
9427 (elf_64_header_p, elf_64_file_p): New functions.
9428 (siginfo_fixup): New function.
9429 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9430 give target a chance to convert layout.
9431 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9432 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9433
9434 2009-05-07 Doug Evans <dje@google.com>
9435
9436 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9437 (regsets_store_inferior_registers): Ditto.
9438
9439 2009-05-06 Pedro Alves <pedro@codesourcery.com>
9440
9441 PR server/10048
9442
9443 * linux-low.c (must_set_ptrace_flags): Delete.
9444 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9445 of the global.
9446 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9447 `lwp->must_set_ptrace_flags' instead.
9448 (linux_wait_for_event_1): Set ptrace options here.
9449 (linux_wait_1): ... not here.
9450
9451 2009-04-30 Doug Evans <dje@google.com>
9452
9453 * inferiors.c (started_inferior_callback): New function.
9454 (attached_inferior_callback): New function.
9455 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9456 * server.c (print_started_pid, print_attached_pid): New functions.
9457 (detach_or_kill_for_exit): New function.
9458 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9459 * server.h (have_started_inferiors_p): Declare.
9460 (have_attached_inferiors_p): Declare.
9461
9462 * inferiors.c (remove_process): Fix memory leak, free process.
9463 * linux-low.c (linux_remove_process): New function.
9464 (linux_kill): Call it instead of remove_process.
9465 (linux_detach, linux_wait_1): Ditto.
9466
9467 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9468
9469 * configure.srv: Add x86 Windows CE target.
9470
9471 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9472
9473 * inferiors.c (get_thread_process): Make global.
9474 * server.h (get_thread_process): Add prototype.
9475 * thread-db.c (find_one_thread): Use get_thread_process
9476 instead of current_process.
9477 (thread_db_get_tls_address): Do not crash if called when
9478 thread layer is not yet initialized.
9479
9480 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9481
9482 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9483 * spu-low.c (current_tid): Rename to ...
9484 (current_ptid): ... this.
9485 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9486 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9487 ptid_get_lwp (current_ptid) instead of current_tid.
9488 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9489 instead of current_tid. Use find_process_pid to verify pid
9490 argument is valid. Pass proper argument to remove_process.
9491 (spu_thread_alive): Compare current_ptid instead of current_tid.
9492 (spu_resume): Likewise.
9493
9494 2009-04-02 Pedro Alves <pedro@codesourcery.com>
9495
9496 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9497 variable.
9498
9499 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9500
9501 Implement the multiprocess extensions, and add linux multiprocess
9502 support.
9503
9504 * server.h (ULONGEST): Declare.
9505 (struct ptid, ptid_t): New.
9506 (minus_one_ptid, null_ptid): Declare.
9507 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9508 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9509 (struct inferior_list_entry): Change `id' type from unsigned from
9510 to ptid_t.
9511 (struct sym_cache, struct breakpoint, struct
9512 process_info_private): Forward declare.
9513 (struct process_info): Declare.
9514 (current_process): Declare.
9515 (all_processes): Declare.
9516 (initialize_inferiors): Declare.
9517 (add_thread): Adjust to use ptid_t.
9518 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9519 (add_process, remove_process, find_thread_pid): Declare.
9520 (find_inferior_id): Adjust to use ptid_t.
9521 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9522 (multi_process): Declare.
9523 (push_event): Adjust to use ptid_t.
9524 (read_ptid, write_ptid): Declare.
9525 (prepare_resume_reply): Adjust to use ptid_t.
9526 (clear_symbol_cache): Declare.
9527 * inferiors.c (all_processes): New.
9528 (null_ptid, minus_one_ptid): New.
9529 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9530 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9531 (add_thread): Change unsigned long to ptid. Remove gdb_id
9532 parameter. Adjust.
9533 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9534 (gdb_id_to_thread): Rename to ...
9535 (find_thread_pid): ... this. Change unsigned long to ptid.
9536 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9537 (loaded_dll, pull_pid_from_list): Adjust.
9538 (add_process, remove_process, find_process_pid)
9539 (get_thread_process, current_process, initialize_inferiors): New.
9540 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9541 (struct target_waitstatus) <related_pid>: Ditto.
9542 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9543 return type to int.
9544 (struct target_ops) <join>: Add `pid' argument.
9545 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9546 (struct target_ops) <wait>: Add `ptid' field. Change return type
9547 to ptid.
9548 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9549 (mywait): Add `ptid' argument. Change return type to ptid_t.
9550 (target_pid_to_str): Declare.
9551 * target.c (set_desired_inferior): Adjust to use ptids.
9552 (mywait): Add new `ptid' argument. Adjust.
9553 (target_pid_to_str): New.
9554 * mem-break.h (free_all_breakpoints): Declare.
9555 * mem-break.c (breakpoints): Delelete.
9556 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9557 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9558 to use per-process breakpoint list.
9559 (free_all_breakpoints): New.
9560 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9561 (symbol_cache, all_symbols_looked_up): Delete.
9562 (hexchars): New.
9563 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9564 read_ptid): New.
9565 (prepare_resume_reply): Change ptid argument's type from unsigned
9566 long to ptid_t. Adjust. Implement W;process and X;process.
9567 (free_sym_cache, clear_symbol_cache): New.
9568 (look_up_one_symbol): Adjust to per-process symbol cache. *
9569 * server.c (cont_thread, general_thread, step_thread): Change type
9570 to ptid_t.
9571 (attached): Delete.
9572 (multi_process): New.
9573 (last_ptid): Change type to ptid_t.
9574 (struct vstop_notif) <ptid>: Change type to ptid_t.
9575 (queue_stop_reply, push_event): Change `ptid' argument's type to
9576 ptid_t.
9577 (discard_queued_stop_replies): Add `pid' argument.
9578 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9579 changes. Don't reference the `attached' global.
9580 (attach_inferior): Adjust to mywait interface changes.
9581 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9582 features. Handle and report "multiprocess+". Handle
9583 "qAttached:PID".
9584 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9585 changes.
9586 (handle_v_kill): New.
9587 (handle_v_stopped): Adjust to use target_pid_to_str.
9588 (handle_v_requests): Allow multiple attaches and runs when
9589 multiprocess extensions are in effect. Handle "vKill".
9590 (myresume): Adjust to use ptids.
9591 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9592 (handle_status): Adjust to discard_queued_stop_replies interface
9593 change.
9594 (first_thread_of, kill_inferior_callback)
9595 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9596 (main): Call initialize_inferiors. Adjust to use ptids, killing
9597 and detaching from all inferiors. Handle multiprocess packet
9598 variants.
9599 * linux-low.h: Include gdb_proc_service.h.
9600 (struct process_info_private): New.
9601 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9602 <lwpid_of>: Use ptid_get_lwp.
9603 (get_lwp_thread): Adjust.
9604 (struct lwp_info): Add `dead' member.
9605 (find_lwp_pid): Declare.
9606 * linux-low.c (thread_db_active): Delete.
9607 (new_inferior): Adjust comment.
9608 (inferior_pid): Delete.
9609 (linux_add_process): New.
9610 (handle_extended_wait): Adjust.
9611 (add_lwp): Change unsigned long to ptid.
9612 (linux_create_inferior): Add process to processes table. Adjust
9613 to use ptids. Don't set new_inferior here.
9614 (linux_attach_lwp): Rename to ...
9615 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9616 it. Adjust to use ptids.
9617 (linux_attach_lwp): New.
9618 (linux_attach): Add process to processes table. Don't set
9619 new_inferior here.
9620 (struct counter): New.
9621 (second_thread_of_pid_p, last_thread_of_process_p): New.
9622 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9623 multiple processes.
9624 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9625 processes. Remove process from process table.
9626 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9627 to multiple processes.
9628 (any_thread_of): New.
9629 (linux_detach): Add `pid' argument, and handle it. Remove process
9630 from processes table.
9631 (linux_join): Add `pid' argument. Handle it.
9632 (linux_thread_alive): Change unsighed long argument to ptid_t.
9633 Consider dead lwps as not being alive.
9634 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9635 threads we're not interested in.
9636 (same_lwp, find_lwp_pid): New.
9637 (linux_wait_for_lwp): Change `pid' argument's type from int to
9638 ptid_t. Adjust.
9639 (linux_wait_for_event): Rename to ...
9640 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9641 from int to ptid_t. Adjust.
9642 (linux_wait_for_event): New.
9643 (linux_wait_1): Add `ptid' argument. Change return type to
9644 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9645 that exit from the process table.
9646 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9647 Adjust.
9648 (mark_lwp_dead): New.
9649 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9650 stopping all threads, mark its main lwp as dead.
9651 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9652 ptids.
9653 (fetch_register, usr_store_inferior_registers)
9654 (regsets_fetch_inferior_registers)
9655 (regsets_store_inferior_registers, linux_read_memory)
9656 (linux_write_memory): Inline `inferior_pid'.
9657 (linux_look_up_symbols): Adjust to use per-process
9658 `thread_db_active'.
9659 (linux_request_interrupt): Adjust to use ptids.
9660 (linux_read_auxv): Inline `inferior_pid'.
9661 (initialize_low): Don't reference thread_db_active.
9662 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9663 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9664 (ps_getpid): Return the pid of the current inferior.
9665 * thread-db.c (proc_handle, thread_agent): Delete.
9666 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9667 per-process data.
9668 (find_one_thread): Change argument type to ptid_t. Adjust to
9669 per-process data.
9670 (maybe_attach_thread): Adjust to per-process data and ptids.
9671 (thread_db_find_new_threads): Ditto.
9672 (thread_db_init): Ditto.
9673 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9674 processes table. Adjust to use ptids.
9675 (spu_kill, spu_detach): Adjust interface. Remove process from
9676 processes table.
9677 (spu_join, spu_thread_alive): Adjust interface.
9678 (spu_wait): Adjust interface. Remove process from processes
9679 table. Adjust to use ptids.
9680 * win32-low.c (current_inferior_tid): Delete.
9681 (current_inferior_ptid): New.
9682 (debug_event_ptid): New.
9683 (thread_rec): Take a ptid. Adjust.
9684 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9685 (child_delete_thread): Ditto.
9686 (do_initial_child_stuff): Add `attached' argument. Add process to
9687 processes table.
9688 (child_fetch_inferior_registers, child_store_inferior_registers):
9689 Adjust.
9690 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9691 (win32_attach): Pass 1 to do_initial_child_stuff.
9692 (win32_kill): Adjust interface. Remove process from processes
9693 table.
9694 (win32_detach): Ditto.
9695 (win32_join): Adjust interface.
9696 (win32_thread_alive): Take a ptid.
9697 (win32_resume): Adjust to use ptids.
9698 (get_child_debug_event): Ditto.
9699 (win32_wait): Adjust interface. Remove exiting process from
9700 processes table.
9701
9702 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9703
9704 Non-stop mode support.
9705
9706 * server.h (non_stop): Declare.
9707 (gdb_client_data, handler_func): Declare.
9708 (delete_file_handler, add_file_handler, start_event_loop):
9709 Declare.
9710 (handle_serial_event, handle_target_event, push_event)
9711 (putpkt_notif): Declare.
9712 * target.h (enum resume_kind): New.
9713 (struct thread_resume): Replace `step' field by `kind' field.
9714 (TARGET_WNOHANG): Define.
9715 (struct target_ops) <wait>: Add `options' argument.
9716 <supports_non_stop, async, start_non_stop>: New fields.
9717 (target_supports_non_stop, target_async): New.
9718 (start_non_stop): Declare.
9719 (mywait): Add `options' argument.
9720 * target.c (mywait): Add `options' argument. Print child exit
9721 notifications here.
9722 (start_non_stop): New.
9723 * server.c (non_stop, own_buf, mem_buf): New globals.
9724 (struct vstop_notif): New.
9725 (notif_queue): New global.
9726 (queue_stop_reply, push_event, discard_queued_stop_replies)
9727 (send_next_stop_reply): New.
9728 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9729 interface changes.
9730 (attach_inferior): In non-stop mode, don't wait for the target
9731 here.
9732 (handle_general_set): Handle QNonStop.
9733 (handle_query): When handling qC, return the current general
9734 thread, instead of the first thread of the list.
9735 (handle_query): If the backend supports non-stop mode, include
9736 QNonStop+ in the qSupported query response.
9737 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9738 and non-stop mode.
9739 (handle_v_attach, handle_v_run): Handle non-stop mode.
9740 (handle_v_stopped): New.
9741 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9742 (myresume): Adjust to use resume_kind. Handle non-stop.
9743 (queue_stop_reply_callback): New.
9744 (handle_status): Handle non-stop mode.
9745 (main): Clear non_stop flag on reconnection. Use the event-loop.
9746 Refactor serial protocol handling from here ...
9747 (process_serial_event): ... to this new function. When GDB
9748 selects any thread, select one here. In non-stop mode, wait until
9749 GDB acks all pending events before exiting.
9750 (handle_serial_event, handle_target_event): New.
9751 * remote-utils.c (remote_open): Install remote_desc in the event
9752 loop.
9753 (remote_close): Remove remote_desc from the event loop.
9754 (putpkt_binary): Rename to...
9755 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9756 (putpkt_binary): New as wrapper around putpkt_binary_1.
9757 (putpkt_notif): New.
9758 (prepare_resume_reply): In non-stop mode, don't change the
9759 general_thread.
9760 * event-loop.c: New.
9761 * Makefile.in (OBJ): Add event-loop.o.
9762 (event-loop.o): New rule.
9763
9764 * linux-low.h (pid_of): Moved here.
9765 (lwpid_of): New.
9766 (get_lwp_thread): Use lwpid_of.
9767 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9768 * linux-low.c (pid_of): Delete.
9769 (inferior_pid): Use lwpid_of.
9770 (linux_event_pipe): New.
9771 (target_is_async_p): New.
9772 (delete_lwp): New.
9773 (handle_extended_wait): Use lwpid_of.
9774 (add_lwp): Don't set lwpid field.
9775 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9776 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9777 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9778 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9779 first. Adjust to linux_wait_for_event interface changes. Use
9780 lwpid_of.
9781 (linux_detach): Don't delete the main lwp here.
9782 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9783 (status_pending_p): Don't consider explicitly suspended lwps.
9784 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9785 pointer. Add OPTIONS argument. Change return type to int. Use
9786 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9787 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9788 pointer. Add status pointer argument. Return a pid instead of a
9789 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9790 changes. In non-stop mode, don't switch to a random thread.
9791 (linux_wait): Rename to...
9792 (linux_wait_1): ... this. Add target_options argument, and handle
9793 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9794 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9795 clean exit and signal exit code. Don't stop all threads in
9796 non-stop mode. In all-stop mode, only stop all threads when
9797 reporting a stop to GDB. Handle explicit thread stop requests.
9798 (async_file_flush, async_file_mark): New.
9799 (linux_wait): New.
9800 (send_sigstop): Use lwpid_of.
9801 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9802 interface changes. In non-stop mode, don't switch to a random
9803 thread.
9804 (linux_resume_one_lwp): Use lwpid_of.
9805 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9806 (linux_resume_one_thread): ... this. Handle resume_stop. In
9807 non-stop mode, don't look for pending flag in all threads.
9808 (resume_status_pending_p): Don't consider explicitly suspended
9809 threads.
9810 (my_waitpid): Reimplement. Emulate __WALL.
9811 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9812 Use lwpid_of.
9813 (sigchld_handler, linux_supports_non_stop, linux_async)
9814 (linux_start_non_stop): New.
9815 (linux_target_ops): Register linux_supports_non_stop, linux_async
9816 and linux_start_non_stop.
9817 (initialize_low): Install SIGCHLD handler.
9818 * thread-db.c (thread_db_create_event, find_one_thread)
9819 (thread_db_get_tls_address): Use lwpid_of.
9820 * win32-low.c (win32_detach): Adjust to use resume_kind.
9821 (win32_wait): Add `options' argument.
9822 * spu-low.c (spu_resume): Adjust to use resume_kind.
9823 (spu_wait): Add `options' argument.
9824
9825 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9826
9827 Decouple target code from remote protocol.
9828
9829 * target.h (enum target_waitkind): New.
9830 (struct target_waitstatus): New.
9831 (struct target_ops) <wait>: Return an unsigned long. Take a
9832 target_waitstatus pointer instead of a char pointer.
9833 (mywait): Likewise.
9834 * target.c (mywait): Change prototype to return an unsigned long.
9835 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9836 * server.h (thread_from_wait, old_thread_from_wait): Delete
9837 declarations.
9838 (prepare_resume_reply): Change prototype to take a
9839 target_waitstatus.
9840 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9841 (last_status, last_ptid): New.
9842 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9843 pid instead of a signal.
9844 (attach_inferior): Remove "status" and "signal" parameters.
9845 Adjust.
9846 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9847 not as an address.
9848 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9849 (handle_v_requests, myresume): Remove "status" and "signal"
9850 parameters. Adjust.
9851 (handle_status): New.
9852 (main): Delete local `status'. Adjust.
9853 * remote-utils.c: Include target.h.
9854 (prepare_resume_reply): Change prototype to take a
9855 target_waitstatus. Adjust.
9856
9857 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9858 interface.
9859 * spu-low.c (spu_wait): Adjust.
9860 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9861 Delete.
9862 (win32_wait): Adjust.
9863
9864 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9865
9866 * target.h (struct thread_resume): Delete leave_stopped member.
9867 (struct target_ops): Add a `n' argument to the `resume' callback.
9868 * server.c (start_inferior): Adjust.
9869 (handle_v_cont, myresume): Adjust.
9870 * linux-low.c (check_removed_breakpoint): Adjust to resume
9871 interface change, and to removed leave_stopped field.
9872 (resume_ptr): Delete.
9873 (struct thread_resume_array): New.
9874 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9875 resume interface change.
9876 (linux_continue_one_thread, linux_queue_one_thread)
9877 (resume_status_pending_p): Check if the resume field is NULL
9878 instead of checking the leave_stopped member.
9879 (linux_resume): Adjust to the target resume interface change.
9880 * spu-low.c (spu_resume): Adjust to the target resume interface
9881 change.
9882 * win32-low.c (win32_detach, win32_resume): Ditto.
9883
9884 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9885
9886 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9887 flag.
9888 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9889 pending.
9890 (linux_continue_one_thread): Only preserve the stepping flag if
9891 there's a pending breakpoint.
9892
9893 2009-03-31 Pedro Alves <pedro@codesourcery.com>
9894
9895 * server.c (main): After the inferior having exited, call
9896 remote_close before exiting gdbserver.
9897
9898 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9899
9900 Fix size of FPSCR in Power 7 processors.
9901 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9902 (PPC_FEATURE_HAS_DFP): New #define.
9903 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9904 size of the FPSCR.
9905
9906 2009-03-23 Pedro Alves <pedro@codesourcery.com>
9907
9908 * server.c (handle_query) Whitespace and formatting.
9909
9910 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9911
9912 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9913 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9914 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9915 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9916 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9917 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9918 Makefile.in, configure.ac: Fix whitespace throughout.
9919 * configure: Regenerate.
9920
9921 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9922
9923 * inferiors.c (find_inferior): Make it safe for the callback
9924 function to delete the currently iterated inferior.
9925
9926 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9927
9928 * Makefile.in (linuw_low_h): Move higher.
9929 (thread-db.o): Depend on $(linux_low_h).
9930
9931 2009-03-17 Pedro Alves <pedro@codesourcery.com>
9932
9933 Rename "process" to "lwp" throughout.
9934
9935 * linux-low.c (all_processes): Rename to...
9936 (all_lwps): ... this.
9937 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
9938 (add_process): Rename to ...
9939 (add_lwp): ... this. Adjust.
9940 (linux_create_inferior): Adjust.
9941 (linux_attach_lwp): Adjust.
9942 (linux_attach): Adjust.
9943 (linux_kill_one_process): Rename to ...
9944 (linux_kill_one_lwp): ... this. Adjust.
9945 (linux_kill): Adjust.
9946 (linux_detach_one_process): Rename to ...
9947 (linux_detach_one_lwp): ... this. Adjust.
9948 (linux_detach): Adjust.
9949 (check_removed_breakpoint): Adjust.
9950 (status_pending_p): Adjust.
9951 (linux_wait_for_process): Rename to ...
9952 (linux_wait_for_lwp): ... this. Adjust.
9953 (linux_wait_for_event): Adjust.
9954 (send_sigstop): Adjust.
9955 (wait_for_sigstop): Adjust.
9956 (stop_all_processes): Rename to ...
9957 (stop_all_lwps): ... this.
9958 (linux_resume_one_process): Rename to ...
9959 (linux_resume_one_lwp): ... this. Adjust.
9960 (linux_set_resume_request, linux_continue_one_thread)
9961 (linux_queue_one_thread, resume_status_pending_p)
9962 (usr_store_inferior_registers, regsets_store_inferior_registers)
9963 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9964 Adjust.
9965 * linux-low.h (get_process): Rename to ...
9966 (get_lwp): ... this. Adjust.
9967 (get_thread_process): Rename to ...
9968 (get_thread_lwp): ... this. Adjust.
9969 (get_process_thread): Rename to ...
9970 (get_lwp_thread): ... this. Adjust.
9971 (struct process_info): Rename to ...
9972 (struct lwp_info): ... this.
9973 (all_processes): Rename to ...
9974 (all_lwps): ... this.
9975 * proc-service.c (ps_lgetregs): Adjust.
9976 * thread-db.c (thread_db_create_event, find_one_thread)
9977 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
9978
9979 2009-03-14 Pedro Alves <pedro@codesourcery.com>
9980
9981 * server.c (handle_query): Handle "qAttached".
9982
9983 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
9984
9985 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
9986 GPLv3, update license URL.
9987
9988 2009-03-01 Doug Evans <dje@google.com>
9989
9990 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
9991 (server_h): Add gdb_signals.h.
9992 (signals.o): Update.
9993 * server.h (target_signal_from_host,target_signal_to_host_p)
9994 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
9995
9996 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
9997
9998 * remote-utils.c (getpkt): Also generate remote-debug
9999 information if noack_mode is set.
10000
10001 2009-02-06 Pedro Alves <pedro@codesourcery.com>
10002
10003 * server.c (handle_query): Report qXfer:siginfo:read and
10004 qXfer:siginfo:write as supported and handle them.
10005 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10006 * linux-low.c (linux_xfer_siginfo): New.
10007 (linux_target_ops): Set it.
10008
10009 2009-01-26 Pedro Alves <pedro@codesourcery.com>
10010
10011 * server.c (gdbserver_usage): Mention --remote-debug.
10012 (main): Accept '--remote-debug' switch.
10013
10014 2009-01-18 Doug Evans <dje@google.com>
10015
10016 * regcache.c (new_register_cache): No need to check result of xcalloc.
10017 * server.c (handle_search_memory): Back out calls to xmalloc,
10018 result is checked and error is returned to user upon failure.
10019 (handle_query): Ditto. Add more checks for result of malloc.
10020 (handle_v_cont): Check result of malloc, report error back to
10021 user upon failure.
10022 (handle_v_run): Ditto. Call freeargv.
10023 * server.h (freeargv): Declare.
10024 * utils.c (freeargv): New fn.
10025
10026 2009-01-15 Doug Evans <dje@google.com>
10027
10028 * gdbreplay.c (perror_with_name): Make arg const char *.
10029 * server.h (target_signal_to_name): Make return type const char *.
10030 * thread-db.c (thread_db_err_str): Make return type const char *.
10031 * utils.c (perror_with_name): Make arg const char *.
10032
10033 2009-01-14 Pedro Alves <pedro@codesourcery.com>
10034
10035 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10036 when handling a EXIT_PROCESS_DEBUG_EVENT.
10037
10038 2009-01-06 Joel Brobecker <brobecker@adacore.com>
10039
10040 * gdbreplay.c (gdbreplay_version): Update copyright year.
10041 * server.c (gdbserver_version): Likewise.
10042
10043 2009-01-05 Doug Evans <dje@google.com>
10044
10045 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
10046 (handle_extended_wait): Improve comment.
10047
10048 2008-12-13 Doug Evans <dje@google.com>
10049
10050 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10051 * server.h (ATTR_MALLOC): New macro.
10052 (xmalloc,xcalloc,xstrdup): Declare.
10053 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10054 * inferiors.c: Ditto.
10055 * linux-low.c: Ditto.
10056 * mem-break.c: Ditto.
10057 * regcache.c: Ditto.
10058 * remote-utils.c: Ditto.
10059 * server.c: Ditto.
10060 * target.c: Ditto.
10061 * win32-low.c: Ditto.
10062
10063 2008-12-12 Doug Evans <dje@google.com>
10064
10065 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10066 in debugging printf.
10067
10068 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10069
10070 2008-12-09 Doug Evans <dje@google.com>
10071
10072 * linux-low.h (struct process_info): Delete member tid, unused.
10073 * thread-db.c (find_one_thread): Update.
10074 (maybe_attach_thread): Update.
10075
10076 2008-12-02 Pedro Alves <pedro@codesourcery.com>
10077
10078 * target.h (struct target_ops): Add qxfer_osdata member.
10079 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10080 and dirent.h.
10081 (linux_qxfer_osdata): New functions.
10082 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10083 callback.
10084 * server.c (handle_query): Handle "qXfer:osdata:read:".
10085 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10086 (buffer_xml_printf): New functions.
10087 * server.h (struct buffer): New.
10088 (buffer_grow_str, buffer_grow_str0): New macros.
10089 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10090 (buffer_xml_printf): Declare.
10091
10092 2008-11-24 Doug Evans <dje@google.com>
10093
10094 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10095
10096 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10097
10098 * server.c (handle_v_run): Always use the supplied argument list.
10099
10100 2008-11-19 Bob Wilson <bob.wilson@acm.org>
10101
10102 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10103 (xtensa_regmap_table): Add entry for scompare1.
10104
10105 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10106
10107 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10108 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10109 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10110 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10111 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10112 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10113 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10114 XML target descriptions.
10115 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10116 when inferior is running on an ISA 2.05 or later processor. Add
10117 special case to return offset for full 64-bit slot of FPSCR when
10118 in 32-bits.
10119
10120 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10121
10122 * Makefile.in (SFILES, clean): Added sparc64 files.
10123 (reg-sparc64.o, reg-sparc64.c): New.
10124 * configure.srv (sparc*-*-linux*): New configuration.
10125 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10126 syscall arguments for SPARC.
10127 (regsets_store_inferior_registers): Likewise.
10128 * linux-sparc-low.c: New file.
10129
10130 2008-10-21 Doug Evans <dje@google.com>
10131
10132 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10133 (READLINE_DIR,READLINE_DEP): Delete.
10134 (INTERNAL_CFLAGS): Update.
10135 (LINTFLAGS): Update.
10136
10137 2008-10-10 Pedro Alves <pedro@codesourcery.com>
10138
10139 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10140 whole argv from the last run, not just argv[0].
10141
10142 2008-09-08 Pedro Alves <pedro@codesourcery.com>
10143
10144 * regcache.c (new_register_cache): Return NULL if the register
10145 cache size isn't known yet.
10146 (free_register_cache): Avoid dereferencing a NULL regcache.
10147
10148 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10149
10150 * configure.srv: Merge MIPS and MIPS64.
10151
10152 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10153
10154 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10155
10156 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
10157
10158 * Makefile.in: Add required vsx dependencies.
10159
10160 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10161 Declare init_registers_powerpc_vsx32l.
10162 Declare init_registers_powerpc_vsx64l.
10163 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10164 (ppc_arch_setup): Check for VSX in hwcap.
10165 (ppc_fill_vsxregset): New function.
10166 (ppc_store_vsxregset): New function.
10167 Add new VSX entry in regset_info target_regsets.
10168
10169 * configure.srv: Add new VSX dependencies.
10170
10171 2008-08-12 Pedro Alves <pedro@codesourcery.com>
10172
10173 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10174 (remote_open): Set or clear transport_is_reliable.
10175 (putpkt_binary): Don't expect acks in noack mode.
10176 (getpkt): Don't send ack/nac in noack mode.
10177 * server.c (handle_general_set): Handle QStartNoAckMode.
10178 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10179 qSupported.
10180 (main): Reset noack_mode on every connection.
10181 * server.h (noack_mode): Declare.
10182
10183 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10184
10185 * Makefile.in (GDBREPLAY_OBS): New variable.
10186 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10187
10188 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10189 Daniel Jacobowitz <dan@codesourcery.com>
10190
10191 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10192 (usr_store_inferior_registers): Likewise.
10193 (regsets_store_inferior_registers): Likewise.
10194
10195 2008-07-31 Rolf Jansen <rj@surtec.com>
10196 Pedro Alves <pedro@codesourcery.com>
10197
10198 * configure.ac: Check for memmem declaration.
10199 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10200 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10201 (disable_packet_qfThreadInfo): Unconditionally compile.
10202 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10203 * configure, config.in: Regenerate.
10204
10205 2008-07-28 Doug Kwan <dougkwan@google.com>
10206
10207 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10208 (linux_write_memory): Remove declaration of errno.
10209
10210 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10211
10212 * linux-low.c (handle_extended_wait): Do not use "status"
10213 variable uninitialized.
10214
10215 2008-07-07 Pedro Alves <pedro@codesourcery.com>
10216
10217 * server.c (handle_v_attach): Inhibit reporting dll changes.
10218
10219 2008-06-27 Pedro Alves <pedro@codesourcery.com>
10220
10221 * remote-utils.c (prepare_resume_reply): If requested, don't
10222 output "thread:TID" in the T stop reply.
10223
10224 * server.c (disable_packet_vCont, disable_packet_Tthread)
10225 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10226 (handle_query): If requested, disable support for qC, qfThreadInfo
10227 and qsThreadInfo.
10228 (handle_v_requests): If requested, disable support for vCont.
10229 (gdbserver_show_disableable): New.
10230 (main): Handle --disable-packet and --disable-packet=LIST.
10231
10232 * server.h (disable_packet_vCont, disable_packet_Tthread)
10233 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10234
10235 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10236
10237 * server.c (gdbserver_usage): Mention --version.
10238
10239 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10240
10241 * Makefile.in (gdbreplay.o): New rule.
10242
10243 2008-06-06 Joseph Myers <joseph@codesourcery.com>
10244
10245 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10246 message, not gdbserver.
10247
10248 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
10249 Nathan Sidwell <nathan@codesourcery.com>
10250 Joseph Myers <joseph@codesourcery.com>
10251
10252 * acinclude.m4: Include ../../config/acx.m4.
10253 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10254 * configure, config.in: Regenerate.
10255 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10256 * server.c (gdbserver_version): Print PKGVERSION.
10257 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10258 (main): Adjust gdbserver_usage calls.
10259 * gdbreplay.c (version, host_name): Add declarations.
10260 (gdbreplay_version, gdbreplay_usage): New.
10261 (main): Accept --version and --help options.
10262
10263 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10264
10265 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10266 (arm_breakpoint_at): Handle Thumb.
10267 (the_low_target): Add comment.
10268
10269 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10270
10271 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10272
10273 2008-05-09 Doug Evans <dje@google.com>
10274
10275 * server.h (decode_search_memory_packet): Declare.
10276 * remote-utils.c (decode_search_memory_packet): New fn.
10277 * server.c (handle_search_memory_1): New fn.
10278 (handle_search_memory): New fn.
10279 (handle_query): Process qSearch:memory packets.
10280
10281 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10282
10283 * regcache.c (registers_length): Remove.
10284 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10285 full register packet.
10286 * regcache.h (registers_length): Remove prototype.
10287 * server.h (PBUFSIZ): Define to 16384.
10288
10289 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10290
10291 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10292 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10293 powerpc-64l.o, and powerpc-altivec64l.o.
10294 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10295 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10296 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10297 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10298 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10299 to srv_xmlfiles.
10300
10301 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10302 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10303 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10304 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10305 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10306 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10307 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10308 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10309 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10310 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10311 (clean): Update.
10312
10313 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10314 (init_registers_powerpc_32l): ... this new prototype.
10315 (init_registers_powerpc_32): Remove, replace by ...
10316 (init_registers_powerpc_altivec32l): ... this new prototype.
10317 (init_registers_powerpc_e500): Remove, replace by ...
10318 (init_registers_powerpc_e500l): ... this new prototype.
10319 (init_registers_ppc64): Remove, replace by ...
10320 (init_registers_powerpc_64l): ... this new prototype.
10321 (init_registers_powerpc_64): Remove, replace by ...
10322 (init_registers_powerpc_altivec64l): ... this new prototype.
10323 (ppc_num_regs): Set to 73.
10324 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10325 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10326 (ppc_cannot_store_register): Handle orig_r3 and trap.
10327 (ppc_arch_setup): Update init_registers_... calls.
10328 (ppc_fill_gregset): Handle orig_r3 and trap.
10329
10330 * inferiors.c (clear_inferiors): Reset current_inferior.
10331
10332 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
10333
10334 * acinclude.m4: Add override.m4.
10335 * configure: Regenerate.
10336
10337 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10338
10339 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10340 initial call to init_register_ppc64.
10341
10342 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10343
10344 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10345 single powerpc*-*-linux* case.
10346 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10347
10348 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10349
10350 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
10351 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
10352 from reg_xmlfiles.
10353 * linux-ppc-low.c: Include <elf.h>.
10354 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10355 (ppc_hwcap): New global variable.
10356 (ppc_regmap): Remove __SPE__ #ifdef sections.
10357 (ppc_regmap_e500): New global variable.
10358 (ppc_cannot_store_register): Update __SPE__ special case.
10359 (ppc_get_hwcap): New function.
10360 (ppc_arch_setup): Use it to determine whether inferior supports
10361 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10362 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10363 Do not access registers if target does not support AltiVec.
10364 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10365 Do not access registers if target does not support SPE.
10366 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10367
10368 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10369
10370 * linux-low.c (disabled_regsets, num_regsets): New.
10371 (use_regsets_p): Delete.
10372 (linux_wait_for_process): Clear disabled_regsets.
10373 (regsets_fetch_inferior_registers): Check and set it.
10374 (regsets_store_inferior_registers): Likewise.
10375 (linux_fetch_registers, linux_store_registers): Do not use
10376 use_regsets_p.
10377 (initialize_low): Allocate disabled_regsets.
10378
10379 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10380
10381 * Makefile.in (LIBOBJS): New.
10382 (OBS): Use LIBOBJS.
10383 (memmem.o): New rule.
10384 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10385 * configure: Regenerated.
10386
10387 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10388
10389 * server.c (handle_query): Never return "unsupported" for
10390 qXfer:features:read queries.
10391
10392 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10393
10394 * server.c (get_features_xml): Fix inverted condition.
10395 (handle_query): Always support qXfer:feature:read.
10396
10397 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10398
10399 * server.c (wrapper_argv): New.
10400 (start_inferior): Handle wrapper_argv. If set, expect an extra
10401 trap.
10402 (gdbserver_usage): Document --wrapper.
10403 (main): Parse --wrapper.
10404
10405 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10406
10407 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10408 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10409 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10410 (ppc_set_pc): Likewise.
10411 (ppc_arch_setup): New function.
10412 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10413 of collect_register.
10414 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
10415
10416 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10417
10418 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10419 instead of linux-ppc64-low.o.
10420 * linux-ppc64-low.c: Remove file.
10421 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10422 (linux-ppc64-low.o): Remove rule.
10423
10424 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10425 (init_registers_powerpc_64): Likewise.
10426 (ppc_regmap): Conditionally define depending on __powerpc64__.
10427 (ppc_cannot_store_register): Do not special-case "fpscr" when
10428 compiled on __powerpc64__.
10429 (ppc_collect_ptrace_register): New function.
10430 (ppc_supply_ptrace_register): New function.
10431 (ppc_breakpoint): Change type to "unsigned int".
10432 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10433 (the_low_target): Conditionally provide initializers for the
10434 arch_setup member depending on __powerpc64__. Install
10435 collect_ptrace_register and supply_ptrace_register members.
10436
10437 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10438
10439 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10440 * server.c (gdbserver_xmltarget): Define.
10441 (get_features_xml): Use it to replace "target.xml" and arch_string.
10442
10443 * configure.srv: Remove srv_xmltarget. Add XML files that were
10444 mentioned there to srv_xmlfiles instead. Remove conditional tests
10445 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10446 srv_xmlfiles and srv_regobj to include all possible choices.
10447 * configure.ac (srv_xmltarget): Remove.
10448 (srv_xmlfiles): Do not add "target.xml".
10449 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10450 checks for supplementary target information.
10451 * configure: Regenerate.
10452 * Makefile.in (XML_TARGET): Remove.
10453 (target.xml): Remove rule.
10454 (clean): Do not clean up target.xml.
10455 (.PRECIOUS): Do not mention target.xml.
10456
10457 * target.h (struct target_ops): Remove arch_string member.
10458 * linux-low.c (linux_arch_string): Remove.
10459 (linux_target_ops): Remove arch_string initializer.
10460 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10461 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10462 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10463 * spu-low.c (spu_arch_string): Remove.
10464 (spu_target_ops): Remove arch_string initializer.
10465 * win32-low.c (win32_arch_string): Remove.
10466 (win32_target_ops): Remove arch_string initializer.
10467 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10468 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10469 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10470
10471 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10472
10473 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10474 by collect_ptrace_register and supply_ptrace_register hooks.
10475 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10476 instead of checking for the_low_target.left_pad_xfer.
10477 (usr_store_inferior_registers): Use collect_ptrace_register callback
10478 instead of checking for the_low_target.left_pad_xfer.
10479
10480 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10481 (s390_supply_ptrace_register): Likewise.
10482 (s390_fill_gregset): Call s390_collect_ptrace_register.
10483 (the_low_target): Update.
10484
10485 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10486 (ppc_supply_ptrace_register): Likewise.
10487 (the_low_target): Update.
10488
10489 * linux-i386-low.c (the_low_target): Update.
10490 * linux-x86-64-low.c (the_low_target): Update.
10491
10492 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10493
10494 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10495 reg-s390.o and reg-s390x.o.
10496
10497 * linux-low.c (new_inferior): New global variable.
10498 (linux_create_inferior, linux_attach): Set it.
10499 (linux_wait_for_process): Call the_low_target.arch_setup after the
10500 target has stopped for the first time.
10501 (initialize_low): Do not call the_low_target.arch_setup.
10502
10503 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10504 (s390_set_pc): Likewise.
10505 (s390_arch_setup): New function.
10506 (the_low_target): Use s390_arch_setup as arch_setup routine.
10507
10508 * regcache.c (realloc_register_cache): New function.
10509 (set_register_cache): Call it for each existing regcache.
10510
10511 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10512
10513 * server.h (init_registers): Remove prototype.
10514
10515 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10516 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10517 instead of init_registers ().
10518 * linux-arm-low.c (init_registers_arm): Add prototype.
10519 (init_registers_arm_with_iwmmxt): Likewise.
10520 (the_low_target): Add initializer for arch_setup field.
10521 * linux-cris-low.c (init_registers_cris): Add prototype.
10522 (the_low_target): Add initializer for arch_setup field.
10523 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10524 (the_low_target): Add initializer for arch_setup field.
10525 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10526 (the_low_target): Add initializer for arch_setup field.
10527 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10528 (the_low_target): Add initializer for arch_setup field.
10529 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10530 (the_low_target): Add initializer for arch_setup field.
10531 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10532 (the_low_target): Add initializer for arch_setup field.
10533 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10534 (init_registers_mips64_linux): Likewise.
10535 (the_low_target): Add initializer for arch_setup field.
10536 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10537 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10538 (the_low_target): Add initializer for arch_setup field.
10539 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10540 (init_registers_powerpc_64): Likewise.
10541 (the_low_target): Add initializer for arch_setup field.
10542 * linux-s390-low.c (init_registers_s390): Add prototype.
10543 (init_registers_s390x): Likewise.
10544 (the_low_target): Add initializer for arch_setup field.
10545 * linux-sh-low.c (init_registers_sh): Add prototype.
10546 (the_low_target): Add initializer for arch_setup field.
10547 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10548 (the_low_target): Add initializer for arch_setup field.
10549 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10550 (the_low_target): Add initializer for arch_setup field.
10551
10552 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10553 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10554 instead of init_registers ().
10555 * win32-arm-low.c (init_registers_arm): Add prototype.
10556 (the_low_target): Add initializer for arch_setup field.
10557 * win32-i386-low.c (init_registers_i386): Add prototype.
10558 (the_low_target): Add initializer for arch_setup field.
10559
10560 * spu-low.c (init_registers_spu): Add prototype.
10561 (initialize_low): Call initialie_registers_spu () instead of
10562 initialize_registers ().
10563
10564 2008-02-19 Pedro Alves <pedro@codesourcery.com>
10565
10566 * server.c (handle_v_requests): When handling the vRun and vAttach
10567 packets, if already debugging a process, don't kill it. Return an
10568 error instead.
10569
10570 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10571
10572 * server.c (handle_query): Correct length check.
10573
10574 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10575
10576 * win32-low.c (do_initial_child_stuff): Add process handle
10577 parameter. Set current_process_handle and current_process_id from the
10578 parameters. Clear globals.
10579 (win32_create_inferior): Don't set current_process_handle and
10580 current_process_id here. Instead pass them on the call to
10581 do_initial_child_stuff.
10582 (win32_attach): Likewise.
10583 (win32_clear_inferiors): New.
10584 (win32_kill): Don't close the current process handle or the
10585 current thread handle here. Instead call win32_clear_inferiors.
10586 (win32_detach): Don't open a new handle to the process. Call
10587 win32_clear_inferiors.
10588 (win32_join): Don't rely on current_process_handle; open a new
10589 handle using the process id.
10590 (win32_wait): Call win32_clear_inferiors when the inferior process
10591 has exited.
10592
10593 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10594
10595 * server.c (monitor_show_help): Add "exit".
10596
10597 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10598
10599 * Makefile.in (SFILES): Add linux-xtensa-low.c.
10600 (clean): Add reg-xtensa.c.
10601 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
10602 * configure.srv (xtensa*-*-linux*) New target.
10603 * linux-xtensa-low.c: New.
10604 * xtensa-xtregs.c: New.
10605
10606 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10607
10608 * hostio.c: Don't include errno.h.
10609 (errno_to_fileio_errno): Move to hostio-errno.
10610 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10611 error number outputting to the target->hostio_last_error callback.
10612 (hostio_packet_error): Use FILEIO_EINVAL directly.
10613 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10614 calls to hostio_error.
10615 * hostio-errno.c: New.
10616 * server.h (hostio_last_error_from_errno): Declare.
10617 * target.h (target_ops): Add hostio_last_error member.
10618 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10619 as hostio_last_error handler.
10620 * spu-low.c (spu_target_ops): Likewise.
10621 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10622 (wince_hostio_last_error): New functions.
10623 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10624 as hostio_last_error handler.
10625 (win32_target_ops) [!_WIN32_WCE]: Register
10626 hostio_last_error_from_errno as hostio_last_error handler.
10627 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10628 (hostio-errno.o): New rule.
10629 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10630 * configure.srv (srv_hostio_err_objs): New variable. Default to
10631 hostio-errno.o.
10632 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10633 * configure: Regenerate.
10634
10635 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10636
10637 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10638 (linux_kill, linux_detach): Clean up the process list.
10639 * remote-utils.c (remote_open): Improve port number parsing.
10640 (putpkt_binary, input_interrupt): Only send interrupts if the target
10641 is running.
10642 * server.c (extended_protocol): Make static.
10643 (attached): Define earlier.
10644 (exit_requested, response_needed, program_argv): New variables.
10645 (target_running): New.
10646 (start_inferior): Clear attached here.
10647 (attach_inferior): Set attached here.
10648 (require_running): Define.
10649 (handle_query): Use require_running and target_running. Implement
10650 "monitor exit".
10651 (handle_v_attach, handle_v_run): New.
10652 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10653 (gdbserver_usage): Update.
10654 (main): Redo argument parsing. Handle --debug and --multi. Handle
10655 --attach along with other options or after the port. Save
10656 program_argv. Support no initial program. Resynchronize
10657 communication with GDB after an error. Handle "monitor exit".
10658 Use require_running and target_running. Always allow the extended
10659 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10660 restart in extended mode.
10661 * README: Refer to the GDB manual. Update --attach usage.
10662
10663 2007-12-20 Andreas Schwab <schwab@suse.de>
10664
10665 * linux-low.c (STACK_SIZE): Define.
10666 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10667 (linux_test_for_tracefork): Likewise.
10668
10669 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10670
10671 * linux-low.c (linux_wait_for_event): Update messages. Do not
10672 reinsert auto-delete breakpoints.
10673 * mem-break.c (struct breakpoint): Change return type of handler to
10674 int.
10675 (set_breakpoint_at): Update handler type.
10676 (reinsert_breakpoint_handler): Return 1 instead of calling
10677 delete_breakpoint.
10678 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10679 setting a new one.
10680 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10681 * mem-break.h (set_breakpoint_at): Update handler type.
10682 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10683 * win32-low.c (auto_delete_breakpoint): New.
10684 (get_child_debug_event): Use it.
10685
10686 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10687
10688 * configure.ac: Check for pread and pwrite.
10689 * hostio.c (handle_pread): Fall back to lseek and read.
10690 (handle_pwrite): Fall back to lseek and write.
10691 * config.in, configure: Regenerated.
10692
10693 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10694
10695 * server.c (myresume): Add own_buf argument.
10696 (main): Update calls.
10697
10698 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10699
10700 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10701 * remote-utils.c (remote_open): Do not call disable_async_io.
10702 (block_async_io): Delete.
10703 (unblock_async_io): Make static.
10704 (initialize_async_io): New.
10705 * server.c (handle_v_cont): Handle async I/O here.
10706 (myresume): Likewise. Move other common resume tasks here...
10707 (main): ... from here. Call initialize_async_io. Disable async
10708 I/O before the main loop.
10709 * server.h (initialize_async_io): Declare.
10710 (block_async_io, unblock_async_io): Delete prototypes.
10711 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10712
10713 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10714
10715 * remote-utils.c (readchar): Allow binary data in received messages.
10716
10717 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10718
10719 * win32-low.c (attaching): New global.
10720 (win32_create_inferior): Clear the `attaching' global.
10721 (win32_attach): Set the `attaching' global.
10722 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10723 attaching. Only set a breakpoint at the entry point if not
10724 attaching.
10725
10726 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10727
10728 * server.c (main): Don't report dll events on the initial
10729 connection on attaches.
10730
10731 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10732
10733 * server.c (main): Relax numerical bases supported for the pid of
10734 the --attach command line argument.
10735
10736 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10737
10738 * win32-low.c (win32_attach): Call OpenProcess before
10739 DebugActiveProcess, not after. Add last error output to error
10740 call.
10741
10742 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10743
10744 * win32-low.c (win32_get_thread_context)
10745 (win32_set_thread_context): New functions.
10746 (thread_rec): Use win32_get_thread_context.
10747 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10748 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10749 field.
10750
10751 2007-12-03 Leo Zayas
10752 Pedro Alves <pedro_alves@portugalmail.pt>
10753
10754 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10755 global variables.
10756 (child_add_thread): Minor cleanup.
10757 (child_continue): Resume artificially suspended threads before
10758 calling ContinueDebugEvent.
10759 (suspend_one_thread): New.
10760 (fake_breakpoint_event): New.
10761 (get_child_debug_event): Change return type to int. Check here if
10762 gdb sent an interrupt request. If a soft interrupt was requested,
10763 fake a breakpoint event. Return 0 if there is no event to handle,
10764 and 1 otherwise.
10765 (win32_wait): Don't check here if gdb sent an interrupt request.
10766 Ensure there is a valid event to handle.
10767 (win32_request_interrupt): Add soft interruption method as last
10768 resort.
10769
10770 2007-12-03 Leo Zayas
10771 Pedro Alves <pedro_alves@portugalmail.pt>
10772
10773 * win32-low.h (win32_thread_info): Add descriptions to the
10774 structure members. Replace `suspend_count' counter by a
10775 `suspended' flag.
10776 * win32-low.c (thread_rec): Update condition of when to get the
10777 context from the inferior. Rely on ContextFlags being set if it
10778 has already been retrieved. Only suspend the inferior thread if
10779 we haven't already. Warn if that fails.
10780 (continue_one_thread): s/suspend_count/suspended/. Only call
10781 ResumeThread once. Warn if that fails.
10782
10783 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10784
10785 * win32-low.c (win32_wait): Don't read from the inferior when it
10786 has already exited.
10787
10788 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10789
10790 * Makefile.in (win32_low_h): New variable.
10791 (win32-low.o): Add dependency on $(win32_low_h).
10792 (win32-arm-low.o, win32-i386-low.o): New rules.
10793
10794 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10795
10796 * hostio.c: Correct copyright year.
10797
10798 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10799
10800 * Makefile.in (OBS): Add hostio.o.
10801 (hostio.o): New rule.
10802 * server.h (handle_vFile): Declare.
10803 * hostio.c: New file.
10804 * server.c (handle_v_requests): Take packet_len and new_packet_len
10805 for binary packets. Call handle_vFile.
10806 (main): Update call to handle_v_requests.
10807
10808 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10809
10810 * linux-low.c: Include <sched.h>.
10811
10812 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10813
10814 * linux-low.c (linux_tracefork_grandchild): New.
10815 (linux_tracefork_child): Use clone.
10816 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10817
10818 2007-10-31 Joel Brobecker <brobecker@adacore.com>
10819
10820 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10821
10822 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10823
10824 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10825
10826 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10827
10828 * inferiors.c (change_inferior_id): Delete.
10829 (add_pid_to_list, pull_pid_from_list): New.
10830 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10831 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10832 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10833 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10834 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10835 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10836 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10837 (using_threads): Always set to 1.
10838 (handle_extended_wait): New.
10839 (add_process): Do not set TID.
10840 (linux_create_inferior): Set must_set_ptrace_flags.
10841 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10842 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10843 (linux_thread_alive): Rename TID argument to LWPID.
10844 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10845 (linux_wait_for_event): Do not use TID or check using_threads. Update
10846 call to dead_thread_notify. Call handle_extended_wait.
10847 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10848 (send_sigstop): Delete sigstop_sent.
10849 (wait_for_sigstop): Avoid TID.
10850 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10851 (linux_test_for_tracefork): New.
10852 (linux_lookup_signals): Use thread_db_active and
10853 linux_supports_tracefork_flag.
10854 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10855 * linux-low.h (get_process_thread): Avoid TID.
10856 (struct process_ifo): Move thread_known and tid to the end. Remove
10857 sigstop_sent.
10858 (linux_attach_lwp, thread_db_init): Update prototypes.
10859 * server.h (change_inferior_id): Delete prototype.
10860 (add_pid_to_list, pull_pid_from_list): New prototypes.
10861 * thread-db.c (thread_db_use_events): New.
10862 (find_first_thread): Rename to...
10863 (find_one_thread): ...this. Update callers and messages. Do not
10864 call fatal. Check thread_db_use_events. Do not call
10865 change_inferior_id or new_thread_notify.
10866 (maybe_attach_thread): Update. Do not call new_thread_notify.
10867 (thread_db_init): Set thread_db_use_events. Check use_events.
10868 * utils.c (fatal, warning): Correct message prefix.
10869
10870 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10871
10872 * Makefile.in (clean): Remove new files.
10873 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10874 (powerpc-64.o, powerpc-64.c): New rules.
10875 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10876 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10877 with SPE.
10878 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10879 SPE targets.
10880 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10881 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10882 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10883 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10884 (target_regsets): Add AltiVec and SPE register sets.
10885 * configure.ac: Check for AltiVec and SPE.
10886 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10887 (ppc_fill_vrregset, ppc_store_vrregset): New.
10888 (target_regsets): Add AltiVec register set.
10889 * configure: Regenerated.
10890
10891 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10892
10893 * linux-low.c (O_LARGEFILE): Define.
10894 (linux_read_memory): Use /proc/PID/mem.
10895 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10896 * configure, config.in: Regenerated.
10897
10898 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10899
10900 * linux-low.c (linux_wait_for_event): Do not pass signals while
10901 single-stepping.
10902
10903 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10904
10905 * win32-low.c (create_process): New.
10906 (win32_create_inferior): Use create_process instead of
10907 CreateProcess. If create_process failed retry appending an ".exe"
10908 suffix. Store the GetLastError result immediatelly after
10909 create_process calls and use it on the call to error.
10910
10911 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10912
10913 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10914
10915 2007-08-23 Joel Brobecker <brobecker@adacore.com>
10916
10917 * configure.ac: Switch license to GPLv3.
10918
10919 2007-08-01 Michael Snyder <msnyder@access-company.com>
10920
10921 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10922
10923 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
10924
10925 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10926 typedef.
10927 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10928 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
10929 CloseToolhelp32Snapshot.
10930 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10931 CloseToolhelp32Snapshot.
10932
10933 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
10934
10935 * server.c (main): Check for inferior exit before main loop.
10936
10937 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
10938
10939 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
10940 instead of on tmp_desc.
10941
10942 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
10943 Daniel Jacobowitz <dan@codesourcery.com>
10944
10945 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
10946 (add_thread): Minor cleanups.
10947 (clear_inferiors): Move lower in the file. Clear the DLL
10948 list.
10949 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
10950 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
10951 (xml_escape_text): New.
10952 * server.c (handle_query): Handle qXfer:libraries:read. Report it
10953 for qSupported.
10954 (handle_v_cont): Report errors.
10955 (gdbserver_version): Update.
10956 (main): Correct size of own_buf. Do not report initial DLL events.
10957 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
10958 (unloaded_dll, xml_escape_text): New.
10959 * win32-low.c (enum target_waitkind): Update comments.
10960 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
10961 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
10962 (win32_EnumProcessModules, win32_GetModuleInformation)
10963 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
10964 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
10965 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
10966 (win32_Module32First, win32_Module32Next, load_toolhelp)
10967 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
10968 (get_child_debug_event): Handle DLL events.
10969 (win32_wait): Likewise.
10970
10971 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10972
10973 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
10974 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
10975
10976 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10977
10978 * win32-low.c (handle_output_debug_string): Ignore event if not
10979 waiting.
10980
10981 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10982
10983 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
10984
10985 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
10986
10987 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
10988
10989 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
10990
10991 * inferiors.c (change_inferior_id): Add comment.
10992 * linux-low.c (check_removed_breakpoint): Add an early
10993 prototype. Improve debug output.
10994 (linux_attach): Doc update.
10995 (linux_detach_one_process, linux_detach): Clean up before releasing
10996 each process.
10997 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
10998 * linux-low.h (struct process_info): Doc improvement.
10999 * mem-break.c (delete_all_breakpoints): New.
11000 * mem-break.h (delete_all_breakpoints): New prototype.
11001 * thread-db.c (find_first_thread): New.
11002 (thread_db_create_event): Call it instead of
11003 thread_db_find_new_threads. Clean up unused variables.
11004 (maybe_attach_thread): Remove first thread handling.
11005 (thread_db_find_new_threads): Use find_first_thread.
11006 (thread_db_get_tls_address): Likewise.
11007
11008 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11009
11010 * thread-db.c (thread_db_find_new_threads): Add prototype.
11011 (thread_db_create_event): Check for the main thread before adding
11012 a new thread.
11013 (maybe_attach_thread): Only enable event reporting if TID == 0.
11014 (thread_db_get_tls_address): Check for new threads.
11015
11016 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11017
11018 * linux-low.c (linux_create_inferior): Try execv before execvp.
11019 * spu-low.c (spu_create_inferior): Likewise.
11020
11021 2007-06-13 Mike Frysinger <vapier@gentoo.org>
11022
11023 * linux-low.c (linux_create_inferior): Change execv to execvp.
11024 * spu-low.c (spu_create_inferior): Likewies.
11025
11026 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11027
11028 * Makefile.in (clean): Clean new files instead of deleted ones.
11029 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11030 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11031 rules.
11032 * configure.srv: Specify XML files and new regformats for MIPS and
11033 MIPS64 GNU/Linux.
11034 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11035 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11036 an entry for the restart register.
11037 (mips_cannot_fetch_register, mips_cannot_store_register)
11038 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11039 register names to match the XML descriptions.
11040 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11041 restart register instead of $0.
11042
11043 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11044 Markus Deuling <deuling@de.ibm.com>
11045
11046 * remote-utils.c (decode_xfer_write): New function.
11047 * server.h (decode_xfer_write): Add prototype.
11048 * server.c (handle_query): Add PACKET_LEN argument. Support
11049 qXfer:spu:read and qXfer:spu:write packets.
11050 (main): Pass packet_len to handle_query.
11051 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11052 * target.h (target_ops): Add qxfer_spu.
11053
11054 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11055
11056 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11057 accessing non-seekable spufs files.
11058
11059 2007-05-16 Markus Deuling <deuling@de.ibm.com>
11060
11061 * server.c (handle_query): Add reply for qC packet.
11062
11063 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11064 Leo Zayas <lerele@champenstudios@com>
11065
11066 * server.h (check_remote_input_interrupt_request): New function.
11067 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11068 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11069 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11070 (check_remote_input_interrupt_request): New function.
11071 * server.h (check_remote_input_interrupt_request): Declare.
11072 * win32-low.c (winapi_DebugBreakProcess,
11073 winapi_GenerateConsoleCtrlEvent): New typedefs.
11074 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11075 to 250 ms.
11076 (win32_wait): Check for remote interrupt request
11077 with check_remote_input_interrupt_request.
11078 (win32_request_interrupt): New function.
11079 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11080
11081 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11082
11083 * win32-low.c (debug_registers_changed,
11084 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11085 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11086 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11087 (thread_rec): Get context using the low target.
11088 (child_add_thread): Call thread_added on the low target,
11089 which does the same thing.
11090 (regptr): Delete.
11091 (do_initial_child_stuff): Remove debug registers references.
11092 Set context using the low target. Resume threads after
11093 setting the contexts.
11094 (child_continue): Remove dead variable. Remove debug
11095 registers references.
11096 (child_fetch_inferior_registers): Go through the low target.
11097 (do_child_store_inferior_registers): Remove.
11098 (child_store_inferior_registers): Go through the low target.
11099 (win32_resume): Remove debug registers references.
11100 Set context using the low target.
11101 (handle_exception): Change return type to void. Don't record
11102 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11103 first chance exception.
11104 (get_child_debug_event): Change return type to void. Remove
11105 goto loop. Always return after waiting for debug event.
11106 (win32_wait): Convert to switch statement. Handle spurious
11107 events.
11108
11109 * win32-i386-low.c (debug_registers_changed,
11110 debug_registers_used): New.
11111 (initial_stuff): Rename to ...
11112 (i386_initial_stuff): ... this. Clear debug registers
11113 state variables.
11114 (store_debug_registers): Delete.
11115 (i386_get_thread_context): New.
11116 (load_debug_registers): Delete.
11117 (i386_set_thread_context): New.
11118 (i386_thread_added): New.
11119 (single_step): Rename to ...
11120 (i386_single_step): ... this.
11121 (do_fetch_inferior_registers): Rename to ...
11122 (i386_fetch_inferior_register): ... this.
11123 (i386_store_inferior_register): New.
11124 (the_low_target): Adapt to new interface.
11125
11126 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11127 (arm_get_thread_context): New.
11128 (arm_set_thread_context): New.
11129 (regptr): New.
11130 (do_fetch_inferior_registers): Rename to ...
11131 (arm_fetch_inferior_register): ... this.
11132 (arm_store_inferior_register): New.
11133 (arm_wince_breakpoint): Reimplement as unsigned long.
11134 (arm_wince_breakpoint_len): Define.
11135 (the_low_target): Adapt to new interface.
11136
11137 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11138 load_debug_registers. Add get_thread_context, set_thread_context,
11139 thread_added and store_inferior_register. Rename
11140 fetch_inferior_registers to fetch_inferior_register.
11141 (regptr): Remove declaration.
11142
11143 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11144
11145 * linux-low.c (linux_detach): Change return type to int. Return 0.
11146 * spu-low.c (spu_detach): Likewise.
11147
11148 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11149
11150 * target.h (target_ops): Change return type of detach to int.
11151 Add join.
11152 (join_inferior): New.
11153 * server.c (main): Don't skip detach support on mingw32.
11154 If the inferior doesn't support detaching return error.
11155 Call join_inferior instead of using waitpid.
11156 * linux-low.c (linux_join): New.
11157 (linux_target_op): Add linux_join.
11158 * spu-low.c (spu_join): New.
11159 (spu_target_ops): Add spu_join.
11160 * win32-low.c (win32_detach): Adapt to new interface.
11161 Reopen current_process_handle before detaching. Issue a child
11162 resume before detaching.
11163 (win32_join): New.
11164 (win32_target_op): Add win32_join.
11165
11166 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11167
11168 * win32-low.c (win32-attach): Fix return value.
11169 * target.h (target_ops): Describe ATTACH return values.
11170
11171 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11172
11173 * win32-low.c (GETPROCADDRESS): Define.
11174 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11175 (winapi_DebugSetProcessKillOnExit): Likewise.
11176 (win32_create_inferior): Force usage of ansi CreateProcessA.
11177 (win32_attach): Use GETPROCADDRESS.
11178 (win32_detach): Likewise.
11179
11180 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11181
11182 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11183
11184 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11185
11186 * win32-low.c: Commit leftover changes from 2007-03-29.
11187
11188 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11189
11190 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11191 fields short instead of int. Add explicit padding.
11192 (i387_cache_to_fsave): Remove unnecessary casts.
11193 (i387_fsave_to_cache): Doc fix.
11194 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11195
11196 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11197
11198 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11199 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11200
11201 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11202
11203 * configure.srv (arm*-*-mingw32ce*): Move near the other
11204 arm targets.
11205
11206 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11207
11208 * configure.ac: Add errno checking.
11209 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11210 sys/file.h and malloc.h.
11211 (AC_CHECK_DECLS): Add perror.
11212 (srv_mingwce): Handle.
11213 * configure.srv (i[34567]86-*-cygwin*): Add
11214 win32-i386-low.o to srv_tgtobj.
11215 (i[34567]86-*-mingw*): Likewise.
11216 (arm*-*-mingw32ce*): Add case.
11217 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11218 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11219 [__MINGW32CE__] (strerror): New function.
11220 [__MINGW32CE__] (errno): Define to GetLastError.
11221 [__MINGW32CE__] (COUNTOF): New macro.
11222 (remote_open): Remove extra close call.
11223 * mem-break.c (delete_breakpoint_at): New function.
11224 * mem-break.h (delete_breakpoint_at): Declare.
11225 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11226 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11227 [USE_WIN32API] (read, write): Add char* casts.
11228 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11229 * server.h: Include wincecompat.h on Windows CE.
11230 [HAVE_ERRNO_H]: Check.
11231 (perror): Declare if not declared.
11232 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11233 (perror_with_name): Remove errno declaration.
11234 * wincecompat.h: New.
11235 * wincecompat.c: New.
11236 * win32-low.h: New.
11237 * win32-arm-low.c: New.
11238 * win32-i386-low.c: New.
11239 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11240 (OUTMSG2): Make it safe.
11241 (_T): New macro.
11242 (COUNTOF): New macro.
11243 (NUM_REGS): Get it from the low target.
11244 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11245 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11246 (thread_rec): Let low target handle debug registers.
11247 (child_add_thread): Likewise.
11248 (child_init_thread_list): Likewise.
11249 (continue_one_thread): Likewise.
11250 (regptr): New.
11251 (do_child_fetch_inferior_registers): Move to ...
11252 * win32-i386-low.c: ... here, and rename to ...
11253 (do_fetch_inferior_registers): ... this.
11254 * win32-low.c (child_fetch_inferior_registers):
11255 Go through the low target.
11256 (do_child_store_inferior_registers): Use regptr.
11257 (strwinerror): New function.
11258 (win32_create_inferior): Handle Windows CE.
11259 Use strwinerror instead of strerror on Windows error
11260 codes. Add program to the error output.
11261 Don't close the main thread handle on Windows CE.
11262 (win32_attach): Use coredll.dll on Windows CE.
11263 (win32_kill): Close current process and current
11264 thread handles.
11265 (win32_detach): Use coredll.dll on Windows CE.
11266 (win32_resume): Let low target handle debug registers, and
11267 step request.
11268 (handle_exception): Add/Remove initial breakpoint. Avoid
11269 non-existant WSTOPSIG on Windows CE.
11270 (win32_read_inferior_memory): Cast to remove warning.
11271 (win32_arch_string): Go through the low target.
11272 (initialize_low): Call set_breakpoint_data with the low
11273 target's breakpoint.
11274 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11275 FOP_REGNUM, mappings): Move to ...
11276 * win32-i386-low.c: ... here.
11277 * win32-low.c (win32_thread_info): Move to ...
11278 * win32-low.h: ... here.
11279 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11280 win32-arm-low.c and wincecompat.c.
11281 (all:): Add $EXEEXT.
11282 (install-only:): Likewise.
11283 (gdbserver:): Likewise.
11284 (gdbreplay:): Likewise.
11285 * config.in: Regenerate.
11286 * configure: Regenerate.
11287
11288 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11289
11290 * win32-low.c: Rename typedef thread_info to
11291 win32_thread_info throughout.
11292
11293 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11294
11295 * win32-i386-low.c: Rename to ...
11296 * win32-low.c: ... this.
11297 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11298 * Makefile.in: Likewise.
11299
11300 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11301
11302 * remote-utils.c (monitor_output): Constify msg parameter.
11303 * server.h (monitor_output): Likewise.
11304 * win32-i386-low.c (handle_output_debug_string): New.
11305 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11306 handle_output_debug_string.
11307 (get_child_debug_event): Likewise.
11308
11309 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11310
11311 * server.c (main): Correct strtoul check.
11312
11313 2007-03-27 Jon Ringle <jon@ringle.org>
11314
11315 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11316
11317 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11318
11319 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11320
11321 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11322
11323 * terminal.h: Check HAVE_SGTTY_H.
11324
11325 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
11326
11327 * remote-utils.c (remote_open): Print out the assigned port number.
11328
11329 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11330
11331 * remote-utils.c (monitor_output): New function.
11332 * server.c (debug_threads): Define here.
11333 (monitor_show_help): New function.
11334 (handle_query): Handle qRcmd.
11335 (main): Do not handle 'd' packet.
11336 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11337 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11338 of debug_threads.
11339
11340 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11341
11342 * Makefile.in (EXEEXT): New.
11343 (clean): Use $(EXEEXT).
11344
11345 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11346
11347 * target.h (target_ops): Rename send_signal to request_interrupt,
11348 and remove enum target_signal parameter.
11349 * linux-low.c (linux_request_interrupt): Rename from
11350 linux_send_signal, and always send SIGINT.
11351 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11352 and always send SIGINT.
11353 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11354 of send_signal.
11355 (input_interrupt): Likewise.
11356
11357 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11358
11359 * server.c (get_features_xml): Check if target implemented
11360 arch_string.
11361 * win32-i386-low.c (win32_arch_string): New.
11362 (win32_target_ops): Add win32_arch_string as arch_string member.
11363
11364 2007-02-22 Markus Deuling <deuling@de.ibm.com>
11365
11366 * spu-low.c (spu_arch_string): New.
11367 (spu_target_ops): Add spu_arch_string.
11368
11369 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11370
11371 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11372 * configure.ac: Do not check for terminal.h.
11373 * configure, config.in: Regenerated.
11374
11375 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11376
11377 * Makefile.in (OBS): Add $(XML_BUILTIN).
11378 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11379 (clean): Update.
11380 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11381 (arm-with-iwmmxt.c): New.
11382 * config.in, configure: Regenerate.
11383 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11384 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11385 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11386 (arm*-*-linux*): Add iWMMXt and regset support.
11387 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11388 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11389 (arm_store_wmmxregset, target_regsets): New.
11390 * server.c (get_features_xml): Take annex argument. Check builtin
11391 XML documents.
11392 (handle_query): Handle multiple annexes.
11393
11394 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11395
11396 * remote-utils.c [USE_WIN32API] (read, write): Define.
11397 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11398 write.
11399
11400 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11401
11402 * linux-i386-low.c (the_low_target): Set arch_string.
11403 * linux-x86-64-low.c (the_low_target): Likewise.
11404 * linux-low.c (linux_arch_string): New.
11405 (linux_target_ops): Add it.
11406 * linux-low.h (struct linux_target_ops): Add arch_string.
11407 * server.c (write_qxfer_response): Use const void * for DATA.
11408 (get_features_xml): New.
11409 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11410 * target.h (struct target_ops): Add arch_string method.
11411
11412 2007-01-03 Denis Pilat <denis.pilat@st.com>
11413 Daniel Jacobowitz <dan@codesourcery.com>
11414
11415 * linux-low.c (linux_kill): Handle being called with no threads.
11416 * win32-i386-low.c (win32_kill): Likewise.
11417 (get_child_debug_event): Clear current_process_handle.
11418
11419 2006-12-30 Denis PILAT <denis.pilat@st.com>
11420 Daniel Jacobowitz <dan@codesourcery.com>
11421
11422 * remote-utils.c (remote_open): Check the type of specified
11423 serial port devices before opening them.
11424 * server.c (main): Kill the inferior if an error occurs during
11425 the first remote_open.
11426
11427 2006-12-05 Markus Deuling <deuling@de.ibm.com>
11428
11429 * README: Update supported targets.
11430
11431 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11432
11433 * Makefile.in (clean): Remove reg-mips64.c.
11434 (reg-mips64.c, reg-mips64.o): New rules.
11435 * configure.srv: Handle mips64. Include regset support for mips.
11436 * linux-mips-low.c (union mips_register): New.
11437 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11438 (mips_breakpoint, mips_breakpoint_at): Use int.
11439 (mips_collect_register, mips_supply_register)
11440 (mips_collect_register_32bit, mips_supply_register_32bit)
11441 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11442 (mips_store_fpregset, target_regsets): New.
11443 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11444
11445 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11446
11447 * configure.srv: Add target "spu*-*-*".
11448 * Makefile.in (clean): Remove reg-spu.c.
11449 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11450 * spu-low.c: New file.
11451
11452 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11453
11454 * configure.ac: Correct td_thr_tls_get_addr test.
11455 * configure: Regenerated.
11456
11457 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11458
11459 * linux-low.c (linux_wait_for_event): Reformat. Use the
11460 pass_signals array.
11461 * remote-utils.c (decode_address_to_semicolon): New.
11462 * server.c (pass_signals, handle_general_set): New.
11463 (handle_query): Mention QPassSignals for qSupported.
11464 (main): Call handle_general_set.
11465 * server.h (pass_signals, decode_address_to_semicolon): New.
11466
11467 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11468
11469 * server.c (handle_query): Correct error handling for read_auxv.
11470
11471 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11472
11473 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11474 and srv_linux_thread_db to yes.
11475 * linux-s390-low.c (s390_fill_gregset): New function.
11476 (target_regsets): Define data structure.
11477
11478 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11479
11480 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11481 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11482 * config.in, configure: Regenerated.
11483 * inferiors.c (gdb_id_to_thread): New function.
11484 (gdb_id_to_thread_id): Use it.
11485 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11486 * linux-low.h (struct process_info): Add th member.
11487 (thread_db_get_tls_address): New prototype.
11488 * remote-utils.c (decode_address): Make non-static.
11489 * server.c (handle_query): Handle qGetTLSAddr.
11490 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11491 * target.h (struct target_ops): Add get_tls_address.
11492 * thread-db.c (maybe_attach_thread): Save the thread handle.
11493 (thread_db_get_tls_address): New.
11494
11495 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11496
11497 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11498 (linux_resume_one_process): Take a siginfo_t *. Update all
11499 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11500 (struct pending_signals): Add a siginfo_t.
11501 (linux_wait_for_process): Always set last_status.
11502 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11503 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11504 * linux-low.h (struct process_info): Add last_status.
11505
11506 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11507
11508 * remote-utils.c (try_rle): New function.
11509 (putpkt_binary): Use it.
11510
11511 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11512
11513 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11514 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11515 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11516 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11517 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11518 point registers.
11519
11520 2006-08-08 Richard Sandiford <richard@codesourcery.com>
11521
11522 * server.c (terminal_fd): New variable.
11523 (old_foreground_pgrp): Likewise.
11524 (restore_old_foreground_pgrp): New function.
11525 (start_inferior): Record the terminal file descriptor in terminal_fd
11526 and its original foreground group in old_foreground_pgrp. Register
11527 restore_old_foreground_pgrp with atexit().
11528
11529 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11530
11531 * server.c (handle_query): Correct qPart to qXfer.
11532
11533 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11534
11535 * configure.ac: Check for more headers which are missing on
11536 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11537 * configure.srv: Add Cygwin and mingw32.
11538 * remote-utils.c: Don't include headers unconditionally which
11539 are missing on mingw32. Include <winsock.h> for mingw32.
11540 (remote_open): Adjust for mingw32 support. Flush
11541 standard error after writing to it.
11542 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11543 (unblock_async_io, enable_async_io, disable_async_io)
11544 (readchar, getpkt): Update for Winsock support.
11545 (prepare_resume_reply): Expect a protocol signal number.
11546 * server.c: Disable <sys/wait.h> on mingw32.
11547 (start_inferior): Adjust for mingw32 support. Flush
11548 standard error after writing to it.
11549 (attach_inferior): Likewise. Use protocol signal
11550 numbers.
11551 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11552 and names.
11553 * win32-i386-low.c: New file.
11554 * Makefile.in (XM_CLIBS): Set.
11555 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11556 (win32-i386-low.o): New dependency rule.
11557 * linux-low.c (linux_wait): Use target signal numbers.
11558 * target.h (struct target_ops): Doc fix.
11559 * server.h (target_signal_to_name): New prototype.
11560 * gdbreplay.c: Don't include headers unconditionally which
11561 are missing on mingw32. Include <winsock.h> for mingw32.
11562 (remote_close, remote_open): Adjust for Winsock support.
11563 * configure, config.in: Regenerated.
11564
11565 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11566
11567 * server.c (decode_xfer_read, write_qxfer_response): New.
11568 (handle_query): Take a packet length argument. Handle
11569 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11570 the qSupported response.
11571 (main): Update call to handle_query.
11572
11573 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11574
11575 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11576 (putpkt_binary): Renamed from putpkt and adjusted for binary
11577 data.
11578 (putpkt): New wrapper for putpkt_binary.
11579 (readchar): Don't mask off the high bit.
11580 (decode_X_packet): New function.
11581 * server.c (main): Call putpkt_binary if a handler sets the packet
11582 length. Save the length of the incoming packet. Handle 'X'.
11583 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11584
11585 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11586
11587 * server.c (handle_query): Handle qSupported.
11588
11589 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11590
11591 * remote-utils.c (all_symbols_looked_up): New variable.
11592 (look_up_one_symbol): Check it.
11593 * server.h (look_up_one_symbol): New declaration.
11594 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11595
11596 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11597
11598 * Makefile.in (linux-arm-low.o): Update dependencies.
11599 * linux-arm-low.c: Include "gdb_proc_service.h".
11600 (PTRACE_GET_THREAD_AREA): Define.
11601 (ps_get_thread_area): New function.
11602
11603 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11604
11605 * configure.srv (m68k*-*-uclinux*): New target.
11606 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11607 (linux_resume_one_process): Remove extraneous cast.
11608 (linux_read_offsets): New.
11609 (linux_target_op): Add linux_read_offsets on mmuless systems.
11610 * server.c (handle_query): Add qOffsets logic.
11611 * target.h (struct target_ops): Add read_offsets.
11612
11613 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11614
11615 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11616 (PTRACE_GET_THREAD_AREA): Define.
11617 (ps_get_thread_area): New function.
11618 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11619 (linux-x86-64-low.o): Update.
11620
11621 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11622
11623 * configure.ac: Remove checks for prfpregset_t.
11624 * gdb_proc_service.h: New file.
11625 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11626 new "gdb_proc_service.h".
11627 * proc-service.c: Likewise.
11628 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11629 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11630 * Makefile.in (gdb_proc_service_h): Updated.
11631 * configure, config.in: Regenerated.
11632
11633 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11634
11635 * remote-utils.c (prepare_resume_reply): Move declaration
11636 of gdb_id_from_wait to the top of the block.
11637
11638 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11639
11640 * linux-low.c (regsets_store_inferior_registers): Read the regset
11641 from the target before filling it.
11642
11643 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11644
11645 * server.c (attach_inferior): Return SIGTRAP for a successful
11646 attach.
11647
11648 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11649
11650 * Makefile.in (OBS): Add version.o.
11651 (STAGESTUFF): Delete.
11652 (version.o): Add dependencies.
11653 (version.c): Replace rule.
11654 (clean): Remove version.c.
11655 * server.c (gdbserver_version): New.
11656 (gdbserver_usage): Use printf.
11657 (main): Handle --version and --help.
11658 * server.h (version, host_name): Add declarations.
11659
11660 2005-12-23 Eli Zaretskii <eliz@gnu.org>
11661
11662 * linux-arm-low.c:
11663 * linux-arm-low.c:
11664 * inferiors.c:
11665 * i387-fp.h:
11666 * i387-fp.c:
11667 * gdbreplay.c:
11668 * regcache.c:
11669 * proc-service.c:
11670 * mem-break.h:
11671 * mem-break.c:
11672 * linux-x86-64-low.c:
11673 * linux-sh-low.c:
11674 * linux-s390-low.c:
11675 * linux-ppc64-low.c:
11676 * linux-ppc-low.c:
11677 * linux-mips-low.c:
11678 * linux-m68k-low.c:
11679 * linux-m32r-low.c:
11680 * linux-low.h:
11681 * linux-low.c:
11682 * linux-ia64-low.c:
11683 * linux-i386-low.c:
11684 * linux-crisv32-low.c:
11685 * thread-db.c:
11686 * terminal.h:
11687 * target.h:
11688 * target.c:
11689 * server.h:
11690 * server.c:
11691 * remote-utils.c:
11692 * regcache.h:
11693 * utils.c:
11694 * Makefile.in:
11695 * configure.ac:
11696 * gdbserver.1: Add (C) after Copyright. Update the FSF
11697 address.
11698
11699 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11700
11701 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11702 (arm_breakpoint_at): Recognize both breakpoints.
11703 (the_low_target): Use the correct breakpoint instruction.
11704
11705 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11706
11707 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11708 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11709 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11710 (the_low_target): Update.
11711
11712 2005-10-25 Andreas Schwab <schwab@suse.de>
11713
11714 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11715
11716 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11717 (ia64_num_regs): Reduce to 462.
11718
11719 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11720
11721 * acinclude.m4: Correct quoting.
11722 * aclocal.m4: Regenerated.
11723
11724 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11725 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11726 (thread_db_init): Call thread_db_err_str.
11727 * configure.ac: Check for TD_VERSION.
11728 * config.in, configure: Regenerated.
11729
11730 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11731
11732 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11733
11734 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11735
11736 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11737 is not available. Define HAVE_PTRACE_GETREGS if it is.
11738 * config.in, configure: Regenerated.
11739 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11740 * linux-i386-low.c, linux-m68k-low.c: Update to use
11741 HAVE_PTRACE_GETREGS.
11742 * linux-low.c (regsets_fetch_inferior_registers)
11743 (regsets_store_inferior_registers): Only return 0 if we processed
11744 GENERAL_REGS.
11745 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11746 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11747
11748 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11749
11750 * inferiors.c (struct thread_info): Add gdb_id.
11751 (add_thread): Add gdb_id argument.
11752 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11753 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11754 calls to add_thread.
11755 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11756 * server.c (handle_query): Use thread_to_gdb_id.
11757 (handle_v_cont, main): Use gdb_id_to_thread_id.
11758 * server.h (add_thread): Update prototype.
11759 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11760 prototypes.
11761
11762 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11763
11764 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11765 left-padded registers.
11766 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11767 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11768
11769 2005-07-01 Steve Ellcey <sje@cup.hp.com>
11770
11771 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11772 * configure: Regenerate.
11773 * config.in: Regenerate.
11774 * server.h (NEED_DECLARATION_STRERROR):
11775 Replace with !HAVE_DECL_STRERROR.
11776
11777 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11778
11779 * linux-low.c (linux_wait, linux_send_signal): Don't test
11780 an unsigned long variable for > 0 if it could be MAX_ULONG.
11781 * server.c (myresume): Likewise.
11782 * target.c (set_desired_inferior): Likewise.
11783
11784 2005-06-13 Mark Kettenis <kettenis@gnu.org>
11785
11786 * configure.ac: Simplify and improve check for socklen_t.
11787 * configure, config.in: Regenerate.
11788
11789 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11790
11791 * acconfig.h: Remove.
11792 * configure.ac: Add a test for socklen_t. Use three-argument
11793 AC_DEFINE throughout.
11794 * config.in: Regenerated using autoheader 2.59.
11795 * configure: Regenerated.
11796
11797 * gdbreplay.c (socklen_t): Provide a default.
11798 (remote_open): Use socklen_t.
11799 * remote-utils.c (socklen_t): Provide a default.
11800 (remote_open): Use socklen_t.
11801 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11802 unsigned char.
11803
11804 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11805 char for buffers.
11806 * linux-low.c (linux_read_memory, linux_write_memory)
11807 (linux_read_auxv): Likewise.
11808 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11809 (check_mem_write): Likewise.
11810 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11811 Likewise.
11812 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11813 (registers_from_string, register_data): Likewise.
11814 * server.c (handle_query, main): Likewise.
11815 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11816 (decode_M_packet): Likewise.
11817 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11818 * target.h (struct target_ops): Update read_memory, write_memory,
11819 and read_auxv.
11820 (read_inferior_memory, write_inferior_memory): Update.
11821 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11822 to unsigned char *.
11823 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11824 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11825 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11826 linux-s390-low.c, linux-sh-low.c: Update for changes in
11827 read_inferior_memory and the_low_target->breakpoint.
11828
11829 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11830
11831 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11832 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11833 * configure.srv: Add powerpc64-*-linux*.
11834 * linux-ppc64-low.c: New file.
11835
11836 2005-05-23 Orjan Friberg <orjanf@axis.com>
11837
11838 * linux-cris-low.c: New file with support for CRIS.
11839 * linux-crisv32-low.c: Ditto for CRISv32.
11840 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11841 (clean): Add reg-cris.c and reg-crisv32.c.
11842 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
11843 reg-crisv32.o, and reg-crisv32.c to make rules.
11844 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11845 recognized targets.
11846
11847 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11848
11849 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11850 of sizeof (PTRACE_XFER_TYPE).
11851 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11852
11853 2005-05-12 Orjan Friberg <orjanf@axis.com>
11854
11855 * target.h (struct target_ops): Add insert_watchpoint,
11856 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11857 pointers for hardware watchpoint support.
11858 * linux-low.h (struct linux_target_ops): Ditto.
11859 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11860 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11861 to linux_target_ops.
11862 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11863 reply packet.
11864 * server.c (main): Recognize 'Z' and 'z' packets.
11865
11866 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11867
11868 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11869 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11870 (the_low_target): Add new members.
11871
11872 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11873
11874 * proc-service.c (ps_lgetregs): Search all_processes instead of
11875 all_threads.
11876
11877 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11878
11879 * server.c (start_inferior): Change return type to int.
11880 (attach_inferior): Change sigptr to int *.
11881 (handle_v_cont, handle_v_requests): Change signal to int *.
11882 (main): Change signal to int.
11883
11884 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
11885
11886 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11887 * configure.srv: Add m32r*-*-linux*.
11888 * linux-m32r-low.c: New file.
11889
11890 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11891
11892 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11893
11894 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11895
11896 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11897 Take unsigned long arguments for PIDs.
11898 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11899 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11900 (wait_for_sigstop, linux_resume_one_process)
11901 (regsets_fetch_inferior_registers, linux_send_signal)
11902 (linux_read_auxv): Likewise. Update the types of variables holding
11903 PIDs. Update format string specifiers.
11904 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11905 * remote-utils.c (prepare_resume_reply): Likewise.
11906 * server.c (cont_thread, general_thread, step_thread)
11907 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11908 unsigned long.
11909 (handle_query): Update format specifiers.
11910 (handle_v_cont, main): Use strtoul for thread IDs.
11911 * server.h (struct inferior_list_entry): Use unsigned long for ID.
11912 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11913 (general_thread, step_thread, thread_from_wait)
11914 (old_thread_from_wait): Update.
11915 * target.h (struct thread_resume): Use unsigned long for THREAD.
11916 (struct target_ops): Use unsigned long for arguments to attach and
11917 thread_alive.
11918
11919 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
11920
11921 * acinclude.m4: Include bfd/bfd.m4 directly.
11922 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
11923 <agriffis@toolchain.org>.
11924 * aclocal.m4, configure: Regenerated.
11925
11926 2005-01-07 Andrew Cagney <cagney@gnu.org>
11927
11928 * configure.ac: Rename configure.in, require autoconf 2.59.
11929 * configure: Re-generate.
11930
11931 2004-12-08 Daniel Jacobowitz <dan@debian.org>
11932
11933 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
11934 LIBS when finished.
11935 * aclocal.m4: Regenerated.
11936 * configure: Regenerated.
11937
11938 2004-11-21 Andreas Schwab <schwab@suse.de>
11939
11940 * linux-m68k-low.c (m68k_num_gregs): Define.
11941 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
11942 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
11943 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
11944 (m68k_breakpoint_at): New. Add to the_low_target.
11945
11946 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
11947 srv_linux_thread_db to yes.
11948
11949 2004-10-20 Joel Brobecker <brobecker@gnat.com>
11950
11951 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
11952 (ARCH_SET_FS): Likewise.
11953 (ARCH_GET_FS): Likewise.
11954 (ARCH_GET_GS): Likewise.
11955
11956 2004-10-16 Daniel Jacobowitz <dan@debian.org>
11957
11958 * linux-i386-low.c (ps_get_thread_area): New.
11959 * linux-x86-64-low.c (ps_get_thread_area): New.
11960 * linux-low.c: Include <sys/syscall.h>.
11961 (linux_kill_one_process): Don't kill the first thread here.
11962 (linux_kill): Kill the first thread here.
11963 (kill_lwp): New function.
11964 (send_sigstop, linux_send_signal): Use it.
11965 * proc-service.c: Clean up #ifdefs.
11966 (fpregset_info): Delete.
11967 (ps_lgetregs): Update and enable implementation.
11968 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
11969 implementations.
11970 * remote-utils.c (struct sym_cache, symbol_cache): New.
11971 (input_interrupt): Print a clearer message.
11972 (async_io_enabled): New variable.
11973 (enable_async_io, disable_async_io): Use it. Update comments.
11974 (look_up_one_symbol): Use the symbol cache.
11975 * thread-db.c (thread_db_look_up_symbols): New function.
11976 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
11977
11978 2004-10-16 Daniel Jacobowitz <dan@debian.org>
11979
11980 * configure.in: Test for -rdynamic.
11981 * configure: Regenerated.
11982 * Makefile (INTERNAL_LDFLAGS): New.
11983 (gdbserver, gdbreplay): Use it.
11984
11985 2004-09-02 Andrew Cagney <cagney@gnu.org>
11986
11987 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
11988
11989 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
11990
11991 * linux-low.c (linux_wait): Clear all_processes list also.
11992
11993 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
11994
11995 * linux-low.c: Include <errno.h>. Remove extern declaration of
11996 errno.
11997
11998 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
11999
12000 * gdbreplay.c, server.h, utils.c: Update copyright years.
12001
12002 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12003
12004 * server.c (main): Print child status or termination signal from
12005 variable 'signal', not 'sig'.
12006
12007 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12008
12009 * linux-low.c (linux_read_memory): Change return type to
12010 int. Check for and return error from ptrace().
12011 * target.c (read_inferior_memory): Change return type to int. Pass
12012 back return status from the_target->read_memory().
12013 * target.h (struct target_ops): Adapt *read_memory() prototype.
12014 Update comment.
12015 (read_inferior_memory): Adapt prototype.
12016 * server.c (main): Return an error packet if
12017 read_inferior_memory() returns an error.
12018
12019 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
12020
12021 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12022 Unify with other clean targets.
12023
12024 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12025
12026 * server.c (handle_v_cont): Call set_desired_inferior.
12027
12028 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12029
12030 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12031
12032 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12033
12034 * linux-low.c (linux_wait): Unblock async I/O.
12035 (linux_resume): Block and enable async I/O.
12036 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12037 * server.h (block_async_io, unblock_async_io): Add prototypes.
12038
12039 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12040
12041 * remote-utils.c (remote_open): Print a status notice after
12042 opening a TCP port.
12043 * server.c (attach_inferior): Print a status notice after
12044 attaching.
12045
12046 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12047
12048 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12049
12050 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
12051
12052 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12053 error packet.
12054 * server.c, target.h: Update copyright years.
12055
12056 2004-02-25 Roland McGrath <roland@redhat.com>
12057
12058 * target.h (struct target_ops): New member `read_auxv'.
12059 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12060 * linux-low.c (linux_read_auxv): New function.
12061 (linux_target_ops): Initialize `read_auxv' member to that.
12062
12063 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12064
12065 Committed by Jim Blandy <jimb@redhat.com>.
12066
12067 * linux-s390-low.c (s390_num_regs): Update.
12068 (s390_regmap): Remove control registers. Use __s390x__ predefine
12069 instead of GPR_SIZE to distiguish s390 and s390x targets.
12070
12071 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
12072
12073 * linux-low.c: Update copyright year.
12074 (check_removed_breakpoint): Clear pending_is_breakpoint.
12075 (linux_set_resume_request, linux_queue_one_thread)
12076 (resume_status_pending_p): New functions.
12077 (linux_continue_one_thread): Use process->resume.
12078 (linux_resume): Only resume threads if there are no pending events.
12079 * linux-low.h (struct process_info): Add resume request
12080 pointer.
12081
12082 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
12083
12084 * regcache.c (new_register_cache): Clear the allocated register
12085 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12086
12087 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
12088
12089 * linux-low.c (linux_resume): Take a struct thread_resume *
12090 argument.
12091 (linux_wait): Update call.
12092 (resume_ptr): New static variable.
12093 (linux_continue_one_thread): Renamed from
12094 linux_continue_one_process. Use resume_ptr.
12095 (linux_resume): Use linux_continue_one_thread.
12096 * server.c (handle_v_cont, handle_v_requests): New functions.
12097 (myresume): New function.
12098 (main): Handle 'v' case.
12099 * target.h (struct thread_resume): New type.
12100 (struct target_ops): Change argument of "resume" to struct
12101 thread_resume *.
12102 (myresume): Delete macro.
12103
12104 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12105
12106 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12107 (uninstall): Support DESTDIR.
12108
12109 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12110
12111 * configure.srv: Add xscale*linux copy of arm*linux entry.
12112
12113 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
12114
12115 * linux-arm-low.c (arm_reinsert_addr): New function.
12116 (the_low_target): Add arm_reinsert_addr.
12117
12118 2003-07-08 Mark Kettenis <kettenis@gnu.org>
12119
12120 * mem-break.c: Remove whitespace at end of file.
12121
12122 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12123
12124 * configure.in: Check whether we need to prototype strerror.
12125 * server.h: Optionally prototype strerror.
12126 * gdbreplay.c (perror_with_name): Use strerror.
12127 * linux-low.c (linux_attach_lwp): Use strerror.
12128 * utils.c (perror_with_name): Use strerror.
12129 * config.in, configure: Regenerated.
12130
12131 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12132
12133 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12134 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12135
12136 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
12137
12138 * Makefile.in (SFILES): Update.
12139 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12140 low-sun3.c: Remove files.
12141
12142 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
12143
12144 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12145 (linux_detach_one_process, linux_detach): New functions.
12146 (linux_target_ops): Add linux_detach.
12147 * server.c (main): Handle 'D' packet.
12148 * target.h (struct target_ops): Add "detach" member.
12149 (detach_inferior): Define.
12150
12151 2003-06-13 Mark Kettenis <kettenis@gnu.org>
12152
12153 From Kelley Cook <kelleycook@wideopenwest.com>:
12154 * configure.srv: Accept i[34567]86 variants.
12155
12156 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
12157
12158 * linux-low.c (linux_wait_for_event): Correct comment typos.
12159 (linux_resume_one_process): Call check_removed_breakpoint.
12160 (linux_send_signal): New function.
12161 (linux_target_ops): Add linux_send_signal.
12162 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12163 of kill.
12164 * target.h (struct target_ops): Add send_signal.
12165
12166 2003-05-29 Jim Blandy <jimb@redhat.com>
12167
12168 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12169 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12170 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12171 away part of the register's value.
12172
12173 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
12174
12175 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12176 (linux_wait_for_event, linux_init_signals): Likewise.
12177
12178 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
12179
12180 * configure.in: Check for stdlib.h.
12181 * configure: Regenerated.
12182 * config.in: Regenerated.
12183
12184 2003-01-04 Andreas Schwab <schwab@suse.de>
12185
12186 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12187
12188 2003-01-02 Andrew Cagney <ac131313@redhat.com>
12189
12190 * Makefile.in: Remove obsolete code.
12191
12192 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
12193
12194 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12195 defined(PT_FPR0_HI).
12196
12197 2002-11-17 Stuart Hughes <seh@zee2.com>
12198
12199 * linux-arm-low.c (arm_num_regs): Increase.
12200 (arm_regmap): Include status register.
12201
12202 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
12203
12204 * linux-low.c (register_addr): Remove incorrect -1 check.
12205
12206 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
12207
12208 * linux-low.c (linux_create_inferior): Call setpgid. Return
12209 the new PID.
12210 (unstopped_p, linux_signal_pid): Remove.
12211 (linux_target_ops): Remove linux_signal_pid.
12212 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12213 global instead of target method.
12214 * target.h (struct target_ops): Remove signal_pid. Update comment
12215 for create_inferior.
12216 * server.c (signal_pid): New variable.
12217 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
12218 gdbserver. Set the child to be the foreground process group.
12219 (attach_inferior): Set signal_pid.
12220
12221 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
12222
12223 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12224
12225 2002-08-20 Jim Blandy <jimb@redhat.com>
12226
12227 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12228 default for this.
12229
12230 2002-08-01 Andrew Cagney <cagney@redhat.com>
12231
12232 * Makefile.in: Make chill references obsolete.
12233
12234 2002-07-24 Kevin Buettner <kevinb@redhat.com>
12235
12236 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12237 * configure: Regenerate.
12238 * config.in: Regenerate.
12239
12240 2002-07-09 David O'Brien <obrien@FreeBSD.org>
12241
12242 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12243 (perror_with_name, remote_close, remote_open, expect, play): Static.
12244
12245 2002-07-04 Michal Ludvig <mludvig@suse.cz>
12246
12247 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
12248 byte offsets instead of an array of indexes.
12249 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12250
12251 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
12252
12253 * regcache.c: Add comment.
12254
12255 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
12256
12257 * thread-db.c: New file.
12258 * proc-service.c: New file.
12259 * acinclude.m4: New file.
12260 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12261 proc-service.o, and thread-db.o.
12262 (linux-low.o): Add USE_THREAD_DB.
12263 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12264 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12265 * aclocal.m4: Regenerated.
12266 * config.in: Regenerated.
12267 * configure: Regenerated.
12268 * configure.in: Check for proc_service.h, sys/procfs.h,
12269 thread_db.h, and linux/elf.h headrs.
12270 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12271 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12272 Check for -lthread_db and thread support.
12273 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12274 PowerPC, and SuperH.
12275 * i387-fp.c: Constify arguments.
12276 * i387-fp.h: Likewise.
12277 * inferiors.c: (struct thread_info): Renamed from
12278 `struct inferior_info'. Remove PID member. Use generic inferior
12279 list header. All uses updated.
12280 (inferiors, signal_pid): Removed.
12281 (all_threads): New variable.
12282 (get_thread): Define.
12283 (add_inferior_to_list): New function.
12284 (for_each_inferior): New function.
12285 (change_inferior_id): New function.
12286 (add_inferior): Removed.
12287 (remove_inferior): New function.
12288 (add_thread): New function.
12289 (free_one_thread): New function.
12290 (remove_thread): New function.
12291 (clear_inferiors): Use for_each_inferior and free_one_thread.
12292 (find_inferior): New function.
12293 (find_inferior_id): New function.
12294 (inferior_target_data): Update argument type.
12295 (set_inferior_target_data): Likewise.
12296 (inferior_regcache_data): Likewise.
12297 (set_inferior_regcache_data): Likewise.
12298 * linux-low.c (linux_bp_reinsert): Remove.
12299 (all_processes, stopping_threads, using_thrads)
12300 (struct pending_signals, debug_threads, pid_of): New.
12301 (inferior_pid): Replace with macro.
12302 (struct inferior_linux_data): Remove.
12303 (get_stop_pc, add_process): New functions.
12304 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12305 Use add_process and add_thread.
12306 (linux_attach_lwp): New function, based on old linux_attach. Use
12307 add_process and add_thread. Set stop_expected for new threads.
12308 (linux_attach): New function.
12309 (linux_kill_one_process): New function.
12310 (linux_kill): Kill all LWPs.
12311 (linux_thread_alive): Use find_inferior_id.
12312 (check_removed_breakpoints, status_pending_p): New functions.
12313 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12314 Update. Use WNOHANG. Wait for cloned processes also. Update process
12315 struct for the found process.
12316 (linux_wait_for_event): New function.
12317 (linux_wait): Use it. Support LWPs.
12318 (send_sigstop, wait_for_sigstop, stop_all_processes)
12319 (linux_resume_one_process, linux_continue_one_process): New functions.
12320 (linux_resume): Support LWPs.
12321 (REGISTER_RAW_SIZE): Remove.
12322 (fetch_register): Use register_size instead. Call supply_register.
12323 (usr_store_inferior_registers): Likewise. Call collect_register.
12324 Fix recursive case.
12325 (regsets_fetch_inferior_registers): Improve error message.
12326 (regsets_store_inferior_registers): Add debugging.
12327 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12328 (unstopped_p, linux_signal_pid): New functions.
12329 (linux_target_ops): Add linux_signal_pid.
12330 (linux_init_signals): New function.
12331 (initialize_low): Call it. Initialize using_threads.
12332 * regcache.c (inferior_regcache_data): Add valid
12333 flag.
12334 (get_regcache): Fetch registers lazily. Add fetch argument
12335 and update all callers.
12336 (regcache_invalidate_one, regcache_invalidate): New
12337 functions.
12338 (new_register_cache): Renamed from create_register_cache.
12339 Return the new regcache.
12340 (free_register_cache): Change argument to a void *.
12341 (registers_to_string, registers_from_string): Call get_regcache
12342 with fetch flag set.
12343 (register_data): Make static. Pass fetch flag to get_regcache.
12344 (supply_register): Call get_regcache with fetch flag clear.
12345 (collect_register): Call get_regcache with fetch flag set.
12346 (collect_register_as_string): New function.
12347 * regcache.h: Update.
12348 * remote-utils.c (putpkt): Flush after debug output and use
12349 stderr.
12350 Handle input interrupts while waiting for an ACK.
12351 (input_interrupt): Use signal_pid method.
12352 (getpkt): Flush after debug output and use stderr.
12353 (outreg): Use collect_register_as_string.
12354 (new_thread_notify, dead_thread_notify): New functions.
12355 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12356 and general_thread.
12357 (look_up_one_symbol): Flush after debug output.
12358 * server.c (step_thread, server_waiting): New variables.
12359 (start_inferior): Don't use signal_pid. Update call to mywait.
12360 (attach_inferior): Update call to mywait.
12361 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12362 (main): Don't fetch/store registers explicitly. Use
12363 set_desired_inferior. Support proposed ``Hs'' packet. Update
12364 calls to mywait.
12365 * server.h: Update.
12366 (struct inferior_list, struct_inferior_list_entry): New.
12367 * target.c (set_desired_inferior): New.
12368 (write_inferior_memory): Constify.
12369 (mywait): New function.
12370 * target.h: Update.
12371 (struct target_ops): New signal_pid method.
12372 (mywait): Removed macro, added prototype.
12373
12374 * linux-low.h (regset_func): Removed.
12375 (regset_fill_func, regset_store_func): New.
12376 (enum regset_type): New.
12377 (struct regset_info): Add type field. Use new operation types.
12378 (struct linux_target_ops): stop_pc renamed to get_pc.
12379 Add decr_pc_after_break and breakpoint_at.
12380 (get_process, get_thread_proess, get_process_thread)
12381 (strut process_info, all_processes, linux_attach_lwp)
12382 (thread_db_init): New.
12383
12384 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12385 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12386 (the_low_target): Add new members.
12387 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12388 (i386_store_fpxregset): Constify.
12389 (target_regsets): Add new kind identifier.
12390 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12391 (i386_set_pc): Add debugging.
12392 (i386_breakpoint_at): New function.
12393 (the_low_target): Add new members.
12394 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12395 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12396 (mips_breakpoint_at): New.
12397 (the_low_target): Add new members.
12398 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12399 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12400 (the_low_target): Add new members.
12401 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12402 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12403 (the_low_target): Add new members.
12404 * linux-x86-64-low.c (target_regsets): Add new kind
12405 identifier.
12406
12407 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
12408
12409 From Martin Pool <mbp@samba.org>:
12410 * server.c (gdbserver_usage): New function.
12411 (main): Call it.
12412
12413 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
12414
12415 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12416 stop_at -> stop_pc.
12417
12418 2002-05-04 Andrew Cagney <ac131313@redhat.com>
12419
12420 * Makefile.in: Remove obsolete code.
12421
12422 2002-04-24 Michal Ludvig <mludvig@suse.cz>
12423
12424 * linux-low.c (regsets_fetch_inferior_registers),
12425 (regsets_store_inferior_registers): Removed cast to int from
12426 ptrace() calls.
12427 * regcache.h: Added declaration of struct inferior_info.
12428
12429 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12430
12431 * inferiors.c (struct inferior_info): Add regcache_data.
12432 (add_inferior): Call create_register_cache.
12433 (clear_inferiors): Call free_register_cache.
12434 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12435 * regcache.c (struct inferior_regcache_data): New.
12436 (registers): Remove.
12437 (get_regcache): New function.
12438 (create_register_cache, free_register_cache): New functions.
12439 (set_register_cache): Don't initialize the register cache here.
12440 (registers_to_string, registers_from_string, register_data): Call
12441 get_regcache.
12442 * regcache.h: Add prototypes.
12443 * server.h: Likewise.
12444
12445 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12446
12447 * mem-break.c: New file.
12448 * mem-break.h: New file.
12449 * Makefile.in: Add mem-break.o rule; update server.h
12450 dependencies.
12451 * inferiors.c (struct inferior_info): Add target_data
12452 member.
12453 (clear_inferiors): Free target_data member if set.
12454 (inferior_target_data, set_inferior_target_data): New functions.
12455 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12456 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12457 * linux-low.c (linux_bp_reinsert): New variable.
12458 (struct inferior_linux_data): New.
12459 (linux_create_inferior): Use set_inferior_target_data.
12460 (linux_attach): Likewise. Call add_inferior.
12461 (linux_wait_for_one_inferior): New function.
12462 (linux_wait): Call it.
12463 (linux_write_memory): Add const.
12464 (initialize_low): Call set_breakpoint_data.
12465 * linux-low.h (struct linux_target_ops): Add breakpoint
12466 handling members.
12467 * server.c (attach_inferior): Remove extra add_inferior
12468 call.
12469 * server.h: Include mem-break.h. Update inferior.c
12470 prototypes.
12471 * target.c (read_inferior_memory)
12472 (write_inferior_memory): New functions.
12473 * target.h (read_inferior_memory)
12474 (write_inferior_memory): Change macros to prototypes.
12475 (struct target_ops): Update comments. Add const to write_memory
12476 definition.
12477
12478 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
12479
12480 * linux-low.c (usr_store_inferior_registers): Support
12481 registers which are allowed to fail to store.
12482 * linux-low.h (linux_target_ops): Likewise.
12483 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12484 (ppc_cannot_store_register): FPSCR may not be storable.
12485
12486 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12487
12488 * server.h: Include <string.h> if HAVE_STRING_H.
12489 * ChangeLog: Correct paths in last ChangeLog entry.
12490
12491 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12492
12493 * linux-low.h: Remove obsolete prototypes.
12494 (struct linux_target_ops): New.
12495 (extern the_low_target): New.
12496 * linux-low.c (num_regs, regmap): Remove declarations.
12497 (register_addr): Use the_low_target explicitly.
12498 (fetch_register): Likewise.
12499 (usr_fetch_inferior_registers): Likewise.
12500 (usr_store_inferior_registers): Likewise.
12501 * linux-arm-low.c (num_regs): Remove.
12502 (arm_num_regs): Define.
12503 (arm_regmap): Renamed from regmap, made static.
12504 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12505 made static.
12506 (arm_cannot_store_register): Renamed from cannot_store_register,
12507 made static.
12508 (the_low_target): New.
12509 * linux-i386-low.c (num_regs): Remove.
12510 (i386_num_regs): Define.
12511 (i386_regmap): Renamed from regmap, made static.
12512 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12513 made static.
12514 (i386_cannot_store_register): Renamed from cannot_store_register,
12515 made static.
12516 (the_low_target): New.
12517 * linux-ia64-low.c (num_regs): Remove.
12518 (ia64_num_regs): Define.
12519 (ia64_regmap): Renamed from regmap, made static.
12520 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12521 made static.
12522 (ia64_cannot_store_register): Renamed from cannot_store_register,
12523 made static.
12524 (the_low_target): New.
12525 * linux-m68k-low.c (num_regs): Remove.
12526 (m68k_num_regs): Define.
12527 (m68k_regmap): Renamed from regmap, made static.
12528 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12529 made static.
12530 (m68k_cannot_store_register): Renamed from cannot_store_register,
12531 made static.
12532 (the_low_target): New.
12533 * linux-mips-low.c (num_regs): Remove.
12534 (mips_num_regs): Define.
12535 (mips_regmap): Renamed from regmap, made static.
12536 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12537 made static.
12538 (mips_cannot_store_register): Renamed from cannot_store_register,
12539 made static.
12540 (the_low_target): New.
12541 * linux-ppc-low.c (num_regs): Remove.
12542 (ppc_num_regs): Define.
12543 (ppc_regmap): Renamed from regmap, made static.
12544 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12545 made static.
12546 (ppc_cannot_store_register): Renamed from cannot_store_register,
12547 made static.
12548 (the_low_target): New.
12549 * linux-s390-low.c (num_regs): Remove.
12550 (s390_num_regs): Define.
12551 (s390_regmap): Renamed from regmap, made static.
12552 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12553 made static.
12554 (s390_cannot_store_register): Renamed from cannot_store_register,
12555 made static.
12556 (the_low_target): New.
12557 * linux-sh-low.c (num_regs): Remove.
12558 (sh_num_regs): Define.
12559 (sh_regmap): Renamed from regmap, made static.
12560 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12561 made static.
12562 (sh_cannot_store_register): Renamed from cannot_store_register,
12563 made static.
12564 (the_low_target): New.
12565 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12566 (the_low_target): New.
12567
12568 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12569
12570 * Makefile.in: Add stamp-h target.
12571 * configure.in: Create stamp-h.
12572 * configure: Regenerated.
12573
12574 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12575
12576 * inferiors.c: New file.
12577 * target.c: New file.
12578 * target.h: New file.
12579 * Makefile.in: Add target.o and inferiors.o. Update
12580 dependencies.
12581 * linux-low.c (inferior_pid): New static variable,
12582 moved from server.c.
12583 (linux_create_inferior): Renamed from create_inferior.
12584 Call add_inferior. Return 0 on success instead of a PID.
12585 (linux_attach): Renamed from myattach.
12586 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12587 (linux_thread_alive): Renamed from mythread_alive.
12588 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12589 child dies.
12590 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12591 (regsets_store_inferior_registers): Correct error message.
12592 Add missing ``return 0''.
12593 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12594 (linux_store_registers): Renamed from store_inferior_registers.
12595 (linux_read_memory): Renamed from read_inferior_memory.
12596 (linux_write_memory): Renamed from write_inferior_memory.
12597 (linux_target_ops): New structure.
12598 (initialize_low): Call set_target_ops ().
12599 * remote-utils.c (unhexify): New function.
12600 (hexify): New function.
12601 (input_interrupt): Send signals to ``signal_pid''.
12602 * server.c (inferior_pid): Remove.
12603 (start_inferior): Update create_inferior call.
12604 (attach_inferior): Call add_inferior.
12605 (handle_query): New function.
12606 (main): Call handle_query for `q' packets.
12607 * server.h: Include "target.h". Remove obsolete prototypes.
12608 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12609
12610 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12611
12612 * Makefile.in: Add WARN_CFLAGS. Update configury
12613 dependencies.
12614 * configure.in: Check for <string.h>
12615 * configure: Regenerate.
12616 * config.in: Regenerate.
12617 * gdbreplay.c: Include needed system headers.
12618 (remote_open): Remove strchr prototype.
12619 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12620 * regcache.c (supply_register): Change buf argument to const void *.
12621 (supply_register_by_name): Likewise.
12622 (collect_register): Change buf argument to void *.
12623 (collect_register_by_name): Likewise.
12624 * regcache.h: Add missing prototypes.
12625 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12626 * server.c (handle_query): New function.
12627 (attached): New static variable, moved out of main.
12628 (main): Quiet longjmp clobber warnings.
12629 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12630 * utils.c (error): Remove NORETURN.
12631 (fatal): Likewise.
This page took 0.315071 seconds and 4 git commands to generate.