Change type of write_qxfer_response parameter
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2
3 * server.c (write_qxfer_response): Change type of data to
4 gdb_byte *.
5
6 2015-10-29 Pedro Alves <palves@redhat.com>
7
8 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
9
10 2015-10-29 Pedro Alves <palves@redhat.com>
11
12 * tracepoint.c (clear_installed_tracepoints): Add casts.
13
14 2015-10-29 Pedro Alves <palves@redhat.com>
15
16 * server.c (handle_v_cont, process_serial_event): Add enum
17 gdb_signal casts to signal parsing code.
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-29 Pedro Alves <palves@redhat.com>
38
39 * linux-low.h (NULL_REGSET): Define.
40 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
41 * linux-arm-low.c (arm_regsets): Likewise.
42 * linux-crisv32-low.c (cris_regsets): Likewise.
43 * linux-m68k-low.c (m68k_regsets): Likewise.
44 * linux-mips-low.c (mips_regsets): Likewise.
45 * linux-nios2-low.c (nios2_regsets): Likewise.
46 * linux-ppc-low.c (ppc_regsets): Likewise.
47 * linux-s390-low.c (s390_regsets): Likewise.
48 * linux-sh-low.c (sh_regsets): Likewise.
49 * linux-sparc-low.c (sparc_regsets): Likewise.
50 * linux-tic6x-low.c (tic6x_regsets): Likewise.
51 * linux-tile-low.c (tile_regsets): Likewise.
52 * linux-x86-low.c (x86_regsets): Likewise.
53 * linux-xtensa-low.c (xtensa_regsets): Likewise.
54
55 2015-10-26 Doug Evans <dje@google.com>
56
57 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
58
59 2015-10-26 Doug Evans <dje@google.com>
60
61 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
62
63 2015-10-26 Doug Evans <dje@google.com>
64
65 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
66 for debug_printf.
67 (attach_thread, find_new_threads_callback): Ditto.
68
69 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
70
71 * mem-break.h (set_breakpoint_data): Remove.
72
73 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
74
75 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
76 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
77 (initialize_low): Remove set_breakpoint_data call.
78 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
79 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
80 (initialize_low): Remove set_breakpoint_data call.
81 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
82 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
83 (initialize_low): Remove set_breakpoint_data call.
84
85 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
86
87 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
88 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
89 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
90 * target.h (target_breakpoint_kind_from_pc): New macro.
91
92 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
93
94 * linux-low.c (default_breakpoint_kind_from_pc): New function.
95 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
96 the default breakpoint kind.
97
98 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
99
100 * linux-arm-low.c (arm_supports_z_point_type): Add software
101 breakpoint support.
102
103 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
104
105 * linux-arm-low.c: Refactor breakpoint definitions.
106 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
107 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
108
109 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
110
111 * Makefile.in: Add arm.c/o.
112 * configure.srv: Likewise.
113 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
114 (arm_breakpoint_kind_from_pc): New function.
115 (arm_sw_breakpoint_from_kind): Return proper kind.
116 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
117
118 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
119
120 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
121 removal.
122 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
123 (struct raw_breakpoint) <size>: Remove.
124 (struct raw_breakpoint) <kind>: Add.
125 (bp_size): New function.
126 (bp_opcode): Likewise.
127 (find_raw_breakpoint_at): Adjust for kind.
128 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
129 (remove_memory_breakpoint): Adjust for kind call bp_size.
130 (set_raw_breakpoint_at): Adjust for kind.
131 (set_breakpoint): Likewise.
132 (set_breakpoint_at): Call breakpoint_kind_from_pc.
133 (delete_raw_breakpoint): Adjust for kind.
134 (delete_breakpoint): Likewise.
135 (find_gdb_breakpoint): Likewise.
136 (set_gdb_breakpoint_1): Likewise.
137 (set_gdb_breakpoint): Likewise.
138 (delete_gdb_breakpoint_1): Likewise.
139 (delete_gdb_breakpoint): Likewise.
140 (uninsert_raw_breakpoint): Likewise.
141 (reinsert_raw_breakpoint): Likewise.
142 (set_breakpoint_data): Remove.
143 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
144 (check_mem_read): Adjust for kind call bp_size.
145 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
146 (clone_one_breakpoint): Adjust for kind.
147 * mem-break.h (set_gdb_breakpoint): Likewise.
148 (delete_gdb_breakpoint): Likewise.
149 * server.c (process_serial_event): Likewise.
150
151 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
152
153 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
154 (struct linux_target_ops) <breakpoint>: Remove.
155 (struct linux_target_ops) <breakpoint_len>: Remove.
156 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
157 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
158 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
159 (arm_sw_breakpoint_from_kind): New function.
160 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
161 (struct linux_target_ops) <breakpoint>: Remove.
162 (struct linux_target_ops) <breakpoint_len>: Remove.
163 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
164 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
165 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
166 (struct linux_target_ops) <breakpoint>: Remove.
167 (struct linux_target_ops) <breakpoint_len>: Remove.
168 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
169 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
170 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
171 (struct linux_target_ops) <breakpoint>: Remove.
172 (struct linux_target_ops) <breakpoint_len>: Remove.
173 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
174 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
175 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
176 and sw_breakpoint_from_kind to increment the pc.
177 (linux_breakpoint_kind_from_pc): New function.
178 (linux_sw_breakpoint_from_kind): New function.
179 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
180 (initialize_low): Call breakpoint_kind_from_pc and
181 sw_breakpoint_from_kind to replace breakpoint_data/len.
182 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
183 New field.
184 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
185 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
186 (struct linux_target_ops) <breakpoint>: Remove.
187 (struct linux_target_ops) <breakpoint_len>: Remove.
188 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
189 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
190 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
191 (struct linux_target_ops) <breakpoint>: Remove.
192 (struct linux_target_ops) <breakpoint_len>: Remove.
193 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
194 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
195 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
196 (struct linux_target_ops) <breakpoint>: Remove.
197 (struct linux_target_ops) <breakpoint_len>: Remove.
198 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
199 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
200 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
201 (struct linux_target_ops) <breakpoint>: Remove.
202 (struct linux_target_ops) <breakpoint_len>: Remove.
203 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
204 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
205 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
206 (struct linux_target_ops) <breakpoint>: Remove.
207 (struct linux_target_ops) <breakpoint_len>: Remove.
208 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
209 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
210 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
211 (struct linux_target_ops) <breakpoint>: Remove.
212 (struct linux_target_ops) <breakpoint_len>: Remove.
213 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
214 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
215 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
216 (struct linux_target_ops) <breakpoint>: Remove.
217 (struct linux_target_ops) <breakpoint_len>: Remove.
218 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
219 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
220 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
221 (struct linux_target_ops) <breakpoint>: Remove.
222 (struct linux_target_ops) <breakpoint_len>: Remove.
223 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
224 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
225 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
226 (struct linux_target_ops) <breakpoint>: Remove.
227 (struct linux_target_ops) <breakpoint_len>: Remove.
228 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
229 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
230 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
231 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
232 (struct linux_target_ops) <breakpoint>: Remove.
233 (struct linux_target_ops) <breakpoint_len>: Remove.
234 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
235 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
236 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
237 (struct linux_target_ops) <breakpoint>: Remove.
238 (struct linux_target_ops) <breakpoint_len>: Remove.
239 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
240 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
241
242 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
243
244 * linux-cris-low.c (cris_get_pc): Remove void arg.
245
246 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
247
248 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
249 variable name.
250
251 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
252
253 * inferiors.c (thread_pid_matches_callback): New function.
254 (find_thread_process): New function.
255 (remove_thread): Reset current_thread.
256 (remove_process): Assert threads have been removed first.
257
258 2015-10-15 Yao Qi <yao.qi@linaro.org>
259
260 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
261 if it is 3.
262 (aarch64_remove_point): Likewise.
263 * regcache.c (regcache_register_size): New function.
264
265 2015-10-12 Yao Qi <yao.qi@linaro.org>
266
267 * linux-aarch64-low.c: Update all callers as emit_load_store
268 is renamed to aarch64_emit_load_store.
269
270 2015-10-12 Yao Qi <yao.qi@linaro.org>
271
272 * linux-aarch64-low.c: Update all callers of function renaming
273 from emit_insn to aarch64_emit_insn.
274
275 2015-10-12 Yao Qi <yao.qi@linaro.org>
276
277 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
278 arch/aarch64-insn.h.
279 (struct aarch64_memory_operand): Likewise.
280 (ENCODE): Likewise.
281 (emit_insn): Move to arch/aarch64-insn.c.
282 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
283 (emit_load_store): Move to arch/aarch64-insn.c.
284 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
285 (can_encode_int32): Remove.
286
287 2015-10-12 Yao Qi <yao.qi@linaro.org>
288
289 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
290 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
291 (aarch64_relocate_instruction): Likewise.
292 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
293 (struct aarch64_insn_visitor): Likewise.
294
295 2015-10-12 Yao Qi <yao.qi@linaro.org>
296
297 * linux-aarch64-low.c (struct aarch64_insn_data): New.
298 (struct aarch64_insn_visitor): New.
299 (struct aarch64_insn_relocation_data): New.
300 (aarch64_ftrace_insn_reloc_b): New function.
301 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
302 (aarch64_ftrace_insn_reloc_cb): Likewise.
303 (aarch64_ftrace_insn_reloc_tb): Likewise.
304 (aarch64_ftrace_insn_reloc_adr): Likewise.
305 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
306 (aarch64_ftrace_insn_reloc_others): Likewise.
307 (visitor): New.
308 (aarch64_relocate_instruction): Use visitor.
309
310 2015-10-12 Yao Qi <yao.qi@linaro.org>
311
312 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
313 int. Add argument buf.
314 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
315 aarch64_relocate_instruction.
316
317 2015-10-12 Yao Qi <yao.qi@linaro.org>
318
319 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
320 argument insn. Remove local variable insn. Don't call
321 target_read_uint32.
322 (aarch64_install_fast_tracepoint_jump_pad): Call
323 target_read_uint32.
324
325 2015-09-30 Yao Qi <yao.qi@linaro.org>
326
327 * linux-aarch64-low.c (emit_movk): Shorten a long line.
328 (emit_load_store_pair): Likewise.
329
330 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
331
332 * dll.c (match_dll): Add cast(s).
333 (unloaded_dll): Likewise.
334 * linux-low.c (second_thread_of_pid_p): Likewise.
335 (delete_lwp_callback): Likewise.
336 (count_events_callback): Likewise.
337 (select_event_lwp_callback): Likewise.
338 (linux_set_resume_request): Likewise.
339 * server.c (accumulate_file_name_length): Likewise.
340 (emit_dll_description): Likewise.
341 (handle_qxfer_threads_worker): Likewise.
342 (visit_actioned_threads): Likewise.
343 * thread-db.c (any_thread_of): Likewise.
344 * tracepoint.c (same_process_p): Likewise.
345 (match_blocktype): Likewise.
346 (build_traceframe_info_xml): Likewise.
347
348 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
349
350 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
351 assignment.
352 (gdb_unparse_agent_expr): Likewise.
353 * hostio.c (require_data): Likewise.
354 (handle_pread): Likewise.
355 * linux-low.c (disable_regset): Likewise.
356 (fetch_register): Likewise.
357 (store_register): Likewise.
358 (get_dynamic): Likewise.
359 (linux_qxfer_libraries_svr4): Likewise.
360 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
361 (set_fast_tracepoint_jump): Likewise.
362 (uninsert_fast_tracepoint_jumps_at): Likewise.
363 (reinsert_fast_tracepoint_jumps_at): Likewise.
364 (validate_inserted_breakpoint): Likewise.
365 (clone_agent_expr): Likewise.
366 * regcache.c (init_register_cache): Likewise.
367 * remote-utils.c (putpkt_binary_1): Likewise.
368 (decode_M_packet): Likewise.
369 (decode_X_packet): Likewise.
370 (look_up_one_symbol): Likewise.
371 (relocate_instruction): Likewise.
372 (monitor_output): Likewise.
373 * server.c (handle_search_memory): Likewise.
374 (handle_qxfer_exec_file): Likewise.
375 (handle_qxfer_libraries): Likewise.
376 (handle_qxfer): Likewise.
377 (handle_query): Likewise.
378 (handle_v_cont): Likewise.
379 (handle_v_run): Likewise.
380 (captured_main): Likewise.
381 * target.c (write_inferior_memory): Likewise.
382 * thread-db.c (try_thread_db_load_from_dir): Likewise.
383 * tracepoint.c (init_trace_buffer): Likewise.
384 (add_tracepoint_action): Likewise.
385 (add_traceframe): Likewise.
386 (add_traceframe_block): Likewise.
387 (cmd_qtdpsrc): Likewise.
388 (cmd_qtdv): Likewise.
389 (cmd_qtstatus): Likewise.
390 (response_source): Likewise.
391 (response_tsv): Likewise.
392 (cmd_qtnotes): Likewise.
393 (gdb_collect): Likewise.
394 (initialize_tracepoint): Likewise.
395
396 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
397
398 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
399 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
400 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
401 <NOP>: New.
402 (enum aarch64_condition_codes): New enum.
403 (w0): New static global.
404 (fp): Likewise.
405 (lr): Likewise.
406 (struct aarch64_memory_operand) <type>: New
407 MEMORY_OPERAND_POSTINDEX type.
408 (postindex_memory_operand): New helper function.
409 (emit_ret): New function.
410 (emit_load_store_pair): New function, factored out of emit_stp
411 with support for MEMORY_OPERAND_POSTINDEX.
412 (emit_stp): Rewrite using emit_load_store_pair.
413 (emit_ldp): New function.
414 (emit_load_store): Likewise.
415 (emit_ldr): Mention post-index instruction in comment.
416 (emit_ldrh): New function.
417 (emit_ldrb): New function.
418 (emit_ldrsw): Mention post-index instruction in comment.
419 (emit_str): Likewise.
420 (emit_subs): New function.
421 (emit_cmp): Likewise.
422 (emit_and): Likewise.
423 (emit_orr): Likewise.
424 (emit_orn): Likewise.
425 (emit_eor): Likewise.
426 (emit_mvn): Likewise.
427 (emit_lslv): Likewise.
428 (emit_lsrv): Likewise.
429 (emit_asrv): Likewise.
430 (emit_mul): Likewise.
431 (emit_sbfm): Likewise.
432 (emit_sbfx): Likewise.
433 (emit_ubfm): Likewise.
434 (emit_ubfx): Likewise.
435 (emit_csinc): Likewise.
436 (emit_cset): Likewise.
437 (emit_nop): Likewise.
438 (emit_ops_insns): New helper function.
439 (emit_pop): Likewise.
440 (emit_push): Likewise.
441 (aarch64_emit_prologue): New function.
442 (aarch64_emit_epilogue): Likewise.
443 (aarch64_emit_add): Likewise.
444 (aarch64_emit_sub): Likewise.
445 (aarch64_emit_mul): Likewise.
446 (aarch64_emit_lsh): Likewise.
447 (aarch64_emit_rsh_signed): Likewise.
448 (aarch64_emit_rsh_unsigned): Likewise.
449 (aarch64_emit_ext): Likewise.
450 (aarch64_emit_log_not): Likewise.
451 (aarch64_emit_bit_and): Likewise.
452 (aarch64_emit_bit_or): Likewise.
453 (aarch64_emit_bit_xor): Likewise.
454 (aarch64_emit_bit_not): Likewise.
455 (aarch64_emit_equal): Likewise.
456 (aarch64_emit_less_signed): Likewise.
457 (aarch64_emit_less_unsigned): Likewise.
458 (aarch64_emit_ref): Likewise.
459 (aarch64_emit_if_goto): Likewise.
460 (aarch64_emit_goto): Likewise.
461 (aarch64_write_goto_address): Likewise.
462 (aarch64_emit_const): Likewise.
463 (aarch64_emit_call): Likewise.
464 (aarch64_emit_reg): Likewise.
465 (aarch64_emit_pop): Likewise.
466 (aarch64_emit_stack_flush): Likewise.
467 (aarch64_emit_zero_ext): Likewise.
468 (aarch64_emit_swap): Likewise.
469 (aarch64_emit_stack_adjust): Likewise.
470 (aarch64_emit_int_call_1): Likewise.
471 (aarch64_emit_void_call_2): Likewise.
472 (aarch64_emit_eq_goto): Likewise.
473 (aarch64_emit_ne_goto): Likewise.
474 (aarch64_emit_lt_goto): Likewise.
475 (aarch64_emit_le_goto): Likewise.
476 (aarch64_emit_gt_goto): Likewise.
477 (aarch64_emit_ge_got): Likewise.
478 (aarch64_emit_ops_impl): New static global variable.
479 (aarch64_emit_ops): New target function, return
480 &aarch64_emit_ops_impl.
481 (struct linux_target_ops): Install it.
482
483 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
484
485 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
486 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
487 aarch64-ipa.o.
488 * linux-aarch64-ipa.c: New file.
489 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
490 and endian.h.
491 (aarch64_get_thread_area): New target method.
492 (extract_signed_bitfield): New helper function.
493 (aarch64_decode_ldr_literal): New function.
494 (enum aarch64_opcodes): New enum.
495 (struct aarch64_register): New struct.
496 (struct aarch64_operand): New struct.
497 (x0): New static global.
498 (x1): Likewise.
499 (x2): Likewise.
500 (x3): Likewise.
501 (x4): Likewise.
502 (w2): Likewise.
503 (ip0): Likewise.
504 (sp): Likewise.
505 (xzr): Likewise.
506 (aarch64_register): New helper function.
507 (register_operand): Likewise.
508 (immediate_operand): Likewise.
509 (struct aarch64_memory_operand): New struct.
510 (offset_memory_operand): New helper function.
511 (preindex_memory_operand): Likewise.
512 (enum aarch64_system_control_registers): New enum.
513 (ENCODE): New macro.
514 (emit_insn): New helper function.
515 (emit_b): New function.
516 (emit_bcond): Likewise.
517 (emit_cb): Likewise.
518 (emit_tb): Likewise.
519 (emit_blr): Likewise.
520 (emit_stp): Likewise.
521 (emit_ldp_q_offset): Likewise.
522 (emit_stp_q_offset): Likewise.
523 (emit_load_store): Likewise.
524 (emit_ldr): Likewise.
525 (emit_ldrsw): Likewise.
526 (emit_str): Likewise.
527 (emit_ldaxr): Likewise.
528 (emit_stxr): Likewise.
529 (emit_stlr): Likewise.
530 (emit_data_processing_reg): Likewise.
531 (emit_data_processing): Likewise.
532 (emit_add): Likewise.
533 (emit_sub): Likewise.
534 (emit_mov): Likewise.
535 (emit_movk): Likewise.
536 (emit_mov_addr): Likewise.
537 (emit_mrs): Likewise.
538 (emit_msr): Likewise.
539 (emit_sevl): Likewise.
540 (emit_wfe): Likewise.
541 (append_insns): Likewise.
542 (can_encode_int32_in): New helper function.
543 (aarch64_relocate_instruction): New function.
544 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
545 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
546 (struct linux_target_ops): Install aarch64_get_thread_area,
547 aarch64_install_fast_tracepoint_jump_pad and
548 aarch64_get_min_fast_tracepoint_insn_len.
549
550 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
551
552 * Makefile.in (aarch64-insn.o): New rule.
553 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
554
555 2015-09-21 Yao Qi <yao.qi@linaro.org>
556
557 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
558
559 2015-09-21 Yao Qi <yao.qi@linaro.org>
560
561 * tracepoint.c (max_jump_pad_size): Remove.
562
563 2015-09-18 Yao Qi <yao.qi@linaro.org>
564
565 * linux-aarch64-low.c: Don't include sys/uio.h.
566 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
567
568 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
569
570 * tracepoint.c (eval_result_type): Change prototype.
571 (condition_true_at_tracepoint): Fix argument to compiled_cond.
572
573 2015-09-15 Pedro Alves <palves@redhat.com>
574
575 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
576 Check whether to report exec events instead of checking whether
577 multiprocess is enabled.
578
579 2015-09-15 Pedro Alves <palves@redhat.com>
580
581 PR remote/18965
582 * remote-utils.c (prepare_resume_reply): Merge
583 TARGET_WAITKIND_VFORK_DONE switch case with the
584 TARGET_WAITKIND_FORKED case.
585
586 2015-09-15 Yao Qi <yao.qi@linaro.org>
587
588 * server.c (handle_query): Check string comparison using
589 "else if" instead of "if".
590
591 2015-09-15 Yao Qi <yao.qi@linaro.org>
592
593 * server.c (vCont_supported): New global variable.
594 (handle_query): Set vCont_supported to 1 if "vContSupported+"
595 matches. Append ";vContSupported+" to own_buf.
596 (handle_v_requests): Append ";s;S" to own_buf if target supports
597 hardware single step or vCont_supported is false.
598 (capture_main): Set vCont_supported to zero.
599
600 2015-09-15 Yao Qi <yao.qi@linaro.org>
601
602 * linux-low.c (linux_supports_conditional_breakpoints): Rename
603 it to ...
604 (linux_supports_hardware_single_step): ... New function.
605 (linux_target_ops): Update.
606 * lynx-low.c (lynx_target_ops): Set field
607 supports_hardware_single_step to target_can_do_hardware_single_step.
608 * nto-low.c (nto_target_ops): Likewise.
609 * spu-low.c (spu_target_ops): Likewise.
610 * win32-low.c (win32_target_ops): Likewise.
611 * target.c (target_can_do_hardware_single_step): New function.
612 * target.h (struct target_ops) <supports_conditional_breakpoints>:
613 Remove. <supports_hardware_single_step>: New field.
614 (target_supports_conditional_breakpoints): Remove.
615 (target_supports_hardware_single_step): New macro.
616 (target_can_do_hardware_single_step): Declare.
617 * server.c (handle_query): Use target_supports_hardware_single_step
618 instead of target_supports_conditional_breakpoints.
619
620 2015-09-15 Yao Qi <yao.qi@linaro.org>
621
622 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
623 function.
624 (struct linux_target_ops the_low_target): Install
625 aarch64_linux_siginfo_fixup.
626
627 2015-09-11 Don Breazeal <donb@codesourcery.com>
628 Luis Machado <lgustavo@codesourcery.com>
629
630 * linux-low.c (linux_mourn): Static declaration.
631 (linux_arch_setup): Move in front of
632 handle_extended_wait.
633 (linux_arch_setup_thread): New function.
634 (handle_extended_wait): Handle exec events. Call
635 linux_arch_setup_thread. Make event_lwp argument a
636 pointer-to-a-pointer.
637 (check_zombie_leaders): Do not check stopped threads.
638 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
639 (linux_low_filter_event): Add lwp and thread for exec'ing
640 non-leader thread if leader thread has been deleted.
641 Refactor code into linux_arch_setup_thread and call it.
642 Pass child lwp pointer by reference to handle_extended_wait.
643 (linux_wait_for_event_filtered): Update comment.
644 (linux_wait_1): Prevent clobbering exec event status.
645 (linux_supports_exec_events): New function.
646 (linux_target_ops) <supports_exec_events>: Initialize new member.
647 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
648 new member.
649 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
650 * server.c (report_exec_events): New global variable.
651 (handle_query): Handle qSupported query for exec-events feature.
652 (captured_main): Initialize report_exec_events.
653 * server.h (report_exec_events): Declare new global variable.
654 * target.h (struct target_ops) <supports_exec_events>: New
655 member.
656 (target_supports_exec_events): New macro.
657 * win32-low.c (win32_target_ops) <supports_exec_events>:
658 Initialize new member.
659
660 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
661
662 * linux-low.c (linux_low_enable_btrace): Remove.
663 (linux_target_ops): Replace linux_low_enable_btrace with
664 linux_enable_btrace.
665
666 2015-09-03 Yao Qi <yao.qi@linaro.org>
667
668 * linux-aarch64-low.c (aarch64_insert_point): Call
669 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
670 returns true.
671
672 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
673
674 * linux-low.c (check_stopped_by_breakpoint): Use
675 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
676
677 2015-08-27 Pedro Alves <palves@redhat.com>
678
679 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
680
681 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
682
683 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
684 the XNEW-family equivalent.
685 (compile_bytecodes): Likewise.
686 * dll.c (loaded_dll): Likewise.
687 * event-loop.c (append_callback_event): Likewise.
688 (create_file_handler): Likewise.
689 (create_file_event): Likewise.
690 * hostio.c (handle_open): Likewise.
691 * inferiors.c (add_thread): Likewise.
692 (add_process): Likewise.
693 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
694 * linux-arm-low.c (arm_new_process): Likewise.
695 (arm_new_thread): Likewise.
696 * linux-low.c (add_to_pid_list): Likewise.
697 (linux_add_process): Likewise.
698 (handle_extended_wait): Likewise.
699 (add_lwp): Likewise.
700 (enqueue_one_deferred_signal): Likewise.
701 (enqueue_pending_signal): Likewise.
702 (linux_resume_one_lwp_throw): Likewise.
703 (linux_resume_one_thread): Likewise.
704 (linux_read_memory): Likewise.
705 (linux_write_memory): Likewise.
706 * linux-mips-low.c (mips_linux_new_process): Likewise.
707 (mips_linux_new_thread): Likewise.
708 (mips_add_watchpoint): Likewise.
709 * linux-x86-low.c (initialize_low_arch): Likewise.
710 * lynx-low.c (lynx_add_process): Likewise.
711 * mem-break.c (set_raw_breakpoint_at): Likewise.
712 (set_breakpoint): Likewise.
713 (add_condition_to_breakpoint): Likewise.
714 (add_commands_to_breakpoint): Likewise.
715 (clone_agent_expr): Likewise.
716 (clone_one_breakpoint): Likewise.
717 * regcache.c (new_register_cache): Likewise.
718 * remote-utils.c (look_up_one_symbol): Likewise.
719 * server.c (queue_stop_reply): Likewise.
720 (start_inferior): Likewise.
721 (queue_stop_reply_callback): Likewise.
722 (handle_target_event): Likewise.
723 * spu-low.c (fetch_ppc_memory): Likewise.
724 (store_ppc_memory): Likewise.
725 * target.c (set_target_ops): Likewise.
726 * thread-db.c (thread_db_load_search): Likewise.
727 (try_thread_db_load_1): Likewise.
728 * tracepoint.c (add_tracepoint): Likewise.
729 (add_tracepoint_action): Likewise.
730 (create_trace_state_variable): Likewise.
731 (cmd_qtdpsrc): Likewise.
732 (cmd_qtro): Likewise.
733 (add_while_stepping_state): Likewise.
734 * win32-low.c (child_add_thread): Likewise.
735 (get_image_name): Likewise.
736
737 2015-08-25 Yao Qi <yao.qi@linaro.org>
738
739 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
740
741 2015-08-25 Yao Qi <yao.qi@linaro.org>
742
743 * Makefile.in (aarch64-linux.o): New rule.
744 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
745 srv_tgtobj.
746 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
747 (aarch64_init_debug_reg_state): Make it extern.
748 (aarch64_linux_prepare_to_resume): Remove.
749
750 2015-08-25 Yao Qi <yao.qi@linaro.org>
751
752 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
753 lwp_arch_private_info and ptid_of_lwp.
754
755 2015-08-25 Yao Qi <yao.qi@linaro.org>
756
757 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
758 Find proc_info by find_process_pid. All callers updated.
759
760 2015-08-25 Yao Qi <yao.qi@linaro.org>
761
762 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
763 Remove.
764 (debug_reg_change_callback): Remove.
765 (aarch64_notify_debug_reg_change): Remove.
766
767 2015-08-25 Yao Qi <yao.qi@linaro.org>
768
769 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
770 Call current_lwp_ptid.
771
772 2015-08-25 Yao Qi <yao.qi@linaro.org>
773
774 * linux-aarch64-low.c (debug_reg_change_callback): Use
775 debug_printf.
776
777 2015-08-25 Yao Qi <yao.qi@linaro.org>
778
779 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
780
781 2015-08-25 Yao Qi <yao.qi@linaro.org>
782
783 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
784
785 2015-08-25 Yao Qi <yao.qi@linaro.org>
786
787 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
788 the code.
789
790 2015-08-25 Yao Qi <yao.qi@linaro.org>
791
792 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
793 Remove.
794 (debug_reg_change_callback): Remove argument entry and add argument
795 lwp. Remove local variable thread. Don't print thread id in the
796 debugging output. Don't check whether pid of thread equals to pid.
797 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
798 iterate_over_lwps instead find_inferior.
799
800 2015-08-24 Pedro Alves <palves@redhat.com>
801
802 * inferiors.c (get_first_process): New function.
803 * inferiors.h (get_first_process): New declaration.
804 * remote-utils.c (read_ptid): Default to the first process in the
805 list, instead of to the current thread's process.
806
807 2015-08-24 Pedro Alves <palves@redhat.com>
808
809 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
810 * event-loop.c: Likewise.
811 * remote-utils.c: Likewise.
812 * tracepoint.c: Likewise.
813
814 2015-08-24 Pedro Alves <palves@redhat.com>
815
816 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
817 ptid_get_lwp.
818
819 2015-08-21 Pedro Alves <palves@redhat.com>
820
821 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
822 instead of literal 1.
823
824 2015-08-21 Pedro Alves <palves@redhat.com>
825
826 * tdesc.c (default_description): Explicitly zero-initialize.
827
828 2015-08-21 Pedro Alves <palves@redhat.com>
829
830 PR gdb/18749
831 * inferiors.c (remove_thread): Discard any pending stop reply for
832 this thread.
833 * server.c (remove_all_on_match_pid): Rename to ...
834 (remove_all_on_match_ptid): ... this. Work with a filter ptid
835 instead of a pid.
836 (discard_queued_stop_replies): Change parameter to a ptid. Now
837 extern.
838 (handle_v_kill, kill_inferior_callback, captured_main)
839 (process_serial_event): Adjust.
840 * server.h (discard_queued_stop_replies): Declare.
841
842 2015-08-21 Pedro Alves <palves@redhat.com>
843
844 * linux-low.c (wait_for_sigstop): Always switch to no thread
845 selected if the previously current thread dies.
846 * lynx-low.c (lynx_request_interrupt): Use the first thread's
847 process instead of the current thread's.
848 * remote-utils.c (input_interrupt): Don't check if there's no
849 current thread.
850 * server.c (gdb_read_memory, gdb_write_memory): If setting the
851 current thread to the general thread fails, error out.
852 (handle_qxfer_auxv, handle_qxfer_libraries)
853 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
854 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
855 (handle_query): Check if there's a thread selected instead of
856 checking whether there's any thread in the thread list.
857 (handle_qxfer_threads, handle_qxfer_btrace)
858 (handle_qxfer_btrace_conf): Don't error out early if there's no
859 thread in the thread list.
860 (handle_v_cont, myresume): Don't set the current thread to the
861 continue thread.
862 (process_serial_event) <Hg handling>: Also set thread_id if the
863 previous general thread is still alive.
864 (process_serial_event) <g/G handling>: If setting the current
865 thread to the general thread fails, error out.
866 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
867 thread's lwp instead of the current thread's.
868 * target.c (set_desired_thread): If the desired thread was not
869 found, leave the current thread pointing to NULL. Return an int
870 (boolean) indicating success.
871 * target.h (set_desired_thread): Change return type to int.
872
873 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
874
875 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
876 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
877 #includes.
878 (ps_get_thread_area): New function.
879
880 2015-08-19 Gary Benson <gbenson@redhat.com>
881
882 * hostio.c (handle_pread): Do not attempt to read more data
883 than hostio_reply_with_data can fit in a packet.
884
885 2015-08-18 Joel Brobecker <brobecker@adacore.com>
886
887 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
888
889 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
890
891 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
892
893 2015-08-06 Pedro Alves <palves@redhat.com>
894
895 * tracepoint.c (expr_eval_result): Now an int.
896
897 2015-08-06 Pedro Alves <palves@redhat.com>
898
899 * gdbthread.h (struct regcache): Forward declare.
900 (struct thread_info) <regcache_data>: Now a struct regcache
901 pointer.
902 * inferiors.c (inferior_regcache_data)
903 (set_inferior_regcache_data): Now work with struct regcache
904 pointers.
905 * inferiors.h (struct regcache): Forward declare.
906 (inferior_regcache_data, set_inferior_regcache_data): Now work
907 with struct regcache pointers.
908 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
909 (free_register_cache_thread): Remove struct regcache pointer
910 casts.
911
912 2015-08-06 Pedro Alves <palves@redhat.com>
913
914 * server.c (captured_main): On error, print the exception message
915 to stderr, and if run_once is set, throw a quit.
916
917 2015-08-06 Pedro Alves <palves@redhat.com>
918
919 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
920 the current thread.
921
922 2015-08-06 Pedro Alves <palves@redhat.com>
923
924 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
925 reading beyond the passed in buffer length.
926
927 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
928
929 * tracepoint.c (symbol_list) <required>: Remove.
930
931 2015-08-06 Pedro Alves <palves@redhat.com>
932
933 * linux-low.c (handle_extended_wait): Set the fork child's suspend
934 count if stopping and suspending threads.
935 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
936 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
937 (linux_detach): Complete an ongoing step-over.
938 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
939 throughout.
940 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
941 (linux_wait_1): If passing a signal to the inferior after
942 finishing a step-over, unsuspend and re-resume all lwps. If we
943 see a single-step event but the thread should be continuing, don't
944 pass the trap to gdb.
945 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
946 internal_error instead of gdb_assert.
947 (enqueue_pending_signal): New function.
948 (check_ptrace_stopped_lwp_gone): Add debug output.
949 (start_step_over): Use internal_error instead of gdb_assert.
950 (complete_ongoing_step_over): New function.
951 (linux_resume_one_thread): Don't resume a suspended thread.
952 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
953 it stepping.
954
955 2015-08-06 Pedro Alves <palves@redhat.com>
956
957 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
958 (linux_thread_alive): Use lwp_is_marked_dead.
959 (extended_event_reported): Delete.
960 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
961 instead of extended_event_reported.
962 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
963 as well.
964 (lwp_is_marked_dead): New function.
965 (lwp_running): Use lwp_is_marked_dead.
966 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
967 comment.
968
969 2015-08-06 Pedro Alves <palves@redhat.com>
970
971 * linux-low.c (linux_wait_1): Move fork event output out of the
972 !report_to_gdb check. Pass event_child->waitstatus to
973 target_waitstatus_to_string instead of ourstatus.
974
975 2015-08-04 Yao Qi <yao.qi@linaro.org>
976
977 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
978 if current_thread is 32 bit.
979
980 2015-08-04 Yao Qi <yao.qi@linaro.org>
981
982 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
983 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
984 * server.c (extended_protocol): Remove "static".
985 * server.h (extended_protocol): Declare it.
986
987 2015-08-04 Yao Qi <yao.qi@linaro.org>
988
989 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
990 both aarch64 and aarch32.
991 (aarch64_set_pc): Likewise.
992
993 2015-08-04 Yao Qi <yao.qi@linaro.org>
994
995 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
996 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
997 arm-with-neon.xml to srv_xmlfiles.
998 * linux-aarch64-low.c: Include linux-aarch32-low.h.
999 (is_64bit_tdesc): New function.
1000 (aarch64_linux_read_description): New function.
1001 (aarch64_arch_setup): Call aarch64_linux_read_description.
1002 (regs_info): Rename to regs_info_aarch64.
1003 (aarch64_regs_info): Return right regs_info.
1004 (initialize_low_arch): Call initialize_low_arch_aarch32.
1005
1006 2015-08-04 Yao Qi <yao.qi@linaro.org>
1007
1008 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1009 * linux-aarch32-low.c: New file.
1010 * linux-aarch32-low.h: New file.
1011 * linux-arm-low.c (arm_fill_gregset): Move it to
1012 linux-aarch32-low.c.
1013 (arm_store_gregset): Likewise.
1014 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1015 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1016 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1017 (regs_info): Rename to regs_info_arm.
1018 (arm_regs_info): Return regs_info_aarch32 if
1019 have_ptrace_getregset is 1 and target description is
1020 arm_with_neon or arm_with_vfpv3.
1021 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1022 Call initialize_low_arch_aarch32 instead.
1023
1024 2015-08-04 Yao Qi <yao.qi@linaro.org>
1025
1026 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1027 * linux-low.c: ... here.
1028 * linux-low.h (have_ptrace_getregset): Declare it.
1029
1030 2015-08-04 Pedro Alves <palves@redhat.com>
1031
1032 * thread-db.c (struct thread_db): Use new typedefs.
1033 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1034 CHK calls.
1035 (disable_thread_event_reporting): Cast result of dlsym to
1036 destination function pointer type.
1037 (thread_db_mourn): Use td_ta_delete_ftype.
1038
1039 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1040
1041 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1042 arch variant.
1043 (CDX_BREAKPOINT): Define for R2.
1044 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1045 (the_low_target): Add comments.
1046
1047 2015-07-30 Yao Qi <yao.qi@linaro.org>
1048
1049 * linux-arm-low.c (arm_hwcap): Remove it.
1050 (arm_read_description): New local variable arm_hwcap. Don't
1051 set arm_hwcap to zero.
1052
1053 2015-07-30 Yao Qi <yao.qi@linaro.org>
1054
1055 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1056 Use regcache->tdesc instead.
1057 (arm_store_wmmxregset): Likewise.
1058 (arm_fill_vfpregset): Likewise.
1059 (arm_store_vfpregset): Likewise.
1060
1061 2015-07-30 Yao Qi <yao.qi@linaro.org>
1062
1063 * linux-arm-low.c: Include arch/arm.h.
1064 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1065 (arm_store_gregset): Likewise.
1066
1067 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1068
1069 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1070 ptrace's 4th parameter.
1071
1072 2015-07-27 Yao Qi <yao.qi@linaro.org>
1073
1074 * configure.srv (case aarch64*-*-linux*): Don't set
1075 srv_linux_usrregs.
1076
1077 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1078
1079 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1080 sys/ptrace.h.
1081 * linux-arm-low.c: Likewise.
1082 * linux-cris-low.c: Likewise.
1083 * linux-crisv32-low.c: Likewise.
1084 * linux-low.c: Likewise.
1085 * linux-m68k-low.c: Likewise.
1086 * linux-mips-low.c: Likewise.
1087 * linux-nios2-low.c: Likewise.
1088 * linux-s390-low.c: Likewise.
1089 * linux-sparc-low.c: Likewise.
1090 * linux-tic6x-low.c: Likewise.
1091 * linux-tile-low.c: Likewise.
1092 * linux-x86-low.c: Likewise.
1093
1094 2015-07-24 Pedro Alves <palves@redhat.com>
1095
1096 * config.in: Regenerate.
1097 * configure: Regenerate.
1098
1099 2015-07-24 Pedro Alves <palves@redhat.com>
1100
1101 * acinclude.m4: Include ../ptrace.m4.
1102 * configure.ac: Call GDB_AC_PTRACE.
1103 * config.in, configure: Regenerate.
1104
1105 2015-07-24 Yao Qi <yao.qi@linaro.org>
1106
1107 * linux-low.c (linux_create_inferior): Remove setting to
1108 proc->priv->new_inferior.
1109 (linux_attach): Likewise.
1110 (linux_low_filter_event): Likewise.
1111 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1112
1113 2015-07-24 Yao Qi <yao.qi@linaro.org>
1114
1115 * linux-low.c (linux_arch_setup): New function.
1116 (linux_low_filter_event): If proc->tdesc is NULL and
1117 proc->attached is true, call the_low_target.arch_setup.
1118 Otherwise, keep status pending, and return.
1119 (linux_resume_one_lwp_throw): Don't call get_pc if
1120 thread->while_stepping isn't NULL. Don't call
1121 get_thread_regcache if proc->tdesc is NULL.
1122 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1123 (linux_target_ops): Install arch_setup.
1124 * server.c (start_inferior): Call the_target->arch_setup.
1125 * target.h (struct target_ops) <arch_setup>: New field.
1126 (target_arch_setup): New marco.
1127 * lynx-low.c (lynx_target_ops): Update.
1128 * nto-low.c (nto_target_ops): Update.
1129 * spu-low.c (spu_target_ops): Update.
1130 * win32-low.c (win32_target_ops): Update.
1131
1132 2015-07-24 Yao Qi <yao.qi@linaro.org>
1133
1134 * linux-low.c (linux_add_process): Don't set
1135 proc->priv->new_inferior.
1136 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1137 (linux_attach): Likewise.
1138
1139 2015-07-24 Yao Qi <yao.qi@linaro.org>
1140
1141 * server.c (start_inferior): Code refactor.
1142
1143 2015-07-24 Yao Qi <yao.qi@linaro.org>
1144
1145 * server.c (process_serial_event): Set general_thread.
1146
1147 2015-07-21 Yao Qi <yao.qi@linaro.org>
1148
1149 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1150 aarch64_linux_get_debug_reg_capacity.
1151
1152 2015-07-17 Yao Qi <yao.qi@linaro.org>
1153
1154 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1155 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1156 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1157 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1158 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1159 (AARCH64_HWP_ALIGNMENT): Likewise.
1160 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1161 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1162 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1163 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1164 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1165 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1166 (struct aarch64_debug_reg_state): Likewise.
1167 (struct arch_lwp_info): Likewise.
1168 (aarch64_align_watchpoint): Likewise.
1169 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1170 (aarch64_watchpoint_length): Likewise.
1171 (aarch64_point_encode_ctrl_reg): Likewise
1172 (aarch64_point_is_aligned): Likewise.
1173 (aarch64_align_watchpoint): Likewise.
1174 (aarch64_linux_set_debug_regs):
1175 (aarch64_dr_state_insert_one_point): Likewise.
1176 (aarch64_dr_state_remove_one_point): Likewise.
1177 (aarch64_handle_breakpoint): Likewise.
1178 (aarch64_handle_aligned_watchpoint): Likewise.
1179 (aarch64_handle_unaligned_watchpoint): Likewise.
1180 (aarch64_handle_watchpoint): Likewise.
1181
1182 2015-07-17 Yao Qi <yao.qi@linaro.org>
1183
1184 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1185 and don't aarch64_get_debug_reg_state. All callers update.
1186 (aarch64_handle_aligned_watchpoint): Likewise.
1187 (aarch64_handle_unaligned_watchpoint): Likewise.
1188 (aarch64_handle_watchpoint): Likewise.
1189 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1190 (aarch64_remove_point): Likewise.
1191
1192 2015-07-17 Yao Qi <yao.qi@linaro.org>
1193
1194 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1195 debug_printf.
1196 (aarch64_handle_unaligned_watchpoint): Likewise.
1197
1198 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1199
1200 Revert the previous 3 commits:
1201 Move gdb_regex* to common/
1202 Move linux_find_memory_regions_full & co.
1203 gdbserver build-id attribute generator
1204
1205 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1206 Jan Kratochvil <jan.kratochvil@redhat.com>
1207
1208 gdbserver build-id attribute generator.
1209 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1210 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1211 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1212 (find_phdr): New.
1213 (get_dynamic): Use find_pdhr to traverse program headers.
1214 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1215 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1216 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1217 (get_hex_build_id): New.
1218 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1219 to reply XML document.
1220
1221 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1222 Jan Kratochvil <jan.kratochvil@redhat.com>
1223
1224 * target.c: Include target/target-utils.h and fcntl.h.
1225 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1226 (target_fileio_read_stralloc): New functions.
1227
1228 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1229
1230 * Makefile.in (OBS): Add gdb_regex.o.
1231 (gdb_regex.o): New.
1232 * config.in: Rebuilt.
1233 * configure: Rebuilt.
1234
1235 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1236 Jan Kratochvil <jan.kratochvil@redhat.com>
1237
1238 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1239 * Makefile.in (OBS): Add target-utils.o.
1240 (linux-maps.o, target-utils.o): New.
1241 * configure.srv (srv_linux_obj): Add linux-maps.o.
1242
1243 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1244
1245 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1246 function, return 1.
1247 (the_low_target): Install it.
1248
1249 2015-07-14 Pedro Alves <palves@redhat.com>
1250
1251 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1252 Instead, ignore ECHILD, and throw an error for other errnos.
1253
1254 2015-07-10 Pedro Alves <palves@redhat.com>
1255
1256 * event-loop.c (struct callback_event) <data>: Change type to
1257 gdb_client_data instance instead of gdb_client_data pointer.
1258 (append_callback_event): Adjust.
1259
1260 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1261
1262 * linux-aarch64-low.c: Add comments for each linux_target_ops
1263 method. Remove comments already covered in target_ops and
1264 linux_target_ops definitions.
1265 (the_low_target): Add comments for each unimplemented method.
1266
1267 2015-07-09 Yao Qi <yao.qi@linaro.org>
1268
1269 * linux-aarch64-low.c (aarch64_regmap): Remove.
1270 (aarch64_usrregs_info): Remove.
1271 (regs_info): Set field usrregs to NULL.
1272
1273 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1274
1275 * linux-low.c: Include "rsp-low.h"
1276 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1277 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1278 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1279 (handle_btrace_enable_pt): New.
1280 (handle_btrace_general_set): Support "pt".
1281 (handle_btrace_conf_general_set): Support "pt:size".
1282
1283 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1284
1285 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1286 Z_PACKET_SW_BP.
1287
1288 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1289
1290 * linux-aarch64-low.c: Remove comment about endianness.
1291 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1292 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1293 memcmp.
1294
1295 2015-06-24 Gary Benson <gbenson@redhat.com>
1296
1297 * linux-i386-ipa.c (stdint.h): Do not include.
1298 * lynx-i386-low.c (stdint.h): Likewise.
1299 * lynx-ppc-low.c (stdint.h): Likewise.
1300 * mem-break.c (stdint.h): Likewise.
1301 * thread-db.c (stdint.h): Likewise.
1302 * tracepoint.c (stdint.h): Likewise.
1303 * win32-low.c (stdint.h): Likewise.
1304
1305 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1306
1307 * server.c (write_qxfer_response): Update call to
1308 remote_escape_output.
1309
1310 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1311 Jan Kratochvil <jan.kratochvil@redhat.com>
1312
1313 Merge multiple hex conversions.
1314 * gdbreplay.c (tohex): Rename to 'fromhex'.
1315 (logchar): Use fromhex.
1316
1317 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1318
1319 * server.c (handle_qxfer_libraries): Set `version' attribute for
1320 <library-list>.
1321
1322 2015-06-10 Gary Benson <gbenson@redhat.com>
1323
1324 * target.h (struct target_ops) <multifs_open>: New field.
1325 <multifs_unlink>: Likewise.
1326 <multifs_readlink>: Likewise.
1327 * linux-low.c (nat/linux-namespaces.h): New include.
1328 (linux_target_ops): Initialize the_target->multifs_open,
1329 the_target->multifs_unlink and the_target->multifs_readlink.
1330 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1331 * hostio.c (hostio_fs_pid): New static variable.
1332 (hostio_handle_new_gdb_connection): New function.
1333 (handle_setfs): Likewise.
1334 (handle_open): Use the_target->multifs_open as appropriate.
1335 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1336 (handle_readlink): Use the_target->multifs_readlink as
1337 appropriate.
1338 (handle_vFile): Handle vFile:setfs packets.
1339 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1340 after target_handle_new_gdb_connection.
1341
1342 2015-06-10 Gary Benson <gbenson@redhat.com>
1343
1344 * configure.ac (AC_CHECK_FUNCS): Add setns.
1345 * config.in: Regenerate.
1346 * configure: Likewise.
1347 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1348 (linux-namespaces.o): New rule.
1349 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1350
1351 2015-06-09 Gary Benson <gbenson@redhat.com>
1352
1353 * hostio.c (handle_open): Process mode argument with
1354 fileio_to_host_mode.
1355
1356 2015-06-01 Yao Qi <yao.qi@linaro.org>
1357
1358 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1359 * linux-x86-low.c: Likewise.
1360
1361 2015-05-28 Don Breazeal <donb@codesourcery.com>
1362
1363 * linux-low.c (handle_extended_wait): Initialize
1364 thread_info.last_resume_kind for new fork children.
1365
1366 2015-05-15 Pedro Alves <palves@redhat.com>
1367
1368 * target.h (target_handle_new_gdb_connection): Rewrite using if
1369 wrapped in do/while.
1370
1371 2015-05-14 Joel Brobecker <brobecker@adacore.com>
1372
1373 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1374 * configure, config.in: Regenerate.
1375 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1376 Declare typedef.
1377
1378 2015-05-12 Don Breazeal <donb@codesourcery.com>
1379
1380 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1381 PTRACE_EVENT_VFORK_DONE.
1382 (linux_low_ptrace_options, extended_event_reported): Add vfork
1383 events.
1384 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1385 and "vforkdone" for RSP 'T' Stop Reply Packet.
1386 * server.h (report_vfork_events): Declare
1387 global variable.
1388
1389 2015-05-12 Don Breazeal <donb@codesourcery.com>
1390
1391 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1392 (the_low_target) <new_fork>: Initialize new member.
1393 * linux-arm-low.c (arm_new_fork): New function.
1394 (the_low_target) <new_fork>: Initialize new member.
1395 * linux-low.c (handle_extended_wait): Call new target function
1396 new_fork.
1397 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1398 * linux-mips-low.c (mips_add_watchpoint): New function
1399 extracted from mips_insert_point.
1400 (the_low_target) <new_fork>: Initialize new member.
1401 (mips_linux_new_fork): New function.
1402 (mips_insert_point): Call mips_add_watchpoint.
1403 * linux-x86-low.c (x86_linux_new_fork): New function.
1404 (the_low_target) <new_fork>: Initialize new member.
1405
1406 2015-05-12 Don Breazeal <donb@codesourcery.com>
1407
1408 * linux-low.c (handle_extended_wait): Implement return value,
1409 rename argument 'event_child' to 'event_lwp', handle
1410 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1411 (linux_low_ptrace_options): New function.
1412 (linux_low_filter_event): Call linux_low_ptrace_options,
1413 use different argument fo linux_enable_event_reporting,
1414 use return value from handle_extended_wait.
1415 (extended_event_reported): New function.
1416 (linux_wait_1): Call extended_event_reported and set
1417 status to report fork events.
1418 (linux_write_memory): Add pid to debug message.
1419 (reset_lwp_ptrace_options_callback): New function.
1420 (linux_handle_new_gdb_connection): New function.
1421 (linux_target_ops): Initialize new structure member.
1422 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1423 * lynx-low.c: Initialize new structure member.
1424 * remote-utils.c (prepare_resume_reply): Implement stop reason
1425 "fork" for "T" stop message.
1426 * server.c (handle_query): Call handle_new_gdb_connection.
1427 * server.h (report_fork_events): Declare global flag.
1428 * target.h (struct target_ops) <handle_new_gdb_connection>:
1429 New member.
1430 (target_handle_new_gdb_connection): New macro.
1431 * win32-low.c: Initialize new structure member.
1432
1433 2015-05-12 Don Breazeal <donb@codesourcery.com>
1434
1435 * mem-break.c (APPEND_TO_LIST): Define macro.
1436 (clone_agent_expr): New function.
1437 (clone_one_breakpoint): New function.
1438 (clone_all_breakpoints): New function.
1439 * mem-break.h: Declare new functions.
1440
1441 2015-05-12 Don Breazeal <donb@codesourcery.com>
1442
1443 * linux-low.c (linux_supports_fork_events): New function.
1444 (linux_supports_vfork_events): New function.
1445 (linux_target_ops): Initialize new structure members.
1446 (initialize_low): Call linux_check_ptrace_features.
1447 * lynx-low.c (lynx_target_ops): Initialize new structure
1448 members.
1449 * server.c (report_fork_events, report_vfork_events):
1450 New global flags.
1451 (handle_query): Add new features to qSupported packet and
1452 response.
1453 (captured_main): Initialize new global variables.
1454 * target.h (struct target_ops) <supports_fork_events>:
1455 New member.
1456 <supports_vfork_events>: New member.
1457 (target_supports_fork_events): New macro.
1458 (target_supports_vfork_events): New macro.
1459 * win32-low.c (win32_target_ops): Initialize new structure
1460 members.
1461
1462 2015-05-12 Gary Benson <gbenson@redhat.com>
1463
1464 * server.c (handle_qxfer_exec_file): Use current process
1465 if annex is empty.
1466
1467 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1468
1469 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1470 Remove HAVE_PTRACE_GETREGS conditionals.
1471 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1472 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1473
1474 2015-05-08 Yao Qi <yao.qi@linaro.org>
1475
1476 * linux-low.c (linux_supports_conditional_breakpoints): New
1477 function.
1478 (linux_target_ops): Install new target method.
1479 * lynx-low.c (lynx_target_ops): Install NULL hook for
1480 supports_conditional_breakpoints.
1481 * nto-low.c (nto_target_ops): Likewise.
1482 * spu-low.c (spu_target_ops): Likewise.
1483 * win32-low.c (win32_target_ops): Likewise.
1484 * server.c (handle_query): Check
1485 target_supports_conditional_breakpoints.
1486 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1487 New field.
1488 (target_supports_conditional_breakpoints): New macro.
1489
1490 2015-05-06 Pedro Alves <palves@redhat.com>
1491
1492 PR server/18081
1493 * server.c (start_inferior): If the process exits, mourn it.
1494
1495 2015-04-21 Gary Benson <gbenson@redhat.com>
1496
1497 * hostio.c (fileio_open_flags_to_host): Factored out to
1498 fileio_to_host_openflags in common/fileio.c. Single use
1499 updated.
1500
1501 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1502
1503 * linux-xtensa-low.c (xtensa_fill_gregset)
1504 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1505 XCHAL_HAVE_LOOP.
1506
1507 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1508
1509 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1510 (regs_info): Replace usrregs pointer with NULL.
1511
1512 2015-04-17 Gary Benson <gbenson@redhat.com>
1513
1514 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1515 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1516 * server.c (handle_qxfer_exec_file): New function.
1517 (qxfer_packets): Add exec-file entry.
1518 (handle_query): Report qXfer:exec-file:read as supported packet.
1519
1520 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1521
1522 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1523
1524 2015-04-09 Gary Benson <gbenson@redhat.com>
1525
1526 * hostio-errno.c (errno_to_fileio_error): Remove function.
1527 Update caller to use remote_fileio_to_fio_error.
1528
1529 2015-04-09 Yao Qi <yao.qi@linaro.org>
1530
1531 * linux-low.c (linux_insert_point): Call
1532 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1533 (linux_remove_point): Call remove_memory_breakpoint if type is
1534 raw_bkpt_type_sw.
1535 * linux-x86-low.c (x86_insert_point): Don't call
1536 insert_memory_breakpoint.
1537 (x86_remove_point): Don't call remove_memory_breakpoint.
1538
1539 2015-04-01 Pedro Alves <palves@redhat.com>
1540 Cleber Rosa <crosa@redhat.com>
1541
1542 * server.c (gdbserver_usage): Reorganize and extend the usage
1543 message.
1544
1545 2015-03-24 Pedro Alves <palves@redhat.com>
1546
1547 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1548 output. Also dump TRAP_TRACE.
1549 (linux_low_filter_event): In debug output, distinguish a
1550 resume_stop SIGSTOP from a delayed SIGSTOP.
1551
1552 2015-03-24 Gary Benson <gbenson@redhat.com>
1553
1554 * linux-x86-low.c (x86_linux_new_thread): Moved to
1555 nat/x86-linux.c.
1556 (x86_linux_prepare_to_resume): Likewise.
1557
1558 2015-03-24 Gary Benson <gbenson@redhat.com>
1559
1560 * Makefile.in (x86-linux-dregs.o): New rule.
1561 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1562 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1563 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1564 (x86_linux_dr_get): Likewise.
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_update_debug_registers): Likewise.
1573
1574 2015-03-24 Gary Benson <gbenson@redhat.com>
1575
1576 * linux-x86-low.c (x86_linux_update_debug_registers):
1577 New function, factored out from...
1578 (x86_linux_prepare_to_resume): ...this.
1579
1580 2015-03-24 Gary Benson <gbenson@redhat.com>
1581
1582 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1583 (x86_linux_dr_set): Likewise.
1584 (update_debug_registers_callback): Likewise.
1585 (x86_linux_dr_set_addr): Likewise.
1586 (x86_linux_dr_get_addr): Likewise.
1587 (x86_linux_dr_set_control): Likewise.
1588 (x86_linux_dr_get_control): Likewise.
1589 (x86_linux_dr_get_status): Likewise.
1590 (x86_linux_prepare_to_resume): Likewise.
1591
1592 2015-03-24 Gary Benson <gbenson@redhat.com>
1593
1594 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1595 Use perror_with_name. Pass string through gettext.
1596 (x86_linux_dr_set): Likewise.
1597
1598 2015-03-24 Gary Benson <gbenson@redhat.com>
1599
1600 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1601 (x86_linux_dr_set_addr): ...this.
1602 (x86_dr_low_get_addr): Rename to...
1603 (x86_linux_dr_get_addr): ...this.
1604 (x86_dr_low_set_control): Rename to...
1605 (x86_linux_dr_set_control): ...this.
1606 (x86_dr_low_get_control): Rename to...
1607 (x86_linux_dr_get_control): ...this.
1608 (x86_dr_low_get_status): Rename to...
1609 (x86_linux_dr_get_status): ...this.
1610 (x86_dr_low): Update with new function names.
1611
1612 2015-03-24 Gary Benson <gbenson@redhat.com>
1613
1614 * Makefile.in (x86-linux.o): New rule.
1615 * configure.srv: Add x86-linux.o to relevant targets.
1616 * linux-low.c (lwp_set_arch_private_info): New function.
1617 (lwp_arch_private_info): Likewise.
1618 * linux-x86-low.c: Include nat/x86-linux.h.
1619 (arch_lwp_info): Removed structure.
1620 (update_debug_registers_callback):
1621 Use lwp_set_debug_registers_changed.
1622 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1623 and lwp_set_debug_registers_changed.
1624 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1625
1626 2015-03-24 Gary Benson <gbenson@redhat.com>
1627
1628 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1629 * linux-arm-low.c (arm_new_thread): Likewise.
1630 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1631 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1632 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1633 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1634
1635 2015-03-24 Gary Benson <gbenson@redhat.com>
1636
1637 * linux-low.c (ptid_of_lwp): New function.
1638 (lwp_is_stopped): Likewise.
1639 (lwp_stop_reason): Likewise.
1640 * linux-x86-low.c (update_debug_registers_callback):
1641 Use lwp_is_stopped.
1642 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1643 lwp_stop_reason.
1644
1645 2015-03-24 Gary Benson <gbenson@redhat.com>
1646
1647 * linux-low.h (linux_stop_lwp): Remove declaration.
1648
1649 2015-03-24 Gary Benson <gbenson@redhat.com>
1650
1651 * linux-low.h: Include nat/linux-nat.h.
1652 * linux-low.c (iterate_over_lwps_args): New structure.
1653 (iterate_over_lwps_filter): New function.
1654 (iterate_over_lwps): Likewise.
1655 * linux-x86-low.c (update_debug_registers_callback):
1656 Update signature to what iterate_over_lwps expects.
1657 Remove PID check that iterate_over_lwps now performs.
1658 (x86_dr_low_set_addr): Use iterate_over_lwps.
1659 (x86_dr_low_set_control): Likewise.
1660
1661 2015-03-24 Gary Benson <gbenson@redhat.com>
1662
1663 * linux-x86-low.c (x86_debug_reg_state): New function.
1664 (x86_linux_prepare_to_resume): Use the above.
1665
1666 2015-03-24 Gary Benson <gbenson@redhat.com>
1667
1668 * linux-low.c (current_lwp_ptid): New function.
1669 * linux-x86-low.c: Include nat/linux-nat.h.
1670 (x86_dr_low_get_addr): Use current_lwp_ptid.
1671 (x86_dr_low_get_control): Likewise.
1672 (x86_dr_low_get_status): Likewise.
1673
1674 2015-03-20 Pedro Alves <palves@redhat.com>
1675
1676 * tracepoint.c (cmd_qtstatus): Make "str" const.
1677
1678 2015-03-20 Pedro Alves <palves@redhat.com>
1679
1680 * server.c (handle_general_set): Make "req_str" const.
1681
1682 2015-03-19 Pedro Alves <palves@redhat.com>
1683
1684 * linux-low.c (linux_resume_one_lwp): Rename to ...
1685 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1686 instead call perror_with_name.
1687 (check_ptrace_stopped_lwp_gone): New function.
1688 (linux_resume_one_lwp): Reimplement as wrapper around
1689 linux_resume_one_lwp_throw that swallows errors if the LWP is
1690 gone.
1691
1692 2015-03-19 Pedro Alves <palves@redhat.com>
1693
1694 * linux-low.c (count_events_callback, select_event_lwp_callback):
1695 No longer check whether the thread has resume_stop as last resume
1696 kind.
1697
1698 2015-03-19 Pedro Alves <palves@redhat.com>
1699
1700 * linux-low.c (count_events_callback, select_event_lwp_callback):
1701 Use the lwp's status_pending_p field, not the thread's.
1702
1703 2015-03-19 Pedro Alves <palves@redhat.com>
1704
1705 * linux-low.c (select_event_lwp_callback): Update comments to
1706 no longer mention SIGTRAP.
1707
1708 2015-03-18 Gary Benson <gbenson@redhat.com>
1709
1710 * server.c (handle_query): Do not report vFile:fstat as supported.
1711
1712 2015-03-11 Gary Benson <gbenson@redhat.com>
1713
1714 * hostio.c (sys/types.h): New include.
1715 (sys/stat.h): Likewise.
1716 (common-remote-fileio.h): Likewise.
1717 (handle_fstat): New function.
1718 (handle_vFile): Handle vFile:fstat packets.
1719
1720 2015-03-11 Gary Benson <gbenson@redhat.com>
1721
1722 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1723 struct stat.st_blocks and struct stat.st_blksize.
1724 * configure: Regenerate.
1725 * config.in: Likewise.
1726 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1727 (OBS): Add common-remote-fileio.o.
1728 (common-remote-fileio.o): New rule.
1729
1730 2015-03-09 Pedro Alves <palves@redhat.com>
1731
1732 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1733 'struct sockaddr' pointer in 'accept' call.
1734
1735 2015-03-09 Pedro Alves <palves@redhat.com>
1736
1737 Revert:
1738 2015-03-07 Pedro Alves <palves@redhat.com>
1739 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1740 or <winsock2.h> here. Instead include "gdb_socket.h".
1741 (remote_open): Use union gdb_sockaddr_u.
1742 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1743 or <winsock2.h> here. Instead include "gdb_socket.h".
1744 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1745 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1746 or <sys/un.h>.
1747 (init_named_socket, gdb_agent_helper_thread): Use union
1748 gdb_sockaddr_u.
1749
1750 2015-03-07 Pedro Alves <palves@redhat.com>
1751
1752 * configure.ac (build_warnings): Move
1753 -Wdeclaration-after-statement to the C-specific set.
1754 * configure: Regenerate.
1755
1756 2015-03-07 Pedro Alves <palves@redhat.com>
1757
1758 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1759 or <winsock2.h> here. Instead include "gdb_socket.h".
1760 (remote_open): Use union gdb_sockaddr_u.
1761 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1762 or <winsock2.h> here. Instead include "gdb_socket.h".
1763 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1764 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1765 or <sys/un.h>.
1766 (init_named_socket, gdb_agent_helper_thread): Use union
1767 gdb_sockaddr_u.
1768
1769 2015-03-07 Pedro Alves <palves@redhat.com>
1770
1771 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1772 instead.
1773
1774 2015-03-06 Yao Qi <yao.qi@linaro.org>
1775
1776 * linux-aarch64-low.c (aarch64_insert_point): Use
1777 show_debug_regs as a boolean.
1778 (aarch64_remove_point): Likewise.
1779
1780 2015-03-05 Pedro Alves <palves@redhat.com>
1781
1782 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1783 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1784 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1785 * nto-low.c (nto_target_ops): Likewise.
1786 * spu-low.c (spu_target_ops): Likewise.
1787 * win32-low.c (win32_target_ops): Likewise.
1788
1789 2015-03-04 Pedro Alves <palves@redhat.com>
1790
1791 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
1792 Decide whether a breakpoint triggered based on the SIGTRAP's
1793 siginfo.si_code.
1794 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1795 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
1796 (linux_low_filter_event): Check for breakpoints before checking
1797 watchpoints.
1798 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1799 siginfo.si_code.
1800 (linux_stopped_by_sw_breakpoint)
1801 (linux_supports_stopped_by_sw_breakpoint)
1802 (linux_stopped_by_hw_breakpoint)
1803 (linux_supports_stopped_by_hw_breakpoint): New functions.
1804 (linux_target_ops): Install new target methods.
1805
1806 2015-03-04 Pedro Alves <palves@redhat.com>
1807
1808 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1809 * server.c (swbreak_feature, hwbreak_feature): New globals.
1810 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1811 (captured_main): Clear swbreak_feature and hwbreak_feature.
1812 * server.h (swbreak_feature, hwbreak_feature): Declare.
1813 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1814 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1815 supports_stopped_by_hw_breakpoint>: New fields.
1816 (target_supports_stopped_by_sw_breakpoint)
1817 (target_stopped_by_sw_breakpoint)
1818 (target_supports_stopped_by_hw_breakpoint)
1819 (target_stopped_by_hw_breakpoint): Declare.
1820
1821 2015-03-04 Pedro Alves <palves@redhat.com>
1822
1823 enum lwp_stop_reason -> enum target_stop_reason
1824 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1825 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1826 (linux_wait_1, stuck_in_jump_pad_callback)
1827 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1828 (linux_stopped_by_watchpoint):
1829 * linux-low.h (enum lwp_stop_reason): Delete.
1830 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1831 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1832
1833 2015-03-04 Yao Qi <yao.qi@linaro.org>
1834
1835 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1836
1837 2015-03-03 Gary Benson <gbenson@redhat.com>
1838
1839 * hostio.c (handle_vFile): Fix prefix lengths.
1840
1841 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1842
1843 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1844 ptr_bits.
1845
1846 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1847
1848 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1849 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1850 (clean): Add "rm -f" for above C files.
1851 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1852 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1853 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1854 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1855 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1856 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1857 (init_registers_s390x_vx_linux64)
1858 (init_registers_s390x_tevx_linux64)
1859 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1860 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1861 declarations.
1862 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1863 (s390_store_vxrs_high): New functions.
1864 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1865 NT_S390_VXRS_HIGH.
1866 (s390_arch_setup): Add logic for selecting one of the new target
1867 descriptions. Activate the new vector regsets if applicable.
1868 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1869 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1870 and init_registers_s390x_tevx_linux64.
1871
1872 2015-03-01 Pedro Alves <palves@redhat.com>
1873
1874 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1875 parameter.
1876
1877 2015-02-27 Pedro Alves <palves@redhat.com>
1878
1879 * linux-x86-low.c (u_debugreg_offset): New function.
1880 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1881
1882 2015-02-27 Pedro Alves <palves@redhat.com>
1883
1884 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1885 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1886 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1887 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1888 (ps_lsetfpregs, ps_getpid)
1889 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1890 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1891 (ps_lsetxregs, ps_plog): Declare.
1892
1893 2015-02-27 Pedro Alves <palves@redhat.com>
1894
1895 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1896 IP_AGENT_EXPORT_FUNC.
1897 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1898 IP_AGENT_EXPORT_FUNC.
1899 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1900 (IP_AGENT_EXPORT): Delete.
1901 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1902 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1903 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1904 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1905 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1906 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1907 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1908 (traceframe_read_count, traceframe_write_count)
1909 (traceframes_created, trace_state_variables, get_raw_reg)
1910 (get_trace_state_variable_value, set_trace_state_variable_value)
1911 (ust_loaded, helper_thread_id, cmd_buf): Use
1912 IPA_SYM_EXPORTED_NAME.
1913 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1914 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1915 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1916 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1917 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1918 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1919 EXTERN_C_PUSH/EXTERN_C_POP.
1920 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1921 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1922 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1923 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1924 (traceframe_write_count, traceframe_read_count)
1925 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1926 (about_to_request_buffer_space, get_trace_state_variable_value)
1927 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1928 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1929 EXTERN_C_PUSH/EXTERN_C_POP.
1930 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1931 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1932 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1933 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1934 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1935 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1936 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1937 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1938 Define.
1939 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1940 (IP_AGENT_EXPORT_VAR_DECL): Define.
1941 (tracing): Declare.
1942 (gdb_agent_get_raw_reg): Declare.
1943
1944 2015-02-27 Tom Tromey <tromey@redhat.com>
1945 Pedro Alves <palves@redhat.com>
1946
1947 Rename symbols whose names are reserved C++ keywords throughout.
1948
1949 2015-02-27 Pedro Alves <palves@redhat.com>
1950
1951 * Makefile.in (COMPILER): New, get it from autoconf.
1952 (CXX): Get from autoconf instead.
1953 (COMPILE.pre): Use COMPILER.
1954 (CC-LD): Rename to ...
1955 (CC_LD): ... this. Use COMPILER.
1956 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
1957 (CXX_FOR_TARGET): Default to g++ instead of gcc.
1958 * acinclude.m4: Include build-with-cxx.m4.
1959 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
1960 Disable -Werror by default if building in C++ mode.
1961 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
1962 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
1963 the C++ compiler. Save/restore CXXFLAGS too.
1964 * configure: Regenerate.
1965
1966 2015-02-27 Pedro Alves <palves@redhat.com>
1967
1968 * acinclude.m4: Include libiberty.m4.
1969 * configure.ac: Call libiberty_INIT.
1970 * config.in, configure: Regenerate.
1971
1972 2015-02-26 Pedro Alves <palves@redhat.com>
1973
1974 * linux-low.c (linux_wait_1): When incrementing the PC past a
1975 program breakpoint always use the_low_target.breakpoint_len as
1976 increment, rather than the maximum between that and
1977 the_low_target.decr_pc_after_break.
1978
1979 2015-02-23 Pedro Alves <palves@redhat.com>
1980
1981 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
1982 thread was doing a step-over; always adjust the PC if
1983 we stepped over a permanent breakpoint.
1984 (linux_wait_1): If we stepped over breakpoint that was on top of a
1985 permanent breakpoint, manually advance the PC past it.
1986
1987 2015-02-23 Pedro Alves <palves@redhat.com>
1988
1989 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
1990 modes.
1991 (x86_fill_gregset, x86_store_gregset): Use it when handling
1992 $orig_eax.
1993
1994 2015-02-20 Pedro Alves <palves@redhat.com>
1995
1996 * thread-db.c: Include "nat/linux-procfs.h".
1997 (thread_db_init): Skip listing new threads if the kernel supports
1998 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
1999
2000 2015-02-20 Pedro Alves <palves@redhat.com>
2001
2002 * linux-low.c (status_pending_p_callback): Use ptid_match.
2003
2004 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2005
2006 PR breakpoints/16812
2007 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2008 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2009 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2010
2011 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2012
2013 PR breakpoints/15956
2014 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2015
2016 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2017
2018 * linux-low.c (linux_low_btrace_conf): Print size.
2019 * server.c (handle_btrace_conf_general_set): New.
2020 (hanle_general_set): Call handle_btrace_conf_general_set.
2021 (handle_query): Report Qbtrace-conf:bts:size as supported.
2022
2023 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2024
2025 * linux-low.c (linux_low_enable_btrace): Update parameters.
2026 (linux_low_btrace_conf): New.
2027 (linux_target_ops)<to_btrace_conf>: Initialize.
2028 * server.c (current_btrace_conf): New.
2029 (handle_btrace_enable): Rename to ...
2030 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
2031 to target_enable_btrace. Update comment. Update users.
2032 (handle_qxfer_btrace_conf): New.
2033 (qxfer_packets): Add btrace-conf entry.
2034 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2035 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2036 (target_ops)<read_btrace_conf>: New.
2037 (target_enable_btrace): Update parameters.
2038 (target_read_btrace_conf): New.
2039
2040 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2041
2042 * server.c (handle_btrace_general_set): Remove call to
2043 target_supports_btrace.
2044 (supported_btrace_packets): New.
2045 (handle_query): Call supported_btrace_packets.
2046 * target.h: include btrace-common.h.
2047 (btrace_target_info): Removed.
2048 (supports_btrace, target_supports_btrace): Update parameters.
2049
2050 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2051
2052 * Makefile.in (SFILES): Add common/btrace-common.c.
2053 (OBS): Add common/btrace-common.o.
2054 (btrace-common.o): Add build rules.
2055 * linux-low: Include btrace-common.h.
2056 (linux_low_read_btrace): Use struct btrace_data. Call
2057 btrace_data_init and btrace_data_fini.
2058
2059 2015-02-06 Pedro Alves <palves@redhat.com>
2060
2061 * thread-db.c (find_new_threads_callback): Add debug output.
2062
2063 2015-02-04 Pedro Alves <palves@redhat.com>
2064
2065 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2066 (resume_stopped_resumed_lwps): New function.
2067 (linux_wait_for_event_filtered): Use it.
2068
2069 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2070
2071 * Makefile.in (SFILES): Add linux-personality.c.
2072 (linux-personality.o): New rule.
2073 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2074 list of objects to be built.
2075 * linux-low.c: Include nat/linux-personality.h.
2076 (linux_create_inferior): Remove code to disable address space
2077 randomization (moved to ../nat/linux-personality.c). Create
2078 cleanup to disable address space randomization.
2079
2080 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2081
2082 * Makefile.in (posix-strerror.o): New rule.
2083 (mingw-strerror.o): Likewise.
2084 * configure: Regenerated.
2085 * configure.ac: Source file ../common/common.host. Initialize new
2086 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2087
2088 2015-01-14 Yao Qi <yao@codesourcery.com>
2089
2090 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2091 (ppc-linux.o): New rule.
2092 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2093 * configure.ac: AC_CHECK_FUNCS(getauxval).
2094 * config.in: Re-generated.
2095 * configure: Re-generated.
2096 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2097 ppc64_64bit_inferior_p
2098
2099 2015-01-14 Yao Qi <yao@codesourcery.com>
2100
2101 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2102 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2103 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2104 (PT_ORIG_R3, PT_TRAP): Likewise.
2105 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2106 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2107 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2108
2109 2015-01-10 Joel Brobecker <brobecker@adacore.com>
2110
2111 * i387-fp.c (i387_cache_to_xsave): In look over
2112 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2113 zmmh_low_space field by use of zmmh_high_space.
2114
2115 2015-01-09 Pedro Alves <palves@redhat.com>
2116
2117 * linux-low.c (step_over_bkpt): Move higher up in the file.
2118 (handle_extended_wait): Don't store the stop_pc here.
2119 (get_stop_pc): Adjust comments and rename to ...
2120 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2121 stopped for a software breakpoint or hardware breakpoint.
2122 (thread_still_has_status_pending_p): New function.
2123 (status_pending_p_callback): Use
2124 thread_still_has_status_pending_p. If the event is no longer
2125 interesting, resume the LWP.
2126 (handle_tracepoints): Add assert.
2127 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2128 (wstatus_maybe_breakpoint): New function.
2129 (cancel_breakpoint): Delete function.
2130 (check_stopped_by_watchpoint): New function, factored out from
2131 linux_low_filter_event.
2132 (lp_status_maybe_breakpoint): Delete function.
2133 (linux_low_filter_event): Remove filter_ptid argument.
2134 Leave thread group exits pending here. Store the LWP's stop PC.
2135 Always leave events pending.
2136 (linux_wait_for_event_filtered): Pull all events out of the
2137 kernel, and leave them all pending.
2138 (count_events_callback, select_event_lwp_callback): Consider all
2139 events.
2140 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2141 (select_event_lwp): Only give preference to the stepping LWP in
2142 all-stop mode. Adjust comments.
2143 (ignore_event): New function.
2144 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2145 references to cancel_breakpoints. Adjust to renames. Also give
2146 equal priority to all LWPs that have had events in non-stop mode.
2147 If reporting a software breakpoint event, unadjust the LWP's PC.
2148 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2149 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2150 Adjust.
2151 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2152 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2153 (linux_stopped_by_watchpoint): Adjust.
2154 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2155 * linux-low.h (enum lwp_stop_reason): New.
2156 (struct lwp_info) <stop_pc>: Adjust comment.
2157 <stopped_by_watchpoint>: Delete field.
2158 <stop_reason>: New field.
2159 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2160 * mem-break.c (software_breakpoint_inserted_here)
2161 (hardware_breakpoint_inserted_here): New function.
2162 * mem-break.h (software_breakpoint_inserted_here)
2163 (hardware_breakpoint_inserted_here): Declare.
2164 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2165 (cancel_breakpoints): Delete.
2166 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2167 (upload_fast_traceframes): Remove references to
2168 cancel_breakpoints.
2169
2170 2015-01-09 Pedro Alves <palves@redhat.com>
2171
2172 * thread-db.c (find_new_threads_callback): Ignore thread if the
2173 kernel thread ID is -1.
2174
2175 2015-01-09 Pedro Alves <palves@redhat.com>
2176
2177 * linux-low.c (linux_attach_fail_reason_string): Move to
2178 nat/linux-ptrace.c, and rename.
2179 (linux_attach_lwp): Update comment.
2180 (attach_proc_task_lwp_callback): New function.
2181 (linux_attach): Adjust to rename and use
2182 linux_proc_attach_tgid_threads.
2183 (linux_attach_fail_reason_string): Delete declaration.
2184
2185 2015-01-01 Joel Brobecker <brobecker@adacore.com>
2186
2187 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2188 * server.c (gdbserver_version): Likewise.
2189
2190 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2191
2192 * remote-utils.c: Include ctype.h.
2193 (input_interrupt): Explicitly handle the case when the char
2194 received is the NUL byte. Improve the printing of non-ASCII
2195 characters.
2196
2197 2014-12-16 Joel Brobecker <brobecker@adacore.com>
2198
2199 * linux-low.c (linux_low_filter_event): Update call to
2200 linux_enable_event_reporting following the addition of
2201 a new parameter to that function.
2202
2203 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
2204
2205 PR server/17457
2206 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2207 (AARCH64_FPCR_REGNO): Likewise.
2208 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2209 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2210 (aarch64_store_fpregset): Likewise.
2211
2212 2014-12-15 Joel Brobecker <brobecker@adacore.com>
2213
2214 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2215 Remove FIXME comment about assumption about N.
2216
2217 2014-12-13 Joel Brobecker <brobecker@adacore.com>
2218
2219 * configure.ac: If large-file support is disabled in GDBserver,
2220 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2221 * configure: Regenerate.
2222
2223 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2224
2225 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2226 warning upon ENODATA from ptrace.
2227 * linux-s390-low.c (s390_store_tdb): New.
2228 (s390_regsets): Add regset for NT_S390_TDB.
2229
2230 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2231
2232 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2233 without a fill_function.
2234 * linux-s390-low.c (s390_fill_last_break): Remove.
2235 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2236 (s390_arch_setup): Use regset's size instead of fill_function for
2237 loop end condition.
2238
2239 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2240
2241 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2242 the regset's store function when ptrace returned an error.
2243 * regcache.c (get_thread_regcache): Invalidate register cache
2244 before fetching inferior's registers.
2245
2246 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2247
2248 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2249 while-loop as for-loop.
2250 (regsets_store_inferior_registers): Likewise.
2251
2252 2014-11-28 Yao Qi <yao@codesourcery.com>
2253
2254 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2255 * config.in, configure: Re-generate.
2256 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2257 is defined.
2258
2259 2014-11-21 Yao Qi <yao@codesourcery.com>
2260
2261 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2262 (AC_CHECK_HEADERS): Remove malloc.h.
2263 * configure: Re-generated.
2264 * config.in: Re-generated.
2265 * server.h: Don't include alloca.h and malloc.h.
2266 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2267 Don't include malloc.h.
2268
2269 2014-11-17 Joel Brobecker <brobecker@adacore.com>
2270
2271 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2272 corresponding ERRNO check in same block.
2273
2274 2014-11-12 Pedro Alves <palves@redhat.com>
2275
2276 * server.c (cont_thread): Update comment.
2277 (start_inferior, attach_inferior): No longer clear cont_thread.
2278 (handle_v_cont): No longer set cont_thread.
2279 (captured_main): Clear cont_thread each time a GDB connects.
2280
2281 2014-11-12 Pedro Alves <palves@redhat.com>
2282
2283 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2284 thread, and don't resume all threads if the Hc thread has exited.
2285
2286 2014-11-12 Pedro Alves <palves@redhat.com>
2287
2288 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2289 the process group instead of to a specific LWP.
2290
2291 2014-10-15 Pedro Alves <palves@redhat.com>
2292
2293 PR server/17487
2294 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2295 parameter.
2296 (arm_set_thread_context): Delete.
2297 (the_low_target): Adjust.
2298 * win32-i386-low.c (debug_registers_changed)
2299 (debug_registers_used): Delete.
2300 (update_debug_registers_callback): New function.
2301 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2302 needing to update their debug registers.
2303 (win32_get_current_dr): New function.
2304 (x86_dr_low_get_addr, x86_dr_low_get_control)
2305 (x86_dr_low_get_status): Fetch the debug register from the thread
2306 record's context.
2307 (i386_initial_stuff): Adjust.
2308 (i386_get_thread_context): Remove current_event parameter. Don't
2309 clear debug_registers_changed nor copy DR values to
2310 debug_reg_state.
2311 (i386_set_thread_context): Delete.
2312 (i386_prepare_to_resume): New function.
2313 (i386_thread_added): Mark the thread as needing to update irs
2314 debug registers.
2315 (the_low_target): Remove i386_set_thread_context and install
2316 i386_prepare_to_resume.
2317 * win32-low.c (win32_get_thread_context): Adjust.
2318 (win32_set_thread_context): Use SetThreadContext
2319 directly.
2320 (win32_prepare_to_resume): New function.
2321 (win32_require_context): New function, factored out from ...
2322 (thread_rec): ... this.
2323 (continue_one_thread): Call win32_prepare_to_resume on each thread
2324 we're about to continue.
2325 (win32_resume): Call win32_prepare_to_resume on the event thread.
2326 * win32-low.h (struct win32_thread_info)
2327 <debug_registers_changed>: New field.
2328 (struct win32_target_ops): Change prototype of set_thread_context,
2329 delete set_thread_context and add prepare_to_resume.
2330 (win32_require_context): New declaration.
2331
2332 2014-10-08 Gary Benson <gbenson@redhat.com>
2333
2334 * server.h: Do not include common-exceptions.h.
2335
2336 2014-10-08 Gary Benson <gbenson@redhat.com>
2337
2338 * server.h: Do not include cleanups.h.
2339
2340 2014-09-30 James Hogan <james.hogan@imgtec.com>
2341
2342 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2343 mips64-dsp-linux.c.
2344
2345 2014-09-23 Yao Qi <yao@codesourcery.com>
2346
2347 * linux-low.c (lp_status_maybe_breakpoint): New function.
2348 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2349 (count_events_callback): Likewise.
2350 (select_event_lwp_callback): Likewise.
2351 (cancel_breakpoints_callback): Likewise.
2352
2353 2014-09-19 Don Breazeal <donb@codesourcery.com>
2354
2355 * linux-low.c (handle_extended_wait): Call
2356 linux_ptrace_get_extended_event.
2357 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2358 linux_is_extended_waitstatus.
2359
2360 2014-09-16 Joel Brobecker <brobecker@adacore.com>
2361
2362 * Makefile.in (CPPFLAGS): Define.
2363 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2364 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2365
2366 2014-09-16 Gary Benson <gbenson@redhat.com>
2367
2368 * inferiors.h (current_inferior): Renamed as...
2369 (current_thread): New variable. All uses updated.
2370 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2371 (maybe_move_out_of_jump_pad): Likewise.
2372 (cancel_breakpoint): Likewise.
2373 (linux_low_filter_event): Likewise.
2374 (wait_for_sigstop): Likewise.
2375 (linux_resume_one_lwp): Likewise.
2376 (need_step_over_p): Likewise.
2377 (start_step_over): Likewise.
2378 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2379 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2380 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2381 and save_inferior as saved_thread.
2382 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2383 saved_thread.
2384 (regcache_invalidate_thread): Likewise.
2385 * remote-utils.c (prepare_resume_reply): Likewise.
2386 * thread-db.c (thread_db_get_tls_address): Likewise.
2387 (disable_thread_event_reporting): Likewise.
2388 (remove_thread_event_breakpoints): Likewise.
2389 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2390 as saved_thread.
2391 * target.h (set_desired_inferior): Renamed as...
2392 (set_desired_thread): New declaration. All uses updated.
2393 * server.c (myresume): Updated comment to reference thread instead
2394 of inferior.
2395 (handle_serial_event): Likewise.
2396 (handle_target_event): Likewise.
2397
2398 2014-09-12 Tom Tromey <tromey@redhat.com>
2399 Gary Benson <gbenson@redhat.com>
2400
2401 * regcache.h: Include common-regcache.h.
2402 (regcache_read_pc): Don't declare.
2403 * regcache.c (get_thread_regcache_for_ptid): New function.
2404
2405 2014-09-11 Tom Tromey <tromey@redhat.com>
2406 Gary Benson <gbenson@redhat.com>
2407
2408 * symbol.c: New file.
2409 * Makefile.in (SFILES): Add symbol.c.
2410 (OBS): Add symbol.o.
2411
2412 2014-09-11 Gary Benson <gbenson@redhat.com>
2413
2414 * target.c (target_stop_ptid, target_continue_ptid): New
2415 functions.
2416
2417 2014-09-11 Tom Tromey <tromey@redhat.com>
2418 Gary Benson <gbenson@redhat.com>
2419
2420 * target.h: Include target/target.h.
2421 * target.c (target_read_memory, target_read_uint32)
2422 (target_write_memory): New functions.
2423
2424 2014-09-11 Gary Benson <gbenson@redhat.com>
2425
2426 * server.h (debug_hw_points): Don't declare.
2427 * server.c (debug_hw_points): Don't define. Replace all uses
2428 with show_debug_regs.
2429 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2430 all uses with show_debug_regs.
2431
2432 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2433
2434 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2435 endianness into account.
2436 (ppc_supply_ptrace_register): Likewise.
2437
2438 2014-09-03 James Hogan <james.hogan@imgtec.com>
2439
2440 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2441 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2442
2443 2014-09-03 Gary Benson <gbenson@redhat.com>
2444
2445 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2446 ALL_DEBUG_ADDRESS_REGISTERS.
2447
2448 2014-09-02 Gary Benson <gbenson@redhat.com>
2449
2450 * i386-low.h: Renamed as...
2451 * x86-low.h: New file. All type, function and variable name
2452 prefixes changed from "i386_" to "x86_". All references updated.
2453 * i386-low.c: Renamed as...
2454 * x86-low.c: New file. All type, function and variable name
2455 prefixes changed from "i386_" to "x86_". All references updated.
2456
2457 2014-09-02 Gary Benson <gbenson@redhat.com>
2458
2459 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2460 (x86_linux_new_thread): Likewise.
2461
2462 2014-08-29 Gary Benson <gbenson@redhat.com>
2463
2464 * server.h (setjmp.h): Do not include.
2465 (toplevel): Do not declare.
2466 (common-exceptions.h): Include.
2467 (cleanups.h): Likewise.
2468 * server.c (toplevel): Do not define.
2469 (exit_code): New static global.
2470 (detach_or_kill_for_exit_cleanup): New function.
2471 (main): New function. Original main renamed to...
2472 (captured_main): New function.
2473 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2474
2475 2014-08-29 Gary Benson <gbenson@redhat.com>
2476
2477 * Makefile.in (SFILES): Add common/common-exceptions.c.
2478 (OBS): Add common-exceptions.o.
2479 (common-exceptions.o): New rule.
2480 * utils.c (prepare_to_throw_exception): New function.
2481
2482 2014-08-29 Gary Benson <gbenson@redhat.com>
2483
2484 * config.in: Regenerate.
2485 * configure: Likewise.
2486
2487 2014-08-29 Gary Benson <gbenson@redhat.com>
2488
2489 * Makefile.in (SFILES): Add common/cleanups.c.
2490 (OBS): cleanups.o.
2491 (cleanups.o): New rule.
2492
2493 2014-08-29 Gary Benson <gbenson@redhat.com>
2494
2495 * utils.c (internal_vwarning): New function.
2496
2497 2014-08-28 Gary Benson <gbenson@redhat.com>
2498
2499 * utils.h (fatal): Remove declaration.
2500 * utils.c (fatal): Remove function.
2501
2502 2014-08-28 Gary Benson <gbenson@redhat.com>
2503
2504 * tracepoint.c (gdb_agent_init): Replace fatal with
2505 perror_with_name.
2506 (initialize_tracepoint): Likewise.
2507
2508 2014-08-28 Gary Benson <gbenson@redhat.com>
2509
2510 * remote-utils.c (remote_prepare): Replace fatal with error.
2511
2512 2014-08-28 Gary Benson <gbenson@redhat.com>
2513
2514 * linux-low.c (linux_async): Replace fatal with warning.
2515 Tidy up and return.
2516 (linux_start_non_stop): Return -1 if linux_async failed.
2517
2518 2014-08-28 Gary Benson <gbenson@redhat.com>
2519
2520 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2521 gdb_assert.
2522 (i386_dr_low_get_addr): Remove vague comment.
2523 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2524 gdb_assert.
2525
2526 2014-08-28 Gary Benson <gbenson@redhat.com>
2527
2528 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2529 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2530 internal_error.
2531 (linux_resume_one_lwp): Likewise.
2532 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2533 gdb_assert.
2534 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2535 with internal_error.
2536 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2537 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2538 (find_register_by_name): Replace fatal with internal_error.
2539 (find_regno): Likewise.
2540 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2541 * thread-db.c (thread_db_create_event): Likewise.
2542 (thread_db_load_search): Likewise.
2543 (try_thread_db_load_1): Likewise.
2544 * tracepoint.c (get_jump_space_head): Replace fatal with
2545 internal_error.
2546 (claim_trampoline_space): Likewise.
2547 (have_fast_tracepoint_trampoline_buffer): Likewise.
2548 (cmd_qtstart): Likewise.
2549 (stop_tracing): Likewise.
2550 (fast_tracepoint_collecting): Likewise.
2551 (target_malloc): Likewise.
2552 (download_tracepoint): Likewise.
2553 (download_trace_state_variables): Replace check with gdb_assert.
2554 (upload_fast_traceframes): Replace fatal with internal_error.
2555
2556 2014-08-19 Tom Tromey <tromey@redhat.com>
2557 Gary Benson <gbenson@redhat.com>
2558
2559 * Makefile.in (SFILES): Add common/common-debug.c.
2560 (OBS): Add common-debug.o.
2561 (common-debug.o): New rule.
2562 * debug.h (debug_printf): Don't declare.
2563 * debug.c (debug_printf): Renamed and rewritten as...
2564 (debug_vprintf): New function.
2565
2566 2014-08-19 Gary Benson <gbenson@redhat.com>
2567
2568 * utils.h: Do not include print-utils.h.
2569
2570 2014-08-19 Tom Tromey <tromey@redhat.com>
2571 Gary Benson <gbenson@redhat.com>
2572
2573 * server.h: Add static assertion.
2574 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2575
2576 2014-08-19 Tom Tromey <tromey@redhat.com>
2577 Gary Benson <gbenson@redhat.com>
2578
2579 * Makefile.in (SFILES): Add common/errors.c.
2580 (OBS): Add errors.o.
2581 (IPA_OBS): Add errors-ipa.o.
2582 (errors.o): New rule.
2583 (errors-ipa.o): Likewise.
2584 * utils.h (perror_with_name, error, warning): Don't declare.
2585 * utils.c (warning): Renamed and rewritten as...
2586 (vwarning): New function.
2587 (error): Renamed and rewritten as...
2588 (verror): New function.
2589 (internal_error): Renamed and rewritten as...
2590 (internal_verror): New function.
2591
2592 2014-08-07 Gary Benson <gbenson@redhat.com>
2593
2594 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2595 * configure: Regenerate.
2596 * config.in: Likewise.
2597 * server.h: Do not include errno.h.
2598 * event-loop.c: Likewise.
2599 * hostio-errno.c: Likewise.
2600 * linux-low.c: Likewise.
2601 * remote-utils.c: Likewise.
2602 * spu-low.c: Likewise.
2603 * utils.c: Likewise.
2604 * gdbreplay.c: Unconditionally include errno.h.
2605
2606 2014-08-07 Gary Benson <gbenson@redhat.com>
2607
2608 * server.h: Do not include string.h.
2609 * event-loop.c: Likewise.
2610 * linux-low.c: Likewise.
2611 * regcache.c: Likewise.
2612 * remote-utils.c: Likewise.
2613 * spu-low.c: Likewise.
2614 * utils.c: Likewise.
2615
2616 2014-08-07 Gary Benson <gbenson@redhat.com>
2617
2618 * server.h: Do not include gdb_assert.h.
2619
2620 2014-08-07 Gary Benson <gbenson@redhat.com>
2621
2622 * server.h: Do not include common-utils.h.
2623
2624 2014-08-07 Gary Benson <gbenson@redhat.com>
2625
2626 * server.h: Do not include ptid.h.
2627 * notif.h: Likewise.
2628
2629 2014-08-07 Gary Benson <gbenson@redhat.com>
2630
2631 * server.h: Do not include gdb_locale.h.
2632
2633 2014-08-07 Gary Benson <gbenson@redhat.com>
2634
2635 * server.h: Do not include gdb/signals.h.
2636 * win32-low.c: Likewise.
2637
2638 2014-08-07 Gary Benson <gbenson@redhat.com>
2639
2640 * server.h: Do not include pathmax.h.
2641
2642 2014-08-07 Gary Benson <gbenson@redhat.com>
2643
2644 * server.h: Do not include libiberty.h.
2645 * linux-bfin-low.c: Likewise.
2646
2647 2014-08-07 Gary Benson <gbenson@redhat.com>
2648
2649 * server.h: Do not include ansidecl.h.
2650
2651 2014-08-07 Gary Benson <gbenson@redhat.com>
2652
2653 * linux-x86-low.c: Do not include stddef.h.
2654 * lynx-ppc-low.c: Likewise.
2655 * tracepoint.c: Likewise.
2656
2657 2014-08-07 Gary Benson <gbenson@redhat.com>
2658
2659 * server.h: Do not include stdarg.h.
2660 * nto-low.c: Likewise.
2661
2662 2014-08-07 Gary Benson <gbenson@redhat.com>
2663
2664 * server.h: Do not include stdlib.h.
2665 * inferiors.c: Likewise.
2666 * linux-low.c: Likewise.
2667 * regcache.c: Likewise.
2668 * spu-low.c: Likewise.
2669 * tracepoint.c: Likewise.
2670 * utils.c: Likewise.
2671
2672 2014-08-07 Gary Benson <gbenson@redhat.com>
2673
2674 * server.h: Do not include stdio.h.
2675 * linux-low.c: Likewise.
2676 * remote-utils.c: Likewise.
2677 * spu-low.c: Likewise.
2678 * utils.c: Likewise.
2679 * wincecompat.c: Likewise.
2680
2681 2014-08-06 Gary Benson <gbenson@redhat.com>
2682
2683 * regcache.c (init_register_cache): Move conditionals inside if.
2684
2685 2014-08-06 Gary Benson <gbenson@redhat.com>
2686
2687 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2688
2689 2014-07-31 Gary Benson <gbenson@redhat.com>
2690
2691 * ax.h: Do not include server.h.
2692 * gdbthread.h: Likewise.
2693 * lynx-low.h: Likewise.
2694 * notif.h: Likewise.
2695
2696 2014-07-30 Gary Benson <gbenson@redhat.com>
2697
2698 * server.h: Include common-defs.h.
2699 Do not include config.h or build-gnulib-gdbserver/config.h.
2700
2701 2014-07-30 Gary Benson <gbenson@redhat.com>
2702
2703 * hostio-errno.c: Move server.h to top of includes list.
2704 * inferiors.c: Likewise.
2705 * linux-x86-low.c: Likewise.
2706 * notif.c: Include server.h.
2707
2708 2014-07-24 Tom Tromey <tromey@redhat.com>
2709 Gary Benson <gbenson@redhat.com>
2710
2711 * server.h (CORE_ADDR): Now unsigned.
2712
2713 2014-07-16 Pedro Alves <palves@redhat.com>
2714
2715 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2716
2717 2014-07-15 Pedro Alves <palves@redhat.com>
2718
2719 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2720 copy.
2721
2722 2014-07-11 Pedro Alves <palves@redhat.com>
2723
2724 * linux-low.c (kill_wait_lwp): New function, based on
2725 kill_one_lwp_callback, but use my_waitpid directly.
2726 (kill_one_lwp_callback, linux_kill): Use it.
2727
2728 2014-06-23 Pedro Alves <palves@redhat.com>
2729
2730 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2731 before setting DR0..DR3.
2732
2733 2014-06-20 Gary Benson <gbenson@redhat.com>
2734
2735 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2736 * configure: Regenerated.
2737 * config.in: Likewise.
2738
2739 2014-06-20 Gary Benson <gbenson@redhat.com>
2740
2741 * Makefile.in (SFILES): Update locations for files moved
2742 from common to nat.
2743 (object file files): Reordered.
2744
2745 2014-06-20 Gary Benson <gbenson@redhat.com>
2746
2747 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2748 (i386_dr_low_set_addr): Likewise.
2749 (i386_dr_low_get_addr): Likewise.
2750 (i386_dr_low_can_set_control): Likewise.
2751 (i386_dr_low_set_control): Likewise.
2752 (i386_dr_low_get_control): Likewise.
2753 (i386_dr_low_get_status): Likewise.
2754 (i386_get_debug_register_length): Likewise.
2755 * linux-x86-low.c (i386_dr_low_set_addr):
2756 Changed signature. Made static.
2757 (i386_dr_low_get_addr): Likewise.
2758 (i386_dr_low_set_control): Likewise.
2759 (i386_dr_low_get_control): Likewise.
2760 (i386_dr_low_get_status): Likewise.
2761 (i386_dr_low): New global variable.
2762 * win32-i386-low.c (i386_dr_low_set_addr):
2763 Changed signature. Made static.
2764 (i386_dr_low_get_addr): Likewise.
2765 (i386_dr_low_set_control): Likewise.
2766 (i386_dr_low_get_control): Likewise.
2767 (i386_dr_low_get_status): Likewise.
2768 (i386_dr_low): New global variable.
2769
2770 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2771
2772 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2773 * Makefile.in (AR, AR_FLAGS): Define.
2774 * configure: Regenerate.
2775
2776 2014-06-19 Gary Benson <gbenson@redhat.com>
2777
2778 * Makefile.in (i386-dregs.o): New rule.
2779 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2780 * i386-low.c (target.h): Remove include.
2781 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2782 (DR_CONTROL_SHIFT): Likewise.
2783 (DR_CONTROL_SIZE): Likewise.
2784 (DR_RW_EXECUTE): Likewise.
2785 (DR_RW_WRITE): Likewise.
2786 (DR_RW_READ): Likewise.
2787 (DR_RW_IORW): Likewise.
2788 (DR_LEN_1): Likewise.
2789 (DR_LEN_2): Likewise.
2790 (DR_LEN_4): Likewise.
2791 (DR_LEN_8): Likewise.
2792 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2793 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2794 (DR_ENABLE_SIZE): Likewise.
2795 (DR_LOCAL_SLOWDOWN): Likewise.
2796 (DR_GLOBAL_SLOWDOWN): Likewise.
2797 (DR_CONTROL_RESERVED): Likewise.
2798 (I386_DR_CONTROL_MASK): Likewise.
2799 (I386_DR_VACANT): Likewise.
2800 (I386_DR_LOCAL_ENABLE): Likewise.
2801 (I386_DR_GLOBAL_ENABLE): Likewise.
2802 (I386_DR_DISABLE): Likewise.
2803 (I386_DR_SET_RW_LEN): Likewise.
2804 (I386_DR_GET_RW_LEN): Likewise.
2805 (I386_DR_WATCH_HIT): Likewise.
2806 (i386_wp_op_t): Likewise.
2807 (i386_show_dr): Likewise.
2808 (i386_length_and_rw_bits): Likewise.
2809 (i386_insert_aligned_watchpoint): Likewise.
2810 (i386_remove_aligned_watchpoint): Likewise.
2811 (i386_handle_nonaligned_watchpoint): Likewise.
2812 i386_update_inferior_debug_regs(): Likewise.
2813 (i386_dr_insert_watchpoint): Likewise.
2814 (i386_dr_remove_watchpoint): Likewise.
2815 (i386_dr_region_ok_for_watchpoint): Likewise.
2816 (i386_dr_stopped_data_address): Likewise.
2817 (i386_dr_stopped_by_watchpoint): Likewise.
2818
2819 2014-06-19 Gary Benson <gbenson@redhat.com>
2820
2821 * i386-low.c (i386_dr_show): Renamed to
2822 i386_show_dr and made static. All uses updated.
2823 (i386_dr_length_and_rw_bits): Renamed to
2824 i386_length_and_rw_bits and made static.
2825 All uses updated.
2826 (i386_dr_insert_aligned_watchpoint): Renamed to
2827 i386_insert_aligned_watchpoint and made static.
2828 All uses updated.
2829 (i386_dr_remove_aligned_watchpoint): Renamed to
2830 i386_remove_aligned_watchpoint and made static.
2831 All uses updated.
2832 (i386_dr_update_inferior_debug_regs): Renamed to
2833 i386_update_inferior_debug_regs and made static.
2834 All uses updated.
2835
2836 2014-06-18 Gary Benson <gbenson@redhat.com>
2837
2838 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2839 (i386_dr_low_can_set_control): Likewise.
2840 (i386_get_debug_register_length): Likewise.
2841 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2842 (i386_dr_low_can_set_control): Likewise.
2843 (i386_get_debug_register_length): Likewise.
2844
2845 2014-06-17 Gary Benson <gbenson@redhat.com>
2846
2847 * i386-low.h (i386-dregs.h): New include.
2848 (DR_FIRSTADDR): Now in i386-dregs.h.
2849 (DR_LASTADDR): Likewise.
2850 (DR_NADDR): Likewise.
2851 (DR_STATUS): Likewise.
2852 (DR_CONTROL): Likewise.
2853 (i386_debug_reg_state): Likewise.
2854 (i386_dr_insert_watchpoint): Likewise.
2855 (i386_dr_remove_watchpoint): Likewise.
2856 (i386_dr_region_ok_for_watchpoint): Likewise.
2857 (i386_dr_stopped_data_address): Likewise.
2858 (i386_dr_stopped_by_watchpoint): Likewise.
2859 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2860
2861 2014-06-18 Gary Benson <gbenson@redhat.com>
2862
2863 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2864 i386_dr_insert_watchpoint.
2865 (i386_low_remove_watchpoint): Renamed to
2866 i386_dr_remove_watchpoint.
2867 (i386_low_region_ok_for_watchpoint): Renamed to
2868 i386_dr_region_ok_for_watchpoint.
2869 (i386_low_stopped_data_address): Renamed to
2870 i386_dr_stopped_data_address.
2871 (i386_low_stopped_by_watchpoint): Renamed to
2872 i386_dr_stopped_by_watchpoint.
2873 * i386-low.c (i386_show_dr): Renamed to
2874 i386_dr_show and made nonstatic. All uses updated.
2875 (i386_length_and_rw_bits): Renamed to
2876 i386_dr_length_and_rw_bits and made nonstatic.
2877 All uses updated.
2878 (i386_insert_aligned_watchpoint): Renamed to
2879 i386_dr_insert_aligned_watchpoint and made nonstatic.
2880 All uses updated.
2881 (i386_remove_aligned_watchpoint): Renamed to
2882 i386_dr_remove_aligned_watchpoint and made nonstatic.
2883 All uses updated.
2884 (i386_update_inferior_debug_regs): Renamed to
2885 i386_dr_update_inferior_debug_regs and made nonstatic.
2886 All uses updated.
2887 (i386_low_insert_watchpoint): Renamed to
2888 i386_dr_insert_watchpoint. All uses updated.
2889 (i386_low_remove_watchpoint): Renamed to
2890 i386_dr_remove_watchpoint. All uses updated.
2891 (i386_low_region_ok_for_watchpoint): Renamed to
2892 i386_dr_region_ok_for_watchpoint. All uses updated.
2893 (i386_low_stopped_data_address): Renamed to
2894 i386_dr_stopped_data_address. All uses updated.
2895 (i386_low_stopped_by_watchpoint): Renamed to
2896 i386_dr_stopped_by_watchpoint. All uses updated.
2897
2898 2014-06-18 Gary Benson <gbenson@redhat.com>
2899
2900 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2901 (i386_dr_low_can_set_control): Likewise.
2902 (i386_insert_aligned_watchpoint): New check.
2903
2904 2014-06-18 Gary Benson <gbenson@redhat.com>
2905
2906 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2907 Renamed to state.
2908
2909 2014-06-18 Gary Benson <gbenson@redhat.com>
2910
2911 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2912 instead of fatal and error.
2913 (i386_handle_nonaligned_watchpoint): Likewise.
2914
2915 2014-06-18 Gary Benson <gbenson@redhat.com>
2916
2917 * i386-low.c (i386_get_debug_register_length): New macro.
2918 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2919 (i386_show_dr): Use debug_printf instead of fprintf. Use
2920 phex to format values.
2921
2922 2014-06-18 Gary Benson <gbenson@redhat.com>
2923
2924 * i386-low.h: Comment changes.
2925 * i386-low.c: Likewise.
2926
2927 2014-06-18 Gary Benson <gbenson@redhat.com>
2928
2929 * i386-low.c: Whitespace changes.
2930
2931 2014-06-12 Tom Tromey <tromey@redhat.com>
2932
2933 * utils.c (freeargv): Remove.
2934
2935 2014-06-12 Tom Tromey <tromey@redhat.com>
2936
2937 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2938 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2939 (parse_debug_format_options): Likewise.
2940 (gdbserver_usage): Likewise.
2941 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2942 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2943 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2944 against libiberty.
2945 ($(LIBGNU)): Depend on libiberty.
2946 (all-lib): Recurse into all subdirs.
2947 (install-only): Invoke "install" target in subdirs.
2948 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2949 targets.
2950 * configure: Rebuild.
2951 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
2952 for vasprintf, vsnprintf, or gettimeofday.
2953 * configure.srv: Don't add safe-ctype.o or lbasename.o to
2954 srv_tgtobj.
2955
2956 2014-06-05 Joel Brobecker <brobecker@adacore.com>
2957
2958 * development.sh: Delete.
2959 * Makefile.in (config.status): Adjust dependency on development.sh.
2960 * configure.ac: Adjust development.sh source call.
2961 * configure: Regenerate.
2962
2963 2014-06-02 Pedro Alves <palves@redhat.com>
2964
2965 * ax.c (gdb_free_agent_expr): New function.
2966 * ax.h (gdb_free_agent_expr): New declaration.
2967 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
2968 list.
2969 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
2970 static.
2971 (clear_breakpoint_conditions_and_commands): New function.
2972 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
2973 (clear_breakpoint_conditions_and_commands): New declaration.
2974
2975 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2976
2977 * linux-aarch64-low.c (asm/ptrace.h): Include.
2978
2979 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2980
2981 Fix TLS access for -static -pthread.
2982 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
2983 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
2984 (thread_db_load_search, try_thread_db_load_1): Initialize it.
2985
2986 2014-05-20 Pedro Alves <palves@redhat.com>
2987
2988 * linux-aarch64-low.c (aarch64_insert_point)
2989 (aarch64_remove_point): No longer check whether the type is
2990 supported here. Adjust to new interface.
2991 (the_low_target): Install aarch64_supports_z_point_type as
2992 supports_z_point_type method.
2993 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
2994 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
2995 instead of a Z packet char. Adjust.
2996 (arm_supports_z_point_type): New function.
2997 (arm_insert_point, arm_remove_point): Adjust to new interface.
2998 (the_low_target): Install arm_supports_z_point_type.
2999 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3000 (cris_insert_point, cris_remove_point): Adjust to new interface.
3001 Don't check whether the type is supported here.
3002 (the_low_target): Install cris_supports_z_point_type.
3003 * linux-low.c (linux_supports_z_point_type): New function.
3004 (linux_insert_point, linux_remove_point): Adjust to new interface.
3005 * linux-low.h (struct linux_target_ops) <insert_point,
3006 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3007 raw_breakpoint pointer parameter.
3008 <supports_z_point_type>: New method.
3009 * linux-mips-low.c (mips_supports_z_point_type): New function.
3010 (mips_insert_point, mips_remove_point): Adjust to new interface.
3011 Use mips_supports_z_point_type.
3012 (the_low_target): Install mips_supports_z_point_type.
3013 * linux-ppc-low.c (the_low_target): Install NULL as
3014 supports_z_point_type method.
3015 * linux-s390-low.c (the_low_target): Install NULL as
3016 supports_z_point_type method.
3017 * linux-sparc-low.c (the_low_target): Install NULL as
3018 supports_z_point_type method.
3019 * linux-x86-low.c (x86_supports_z_point_type): New function.
3020 (x86_insert_point): Adjust to new insert_point interface. Use
3021 insert_memory_breakpoint. Adjust to new
3022 i386_low_insert_watchpoint interface.
3023 (x86_remove_point): Adjust to remove_point interface. Use
3024 remove_memory_breakpoint. Adjust to new
3025 i386_low_remove_watchpoint interface.
3026 (the_low_target): Install x86_supports_z_point_type.
3027 * lynx-low.c (lynx_target_ops): Install NULL as
3028 supports_z_point_type callback.
3029 * nto-low.c (nto_supports_z_point_type): New.
3030 (nto_insert_point, nto_remove_point): Adjust to new interface.
3031 (nto_target_ops): Install nto_supports_z_point_type.
3032 * mem-break.c: Adjust intro comment.
3033 (struct raw_breakpoint) <raw_type, size>: New fields.
3034 <inserted>: Update comment.
3035 <shlib_disabled>: Delete field.
3036 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3037 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3038 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3039 (raw_bkpt_type_to_target_hw_bp_type): New function.
3040 (find_enabled_raw_code_breakpoint_at): New function.
3041 (find_raw_breakpoint_at): New type and size parameters. Use them.
3042 (insert_memory_breakpoint): New function, based off
3043 set_raw_breakpoint_at.
3044 (remove_memory_breakpoint): New function.
3045 (set_raw_breakpoint_at): Reimplement.
3046 (set_breakpoint): New, based on set_breakpoint_at.
3047 (set_breakpoint_at): Reimplement.
3048 (delete_raw_breakpoint): Go through the_target->remove_point
3049 instead of assuming memory breakpoints.
3050 (find_gdb_breakpoint_at): Delete.
3051 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3052 (find_gdb_breakpoint): New function.
3053 (set_gdb_breakpoint_at): Delete.
3054 (z_type_supported): New function.
3055 (set_gdb_breakpoint_1): New function, loosely based off
3056 set_gdb_breakpoint_at.
3057 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3058 (delete_gdb_breakpoint_at): Delete.
3059 (delete_gdb_breakpoint_1): New function, loosely based off
3060 delete_gdb_breakpoint_at.
3061 (delete_gdb_breakpoint): New function.
3062 (clear_gdb_breakpoint_conditions): Rename to ...
3063 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3064 breakpoint.
3065 (add_condition_to_breakpoint): Make static.
3066 (add_breakpoint_condition): Take a struct breakpoint pointer
3067 instead of an address. Adjust.
3068 (gdb_condition_true_at_breakpoint): Rename to ...
3069 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3070 z_type parameter.
3071 (gdb_condition_true_at_breakpoint): Reimplement.
3072 (add_breakpoint_commands): Take a struct breakpoint pointer
3073 instead of an address. Adjust.
3074 (gdb_no_commands_at_breakpoint): Rename to ...
3075 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3076 parameter. Return true if no breakpoint was found. Change debug
3077 output.
3078 (gdb_no_commands_at_breakpoint): Reimplement.
3079 (run_breakpoint_commands): Rename to ...
3080 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3081 and change return type to boolean.
3082 (run_breakpoint_commands): New function.
3083 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3084 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3085 breakpoint. Go through the_target->remove_point instead of
3086 assuming memory breakpoint.
3087 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3088 software and hardware breakpoints.
3089 (reinsert_raw_breakpoint): Go through the_target->insert_point
3090 instead of assuming memory breakpoint.
3091 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3092 software and hardware breakpoints.
3093 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3094 Check both software and hardware breakpoints.
3095 (validate_inserted_breakpoint): Assert the breakpoint is a
3096 software breakpoint. Set the inserted flag to -1 instead of
3097 setting shlib_disabled.
3098 (delete_disabled_breakpoints): Adjust.
3099 (validate_breakpoints): Only validate software breakpoints.
3100 Adjust to inserted flag change.
3101 (check_mem_read, check_mem_write): Skip breakpoint types other
3102 than software breakpoints. Adjust to inserted flag change.
3103 * mem-break.h (enum raw_bkpt_type): New enum.
3104 (raw_breakpoint, struct process_info): Forward declare.
3105 (Z_packet_to_target_hw_bp_type): Delete declaration.
3106 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3107 (set_gdb_breakpoint, delete_gdb_breakpoint)
3108 (clear_breakpoint_conditions): New declarations.
3109 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3110 (breakpoint_inserted_here): Update comment.
3111 (add_breakpoint_condition, add_breakpoint_commands): Replace
3112 address parameter with a breakpoint pointer parameter.
3113 (gdb_breakpoint_here): Update comment.
3114 (delete_gdb_breakpoint_at): Delete.
3115 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3116 * server.c (process_point_options): Take a struct breakpoint
3117 pointer instead of an address. Adjust.
3118 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3119 delete_gdb_breakpoint.
3120 * spu-low.c (spu_target_ops): Install NULL as
3121 supports_z_point_type method.
3122 * target.h: Include mem-break.h.
3123 (struct target_ops) <prepare_to_access_memory>: Update comment.
3124 <supports_z_point_type>: New field.
3125 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3126 instead of a char. Also take a raw breakpoint pointer.
3127 * win32-arm-low.c (the_low_target): Install NULL as
3128 supports_z_point_type.
3129 * win32-i386-low.c (i386_supports_z_point_type): New function.
3130 (i386_insert_point, i386_remove_point): Adjust to new interface.
3131 (the_low_target): Install i386_supports_z_point_type.
3132 * win32-low.c (win32_supports_z_point_type): New function.
3133 (win32_insert_point, win32_remove_point): Adjust to new interface.
3134 (win32_target_ops): Install win32_supports_z_point_type.
3135 * win32-low.h (struct win32_target_ops):
3136 <supports_z_point_type>: New method.
3137 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3138 instead of a char. Also take a raw breakpoint pointer.
3139
3140 2014-05-20 Pedro Alves <palves@redhat.com>
3141
3142 * mem-break.h: Include break-common.h.
3143 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3144 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3145 (Z_packet_to_target_hw_bp_type): New declaration.
3146 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3147 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3148 (Z_PACKET_ACCESS_WP): Delete macros.
3149 (Z_packet_to_hw_type): Delete function.
3150 * i386-low.h: Don't include break-common.h here.
3151 (Z_packet_to_hw_type): Delete declaration.
3152 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3153 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3154 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3155 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3156 * linux-aarch64-low.c: Don't include break-common.h here.
3157 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3158 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3159 (Z_packet_to_target_hw_bp_type): Delete function.
3160 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3161 function.
3162 (mips_insert_point, mips_remove_point): Use
3163 Z_packet_to_target_hw_bp_type.
3164
3165 2014-05-20 Pedro Alves <palves@redhat.com>
3166
3167 * linux-aarch64-low.c: Include break-common.h.
3168 (enum target_point_type): Delete.
3169 (Z_packet_to_point_type): Rename to ...
3170 (Z_packet_to_target_hw_bp_type): ... this, and return a
3171 target_hw_bp_type instead.
3172 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3173 instead of an enum target_point_type.
3174 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3175 breakpoint type.
3176 (aarch64_dr_state_insert_one_point)
3177 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3178 (aarch64_handle_aligned_watchpoint)
3179 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3180 Take an enum target_hw_bp_type instead of an enum
3181 target_point_type.
3182 (aarch64_supports_z_point_type): New function.
3183 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3184 use Z_packet_to_target_hw_bp_type.
3185
3186 2014-05-20 Joel Brobecker <brobecker@adacore.com>
3187
3188 * configure.ac: Only use -Werror by default when DEVELOPMENT
3189 is true.
3190 * configure: Regenerate.
3191
3192 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3193
3194 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3195 * linux-x86-low.c (X86_64_USER_REGS): New.
3196 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3197
3198 2014-04-28 Yao Qi <yao@codesourcery.com>
3199
3200 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3201 name.
3202
3203 2014-04-25 Pedro Alves <palves@redhat.com>
3204
3205 PR server/16255
3206 * linux-low.c (linux_attach_fail_reason_string): New function.
3207 (linux_attach_lwp): Delete.
3208 (linux_attach_lwp_1): Rename to ...
3209 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3210 argument. Remove "initial" parameter. Return int instead of
3211 void. Don't error or warn here.
3212 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3213 failure to attach to the tgid. Call warning when failing to
3214 attach to an lwp.
3215 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3216 argument. Remove "initial" parameter. Return int instead of
3217 void. Don't error or warn here.
3218 (linux_attach_fail_reason_string): New declaration.
3219 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3220 interface change. Use linux_attach_fail_reason_string.
3221
3222 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
3223 Walfred Tedeschi <walfred.tedeschi@intel.com>
3224
3225 * Makefile.in: Added rules to handle new files
3226 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3227 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3228 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3229 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3230 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3231 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3232 x32-avx512-linux.o.
3233 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3234 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3235 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3236 i386/x32-avx512.xml.
3237 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3238 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3239 i386/x32-avx512-linux.xml.
3240 * i387-fp.c (num_avx512_k_registers): New constant for number
3241 of K registers.
3242 (num_avx512_zmmh_low_registers): New constant for number of
3243 lower ZMM registers (0-15).
3244 (num_avx512_zmmh_high_registers): New constant for number of
3245 higher ZMM registers (16-31).
3246 (num_avx512_ymmh_registers): New contant for number of higher
3247 YMM registers (ymm16-31 added by avx521 on x86_64).
3248 (num_avx512_xmm_registers): New constant for number of higher
3249 XMM registers (xmm16-31 added by AVX512 on x86_64).
3250 (struct i387_xsave): Add space for AVX512 registers.
3251 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3252 Add code to handle AVX512 registers.
3253 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3254 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3255 prototypei from generated file.
3256 (tdesc_amd64_avx512_linux): Likewise.
3257 (init_registers_x32_avx512_linux): Likewise.
3258 (tdesc_x32_avx512_linux): Likewise.
3259 (init_registers_i386_avx512_linux): Likewise.
3260 (tdesc_i386_avx512_linux): Likewise.
3261 (x86_64_regmap): Add AVX512 registers.
3262 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3263 mask.
3264 (initialize_low_arch): Add code to initialize AVX512 registers.
3265
3266 2014-04-23 Pedro Alves <palves@redhat.com>
3267
3268 * mem-break.c (find_gdb_breakpoint_at): Make static.
3269 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3270
3271 2014-04-23 Pedro Alves <palves@redhat.com>
3272
3273 * i386-low.c: Don't include break-common.h here.
3274 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3275 prototype to take target_hw_bp_type as argument instead of a Z
3276 packet char.
3277 * i386-low.h: Include break-common.h here.
3278 (Z_packet_to_hw_type): Declare.
3279 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3280 prototypes.
3281 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3282 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3283 (x86_remove_point): Convert the packet number to a
3284 target_hw_bp_type before calling i386_low_remove_watchpoint.
3285 * win32-i386-low.c (i386_insert_point): Convert the packet number
3286 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3287 (i386_remove_point): Convert the packet number to a
3288 target_hw_bp_type before calling i386_low_remove_watchpoint.
3289
3290 2014-04-23 Pedro Alves <palves@redhat.com>
3291
3292 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3293
3294 2014-04-10 Pedro Alves <palves@redhat.com>
3295
3296 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3297 Check if the condition or command is NULL before checking if the
3298 breakpoint is known. On success, return true.
3299 * mem-break.h (add_breakpoint_condition): Document return.
3300 (add_breakpoint_commands): Add describing comment.
3301 * server.c (skip_to_semicolon): New function.
3302 (process_point_options): Use it.
3303
3304 2014-04-09 Pedro Alves <palves@redhat.com>
3305
3306 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3307 to lwpid_of.
3308
3309 2014-02-27 Pedro Alves <palves@redhat.com>
3310
3311 PR 12702
3312 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3313 macros.
3314 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3315 output.
3316 (last_thread_of_process_p): Take a PID argument instead of a
3317 thread pointer.
3318 (linux_wait_for_lwp): Delete.
3319 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3320 functions.
3321 (linux_low_filter_event): New function, party factored out from
3322 linux_wait_for_event.
3323 (linux_wait_for_event): Rename to ...
3324 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3325 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3326 sigsuspend. Check for zombie leaders.
3327 (linux_wait_for_event): Reimplement as wrapper around
3328 linux_wait_for_event_filtered.
3329 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3330 a normal or signal exit is seen, it's the whole process exiting.
3331 (wait_for_sigstop): No longer a for_each_inferior callback.
3332 Rewrite on top of linux_wait_for_event_filtered.
3333 (stop_all_lwps): Call wait_for_sigstop directly.
3334 * server.c (resume, handle_target_event): Handle
3335 TARGET_WAITKIND_NO_RESUMED.
3336
3337 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3338
3339 * win32-low.c (psapi_get_dll_name,
3340 * win32_CreateToolhelp32Snapshot): Delete.
3341 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3342 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3343 Delete.
3344 (handle_load_dll): Add function description.
3345 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3346
3347 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3348
3349 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3350 Add comment.
3351 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3352 base address when calling win32_add_one_solib.
3353 (handle_load_dll): Delete local variable load_addr.
3354 Remove 0x1000 offset applied to DLL base address when calling
3355 win32_add_one_solib.
3356 (handle_unload_dll): Add comment.
3357
3358 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3359
3360 * win32-low.c (win32_add_all_dlls): Renames
3361 win32_ensure_ntdll_loaded. Rewrite function documentation.
3362 Adjust implementation to always load all DLLs.
3363 Add 0x1000 offset to DLL base address when calling
3364 win32_add_one_solib.
3365 (child_initialization_done): New static global.
3366 (do_initial_child_stuff): Set child_initialization_done to
3367 zero during child initialization, and 1 after. Replace call
3368 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3369 Add comment.
3370 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3371 (handle_unload_dll): Add function documentation.
3372 (get_child_debug_event): Ignore load and unload DLL events
3373 during child initialization.
3374
3375 2014-02-20 Doug Evans <dje@google.com>
3376
3377 Remove global all_lwps.
3378 * inferiors.h (ptid_of): Move here from linux-low.h.
3379 (pid_of, lwpid_of): Ditto.
3380 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3381 parameter is a struct thread_info * now.
3382 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3383 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3384 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3385 directly.
3386 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3387 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3388 * linux-arm-low.c (update_registers_callback): Update, "entry"
3389 parameter is a struct thread_info * now.
3390 Fetch lwpid from current_inferior directly.
3391 (arm_insert_point): Pass &all_threads to find_inferior instead of
3392 &all_lwps.
3393 (arm_remove_point): Ditto.
3394 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3395 (arm_prepare_to_resume): Fetch pid from thread.
3396 (arm_read_description): Fetch lwpid from current_inferior directly.
3397 * linux-low.c (all_lwps): Delete.
3398 (delete_lwp): Delete call to remove_inferior.
3399 (handle_extended_wait): Fetch lwpid from thread.
3400 (add_lwp): Don't set lwp->entry.id. Remove call to
3401 add_inferior_to_list.
3402 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3403 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3404 (kill_one_lwp_callback): Ditto.
3405 (linux_kill): Don't dereference NULL pointer.
3406 Fetch ptid,lwpid from thread.
3407 (get_detach_signal): Fetch ptid from thread.
3408 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3409 Simplify call to regcache_invalidate_thread.
3410 (delete_lwp_callback): Update, "entry" parameter is a
3411 struct thread_info * now. Fetch pid from thread.
3412 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3413 (status_pending_p_callback): Update, "entry" parameter is a
3414 struct thread_info * now. Fetch ptid from thread.
3415 (find_lwp_pid): Update, "entry" parameter is a
3416 struct thread_info * now.
3417 (linux_wait_for_lwp): Fetch pid from thread.
3418 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3419 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3420 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3421 (dequeue_one_deferred_signal): Ditto.
3422 (cancel_breakpoint): Fetch ptid from current_inferior.
3423 (linux_wait_for_event): Pass &all_threads to find_inferior,
3424 not &all_lwps. Fetch ptid, lwpid from thread.
3425 (count_events_callback): Update, "entry" parameter is a
3426 struct thread_info * now.
3427 (select_singlestep_lwp_callback): Ditto.
3428 (select_event_lwp_callback): Ditto.
3429 (cancel_breakpoints_callback): Ditto.
3430 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3431 not &all_lwps.
3432 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3433 (unsuspend_one_lwp): Update, "entry" parameter is a
3434 struct thread_info * now.
3435 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3436 not &all_lwps.
3437 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3438 Fetch lwpid from thread, not lwp.
3439 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3440 Pass &all_threads to find_inferior, not &all_lwps.
3441 (send_sigstop): Fetch lwpid from thread, not lwp.
3442 (send_sigstop_callback): Update, "entry" parameter is a
3443 struct thread_info * now.
3444 (suspend_and_send_sigstop_callback): Ditto.
3445 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3446 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3447 struct thread_info * now.
3448 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3449 from thread, lwp.
3450 (lwp_running): Update, "entry" parameter is a
3451 struct thread_info * now.
3452 (stop_all_lwps): Fetch ptid from thread.
3453 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3454 (linux_resume_one_lwp): Fetch lwpid from thread.
3455 (linux_set_resume_request): Update, "entry" parameter is a
3456 struct thread_info * now. Fetch pid, lwpid from thread.
3457 (resume_status_pending_p): Update, "entry" parameter is a
3458 struct thread_info * now.
3459 (need_step_over_p): Ditto. Fetch lwpid from thread.
3460 (start_step_over): Fetch lwpid from thread.
3461 (linux_resume_one_thread): Update, "entry" parameter is a
3462 struct thread_info * now. Fetch lwpid from thread.
3463 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3464 (proceed_one_lwp): Update, "entry" parameter is a
3465 struct thread_info * now. Fetch lwpid from thread.
3466 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3467 struct thread_info * now.
3468 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3469 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3470 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3471 directly.
3472 (regsets_store_inferior_registers): Ditto.
3473 (fetch_register, store_register): Ditto.
3474 (linux_read_memory, linux_write_memory): Ditto.
3475 (linux_request_interrupt): Ditto.
3476 (linux_read_auxv): Ditto.
3477 (linux_xfer_siginfo): Ditto.
3478 (linux_qxfer_spu): Ditto.
3479 (linux_qxfer_libraries_svr4): Ditto.
3480 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3481 moved to inferiors.h.
3482 (get_lwp): Delete.
3483 (get_thread_lwp): Update.
3484 (struct lwp_info): Delete member "entry". Simplify comment for
3485 member "thread".
3486 (all_lwps): Delete.
3487 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3488 current_inferior directly.
3489 (update_watch_registers_callback): Update, "entry" parameter is a
3490 struct thread_info * now. Fetch pid from thread.
3491 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3492 (mips_insert_point): Fetch lwpid from current_inferior.
3493 Pass &all_threads to find_inferior, not &all_lwps.
3494 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3495 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3496 directly.
3497 (mips_stopped_data_address): Ditto.
3498 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3499 directly.
3500 * linux-tile-low.c (tile_arch_setup): Ditto.
3501 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3502 (update_debug_registers_callback): Update, "entry" parameter is a
3503 struct thread_info * now. Fetch pid from thread.
3504 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3505 Pass &all_threads to find_inferior, not &all_lwps.
3506 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3507 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3508 Pass &all_threads to find_inferior, not &all_lwps.
3509 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3510 (i386_dr_low_get_status): Ditto.
3511 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3512 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3513 (x86_linux_read_description): Ditto.
3514 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3515
3516 2014-02-20 Doug Evans <dje@google.com>
3517
3518 * inferiors.c (get_first_inferior): Fix buglet.
3519
3520 2014-02-19 Doug Evans <dje@google.com>
3521
3522 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3523 * inferiors.c (add_thread): Change result type to struct thread_info *.
3524 All callers updated.
3525 (add_lwp): Call add_thread here instead of in callers.
3526 All callers updated.
3527 * linux-low.h (get_lwp_thread): Rewrite.
3528 (struct lwp_info): New member "thread".
3529
3530 2014-02-19 Doug Evans <dje@google.com>
3531
3532 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3533 All callers updated.
3534
3535 2014-02-19 Doug Evans <dje@google.com>
3536
3537 * inferiors.c (add_thread): Fix whitespace.
3538
3539 2014-02-19 Doug Evans <dje@google.com>
3540
3541 * dll.c (clear_dlls): Replace accessing list implemention details
3542 with API function.
3543 * gdbthread.h (get_first_thread): Declare.
3544 * inferiors.c (for_each_inferior_with_data): New function.
3545 (get_first_thread): New function.
3546 (find_thread_ptid): Simplify.
3547 (get_first_inferior): New function.
3548 (clear_list): Delete.
3549 (one_inferior_p): New function.
3550 (clear_inferior_list): New function.
3551 (clear_inferiors): Update.
3552 * inferiors.h (for_each_inferior_with_data): Declare.
3553 (clear_inferior_list): Declare.
3554 (one_inferior_p): Declare.
3555 (get_first_inferior): Declare.
3556 * linux-low.c (linux_wait_for_event): Replace accessing list
3557 implemention details with API function.
3558 * server.c (target_running): Ditto.
3559 (accumulate_file_name_length): New function.
3560 (emit_dll_description): New function.
3561 (handle_qxfer_libraries): Replace accessing list implemention
3562 details with API function.
3563 (handle_qxfer_threads_worker): New function.
3564 (handle_qxfer_threads_proper): Replace accessing list implemention
3565 details with API function.
3566 (handle_query): Ditto.
3567 (visit_actioned_threads_callback_ftype): New typedef.
3568 (visit_actioned_threads_data): New struct.
3569 (visit_actioned_threads): Rewrite to be find_inferior callback.
3570 (resume): Call find_inferior.
3571 (handle_status): Replace accessing list implemention
3572 details with API function.
3573 (process_serial_event): Replace accessing list implemention details
3574 with API function.
3575 * target.c (set_desired_inferior): Replace accessing list implemention
3576 details with API function.
3577 * tracepoint.c (same_process_p): New function.
3578 (gdb_agent_about_to_close): Replace accessing list implemention
3579 details with API function.
3580 * win32-low.c (child_delete_thread): Replace accessing list
3581 implemention details with API function.
3582 (match_dll_by_basename): New function.
3583 (dll_is_loaded_by_basename): New function.
3584 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3585 details call to dll_is_loaded_by_basename.
3586
3587 2014-02-19 Doug Evans <dje@google.com>
3588
3589 * dll.h (struct dll_info): Add comment.
3590 * gdbthread.h (struct thread_info): Add comment.
3591 (current_ptid): Simplify.
3592 * inferiors.c (add_process): Update.
3593 (remove_process): Update.
3594 * inferiors.h (struct process_info): Rename member "head" to "entry".
3595 * linux-low.c (delete_lwp): Update.
3596 (add_lwp): Update.
3597 (last_thread_of_process_p): Update.
3598 (kill_one_lwp_callback, linux_kill): Update.
3599 (status_pending_p_callback): Update.
3600 (wait_for_sigstop): Update. Simplify read of ptid.
3601 (start_step_over): Update.
3602 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3603 (get_lwp_thread): Update.
3604 (struct lwp_info): Rename member "head" to "entry".
3605 * regcache.h (inferior_list_entry): Delete.
3606 * server.c (kill_inferior_callback): Update.
3607 (detach_or_kill_inferior_callback): Update.
3608 (print_started_pid): Update.
3609 (print_attached_pid): Update.
3610 (process_serial_event): Simplify read of ptid.
3611 * thread-db.c (thread_db_create_event): Update.
3612 (thread_db_get_tls_address): Update.
3613 * win32-low.c (current_inferior_ptid): Simplify.
3614
3615 2014-02-19 Tom Tromey <tromey@redhat.com>
3616
3617 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3618 argument.
3619 (target_supports_btrace): Update.
3620
3621 2014-02-14 Yao Qi <yao@codesourcery.com>
3622
3623 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3624 (rsp-low-ipa.o): New target.
3625
3626 2014-02-12 Tom Tromey <tromey@redhat.com>
3627
3628 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3629 convert_ascii_to_int.
3630 * regcache.c (registers_to_string): Likewise.
3631 * remote-utils.c (decode_M_packet): Likewise.
3632 * server.c (process_serial_event): Likewise.
3633
3634 2014-02-12 Tom Tromey <tromey@redhat.com>
3635
3636 * server.c (handle_query, handle_v_run): Use hex2bin, not
3637 unhexify.
3638 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3639
3640 2014-02-12 Tom Tromey <tromey@redhat.com>
3641
3642 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3643 convert_int_to_ascii.
3644 * regcache.c (registers_to_string, collect_register_as_string):
3645 Likewise.
3646 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3647 Likewise.
3648 * server.c (process_serial_event): Likewise.
3649 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3650 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3651
3652 2014-02-12 Tom Tromey <tromey@redhat.com>
3653
3654 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3655 bin2hex, not hexify.
3656 * tracepoint.c (cmd_qtstatus): Likewise.
3657
3658 2014-02-12 Tom Tromey <tromey@redhat.com>
3659
3660 * remote-utils.c (monitor_output): Pass explicit length to
3661 hexify.
3662
3663 2014-02-12 Tom Tromey <tromey@redhat.com>
3664
3665 * tracepoint.c: Include rsp-low.h.
3666 * server.c: Include rsp-low.h.
3667 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3668 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3669 declare.
3670 * remote-utils.c: Include rsp-low.h.
3671 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3672 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3673 (convert_int_to_ascii, convert_ascii_to_int): Move to
3674 common/rsp-low.c.
3675 * regcache.c: Include rsp-low.h.
3676 * ax.c: Include rsp-low.h.
3677 * Makefile.in (SFILES): Add common/rsp-low.c.
3678 (OBS): Add rsp-low.o.
3679 (rsp-low.o): New target.
3680
3681 2014-02-12 Tom Tromey <tromey@redhat.com>
3682
3683 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3684 Include print-utils.h.
3685 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3686 (plongest, thirty_two, phex_nz): Remove.
3687 * Makefile.in (SFILES): Add common/print-utils.c.
3688 (OBS): Add print-utils.o.
3689 (print-utils-ipa.o): New target.
3690 (print-utils.o): New target.
3691 (IPA_OBJS): Add print-utils-ipa.o.
3692
3693 2014-02-06 Tom Tromey <tromey@redhat.com>
3694
3695 * Makefile.in (SFILES): Fix indentation.
3696
3697 2014-02-05 Doug Evans <dje@google.com>
3698
3699 * linux-low.c (linux_wait_for_event): Improve comment.
3700 (linux_wait_1): Keep current_inferior in sync with event_child.
3701
3702 2014-01-22 Doug Evans <dje@google.com>
3703
3704 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3705
3706 2014-01-22 Doug Evans <dje@google.com>
3707
3708 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3709 * configure: Regenerate.
3710 * config.in: Regenerate.
3711 * Makefile.in (SFILES): Add debug.c.
3712 (OBS): Add debug.o.
3713 * debug.c: New file.
3714 * debug.h: New file.
3715 * linux-aarch64-low.c (*): Update all debugging printfs to use
3716 debug_printf instead of fprintf.
3717 * linux-arm-low.c (*): Ditto.
3718 * linux-cris-low.c (*): Ditto.
3719 * linux-crisv32-low.c (*): Ditto.
3720 * linux-m32r-low.c (*): Ditto.
3721 * linux-sparc-low.c (*): Ditto.
3722 * linux-x86.c (*): Ditto.
3723 * linux-low.c (*): Ditto.
3724 (linux_wait_1): Add calls to debug_enter, debug_exit.
3725 (linux_wait): Remove redundant debugging printf.
3726 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3727 (linux_resume, unstop_all_lwps): Ditto.
3728 * mem-break.c (*): Update all debugging printfs to use
3729 debug_printf instead of fprintf.
3730 * remote-utils.c (*): Ditto.
3731 * thread-db.c (*): Ditto.
3732 * server.c #include <ctype.h>, "gdb_vecs.h".
3733 (debug_threads): Moved to debug.c.
3734 (*): Update all debugging printfs to use debug_printf instead of
3735 fprintf.
3736 (start_inferior): Replace call to fflush with call to debug_flush.
3737 (monitor_show_help): Mention set debug-format.
3738 (parse_debug_format_options): New function.
3739 (handle_monitor_command): Handle "monitor set debug-format".
3740 (gdbserver_usage): Mention --debug-format.
3741 (main): Parse --debug-format.
3742 * server.h (debug_threads): Declaration moved to debug.h.
3743 #include "debug.h".
3744 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3745 trace_debug_1 that uses debug_printf.
3746 (tracepoint_look_up_symbols): Update all debugging printfs to use
3747 debug_printf instead of fprintf.
3748
3749 2014-01-20 Baruch Siach <baruch@tkos.co.il>
3750
3751 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3752 sys/ptrace.h.
3753
3754 2014-01-17 Pedro Alves <palves@redhat.com>
3755
3756 PR build/16445
3757 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3758 defined after including gdb_proc_service.h.
3759
3760 2014-01-16 Doug Evans <dje@google.com>
3761
3762 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3763 (match_dll): Use it.
3764
3765 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3766
3767 * target.h (target_ops) <read_btrace>: Change parameters and
3768 return type to allow error reporting.
3769 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3770 trace reading errors on.
3771 * linux-low.c (linux_low_read_btrace): Pass trace reading
3772 errors on.
3773 (linux_low_disable_btrace): New.
3774
3775 2014-01-15 Doug Evans <dje@google.com>
3776
3777 * inferiors.c (thread_id_to_gdb_id): Delete.
3778 * inferiors.h (thread_id_to_gdb_id): Delete.
3779
3780 2014-01-13 Eli Zaretskii <eliz@gnu.org>
3781
3782 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3783 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3784 versions.
3785
3786 2014-01-08 Pedro Alves <palves@redhat.com>
3787
3788 * server.c (handle_status): Don't discard previous queued stop
3789 replies or thread's pending status here.
3790 (main) <disconnection>: Do it here instead.
3791
3792 2014-01-08 Pedro Alves <palves@redhat.com>
3793
3794 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3795 * server.c (visit_actioned_threads, handle_pending_status): New
3796 function.
3797 (handle_v_cont): Factor out parts to ...
3798 (resume): ... this new function. If in all-stop, and a thread
3799 being resumed has a pending status, report it without actually
3800 resuming.
3801 (myresume): Adjust to use the new 'resume' function.
3802 (clear_pending_status_callback, set_pending_status_callback)
3803 (find_status_pending_thread_callback): New functions.
3804 (handle_status): Handle the case of multiple threads having
3805 interesting statuses to report. Report threads' real last signal
3806 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3807 with an interesting thread to report the status for, instead of
3808 always reporting the status of the first thread.
3809
3810 2014-01-01 Joel Brobecker <brobecker@adacore.com>
3811
3812 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3813 * gdbreplay.c (gdbreplay_version): Likewise.
3814
3815 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3816
3817 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3818 iov.iov_len with the real length in use.
3819
3820 2013-12-13 Joel Brobecker <brobecker@adacore.com>
3821
3822 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3823 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3824 for all targets that use win32-low.c.
3825 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3826 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3827
3828 2013-12-13 Pedro Alves <palves@redhat.com>
3829
3830 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3831 if equal to TARGET_WAITKIND_LOADED.
3832 * win32-low.c (cached_status): New static global.
3833 (win32_wait): Add declaration.
3834 (do_initial_child_stuff): Flush all initial pending debug events
3835 up to the initial breakpoint.
3836 (win32_wait): If CACHED_STATUS was set, return that instead
3837 of doing a real wait. Remove the code resuming the execution
3838 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3839 during the initial phase. Also remove the code changing
3840 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3841 TARGET_WAITKIND_STOPPED.
3842
3843 2013-12-11 Yao Qi <yao@codesourcery.com>
3844
3845 * notif.c (handle_notif_ack): Return 0 if no notification
3846 matches.
3847
3848 2013-11-20 Doug Evans <dje@google.com>
3849
3850 * linux-low.c (linux_set_resume_request): Fix comment.
3851
3852 2013-11-20 Doug Evans <dje@google.com>
3853
3854 * linux-low.c (resume_status_pending_p): Tweak comment.
3855
3856 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3857
3858 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3859 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3860 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3861 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3862 (srv_amd64_regobj): Add amd64-mpx.o.
3863 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3864 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3865 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3866 * i387-fp.c (num_pl_bnd_register) Added constant.
3867 (num_pl_bnd_cfg_registers) Added constant.
3868 (struct i387_xsave) Added reserved area and MPX fields.
3869 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3870 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3871 function.
3872 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3873 (init_registers_amd64_mpx_linux): Declare new function.
3874 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3875 (x86_64_regmap): Add MPX registers.
3876 (x86_linux_read_description): Add MPX case.
3877 (initialize_low_arch): Initialize MPX targets.
3878
3879 2013-11-18 Tom Tromey <tromey@redhat.com>
3880
3881 * configure: Rebuild.
3882 * configure.ac: Don't check for stdlib.h.
3883 * gdbreplay.c: Unconditionally include stdlib.h.
3884
3885 2013-11-18 Tom Tromey <tromey@redhat.com>
3886
3887 * config.in: Rebuild.
3888 * configure: Rebuild.
3889 * configure.ac: Don't use AC_HEADER_DIRENT.
3890
3891 2013-11-18 Tom Tromey <tromey@redhat.com>
3892
3893 * server.h: Don't check HAVE_STRING_H.
3894 * gdbreplay.c: Don't check HAVE_STRING_H.
3895 * configure: Rebuild.
3896
3897 2013-11-18 Tom Tromey <tromey@redhat.com>
3898
3899 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3900 LIBGNU.
3901
3902 2013-11-08 Tom Tromey <tromey@redhat.com>
3903
3904 * configure, config.in: Rebuild.
3905 * configure.ac: Remove unused configury.
3906
3907 2013-11-08 Tom Tromey <tromey@redhat.com>
3908
3909 * acinclude.m4: Include common.m4, codeset.m4.
3910 * configure, config.in: Rebuild.
3911 * configure.ac: Use GDB_AC_COMMON.
3912
3913 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3914
3915 * linux-s390-low.c (HWCAP_S390_TE): New define.
3916 (s390_arch_setup): Consider the TE field in the HWCAP for
3917 determining 'have_regset_tdb'.
3918
3919 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3920
3921 PR gdb/16014
3922 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3923 call to sizeof.
3924
3925 2013-10-02 Pedro Alves <palves@redhat.com>
3926
3927 * server.c (process_serial_event): Don't output "GDBserver
3928 exiting" if GDB is connected through stdio.
3929 * target.c (mywait): Likewise, be silent if GDB is connected
3930 through stdio.
3931
3932 2013-10-01 Joel Brobecker <brobecker@adacore.com>
3933
3934 * lynx-low.c (lynx_add_threads_after_attach): New function.
3935 (lynx_attach): Remove call to add_thread. Add call to
3936 lynx_add_threads_after_attach instead.
3937
3938 2013-09-28 Mike Frysinger <vapier@gentoo.org>
3939
3940 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3941 * config.in, configure: Regenerated.
3942
3943 2013-09-18 Yao Qi <yao@codesourcery.com>
3944
3945 PR server/15959
3946 * server.c (start_inferior): Clear 'resume_info'.
3947
3948 2013-09-16 Jiong Wang <jiwang@tilera.com>
3949
3950 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
3951 for each register.
3952
3953 2013-09-16 Jiong Wang <jiwang@tilera.com>
3954
3955 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
3956 linux-tile-low.o to srv_tgtobj.
3957
3958 2013-09-16 Will Newton <will.newton@linaro.org>
3959
3960 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
3961 out regs.
3962
3963 2013-09-06 Pedro Alves <palves@redhat.com>
3964
3965 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
3966 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
3967 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
3968 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
3969 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
3970 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
3971
3972 2013-09-06 Pedro Alves <palves@redhat.com>
3973
3974 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
3975 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
3976
3977 2013-09-06 Pedro Alves <palves@redhat.com>
3978
3979 * linux-amd64-ipa.c: Include tracepoint.h.
3980 * linux-i386-ipa.c: Include tracepoint.h.
3981
3982 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
3983
3984 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
3985 (ps_get_thread_area): New function.
3986
3987 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
3988
3989 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
3990 (initialize_low_arch): Call init_registers_crisv32 rather than
3991 init_register_crisv32.
3992
3993 2013-09-05 Pedro Alves <palves@redhat.com>
3994
3995 * server.h (handle_vFile, hostio_last_error_from_errno): Move
3996 to ...
3997 * hostio.h: ... this new file.
3998 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
3999 win32-low.c: Include hostio.h.
4000
4001 2013-09-05 Pedro Alves <palves@redhat.com>
4002
4003 * server.h (gdb_client_data, handler_func, callback_handler_func)
4004 (delete_file_handler, add_file_handler, append_callback_event)
4005 (delete_callback_event, start_event_loop, initialize_event_loop):
4006 Move to event-loop.h and include it.
4007 * event-loop.h: New file.
4008
4009 2013-09-05 Pedro Alves <palves@redhat.com>
4010
4011 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4012 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4013 (loaded_dll, unloaded_dll): Move to ...
4014 * dll.h: ... this new file.
4015 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4016
4017 2013-09-05 Pedro Alves <palves@redhat.com>
4018
4019 * server.h (current_process, get_thread_process, all_processes)
4020 (add_inferior_to_list, for_each_inferior, current_inferior)
4021 (remove_inferior, add_process, remove_process, find_process_pid)
4022 (have_started_inferiors_p, have_attached_inferiors_p)
4023 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4024 (clear_inferiors, find_inferior, find_inferior_id)
4025 (inferior_target_data, set_inferior_target_data)
4026 (inferior_regcache_data, set_inferior_regcache_data): Move to
4027 inferiors.h, and include it.
4028 * inferiors.h: New file.
4029
4030 2013-09-05 Pedro Alves <palves@redhat.com>
4031
4032 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4033 Move ...
4034 * ax.h: ... here.
4035
4036 2013-09-05 Pedro Alves <palves@redhat.com>
4037
4038 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4039 tracepoint.h.
4040 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4041 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4042 (handle_tracepoint_general_set, handle_tracepoint_query)
4043 (tracepoint_finished_step, tracepoint_was_hit)
4044 (release_while_stepping_state_list, current_traceframe)
4045 (in_readonly_region, traceframe_read_mem)
4046 (fetch_traceframe_registers, traceframe_read_sdata)
4047 (traceframe_read_info, struct fast_tpoint_collect_status)
4048 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4049 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4050 (supply_fast_tracepoint_registers)
4051 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4052 (ipa_tdesc, claim_trampoline_space)
4053 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4054 (agent_mem_read, agent_get_trace_state_variable_value)
4055 (agent_set_trace_state_variable_value, agent_tsv_read)
4056 (agent_mem_read_string, get_raw_reg_func_addr)
4057 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4058 * tracepoint.h: ... this new file.
4059
4060 2013-09-05 Pedro Alves <palves@redhat.com>
4061
4062 * server.h (perror_with_name, error, fatal, warning, paddress)
4063 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4064 include it.
4065 * utils.h: New file.
4066
4067 2013-09-05 Pedro Alves <palves@redhat.com>
4068
4069 * server.h (remote_debug, noack_mode, transport_is_reliable)
4070 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4071 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4072 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4073 (write_enn, initialize_async_io, enable_async_io)
4074 (disable_async_io, check_remote_input_interrupt_request)
4075 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4076 (dead_thread_notify, prepare_resume_reply)
4077 (decode_address_to_semicolon, decode_address, decode_m_packet)
4078 (decode_M_packet, decode_X_packet, decode_xfer_write)
4079 (decode_search_memory_packet, unhexify, hexify)
4080 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4081 (look_up_one_symbol, relocate_instruction)
4082 (monitor_output): Move to remote-utils.h, and include it.
4083 * remote-utils.h: New file.
4084
4085 2013-09-05 Pedro Alves <palves@redhat.com>
4086
4087 * server.h (_): Delete.
4088
4089 2013-09-02 Pedro Alves <palves@redhat.com>
4090
4091 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4092 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4093 allocated.
4094 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4095
4096 2013-09-02 Pierre Muller <muller@sourceware.org>
4097
4098 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4099 or WriteProcessMemory complete successfully and handle
4100 ERROR_PARTIAL_COPY error.
4101
4102 2013-09-02 Pedro Alves <palves@redhat.com>
4103
4104 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4105 error instead of EIO.
4106
4107 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4108
4109 PR server/15604
4110 * linux-low.c: Include filestuff.h.
4111 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4112 * lynx-low.c: Include filestuff.h.
4113 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4114 * server.c: Include filestuff.h.
4115 (main): Call notice_open_fds.
4116 * spu-low.c: Include filestuff.h.
4117 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4118
4119 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
4120
4121 * Makefile.in: Explain why ../target and ../nat are not
4122 listed as include file search paths.
4123 (linux-waitpid.o): New object file rule.
4124 * configure.srv (srv_native_linux_obj): New variable.
4125 Replace all occurrences of linux native object files with
4126 $srv_native_linux_obj.
4127 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4128 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4129 (linux_enable_event_reporting): Remove declaration.
4130 (my_waitpid): Moved to common/linux-waitpid.c.
4131 (linux_wait_for_event): Pass ptid when calling
4132 linux_enable_event_reporting.
4133 (linux_supports_tracefork_flag): Remove.
4134 (linux_enable_event_reporting): Likewise.
4135 (linux_tracefork_grandchild): Remove.
4136 (STACK_SIZE): Moved to common/linux-ptrace.c.
4137 (linux_tracefork_child): Remove.
4138 (linux_test_for_tracefork): Remove.
4139 (linux_look_up_symbols): Call linux_supports_traceclone.
4140 (initialize_low): Remove call to linux_test_for_tracefork.
4141 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4142 common/linux-ptrace.h.
4143 (PTRACE_TYPE_ARG4): Likewise.
4144 Include linux-ptrace.h.
4145
4146 2013-08-21 Pedro Alves <palves@redhat.com>
4147
4148 * config.in: Renegerate.
4149
4150 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
4151
4152 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4153 (SFILES): Remove $(srcdir)/common/target-common.c and
4154 add $(srcdir)/target/waitstatus.c.
4155 (OBS): Remove target-common.o and add waitstatus.o.
4156 (server_h): Remove $(srcdir)/../common/target-common.h and
4157 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4158 and $(srcdir)/../target/waitstatus.h.
4159 (target-common.o): Remove.
4160 (waitstatus.o): New target object file.
4161 * target.h: Do not include target-common.h and
4162 include target/resume.h, target/wait.h and
4163 target/waitstatus.h.
4164
4165 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
4166
4167 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4168 to PTRACE_TYPE_ARG3.
4169 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4170 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4171 PTRACE_TYPE_ARG4.
4172 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4173 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4174
4175 2013-07-27 Jie Zhang <jie@codesourcery.com>
4176 Daniel Jacobowitz <dan@codesourcery.com>
4177 Yao Qi <yao@codesourcery.com>
4178
4179 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4180 (mips-linux-watch.o): New rule.
4181 (mips_linux_watch_h): New variable.
4182 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4183 srv_tgtobj.
4184 * linux-mips-low.c: Include mips-linux-watch.h.
4185 (struct arch_process_info, struct arch_lwp_info): New.
4186 (update_watch_registers_callback): New function.
4187 (mips_linux_new_process, mips_linux_new_thread) New functions.
4188 (mips_linux_prepare_to_resume, mips_insert_point): New
4189 functions.
4190 (mips_remove_point, mips_stopped_by_watchpoint): New
4191 functions.
4192 (rsp_bp_type_to_target_hw_bp_type): New function.
4193 (mips_stopped_data_address): New function.
4194 (the_low_target): Add watchpoint support functions.
4195
4196 2013-07-27 Yao Qi <yao@codesourcery.com>
4197
4198 * i386-low.c: Include break-common.h.
4199 (enum target_hw_bp_type): Remove.
4200
4201 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
4202
4203 * Makefile.in (SFILES): /common/target-common.c.
4204 (OBS): Add target-common.o.
4205 (server_h): Add $(srcdir)/../common/target-common.h.
4206 (target-common.o): New target.
4207 * server.c (queue_stop_reply_callback): Free
4208 status string after use.
4209 * target.c (target_waitstatus_to_string): Remove.
4210 * target.h: Include target-common.h.
4211 (resume_kind): Likewise.
4212 (target_waitkind): Likewise.
4213 (target_waitstatus): Likewise.
4214 (TARGET_WNOHANG): Likewise.
4215
4216 2013-07-04 Yao Qi <yao@codesourcery.com>
4217
4218 * Makefile.in (host_alias): Use @host_noncanonical@.
4219 (target_alias): Use @target_noncanonical@.
4220 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4221 ACX_NONCANONICAL_HOST.
4222 * configure: Regenerated.
4223
4224 Revert:
4225 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4226
4227 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4228 * configure: Rebuild.
4229 * Makefile.in (version_host, version_target): Get from configure.
4230 (version.c): Use $(version_host) and $(version_target).
4231
4232 2013-07-03 Pedro Alves <palves@redhat.com>
4233
4234 * Makefile.in (config.status): Depend on development.sh.
4235 * acinclude.m4: Include libmcheck.m4.
4236 * configure: Regenerate.
4237
4238 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4239
4240 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4241 attribute inside the parentheses.
4242 (winapi_DebugSetProcessKillOnExit): Ditto.
4243 (winapi_DebugBreakProcess): Ditto.
4244 (winapi_GenerateConsoleCtrlEvent): Ditto.
4245
4246 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4247
4248 * notif.h (notif_event): Add a dummy member to avoid compiler
4249 errors.
4250
4251 2013-07-01 Pedro Alves <palves@redhat.com>
4252
4253 * hostio.c (HOSTIO_PATH_MAX): Define.
4254 (require_filename, handle_open, handle_unlink, handle_readlink):
4255 Use it.
4256
4257 2013-07-01 Pedro Alves <palves@redhat.com>
4258
4259 * server.h: Include "pathmax.h".
4260 * linux-low.c: Don't include sys/param.h.
4261 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4262 MAXPATHLEN.
4263 * win32-low.c: Don't include sys/param.h.
4264 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4265
4266 2013-07-01 Pedro Alves <palves@redhat.com>
4267
4268 * event-loop.c: Don't check HAVE_UNISTD_H before including
4269 <unistd.h>.
4270 * gdbreplay.c: Likewise.
4271 * remote-utils.c: Likewise.
4272 * server.c: Likewise.
4273 * configure.ac: Don't check for unistd.h.
4274 * configure: Regenerate.
4275
4276 2013-06-28 Tom Tromey <tromey@redhat.com>
4277
4278 * Makefile.in (version.c): Use version.in, not
4279 common/version.in.
4280
4281 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4282
4283 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4284 * configure: Rebuild.
4285 * Makefile.in (version_host, version_target): Get from configure.
4286 (version.c): Use $(version_host) and $(version_target).
4287
4288 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4289
4290 Fix trace-status to output user name without trailing colon.
4291 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4292
4293 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4294
4295 Fix trace-status to output proper start-time and stop-time.
4296 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4297 output start time and stop time in hex as gdb expects.
4298
4299 2013-06-26 Pedro Alves <pedro@codesourcery.com>
4300
4301 * tracepoint.c (build_traceframe_info_xml): Output trace state
4302 variables present in the trace buffer.
4303
4304 2013-06-24 Tom Tromey <tromey@redhat.com>
4305
4306 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4307 create-version.sh.
4308 (version.o): Remove.
4309 * gdbreplay.c: Include version.h.
4310 (version, host_name): Don't declare.
4311 * server.h: Include version.h.
4312 (version, host_name): Don't declare.
4313
4314 2013-06-12 Pedro Alves <palves@redhat.com>
4315
4316 * linux-x86-low.c (linux_is_elf64): Delete global.
4317 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4318 with local linux_pid_exe_is_elf_64_file use.
4319
4320 2013-06-11 Pedro Alves <palves@redhat.com>
4321
4322 * linux-low.c (regset_disabled, disable_regset): New functions.
4323 (regsets_fetch_inferior_registers)
4324 (regsets_store_inferior_registers): Use them.
4325 (initialize_regsets_info); Don't allocate the disabled_regsets
4326 array here.
4327 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4328 comment.
4329
4330 2013-06-11 Pedro Alves <palves@redhat.com>
4331
4332 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4333 xmalloc.
4334
4335 2013-06-11 Pedro Alves <palves@redhat.com>
4336
4337 * linux-x86-low.c (initialize_low_arch): Call
4338 init_registers_x32_avx_linux.
4339
4340 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4341
4342 Fix compatibility with Android Bionic.
4343 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4344 it is not empty.
4345
4346 2013-06-07 Pedro Alves <palves@redhat.com>
4347
4348 PR server/14823
4349 * Makefile.in (OBS): Add tdesc.o.
4350 (IPA_OBJS): Add tdesc-ipa.o.
4351 (tdesc-ipa.o): New rule.
4352 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4353 interface.
4354 * linux-low.c (new_inferior): Delete.
4355 (disabled_regsets, num_regsets): Delete.
4356 (linux_add_process): Adjust to set the new per-process
4357 new_inferior flag.
4358 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4359 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4360 was a stop. When calling arch_setup, switch the current inferior
4361 to the thread that got an event.
4362 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4363 (regsets_fetch_inferior_registers)
4364 (regsets_store_inferior_registers): New regsets_info parameter.
4365 Adjust to use it.
4366 (linux_register_in_regsets): New regs_info parameter. Adjust to
4367 use it.
4368 (register_addr, fetch_register, store_register): New usrregs_info
4369 parameter. Adjust to use it.
4370 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4371 parameter regs_info. Adjust to use it.
4372 (linux_fetch_registers): Get the current inferior's regs_info, and
4373 adjust to use it.
4374 (linux_store_registers): Ditto.
4375 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4376 (initialize_low): Don't initialize the target_regsets here. Call
4377 initialize_low_arch.
4378 * linux-low.h (target_regsets): Delete declaration.
4379 (struct regsets_info): New.
4380 (struct usrregs_info): New.
4381 (struct regs_info): New.
4382 (struct process_info_private) <new_inferior>: New field.
4383 (struct linux_target_ops): Delete the num_regs, regmap, and
4384 regset_bitmap fields. New field regs_info.
4385 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4386 * i387-fp.c (num_xmm_registers): Delete.
4387 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4388 calls to new interface.
4389 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4390 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4391 Infer the number of xmm registers from the regcache's target
4392 description.
4393 * i387-fp.h (num_xmm_registers): Delete.
4394 * inferiors.c (add_thread): Don't install the thread's regcache
4395 here.
4396 * proc-service.c (gregset_info): Fetch the current inferior's
4397 regs_info. Adjust to use it.
4398 * regcache.c: Include tdesc.h.
4399 (register_bytes, reg_defs, num_registers)
4400 (gdbserver_expedite_regs): Delete.
4401 (get_thread_regcache): If the thread doesn't have a regcache yet,
4402 create one, instead of aborting gdbserver.
4403 (regcache_invalidate_one): Rename to ...
4404 (regcache_invalidate_thread): ... this.
4405 (regcache_invalidate_one): New.
4406 (regcache_invalidate): Only invalidate registers of the current
4407 process.
4408 (init_register_cache): Add target_desc parameter, and use it.
4409 (new_register_cache): Ditto. Assert the target description has a
4410 non zero registers_size.
4411 (regcache_cpy): Add assertions. Adjust.
4412 (realloc_register_cache, set_register_cache): Delete.
4413 (registers_to_string, registers_from_string): Adjust.
4414 (find_register_by_name, find_regno, find_register_by_number)
4415 (register_cache_size): Add target_desc parameter, and use it.
4416 (free_register_cache_thread, free_register_cache_thread_one)
4417 (regcache_release, register_cache_size): New.
4418 (register_size): Add target_desc parameter, and use it.
4419 (register_data, supply_register, supply_register_zeroed)
4420 (supply_regblock, supply_register_by_name, collect_register)
4421 (collect_register_as_string, collect_register_by_name): Adjust.
4422 * regcache.h (struct target_desc): Forward declare.
4423 (struct regcache) <tdesc>: New field.
4424 (init_register_cache, new_register_cache): Add target_desc
4425 parameter.
4426 (regcache_invalidate_thread): Declare.
4427 (regcache_invalidate_one): Delete declaration.
4428 (regcache_release): Declare.
4429 (find_register_by_number, register_cache_size, register_size)
4430 (find_regno): Add target_desc parameter.
4431 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4432 declarations.
4433 * remote-utils.c: Include tdesc.h.
4434 (outreg, prepare_resume_reply): Adjust.
4435 * server.c: Include tdesc.h.
4436 (gdbserver_xmltarget): Delete declaration.
4437 (get_features_xml, process_serial_event): Adjust.
4438 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4439 declare.
4440 (struct process_info) <tdesc>: New field.
4441 (ipa_tdesc): Declare.
4442 * tdesc.c: New file.
4443 * tdesc.h: New file.
4444 * tracepoint.c: Include tdesc.h.
4445 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4446 (get_context_regcache): Adjust to pass ipa_tdesc down.
4447 (do_action_at_tracepoint): Adjust to get the register cache size
4448 from the context regcache's description.
4449 (traceframe_walk_blocks): Adjust to get the register cache size
4450 from the current trace frame's description.
4451 (traceframe_get_pc): Adjust to get current trace frame's
4452 description and pass it down.
4453 (gdb_collect): Adjust to get the register cache size from the
4454 IPA's description.
4455 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4456 (gdbserver_xmltarget): Delete.
4457 (initialize_low_tracepoint): Set the ipa's target description.
4458 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4459 (initialize_low_tracepoint): Set the ipa's target description.
4460 * linux-x86-low.c: Include tdesc.h.
4461 [__x86_64__] (is_64bit_tdesc): New.
4462 (ps_get_thread_area, x86_get_thread_area): Use it.
4463 (i386_cannot_store_register): Rename to ...
4464 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4465 (i386_cannot_fetch_register): Rename to ...
4466 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4467 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4468 to new interface.
4469 (target_regsets): Rename to ...
4470 (x86_regsets): ... this.
4471 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4472 interface.
4473 (x86_siginfo_fixup): Use is_64bit_tdesc.
4474 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4475 (tdesc_x32_avx_linux, tdesc_x32_linux)
4476 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4477 Declare.
4478 (x86_linux_update_xmltarget): Delete.
4479 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4480 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4481 (AMD64_LINUX_USER64_CS): New.
4482 (x86_linux_read_description): New, based on
4483 x86_linux_update_xmltarget.
4484 (same_process_callback): New.
4485 (x86_arch_setup_process_callback): New.
4486 (x86_linux_update_xmltarget): New.
4487 (x86_regsets_info): New.
4488 (amd64_linux_regs_info): New.
4489 (i386_linux_usrregs_info): New.
4490 (i386_linux_regs_info): New.
4491 (x86_linux_regs_info): New.
4492 (x86_arch_setup): Reimplement.
4493 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4494 (x86_emit_ops): Ditto.
4495 (the_low_target): Adjust. Install x86_linux_regs_info,
4496 x86_cannot_fetch_register, and x86_cannot_store_register.
4497 (initialize_low_arch): New.
4498 * linux-ia64-low.c (tdesc_ia64): Declare.
4499 (ia64_fetch_register): Adjust.
4500 (ia64_usrregs_info, regs_info): New globals.
4501 (ia64_regs_info): New function.
4502 (the_low_target): Adjust.
4503 (initialize_low_arch): New function.
4504 * linux-sparc-low.c (tdesc_sparc64): Declare.
4505 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4506 Adjust.
4507 (sparc_arch_setup): New function.
4508 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4509 (the_low_target): Adjust.
4510 (initialize_low_arch): New function.
4511 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4512 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4513 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4514 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4515 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4516 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4517 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4518 (tdesc_powerpc_isa205_vsx64l): Declare.
4519 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4520 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4521 (ppc_set_pc, ppc_get_hwcap): Adjust.
4522 (ppc_usrregs_info): Forward declare.
4523 (!__powerpc64__) ppc_regmap_adjusted: New global.
4524 (ppc_arch_setup): Adjust to the current process'es target
4525 description.
4526 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4527 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4528 (ppc_store_evrregset): Adjust.
4529 (target_regsets): Rename to ...
4530 (ppc_regsets): ... this, and make static.
4531 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4532 (ppc_regs_info): New function.
4533 (the_low_target): Adjust.
4534 (initialize_low_arch): New function.
4535 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4536 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4537 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4538 (tdesc_s390x_linux64v2): Declare.
4539 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4540 (s390_fill_gregset, s390_store_last_break): Adjust.
4541 (target_regsets): Rename to ...
4542 (s390_regsets): ... this, and make static.
4543 (s390_get_pc, s390_set_pc): Adjust.
4544 (s390_get_hwcap): New target_desc parameter, and use it.
4545 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4546 (s390_arch_setup): Adjust to set the current process'es target
4547 description. Don't adjust the regmap.
4548 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4549 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4550 (regs_info_3264): New globals.
4551 (s390_regs_info): New function.
4552 (the_low_target): Adjust.
4553 (initialize_low_arch): New function.
4554 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4555 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4556 [__mips64] (init_registers_mips_linux)
4557 (init_registers_mips_dsp_linux): Delete defines.
4558 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4559 (have_dsp): New global.
4560 (mips_read_description): New, based on mips_arch_setup.
4561 (mips_arch_setup): Reimplement.
4562 (get_usrregs_info): New function.
4563 (mips_cannot_fetch_register, mips_cannot_store_register)
4564 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4565 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4566 (target_regsets): Rename to ...
4567 (mips_regsets): ... this, and make static.
4568 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4569 (dsp_regs_info, regs_info): New globals.
4570 (mips_regs_info): New function.
4571 (the_low_target): Adjust.
4572 (initialize_low_arch): New function.
4573 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4574 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4575 Declare.
4576 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4577 (arm_read_description): New, with bits factored from
4578 arm_arch_setup.
4579 (arm_arch_setup): Reimplement.
4580 (target_regsets): Rename to ...
4581 (arm_regsets): ... this, and make static.
4582 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4583 (arm_regs_info): New function.
4584 (the_low_target): Adjust.
4585 (initialize_low_arch): New function.
4586 * linux-m68k-low.c (tdesc_m68k): Declare.
4587 (target_regsets): Rename to ...
4588 (m68k_regsets): ... this, and make static.
4589 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4590 (m68k_regs_info): New function.
4591 (m68k_arch_setup): New function.
4592 (the_low_target): Adjust.
4593 (initialize_low_arch): New function.
4594 * linux-sh-low.c (tdesc_sharch): Declare.
4595 (target_regsets): Rename to ...
4596 (sh_regsets): ... this, and make static.
4597 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4598 (sh_regs_info, sh_arch_setup): New functions.
4599 (the_low_target): Adjust.
4600 (initialize_low_arch): New function.
4601 * linux-bfin-low.c (tdesc_bfin): Declare.
4602 (bfin_arch_setup): New function.
4603 (bfin_usrregs_info, regs_info): New globals.
4604 (bfin_regs_info): New function.
4605 (the_low_target): Adjust.
4606 (initialize_low_arch): New function.
4607 * linux-cris-low.c (tdesc_cris): Declare.
4608 (cris_arch_setup): New function.
4609 (cris_usrregs_info, regs_info): New globals.
4610 (cris_regs_info): New function.
4611 (the_low_target): Adjust.
4612 (initialize_low_arch): New function.
4613 * linux-cris-low.c (tdesc_crisv32): Declare.
4614 (cris_arch_setup): New function.
4615 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4616 (cris_regs_info): New function.
4617 (the_low_target): Adjust.
4618 (initialize_low_arch): New function.
4619 * linux-m32r-low.c (tdesc_m32r): Declare.
4620 (m32r_arch_setup): New function.
4621 (m32r_usrregs_info, regs_info): New globals.
4622 (m32r_regs_info): Adjust.
4623 (initialize_low_arch): New function.
4624 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4625 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4626 (tic6x_usrregs_info): Forward declare.
4627 (tic6x_read_description): New function, based on ...
4628 (tic6x_arch_setup): ... this. Reimplement.
4629 (target_regsets): Rename to ...
4630 (tic6x_regsets): ... this, and make static.
4631 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4632 (tic6x_regs_info): New function.
4633 (the_low_target): Adjust.
4634 (initialize_low_arch): New function.
4635 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4636 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4637 (target_regsets): Rename to ...
4638 (xtensa_regsets): ... this, and make static.
4639 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4640 globals.
4641 (xtensa_arch_setup, xtensa_regs_info): New functions.
4642 (the_low_target): Adjust.
4643 (initialize_low_arch): New function.
4644 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4645 (nios2_arch_setup): Set the current process'es tdesc.
4646 (target_regsets): Rename to ...
4647 (nios2_regsets): ... this.
4648 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4649 (nios2_regs_info): New function.
4650 (the_low_target): Adjust.
4651 (initialize_low_arch): New function.
4652 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4653 (aarch64_arch_setup): Set the current process'es tdesc.
4654 (target_regsets): Rename to ...
4655 (aarch64_regsets): ... this.
4656 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4657 (aarch64_regs_info): New function.
4658 (the_low_target): Adjust.
4659 (initialize_low_arch): New function.
4660 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4661 globals.
4662 (target_regsets): Rename to ...
4663 (tile_regsets): ... this.
4664 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4665 (tile_regs_info): New function.
4666 (tile_arch_setup): Set the current process'es tdesc.
4667 (the_low_target): Adjust.
4668 (initialize_low_arch): New function.
4669 * spu-low.c (tdesc_spu): Declare.
4670 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4671 * win32-arm-low.c (tdesc_arm): Declare.
4672 (arm_arch_setup): New function.
4673 (the_low_target): Install arm_arch_setup instead of
4674 init_registers_arm.
4675 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4676 (init_windows_x86): Rename to ...
4677 (i386_arch_setup): ... this. Set `win32_tdesc'.
4678 (the_low_target): Adjust.
4679 * win32-low.c (win32_tdesc): New global.
4680 (child_add_thread): Don't create the thread cache here.
4681 (do_initial_child_stuff): Set the new process'es tdesc.
4682 * win32-low.h (struct target_desc): Forward declare.
4683 (win32_tdesc): Declare.
4684 * lynx-i386-low.c (tdesc_i386): Declare global.
4685 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4686 * lynx-low.c (lynx_tdesc): New global.
4687 (lynx_add_process): Set the new process'es tdesc.
4688 * lynx-low.h (struct target_desc): Forward declare.
4689 (lynx_tdesc): Declare global.
4690 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4691 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4692 * nto-low.c (nto_tdesc): New global.
4693 (do_attach): Set the new process'es tdesc.
4694 * nto-low.h (struct target_desc): Forward declare.
4695 (nto_tdesc): Declare.
4696 * nto-x86-low.c (tdesc_i386): Declare.
4697 (nto_x86_arch_setup): Set `nto_tdesc'.
4698
4699 2013-06-04 Gary Benson <gbenson@redhat.com>
4700
4701 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4702 to qSupported response when appropriate.
4703 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4704 with nonzero-length annex.
4705 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4706 arguments supplied in annex.
4707
4708 2013-05-31 Doug Evans <dje@google.com>
4709
4710 PR server/15594
4711 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4712 64 bits in 64-cross-32 environment.
4713
4714 2013-05-28 Pedro Alves <palves@redhat.com>
4715
4716 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4717 (aarch64-without-fpu.c): Delete rule.
4718 * configure.srv (aarch64*-*-linux*): Remove references to
4719 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4720 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4721 declaration.
4722
4723 2013-05-24 Pedro Alves <palves@redhat.com>
4724
4725 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4726 instead of strchr/decode_address. Error if the range isn't split
4727 with a ','. Don't assume there's be a ':' in the action.
4728
4729 2013-05-23 Yao Qi <yao@codesourcery.com>
4730 Pedro Alves <palves@redhat.com>
4731
4732 * linux-low.c (lwp_in_step_range): New function.
4733 (linux_wait_1): If the thread was range stepping and stopped
4734 outside the stepping range, report the stop to GDB. Otherwise,
4735 continue stepping. Add range stepping debug output.
4736 (linux_set_resume_request): Copy the step range from the resume
4737 request to the lwp.
4738 (linux_supports_range_stepping): New.
4739 (linux_target_ops) <supports_range_stepping>: Set to
4740 linux_supports_range_stepping.
4741 * linux-low.h (struct linux_target_ops)
4742 <supports_range_stepping>: New field.
4743 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4744 * linux-x86-low.c (x86_supports_range_stepping): New.
4745 (the_low_target) <supports_range_stepping>: Set to
4746 x86_supports_range_stepping.
4747 * server.c (handle_v_cont): Handle 'r' action.
4748 (handle_v_requests): Append ";r" if the target supports range
4749 stepping.
4750 * target.h (struct thread_resume) <step_range_start,
4751 step_range_end>: New fields.
4752 (struct target_ops) <supports_range_stepping>:
4753 New field.
4754 (target_supports_range_stepping): New macro.
4755
4756 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4757
4758 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4759 confusion in comment.
4760
4761 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4762
4763 * lynx-low.c (struct process_info_private): New type.
4764 (lynx_add_process): New function.
4765 (lynx_create_inferior, lynx_attach): Replace calls to
4766 add_process by calls to lynx_add_process.
4767 (lynx_resume): If PTID is null, then try using
4768 current_process()->private->last_wait_event_ptid.
4769 Add comments.
4770 (lynx_clear_inferiors): Delete. The contents of that function
4771 has been inlined in lynx_mourn;
4772 (lynx_wait_1): Save the ptid in the process's private data.
4773 (lynx_mourn): Free the process' private data. Replace call
4774 to lynx_clear_inferiors by call to clear_inferiors.
4775
4776 2013-05-17 Yao Qi <yao@codesourcery.com>
4777
4778 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4779 the right place.
4780
4781 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
4782
4783 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4784 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4785 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4786 PT_TEXT_END_ADDR guards. Update comments.
4787 (linux_target_op) <read_offsets>: Conditionally define to
4788 linux_read_offsets if the target is UCLIBC and if it defines
4789 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4790
4791 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4792 Andrew Jenner <andrew@codesourcery.com>
4793
4794 * Makefile.in (SFILES): Add linux-nios2-low.c.
4795 (clean): Add action to delete nios2-linux.c.
4796 (nios2-linux.c): New rule.
4797 * configure.srv: Add nios2*-*-linux*.
4798 * linux-nios2-low.c: New.
4799
4800 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4801
4802 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4803
4804 2013-04-25 Hui Zhu <hui@codesourcery.com>
4805
4806 PR gdb/15186
4807 * ax.c (ax_printf): Add fflush.
4808
4809 2013-04-22 Tom Tromey <tromey@redhat.com>
4810
4811 * Makefile.in (SFILES): Add filestuff.c.
4812 (OBS): Add filestuff.o.
4813 (filestuff.o): New target.
4814 * config.in, configure: Rebuild.
4815 * configure.ac: Check for fdwalk, pipe2.
4816
4817 2013-04-17 Pedro Alves <palves@redhat.com>
4818
4819 * configure.ac (USE_THREAD_DB): Delete variable.
4820 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4821 Don't AC_SUBST USE_THREAD_DB.
4822 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4823 * config.in, configure: Regenerate.
4824
4825 2013-04-16 Pedro Alves <palves@redhat.com>
4826
4827 * linux-low.h (struct lwp_info) <thread_known>: Move under
4828 the USE_THREAD_DB #ifdef.
4829
4830 2013-04-16 Pedro Alves <palves@redhat.com>
4831
4832 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4833 (linux-low.o): Delete rule.
4834 * linux-low.h: Always include "gdb_thread_db.h" instead of
4835 conditionally including thread_db.h.
4836 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4837 HAVE_THREAD_DB_H.
4838
4839 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4840
4841 * Makefile.in (install-only): Fix make install regression.
4842
4843 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4844
4845 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4846 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4847 installation.
4848 * gdbserver.1: Remove.
4849
4850 2013-03-22 Pedro Alves <palves@redhat.com>
4851
4852 * linux-low.c (handle_extended_wait): Don't call
4853 linux_enable_event_reporting.
4854
4855 2013-03-15 Tony Theodore <tonyt@logyst.com>
4856
4857 PR build/9098:
4858 * Makefile.in (SHELL): Use @SHELL@.
4859
4860 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4861
4862 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4863 compiler warning.
4864
4865 2013-03-13 Joel Brobecker <brobecker@adacore.com>
4866
4867 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4868 Remove extraneous NULL element.
4869
4870 2013-03-13 Yao Qi <yao@codesourcery.com>
4871
4872 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4873 'V' block in trace frame.
4874
4875 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4876
4877 * target.h (struct target_ops): Add btrace ops.
4878 (target_supports_btrace): New macro.
4879 (target_enable_btrace): New macro.
4880 (target_disable_btrace): New macro.
4881 (target_read_btrace): New macro.
4882 * gdbthread.h (struct thread_info): Add btrace field.
4883 * server.c: Include btrace-common.h.
4884 (handle_btrace_general_set): New function.
4885 (handle_btrace_enable): New function.
4886 (handle_btrace_disable): New function.
4887 (handle_general_set): Call handle_btrace_general_set.
4888 (handle_qxfer_btrace): New function.
4889 (struct qxfer qxfer_packets[]): Add btrace entry.
4890 * inferiors.c (remove_thread): Disable btrace.
4891 * linux-low: Include linux-btrace.h.
4892 (linux_low_enable_btrace): New function.
4893 (linux_low_read_btrace): New function.
4894 (linux_target_ops): Add btrace ops.
4895 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4896 Add srv_linux_btrace=yes.
4897 (x86_64-*-linux*): Add linux-btrace.o.
4898 Add srv_linux_btrace=yes.
4899 * configure.ac: Define HAVE_LINUX_BTRACE.
4900 * config.in: Regenerated.
4901 * configure: Regenerated.
4902
4903 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4904
4905 * server.c (handle_qxfer): Preserve error message if -3 is
4906 returned.
4907 (qxfer): Document the -3 return value.
4908
4909 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4910
4911 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4912 (linux_btrace_h): New variable.
4913 (linux-btrace.o): New rule.
4914
4915 2013-03-08 Stan Shebs <stan@codesourcery.com>
4916 Hafiz Abid Qadeer <abidh@codesourcery.com>
4917
4918 * tracepoint.c (trace_buffer_size): New global.
4919 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4920 (init_trace_buffer): Change to one-argument function. Allocate
4921 trace buffer memory.
4922 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4923 handle QTBuffer:size packet.
4924 (cmd_bigqtbuffer_size): New function.
4925 (initialize_tracepoint): Call init_trace_buffer with
4926 DEFAULT_TRACE_BUFFER_SIZE.
4927 * server.c (handle_query): Add QTBuffer:size in the
4928 supported packets.
4929
4930 2013-03-07 Yao Qi <yao@codesourcery.com>
4931
4932 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4933 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4934 of -1.
4935 (cmd_qtsp): Adjust condition. Do post increment.
4936 Set cur_action and cur_step_action back to 0.
4937
4938 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
4939
4940 PR server/15236
4941 * linux-low.c (linux_write_memory): Return early success if LEN is
4942 zero.
4943
4944 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
4945
4946 * configure.srv: Add x86_64-*-cygwin* as target.
4947
4948 2013-02-28 Tom Tromey <tromey@redhat.com>
4949
4950 * configure.ac: Invoke AC_SYS_LARGEFILE.
4951 * configure, config.in: Rebuild.
4952
4953 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
4954
4955 * win32-low.c: Throughout, fix format strings and casts of
4956 printf-like functions to avoid type related warnings on all
4957 platforms.
4958 (get_child_debug_event): Print dwDebugEventCode as hex since
4959 that's how it's usually documented.
4960
4961 2013-02-28 Yao Qi <yao@codesourcery.com>
4962
4963 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
4964 pulongest.
4965
4966 2013-02-27 Jiong Wang <jiwang@tilera.com>
4967
4968 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
4969 (reg-tilegx32.c): New rule.
4970 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
4971 * linux-tile-low.c (tile_arch_setup): New function. Invoke
4972 different register info initializer according to elf class.
4973 (init_registers_tilgx32): New function. The tilegx32 register info
4974 initializer.
4975 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
4976 (tile_store_gregset): Likewise.
4977
4978 2013-02-27 Yao Qi <yao@codesourcery.com>
4979
4980 * server.c (process_point_options): Print debug message when
4981 debug_threads is true.
4982
4983 2013-02-26 Yao Qi <yao@codesourcery.com>
4984
4985 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
4986
4987 2013-02-19 Pedro Alves <palves@redhat.com>
4988 Kai Tietz <ktietz@redhat.com>
4989
4990 PR gdb/15161
4991
4992 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
4993 instead of strtoul to extract address from packet.
4994 (process_serial_event) <'z'>: Likewise.
4995
4996 2013-02-18 Yao Qi <yao@codesourcery.com>
4997
4998 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
4999
5000 2013-02-14 Pedro Alves <palves@redhat.com>
5001
5002 Plug memory leak.
5003
5004 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5005 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5006
5007 2013-02-14 Pedro Alves <palves@redhat.com>
5008
5009 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5010
5011 2013-02-14 Pedro Alves <palves@redhat.com>
5012
5013 * tracepoint.c (save_string): Delete.
5014 (add_tracepoint_action): Use savestring instead of save_string.
5015
5016 2013-02-12 Pedro Alves <palves@redhat.com>
5017
5018 * linux-xtensa-low.c: Ditto.
5019 * xtensa-xtregs.c: Ditto.
5020
5021 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5022
5023 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5024 thread_db.
5025
5026 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5027
5028 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5029 aarch64_num_wp_regs and aarch64_num_bp_regs to
5030 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5031
5032 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5033
5034 * linux-aarch64-low.c (ps_get_thread_area): Replace
5035 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5036
5037 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5038 Marcus Shawcroft <marcus.shawcroft@arm.com>
5039 Nigel Stephens <nigel.stephens@arm.com>
5040 Yufeng Zhang <yufeng.zhang@arm.com>
5041
5042 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5043 (aarch64.c, aarch64-without-fpu.c): New targets.
5044 * configure.srv (aarch64*-*-linux*): New.
5045 * linux-aarch64-low.c: New file.
5046
5047 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5048
5049 * linux-low.c (handle_extended_wait, linux_create_inferior)
5050 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5051 (dequeue_one_deferred_signal, linux_resume_one_thread)
5052 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5053 (linux_tracefork_grandchild, linux_test_for_tracefork)
5054 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5055 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5056 where the argument is 0.
5057
5058 2013-01-25 Yao Qi <yao@codesourcery.com>
5059
5060 * event-loop.c: Include "queue.h".
5061 (gdb_event_p): New typedef.
5062 (struct gdb_event) <next_event>: Remove.
5063 (event_queue): Change to QUEUE(gdb_event_p).
5064 (async_queue_event): Remove.
5065 (gdb_event_xfree): New.
5066 (initialize_event_loop): New.
5067 (process_event): Use API from QUEUE.
5068 (wait_for_event): Likewise.
5069 * server.c (main): Call initialize_event_loop.
5070 * server.h (initialize_event_loop): Declare.
5071
5072 2013-01-18 Yao Qi <yao@codesourcery.com>
5073
5074 * ax.h (struct eval_agent_expr_context): New.
5075 (gdb_eval_agent_expr): Update declaration.
5076 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5077 TFRAME. Add new argument CTX.
5078 * server.h (struct eval_agent_expr_context): Declare.
5079 (agent_mem_read, agent_tsv_read): Update declaration.
5080 (agent_mem_read_string): Likewise.
5081 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5082 (add_traceframe_block): Add new argument TPOINT.
5083 Increase TPOINT->traceframe_usage.
5084 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5085 eval_tracepoint_agent_expr.
5086 (condition_true_at_tracepoint): Likewise.
5087 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5088 (agent_mem_read_string, agent_tsv_read): Likewise.
5089
5090 2013-01-16 Yao Qi <yao@codesourcery.com>
5091
5092 * linux-low.c (linux_resume_one_lwp): Don't check
5093 'lwp->bp_reinsert != 0'.
5094
5095 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5096 Pedro Alves <palves@redhat.com>
5097
5098 * lynx-low.c (ptrace_request_to_str): Define a temporary
5099 macro and use it to simplify this function's implementation.
5100
5101 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5102
5103 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5104 sets errno.
5105
5106 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5107
5108 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5109
5110 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5111
5112 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5113
5114 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5115
5116 * lynx-low.c (lynx_resume): Use the resume_info parameter
5117 to determine the ptid for the lynx_ptrace call, unless
5118 it is equal to minus_one_ptid, in which case we use the
5119 ptid of the current_inferior.
5120 (lynx_wait_1): After having received a thread create/exit
5121 event, resume the inferior's execution using the signaling
5122 thread's ptid, rather than the old ptid.
5123
5124 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5125
5126 * lynx-low.c (lynx_resume): Delete variable ret.
5127
5128 2013-01-01 Joel Brobecker <brobecker@adacore.com>
5129
5130 * gdbreplay.c (gdbreplay_version): Update copyright year.
5131 * server.c (gdbserver_version): Likewise.
5132
5133 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5134
5135 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5136 new thread.
5137
5138 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5139
5140 * lynx-low.c (ptrace_request_to_str): Add handling for
5141 PTRACE_GETTRACESIG.
5142
5143 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5144
5145 * lynx-low.c (lynx_attach): Delete variable new_process.
5146
5147 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5148
5149 * lynx-low.c (lynx_create_inferior): Delete variable
5150 new_process.
5151
5152 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5153
5154 * lynx-low.c (ptrace_request_to_str): Do not handle
5155 PTRACE_GETTHREADLIST if this macro does not exist.
5156
5157 2012-12-15 Yao Qi <yao@codesourcery.com>
5158
5159 * Makefile.in (OBS): Add notif.o.
5160 * notif.c, notif.h: New.
5161 * server.c: Include "notif.h".
5162 (struct vstop_notif) <next>: Remove.
5163 <base>: New field.
5164 (queue_stop_reply): Update.
5165 (push_event, send_next_stop_reply): Remove.
5166 (discard_queued_stop_replies): Update.
5167 (notif_stop): New variable.
5168 (handle_v_stopped): Remove.
5169 (handle_v_requests): Don't call handle_v_stopped. Call
5170 handle_ack_notif instead.
5171 (queue_stop_reply_callback): Call notif_event_enque instead
5172 of queue_stop_reply.
5173 (handle_status): Don't call send_next_stop_reply, call
5174 notif_write_event instead.
5175 (kill_inferior_callback): Likewise.
5176 (detach_or_kill_inferior_callback): Likewise.
5177 (main): Call initialize_notif.
5178 (process_serial_event): Call QUEUE_is_empty.
5179 (handle_target_event): Call notif_push instead of push event.
5180 * server.h (push_event): Remove declaration.
5181
5182 2012-12-10 Tom Tromey <tromey@redhat.com>
5183
5184 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5185 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5186 macros.
5187 (.c.o): Rewrite.
5188 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5189 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5190 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5191 (amd64-linux-ipa.o, ax.o): Rewrite.
5192 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5193 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5194 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5195 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5196 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5197 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5198 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5199 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5200 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5201 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5202 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5203 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5204 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5205 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5206 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5207 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5208 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5209 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5210 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5211 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5212 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5213 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5214 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5215 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5216 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5217 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5218 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5219 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5220 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5221 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5222 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5223 (reg-tilegx.o): Remove.
5224 (all_object_files): New macro.
5225 Include .deps files.
5226 * aclocal.m4, configure: Rebuild.
5227 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5228 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5229 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5230
5231 2012-12-05 Tom Tromey <tromey@redhat.com>
5232
5233 PR gdb/14917:
5234 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5235
5236 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
5237
5238 * configure.ac: Check for linux/perf_event.h.
5239 * config.in: Regenerated.
5240 * configure: Regenerated.
5241
5242 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5243
5244 * hostio.c (handle_readlink): Decrease buffer size
5245 parameter passed to readlink by one byte.
5246
5247 2012-11-26 Yao Qi <yao@codesourcery.com>
5248
5249 * configure.ac (build_warnings): Append '-Wempty-body'.
5250 * configure: Regenerated.
5251 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5252 body.
5253
5254 2012-11-15 Pierre Muller <muller@sourceware.org>
5255
5256 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5257 * config.in: Regenerate.
5258 * configure: Regenerate.
5259 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5260 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5261 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5262 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5263 header.
5264 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5265 instead of <sys/wait.h> header.
5266 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5267
5268 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
5269
5270 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5271 (various make rules): Remove -DGDBSERVER
5272
5273 2012-11-09 Yao Qi <yao@codesourcery.com>
5274
5275 * spu-low.c (current_ptid): Move it to ..
5276 * gdbthread.h: ... here. New.
5277 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5278 * server.c (myresume, process_serial_event): Likewise.
5279 * thread-db.c (thread_db_find_new_threads): Likewise.
5280 * tracepoint.c (run_inferior_command): Likewise.
5281
5282 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
5283
5284 * server.c (handle_search_memory_1): Include access length in
5285 warning message.
5286
5287 2012-09-05 Michael Brandt <michael.brandt@axis.com>
5288
5289 * linux-crisv32-low.c: Fix compile errors.
5290
5291 2012-09-04 Yao Qi <yao@codesourcery.com>
5292
5293 * tracepoint.c (cmd_qtsv): Adjust debug message.
5294 Don't check CUR_TPOINT.
5295
5296 2012-08-28 Yao Qi <yao@codesourcery.com>
5297
5298 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5299 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5300 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5301 Remove declarations of xmalloc, xreallloc, xstrdup and
5302 freeargv.
5303 * Makefile.in (libiberty_h): New.
5304 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5305 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5306
5307 2012-08-23 Yao Qi <yao@codesourcery.com>
5308
5309 * server.h: Remove declaration of 'xsnprintf'.
5310
5311 2012-08-22 Keith Seitz <keiths@redhat.com>
5312
5313 * server.h: Include build-gnulib-gbserver/config.h.
5314 * gdbreplay.c: Likewise.
5315
5316 2012-08-08 Doug Evans <dje@google.com>
5317
5318 * Makefile.in (SFILES): Add gdb_vecs.c.
5319 (OBS): Add gdb_vecs.o.
5320 (gdb_vecs_h, host_defs_h): New variables.
5321 (thread-db.o): Add $(gdb_vecs_h) dependency.
5322 (gdb_vecs.o): New rule.
5323 * thread-db.c: #include "gdb_vecs.h".
5324 (thread_db_load_search): Use a vector to iterate over path elements.
5325 Handle text appearing after "$pdir".
5326
5327 * configure.ac: Add check for strstr.
5328 * config.in: Regenerate.
5329 * configure: Regenerate.
5330
5331 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5332
5333 * hostio.c (handle_pread): If pread fails, fall back to attempting
5334 lseek/read.
5335 (handle_pwrite): Likewise for pwrite.
5336
5337 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5338
5339 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5340 between unsupported TYPE and unimplementable ADDR/LEN combination.
5341 (arm_insert_point): Act on new return value.
5342
5343 2012-07-31 Pedro Alves <palves@redhat.com>
5344
5345 * server.c (process_point_options): Only skip tokens if we find
5346 one that is unrecognized. Don't treat 'X' specially while
5347 skipping unrecognized tokens.
5348
5349 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5350
5351 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5352 to 4-byte-align HW breakpoint addresses for Thumb.
5353
5354 2012-07-27 Yao Qi <yao@codesourcery.com>
5355
5356 PR remote/14161.
5357
5358 * server.h: Declare gdb_agent_about_to_close.
5359 * target.c (kill_inferior): Include "agent.h".
5360 New. Send command 'kill'.
5361 * target.h (kill_inferior): Removed macro.
5362 * tracepoint.c (gdb_agent_about_to_close): New.
5363 (gdb_agent_helper_thread): Handle command 'close'.
5364 Wait endlessly until the inferior stops.
5365 Install gdb_agent_remove_socket to atexit hook.
5366 (agent_socket_name): New static variable.
5367 (gdb_agent_socket_init): Replace local variable 'name' with
5368 'agent_socket_name'.
5369 (gdb_agent_remove_socket): New.
5370
5371 2012-07-27 Yao Qi <yao@codesourcery.com>
5372
5373 * server.c (process_point_options): Stop at 'X' when parsing.
5374
5375 2012-07-19 Michael Eager <eager@eagercon.com>
5376
5377 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
5378 to hw_execute.
5379 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5380 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5381 hardware breakpoint.
5382
5383 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5384
5385 * gdbserver/linux-low.c (initialize_low): Call
5386 linux_ptrace_init_warnings.
5387
5388 2012-07-02 Doug Evans <dje@google.com>
5389
5390 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5391 pointer to int.
5392
5393 2012-07-02 Stan Shebs <stan@codesourcery.com>
5394
5395 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5396 (ax.o): Add it to build rule.
5397 (ax-ipa.o): Ditto.
5398 (OBS): Add format.o.
5399 (IPA_OBS): Add format.o.
5400 * server.c (handle_query): Claim support for breakpoint commands.
5401 (process_point_options): Add command case.
5402 (process_serial_event): Leave running if there are printfs in
5403 effect.
5404 * mem-break.h (any_persistent_commands): Declare.
5405 (add_breakpoint_commands): Declare.
5406 (gdb_no_commands_at_breakpoint): Declare.
5407 (run_breakpoint_commands): Declare.
5408 * mem-break.c (struct point_command_list): New struct.
5409 (struct breakpoint): New field command_list.
5410 (any_persistent_commands): New function.
5411 (add_commands_to_breakpoint): New function.
5412 (add_breakpoint_commands): New function.
5413 (gdb_no_commands_at_breakpoint): New function.
5414 (run_breakpoint_commands): New function.
5415 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5416 locally.
5417 * ax.c: Include format.h.
5418 (ax_printf): New function.
5419 (gdb_eval_agent_expr): Add printf opcode.
5420
5421 2012-06-13 Yao Qi <yao@codesourcery.com>
5422
5423 * server.c (start_inferior): Remove duplicated writes to fields
5424 'last_resume_kind' and 'last_status' of 'current_inferior'.
5425
5426 2012-06-12 Yao Qi <yao@codesourcery.com>
5427 Pedro Alves <palves@redhat.com>
5428
5429 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5430 comment.
5431 * server.c (handle_v_cont): Extend comment.
5432
5433 2012-06-11 Yao Qi <yao@codesourcery.com>
5434
5435 * linux-low.c (linux_attach): Add 'static'.
5436
5437 2012-06-06 Yao Qi <yao@codesourcery.com>
5438
5439 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5440
5441 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5442
5443 Fix gcc -flto compilation warning.
5444 * server.c (main): Make variable multi_mode and attach volatile.
5445
5446 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5447
5448 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5449 if the platform doesn't know about it.
5450
5451 2012-05-30 Jeff Kenton <jkenton@tilera.com>
5452
5453 * Makefile.in (SFILES): Add linux-tile-low.c.
5454 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5455 * configure.srv: Handle tilegx-*-linux*.
5456 * linux-tile-low.c: New file.
5457
5458 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5459
5460 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5461
5462 2012-05-24 Pedro Alves <palves@redhat.com>
5463
5464 PR gdb/7205
5465
5466 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
5467
5468 2012-05-24 Pedro Alves <palves@redhat.com>
5469
5470 PR gdb/7205
5471
5472 Replace target_signal with gdb_signal throughout.
5473
5474 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5475
5476 * linux-low.c (linux_store_registers): Avoid the copying sequence
5477 when no data has been retrieved by ptrace.
5478
5479 2012-05-22 Will Deacon <will.deacon@arm.com>
5480
5481 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5482 Include asm/ptrace.h.
5483 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5484 already defined.
5485
5486 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5487
5488 * linux-low.c (linux_store_registers): Don't re-retrieve data
5489 with ptrace that has already been obtained from /proc. Always
5490 copy any data retrieved with ptrace to the buffer supplied.
5491
5492 2012-05-11 Yao Qi <yao@codesourcery.com>
5493 Pedro Alves <palves@redhat.com>
5494
5495 * linux-low.c (enum stopping_threads_kind): New.
5496 (stopping_threads): Change type to `enum stopping_threads_kind'.
5497 (handle_extended_wait): If stopping and suspending threads, leave
5498 the new_lwp suspended too.
5499 (linux_wait_for_event): Adjust.
5500 (stop_all_lwps): Set `stopping_threads' to
5501 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5502 whether we're suspending threads or just stopping them. Assert no
5503 recursion happens.
5504
5505 2012-04-29 Yao Qi <yao@codesourcery.com>
5506
5507 * server.h: Move some code to ...
5508 * gdbthread.h: ... here. New.
5509 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5510 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5511 (nto-low.o, win32-low.o): Likewise.
5512 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5513 * regcache.c, remote-utils.c, server.c: Likewise.
5514 * target.c, tracepoint.c, win32-low.c: Likewise.
5515
5516 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5517
5518 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5519 (PTRACE_ARG4_TYPE): Likewise.
5520 (PTRACE_XFER_TYPE): Likewise.
5521 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5522 ptrace to PTRACE_ARG3_TYPE.
5523 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5524 (PTRACE_ARG4_TYPE): Likewise.
5525 (PTRACE_XFER_TYPE): Likewise.
5526 (linux_detach_one_lwp): Cast fourth argument of
5527 ptrace to long then PTRACE_ARG4_TYPE.
5528 (regsets_fetch_inferior_registers): Cast third argument of
5529 ptrace to long then PTRACE_ARG3_TYPE.
5530 (regsets_store_inferior_registers): Likewise.
5531
5532 2012-04-20 Pedro Alves <palves@redhat.com>
5533
5534 * configure: Regenerate.
5535
5536 2012-04-19 Pedro Alves <palves@redhat.com>
5537
5538 * Makefile.in (GNULIB_BUILDDIR): New.
5539 (LIBGNU, INCGNU, GNULIB_H): Adjust.
5540 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5541 (all, install-only, uninstall, clean-info, all-lib, clean): No
5542 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5543 (maintainer-clean realclean distclean): Use subdir_do.
5544 (subdir_do): New.
5545 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
5546 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
5547 * acinclude.m4: Include acx_configure_dir.m4.
5548 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5549 calls. Call AC_PROG_RANLIB. Configure gnulib using
5550 ACX_CONFIGURE_DIR.
5551 (GNULIB): New.
5552 (GNULIB_STDINT_H): Adjust.
5553 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5554 * gdbreplay.c: Include build-gnulib/config.h.
5555 * server.h: Likewise.
5556 * aclocal.m4: Regenerate.
5557 * config.in: Regenerate.
5558 * configure: Regenerate.
5559
5560 2012-04-19 Pedro Alves <palves@redhat.com>
5561
5562 * Makefile.in (LIBGNU, INCGNU): Adjust.
5563 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5564 (all, install-only, uninstall, clean-info, all-lib, clean)
5565 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5566 * configure.ac: Adjust AC_OUTPUT output.
5567 * aclocal.m4: Regenerate.
5568 * configure: Regenerate.
5569
5570 2012-04-19 Pedro Alves <palves@redhat.com>
5571
5572 * Makefile.in (generated_files): New.
5573 (server_h): Remove the explicit dependency on config.h, and depend
5574 on $generated_files.
5575
5576 2012-04-19 Pedro Alves <palves@redhat.com>
5577
5578 * Makefile.in (INCGNU): Add -Ignulib.
5579
5580 2012-04-19 Pedro Alves <palves@redhat.com>
5581
5582 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5583 (INCGNU): ... this, and spell out -I here.
5584 (GNULIB_LIB): Rename to ...
5585 (LIBGNU): ... this.
5586 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5587
5588 2012-04-19 Pedro Alves <palves@redhat.com>
5589
5590 * config.in: Regenerate.
5591
5592 2012-04-19 Pedro Alves <palves@redhat.com>
5593
5594 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5595 * server.h (memmem): Remove declaration.
5596 * config.in: Regenerate.
5597 * configure: Regenerate.
5598
5599 2012-04-19 Yao Qi <yao@codesourcery.com>
5600
5601 * Makefile.in (SFILES): Add common/vec.c.
5602 (OBS): Add vec.o.
5603 (vec.o): New rule.
5604
5605 2012-04-19 Yao Qi <yao@codesourcery.com>
5606
5607 * remote-utils.c (prepare_resume_reply): Replace with macro
5608 target_core_of_thread.
5609 * server.c (handle_qxfer_threads_proper): Likewise.
5610 * target.h (traget_core_of_thread): New macro.
5611
5612 2012-04-18 Pedro Alves <palves@redhat.com>
5613
5614 * aclocal.m4: Regenerate.
5615 * configure: Regenerate.
5616
5617 2012-04-16 Yao Qi <yao@codesourcery.com>
5618
5619 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5620 duplicated on address.
5621
5622 2012-04-16 Yao Qi <yao@codesourcery.com>
5623
5624 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5625 (struct tracepoint_action_ops) <send>: New field.
5626 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5627 (agent_expr_send, x_tracepoint_action_send): New.
5628 (l_tracepoint_action_send): New.
5629 (cmd_qtdp): Download and install tracepoint
5630 according to `use_agent'.
5631 (run_inferior_command): Add one more parameter `len'.
5632 Update callers.
5633 (tracepoint_send_agent): New.
5634 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5635
5636 2012-04-16 Yao Qi <yao@codesourcery.com>
5637
5638 * tracepoint.c (download_tracepoints): Moved to ...
5639 (cmd_qtstart): ... here.
5640
5641 2012-04-14 Yao Qi <yao@codesourcery.com>
5642
5643 * tracepoint.c: Include inttypes.h.
5644 (struct collect_memory_action): Use sized types.
5645 (struct tracepoint): Likewise.
5646 (cmd_qtdp, stop_tracing): Update print specifiers.
5647 (cmd_qtp, response_tracepoint): Likewise.
5648 (collect_data_at_tracepoint): Likewise.
5649 (collect_data_at_step): Likewise.
5650
5651 2012-04-14 Yao Qi <yao@codesourcery.com>
5652
5653 Import gnulib module inttypes.
5654 * aclocal.m4, config.in, configure: Regenerated.
5655
5656 2012-04-14 Yao Qi <yao@codesourcery.com>
5657
5658 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5659 Makefile and config.status at last.
5660
5661 2012-04-13 Yao Qi <yao@codesourcery.com>
5662
5663 * tracepoint.c: Include stdint.h unconditionally.
5664
5665 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5666
5667 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5668 on BFD_HAVE_SYS_PROCFS_TYPE.
5669 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5670 * configure: Regenerate.
5671 * config.in: Likewise.
5672
5673 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5674
5675 * Makefile.in (clean): Also remove x32.c x32-linux.c
5676 x32-avx.c x32-avx-linux.c.
5677 (x32.o): New target.
5678 (x32.c): Likewise.
5679 (x32-linux.o): Likewise.
5680 (x32-linux.c): Likewise.
5681 (x32-avx.o): Likewise.
5682 (x32-avx.c): Likewise.
5683 (x32-avx-linux.o): Likewise.
5684 (x32-avx-linux.c): Likewise.
5685
5686 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5687 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5688 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5689 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5690 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5691 i386/x32-avx-linux.xml.
5692
5693 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5694 (init_registers_x32_avx_linux): Likwise.
5695 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5696 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5697
5698 2012-04-13 Pedro Alves <palves@redhat.com>
5699
5700 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5701 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5702 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5703 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5704 the sub-make.
5705
5706 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5707
5708 * linux-x86-low.c (compat_x32_clock_t): New.
5709 (compat_x32_siginfo_t): Likewise.
5710 (compat_x32_siginfo_from_siginfo): Likewise.
5711 (siginfo_from_compat_x32_siginfo): Likewise.
5712 (linux_is_elf64): Likewise.
5713 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5714 and siginfo_from_compat_x32_siginfo for x32.
5715 (x86_arch_setup): Set linux_is_elf64.
5716
5717 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5718
5719 PR gdb/13969
5720 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5721 e_machine field.
5722 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5723 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5724 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5725 compatible with process.
5726
5727 2012-04-12 Yao Qi <yao@codesourcery.com>
5728
5729 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5730 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5731 (install-only, install-info, clean): Handle sub dir gnulib.
5732 (all-lib, am--refresh): New targets.
5733 (memmem.o): Remove target.
5734 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5735 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5736 (AC_REPLACE_FUNCS): Remove memmem.
5737 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5738 (AC_OUTPUT): Generate Makefile in gnulib/.
5739 * aclocal.m4, config.in, configure: Regenerated.
5740
5741 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5742
5743 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5744
5745 2012-04-05 Pedro Alves <palves@redhat.com>
5746
5747 -Werror=strict-aliasing
5748
5749 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5750 pointer.
5751
5752 2012-04-04 Pedro Alves <palves@redhat.com>
5753
5754 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5755 (sparc_store_gregset_from_stack, sparc_store_gregset)
5756 (sparc_breakpoint_at): Fix formatting.
5757
5758 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5759
5760 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5761 are available.
5762 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5763 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5764 * config.in: Regenerate.
5765 * configure: Likewise.
5766
5767 2012-03-29 Pedro Alves <palves@redhat.com>
5768
5769 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5770 Correct ptrace arguments.
5771
5772 2012-03-28 Pedro Alves <palves@redhat.com>
5773
5774 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5775 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5776 (IA64_FR1_REGNUM): New defines.
5777 (ia64_fetch_register): New.
5778 (the_low_target): Install it.
5779 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5780 field.
5781 * linux-low.c (linux_fetch_registers): Try the
5782 the_low_target.fetch_register hook first.
5783
5784 * linux-arm-low.c (the_low_target): Adjust.
5785 * linux-bfin-low.c (the_low_target): Adjust.
5786 * linux-cris-low.c (the_low_target): Adjust.
5787 * linux-crisv32-low.c (the_low_target): Adjust.
5788 * linux-m32r-low.c (the_low_target): Adjust.
5789 * linux-m68k-low.c (the_low_target): Adjust.
5790 * linux-mips-low.c (the_low_target): Adjust.
5791 * linux-ppc-low.c (the_low_target): Adjust.
5792 * linux-s390-low.c (the_low_target): Adjust.
5793 * linux-sh-low.c (the_low_target): Adjust.
5794 * linux-sparc-low.c (the_low_target): Adjust.
5795 * linux-tic6x-low.c (the_low_target): Adjust.
5796 * linux-x86-low.c (the_low_target): Adjust.
5797 * linux-xtensa-low.c (the_low_target): Adjust.
5798
5799 2012-03-26 Pedro Alves <palves@redhat.com>
5800
5801 * server.c (handle_qxfer_libraries): Don't bail early if
5802 the_target->qxfer_libraries_svr4 is not NULL.
5803
5804 2012-03-26 Pedro Alves <palves@redhat.com>
5805
5806 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5807
5808 2012-03-23 Pedro Alves <palves@redhat.com>
5809
5810 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5811 "library-list-svr4" element's start tag when the the DSO list is
5812 empty.
5813
5814 2012-03-23 Pedro Alves <palves@redhat.com>
5815
5816 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5817 a variable whose type size is the same as the inferior's pointer
5818 size.
5819
5820 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5821
5822 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5823 struct siginfo.
5824 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5825 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5826 * linux-low.h: Include <signal.h>.
5827 (struct siginfo): Remove forward declaration.
5828 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5829 struct siginfo.
5830
5831 2012-03-21 Mike Frysinger <vapier@gentoo.org>
5832
5833 * .gitignore: Ignore more files.
5834
5835 2012-03-19 Pedro Alves <palves@redhat.com>
5836 Jan Kratochvil <jan.kratochvil@redhat.com>
5837
5838 * server.c (cont_thread, general_thread): Add describing comments.
5839 (start_inferior): Clear `cont_thread'.
5840 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5841 of a process.
5842
5843 2012-03-15 Yao Qi <yao@codesourcery.com>
5844
5845 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5846 handling to ...
5847 (cmd_qtdp): ... here.
5848
5849 2012-03-15 Yao Qi <yao@codesourcery.com>
5850
5851 * tracepoint.c (struct tracepoint_action_ops): New.
5852 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5853 (m_tracepoint_action_download): New.
5854 (r_tracepoint_action_download): New.
5855 (x_tracepoint_action_download): New.
5856 (l_tracepoint_action_download): New.
5857 (add_tracepoint_action): Install `action->ops' according type.
5858 (download_tracepoint_1): Move code `download' function pointer
5859 of various tracepoint_action_ops.
5860
5861 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5862
5863 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5864 linux_ptrace_attach_warnings.
5865
5866 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5867
5868 * Makefile.in (linux-ptrace.o): New.
5869 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5870 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5871 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5872 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5873 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5874 of these targets.
5875 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5876
5877 2012-03-08 Yao Qi <yao@codesourcery.com>
5878 Pedro Alves <palves@redhat.com>
5879
5880 Fix PR server/13392.
5881 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5882 offset of JMP insn.
5883 * tracepoint.c (remove_tracepoint): New.
5884 (cmd_qtdp): Call remove_tracepoint when failed to install.
5885
5886 2012-03-07 Pedro Alves <palves@redhat.com>
5887
5888 * linux-low.c (get_detach_signal): New.
5889 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5890 Pass on pending signals to PTRACE_DETACH. Check the result of the
5891 ptrace call.
5892 * server.c (program_signals, program_signals_p): New.
5893 (handle_general_set): Handle QProgramSignals.
5894 * server.h (program_signals, program_signals_p): Declare.
5895
5896 2012-03-05 Pedro Alves <palves@redhat.com>
5897 Jan Kratochvil <jan.kratochvil@redhat.com>
5898
5899 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5900 New comment why.
5901
5902 2012-03-03 Yao Qi <yao@codesourcery.com>
5903
5904 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5905 agent_look_up_symbols.
5906
5907 2012-03-03 Yao Qi <yao@codesourcery.com>
5908
5909 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5910 (linux-x86-low.o): Likewise.
5911 * server.h: Remove in_process_agent_loaded.
5912 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5913 common/agent.c.
5914 Update callers.
5915
5916 2012-03-03 Yao Qi <yao@codesourcery.com>
5917
5918 * tracepoint.c (gdb_agent_capability): New global.
5919 (in_process_agent_loaded_ust): Renamed to
5920 `in_process_agent_supports_ust'.
5921 Update callers.
5922 (in_process_agent_supports_ust): Call agent_capability_check.
5923 (clear_installed_tracepoints): Assert that agent supports
5924 agent.
5925
5926 2012-03-03 Yao Qi <yao@codesourcery.com>
5927
5928 * linux-low.c (linux_supports_agent): New.
5929 (linux_target_ops): Initialize field `supports_agent' with
5930 linux_supports_agent.
5931 * target.h (struct target_ops) <supports_agent>: New.
5932 (target_supports_agent): New macro.
5933 * server.c (handle_general_set): Handle packet 'QAgent'.
5934 (handle_query): Send `QAgent+'.
5935 * Makefile.in (server.o): Depends on agent.h.
5936
5937 2012-03-03 Yao Qi <yao@codesourcery.com>
5938
5939 * Makefile.in (OBS): Add agent.o.
5940 Add new rule for agent.o.
5941 Track dependence of tracepoint.c on agent.h.
5942 * tracepoint.c (run_inferior_command_1):
5943 (run_inferior_command): Call agent_run_command.
5944 (gdb_ust_connect_sync_socket): Deleted. Move it to
5945 common/agent.c.
5946 (resume_thread, stop_thread): Likewise.
5947 (gdb_ust_socket_init): Renamed to ...
5948 (gdb_agent_socket_init): ... New.
5949 (gdb_ust_thread): Renamed to ...
5950 (gdb_agent_helper_thread): ... New.
5951 (gdb_ust_init): Move some code to ...
5952 (gdb_agent_init): ... here. New.
5953 [HAVE_UST]: Call gdb_ust_init.
5954 (initialize_tracepoint_ftlib): Call gdb_agent_init.
5955 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
5956 * config.in, configure: Regenerated.
5957
5958 2012-03-02 Pedro Alves <palves@redhat.com>
5959
5960 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
5961 * linux-low.c (struct simple_pid_list): New.
5962 (stopped_pids): New a struct simple_pid_list pointer.
5963 (add_to_pid_list, pull_pid_from_list): New.
5964 (handle_extended_wait): Don't assume the first signal new children
5965 report is SIGSTOP. Adjust call to pull_pid_from_list.
5966 (linux_wait_for_lwp): Adjust.
5967
5968 2012-03-02 Yao Qi <yao@codesourcery.com>
5969
5970 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
5971 debug log.
5972
5973 2012-03-02 Yao Qi <yao@codesourcery.com>
5974
5975 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
5976 `stop_pc' and `tpoint'. Update caller.
5977
5978 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
5979
5980 * linux-low.h (linux_target_ops): Add regset_bitmap member.
5981 * linux-low.c (use_linux_regsets): New macro.
5982 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
5983 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
5984 (linux_register_in_regsets): New function.
5985 (usr_fetch_inferior_registers): Skip registers covered by
5986 regsets.
5987 (usr_store_inferior_registers): Likewise.
5988 (usr_fetch_inferior_registers): New macro.
5989 (usr_store_inferior_registers): Likewise.
5990 (linux_fetch_registers): Handle mixed regset/non-regset targets.
5991 (linux_store_registers): Likewise.
5992 * linux-mips-low.c (init_registers_mips_dsp_linux): New
5993 prototype.
5994 (init_registers_mips64_dsp_linux): Likewise.
5995 (init_registers_mips_linux): New macro.
5996 (init_registers_mips_dsp_linux): Likewise.
5997 (mips_dsp_num_regs): Likewise.
5998 (DSP_BASE, DSP_CONTROL): New fallback macros.
5999 (mips_base_regs): New macro.
6000 (mips_regmap): Use it. Fix the size.
6001 (mips_dsp_regmap): New variable.
6002 (mips_dsp_regset_bitmap): Likewise.
6003 (mips_arch_setup): New function.
6004 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6005 than mips_regmap.
6006 (mips_cannot_store_register): Likewise.
6007 (the_low_target): Update .arch_setup, .num_regs and .regmap
6008 initializers. Add .regset_bitmap initializer.
6009 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6010 initializer.
6011 * linux-bfin-low.c (the_low_target): Likewise.
6012 * linux-cris-low.c (the_low_target): Likewise.
6013 * linux-crisv32-low.c (the_low_target): Likewise.
6014 * linux-ia64-low.c (the_low_target): Likewise.
6015 * linux-m32r-low.c (the_low_target): Likewise.
6016 * linux-m68k-low.c (the_low_target): Likewise.
6017 * linux-ppc-low.c (the_low_target): Likewise.
6018 * linux-s390-low.c (the_low_target): Likewise.
6019 * linux-sh-low.c (the_low_target): Likewise.
6020 * linux-sparc-low.c (the_low_target): Likewise.
6021 * linux-tic6x-low.c (the_low_target): Likewise.
6022 * linux-x86-low.c (the_low_target): Likewise.
6023 * linux-xtensa-low.c (the_low_target): Likewise.
6024 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6025 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6026 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6027 srv_xmlfiles.
6028 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6029 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6030
6031 2012-02-29 Yao Qi <yao@codesourcery.com>
6032 Pedro Alves <palves@redhat.com>
6033
6034 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6035 `step_over_finished' is true.
6036
6037 2012-02-27 Pedro Alves <palves@redhat.com>
6038
6039 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6040 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6041
6042 2012-02-27 Pedro Alves <palves@redhat.com>
6043
6044 PR server/9684
6045 * linux-low.c (pid_is_stopped): New.
6046 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6047
6048 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
6049
6050 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6051 of conditions.
6052
6053 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6054
6055 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6056
6057 2012-02-24 Luis Machado <lgustavo@codesourcery>
6058
6059 * server.c (handle_query): Advertise support for target-side
6060 breakpoint condition evaluation.
6061 (process_point_options): New function.
6062 (process_serial_event): When inserting a breakpoint, check for
6063 a target-side condition that should be evaluated.
6064
6065 * mem-break.c: Include regcache.h and ax.h.
6066 (point_cond_list_t): New data structure.
6067 (breakpoint) <cond_list>: New field.
6068 (find_gdb_breakpoint_at): Make non-static.
6069 (delete_gdb_breakpoint_at): Clear any target-side
6070 conditions.
6071 (clear_gdb_breakpoint_conditions): New function.
6072 (add_condition_to_breakpoint): Likewise.
6073 (add_breakpoint_condition): Likewise.
6074 (gdb_condition_true_at_breakpoint): Likewise.
6075 (gdb_breakpoint_here): Return result directly instead
6076 of going through a local variable.
6077
6078 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6079 (clear_gdb_breakpoint_conditions): Likewise.
6080 (add_breakpoint_condition): Likewise.
6081 (gdb_condition_true_at_breakpoint): Likewise.
6082
6083 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6084 (need_step_over_p): Take target-side breakpoint condition into
6085 consideration.
6086
6087 2012-02-24 Luis Machado <lgustavo@codesourcery>
6088
6089 * server.h: Include tracepoint.h.
6090 (agent_mem_read, agent_get_trace_state_variable_value,
6091 agent_set_trace_state_variable_value,
6092 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6093 get_set_tsv_func_addr): New prototypes.
6094
6095 * ax.h: New include file.
6096 * ax.c: New source file.
6097
6098 * tracepoint.c: Include ax.h.
6099 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6100 agent_expr, eval_result_type): Move to ax.h.
6101 (parse_agent_expr): Rename to ...
6102 (gdb_parse_agent_expr): ... this, make it non-static and move
6103 to ax.h.
6104 (unparse_agent_expr) Rename to ...
6105 (gdb_unparse_agent_expr): ... this, make it non-static and move
6106 to ax.h.
6107 (eval_agent_expr): Rename to ...
6108 (eval_tracepoint_agent_expr): ... this.
6109 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6110 forward declarations.
6111 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6112 (agent_get_trace_state_variable_value): New function.
6113 (agent_set_trace_state_variable_value): New function.
6114 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6115 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6116 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6117 (condition_true_at_tracepoint): Likewise.
6118 (parse_agent_expr): Rename to ...
6119 (gdb_parse_agent_expr): ... this and move to ax.c.
6120 (unparse_agent_expr): Rename to ...
6121 (gdb_unparse_agent_expr): ... this and move to ax.c.
6122 (gdb_agent_op_name): Move to ax.c.
6123 (eval_agent_expr): Rename to ...
6124 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6125 and move to ax.c.
6126 (eval_tracepoint_agent_expr): New function.
6127 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
6128 non-static.
6129 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6130 ax.c.
6131 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6132 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6133 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6134 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6135 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6136 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6137 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6138 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6139 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6140 (compile_bytecodes): Remove forward declaration.
6141 (is_goto_target): Move to ax.c.
6142 (compile_bytecodes): Move to ax.c and call
6143 agent_get_trace_state_variable_value (...) and
6144 agent_set_trace_state_variable_value (...).
6145
6146 * Makefile.in: Update ax.c and IPA dependencies.
6147
6148 2012-02-24 Pedro Alves <palves@redhat.com>
6149
6150 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6151 (cmd_bigqtbuffer_circular): ... this. Only handle
6152 'QTBuffer:circular:'.
6153 (handle_tracepoint_general_set): Adjust.
6154
6155 2012-02-16 Yao Qi <yao@codesourcery.com>
6156
6157 * inferiors.c: Move code to ...
6158 * dll.c: .... here. New.
6159 * server.h: Declare clear_dlls.
6160 * Makefile.in (SFILES): Add dll.c.
6161 (OBS): Add dll.o
6162 (dll.o): New rule.
6163
6164 2012-02-11 Yao Qi <yao@codesourcery.com>
6165
6166 * server.c: (handle_monitor_command): Add a new parameter
6167 `own_buf'.
6168 (handle_query): Update caller.
6169
6170 2012-02-09 Joel Brobecker <brobecker@adacore.com>
6171
6172 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6173 * configure, config.in: Regenerate.
6174 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6175 is not defined.
6176
6177 2012-02-02 Pedro Alves <palves@redhat.com>
6178
6179 Try SIGKILL first, then PTRACE_KILL.
6180 * linux-low.c (linux_kill_one_lwp): New.
6181 (linux_kill_one_lwp): Rename to ...
6182 (kill_one_lwp_callback): ... this. Use the new
6183 linux_kill_one_lwp.
6184
6185 2012-02-02 Pedro Alves <palves@redhat.com>
6186
6187 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6188 inferior.
6189
6190 2012-01-27 Pedro Alves <palves@redhat.com>
6191
6192 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6193 (elf_64_file_p): Make static.
6194 (linux_pid_exe_is_elf_64_file): New.
6195 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6196 Delete declarations.
6197 (linux_pid_exe_is_elf_64_file): Declare.
6198 * linux-x86-low.c (x86_arch_setup): Use
6199 linux_pid_exe_is_elf_64_file.
6200
6201 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6202
6203 * linux-low.c (linux_wait_for_event_1): Rename to ...
6204 (linux_wait_for_event): ... here and merge it with former
6205 linux_wait_for_event - new variable wait_ptid, use it.
6206 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6207
6208 2012-01-23 Pedro Alves <palves@redhat.com>
6209
6210 * server.c (main): Avoid yet another case of infinite loop while
6211 detaching/killing after a longjmp.
6212
6213 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6214
6215 Code cleanup.
6216 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6217
6218 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6219
6220 * hostio.c (handle_readlink): New function.
6221 (handle_vFile): Call it to handle "vFile:readlink" packets.
6222
6223 2012-01-20 Pedro Alves <palves@redhat.com>
6224 Ulrich Weigand <ulrich.weigand@linaro.org>
6225
6226 * server.c (handle_v_requests): Only support vAttach and vRun to
6227 start multiple processes when in extended protocol mode.
6228
6229 2012-01-17 Pedro Alves <palves@redhat.com>
6230
6231 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6232 memalign plus mprotect to allocate the scratch buffer.
6233
6234 2012-01-13 Pedro Alves <palves@redhat.com>
6235
6236 * server.c (attach_inferior): Clear `cont_thread'.
6237
6238 2012-01-13 Pedro Alves <palves@redhat.com>
6239
6240 * server.c (main): Avoid infinite loop while detaching/killing
6241 after a longjmp.
6242
6243 2012-01-09 Doug Evans <dje@google.com>
6244
6245 * server.c (start_inferior): Set last_ptid in --wrapper case.
6246
6247 2012-01-06 Yao Qi <yao@codesourcery.com>
6248
6249 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6250 defined.
6251 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6252
6253 2012-01-04 Yao Qi <yao@codesourcery.com>
6254
6255 * tracepoint.c (cmd_qtdp): Print debug message
6256 for static tracepoint.
6257
6258 2012-01-04 Yao Qi <yao@codesourcery.com>
6259
6260 * tracepoint.c (trace_vdebug): Differentiate debug message
6261 between gdbserver and IPA.
6262
6263 2012-01-03 Yao Qi <yao@codesourcery.com>
6264
6265 * tracepoint.c (tracepoint_was_hit): Don't collect for
6266 static tracepoint.
6267
6268 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6269
6270 * terminal.h: Reformat copyright header.
6271
6272 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6273
6274 * server.c (gdbserver_version): Update copyright year.
6275 * gdbreplay.c (gdbreplay_version): Likewise.
6276
6277 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6278
6279 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6280
6281 Revert:
6282 2011-12-18 Hui Zhu <teawater@gmail.com>
6283 * linux-low.c (linux_create_inferior): Save return value to ret.
6284
6285 2011-12-18 Hui Zhu <teawater@gmail.com>
6286
6287 * linux-low.c (linux_create_inferior): Save return value to ret.
6288
6289 2011-12-16 Doug Evans <dje@google.com>
6290
6291 * linux-low.c (linux_create_inferior): If stdio connection,
6292 redirect stdin from /dev/null, stdout to stderr.
6293 * remote-utils.c (remote_is_stdio): New static global.
6294 (remote_connection_is_stdio): New function.
6295 (remote_prepare): Handle stdio connection.
6296 (remote_open): Ditto.
6297 (remote_close): Don't close stdin for stdio connections.
6298 (read_prim,write_prim): New functions. Replace all calls to
6299 read/write to these.
6300 * server.c (main): Watch for "-" argument. Move call to
6301 remote_prepare before start_inferior.
6302 * server.h (STDIO_CONNECTION_NAME): New macro.
6303 (remote_connection_is_stdio): Declare.
6304
6305 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6306 in debugging output.
6307
6308 2011-12-15 Yao Qi <yao@codesourcery.com>
6309
6310 * tracepoint.c: Include sys/syscall.h.
6311 (gdb_ust_thread): Remove preprocessor conditional.
6312
6313 2011-12-14 Pedro Alves <pedro@codesourcery.com>
6314
6315 * linux-low.c (linux_detach_one_lwp): Call
6316 the_low_target.prepare_to_resume before detaching.
6317
6318 2011-12-14 Yao Qi <yao@codesourcery.com>
6319
6320 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6321 of write.
6322
6323 2011-12-14 Yao Qi <yao@codesourcery.com>
6324
6325 * i386-low.c (i386_low_stopped_data_address): Initialize local
6326 variable `control'.
6327
6328 2011-12-13 Pedro Alves <pedro@codesourcery.com>
6329
6330 PR remote/13492
6331
6332 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6333 DR_CONTROL unless necessary. Extend comments.
6334 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6335 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6336
6337 2011-12-13 Yao Qi <yao@codesourcery.com>
6338
6339 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6340 macros.
6341 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6342
6343 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6344
6345 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6346 Print new debug message for such case.
6347
6348 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6349
6350 Fix overlapping memcpy.
6351 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6352 the read_inferior_memory transfer.
6353 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6354 write_inferior_memory transfer.
6355 (set_fast_tracepoint_jump): New variable buf. Use it for the
6356 read_inferior_memory and write_inferior_memory transfers.
6357 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6358 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6359 Use it for the write_inferior_memory transfer.
6360 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6361 buffers.
6362
6363 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6364
6365 * linux-low.c (fetch_register, store_register): Make code
6366 consistent, fix formatting.
6367
6368 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6369
6370 * linux-low.c (usr_store_inferior_registers): Factor out code
6371 to handle individual registers into...
6372 (store_register): ... this new function.
6373
6374 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6375
6376 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6377 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6378 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6379 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6380 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6381 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6382 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6383 (srv_xmlfiles): Add new XML files.
6384
6385 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6386 and <sys/uio.h>.
6387 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6388 (init_registers_s390_linux32v1): Add prototype.
6389 (init_registers_s390_linux32v2): Likewise.
6390 (init_registers_s390_linux64v1): Likewise.
6391 (init_registers_s390_linux64v2): Likewise.
6392 (init_registers_s390x_linux64v1): Likewise.
6393 (init_registers_s390x_linux64v2): Likewise.
6394 (s390_num_regs): Increment to 52.
6395 (s390_regmap): Add orig_r2 register.
6396 (s390_num_regs_3264): Increment to 68.
6397 (s390_regmap_3264): Add orig_r2 register.
6398 (s390_collect_ptrace_register): Handle orig_r2 register.
6399 (s390_supply_ptrace_register): Likewise.
6400 (s390_fill_last_break): New function.
6401 (s390_store_last_break): Likewise.
6402 (s390_fill_system_call): New function.
6403 (s390_store_system_call): Likewise.
6404 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6405 register sets.
6406 (s390_check_regset): New function.
6407 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6408 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6409 Update target_regsets for available register sets.
6410
6411 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6412 Jan Kratochvil <jan.kratochvil@redhat.com>
6413
6414 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6415 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6416 New.
6417 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6418 * linux-low.h (struct process_info_private): New member r_debug.
6419 * server.c (handle_qxfer_libraries): Call
6420 the_target->qxfer_libraries_svr4.
6421 (handle_qxfer_libraries_svr4): New function.
6422 (qxfer_packets): New entry "libraries-svr4".
6423 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6424 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6425 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6426 PACKET_qXfer_libraries_svr4.
6427
6428 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6429
6430 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6431 PSW address/mask between 8-byte and 16-byte formats.
6432 (s390_supply_ptrace_register): Likewise.
6433 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6434 basic addressing mode bit.
6435
6436 2011-11-24 Stan Shebs <stan@codesourcery.com>
6437
6438 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6439
6440 2011-11-17 Stan Shebs <stan@codesourcery.com>
6441
6442 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6443 (tracing_start_time): New global.
6444 (tracing_stop_time): New global.
6445 (tracing_user_name): New global.
6446 (tracing_notes): New global.
6447 (tracing_stop_note): New global.
6448 (cmd_qtstart): Set traceframe_usage, start_time.
6449 (stop_tracing): Set stop_time.
6450 (cmd_qtstatus): Report additional status.
6451 (cmd_qtp): New function.
6452 (handle_tracepoint_query): Call it.
6453 (cmd_qtnotes): New function.
6454 (handle_tracepoint_general_set): Call it.
6455 (get_timestamp): Rename from tsv_get_timestamp.
6456
6457 2011-11-14 Stan Shebs <stan@codesourcery.com>
6458 Kwok Cheung Yeung <kcy@codesourcery.com>
6459
6460 * linux-x86-low.c (small_jump_insn): New.
6461 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6462 trampoline and error message, build a trampoline and issue a small
6463 jump instruction to it.
6464 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6465 trampoline and error message.
6466 (x86_get_min_fast_tracepoint_insn_len): New.
6467 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6468 * linux-low.h (struct linux_target_ops): Add arguments to
6469 install_fast_tracepoint_jump_pad operation, add new operation.
6470 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6471 arguments.
6472 (linux_get_min_fast_tracepoint_insn_len): New function.
6473 (linux_target_op): Add new operation.
6474 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6475 (gdb_trampoline_buffer_end): Ditto.
6476 (gdb_trampoline_buffer_error): Ditto.
6477 (struct ipa_sym_addresses): Add fields for new IPA variables.
6478 (symbol_list): Add entries for new IPA variables.
6479 (struct tracepoint): Add fields to hold the address range of the
6480 trampoline used by the tracepoint.
6481 (trampoline_buffer_head): New static variable.
6482 (trampoline_buffer_tail): Ditto.
6483 (claim_trampoline_space): New function.
6484 (have_fast_tracepoint_trampoline_buffer): New function.
6485 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6486 structure.
6487 (install_fast_tracepoint): Ditto, also add error buffer argument.
6488 (cmd_qtminftpilen): New function.
6489 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6490 (fast_tracepoint_from_trampoline_address): New function.
6491 (fast_tracepoint_collecting): Handle trampoline as part of jump
6492 pad space.
6493 (set_trampoline_buffer_space): New function.
6494 (initialize_tracepoint): Initialize new IPA variables.
6495 * target.h (struct target_ops): Add arguments to
6496 install_fast_tracepoint_jump_pad operation, add new
6497 get_min_fast_tracepoint_insn_len operation.
6498 (target_get_min_fast_tracepoint_insn_len): New.
6499 (install_fast_tracepoint_jump_pad): Add arguments.
6500 * server.h (IPA_BUFSIZ): Define.
6501 * linux-i386-ipa.c: Include extra header files.
6502 (initialize_fast_tracepoint_trampoline_buffer): New function.
6503 (initialize_low_tracepoint): Call it.
6504 * server.h (set_trampoline_buffer_space): Declare.
6505 (claim_trampoline_space): Ditto.
6506 (have_fast_tracepoint_trampoline_buffer): Ditto.
6507
6508 2011-11-14 Yao Qi <yao@codesourcery.com>
6509
6510 * server.c (handle_query): Handle InstallInTrace for qSupported.
6511 * tracepoint.c (add_tracepoint): Sort list.
6512 (install_tracepoint, download_tracepoint): New.
6513 (cmd_qtdp): Call them to install and download tracepoints.
6514 (sort_tracepoints): Removed.
6515 (cmd_qtstart): Update.
6516
6517 2011-11-14 Yao Qi <yao@codesourcery.com>
6518
6519 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6520 * mem-break.h: Declare.
6521 * tracepoint.c (cmd_qtstart): Move some code to ...
6522 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6523 New.
6524 (download_tracepoints): Move some code to ...
6525 (download_tracepoint_1): ... here. New.
6526
6527 2011-11-08 Yao Qi <yao@codesourcery.com>
6528
6529 * remote-utils.c (relocate_instruction): A comment fix.
6530
6531 2011-11-07 Joel Brobecker <brobecker@adacore.com>
6532
6533 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6534 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6535 dr_status_mirror and dr_control_mirror from debug_reg_state.
6536 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6537 (i386_initial_stuff): Remove use of deleted globals.
6538 (i386_get_thread_context, i386_set_thread_context,
6539 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6540 from debug_reg_state.
6541
6542 2011-11-05 Yao Qi <yao@codesourcery.com>
6543
6544 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6545 address as TPOINT's.
6546
6547 2011-11-02 Stan Shebs <stan@codesourcery.com>
6548
6549 * tracepoint.c (agent_mem_read_string): New function.
6550 (eval_agent_expr): Call it for tracenz.
6551 * server.c (handle_query): Report support for tracenz.
6552
6553 2011-11-02 Yao Qi <yao@codesourcery.com>
6554
6555 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6556
6557 2011-11-02 Yao Qi <yao@codesourcery.com>
6558
6559 * target.h: Fix a typo in comment.
6560
6561 2011-10-31 Pedro Alves <pedro@codesourcery.com>
6562
6563 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6564 clobber the breakpoints' shadows with fast tracepoint jumps.
6565 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6566 * target.c (write_inferior_memory): Also pass MYADDR down to
6567 check_mem_write.
6568
6569 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6570
6571 * configure.ac: Check support for personality routine.
6572 * configure: Regenerate.
6573 * config.in: Likewise.
6574 * linux-low.c: Include <sys/personality.h>.
6575 Define ADDR_NO_RANDOMIZE if necessary.
6576 (linux_create_inferior): Disable address space randomization when
6577 forking inferior, if requested.
6578 (linux_supports_disable_randomization): New function.
6579 (linux_target_ops): Install it.
6580 * server.h (disable_randomization): Declare.
6581 * server.c (disable_randomization): New global variable.
6582 (handle_general_set): Handle QDisableRandomization.
6583 (handle_query): Likewise for qSupported.
6584 (main): Support --disable-randomization and --no-disable-randomization
6585 command line arguments.
6586 * target.h (struct target_ops): Add supports_disable_randomization.
6587 (target_supports_disable_randomization): New macro.
6588
6589 2011-09-29 Mike Frysinger <vapier@gentoo.org>
6590
6591 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6592 ifdef check.
6593 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6594 [!PT_GETDSBT] (target_loadmap): New definition.
6595 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6596 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6597 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6598 and PT_GETDSBT to LINUX_LOADMAP.
6599 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6600 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6601
6602 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6603
6604 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6605 (arm_linux_hwbp_cap): New static variable.
6606 (arm_linux_get_hwbp_cap): Replace by ...
6607 (arm_linux_init_hwbp_cap): ... this new function.
6608 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6609 (arm_linux_get_hw_watchpoint_count): Likewise.
6610 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6611 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6612 (arm_prepare_to_resume): Use perror_with_name instead of error.
6613
6614 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6615
6616 * linux-arm-low.c: Include <signal.h>.
6617 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6618 (struct arm_linux_hwbp_cap): New data type.
6619 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6620 (struct arm_linux_hw_breakpoint): New data type.
6621 (MAX_BPTS, MAX_WPTS): Define.
6622 (struct arch_process_info, struct arch_lwp_info): New data types.
6623 (arm_linux_get_hwbp_cap): New function.
6624 (arm_linux_get_hw_breakpoint_count): Likewise.
6625 (arm_linux_get_hw_watchpoint_count): Likewise.
6626 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6627 (arm_hwbp_control_initialize): Likewise.
6628 (arm_hwbp_control_is_enabled): Likewise.
6629 (arm_hwbp_control_is_initialized): Likewise.
6630 (arm_hwbp_control_disable): Likewise.
6631 (arm_linux_hw_breakpoint_equal): Likewise.
6632 (arm_linux_hw_point_initialize): Likewise.
6633 (struct update_registers_data): New data structure.
6634 (update_registers_callback: New function.
6635 (arm_insert_point): Likewise.
6636 (arm_remove_point): Likewise.
6637 (arm_stopped_by_watchpoint): Likewise.
6638 (arm_stopped_data_address): Likewise.
6639 (arm_new_process): Likewise.
6640 (arm_new_thread): Likewise.
6641 (arm_prepare_to_resume): Likewise.
6642 (the_low_target): Register arm_insert_point, arm_remove_point,
6643 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6644 arm_new_thread, and arm_prepare_to_resume.
6645
6646 2011-09-15 Stan Shebs <stan@codesourcery.com>
6647
6648 * server.h (struct emit_ops): Add compare-goto fields.
6649 * tracepoint.c (gdb_agent_op_sizes): New table.
6650 (emit_eq_goto): New function.
6651 (emit_ne_goto): New function.
6652 (emit_lt_goto): New function.
6653 (emit_le_goto): New function.
6654 (emit_gt_goto): New function.
6655 (emit_ge_goto): New function.
6656 (is_goto_target): New function.
6657 (compile_bytecodes): Recognize special cases of compare-goto
6658 combinations and call specialized emitters for them.
6659 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6660 (amd64_emit_ne_goto): New function.
6661 (amd64_emit_lt_goto): New function.
6662 (amd64_emit_le_goto): New function.
6663 (amd64_emit_gt_goto): New function.
6664 (amd64_emit_ge_goto): New function.
6665 (amd64_emit_ops): Add the new functions.
6666 (i386_emit_eq_goto): New function.
6667 (i386_emit_ne_goto): New function.
6668 (i386_emit_lt_goto): New function.
6669 (i386_emit_le_goto): New function.
6670 (i386_emit_gt_goto): New function.
6671 (i386_emit_ge_goto): New function.
6672 (i386_emit_ops): Add the new functions.
6673
6674 2011-09-08 Stan Shebs <stan@codesourcery.com>
6675
6676 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6677 (i386_emit_epilogue): Restore %ebx.
6678
6679 2011-08-31 Jie Zhang <jzhang918@gmail.com>
6680
6681 * server.c (step_thread): Remove definition.
6682 (process_serial_event): Don't handle Hs.
6683 * server.h (step_thread): Remove declaration.
6684 * target.c (set_desired_inferior): Remove use of step_thread.
6685
6686 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6687
6688 * linux-low.c: Include linux-procfs.h.
6689 (linux_attach_lwp_1): Update comments.
6690 (linux_attach): Scan for existing threads when attaching to a
6691 process that is the tgid.
6692 * Makefile.in: Update dependencies.
6693
6694 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6695
6696 * configure.srv: Add linux-procfs.o dependencies.
6697
6698 2011-08-14 Yao Qi <yao@codesourcery.com>
6699
6700 * target.h (struct target_ops): Fix indent.
6701 * win32-low.c (win32_target_ops): Fix comment.
6702
6703 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
6704 Yao Qi <yao@codesourcery.com>
6705
6706 * Makefile.in (clean): Remove tic6x-*.c files.
6707 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6708 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6709 (tic6x-c64xp-linux.c): Likewise.
6710 * configure.srv: Add support for tic6x-*-uclinux.
6711 * linux-tic6x-low.c: New.
6712 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6713
6714 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
6715 Yao Qi <yao@codesourcery.com>
6716
6717 * target.h (struct target_ops): Add read_loadmap.
6718 * linux-low.c (struct target_loadseg): New type.
6719 (struct target_loadmap): New type.
6720 (linux_read_loadmap): New function.
6721 (linux_target_ops): Add linux_read_loadmap.
6722 * server.c (handle_query): Support qXfer:fdpic:read packet.
6723 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6724 to NULL.
6725
6726 2011-08-05 Eli Zaretskii <eliz@gnu.org>
6727
6728 * win32-low.c: Include <stdint.h>.
6729
6730 2011-07-22 Pedro Alves <pedro@codesourcery.com>
6731
6732 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6733 to the inferior here.
6734 (i386_remove_aligned_watchpoint): Ditto.
6735 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6736 fit part of the watchpoint in the debug registers.
6737 (i386_update_inferior_debug_regs): New.
6738 (i386_low_insert_watchpoint): Work on a local mirror of the debug
6739 registers, and only update the inferior on success.
6740 (i386_low_remove_watchpoint): Ditto.
6741
6742 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6743
6744 * linux-low.c (compare_ints, unique, list_threads, show_process,
6745 linux_core_of_thread): Delete.
6746 (linux_target_ops): Change linux_core_of_thread to
6747 linux_common_core_of_thread.
6748 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6749 * utils.c (malloc_failure): Change type of argument.
6750 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6751 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6752 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6753 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6754 (IPA_OBJS): Add common-utils-ipa.o.
6755 (ptid_h, linux_osdata_h): New macros.
6756 (server_h): Add common/common-utils.h, common/xml-utils.h,
6757 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6758 common/ptid.h.
6759 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6760 ptid.o, buffer.o): New rules.
6761 (linux-low.o): Add common/linux-osdata.h as a dependency.
6762 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6763 * configure.ac: Add AC_HEADER_DIRENT check.
6764 * config.in: Regenerate.
6765 * configure: Regenerate.
6766 * remote-utils.c (xml_escape_text): Delete.
6767 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6768 buffer_xml_printf): Move to common/buffer.c.
6769 * server.c (main): Remove call to initialize_inferiors.
6770 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6771 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6772 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6773 internal_error, gdb_assert, gdb_assert_fail): Delete.
6774 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6775 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6776 common/buffer.h.
6777 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6778 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6779 initialize_inferiors): Delete.
6780
6781 2011-07-20 Pedro Alves <pedro@codesourcery.com>
6782
6783 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6784 symbol error.
6785
6786 2011-05-31 Pedro Alves <pedro@codesourcery.com>
6787
6788 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6789 assertion.
6790 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6791
6792 2011-05-26 Yao Qi <yao@codesourcery.com>
6793
6794 * Makefile.in (thread-db.o): Track dependence to
6795 common/gdb_thread_db.h.
6796 * thread-db.c: include gdb_thread_db.h from right place.
6797
6798 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6799
6800 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6801 __FILE__ and __LINE__ to internal_error.
6802
6803 2011-05-13 Doug Evans <dje@google.com>
6804
6805 * thread-db.c (try_thread_db_load_from_sdir): New function.
6806 (try_thread_db_load_from_dir): New function.
6807 (thread_db_load_search): Handle $sdir, ignore $pdir.
6808 Remove trying of system directories if search of
6809 libthread-db-search-path fails, that is now done via $sdir.
6810
6811 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6812
6813 * server.c (handle_query): Add EnableDisableTracepoints to the list
6814 of supported features.
6815 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
6816 tracepoints.
6817 (cmd_qtenable_disable): New.
6818 (cmd_qtstart): Install tracepoints even if disabled.
6819 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6820 receiving a QTEnable or QTDisable packet.
6821 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6822 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6823 tracepoints.
6824 (gdb_probe): Skip data collection if static tracepoint is disabled.
6825
6826 2011-05-10 Doug Evans <dje@google.com>
6827
6828 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6829
6830 2011-05-04 Doug Evans <dje@google.com>
6831
6832 * linux-low.c (linux_join): Skip process lookup.
6833 * spu-low.c (spu_join): Ditto.
6834 * server.c (join_inferiors_callback): Delete.
6835 (process_serial_event): For 'D' packet (detach) call join_inferior
6836 directly.
6837
6838 2011-05-04 Joseph Myers <joseph@codesourcery.com>
6839
6840 * README: Don't mention xscale*-*-linux*.
6841 * configure.srv (xscale*-*-linux*): Don't handle target.
6842
6843 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6844
6845 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6846 casting pointers.
6847 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6848 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6849 (i386_emit_void_call_2): Likewise.
6850
6851 2011-04-26 Yao Qi <yao@codesourcery.com>
6852
6853 * linux-low.c: Move common macros to linux-ptrace.h.
6854 Include linux-ptrace.h.
6855 * Makefile.in (linux_ptrace_h): New.
6856 (linux-low.o): Depends on linux-ptrace.h.
6857
6858 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6859
6860 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6861 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6862 (remote_prepare): New function with most of the TCP code from ...
6863 (remote_open): ... here. Detect PORT here unconditionally. Move also
6864 setting transport_is_reliable.
6865 * server.c (run_once): New variable.
6866 (gdbserver_usage): Document it.
6867 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6868 the first run if RUN_ONCE.
6869 * server.h (run_once, remote_prepare): New declarations.
6870
6871 2011-04-19 Tom Tromey <tromey@redhat.com>
6872
6873 * win32-low.c (handle_load_dll): Remove duplicate "the".
6874
6875 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6876
6877 Remove support for old Cygwin 1.5 versions.
6878 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6879 function to avoid warning.
6880 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6881 warning.
6882
6883 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6884
6885 * gdbserver/server.h (Macro _): Define it if not available.
6886
6887 2011-03-14 Michael Snyder <msnyder@vmware.com>
6888
6889 * hostio.c (handle_close): Remove unnecessary null test.
6890
6891 2011-03-10 Joel Brobecker <brobecker@adacore.com>
6892
6893 * Makefile.in (maintainer-clean realclean distclean): Remove
6894 "make ... subdir_do" command.
6895
6896 2011-03-10 Michael Snyder <msnyder@vmware.com>
6897
6898 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6899
6900 * server.c (handle_v_run): Free alloced buffer on early return.
6901
6902 2011-03-09 Yao Qi <yao@codesourcery.com>
6903
6904 Revert:
6905 2011-03-04 Yao Qi <yao@codesourcery.com>
6906
6907 * Makefile.in: Remove GNU make feature --directory.
6908
6909 2011-03-05 Yao Qi <yao@codesourcery.com>
6910
6911 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6912 (subdir_do): New make target. Copied from gdb/Makefile.
6913 (maintainer-clean, realclean, distclean, clean): Call corresponding
6914 make targets in common/Makefile.
6915
6916 2011-02-11 Yao Qi <yao@codesourcery.com>
6917
6918 * configure.ac: Call AC_PROG_RANLIB.
6919 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6920 * configure: Regenerate.
6921
6922 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6923
6924 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6925
6926 2011-03-06 Yao Qi <yao@codesourcery.com>
6927
6928 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6929
6930 2011-03-05 Yao Qi <yao@codesourcery.com>
6931
6932 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6933 (subdir_do): New make target. Copied from gdb/Makefile.
6934 (maintainer-clean, realclean, distclean, clean): Call corresponding
6935 make targets in common/Makefile.
6936
6937 2011-03-04 Yao Qi <yao@codesourcery.com>
6938
6939 * Makefile.in: Remove GNU make feature --directory.
6940
6941 2011-03-04 Michael Snyder <msnyder@vmware.com>
6942
6943 * server.c (queue_stop_reply): Call xmalloc not malloc.
6944
6945 2011-03-02 Michael Snyder <msnyder@vmware.com>
6946
6947 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6948
6949 2011-02-28 Michael Snyder <msnyder@vmware.com>
6950
6951 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6952 (cmd_qtframe): Ditto.
6953 (cmd_qtbuffer): Ditto.
6954 (cmd_bigqtbuffer): Ditto.
6955
6956 * utils.c (decimal2str): Initialize 'width' to nine, then
6957 don't mess with it.
6958
6959 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6960
6961 * hostio.c (require_data): Free *data, not data.
6962
6963 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6964
6965 * hostio.c (require_data): Use free, not xfree.
6966
6967 2011-02-27 Michael Snyder <msnyder@vmware.com>
6968
6969 * server.c (handle_query): Discard unused value.
6970
6971 * hostio.c (require_data): Free malloc memory before returning
6972 error.
6973
6974 2011-02-26 Michael Snyder <msnyder@vmware.com>
6975
6976 * linux-low.c (list_threads): Call closedir for dirent.
6977
6978 2011-02-27 Michael Snyder <msnyder@vmware.com>
6979
6980 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
6981 a case statement falls through.
6982
6983 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
6984
6985 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
6986 in comparison.
6987
6988 2011-02-26 Michael Snyder <msnyder@vmware.com>
6989
6990 * utils.c (decimal2str): Eliminate dead code and dead param.
6991 (pulongest): Drop dead param from call to decimal2str.
6992 (plongest): Ditto.
6993
6994 2011-02-24 Joel Brobecker <brobecker@adacore.com>
6995
6996 Revert the following patch (not approved yet):
6997 2011-02-21 Hui Zhu <teawater@gmail.com>
6998 * tracepoint.c (tp_printf): New function.
6999 (eval_agent_expr): Handle gdb_agent_op_printf.
7000
7001 2011-02-21 Hui Zhu <teawater@gmail.com>
7002
7003 * tracepoint.c (tp_printf): New function.
7004 (eval_agent_expr): Handle gdb_agent_op_printf.
7005
7006 2011-02-18 Tom Tromey <tromey@redhat.com>
7007
7008 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7009 (tracepoint.o): Likewise.
7010 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7011 (gdb_agent_op_names): Likewise.
7012
7013 2011-02-18 Tom Tromey <tromey@redhat.com>
7014
7015 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7016 gdb_agent_op_rot>: New constants.
7017 (gdb_agent_op_names): Add pick and roll.
7018 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7019 cases.
7020
7021 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7022
7023 * aclocal.m4: Regenerated with aclocal-1.11.1.
7024
7025 2011-02-14 Pedro Alves <pedro@codesourcery.com>
7026
7027 * server.c (handle_qxfer_traceframe_info): New.
7028 (qxfer_packets): Register "traceframe-info".
7029 (handle_query): Report support for qXfer:traceframe-info:read+.
7030 * tracepoint.c (match_blocktype): New.
7031 (traceframe_find_block_type): Rename to ...
7032 (traceframe_walk_blocks): ... this. Add callback filter argument,
7033 and use it.
7034 (traceframe_find_block_type): New, reimplemented on top of
7035 traceframe_walk_blocks.
7036 (build_traceframe_info_xml): New.
7037 (traceframe_read_info): New.
7038 * server.h (traceframe_read_info): Declare.
7039
7040 2011-02-11 Yao Qi <yao@codesourcery.com>
7041
7042 * configure.ac: Call AC_PROG_RANLIB.
7043 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7044 * configure: Regenerate.
7045
7046 2011-02-07 Pedro Alves <pedro@codesourcery.com>
7047
7048 * server.c (gdb_read_memory): Change return semantics to allow
7049 partial transfers.
7050 (handle_search_memory_1): Adjust.
7051 (process_serial_event) <'m' packet>: Handle partial transfers.
7052 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7053
7054 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7055
7056 * regcache.c (init_register_cache): Initialize
7057 regcache->register_status.
7058 (free_register_cache): Release regcache->register_status.
7059 (regcache_cpy): Copy register_status.
7060 (registers_to_string): Print 'x's for unavailable registers.
7061 (supply_register): Mark the register's status valid or
7062 unavailable, depending on whether a buffer was passed in or not.
7063 (supply_register_zeroed): New.
7064 (supply_regblock): Mark the registers' status valid or
7065 unavailable, depending on whether a buffer was passed in or not.
7066 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7067 (struct regcache): New `register_status' field.
7068 (supply_register_zeroed): Declare.
7069 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7070 supply_register_zeroed, rather than passing a NULL buffer to
7071 supply_register.
7072 * tracepoint.c (fetch_traceframe_registers): Update comment.
7073
7074 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7075
7076 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7077 buffer explicit.
7078
7079 2011-01-25 Pedro Alves <pedro@codesourcery.com>
7080
7081 * server.h (decode_xfer_write): Change prototype.
7082 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7083 and don't extract the annex here.
7084 * server.c (decode_xfer_read): Remove `annex' parameter,
7085 and don't extract the annex here.
7086 (decode_xfer): New.
7087 (struct qxfer): New.
7088 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7089 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7090 (handle_qxfer_statictrace): New functions, abstracted out from
7091 handle_query, and made to use the struct qxfer interface.
7092 (handle_threads_qxfer_proper): Rename to ...
7093 (handle_qxfer_threads_proper): ... this.
7094 (handle_threads_qxfer): Rename to ...
7095 (handle_qxfer_threads): ... this. Adjust.
7096 (qxfer_packets): New array.
7097 (handle_qxfer): New function.
7098 (handle_query): Use handle_qxfer.
7099
7100 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7101
7102 * gdbreplay.c: Shorten lines of >= 80 columns.
7103 * linux-low.c: Ditto.
7104 * linux-ppc-low.c: Ditto.
7105 * linux-s390-low.c: Ditto.
7106 * linux-sparc-low.c: Ditto.
7107 * linux-x86-low.c: Ditto.
7108 * linux-xtensa-low.c: Ditto.
7109 * mem-break.c: Ditto.
7110 * nto-low.c: Ditto.
7111 * regcache.h: Ditto.
7112 * remote-utils.c: Ditto.
7113 * server.c: Ditto.
7114 * server.h: Ditto.
7115 * thread-db.c: Ditto.
7116 * tracepoint.c: Ditto.
7117 * utils.c: Ditto.
7118 * win32-low.h: Ditto.
7119
7120 2011-01-05 Joel Brobecker <brobecker@adacore.com>
7121
7122 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7123 update.
7124
7125 2011-01-01 Joel Brobecker <brobecker@adacore.com>
7126
7127 * server.c (gdbserver_version): Update copyright year in version
7128 output.
7129 * gdbreplay.c (gdbreplay_version): Ditto.
7130
7131 2010-12-29 Jie Zhang <jie.zhang@analog.com>
7132
7133 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7134 * linux-bfin-low.c: New file.
7135 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7136 PT_DATA_ADDR for BFIN targets.
7137 * Makefile.in (SFILES): Add linux-bfin-low.c.
7138 (clean): Remove reg-bfin.c.
7139 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7140 * README: Mention supported Blackfin targets.
7141
7142 2010-12-23 Mike Frysinger <vapier@gentoo.org>
7143
7144 * .gitignore: New file.
7145
7146 2010-11-16 Mike Frysinger <vapier@gentoo.org>
7147
7148 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7149
7150 2010-10-22 Jie Zhang <jie@codesourcery.com>
7151
7152 * Makefile.in: Add FLAGS_TO_PASS variable.
7153 (install): Remove dependency of install-only and recursively
7154 invoke make for install-only.
7155
7156 2010-10-04 Doug Evans <dje@google.com>
7157
7158 * Makefile.in (uninstall): Use $(DESTDIR).
7159
7160 2010-09-24 Pedro Alves <pedro@codesourcery.com>
7161
7162 PR gdb/11842
7163
7164 * linux-x86-low.c (compat_siginfo_from_siginfo)
7165 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7166 si_code is < 0. Check for si_code == SI_TIMER before checking for
7167 si_code < 0.
7168
7169 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7170
7171 * lynx-i386-low.c: New file.
7172 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7173
7174 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7175
7176 * lynx-low.c (ptrace_request_to_str): Remove handling for
7177 request values that have been removed in LynxOS 5.x.
7178
7179 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7180
7181 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7182 <ptrace.h>
7183
7184 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7185
7186 * configure.ac: Add --enable-inprocess-agent option.
7187 * configure: Rebuilt.
7188
7189 2010-09-06 Yao Qi <yao@codesourcery.com>
7190
7191 * linux-low.c (linux_kill): Remove unused variable.
7192 (linux_stabilize_threads): Likewise.
7193 * server.c (start_inferior): Likewise.
7194 (queue_stop_reply_callback): Likewise.
7195 * tracepoint.c (do_action_at_tracepoint): Likewise.
7196
7197 2010-09-06 Yao Qi <yao@codesourcery.com>
7198
7199 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7200 on return.
7201
7202 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7203
7204 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7205
7206 2010-09-06 Pedro Alves <pedro@codesourcery.com>
7207
7208 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7209 "$(IPA_DEPFILES)".
7210
7211 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7212
7213 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7214 gdbserver/lynx-ppc-low.c: New files.
7215 * Makefile.in (lynx_low_h): New variable.
7216 (lynx-low.o, lynx-ppc-low.o): New rules.
7217 * configure.ac: On LynxOS, link with -lnetinet.
7218 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7219 * configure: regenerate.
7220
7221 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7222
7223 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7224 * configure.ac: Add check for vasprintf and vsnprintf.
7225 * configure, config.in: Regenerate.
7226 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7227
7228 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7229
7230 * gdbreplay.c: Move include of alloca.h up, next to include of
7231 malloc.h.
7232 * server.h: Add include of malloc.h.
7233 * mem-break.c: Remove include of malloc.h.
7234 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7235
7236 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7237
7238 * Makefile.in (memmem.o): Build with -Wno-error.
7239
7240 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7241
7242 * utils.c (xsnprintf): Make non-static.
7243 * server.h: Add xsnprintf declaration.
7244 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7245 replace calls to snprintf by calls to xsnprintf throughout.
7246
7247 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7248
7249 * configure.ac: Add configure check for alloca.
7250 * configure, config.in: Regenerate.
7251 * server.h: Include alloca.h if it exists.
7252 * gdbreplay.c: Include alloca.h if it exists.
7253
7254 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7255
7256 * linux-low.c (__SIGRTMIN): Define if not already defined.
7257 (linux_create_inferior): Check for __ANDROID__ rather than
7258 __SIGRTMIN.
7259 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7260 are already deferred.
7261 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7262 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7263 stopped and already has a pending signal to report.
7264 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7265 a pending signal to report or is moving out of a jump pad.
7266 (linux_init_signals): Check for __ANDROID__ rather than
7267 __SIGRTMIN.
7268
7269 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7270
7271 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7272 debug_threads check. Avoid a linear search when not doing debug
7273 output.
7274
7275 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7276
7277 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7278 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7279 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7280 (process_event): Change local fd's type to gdb_fildes_t.
7281 (create_file_handler): Adjust prototype.
7282 (delete_file_handler): Adjust prototype.
7283 (handle_file_event): Adjust prototype. Use pfildes.
7284 (create_file_event): Adjsut prototype.
7285 * remote-utils.c (remote_desc, listen_desc): Change type to
7286 gdb_fildes_t.
7287 * server.h: New gdb_fildes_t typedef.
7288 [USE_WIN32API]: Include winsock2.h.
7289 (delete_file_handler, add_file_handler): Adjust prototypes.
7290 (pfildes): Declare.
7291 * utils.c (pfildes): New.
7292
7293 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7294
7295 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7296 * configure: Regenerate.
7297
7298 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7299
7300 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7301 (linux_done_accessing_memory): ... this.
7302 (linux_target_ops): Adjust.
7303 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7304 * nto-low.c (nto_target_ops): Adjust comment.
7305 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7306 * spu-low.c (spu_target_ops): Adjust comment.
7307 * target.h (target_ops): Rename unprepare_to_access_memory field
7308 to done_accessing_memory.
7309 (unprepare_to_access_memory): Rename to ...
7310 (done_accessing_memory): ... this.
7311
7312 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7313
7314 * linux-low.c (linux_prepare_to_access_memory): New.
7315 (linux_unprepare_to_access_memory): New.
7316 (linux_target_ops): Install them.
7317 * server.c (read_memory): Rename to ...
7318 (gdb_read_memory): ... this. Use
7319 prepare_to_access_memory/prepare_to_access_memory.
7320 (write_memory): Rename to ...
7321 (gdb_write_memory): ... this. Use
7322 prepare_to_access_memory/prepare_to_access_memory.
7323 (handle_search_memory_1): Adjust.
7324 (process_serial_event): Adjust.
7325 * target.h (struct target_ops): New fields
7326 prepare_to_access_memory and unprepare_to_access_memory.
7327 (prepare_to_access_memory, unprepare_to_access_memory): New.
7328 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7329 prepare_to_access_memory/prepare_to_access_memory.
7330 * nto-low.c (nto_target_ops): Adjust.
7331 * spu-low.c (spu_target_ops): Adjust.
7332 * win32-low.c (win32_target_ops): Adjust.
7333
7334 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7335
7336 * Makefile.in (WARN_CFLAGS): Get it from configure.
7337 (WERROR_CFLAGS): New.
7338 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7339 * configure.ac: Introduce --enable-werror, which adds -Werror to
7340 the compiler command line. Enabled by default. Disable with
7341 --disable-werror. Add -Wdeclaration-after-statement
7342 Wpointer-arith and -Wformat-nonliteral to warning flags.
7343 * configure: Regenerate.
7344
7345 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7346
7347 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7348
7349 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7350
7351 * gdbreplay.c (remote_error): New.
7352 (gdbchar): New.
7353 (expect): Use gdbchar. Check for error reading from GDB.
7354 Clarify sync error output.
7355 (play): Check for errors writing to GDB.
7356 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7357 * remote-utils.c (getpkt): Check for errors writing to the remote
7358 descriptor.
7359
7360 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7361
7362 * linux-low.c (linux_wait_1): Move non-debugging code out of
7363 `debug_threads' control.
7364
7365 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7366
7367 * linux-low.c (linux_wait_1): Don't set last_status here.
7368 * server.c (push_event, queue_stop_reply_callback): Assert we're
7369 not pushing a TARGET_WAITKIND_IGNORE event.
7370 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7371 (myresume, handle_target_event): Set the thread's last_resume_kind
7372 and last_status from the target returned status.
7373
7374 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7375
7376 PR threads/10729
7377
7378 * linux-x86-low.c (update_debug_registers_callback): New.
7379 (i386_dr_low_set_addr): Use it.
7380 (i386_dr_low_get_addr): New.
7381 (i386_dr_low_set_control): Use update_debug_registers_callback.
7382 (i386_dr_low_get_control): New.
7383 (i386_dr_low_get_status): Adjust.
7384 * linux-low.c (linux_stop_lwp): New.
7385 * linux-low.h (linux_stop_lwp): Declare.
7386
7387 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7388 argument instead of a i386_debug_reg_state.
7389 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7390 a i386_debug_reg_state.
7391 (i386_insert_aligned_watchpoint): Adjust.
7392 (i386_remove_aligned_watchpoint): Adjust.
7393 (i386_low_stopped_data_address): Read the debug registers from the
7394 inferior instead of from the mirrors.
7395 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7396 (i386_dr_low_get_addr): Declare.
7397 (i386_dr_low_get_control): Declare.
7398 (i386_dr_low_get_status): Change prototype.
7399
7400 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7401 (i386_dr_low_get_addr): New.
7402 (i386_dr_low_get_control): New.
7403 (i386_dr_low_get_status): Adjust prototype. Return
7404 dr_status_mirror.
7405 (i386_initial_stuff): Clear dr_status_mirror and
7406 dr_control_mirror.
7407 (i386_get_thread_context): Adjust.
7408 (i386_set_thread_context): Adjust.
7409 (i386_thread_added): Adjust.
7410
7411 2010-08-24 Pedro Alves <pedro@codesourcery.com>
7412
7413 * linux-low.h (linux_thread_area): Delete declaration.
7414
7415 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7416
7417 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7418 after its termination.
7419
7420 2010-08-09 Pedro Alves <pedro@codesourcery.com>
7421
7422 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7423 (gdb_wants_all_stopped): Delete.
7424 (linux_wait_1): Don't call them.
7425 * server.c (handle_v_cont): Tag all threads as want-stopped.
7426 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7427 stopped as "client-wants-stopped".
7428
7429 2010-07-31 Pedro Alves <pedro@codesourcery.com>
7430
7431 * Makefile.in (signals_h): New.
7432 (server_h): Depend on it.
7433 (server.o): Don't depend on $(signals_def).
7434 (signals.o): Depend on $(signals_def).
7435
7436 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7437
7438 * Makefile.in (signals_def): New.
7439 (server_h): Append include/gdb/signals.h and signals_def.
7440 (server.o): Append signals_def.
7441
7442 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7443
7444 * server.c (handle_target_event): Use target_signal_to_host for
7445 resume_info.sig initialization.
7446 * target.h (struct thread_resume) <sig>: New comment.
7447
7448 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7449
7450 * server.c (handle_query): strcpy() the returned string from paddress()
7451 instead of sprintf().
7452 * utils.c (paddress): Return phex_nz().
7453
7454 2010-07-07 Joel Brobecker <brobecker@adacore.com>
7455
7456 * server.c (handle_v_cont): Call mourn_inferior if process
7457 just exited.
7458 (myresume): Likewise.
7459
7460 2010-07-01 Pedro Alves <pedro@codesourcery.com>
7461
7462 Static tracepoints, and integration with UST.
7463
7464 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7465 * mem-break.c (uninsert_all_breakpoints)
7466 (reinsert_all_breakpoints): New.
7467 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7468 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7469 (gdb_agent_ust_loaded, helper_thread_id)
7470 (gdb_agent_helper_thread_id): New macros.
7471 (struct ipa_sym_addresses): Add addr_ust_loaded,
7472 addr_helper_thread_id, addr_cmd_buf.
7473 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7474 (in_process_agent_loaded_ust): New.
7475 (write_e_ust_not_loaded): New.
7476 (maybe_write_ipa_ust_not_loaded): New.
7477 (struct collect_static_trace_data_action): New.
7478 (enum tracepoint_type) <static_tracepoint>: New.
7479 (struct tracepoint) <handle>: Mention static tracepoints.
7480 (struct static_tracepoint_ctx): New.
7481 (CMD_BUF_SIZE): New.
7482 (add_tracepoint_action): Handle static tracepoint actions.
7483 (unprobe_marker_at): New.
7484 (clear_installed_tracepoints): Handle static tracepoints.
7485 (cmd_qtdp): Handle static tracepoints.
7486 (probe_marker_at): New.
7487 (cmd_qtstart): Handle static tracepoints.
7488 (response_tracepoint): Handle static tracepoints.
7489 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7490 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7491 (get_context_regcache): Handle static tracepoints.
7492 (do_action_at_tracepoint): Handle static tracepoint actions.
7493 (traceframe_find_block_type): Handle static trace data blocks.
7494 (traceframe_read_sdata): New.
7495 (download_tracepoints): Download static tracepoint actions.
7496 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7497 (GDB_PROBE_NAME): New.
7498 (ust_ops): New.
7499 (GET_UST_SYM): New.
7500 (USTF): New.
7501 (dlsym_ust): New.
7502 (ust_marker_to_static_tracepoint): New.
7503 (gdb_probe): New.
7504 (collect_ust_data_at_tracepoint): New.
7505 (gdb_ust_probe): New.
7506 (UNIX_PATH_MAX, SOCK_DIR): New.
7507 (gdb_ust_connect_sync_socket): New.
7508 (resume_thread, stop_thread): New.
7509 (run_inferior_command): New.
7510 (init_named_socket): New.
7511 (gdb_ust_socket_init): New.
7512 (cstr_to_hexstr): New.
7513 (next_st): New.
7514 (first_marker, next_marker): New.
7515 (response_ust_marker): New.
7516 (cmd_qtfstm, cmd_qtsstm): New.
7517 (unprobe_marker_at, probe_marker_at): New.
7518 (cmd_qtstmat, gdb_ust_thread): New.
7519 (gdb_ust_init): New.
7520 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7521 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7522 (ST_REGENTRY): New.
7523 (x86_64_st_collect_regmap): New.
7524 (X86_64_NUM_ST_COLLECT_GREGS): New.
7525 (AMD64_RIP_REGNUM): New.
7526 (supply_static_tracepoint_registers): New.
7527 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7528 (ST_REGENTRY): New.
7529 (i386_st_collect_regmap): New.
7530 (i386_NUM_ST_COLLECT_GREGS): New.
7531 (supply_static_tracepoint_registers): New.
7532 * server.c (handle_query): Handle qXfer:statictrace:read.
7533 <qSupported>: Report support for StaticTracepoints, and
7534 qXfer:statictrace:read features.
7535 * server.h (traceframe_read_sdata)
7536 (supply_static_tracepoint_registers): Declare.
7537 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7538 (unpack_varlen_hex): Include in IPA build.
7539 * Makefile.in (ustlibs, ustinc): New.
7540 (IPA_OBJS): Add remote-utils-ipa.o.
7541 ($(IPA_LIB)): Link -ldl and -lpthread.
7542 (UST_CFLAGS): New.
7543 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7544 * config.in, configure: Regenerate.
7545
7546 2010-06-20 Ian Lance Taylor <iant@google.com>
7547 Pedro Alves <pedro@codesourcery.com>
7548
7549 * linux-x86-low.c (always_true): Delete.
7550 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7551 trying to fool the compiler with always_true.
7552
7553 2010-06-20 Pedro Alves <pedro@codesourcery.com>
7554
7555 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7556 conditions in gdbserver.
7557
7558 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7559
7560 * spu-low.c (spu_read_memory): Wrap around local store limit.
7561 (spu_write_memory): Likewise.
7562
7563 2010-06-15 Pedro Alves <pedro@codesourcery.com>
7564
7565 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7566 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7567 LONGEST uses.
7568 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7569 uses.
7570 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7571 uses with LONGEST uses.
7572
7573 2010-06-14 Stan Shebs <stan@codesourcery.com>
7574 Pedro Alves <pedro@codesourcery.com>
7575
7576 Bytecode compiler.
7577
7578 * linux-x86-low.c: Include limits.h.
7579 (add_insns): New.
7580 (always_true): New.
7581 (EMIT_ASM): New.
7582 (EMIT_ASM32): New.
7583 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7584 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7585 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7586 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7587 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7588 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7589 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7590 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7591 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7592 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7593 (amd64_emit_void_call_2): New.
7594 (amd64_emit_ops): New.
7595 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7596 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7597 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7598 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7599 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7600 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7601 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7602 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7603 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7604 (i386_emit_stack_adjust, i386_emit_int_call_1)
7605 (i386_emit_void_call_2): New.
7606 (i386_emit_ops): New.
7607 (x86_emit_ops): New.
7608 (the_low_target): Install x86_emit_ops.
7609 * server.h (struct emit_ops): New.
7610 (get_raw_reg_func_addr): Declare.
7611 (current_insn_ptr, emit_error): Declare.
7612 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7613 (set_trace_state_variable_value): New defines.
7614 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7615 addr_get_trace_state_variable_value and
7616 addr_set_trace_state_variable_value.
7617 (symbol_list): New fields for get_raw_reg,
7618 get_trace_state_variable_value and set_trace_state_variable_value.
7619 (condfn): New typedef.
7620 (struct tracepoint): New field `compiled_cond'.
7621 (do_action_at_tracepoint): Clear compiled_cond.
7622 (get_trace_state_variable_value, set_trace_state_variable_value):
7623 Export in the IPA.
7624 (condition_true_at_tracepoint): If there's a compiled condition,
7625 run that.
7626 (current_insn_ptr, emit_error): New globals.
7627 (struct bytecode_address): New.
7628 (get_raw_reg_func_addr): New.
7629 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7630 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7631 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7632 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7633 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7634 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7635 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7636 (compile_tracepoint_condition, compile_bytecodes): New.
7637 * target.h (emit_ops): Forward declare.
7638 (struct target_ops): New field emit_ops.
7639 (target_emit_ops): New.
7640 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7641 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7642 * linux-low.c (linux_emit_ops): New.
7643 (linux_target_ops): Install it.
7644 * linux-low.h (struct linux_target_ops): New field emit_ops.
7645
7646 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7647
7648 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7649 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7650
7651 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7652 Stan Shebs <stan@codesourcery.com>
7653
7654 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7655 (all): Depend on $(extra_libraries).
7656 (install-only): Install the IPA.
7657 (IPA_OBJS, IPA_LIB): New.
7658 (clean): Remove the IPA lib.
7659 (IPAGENT_CFLAGS): New.
7660 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7661 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7662 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7663 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7664 * configure.ac: Check for atomic builtins support in the compiler.
7665 (IPA_DEPFILES, extra_libraries): Define.
7666 * configure.srv (ipa_obj): Add description.
7667 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7668 (i[34567]86-*-linux*): Set ipa_obj.
7669 (x86_64-*-linux*): Set ipa_obj.
7670 * linux-low.c (stabilizing_threads): New.
7671 (supports_fast_tracepoints): New.
7672 (linux_detach): Stabilize threads before detaching.
7673 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7674 the lwp is either not stabilizing, or is moving out of a jump pad.
7675 (linux_fast_tracepoint_collecting): New.
7676 (maybe_move_out_of_jump_pad): New.
7677 (enqueue_one_deferred_signal): New.
7678 (dequeue_one_deferred_signal): New.
7679 (linux_wait_for_event_1): If moving out of a jump pad, defer
7680 pending signals to later.
7681 (linux_stabilize_threads): New.
7682 (linux_wait_1): Check if threads need moving out of jump pads, and
7683 do it if so.
7684 (stuck_in_jump_pad_callback): New.
7685 (move_out_of_jump_pad_callback): New.
7686 (lwp_running): New.
7687 (linux_resume_one_lwp): Handle moving out of jump pads.
7688 (linux_set_resume_request): Dequeue deferred signals.
7689 (need_step_over_p): Also step over fast tracepoint jumps.
7690 (start_step_over): Also uninsert fast tracepoint jumps.
7691 (finish_step_over): Also reinsert fast tracepoint jumps.
7692 (linux_install_fast_tracepoint_jump): New.
7693 (linux_target_ops): Install linux_stabilize_threads and
7694 linux_install_fast_tracepoint_jump_pad.
7695 * linux-low.h (linux_target_ops) <get_thread_area,
7696 install_fast_tracepoint_jump_pad>: New fields.
7697 (struct lwp_info) <collecting_fast_tracepoint,
7698 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7699 (linux_get_thread_area): Declare.
7700 * linux-x86-low.c (jump_insn): New.
7701 (x86_get_thread_area): New.
7702 (append_insns): New.
7703 (push_opcode): New.
7704 (amd64_install_fast_tracepoint_jump_pad): New.
7705 (i386_install_fast_tracepoint_jump_pad): New.
7706 (x86_install_fast_tracepoint_jump_pad): New.
7707 (the_low_target): Install x86_get_thread_area and
7708 x86_install_fast_tracepoint_jump_pad.
7709 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7710 (struct fast_tracepoint_jump): New.
7711 (fast_tracepoint_jump_insn): New.
7712 (fast_tracepoint_jump_shadow): New.
7713 (find_fast_tracepoint_jump_at): New.
7714 (fast_tracepoint_jump_here): New.
7715 (delete_fast_tracepoint_jump): New.
7716 (set_fast_tracepoint_jump): New.
7717 (uninsert_fast_tracepoint_jumps_at): New.
7718 (reinsert_fast_tracepoint_jumps_at): New.
7719 (set_breakpoint_at): Use write_inferior_memory.
7720 (uninsert_raw_breakpoint): Use write_inferior_memory.
7721 (check_mem_read): Mask out fast tracepoint jumps.
7722 (check_mem_write): Mask out fast tracepoint jumps.
7723 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7724 (set_fast_tracepoint_jump): Declare.
7725 (delete_fast_tracepoint_jump)
7726 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7727 (reinsert_fast_tracepoint_jumps_at): Declare.
7728 * regcache.c: Don't compile many functions when building the
7729 in-process agent library.
7730 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7731 the register buffer in the heap.
7732 (free_register_cache): If the register buffer isn't owned by the
7733 regcache, don't free it.
7734 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7735 pre-existing register caches.
7736 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7737 type.
7738 (convert_ascii_to_int): : Constify `from' parameter type.
7739 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7740 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7741 the needed buffer in-place.
7742 (relocate_instruction): New.
7743 * server.c (handle_query) <qSymbols>: If the target supports
7744 tracepoints, give it a chance of looking up symbols. Report
7745 support for fast tracepoints.
7746 (handle_status): Stabilize threads.
7747 (process_serial_event): Adjust.
7748 * server.h (struct fast_tracepoint_jump): Forward declare.
7749 (struct process_info) <fast_tracepoint_jumps>: New field.
7750 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7751 (decode_X_packet, decode_M_packet): Adjust.
7752 (relocate_instruction): Declare.
7753 (in_process_agent_loaded): Declare.
7754 (tracepoint_look_up_symbols): Declare.
7755 (struct fast_tpoint_collect_status): Declare.
7756 (fast_tracepoint_collecting): Declare.
7757 (force_unlock_trace_buffer): Declare.
7758 (handle_tracepoint_bkpts): Declare.
7759 (initialize_low_tracepoint)
7760 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7761 * target.h (struct target_ops) <stabilize_threads,
7762 install_fast_tracepoint_jump_pad>: New fields.
7763 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7764 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7765 [HAVE_STDINT_H]: Include stdint.h.
7766 (trace_debug_1): Rename to ...
7767 (trace_vdebug): ... this.
7768 (trace_debug): Rename to ...
7769 (trace_debug_1): ... this. Add `level' parameter.
7770 (trace_debug): New.
7771 (ATTR_USED, ATTR_NOINLINE): New.
7772 (IP_AGENT_EXPORT): New.
7773 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7774 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7775 (about_to_request_buffer_space, trace_buffer_is_full)
7776 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7777 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7778 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7779 (traceframe_write_count, traceframes_created)
7780 (trace_state_variables)
7781 New renaming defines.
7782 (struct ipa_sym_addresses): New.
7783 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7784 (symbol_list): New.
7785 (ipa_sym_addrs): New.
7786 (all_tracepoint_symbols_looked_up): New.
7787 (in_process_agent_loaded): New.
7788 (write_e_ipa_not_loaded): New.
7789 (maybe_write_ipa_not_loaded): New.
7790 (tracepoint_look_up_symbols): New.
7791 (debug_threads) [IN_PROCESS_AGENT]: New.
7792 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7793 (UNKNOWN_SIDE_EFFECTS): New.
7794 (stop_tracing): New.
7795 (flush_trace_buffer): New.
7796 (stop_tracing_bkpt): New.
7797 (flush_trace_buffer_bkpt): New.
7798 (read_inferior_integer): New.
7799 (read_inferior_uinteger): New.
7800 (read_inferior_data_pointer): New.
7801 (write_inferior_data_pointer): New.
7802 (write_inferior_integer): New.
7803 (write_inferior_uinteger): New.
7804 (struct collect_static_trace_data_action): Delete.
7805 (enum tracepoint_type): New.
7806 (struct tracepoint) <type>: New field `type'.
7807 <actions_str, step_actions, step_actions_str>: Only include in
7808 GDBserver.
7809 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7810 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7811 (tracepoints): Use IP_AGENT_EXPORT.
7812 (last_tracepoint): Don't include in the IPA.
7813 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7814 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7815 (alloced_trace_state_variables): New.
7816 (trace_state_variables): Use IP_AGENT_EXPORT.
7817 (traceframe_t): Delete unused variable.
7818 (circular_trace_buffer): Don't include in the IPA.
7819 (trace_buffer_start): Delete.
7820 (struct trace_buffer_control): New.
7821 (trace_buffer_free): Delete.
7822 (struct ipa_trace_buffer_control): New.
7823 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7824 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7825 New.
7826 (trace_buffer_ctrl): New.
7827 (TRACE_BUFFER_CTRL_CURR): New.
7828 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7829 Reimplement as macros.
7830 (trace_buffer_wrap): Delete.
7831 (traceframe_write_count, traceframe_read_count)
7832 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7833 (struct tracepoint_hit_ctx) <type>: New field.
7834 (struct fast_tracepoint_ctx): New.
7835 (memory_barrier): New.
7836 (cmpxchg): New.
7837 (record_tracepoint_error): Update atomically in the IPA.
7838 (clear_inferior_trace_buffer): New.
7839 (about_to_request_buffer_space): New.
7840 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7841 updating the same buffer.
7842 (add_tracepoint): Default the tracepoint's type to trap
7843 tracepoint, and orig_size to -1.
7844 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7845 internal variables.
7846 (create_trace_state_variable): New parameter `gdb'. Handle it.
7847 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7848 (cmd_qtdp): Handle fast tracepoints.
7849 (cmd_qtdv): Adjust.
7850 (max_jump_pad_size): New.
7851 (gdb_jump_pad_head): New.
7852 (get_jump_space_head): New.
7853 (claim_jump_space): New.
7854 (sort_tracepoints): New.
7855 (MAX_JUMP_SIZE): New.
7856 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7857 IPA.
7858 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7859 support. Upload fast traceframes, and delete internal IPA
7860 breakpoints.
7861 (stop_tracing_handler): New.
7862 (flush_trace_buffer_handler): New.
7863 (cmd_qtstop): Upload fast tracepoints.
7864 (response_tracepoint): Handle fast tracepoints.
7865 (tracepoint_finished_step): Upload fast traceframes. Set the
7866 tracepoint hit context's tracepoint type.
7867 (handle_tracepoint_bkpts): New.
7868 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7869 type. Add comment about fast tracepoints.
7870 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7871 non-existing action_str field.
7872 (get_context_regcache): Handle fast tracepoints.
7873 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7874 to the regcache.
7875 (fast_tracepoint_from_jump_pad_address): New.
7876 (fast_tracepoint_from_ipa_tpoint_address): New.
7877 (collecting_t): New.
7878 (force_unlock_trace_buffer): New.
7879 (fast_tracepoint_collecting): New.
7880 (collecting): New.
7881 (gdb_collect): New.
7882 (write_inferior_data_ptr): New.
7883 (target_tp_heap): New.
7884 (target_malloc): New.
7885 (download_agent_expr): New.
7886 (UALIGN): New.
7887 (download_tracepoints): New.
7888 (download_trace_state_variables): New.
7889 (upload_fast_traceframes): New.
7890 (IPA_FIRST_TRACEFRAME): New.
7891 (IPA_NEXT_TRACEFRAME_1): New.
7892 (IPA_NEXT_TRACEFRAME): New.
7893 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7894 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7895 (gdb_jump_pad_buffer_end): New.
7896 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7897 (initialize_tracepoint): Adjust.
7898 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7899 buffer. Initialize the low module.
7900 * utils.c (PREFIX, TOOLNAME): New.
7901 (malloc_failure): Use PREFIX.
7902 (error): In the IPA, an error causes an exit.
7903 (fatal, warning): Use PREFIX.
7904 (internal_error): Use TOOLNAME.
7905 (NUMCELLS): Increase to 10.
7906 * configure, config.in: Regenerate.
7907
7908 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7909
7910 * server.c (handle_query) <qSupported>: Do two passes over the
7911 qSupported string to avoid nesting strtok.
7912
7913 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7914
7915 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7916 (CDEPS): New.
7917 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7918 -Wl,--dynamic-list.
7919 * configure: Regenerate.
7920 * proc-service.list: New.
7921
7922 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7923
7924 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7925 New comment.
7926
7927 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
7928
7929 * gdbreplay.c (remote_open): Check error return from socket() call by
7930 its equality to -1 not by it being negative.
7931 * remote-utils.c (remote_open): Likewise.
7932
7933 2010-05-23 Pedro Alves <pedro@codesourcery.com>
7934
7935 * config.h: Regenerate.
7936
7937 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7938
7939 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7940 doesn't provide PTRACE_GET_THREAD_AREA.
7941
7942 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7943
7944 * linux-m68k-low.c: Include <asm/ptrace.h>
7945 (ps_get_thread_area): Implement.
7946
7947 2010-05-03 Doug Evans <dje@google.com>
7948
7949 * event-loop.c (struct callback_event): New struct.
7950 (callback_list): New global.
7951 (append_callback_event, delete_callback_event): New functions.
7952 (process_callback): New function.
7953 (start_event_loop): Call it.
7954 * remote-utils.c (NOT_SCHEDULED): Define.
7955 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
7956 moved out of readchar.
7957 (readchar): Rewrite. Call reschedule before returning.
7958 (reset_readchar): New function.
7959 (remote_close): Call it.
7960 (process_remaining, reschedule): New functions.
7961 * server.h (callback_handler_func): New typedef.
7962 (append_callback_event, delete_callback_event): Declare.
7963
7964 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7965
7966 * proc-service.c (ps_pglobal_lookup): Use
7967 thread_db_look_up_one_symbol.
7968 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
7969 parameter. Use it instead of all_symbols_looked_up.
7970 * server.h (struct process_info) <all_symbols_looked_up>: Delete
7971 field.
7972 (all_symbols_looked_up): Don't declare.
7973 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
7974 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
7975 field.
7976 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
7977 Set all_symbols_looked_up here.
7978 (thread_db_look_up_one_symbol): New.
7979 (thread_db_get_tls_address): Adjust.
7980 (thread_db_load_search, try_thread_db_load_1): Always allocate the
7981 thread_db object on the heap, and tentatively set it in the
7982 process structure.
7983 (thread_db_init): Don't set all_symbols_looked_up here.
7984 * linux-low.h (thread_db_look_up_one_symbol): Declare.
7985
7986 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7987
7988 * linux-low.c (linux_kill, linux_detach): Adjust.
7989 (status_pending_p_callback): Remove redundant statement. Check
7990 for !TARGET_WAITIKIND_IGNORE, instead of
7991 TARGET_WAITKIND_STOPPED.
7992 (handle_tracepoints): Make sure LWP is locked. Adjust.
7993 (linux_wait_for_event_1): Adjust.
7994 (linux_cancel_breakpoints): New.
7995 (unsuspend_one_lwp): New.
7996 (unsuspend_all_lwps): New.
7997 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
7998 (send_sigstop_callback): Change return type to int, add new
7999 `except' parameter and handle it.
8000 (suspend_and_send_sigstop_callback): New.
8001 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8002 pass them down. If SUSPEND, also increment the lwp's suspend
8003 count.
8004 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8005 (need_step_over_p): Don't consider suspended LWPs.
8006 (start_step_over): Adjust.
8007 (proceed_one_lwp): Change return type to int, add new `except'
8008 parameter and handle it.
8009 (unsuspend_and_proceed_one_lwp): New.
8010 (proceed_all_lwps): Use find_inferior instead of
8011 for_each_inferior.
8012 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8013 also decrement the suspend count of LWPs. Pass `except' down,
8014 instead of hacking its suspend count.
8015 (linux_pause_all): Add `freeze' parameter. Adjust.
8016 (linux_unpause_all): New.
8017 (linux_target_ops): Install linux_unpause_all.
8018 * server.c (handle_status): Adjust.
8019 * target.h (struct target_ops): New fields `unpause_all' and
8020 `cancel_breakpoints'. Add new parameter to `pause_all'.
8021 (pause_all): Add new `freeze' parameter.
8022 (unpause_all): New.
8023 (cancel_breakpoints): New.
8024 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8025 cancel breakpoints.
8026 (cmd_qtstart): Pause threads.
8027 (stop_tracing): Pause threads, and cancel breakpoints.
8028 * win32-low.c (win32_target_ops): Adjust.
8029
8030 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8031
8032 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8033 the inferior right away from here...
8034 (linux_wait_1): ... to here, and adjust to check the thread's
8035 last_resume_kind instead of the lwp's step or stop_expected flags.
8036
8037 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8038
8039 * README: Use consistent `GDB' and `GDBserver' spellings.
8040
8041 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8042
8043 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8044 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8045 (linux_detach_one_lwp): Assume the lwp is stopped.
8046 (any_thread_of): Delete.
8047 (linux_detach): Stop all lwps here. Don't blindly delete all
8048 breakpoints.
8049 (delete_lwp_callback): New.
8050 (linux_mourn): Delete all lwps of the process that is gone.
8051 (linux_wait_1): Don't delete the last lwp of the process here.
8052 * mem-break.h (mark_breakpoints_out): Declare.
8053 * mem-break.c (mark_breakpoints_out): New.
8054 (free_all_breakpoints): Use it.
8055 * server.c (handle_target_event): If the process is gone, mark
8056 breakpoints out.
8057 * thread-db.c (struct thread_db) <create_bp>: New field.
8058 (thread_db_enable_reporting): Fix prototype. Store a thread event
8059 breakpoint reference in the thread_db struct.
8060 (thread_db_load_search): Clear the thread_db object.
8061 (try_thread_db_load_1): Ditto.
8062 (switch_to_process): New.
8063 (disable_thread_event_reporting): Use it.
8064 (remove_thread_event_breakpoints): New.
8065 (thread_db_detach, thread_db_mourn): Use it.
8066
8067 2010-05-01 Pedro Alves <pedro@codesourcery.com>
8068
8069 * linux-low.c (linux_enable_event_reporting): New.
8070 (linux_wait_for_event_1, handle_extended_wait): Use it.
8071
8072 2010-04-30 Pedro Alves <pedro@codesourcery.com>
8073
8074 * linux-low.c (linux_kill_one_lwp, linux_kill)
8075 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8076 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8077 SIGSTOP even if the LWP is stopped.
8078 (send_sigstop_callback): New.
8079 (stop_all_lwps): Use send_sigstop_callback instead.
8080 (linux_resume_one_thread): Adjust.
8081 (proceed_one_lwp): Still proceed an LWP that the client has
8082 requested to stop, if we haven't reported it as stopped yet. Make
8083 sure that LWPs the client want stopped, have a pending SIGSTOP.
8084
8085 2010-04-26 Doug Evans <dje@google.com>
8086
8087 * server.c (handle_general_set): Make static.
8088
8089 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8090 Print received char after testing for error/eof instead of before.
8091 (input_interrupt): Tweak comment.
8092
8093 2010-04-23 Doug Evans <dje@google.com>
8094
8095 * server.c (start_inferior): Print inferior argv if --debug.
8096
8097 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8098
8099 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8100 * nto-x86-low.c: Include server.h
8101
8102 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8103
8104 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8105 be consistent with other sources of this directory.
8106 (init_registers_amd64): Correct name of source file of this function
8107 in the comment.
8108
8109 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8110
8111 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8112 64-bit executables.
8113
8114 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8115
8116 * win32-i386-low.c: Add 64-bit support.
8117 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8118 (init_registers_amd64): Declare.
8119 (mappings): Add 64-bit version of array.
8120 (init_windows_x86): New function.
8121 (the_low_target): Change init_arch field to init_windows_x86.
8122
8123 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8124
8125 * win32-low.c: Adapt to support also 64-bit architecture.
8126 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8127 (get_image_name): Use SIZE_T type for local variable `done'.
8128 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8129 (toolhelp_get_dll_name): Idem.
8130 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8131 Use uintptr_t typecast to avoid warning.
8132 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8133 (handle_exception): Use phex_nz to avoid warning.
8134 (win32_wait): Remove unused local variable `process'.
8135
8136 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8137
8138 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8139 `amd64-avx.o'.
8140
8141 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8142
8143 * configure.ac: Use `ws2_32' library for srv_mingw.
8144 * configure: Regenerate.
8145 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8146 * remote-utils.c: Likewise.
8147
8148 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8149
8150 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8151 if __x86_64__ is defined.
8152
8153 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8154
8155 * configure: Regenerate.
8156
8157 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8158
8159 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8160 * target.h (target_ops): New get_tib_address field.
8161 * win32-low.h (win32_thread_info): Add thread_local_base field.
8162 * win32-low.c (child_add_thread): Add tlb argument.
8163 Set thread_local_base field to TLB.
8164 (get_child_debug_event): Adapt to child_add_thread change.
8165 (win32_get_tib_address): New function.
8166 (win32_target_ops): Set get_tib_address field to
8167 win32_get_tib_address.
8168 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8169
8170 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8171
8172 * linux-low.c (linux_mourn): Also remove the process.
8173 * server.c (handle_target_event): Don't remove the process here.
8174 * nto-low.c (nto_mourn): New.
8175 (nto_target_ops): Install it.
8176 * spu-low.c (spu_mourn): New.
8177 (spu_target_ops): Install it.
8178 * win32-low.c (win32_mourn): New.
8179 (win32_target_ops): Install it.
8180
8181 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8182
8183 * server.h (buffer_xml_printf): Remove redundant `;'.
8184
8185 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8186
8187 * regcache.c (set_register_cache): Invalidate regcaches before
8188 changing the register cache layout.
8189 (regcache_invalidate_one): Allow a NULL regcache.
8190 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8191 regcaches before changing the register cache layout or the target
8192 regsets.
8193
8194 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8195
8196 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8197 variable warning on Linux/x86-64.
8198
8199 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8200
8201 GDBserver disconnected tracing support.
8202
8203 * linux-low.c (linux_remove_process): Delete.
8204 (add_lwp): Don't set last_resume_kind here.
8205 (linux_kill): Use `mourn'.
8206 (linux_detach): Use `thread_db_detach', and `mourn'.
8207 (linux_mourn): New.
8208 (linux_attach_lwp_1): Adjust comment.
8209 (linux_attach): last_resume_kind moved the thread_info; adjust.
8210 (status_pending_p_callback): Adjust.
8211 (linux_wait_for_event_1): Adjust.
8212 (count_events_callback, select_singlestep_lwp_callback)
8213 (select_event_lwp_callback, cancel_breakpoints_callback)
8214 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8215 (proceed_one_lwp): Adjust.
8216 (linux_async): Add debug output.
8217 (linux_thread_stopped): New.
8218 (linux_pause_all): New.
8219 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8220 linux_pause_all.
8221 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8222 (thread_db_free): Delete declaration.
8223 (thread_db_detach, thread_db_mourn): Declare.
8224 * thread-db.c (thread_db_init): Use thread_db_mourn.
8225 (thread_db_free): Delete, split in two.
8226 (disable_thread_event_reporting): New.
8227 (thread_db_detach): New.
8228 (thread_db_mourn): New.
8229
8230 * server.h (struct thread_info) <last_resume_kind>: New field.
8231 <attached>: Add comment.
8232 <gdb_detached>: New field.
8233 (handler_func): Change return type to int.
8234 (handle_serial_event, handle_target_event): Ditto.
8235 (gdb_connected): Declare.
8236 (tracing): Delete.
8237 (disconnected_tracing): Declare.
8238 (stop_tracing): Declare.
8239
8240 * server.c (handle_query) <qSupported>: Report support for
8241 disconnected tracing.
8242 (queue_stop_reply_callback): Account for running threads.
8243 (gdb_wants_thread_stopped): New.
8244 (gdb_wants_all_threads_stopped): New.
8245 (gdb_reattached_process): New.
8246 (handle_status): Clear the `gdb_detached' flag of all processes.
8247 In all-stop, stop all threads.
8248 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8249 (process_serial_event): If the remote connection breaks, or if an
8250 exit was forced with "monitor exit", force an event loop exit.
8251 Handle disconnected tracing on detach.
8252 (handle_serial_event): Adjust.
8253 (handle_target_event): If GDB isn't connected, forward events back
8254 to the inferior, unless the last process exited, in which case,
8255 exit gdbserver. Adjust interface.
8256
8257 * remote-utils.c (remote_open): Don't block in accept. Instead
8258 register an event loop source on the listen socket file
8259 descriptor. Refactor bits into ...
8260 (listen_desc): ... this new global.
8261 (gdb_connected): ... this new function.
8262 (enable_async_notification): ... this new function.
8263 (handle_accept_event): ... this new function.
8264 (remote_close): Clear remote_desc.
8265
8266 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8267
8268 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8269 New fields.
8270 (mourn_inferior): Define.
8271 (target_process_qsupported): Avoid the dangling else problem.
8272 (thread_stopped): Define.
8273 (pause_all): Define.
8274 (target_waitstatus_to_string): Declare.
8275 * target.c (target_waitstatus_to_string): New.
8276
8277 * tracepoint.c (tracing): Make extern.
8278 (disconnected_tracing): New.
8279 (stop_tracing): Make extern. Handle tracing stops due to GDB
8280 disconnecting.
8281 (cmd_qtdisconnected): New.
8282 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8283 (handle_tracepoint_general_set): Handle QTDisconnected.
8284
8285 * event-loop.c (event_handler_func): Change return type to int.
8286 (process_event): Bail out if the event handler wants the event
8287 loop to stop.
8288 (handle_file_event): Ditto.
8289 (start_event_loop): Bail out if the event handler wants the event
8290 loop to stop.
8291
8292 * nto-low.c (nto_target_ops): Adjust.
8293 * spu-low.c (spu_wait): Don't remove the process here.
8294 (spu_target_ops): Adjust.
8295 * win32-low.c (win32_wait): Don't remove the process here.
8296 (win32_target_ops): Adjust.
8297
8298 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8299
8300 * regcache.c (realloc_register_cache): Invalidate inferior's
8301 regcache before recreating it.
8302
8303 2010-04-09 Pedro Alves <pedro@codesourcery.com>
8304
8305 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8306
8307 2010-04-09 Stan Shebs <stan@codesourcery.com>
8308 Pedro Alves <pedro@codesourcery.com>
8309
8310 * server.h (LONGEST): New.
8311 (struct thread_info) <while_stepping>: New field.
8312 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8313 Declare.
8314 (initialize_tracepoint, handle_tracepoint_general_set)
8315 (handle_tracepoint_query, tracepoint_finished_step)
8316 (tracepoint_was_hit, release_while_stepping_state_list):
8317 (current_traceframe): Declare.
8318 * server.c (handle_general_set): Handle tracepoint packets.
8319 (read_memory): New.
8320 (write_memory): New.
8321 (handle_search_memory_1): Use read_memory.
8322 (handle_query): Report support for conditional tracepoints, trace
8323 state variables, and tracepoint sources. Handle tracepoint
8324 queries.
8325 (main): Initialize the tracepoints module.
8326 (process_serial_event): Handle traceframe reads/writes.
8327
8328 * linux-low.c (handle_tracepoints): New.
8329 (linux_wait_1): Call it.
8330 (linux_resume_one_lwp): Handle while-stepping.
8331 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8332 (linux_target_ops): Install them.
8333 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8334 New field.
8335 * linux-x86-low.c (x86_supports_tracepoints): New.
8336 (the_low_target). Install it.
8337
8338 * mem-break.h (delete_breakpoint): Declare.
8339 * mem-break.c (delete_breakpoint): Make external.
8340
8341 * target.h (struct target_ops): Add `supports_tracepoints',
8342 `read_pc', and `write_pc' fields.
8343 (target_supports_tracepoints): Define.
8344 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8345 (phex_nz): New.
8346
8347 * regcache.h (struct regcache) <registers_owned>: New field.
8348 (init_register_cache, regcache_cpy): Declare.
8349 (regcache_read_pc, regcache_write_pc): Declare.
8350 (register_cache_size): Declare.
8351 (supply_regblock): Declare.
8352 * regcache.c (init_register_cache): New.
8353 (new_register_cache): Use it.
8354 (regcache_cpy): New.
8355 (register_cache_size): New.
8356 (supply_regblock): New.
8357 (regcache_read_pc, regcache_write_pc): New.
8358
8359 * tracepoint.c: New.
8360
8361 * Makefile.in (OBS): Add tracepoint.o.
8362 (tracepoint.o): New rule.
8363
8364 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8365
8366 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8367 (i386-mmx.o): New.
8368 (i386-mmx.c): Likewise.
8369 (i386-mmx-linux.o): Likewise.
8370 (i386-mmx-linux.c): Likewise.
8371
8372 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8373 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8374 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8375 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8376
8377 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8378 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8379 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8380
8381 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8382
8383 * Makefile.in (clean): Updated.
8384 (i386-avx.o): New.
8385 (i386-avx.c): Likewise.
8386 (i386-avx-linux.o): Likewise.
8387 (i386-avx-linux.c): Likewise.
8388 (amd64-avx.o): Likewise.
8389 (amd64-avx.c): Likewise.
8390 (amd64-avx-linux.o): Likewise.
8391 (amd64-avx-linux.c): Likewise.
8392
8393 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8394 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8395 (srv_amd64_regobj): Add amd64-avx.o.
8396 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8397 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8398 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8399 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8400 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8401 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8402 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8403
8404 * i387-fp.c: Include "i386-xstate.h".
8405 (i387_xsave): New.
8406 (i387_cache_to_xsave): Likewise.
8407 (i387_xsave_to_cache): Likewise.
8408 (x86_xcr0): Likewise.
8409
8410 * i387-fp.h (i387_cache_to_xsave): Likewise.
8411 (i387_xsave_to_cache): Likewise.
8412 (x86_xcr0): Likewise.
8413
8414 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8415 * linux-crisv32-low.c (target_regsets): Likewise.
8416 * linux-m68k-low.c (target_regsets): Likewise.
8417 * linux-mips-low.c (target_regsets): Likewise.
8418 * linux-ppc-low.c (target_regsets): Likewise.
8419 * linux-s390-low.c (target_regsets): Likewise.
8420 * linux-sh-low.c (target_regsets): Likewise.
8421 * linux-sparc-low.c (target_regsets): Likewise.
8422 * linux-xtensa-low.c (target_regsets): Likewise.
8423
8424 * linux-low.c: Include <sys/uio.h>.
8425 (regsets_fetch_inferior_registers): Support nt_type.
8426 (regsets_store_inferior_registers): Likewise.
8427 (linux_process_qsupported): New.
8428 (linux_target_ops): Add linux_process_qsupported.
8429
8430 * linux-low.h (regset_info): Add nt_type.
8431 (linux_target_ops): Add process_qsupported.
8432
8433 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8434 and <sys/uio.h>.
8435 (init_registers_i386_avx_linux): New.
8436 (init_registers_amd64_avx_linux): Likewise.
8437 (xmltarget_i386_linux_no_xml): Likewise.
8438 (xmltarget_amd64_linux_no_xml): Likewise.
8439 (PTRACE_GETREGSET): Likewise.
8440 (PTRACE_SETREGSET): Likewise.
8441 (x86_fill_xstateregset): Likewise.
8442 (x86_store_xstateregset): Likewise.
8443 (use_xml): Likewise.
8444 (x86_linux_update_xmltarget): Likewise.
8445 (x86_linux_process_qsupported): Likewise.
8446 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8447 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8448 init_registers_i386_linux here. Call
8449 x86_linux_update_xmltarget.
8450 (the_low_target): Add x86_linux_process_qsupported.
8451
8452 * server.c (handle_query): Call target_process_qsupported.
8453
8454 * target.h (target_ops): Add process_qsupported.
8455 (target_process_qsupported): New.
8456
8457 2010-04-03 Pedro Alves <pedro@codesourcery.com>
8458
8459 * inferiors.c (add_thread): Set last_status kind to
8460 TARGET_WAITKIND_IGNORE.
8461 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8462 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8463 (linux_wait_1): Move `thread' local definition to block that uses
8464 it. Don't NULL initialize `event_child'.
8465 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8466 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8467 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8468
8469 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8470
8471 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8472 an extended waitstatus, or by a watchpoint.
8473 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8474 thread was stepping or has been stopped by a watchpoint.
8475
8476 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8477
8478 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8479 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8480 of another, then delete the previous, and validate all
8481 breakpoints.
8482 (validate_inserted_breakpoint): New.
8483 (delete_disabled_breakpoints): New.
8484 (validate_breakpoints): New.
8485 (check_mem_read): Validate breakpoints before trusting their
8486 shadow. Delete disabled breakpoints.
8487 (check_mem_write): Validate breakpoints before trusting they
8488 should be inserted. Delete disabled breakpoints.
8489 * mem-break.h (validate_breakpoints):
8490 * server.c (handle_query): Validate breakpoints when we see a
8491 qSymbol query.
8492
8493 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8494
8495 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8496 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8497 if we could tell there's a GDB breakpoint at stop_pc.
8498 (need_step_over_p): Don't do a step over if we find a GDB
8499 breakpoint at the resume PC.
8500
8501 * mem-break.c (struct raw_breakpoint): New.
8502 (enum bkpt_type): New type `gdb_breakpoint'.
8503 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8504 fields. New field `raw'.
8505 (find_raw_breakpoint_at): New.
8506 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8507 breakpoint instead.
8508 (set_breakpoint_at): Adjust.
8509 (delete_raw_breakpoint): New.
8510 (release_breakpoint): New.
8511 (delete_breakpoint): Rename to...
8512 (delete_breakpoint_1): ... this. Add proc parameter. Use
8513 release_breakpoint. Return ENOENT.
8514 (delete_breakpoint): Reimplement.
8515 (find_breakpoint_at): Delete.
8516 (find_gdb_breakpoint_at): New.
8517 (delete_breakpoint_at): Delete.
8518 (set_gdb_breakpoint_at): New.
8519 (delete_gdb_breakpoint_at): New.
8520 (gdb_breakpoint_here): New.
8521 (set_reinsert_breakpoint): Use release_breakpoint.
8522 (uninsert_breakpoint): Rename to ...
8523 (uninsert_raw_breakpoint): ... this.
8524 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8525 (reinsert_raw_breakpoint): Change parameter type to
8526 raw_breakpoint.
8527 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8528 instead.
8529 (check_breakpoints): Adjust. Use release_breakpoint.
8530 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8531 (breakpoint_inserted_here): Ditto.
8532 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8533 Don't trust the breakpoint's shadow if it is not inserted.
8534 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8535 (delete_all_breakpoints): Adjust.
8536 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8537 use delete_breakpoint_1.
8538
8539 * mem-break.h (breakpoints_supported): Delete declaration.
8540 (set_gdb_breakpoint_at): Declare.
8541 (gdb_breakpoint_here): Declare.
8542 (delete_breakpoint_at): Delete.
8543 (delete_gdb_breakpoint_at): Declare.
8544
8545 * server.h (struct raw_breakpoint): Forward declare.
8546 (struct process_info): New field `raw_breakpoints'.
8547
8548 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8549 breakpoints.
8550
8551 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8552
8553 * linux-low.c (status_pending_p_callback): Fix comment.
8554 (linux_wait_for_event_1): Move most of the internal breakpoint
8555 handling from here...
8556 (linux_wait_1): ... to here.
8557 (count_events_callback): New.
8558 (select_singlestep_lwp_callback): New.
8559 (select_event_lwp_callback): New.
8560 (cancel_breakpoints_callback): New.
8561 (select_event_lwp): New.
8562 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8563 priority to all LWPs that have had events that should be reported
8564 to the client. Cancel breakpoints when about to reporting the
8565 event to the client, not while stopping lwps. No longer cancel
8566 finished single-steps here.
8567 (cancel_finished_single_step): Delete.
8568 (cancel_finished_single_steps): Delete.
8569
8570 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8571
8572 * mem-break.c (enum bkpt_type): New.
8573 (struct breakpoint): New field `type'.
8574 (set_breakpoint_at): Change return type to struct breakpoint
8575 pointer. Set type to `other_breakpoint' by default.
8576 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8577 in the breakpoint list.
8578 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8579 (reinsert_breakpoint): Rename to ...
8580 (reinsert_raw_breakpoint): ... this.
8581 (reinsert_breakpoints_at): Adjust.
8582 * mem-break.h (struct breakpoint): Declare.
8583 (set_breakpoint_at): Change return type to struct breakpoint
8584 pointer.
8585
8586 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8587
8588 * server.c (handle_query): Assign, not compare.
8589
8590 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8591
8592 Teach linux gdbserver to step-over-breakpoints.
8593
8594 * linux-low.c (can_hardware_single_step): New.
8595 (supports_breakpoints): New.
8596 (handle_extended_wait): If stopping threads, read the stop pc of
8597 the new cloned LWP.
8598 (get_pc): New.
8599 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8600 low target doesn't support retrieving the PC.
8601 (add_lwp): Set last_resume_kind to resume_continue.
8602 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8603 (linux_attach): Don't clear stop_expected. Set the lwp's
8604 last_resume_kind to resume_stop.
8605 (linux_detach_one_lwp): Don't check for removed breakpoints.
8606 (check_removed_breakpoint): Delete.
8607 (status_pending_p): Rename to ...
8608 (status_pending_p_callback): ... this. Don't check for removed
8609 breakpoints. Don't consider threads that are stopped from GDB's
8610 perspective.
8611 (linux_wait_for_lwp): Always read the stop_pc here.
8612 (cancel_breakpoint): New.
8613 (step_over_bkpt): New global.
8614 (linux_wait_for_event_1): Implement stepping over breakpoints.
8615 (gdb_wants_lwp_stopped): New.
8616 (gdb_wants_all_stopped): New.
8617 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8618 single-step traps here. Store the thread's last reported target
8619 wait status.
8620 (send_sigstop): Don't clear stop_expected. Always set it,
8621 instead.
8622 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8623 (cancel_finished_single_step): New.
8624 (cancel_finished_single_steps): New.
8625 (wait_for_sigstop): Don't cancel finished single-step traps here.
8626 (linux_resume_one_lwp): Don't check for removed breakpoints.
8627 Don't set `step' on non-hardware step archs.
8628 (linux_set_resume_request): Ignore resume_stop requests if already
8629 stopping or stopped. Set the lwp's last_resume_kind.
8630 (resume_status_pending_p): Don't check for removed breakpoints.
8631 (need_step_over_p): New.
8632 (start_step_over): New.
8633 (finish_step_over): New.
8634 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8635 requests. Clear the thread's last reported target waitstatus.
8636 Don't use the `suspended' flag. Don't consider pending breakpoints.
8637 (linux_resume): Start a step-over if necessary.
8638 (proceed_one_lwp): New.
8639 (proceed_all_lwps): New.
8640 (unstop_all_lwps): New.
8641 * linux-low.h (struct lwp_info): Rewrite comment for the
8642 `suspended' flag. Add the `stop_pc' field. Delete the
8643 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8644 Add `'last_resume_kind' and `need_step_over' fields.
8645 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8646 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8647 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8648 (set_raw_breakpoint_at): New.
8649 (set_breakpoint_at): Rewrite to use it.
8650 (reinsert_breakpoint_handler): Delete.
8651 (set_reinsert_breakpoint): New.
8652 (reinsert_breakpoint_by_bp): Delete.
8653 (delete_reinsert_breakpoints): New.
8654 (uninsert_breakpoint): Rewrite.
8655 (uninsert_breakpoints_at): New.
8656 (reinsert_breakpoint): Rewrite.
8657 (reinsert_breakpoints_at): New.
8658 (check_breakpoints): Rewrite.
8659 (breakpoint_here): New.
8660 (breakpoint_inserted_here): New.
8661 (check_mem_read): Adjust.
8662 * mem-break.h (breakpoints_supported, breakpoint_here)
8663 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8664 (reinsert_breakpoint_by_bp): Delete declaration.
8665 (delete_reinsert_breakpoints): Declare.
8666 (reinsert_breakpoint): Delete declaration.
8667 (reinsert_breakpoints_at): Declare.
8668 (uninsert_breakpoint): Delete declaration.
8669 (uninsert_breakpoints_at): Declare.
8670 (check_breakpoints): Adjust prototype.
8671 * server.h: Adjust include order.
8672 (struct thread_info): Declare here. Add a `last_status' field.
8673
8674 2010-03-23 Michael Snyder <msnyder@vmware.com>
8675
8676 * server.c (crc32): New function.
8677 (handle_query): Add handling for 'qCRC:' request.
8678
8679 2010-03-23 Pedro Alves <pedro@codesourcery.com>
8680
8681 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8682 lwp had been stopped by a watchpoint.
8683
8684 2010-03-16 Pedro Alves <pedro@codesourcery.com>
8685
8686 * server.h (internal_error): Declare.
8687 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8688 * utils.c (internal_error): New function.
8689
8690 2010-03-15 Andreas Schwab <schwab@redhat.com>
8691
8692 * configure.srv: Fix typo setting srv_regobj.
8693
8694 2010-03-15 Pedro Alves <pedro@codesourcery.com>
8695
8696 * linux-low.c (fetch_register): Avoid passing a non string literal
8697 format to `error'.
8698 (usr_store_inferior_registers): Ditto.
8699
8700 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8701
8702 * linux-low.c (linux_write_memory): Bail out early if peeking
8703 memory failed.
8704
8705 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8706
8707 * linux-low.h (struct lwp_info): New fields
8708 `stopped_by_watchpoint' and `stopped_data_address'.
8709 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8710 here, and cache them in the lwp object.
8711 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8712 directly.
8713 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8714 field.
8715 (linux_stopped_by_watchpoint): Rewrite.
8716 (linux_stopped_data_address): Rewrite.
8717
8718 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
8719
8720 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8721 switching the current inferior, not before.
8722
8723 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8724
8725 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8726 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8727 i386-linux.c and amd64-linux.c.
8728 (reg-i386.o): Removed.
8729 (reg-i386.c): Likewise.
8730 (reg-i386-linux.o): Likewise.
8731 (reg-i386-linux.c): Likewise.
8732 (reg-x86-64.o): Likewise.
8733 (reg-x86-64.c): Likewise.
8734 (reg-x86-64-linux.o): Likewise.
8735 (reg-x86-64-linux.c): Likewise.
8736 (i386.o): New.
8737 (i386.c): Likewise.
8738 (i386-linux.o): Likewise.
8739 (i386-linux.c): Likewise.
8740 (amd64.o): Likewise.
8741 (amd64.c): Likewise.
8742 (amd64-linux.o): Likewise.
8743 (amd64-linux.c): Likewise.
8744
8745 * configure.srv (srv_i386_regobj): New.
8746 (srv_i386_linux_regobj): Likewise.
8747 (srv_amd64_regobj): Likewise.
8748 (srv_amd64_linux_regobj): Likewise.
8749 (srv_i386_32bit_xmlfiles): Likewise.
8750 (srv_i386_64bit_xmlfiles): Likewise.
8751 (srv_i386_xmlfiles): Likewise.
8752 (srv_amd64_xmlfiles): Likewise.
8753 (srv_i386_linux_xmlfiles): Likewise.
8754 (srv_amd64_linux_xmlfiles): Likewise.
8755 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8756 srv_xmlfiles to $srv_i386_xmlfiles.
8757 (i[34567]86-*-mingw32ce*): Likewise.
8758 (i[34567]86-*-mingw*): Likewise.
8759 (i[34567]86-*-nto*): Likewise.
8760 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8761 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8762 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8763 (x86_64-*-linux*): Likewise.
8764
8765 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8766 (init_registers_amd64_linux): New.
8767 (x86_arch_setup): Replace init_registers_x86_64_linux with
8768 init_registers_amd64_linux.
8769
8770 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8771
8772 * configure.ac: Check for libdl. If it is not available link against
8773 static libthread_db.
8774 * configure: Regenerate.
8775
8776 2010-02-22 Pedro Alves <pedro@codesourcery.com>
8777
8778 PR9605
8779
8780 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8781 handing a read watchpoint.
8782 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8783
8784 2010-02-12 Doug Evans <dje@google.com>
8785
8786 * linux-low.c (linux_supports_tracefork_flag): Document.
8787 (linux_look_up_symbols): Add comment.
8788
8789 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8790
8791 * regcache.c (supply_register): Clear regcache if buf is NULL.
8792
8793 2010-02-02 Nicolas Roche <roche@sourceware.org>
8794 Joel Brobecker <brobecker@adacore.com>
8795
8796 * inferiors.c (find_inferior): Add function documentation.
8797 (unloaded_dll): Handle the case where the unloaded dll has not
8798 been previously registered in the dll list.
8799
8800 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8801
8802 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8803 (thumb2_breakpoint): New.
8804 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8805
8806 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8807
8808 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8809 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8810 breakpoints.
8811
8812 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8813
8814 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8815
8816 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8817
8818 * linux-s390-low.c (s390_collect_ptrace_register)
8819 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8820
8821 2010-01-21 Doug Evans <dje@google.com>
8822
8823 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8824 (PTRACE_ARG4_TYPE): New macro.
8825 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8826 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8827 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8828 (usr_store_inferior_registers): Ditto.
8829 (linux_read_memory, linux_write_memory): Ditto.
8830 (linux_test_for_tracefork): Ditto.
8831
8832 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8833 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8834
8835 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8836
8837 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8838 target.
8839
8840 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8841
8842 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8843 prototype to take a regcache. Adjust.
8844
8845 2010-01-20 Pedro Alves <pedro@codesourcery.com>
8846
8847 * regcache.h (struct thread_info): Forward declare.
8848 (struct regcache): New.
8849 (new_register_cache): Adjust prototype.
8850 (get_thread_regcache): Declare.
8851 (free_register_cache): Adjust prototype.
8852 (registers_to_string, registers_from_string): Ditto.
8853 (supply_register, supply_register_by_name, collect_register)
8854 (collect_register_as_string, collect_register_by_name): Ditto.
8855 * regcache.c (struct inferior_regcache_data): Delete.
8856 (get_regcache): Rename to ...
8857 (get_thread_regcache): ... this. Adjust. Switch inferior before
8858 fetching registers.
8859 (regcache_invalidate_one): Adjust.
8860 (regcache_invalidate): Fix prototype.
8861 (new_register_cache): Return the new register cache.
8862 (free_register_cache): Change prototype.
8863 (realloc_register_cache): Adjust.
8864 (registers_to_string): Change prototype to take a regcache. Adjust.
8865 (registers_from_string): Ditto.
8866 (register_data): Ditto.
8867 (supply_register): Ditto.
8868 (supply_register_by_name): Ditto.
8869 (collect_register): Ditto.
8870 (collect_register_as_string): Ditto.
8871 (collect_register_by_name): Ditto.
8872 * server.c (process_serial_event): Adjust.
8873 * linux-low.h (regset_fill_func, regset_store_func): Change
8874 prototype.
8875 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8876 Change prototype.
8877 * linux-low.c (get_stop_pc): Adjust.
8878 (check_removed_breakpoint): Adjust.
8879 (linux_wait_for_event): Adjust.
8880 (linux_resume_one_lwp): Adjust.
8881 (fetch_register): Add regcache parameter. Adjust.
8882 (usr_store_inferior_registers): Ditto.
8883 (regsets_fetch_inferior_registers): Ditto.
8884 (regsets_store_inferior_registers): Ditto.
8885 (linux_fetch_registers, linux_store_registers): Ditto.
8886 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8887 regcache. Adjust.
8888 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8889 Ditto.
8890 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8891 prototype to take a regcache.
8892 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8893 * remote-utils.c (convert_ascii_to_int, outreg)
8894 (prepare_resume_reply): Change prototype to take a regcache.
8895 Adjust.
8896 * target.h (struct target_ops) <fetch_registers, store_registers>:
8897 Change prototype to take a regcache.
8898 (fetch_inferior_registers, store_inferior_registers): Change
8899 prototype to take a regcache. Adjust.
8900 * proc-service.c (ps_lgetregs): Adjust.
8901 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8902 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8903 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8904 take a regcache. Adjust.
8905 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8906 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8907 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8908 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8909 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8910 (cris_cannot_fetch_register):
8911 (cris_breakpoint_at): Change prototype to take a regcache.
8912 Adjust.
8913 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8914 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8915 to take a regcache. Adjust.
8916 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8917 Adjust.
8918 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8919 take a regcache. Adjust.
8920 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8921 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8922 (m68k_set_pc): Change prototype to take a regcache. Adjust.
8923 * linux-mips-low.c (mips_get_pc):
8924 (mips_set_pc): Change prototype to take a regcache. Adjust.
8925 (mips_reinsert_addr): Adjust.
8926 (mips_collect_register): Change prototype to take a regcache.
8927 Adjust.
8928 (mips_supply_register):
8929 (mips_collect_register_32bit, mips_supply_register_32bit)
8930 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8931 (mips_store_fpregset): Ditto.
8932 * linux-ppc-low.c (ppc_supply_ptrace_register)
8933 (ppc_supply_ptrace_register): Ditto.
8934 (parse_spufs_run): Adjust.
8935 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8936 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8937 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8938 take a regcache. Adjust.
8939 * linux-s390-low.c (s390_collect_ptrace_register)
8940 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8941 (s390_set_pc): Change prototype to take a regcache. Adjust.
8942 (s390_arch_setup): Adjust.
8943 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8944 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
8945 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8946 (sparc_fill_gregset, sparc_store_gregset_from_stack)
8947 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8948 regcache. Adjust.
8949 (sparc_breakpoint_at): Adjust.
8950 * linux-xtensa-low.c (xtensa_fill_gregset):
8951 (xtensa_store_gregset):
8952 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
8953 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
8954 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
8955 prototype to take a regcache. Adjust.
8956 * win32-arm-low.c (arm_fetch_inferior_register)
8957 (arm_store_inferior_register): Change prototype to take a
8958 regcache. Adjust.
8959 * win32-i386-low.c (i386_fetch_inferior_register)
8960 (i386_store_inferior_register): Change prototype to take a
8961 regcache. Adjust.
8962 * win32-low.c (child_fetch_inferior_registers)
8963 (child_store_inferior_registers): Change prototype to take a
8964 regcache. Adjust.
8965 (win32_wait): Adjust.
8966 (win32_fetch_inferior_registers): Change prototype to take a
8967 regcache. Adjust.
8968 (win32_store_inferior_registers): Adjust.
8969 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
8970 store_inferior_register>: Change prototype to take a regcache.
8971
8972 2010-01-20 Doug Evans <dje@google.com>
8973
8974 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
8975 #ifdef.
8976 (linux_wait_for_event1, linux_init_signals): Ditto.
8977 (W_STOPCODE): Provide definition if missing.
8978
8979 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
8980
8981 * linux-low.c (linux_core_of_thread): New.
8982 (compare_ints, show_process, list_threads): New.
8983 (linux_qxfer_osdata): Report threads and cores.
8984 (linux_target_op): Register linux_core_of_thread.
8985 * remote-utils.c (prepare_resume_reply): Report the core.
8986 (buffer_xml_printf): Support %d specifier.
8987 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
8988 New.
8989 (handle_query): Handle qXfer:threads. Announce availability
8990 thereof.
8991 * target.h (struct target_ops): New field core_of_thread.
8992
8993 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
8994
8995 * Makefile.in (clean): Remove new generated files.
8996 (reg-s390.o, reg-s390.c): Remove rules.
8997 (reg-s390x.o, reg-s390x.c): Likewise.
8998 (s390-linux32.o, s390-linux32.c): Add rules.
8999 (s390-linux64.o, s390-linux64.c): Likewise.
9000 (s390x-linux64.o, s390x-linux64.c): Likewise.
9001 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9002 * linux-s390-low.c: Include <elf.h>.
9003 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9004 (init_registers_s390): Remove prototype.
9005 (init_registers_s390x): Likewise.
9006 (init_registers_s390_linux32): Add prototype.
9007 (init_registers_s390_linux64): Likewise.
9008 (init_registers_s390x_linux64): Likewise.
9009 (s390_num_regs_3264): New define.
9010 (s390_regmap_3264): New global variable.
9011 (s390_cannot_fetch_register): Remove obsolete check.
9012 (s390_cannot_store_register): Likewise.
9013 (s390_collect_ptrace_register): Handle upper/lower register halves.
9014 (s390_supply_ptrace_register): Likewise.
9015 (s390_fill_gregset): Update to register number changes.
9016 (s390_get_hwcap): New routine.
9017 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9018 Install appropriate regmap and register set.
9019
9020 2010-01-01 Joel Brobecker <brobecker@adacore.com>
9021
9022 * server.c (gdbserver_version): Update copyright year to 2010.
9023 * gdbreplay.c (gdbreplay_version): Likewise.
9024
9025 2009-12-28 Doug Evans <dje@google.com>
9026
9027 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9028 elf/external.h. Include <elf.h> instead but only if necessary.
9029
9030 2009-12-28 Pedro Alves <pedro@codesourcery.com>
9031
9032 * linux-low.c (linux_remove_process): Remove `detaching'
9033 parameter. Don't release/detach from thread_db here.
9034 (linux_kill): Release/detach from thread_db here, ...
9035 (linux_detach): ... and here, before actually detaching.
9036 (linux_wait_1): ... and here, when a process exits.
9037 * thread-db.c (any_thread_of): New.
9038 (thread_db_free): Switch the current inferior to a thread of the
9039 passed in process.
9040
9041 2009-12-21 Doug Evans <dje@google.com>
9042
9043 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9044
9045 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9046 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9047 warning ifndef __NR_tkill. Move setting of errno there too.
9048 Delete unnecessary resetting of errno after syscall.
9049 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9050
9051 * configure.ac: Check for dladdr.
9052 * config.in: Regenerate.
9053 * configure: Regenerate.
9054 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9055 (try_thread_db_load): Update.
9056
9057 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9058
9059 2009-12-18 Doug Evans <dje@google.com>
9060
9061 * event-loop.c: Include unistd.h if it exists.
9062
9063 * linux-low.c (my_waitpid): Move definition away from being in
9064 between linux_tracefork_child/linux_test_for_tracefork.
9065
9066 * gdb_proc_service.h (psaddr_t): Fix type.
9067 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9068 signature to match glibc.
9069
9070 2009-12-16 Doug Evans <dje@google.com>
9071
9072 * linux-low.c (linux_read_memory): Fix argument to read.
9073
9074 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9075
9076 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9077 events, don't leave current_inferior pointing at null.
9078
9079 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9080
9081 * win32-low.c (LOG): Delete.
9082 (OUTMSG): Output to stderr.
9083 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9084 on compile time LOG macro.
9085 (win32_wait): Fix debug output.
9086
9087 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9088
9089 * win32-low.c (win32_add_one_solib): If the dll name is
9090 "ntdll.dll", prepend the system directory to the dll path.
9091
9092 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9093
9094 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9095
9096 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
9097 Vladimir Prus <vladimir@codesourcery.com>
9098
9099 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9100 * configure.ac: Check for __mcoldfire__ and set
9101 gdb_cv_m68k_is_coldfire.
9102 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9103 reg-cf.o and reg-m68k.o.
9104 * configure: Regenerated.
9105
9106 2009-11-16 Pedro Alves <pedro@codesourcery.com>
9107
9108 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9109 Pass it to thread_db_free.
9110 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9111 proper `detaching' argument to linux_remove_process.
9112 * linux-low.h (thread_db_free): Add `detaching' parameter.
9113 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9114 to thread_db_free.
9115 (thread_db_free): Add `detaching' parameter. Only
9116 call td_ta_clear_event if detaching from process.
9117
9118 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9119
9120 * thread-db.c (thread_db_free): Fix typo.
9121
9122 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9123
9124 PR gdb/10838
9125 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9126
9127 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9128
9129 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9130 with an i686 compiler.
9131 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9132 needed.
9133 * configure: Rebuilt.
9134
9135 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9136
9137 PR gdb/10783
9138
9139 * server.c (handle_search_memory_1): Correct read_addr initialization
9140 in loop for searching subsequent chunks.
9141
9142 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9143
9144 * configure.ac: New --with-libthread-db option.
9145 * thread-db.c: Allow direct dependence on libthread_db.
9146 (thread_db_free): Adjust.
9147 * config.in: Regenerate.
9148 * configure: Likewise.
9149
9150 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9151
9152 PR gdb/10757
9153 * thread-db.c (attach_thread): New function.
9154 (maybe_attach_thread): Return success/failure.
9155 (find_new_threads_callback): Adjust.
9156 (thread_db_find_new_threads): Loop until no new threads.
9157
9158 2009-10-13 Pedro Alves <pedro@codesourcery.com>
9159
9160 * proc-service.c (ps_lgetregs): Formatting.
9161
9162 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9163
9164 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9165 * configure.ac: Adjust.
9166 * linux-low.h (struct process_info_private): Move members to struct
9167 thread_db.
9168 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9169 * linux-low.c (linux_remove_process): Adjust.
9170 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9171 * server.c (handle_query): Move code ...
9172 (handle_monitor_command): ... here. New function.
9173 * target.h (struct target_ops): New member.
9174 * thread-db.c (struct thread_db): New.
9175 (libthread_db_search_path): New variable.
9176 (thread_db_create_event, thread_db_enable_reporting)
9177 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9178 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9179 (try_thread_db_load_1, dladdr_to_soname): New functions.
9180 (try_thread_db_load, thread_db_load_search): New functions.
9181 (thread_db_init): Search for libthread_db.
9182 (thread_db_free): New function.
9183 (thread_db_handle_monitor_command): Likewise.
9184 * config.in: Regenerate.
9185 * configure: Regenerate.
9186
9187 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9188
9189 * spu-low.c (spu_kill): Wait for inferior to terminate.
9190 Call clear_inferiors.
9191 (spu_detach): Call clear_inferiors.
9192
9193 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9194
9195 * aclocal.m4: Regenerate.
9196 * config.in: Likewise.
9197 * configure: Likewise.
9198
9199 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9200
9201 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9202 (parse_spufs_run): New function.
9203 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9204 (ppc_breakpoint_at): Handle SPU breakpoints.
9205
9206 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9207
9208 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9209 (SPUFS_MAGIC): Define.
9210 (spu_enumerate_spu_ids): New function.
9211 (linux_qxfer_spu): New function.
9212 (linux_target_ops): Install linux_qxfer_spu.
9213
9214 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9215
9216 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9217 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9218 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9219 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9220 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9221 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9222 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9223 (init_registers_powerpc_cell32l): Add prototype.
9224 (init_registers_powerpc_cell64l): Likewise.
9225 (ppc_arch_setup): Detect Cell/B.E. architecture.
9226
9227 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9228
9229 * Makefile.in (datarootdir): New variable.
9230
9231 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9232
9233 * linux-low.c (linux_write_memory): Update debugging output.
9234 * Makefile.in (clean): Add new descriptions.
9235 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9236 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9237 * configure.srv: Add new files for arm*-*-linux*.
9238 * linux-arm-low.c: Add new declarations.
9239 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9240 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9241 (HWCAP_VFPv3D16): New.
9242 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9243 instead of __IWMMXT__.
9244 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9245 (arm_arch_setup): New.
9246 (target_regsets): Remove #ifdef. Add VFP regset.
9247 (the_low_target): Use arm_arch_setup.
9248
9249 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9250
9251 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9252 the main thread again.
9253
9254 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9255
9256 Adding Neutrino gdbserver.
9257 * configure: Regenerated.
9258 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9259 * configure.srv (i[34567]86-*-nto*): New target.
9260 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9261 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9262 (nto_comctrl) [__QNX__]: New function.
9263 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9264
9265 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
9266
9267 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9268 srv_tgtobj.
9269
9270 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9271 Pedro Alves <pedro@codesourcery.com>
9272
9273 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9274 don't support CONTEXT_EXTENDED_REGISTERS.
9275 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9276 (the_low_target): Install them.
9277 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9278 failing with ERROR_PIPE_NOT_CONNECTED.
9279
9280 2009-06-30 Doug Evans <dje@google.com>
9281 Pierre Muller <muller@ics.u-strasbg.fr>
9282
9283 Add h/w watchpoint support to x86-linux, win32-i386.
9284 * Makefile.in (SFILES): Add i386-low.c
9285 (i386_low_h): Define.
9286 (i386-low.o): Add dependencies.
9287 (linux-x86-low.o): Add i386-low.h dependency.
9288 (win32-i386-low.o): Ditto.
9289 * i386-low.c: New file.
9290 * i386-low.h: New file.
9291 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9292 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9293 * linux-low.c (linux_add_process): Initialize arch_private.
9294 (linux_remove_process): Free arch_private.
9295 (add_lwp): Initialize arch_private.
9296 (delete_lwp): Free arch_private.
9297 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9298 provided.
9299 * linux-low.h (process_info_private): New member arch_private.
9300 (lwp_info): New member arch_private.
9301 (linux_target_ops): New members new_process, new_thread,
9302 prepare_to_resume.
9303 (ptid_of): New macro.
9304 * linux-x86-low.c: Include stddef.h, i386-low.h.
9305 (arch_process_info): New struct.
9306 (arch_lwp_info): New struct.
9307 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9308 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9309 (i386_dr_low_get_status): New function.
9310 (x86_insert_point, x86_remove_point): New functions.
9311 (x86_stopped_by_watchpoint): New function.
9312 (x86_stopped_data_address): New function.
9313 (x86_linux_new_process, x86_linux_new_thread): New functions.
9314 (x86_linux_prepare_to_resume): New function.
9315 (the_low_target): Add entries for insert_point, remove_point,
9316 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9317 prepare_to_resume.
9318 * server.c (debug_hw_points): New global.
9319 (monitor_show_help): Document set debug-hw-points.
9320 (handle_query): Process "set debug-hw-points".
9321 * server.h (debug_hw_points): Declare.
9322 (paddress): Declare.
9323 * utils.c (NUMCELLS, CELLSIZE): New macros.
9324 (get_sell, xsnprintf, paddress): New functions.
9325 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9326 remove_point, stopped_by_watchpoint, stopped_data_address.
9327 * win32-i386-low.c: Include i386-low.h.
9328 (debug_reg_state): Replaces dr.
9329 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9330 (i386_dr_low_get_status): New function.
9331 (i386_insert_point, i386_remove_point): New functions.
9332 (i386_stopped_by_watchpoint): New function.
9333 (i386_stopped_data_address): New function.
9334 (i386_initial_stuff): Update.
9335 (get_thread_context,set_thread_context,i386_thread_added): Update.
9336 (the_low_target): Add entries for insert_point,
9337 remove_point, stopped_by_watchpoint, stopped_data_address.
9338 * win32-low.c (win32_insert_watchpoint): New function.
9339 (win32_remove_watchpoint): New function.
9340 (win32_stopped_by_watchpoint): New function.
9341 (win32_stopped_data_address): New function.
9342 (win32_target_ops): Add entries for insert_watchpoint,
9343 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9344 * win32-low.h (win32_target_ops): New members insert_point,
9345 remove_point, stopped_by_watchpoint, stopped_data_address.
9346
9347 2009-06-25 Pedro Alves <pedro@codesourcery.com>
9348
9349 * server.c (process_serial_event): Re-return unsupported, not
9350 error, if the type isn't recognized. Re-allow supporting only
9351 insert or remove packets. Also call require_running for
9352 breakpoints. Add missing break statement to default case. Tidy.
9353 * target.h (struct target_ops): Rename insert_watchpoint to
9354 insert_point, and remove_watchpoint to remove_point.
9355
9356 * linux-low.h (struct linux_target_ops): Likewise.
9357 * linux-low.c (linux_insert_watchpoint): Rename to ...
9358 (linux_insert_point): ... this. Adjust.
9359 (linux_remove_watchpoint): Rename to ...
9360 (linux_remove_point): ... this. Adjust.
9361 (linux_target_ops): Adjust.
9362 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9363 (cris_insert_point): ... this.
9364 (cris_remove_watchpoint): Rename to ...
9365 (cris_remove_point): ... this.
9366 (the_low_target): Adjust.
9367
9368 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9369
9370 * server.c (handle_v_kill): Pass signal_pid to
9371 kill_inferior if multi_process is zero.
9372
9373 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9374
9375 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9376 * target.h (target_ops): Comment for *_watchpoint to make it clear
9377 the functions can get types '0' and '1'.
9378
9379 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9380
9381 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9382 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9383 * regcache.c (get_regcache): Likewise.
9384 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9385 * win32-low.c (child_fetch_inferior_registers): Remove check for
9386 regno 0.
9387
9388 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9389 Pedro Alves <pedro@codesourcery.com>
9390
9391 * target.h (struct target_ops) <supports_multi_process>: New
9392 callback.
9393 (target_supports_multi_process): New.
9394 * server.c (handle_query): Even if GDB reports support, only
9395 enable multi-process if the target also supports it. Report
9396 multi-process support only if the target backend supports it.
9397 * linux-low.c (linux_supports_multi_process): New function.
9398 (linux_target_ops): Install it as target_supports_multi_process
9399 callback.
9400
9401 2009-05-24 Doug Evans <dje@google.com>
9402
9403 Global renaming of find_thread_pid to find_thread_ptid.
9404 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9405 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9406 All callers updated.
9407
9408 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9409 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9410 directly.
9411
9412 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9413 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9414 (linux_resume_one_lwp): Ditto.
9415
9416 2009-05-23 Doug Evans <dje@google.com>
9417
9418 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9419 from struct inferior_list_entry * to struct lwp_info *.
9420 All callers updated.
9421
9422 2009-05-13 Doug Evans <dje@google.com>
9423
9424 * linux-x86-low.c: Don't include assert.h.
9425 (x86_siginfo_fixup): Use fatal, not assert.
9426 (x86_arch_setup): Fix comment.
9427
9428 2009-05-12 Doug Evans <dje@google.com>
9429
9430 Biarch support for i386/amd64 gdbserver.
9431 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9432 Add linux-x86-low.c.
9433 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9434 (linux-x86-low.o): Add.
9435 * linux-x86-64-low.c: Delete.
9436 * linux-i386-low.c: Delete.
9437 * linux-x86-low.c: New file.
9438 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9439 linux-x86-low.o.
9440 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9441 linux-x86-low.o.
9442 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9443 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9444 (linux_child_pid_to_exec_file): New function.
9445 (elf_64_header_p, elf_64_file_p): New functions.
9446 (siginfo_fixup): New function.
9447 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9448 give target a chance to convert layout.
9449 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9450 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9451
9452 2009-05-07 Doug Evans <dje@google.com>
9453
9454 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9455 (regsets_store_inferior_registers): Ditto.
9456
9457 2009-05-06 Pedro Alves <pedro@codesourcery.com>
9458
9459 PR server/10048
9460
9461 * linux-low.c (must_set_ptrace_flags): Delete.
9462 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9463 of the global.
9464 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9465 `lwp->must_set_ptrace_flags' instead.
9466 (linux_wait_for_event_1): Set ptrace options here.
9467 (linux_wait_1): ... not here.
9468
9469 2009-04-30 Doug Evans <dje@google.com>
9470
9471 * inferiors.c (started_inferior_callback): New function.
9472 (attached_inferior_callback): New function.
9473 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9474 * server.c (print_started_pid, print_attached_pid): New functions.
9475 (detach_or_kill_for_exit): New function.
9476 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9477 * server.h (have_started_inferiors_p): Declare.
9478 (have_attached_inferiors_p): Declare.
9479
9480 * inferiors.c (remove_process): Fix memory leak, free process.
9481 * linux-low.c (linux_remove_process): New function.
9482 (linux_kill): Call it instead of remove_process.
9483 (linux_detach, linux_wait_1): Ditto.
9484
9485 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9486
9487 * configure.srv: Add x86 Windows CE target.
9488
9489 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9490
9491 * inferiors.c (get_thread_process): Make global.
9492 * server.h (get_thread_process): Add prototype.
9493 * thread-db.c (find_one_thread): Use get_thread_process
9494 instead of current_process.
9495 (thread_db_get_tls_address): Do not crash if called when
9496 thread layer is not yet initialized.
9497
9498 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9499
9500 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9501 * spu-low.c (current_tid): Rename to ...
9502 (current_ptid): ... this.
9503 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9504 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9505 ptid_get_lwp (current_ptid) instead of current_tid.
9506 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9507 instead of current_tid. Use find_process_pid to verify pid
9508 argument is valid. Pass proper argument to remove_process.
9509 (spu_thread_alive): Compare current_ptid instead of current_tid.
9510 (spu_resume): Likewise.
9511
9512 2009-04-02 Pedro Alves <pedro@codesourcery.com>
9513
9514 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9515 variable.
9516
9517 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9518
9519 Implement the multiprocess extensions, and add linux multiprocess
9520 support.
9521
9522 * server.h (ULONGEST): Declare.
9523 (struct ptid, ptid_t): New.
9524 (minus_one_ptid, null_ptid): Declare.
9525 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9526 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9527 (struct inferior_list_entry): Change `id' type from unsigned from
9528 to ptid_t.
9529 (struct sym_cache, struct breakpoint, struct
9530 process_info_private): Forward declare.
9531 (struct process_info): Declare.
9532 (current_process): Declare.
9533 (all_processes): Declare.
9534 (initialize_inferiors): Declare.
9535 (add_thread): Adjust to use ptid_t.
9536 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9537 (add_process, remove_process, find_thread_pid): Declare.
9538 (find_inferior_id): Adjust to use ptid_t.
9539 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9540 (multi_process): Declare.
9541 (push_event): Adjust to use ptid_t.
9542 (read_ptid, write_ptid): Declare.
9543 (prepare_resume_reply): Adjust to use ptid_t.
9544 (clear_symbol_cache): Declare.
9545 * inferiors.c (all_processes): New.
9546 (null_ptid, minus_one_ptid): New.
9547 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9548 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9549 (add_thread): Change unsigned long to ptid. Remove gdb_id
9550 parameter. Adjust.
9551 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9552 (gdb_id_to_thread): Rename to ...
9553 (find_thread_pid): ... this. Change unsigned long to ptid.
9554 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9555 (loaded_dll, pull_pid_from_list): Adjust.
9556 (add_process, remove_process, find_process_pid)
9557 (get_thread_process, current_process, initialize_inferiors): New.
9558 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9559 (struct target_waitstatus) <related_pid>: Ditto.
9560 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9561 return type to int.
9562 (struct target_ops) <join>: Add `pid' argument.
9563 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9564 (struct target_ops) <wait>: Add `ptid' field. Change return type
9565 to ptid.
9566 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9567 (mywait): Add `ptid' argument. Change return type to ptid_t.
9568 (target_pid_to_str): Declare.
9569 * target.c (set_desired_inferior): Adjust to use ptids.
9570 (mywait): Add new `ptid' argument. Adjust.
9571 (target_pid_to_str): New.
9572 * mem-break.h (free_all_breakpoints): Declare.
9573 * mem-break.c (breakpoints): Delelete.
9574 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9575 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9576 to use per-process breakpoint list.
9577 (free_all_breakpoints): New.
9578 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9579 (symbol_cache, all_symbols_looked_up): Delete.
9580 (hexchars): New.
9581 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9582 read_ptid): New.
9583 (prepare_resume_reply): Change ptid argument's type from unsigned
9584 long to ptid_t. Adjust. Implement W;process and X;process.
9585 (free_sym_cache, clear_symbol_cache): New.
9586 (look_up_one_symbol): Adjust to per-process symbol cache. *
9587 * server.c (cont_thread, general_thread, step_thread): Change type
9588 to ptid_t.
9589 (attached): Delete.
9590 (multi_process): New.
9591 (last_ptid): Change type to ptid_t.
9592 (struct vstop_notif) <ptid>: Change type to ptid_t.
9593 (queue_stop_reply, push_event): Change `ptid' argument's type to
9594 ptid_t.
9595 (discard_queued_stop_replies): Add `pid' argument.
9596 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9597 changes. Don't reference the `attached' global.
9598 (attach_inferior): Adjust to mywait interface changes.
9599 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9600 features. Handle and report "multiprocess+". Handle
9601 "qAttached:PID".
9602 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9603 changes.
9604 (handle_v_kill): New.
9605 (handle_v_stopped): Adjust to use target_pid_to_str.
9606 (handle_v_requests): Allow multiple attaches and runs when
9607 multiprocess extensions are in effect. Handle "vKill".
9608 (myresume): Adjust to use ptids.
9609 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9610 (handle_status): Adjust to discard_queued_stop_replies interface
9611 change.
9612 (first_thread_of, kill_inferior_callback)
9613 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9614 (main): Call initialize_inferiors. Adjust to use ptids, killing
9615 and detaching from all inferiors. Handle multiprocess packet
9616 variants.
9617 * linux-low.h: Include gdb_proc_service.h.
9618 (struct process_info_private): New.
9619 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9620 <lwpid_of>: Use ptid_get_lwp.
9621 (get_lwp_thread): Adjust.
9622 (struct lwp_info): Add `dead' member.
9623 (find_lwp_pid): Declare.
9624 * linux-low.c (thread_db_active): Delete.
9625 (new_inferior): Adjust comment.
9626 (inferior_pid): Delete.
9627 (linux_add_process): New.
9628 (handle_extended_wait): Adjust.
9629 (add_lwp): Change unsigned long to ptid.
9630 (linux_create_inferior): Add process to processes table. Adjust
9631 to use ptids. Don't set new_inferior here.
9632 (linux_attach_lwp): Rename to ...
9633 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9634 it. Adjust to use ptids.
9635 (linux_attach_lwp): New.
9636 (linux_attach): Add process to processes table. Don't set
9637 new_inferior here.
9638 (struct counter): New.
9639 (second_thread_of_pid_p, last_thread_of_process_p): New.
9640 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9641 multiple processes.
9642 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9643 processes. Remove process from process table.
9644 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9645 to multiple processes.
9646 (any_thread_of): New.
9647 (linux_detach): Add `pid' argument, and handle it. Remove process
9648 from processes table.
9649 (linux_join): Add `pid' argument. Handle it.
9650 (linux_thread_alive): Change unsighed long argument to ptid_t.
9651 Consider dead lwps as not being alive.
9652 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9653 threads we're not interested in.
9654 (same_lwp, find_lwp_pid): New.
9655 (linux_wait_for_lwp): Change `pid' argument's type from int to
9656 ptid_t. Adjust.
9657 (linux_wait_for_event): Rename to ...
9658 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9659 from int to ptid_t. Adjust.
9660 (linux_wait_for_event): New.
9661 (linux_wait_1): Add `ptid' argument. Change return type to
9662 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9663 that exit from the process table.
9664 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9665 Adjust.
9666 (mark_lwp_dead): New.
9667 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9668 stopping all threads, mark its main lwp as dead.
9669 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9670 ptids.
9671 (fetch_register, usr_store_inferior_registers)
9672 (regsets_fetch_inferior_registers)
9673 (regsets_store_inferior_registers, linux_read_memory)
9674 (linux_write_memory): Inline `inferior_pid'.
9675 (linux_look_up_symbols): Adjust to use per-process
9676 `thread_db_active'.
9677 (linux_request_interrupt): Adjust to use ptids.
9678 (linux_read_auxv): Inline `inferior_pid'.
9679 (initialize_low): Don't reference thread_db_active.
9680 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9681 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9682 (ps_getpid): Return the pid of the current inferior.
9683 * thread-db.c (proc_handle, thread_agent): Delete.
9684 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9685 per-process data.
9686 (find_one_thread): Change argument type to ptid_t. Adjust to
9687 per-process data.
9688 (maybe_attach_thread): Adjust to per-process data and ptids.
9689 (thread_db_find_new_threads): Ditto.
9690 (thread_db_init): Ditto.
9691 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9692 processes table. Adjust to use ptids.
9693 (spu_kill, spu_detach): Adjust interface. Remove process from
9694 processes table.
9695 (spu_join, spu_thread_alive): Adjust interface.
9696 (spu_wait): Adjust interface. Remove process from processes
9697 table. Adjust to use ptids.
9698 * win32-low.c (current_inferior_tid): Delete.
9699 (current_inferior_ptid): New.
9700 (debug_event_ptid): New.
9701 (thread_rec): Take a ptid. Adjust.
9702 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9703 (child_delete_thread): Ditto.
9704 (do_initial_child_stuff): Add `attached' argument. Add process to
9705 processes table.
9706 (child_fetch_inferior_registers, child_store_inferior_registers):
9707 Adjust.
9708 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9709 (win32_attach): Pass 1 to do_initial_child_stuff.
9710 (win32_kill): Adjust interface. Remove process from processes
9711 table.
9712 (win32_detach): Ditto.
9713 (win32_join): Adjust interface.
9714 (win32_thread_alive): Take a ptid.
9715 (win32_resume): Adjust to use ptids.
9716 (get_child_debug_event): Ditto.
9717 (win32_wait): Adjust interface. Remove exiting process from
9718 processes table.
9719
9720 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9721
9722 Non-stop mode support.
9723
9724 * server.h (non_stop): Declare.
9725 (gdb_client_data, handler_func): Declare.
9726 (delete_file_handler, add_file_handler, start_event_loop):
9727 Declare.
9728 (handle_serial_event, handle_target_event, push_event)
9729 (putpkt_notif): Declare.
9730 * target.h (enum resume_kind): New.
9731 (struct thread_resume): Replace `step' field by `kind' field.
9732 (TARGET_WNOHANG): Define.
9733 (struct target_ops) <wait>: Add `options' argument.
9734 <supports_non_stop, async, start_non_stop>: New fields.
9735 (target_supports_non_stop, target_async): New.
9736 (start_non_stop): Declare.
9737 (mywait): Add `options' argument.
9738 * target.c (mywait): Add `options' argument. Print child exit
9739 notifications here.
9740 (start_non_stop): New.
9741 * server.c (non_stop, own_buf, mem_buf): New globals.
9742 (struct vstop_notif): New.
9743 (notif_queue): New global.
9744 (queue_stop_reply, push_event, discard_queued_stop_replies)
9745 (send_next_stop_reply): New.
9746 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9747 interface changes.
9748 (attach_inferior): In non-stop mode, don't wait for the target
9749 here.
9750 (handle_general_set): Handle QNonStop.
9751 (handle_query): When handling qC, return the current general
9752 thread, instead of the first thread of the list.
9753 (handle_query): If the backend supports non-stop mode, include
9754 QNonStop+ in the qSupported query response.
9755 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9756 and non-stop mode.
9757 (handle_v_attach, handle_v_run): Handle non-stop mode.
9758 (handle_v_stopped): New.
9759 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9760 (myresume): Adjust to use resume_kind. Handle non-stop.
9761 (queue_stop_reply_callback): New.
9762 (handle_status): Handle non-stop mode.
9763 (main): Clear non_stop flag on reconnection. Use the event-loop.
9764 Refactor serial protocol handling from here ...
9765 (process_serial_event): ... to this new function. When GDB
9766 selects any thread, select one here. In non-stop mode, wait until
9767 GDB acks all pending events before exiting.
9768 (handle_serial_event, handle_target_event): New.
9769 * remote-utils.c (remote_open): Install remote_desc in the event
9770 loop.
9771 (remote_close): Remove remote_desc from the event loop.
9772 (putpkt_binary): Rename to...
9773 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9774 (putpkt_binary): New as wrapper around putpkt_binary_1.
9775 (putpkt_notif): New.
9776 (prepare_resume_reply): In non-stop mode, don't change the
9777 general_thread.
9778 * event-loop.c: New.
9779 * Makefile.in (OBJ): Add event-loop.o.
9780 (event-loop.o): New rule.
9781
9782 * linux-low.h (pid_of): Moved here.
9783 (lwpid_of): New.
9784 (get_lwp_thread): Use lwpid_of.
9785 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9786 * linux-low.c (pid_of): Delete.
9787 (inferior_pid): Use lwpid_of.
9788 (linux_event_pipe): New.
9789 (target_is_async_p): New.
9790 (delete_lwp): New.
9791 (handle_extended_wait): Use lwpid_of.
9792 (add_lwp): Don't set lwpid field.
9793 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9794 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9795 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9796 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9797 first. Adjust to linux_wait_for_event interface changes. Use
9798 lwpid_of.
9799 (linux_detach): Don't delete the main lwp here.
9800 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9801 (status_pending_p): Don't consider explicitly suspended lwps.
9802 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9803 pointer. Add OPTIONS argument. Change return type to int. Use
9804 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9805 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9806 pointer. Add status pointer argument. Return a pid instead of a
9807 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9808 changes. In non-stop mode, don't switch to a random thread.
9809 (linux_wait): Rename to...
9810 (linux_wait_1): ... this. Add target_options argument, and handle
9811 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9812 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9813 clean exit and signal exit code. Don't stop all threads in
9814 non-stop mode. In all-stop mode, only stop all threads when
9815 reporting a stop to GDB. Handle explicit thread stop requests.
9816 (async_file_flush, async_file_mark): New.
9817 (linux_wait): New.
9818 (send_sigstop): Use lwpid_of.
9819 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9820 interface changes. In non-stop mode, don't switch to a random
9821 thread.
9822 (linux_resume_one_lwp): Use lwpid_of.
9823 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9824 (linux_resume_one_thread): ... this. Handle resume_stop. In
9825 non-stop mode, don't look for pending flag in all threads.
9826 (resume_status_pending_p): Don't consider explicitly suspended
9827 threads.
9828 (my_waitpid): Reimplement. Emulate __WALL.
9829 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9830 Use lwpid_of.
9831 (sigchld_handler, linux_supports_non_stop, linux_async)
9832 (linux_start_non_stop): New.
9833 (linux_target_ops): Register linux_supports_non_stop, linux_async
9834 and linux_start_non_stop.
9835 (initialize_low): Install SIGCHLD handler.
9836 * thread-db.c (thread_db_create_event, find_one_thread)
9837 (thread_db_get_tls_address): Use lwpid_of.
9838 * win32-low.c (win32_detach): Adjust to use resume_kind.
9839 (win32_wait): Add `options' argument.
9840 * spu-low.c (spu_resume): Adjust to use resume_kind.
9841 (spu_wait): Add `options' argument.
9842
9843 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9844
9845 Decouple target code from remote protocol.
9846
9847 * target.h (enum target_waitkind): New.
9848 (struct target_waitstatus): New.
9849 (struct target_ops) <wait>: Return an unsigned long. Take a
9850 target_waitstatus pointer instead of a char pointer.
9851 (mywait): Likewise.
9852 * target.c (mywait): Change prototype to return an unsigned long.
9853 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9854 * server.h (thread_from_wait, old_thread_from_wait): Delete
9855 declarations.
9856 (prepare_resume_reply): Change prototype to take a
9857 target_waitstatus.
9858 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9859 (last_status, last_ptid): New.
9860 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9861 pid instead of a signal.
9862 (attach_inferior): Remove "status" and "signal" parameters.
9863 Adjust.
9864 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9865 not as an address.
9866 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9867 (handle_v_requests, myresume): Remove "status" and "signal"
9868 parameters. Adjust.
9869 (handle_status): New.
9870 (main): Delete local `status'. Adjust.
9871 * remote-utils.c: Include target.h.
9872 (prepare_resume_reply): Change prototype to take a
9873 target_waitstatus. Adjust.
9874
9875 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9876 interface.
9877 * spu-low.c (spu_wait): Adjust.
9878 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9879 Delete.
9880 (win32_wait): Adjust.
9881
9882 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9883
9884 * target.h (struct thread_resume): Delete leave_stopped member.
9885 (struct target_ops): Add a `n' argument to the `resume' callback.
9886 * server.c (start_inferior): Adjust.
9887 (handle_v_cont, myresume): Adjust.
9888 * linux-low.c (check_removed_breakpoint): Adjust to resume
9889 interface change, and to removed leave_stopped field.
9890 (resume_ptr): Delete.
9891 (struct thread_resume_array): New.
9892 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9893 resume interface change.
9894 (linux_continue_one_thread, linux_queue_one_thread)
9895 (resume_status_pending_p): Check if the resume field is NULL
9896 instead of checking the leave_stopped member.
9897 (linux_resume): Adjust to the target resume interface change.
9898 * spu-low.c (spu_resume): Adjust to the target resume interface
9899 change.
9900 * win32-low.c (win32_detach, win32_resume): Ditto.
9901
9902 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9903
9904 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9905 flag.
9906 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9907 pending.
9908 (linux_continue_one_thread): Only preserve the stepping flag if
9909 there's a pending breakpoint.
9910
9911 2009-03-31 Pedro Alves <pedro@codesourcery.com>
9912
9913 * server.c (main): After the inferior having exited, call
9914 remote_close before exiting gdbserver.
9915
9916 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9917
9918 Fix size of FPSCR in Power 7 processors.
9919 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9920 (PPC_FEATURE_HAS_DFP): New #define.
9921 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9922 size of the FPSCR.
9923
9924 2009-03-23 Pedro Alves <pedro@codesourcery.com>
9925
9926 * server.c (handle_query) Whitespace and formatting.
9927
9928 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9929
9930 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9931 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9932 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9933 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9934 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9935 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9936 Makefile.in, configure.ac: Fix whitespace throughout.
9937 * configure: Regenerate.
9938
9939 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9940
9941 * inferiors.c (find_inferior): Make it safe for the callback
9942 function to delete the currently iterated inferior.
9943
9944 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9945
9946 * Makefile.in (linuw_low_h): Move higher.
9947 (thread-db.o): Depend on $(linux_low_h).
9948
9949 2009-03-17 Pedro Alves <pedro@codesourcery.com>
9950
9951 Rename "process" to "lwp" throughout.
9952
9953 * linux-low.c (all_processes): Rename to...
9954 (all_lwps): ... this.
9955 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
9956 (add_process): Rename to ...
9957 (add_lwp): ... this. Adjust.
9958 (linux_create_inferior): Adjust.
9959 (linux_attach_lwp): Adjust.
9960 (linux_attach): Adjust.
9961 (linux_kill_one_process): Rename to ...
9962 (linux_kill_one_lwp): ... this. Adjust.
9963 (linux_kill): Adjust.
9964 (linux_detach_one_process): Rename to ...
9965 (linux_detach_one_lwp): ... this. Adjust.
9966 (linux_detach): Adjust.
9967 (check_removed_breakpoint): Adjust.
9968 (status_pending_p): Adjust.
9969 (linux_wait_for_process): Rename to ...
9970 (linux_wait_for_lwp): ... this. Adjust.
9971 (linux_wait_for_event): Adjust.
9972 (send_sigstop): Adjust.
9973 (wait_for_sigstop): Adjust.
9974 (stop_all_processes): Rename to ...
9975 (stop_all_lwps): ... this.
9976 (linux_resume_one_process): Rename to ...
9977 (linux_resume_one_lwp): ... this. Adjust.
9978 (linux_set_resume_request, linux_continue_one_thread)
9979 (linux_queue_one_thread, resume_status_pending_p)
9980 (usr_store_inferior_registers, regsets_store_inferior_registers)
9981 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9982 Adjust.
9983 * linux-low.h (get_process): Rename to ...
9984 (get_lwp): ... this. Adjust.
9985 (get_thread_process): Rename to ...
9986 (get_thread_lwp): ... this. Adjust.
9987 (get_process_thread): Rename to ...
9988 (get_lwp_thread): ... this. Adjust.
9989 (struct process_info): Rename to ...
9990 (struct lwp_info): ... this.
9991 (all_processes): Rename to ...
9992 (all_lwps): ... this.
9993 * proc-service.c (ps_lgetregs): Adjust.
9994 * thread-db.c (thread_db_create_event, find_one_thread)
9995 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
9996
9997 2009-03-14 Pedro Alves <pedro@codesourcery.com>
9998
9999 * server.c (handle_query): Handle "qAttached".
10000
10001 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10002
10003 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10004 GPLv3, update license URL.
10005
10006 2009-03-01 Doug Evans <dje@google.com>
10007
10008 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
10009 (server_h): Add gdb_signals.h.
10010 (signals.o): Update.
10011 * server.h (target_signal_from_host,target_signal_to_host_p)
10012 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10013
10014 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10015
10016 * remote-utils.c (getpkt): Also generate remote-debug
10017 information if noack_mode is set.
10018
10019 2009-02-06 Pedro Alves <pedro@codesourcery.com>
10020
10021 * server.c (handle_query): Report qXfer:siginfo:read and
10022 qXfer:siginfo:write as supported and handle them.
10023 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10024 * linux-low.c (linux_xfer_siginfo): New.
10025 (linux_target_ops): Set it.
10026
10027 2009-01-26 Pedro Alves <pedro@codesourcery.com>
10028
10029 * server.c (gdbserver_usage): Mention --remote-debug.
10030 (main): Accept '--remote-debug' switch.
10031
10032 2009-01-18 Doug Evans <dje@google.com>
10033
10034 * regcache.c (new_register_cache): No need to check result of xcalloc.
10035 * server.c (handle_search_memory): Back out calls to xmalloc,
10036 result is checked and error is returned to user upon failure.
10037 (handle_query): Ditto. Add more checks for result of malloc.
10038 (handle_v_cont): Check result of malloc, report error back to
10039 user upon failure.
10040 (handle_v_run): Ditto. Call freeargv.
10041 * server.h (freeargv): Declare.
10042 * utils.c (freeargv): New fn.
10043
10044 2009-01-15 Doug Evans <dje@google.com>
10045
10046 * gdbreplay.c (perror_with_name): Make arg const char *.
10047 * server.h (target_signal_to_name): Make return type const char *.
10048 * thread-db.c (thread_db_err_str): Make return type const char *.
10049 * utils.c (perror_with_name): Make arg const char *.
10050
10051 2009-01-14 Pedro Alves <pedro@codesourcery.com>
10052
10053 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10054 when handling a EXIT_PROCESS_DEBUG_EVENT.
10055
10056 2009-01-06 Joel Brobecker <brobecker@adacore.com>
10057
10058 * gdbreplay.c (gdbreplay_version): Update copyright year.
10059 * server.c (gdbserver_version): Likewise.
10060
10061 2009-01-05 Doug Evans <dje@google.com>
10062
10063 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
10064 (handle_extended_wait): Improve comment.
10065
10066 2008-12-13 Doug Evans <dje@google.com>
10067
10068 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10069 * server.h (ATTR_MALLOC): New macro.
10070 (xmalloc,xcalloc,xstrdup): Declare.
10071 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10072 * inferiors.c: Ditto.
10073 * linux-low.c: Ditto.
10074 * mem-break.c: Ditto.
10075 * regcache.c: Ditto.
10076 * remote-utils.c: Ditto.
10077 * server.c: Ditto.
10078 * target.c: Ditto.
10079 * win32-low.c: Ditto.
10080
10081 2008-12-12 Doug Evans <dje@google.com>
10082
10083 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10084 in debugging printf.
10085
10086 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10087
10088 2008-12-09 Doug Evans <dje@google.com>
10089
10090 * linux-low.h (struct process_info): Delete member tid, unused.
10091 * thread-db.c (find_one_thread): Update.
10092 (maybe_attach_thread): Update.
10093
10094 2008-12-02 Pedro Alves <pedro@codesourcery.com>
10095
10096 * target.h (struct target_ops): Add qxfer_osdata member.
10097 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10098 and dirent.h.
10099 (linux_qxfer_osdata): New functions.
10100 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10101 callback.
10102 * server.c (handle_query): Handle "qXfer:osdata:read:".
10103 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10104 (buffer_xml_printf): New functions.
10105 * server.h (struct buffer): New.
10106 (buffer_grow_str, buffer_grow_str0): New macros.
10107 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10108 (buffer_xml_printf): Declare.
10109
10110 2008-11-24 Doug Evans <dje@google.com>
10111
10112 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10113
10114 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10115
10116 * server.c (handle_v_run): Always use the supplied argument list.
10117
10118 2008-11-19 Bob Wilson <bob.wilson@acm.org>
10119
10120 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10121 (xtensa_regmap_table): Add entry for scompare1.
10122
10123 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10124
10125 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10126 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10127 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10128 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10129 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10130 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10131 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10132 XML target descriptions.
10133 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10134 when inferior is running on an ISA 2.05 or later processor. Add
10135 special case to return offset for full 64-bit slot of FPSCR when
10136 in 32-bits.
10137
10138 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10139
10140 * Makefile.in (SFILES, clean): Added sparc64 files.
10141 (reg-sparc64.o, reg-sparc64.c): New.
10142 * configure.srv (sparc*-*-linux*): New configuration.
10143 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10144 syscall arguments for SPARC.
10145 (regsets_store_inferior_registers): Likewise.
10146 * linux-sparc-low.c: New file.
10147
10148 2008-10-21 Doug Evans <dje@google.com>
10149
10150 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10151 (READLINE_DIR,READLINE_DEP): Delete.
10152 (INTERNAL_CFLAGS): Update.
10153 (LINTFLAGS): Update.
10154
10155 2008-10-10 Pedro Alves <pedro@codesourcery.com>
10156
10157 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10158 whole argv from the last run, not just argv[0].
10159
10160 2008-09-08 Pedro Alves <pedro@codesourcery.com>
10161
10162 * regcache.c (new_register_cache): Return NULL if the register
10163 cache size isn't known yet.
10164 (free_register_cache): Avoid dereferencing a NULL regcache.
10165
10166 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10167
10168 * configure.srv: Merge MIPS and MIPS64.
10169
10170 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10171
10172 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10173
10174 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
10175
10176 * Makefile.in: Add required vsx dependencies.
10177
10178 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10179 Declare init_registers_powerpc_vsx32l.
10180 Declare init_registers_powerpc_vsx64l.
10181 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10182 (ppc_arch_setup): Check for VSX in hwcap.
10183 (ppc_fill_vsxregset): New function.
10184 (ppc_store_vsxregset): New function.
10185 Add new VSX entry in regset_info target_regsets.
10186
10187 * configure.srv: Add new VSX dependencies.
10188
10189 2008-08-12 Pedro Alves <pedro@codesourcery.com>
10190
10191 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10192 (remote_open): Set or clear transport_is_reliable.
10193 (putpkt_binary): Don't expect acks in noack mode.
10194 (getpkt): Don't send ack/nac in noack mode.
10195 * server.c (handle_general_set): Handle QStartNoAckMode.
10196 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10197 qSupported.
10198 (main): Reset noack_mode on every connection.
10199 * server.h (noack_mode): Declare.
10200
10201 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10202
10203 * Makefile.in (GDBREPLAY_OBS): New variable.
10204 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10205
10206 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10207 Daniel Jacobowitz <dan@codesourcery.com>
10208
10209 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10210 (usr_store_inferior_registers): Likewise.
10211 (regsets_store_inferior_registers): Likewise.
10212
10213 2008-07-31 Rolf Jansen <rj@surtec.com>
10214 Pedro Alves <pedro@codesourcery.com>
10215
10216 * configure.ac: Check for memmem declaration.
10217 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10218 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10219 (disable_packet_qfThreadInfo): Unconditionally compile.
10220 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10221 * configure, config.in: Regenerate.
10222
10223 2008-07-28 Doug Kwan <dougkwan@google.com>
10224
10225 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10226 (linux_write_memory): Remove declaration of errno.
10227
10228 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10229
10230 * linux-low.c (handle_extended_wait): Do not use "status"
10231 variable uninitialized.
10232
10233 2008-07-07 Pedro Alves <pedro@codesourcery.com>
10234
10235 * server.c (handle_v_attach): Inhibit reporting dll changes.
10236
10237 2008-06-27 Pedro Alves <pedro@codesourcery.com>
10238
10239 * remote-utils.c (prepare_resume_reply): If requested, don't
10240 output "thread:TID" in the T stop reply.
10241
10242 * server.c (disable_packet_vCont, disable_packet_Tthread)
10243 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10244 (handle_query): If requested, disable support for qC, qfThreadInfo
10245 and qsThreadInfo.
10246 (handle_v_requests): If requested, disable support for vCont.
10247 (gdbserver_show_disableable): New.
10248 (main): Handle --disable-packet and --disable-packet=LIST.
10249
10250 * server.h (disable_packet_vCont, disable_packet_Tthread)
10251 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10252
10253 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10254
10255 * server.c (gdbserver_usage): Mention --version.
10256
10257 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10258
10259 * Makefile.in (gdbreplay.o): New rule.
10260
10261 2008-06-06 Joseph Myers <joseph@codesourcery.com>
10262
10263 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10264 message, not gdbserver.
10265
10266 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
10267 Nathan Sidwell <nathan@codesourcery.com>
10268 Joseph Myers <joseph@codesourcery.com>
10269
10270 * acinclude.m4: Include ../../config/acx.m4.
10271 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10272 * configure, config.in: Regenerate.
10273 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10274 * server.c (gdbserver_version): Print PKGVERSION.
10275 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10276 (main): Adjust gdbserver_usage calls.
10277 * gdbreplay.c (version, host_name): Add declarations.
10278 (gdbreplay_version, gdbreplay_usage): New.
10279 (main): Accept --version and --help options.
10280
10281 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10282
10283 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10284 (arm_breakpoint_at): Handle Thumb.
10285 (the_low_target): Add comment.
10286
10287 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10288
10289 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10290
10291 2008-05-09 Doug Evans <dje@google.com>
10292
10293 * server.h (decode_search_memory_packet): Declare.
10294 * remote-utils.c (decode_search_memory_packet): New fn.
10295 * server.c (handle_search_memory_1): New fn.
10296 (handle_search_memory): New fn.
10297 (handle_query): Process qSearch:memory packets.
10298
10299 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10300
10301 * regcache.c (registers_length): Remove.
10302 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10303 full register packet.
10304 * regcache.h (registers_length): Remove prototype.
10305 * server.h (PBUFSIZ): Define to 16384.
10306
10307 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10308
10309 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10310 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10311 powerpc-64l.o, and powerpc-altivec64l.o.
10312 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10313 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10314 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10315 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10316 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10317 to srv_xmlfiles.
10318
10319 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10320 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10321 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10322 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10323 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10324 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10325 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10326 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10327 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10328 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10329 (clean): Update.
10330
10331 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10332 (init_registers_powerpc_32l): ... this new prototype.
10333 (init_registers_powerpc_32): Remove, replace by ...
10334 (init_registers_powerpc_altivec32l): ... this new prototype.
10335 (init_registers_powerpc_e500): Remove, replace by ...
10336 (init_registers_powerpc_e500l): ... this new prototype.
10337 (init_registers_ppc64): Remove, replace by ...
10338 (init_registers_powerpc_64l): ... this new prototype.
10339 (init_registers_powerpc_64): Remove, replace by ...
10340 (init_registers_powerpc_altivec64l): ... this new prototype.
10341 (ppc_num_regs): Set to 73.
10342 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10343 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10344 (ppc_cannot_store_register): Handle orig_r3 and trap.
10345 (ppc_arch_setup): Update init_registers_... calls.
10346 (ppc_fill_gregset): Handle orig_r3 and trap.
10347
10348 * inferiors.c (clear_inferiors): Reset current_inferior.
10349
10350 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
10351
10352 * acinclude.m4: Add override.m4.
10353 * configure: Regenerate.
10354
10355 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10356
10357 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10358 initial call to init_register_ppc64.
10359
10360 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10361
10362 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10363 single powerpc*-*-linux* case.
10364 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10365
10366 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10367
10368 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
10369 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
10370 from reg_xmlfiles.
10371 * linux-ppc-low.c: Include <elf.h>.
10372 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10373 (ppc_hwcap): New global variable.
10374 (ppc_regmap): Remove __SPE__ #ifdef sections.
10375 (ppc_regmap_e500): New global variable.
10376 (ppc_cannot_store_register): Update __SPE__ special case.
10377 (ppc_get_hwcap): New function.
10378 (ppc_arch_setup): Use it to determine whether inferior supports
10379 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10380 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10381 Do not access registers if target does not support AltiVec.
10382 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10383 Do not access registers if target does not support SPE.
10384 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10385
10386 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10387
10388 * linux-low.c (disabled_regsets, num_regsets): New.
10389 (use_regsets_p): Delete.
10390 (linux_wait_for_process): Clear disabled_regsets.
10391 (regsets_fetch_inferior_registers): Check and set it.
10392 (regsets_store_inferior_registers): Likewise.
10393 (linux_fetch_registers, linux_store_registers): Do not use
10394 use_regsets_p.
10395 (initialize_low): Allocate disabled_regsets.
10396
10397 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10398
10399 * Makefile.in (LIBOBJS): New.
10400 (OBS): Use LIBOBJS.
10401 (memmem.o): New rule.
10402 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10403 * configure: Regenerated.
10404
10405 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10406
10407 * server.c (handle_query): Never return "unsupported" for
10408 qXfer:features:read queries.
10409
10410 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10411
10412 * server.c (get_features_xml): Fix inverted condition.
10413 (handle_query): Always support qXfer:feature:read.
10414
10415 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10416
10417 * server.c (wrapper_argv): New.
10418 (start_inferior): Handle wrapper_argv. If set, expect an extra
10419 trap.
10420 (gdbserver_usage): Document --wrapper.
10421 (main): Parse --wrapper.
10422
10423 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10424
10425 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10426 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10427 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10428 (ppc_set_pc): Likewise.
10429 (ppc_arch_setup): New function.
10430 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10431 of collect_register.
10432 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
10433
10434 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10435
10436 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10437 instead of linux-ppc64-low.o.
10438 * linux-ppc64-low.c: Remove file.
10439 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10440 (linux-ppc64-low.o): Remove rule.
10441
10442 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10443 (init_registers_powerpc_64): Likewise.
10444 (ppc_regmap): Conditionally define depending on __powerpc64__.
10445 (ppc_cannot_store_register): Do not special-case "fpscr" when
10446 compiled on __powerpc64__.
10447 (ppc_collect_ptrace_register): New function.
10448 (ppc_supply_ptrace_register): New function.
10449 (ppc_breakpoint): Change type to "unsigned int".
10450 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10451 (the_low_target): Conditionally provide initializers for the
10452 arch_setup member depending on __powerpc64__. Install
10453 collect_ptrace_register and supply_ptrace_register members.
10454
10455 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10456
10457 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10458 * server.c (gdbserver_xmltarget): Define.
10459 (get_features_xml): Use it to replace "target.xml" and arch_string.
10460
10461 * configure.srv: Remove srv_xmltarget. Add XML files that were
10462 mentioned there to srv_xmlfiles instead. Remove conditional tests
10463 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10464 srv_xmlfiles and srv_regobj to include all possible choices.
10465 * configure.ac (srv_xmltarget): Remove.
10466 (srv_xmlfiles): Do not add "target.xml".
10467 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10468 checks for supplementary target information.
10469 * configure: Regenerate.
10470 * Makefile.in (XML_TARGET): Remove.
10471 (target.xml): Remove rule.
10472 (clean): Do not clean up target.xml.
10473 (.PRECIOUS): Do not mention target.xml.
10474
10475 * target.h (struct target_ops): Remove arch_string member.
10476 * linux-low.c (linux_arch_string): Remove.
10477 (linux_target_ops): Remove arch_string initializer.
10478 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10479 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10480 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10481 * spu-low.c (spu_arch_string): Remove.
10482 (spu_target_ops): Remove arch_string initializer.
10483 * win32-low.c (win32_arch_string): Remove.
10484 (win32_target_ops): Remove arch_string initializer.
10485 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10486 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10487 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10488
10489 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10490
10491 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10492 by collect_ptrace_register and supply_ptrace_register hooks.
10493 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10494 instead of checking for the_low_target.left_pad_xfer.
10495 (usr_store_inferior_registers): Use collect_ptrace_register callback
10496 instead of checking for the_low_target.left_pad_xfer.
10497
10498 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10499 (s390_supply_ptrace_register): Likewise.
10500 (s390_fill_gregset): Call s390_collect_ptrace_register.
10501 (the_low_target): Update.
10502
10503 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10504 (ppc_supply_ptrace_register): Likewise.
10505 (the_low_target): Update.
10506
10507 * linux-i386-low.c (the_low_target): Update.
10508 * linux-x86-64-low.c (the_low_target): Update.
10509
10510 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10511
10512 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10513 reg-s390.o and reg-s390x.o.
10514
10515 * linux-low.c (new_inferior): New global variable.
10516 (linux_create_inferior, linux_attach): Set it.
10517 (linux_wait_for_process): Call the_low_target.arch_setup after the
10518 target has stopped for the first time.
10519 (initialize_low): Do not call the_low_target.arch_setup.
10520
10521 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10522 (s390_set_pc): Likewise.
10523 (s390_arch_setup): New function.
10524 (the_low_target): Use s390_arch_setup as arch_setup routine.
10525
10526 * regcache.c (realloc_register_cache): New function.
10527 (set_register_cache): Call it for each existing regcache.
10528
10529 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10530
10531 * server.h (init_registers): Remove prototype.
10532
10533 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10534 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10535 instead of init_registers ().
10536 * linux-arm-low.c (init_registers_arm): Add prototype.
10537 (init_registers_arm_with_iwmmxt): Likewise.
10538 (the_low_target): Add initializer for arch_setup field.
10539 * linux-cris-low.c (init_registers_cris): Add prototype.
10540 (the_low_target): Add initializer for arch_setup field.
10541 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10542 (the_low_target): Add initializer for arch_setup field.
10543 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10544 (the_low_target): Add initializer for arch_setup field.
10545 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10546 (the_low_target): Add initializer for arch_setup field.
10547 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10548 (the_low_target): Add initializer for arch_setup field.
10549 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10550 (the_low_target): Add initializer for arch_setup field.
10551 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10552 (init_registers_mips64_linux): Likewise.
10553 (the_low_target): Add initializer for arch_setup field.
10554 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10555 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10556 (the_low_target): Add initializer for arch_setup field.
10557 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10558 (init_registers_powerpc_64): Likewise.
10559 (the_low_target): Add initializer for arch_setup field.
10560 * linux-s390-low.c (init_registers_s390): Add prototype.
10561 (init_registers_s390x): Likewise.
10562 (the_low_target): Add initializer for arch_setup field.
10563 * linux-sh-low.c (init_registers_sh): Add prototype.
10564 (the_low_target): Add initializer for arch_setup field.
10565 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10566 (the_low_target): Add initializer for arch_setup field.
10567 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10568 (the_low_target): Add initializer for arch_setup field.
10569
10570 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10571 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10572 instead of init_registers ().
10573 * win32-arm-low.c (init_registers_arm): Add prototype.
10574 (the_low_target): Add initializer for arch_setup field.
10575 * win32-i386-low.c (init_registers_i386): Add prototype.
10576 (the_low_target): Add initializer for arch_setup field.
10577
10578 * spu-low.c (init_registers_spu): Add prototype.
10579 (initialize_low): Call initialie_registers_spu () instead of
10580 initialize_registers ().
10581
10582 2008-02-19 Pedro Alves <pedro@codesourcery.com>
10583
10584 * server.c (handle_v_requests): When handling the vRun and vAttach
10585 packets, if already debugging a process, don't kill it. Return an
10586 error instead.
10587
10588 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10589
10590 * server.c (handle_query): Correct length check.
10591
10592 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10593
10594 * win32-low.c (do_initial_child_stuff): Add process handle
10595 parameter. Set current_process_handle and current_process_id from the
10596 parameters. Clear globals.
10597 (win32_create_inferior): Don't set current_process_handle and
10598 current_process_id here. Instead pass them on the call to
10599 do_initial_child_stuff.
10600 (win32_attach): Likewise.
10601 (win32_clear_inferiors): New.
10602 (win32_kill): Don't close the current process handle or the
10603 current thread handle here. Instead call win32_clear_inferiors.
10604 (win32_detach): Don't open a new handle to the process. Call
10605 win32_clear_inferiors.
10606 (win32_join): Don't rely on current_process_handle; open a new
10607 handle using the process id.
10608 (win32_wait): Call win32_clear_inferiors when the inferior process
10609 has exited.
10610
10611 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10612
10613 * server.c (monitor_show_help): Add "exit".
10614
10615 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10616
10617 * Makefile.in (SFILES): Add linux-xtensa-low.c.
10618 (clean): Add reg-xtensa.c.
10619 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
10620 * configure.srv (xtensa*-*-linux*) New target.
10621 * linux-xtensa-low.c: New.
10622 * xtensa-xtregs.c: New.
10623
10624 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10625
10626 * hostio.c: Don't include errno.h.
10627 (errno_to_fileio_errno): Move to hostio-errno.
10628 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10629 error number outputting to the target->hostio_last_error callback.
10630 (hostio_packet_error): Use FILEIO_EINVAL directly.
10631 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10632 calls to hostio_error.
10633 * hostio-errno.c: New.
10634 * server.h (hostio_last_error_from_errno): Declare.
10635 * target.h (target_ops): Add hostio_last_error member.
10636 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10637 as hostio_last_error handler.
10638 * spu-low.c (spu_target_ops): Likewise.
10639 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10640 (wince_hostio_last_error): New functions.
10641 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10642 as hostio_last_error handler.
10643 (win32_target_ops) [!_WIN32_WCE]: Register
10644 hostio_last_error_from_errno as hostio_last_error handler.
10645 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10646 (hostio-errno.o): New rule.
10647 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10648 * configure.srv (srv_hostio_err_objs): New variable. Default to
10649 hostio-errno.o.
10650 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10651 * configure: Regenerate.
10652
10653 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10654
10655 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10656 (linux_kill, linux_detach): Clean up the process list.
10657 * remote-utils.c (remote_open): Improve port number parsing.
10658 (putpkt_binary, input_interrupt): Only send interrupts if the target
10659 is running.
10660 * server.c (extended_protocol): Make static.
10661 (attached): Define earlier.
10662 (exit_requested, response_needed, program_argv): New variables.
10663 (target_running): New.
10664 (start_inferior): Clear attached here.
10665 (attach_inferior): Set attached here.
10666 (require_running): Define.
10667 (handle_query): Use require_running and target_running. Implement
10668 "monitor exit".
10669 (handle_v_attach, handle_v_run): New.
10670 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10671 (gdbserver_usage): Update.
10672 (main): Redo argument parsing. Handle --debug and --multi. Handle
10673 --attach along with other options or after the port. Save
10674 program_argv. Support no initial program. Resynchronize
10675 communication with GDB after an error. Handle "monitor exit".
10676 Use require_running and target_running. Always allow the extended
10677 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10678 restart in extended mode.
10679 * README: Refer to the GDB manual. Update --attach usage.
10680
10681 2007-12-20 Andreas Schwab <schwab@suse.de>
10682
10683 * linux-low.c (STACK_SIZE): Define.
10684 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10685 (linux_test_for_tracefork): Likewise.
10686
10687 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10688
10689 * linux-low.c (linux_wait_for_event): Update messages. Do not
10690 reinsert auto-delete breakpoints.
10691 * mem-break.c (struct breakpoint): Change return type of handler to
10692 int.
10693 (set_breakpoint_at): Update handler type.
10694 (reinsert_breakpoint_handler): Return 1 instead of calling
10695 delete_breakpoint.
10696 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10697 setting a new one.
10698 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10699 * mem-break.h (set_breakpoint_at): Update handler type.
10700 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10701 * win32-low.c (auto_delete_breakpoint): New.
10702 (get_child_debug_event): Use it.
10703
10704 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10705
10706 * configure.ac: Check for pread and pwrite.
10707 * hostio.c (handle_pread): Fall back to lseek and read.
10708 (handle_pwrite): Fall back to lseek and write.
10709 * config.in, configure: Regenerated.
10710
10711 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10712
10713 * server.c (myresume): Add own_buf argument.
10714 (main): Update calls.
10715
10716 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10717
10718 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10719 * remote-utils.c (remote_open): Do not call disable_async_io.
10720 (block_async_io): Delete.
10721 (unblock_async_io): Make static.
10722 (initialize_async_io): New.
10723 * server.c (handle_v_cont): Handle async I/O here.
10724 (myresume): Likewise. Move other common resume tasks here...
10725 (main): ... from here. Call initialize_async_io. Disable async
10726 I/O before the main loop.
10727 * server.h (initialize_async_io): Declare.
10728 (block_async_io, unblock_async_io): Delete prototypes.
10729 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10730
10731 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10732
10733 * remote-utils.c (readchar): Allow binary data in received messages.
10734
10735 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10736
10737 * win32-low.c (attaching): New global.
10738 (win32_create_inferior): Clear the `attaching' global.
10739 (win32_attach): Set the `attaching' global.
10740 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10741 attaching. Only set a breakpoint at the entry point if not
10742 attaching.
10743
10744 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10745
10746 * server.c (main): Don't report dll events on the initial
10747 connection on attaches.
10748
10749 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10750
10751 * server.c (main): Relax numerical bases supported for the pid of
10752 the --attach command line argument.
10753
10754 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10755
10756 * win32-low.c (win32_attach): Call OpenProcess before
10757 DebugActiveProcess, not after. Add last error output to error
10758 call.
10759
10760 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10761
10762 * win32-low.c (win32_get_thread_context)
10763 (win32_set_thread_context): New functions.
10764 (thread_rec): Use win32_get_thread_context.
10765 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10766 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10767 field.
10768
10769 2007-12-03 Leo Zayas
10770 Pedro Alves <pedro_alves@portugalmail.pt>
10771
10772 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10773 global variables.
10774 (child_add_thread): Minor cleanup.
10775 (child_continue): Resume artificially suspended threads before
10776 calling ContinueDebugEvent.
10777 (suspend_one_thread): New.
10778 (fake_breakpoint_event): New.
10779 (get_child_debug_event): Change return type to int. Check here if
10780 gdb sent an interrupt request. If a soft interrupt was requested,
10781 fake a breakpoint event. Return 0 if there is no event to handle,
10782 and 1 otherwise.
10783 (win32_wait): Don't check here if gdb sent an interrupt request.
10784 Ensure there is a valid event to handle.
10785 (win32_request_interrupt): Add soft interruption method as last
10786 resort.
10787
10788 2007-12-03 Leo Zayas
10789 Pedro Alves <pedro_alves@portugalmail.pt>
10790
10791 * win32-low.h (win32_thread_info): Add descriptions to the
10792 structure members. Replace `suspend_count' counter by a
10793 `suspended' flag.
10794 * win32-low.c (thread_rec): Update condition of when to get the
10795 context from the inferior. Rely on ContextFlags being set if it
10796 has already been retrieved. Only suspend the inferior thread if
10797 we haven't already. Warn if that fails.
10798 (continue_one_thread): s/suspend_count/suspended/. Only call
10799 ResumeThread once. Warn if that fails.
10800
10801 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10802
10803 * win32-low.c (win32_wait): Don't read from the inferior when it
10804 has already exited.
10805
10806 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10807
10808 * Makefile.in (win32_low_h): New variable.
10809 (win32-low.o): Add dependency on $(win32_low_h).
10810 (win32-arm-low.o, win32-i386-low.o): New rules.
10811
10812 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10813
10814 * hostio.c: Correct copyright year.
10815
10816 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10817
10818 * Makefile.in (OBS): Add hostio.o.
10819 (hostio.o): New rule.
10820 * server.h (handle_vFile): Declare.
10821 * hostio.c: New file.
10822 * server.c (handle_v_requests): Take packet_len and new_packet_len
10823 for binary packets. Call handle_vFile.
10824 (main): Update call to handle_v_requests.
10825
10826 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10827
10828 * linux-low.c: Include <sched.h>.
10829
10830 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10831
10832 * linux-low.c (linux_tracefork_grandchild): New.
10833 (linux_tracefork_child): Use clone.
10834 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10835
10836 2007-10-31 Joel Brobecker <brobecker@adacore.com>
10837
10838 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10839
10840 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10841
10842 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10843
10844 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10845
10846 * inferiors.c (change_inferior_id): Delete.
10847 (add_pid_to_list, pull_pid_from_list): New.
10848 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10849 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10850 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10851 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10852 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10853 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10854 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10855 (using_threads): Always set to 1.
10856 (handle_extended_wait): New.
10857 (add_process): Do not set TID.
10858 (linux_create_inferior): Set must_set_ptrace_flags.
10859 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10860 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10861 (linux_thread_alive): Rename TID argument to LWPID.
10862 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10863 (linux_wait_for_event): Do not use TID or check using_threads. Update
10864 call to dead_thread_notify. Call handle_extended_wait.
10865 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10866 (send_sigstop): Delete sigstop_sent.
10867 (wait_for_sigstop): Avoid TID.
10868 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10869 (linux_test_for_tracefork): New.
10870 (linux_lookup_signals): Use thread_db_active and
10871 linux_supports_tracefork_flag.
10872 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10873 * linux-low.h (get_process_thread): Avoid TID.
10874 (struct process_ifo): Move thread_known and tid to the end. Remove
10875 sigstop_sent.
10876 (linux_attach_lwp, thread_db_init): Update prototypes.
10877 * server.h (change_inferior_id): Delete prototype.
10878 (add_pid_to_list, pull_pid_from_list): New prototypes.
10879 * thread-db.c (thread_db_use_events): New.
10880 (find_first_thread): Rename to...
10881 (find_one_thread): ...this. Update callers and messages. Do not
10882 call fatal. Check thread_db_use_events. Do not call
10883 change_inferior_id or new_thread_notify.
10884 (maybe_attach_thread): Update. Do not call new_thread_notify.
10885 (thread_db_init): Set thread_db_use_events. Check use_events.
10886 * utils.c (fatal, warning): Correct message prefix.
10887
10888 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10889
10890 * Makefile.in (clean): Remove new files.
10891 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10892 (powerpc-64.o, powerpc-64.c): New rules.
10893 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10894 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10895 with SPE.
10896 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10897 SPE targets.
10898 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10899 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10900 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10901 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10902 (target_regsets): Add AltiVec and SPE register sets.
10903 * configure.ac: Check for AltiVec and SPE.
10904 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10905 (ppc_fill_vrregset, ppc_store_vrregset): New.
10906 (target_regsets): Add AltiVec register set.
10907 * configure: Regenerated.
10908
10909 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10910
10911 * linux-low.c (O_LARGEFILE): Define.
10912 (linux_read_memory): Use /proc/PID/mem.
10913 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10914 * configure, config.in: Regenerated.
10915
10916 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10917
10918 * linux-low.c (linux_wait_for_event): Do not pass signals while
10919 single-stepping.
10920
10921 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10922
10923 * win32-low.c (create_process): New.
10924 (win32_create_inferior): Use create_process instead of
10925 CreateProcess. If create_process failed retry appending an ".exe"
10926 suffix. Store the GetLastError result immediatelly after
10927 create_process calls and use it on the call to error.
10928
10929 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10930
10931 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10932
10933 2007-08-23 Joel Brobecker <brobecker@adacore.com>
10934
10935 * configure.ac: Switch license to GPLv3.
10936
10937 2007-08-01 Michael Snyder <msnyder@access-company.com>
10938
10939 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10940
10941 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
10942
10943 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10944 typedef.
10945 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10946 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
10947 CloseToolhelp32Snapshot.
10948 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10949 CloseToolhelp32Snapshot.
10950
10951 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
10952
10953 * server.c (main): Check for inferior exit before main loop.
10954
10955 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
10956
10957 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
10958 instead of on tmp_desc.
10959
10960 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
10961 Daniel Jacobowitz <dan@codesourcery.com>
10962
10963 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
10964 (add_thread): Minor cleanups.
10965 (clear_inferiors): Move lower in the file. Clear the DLL
10966 list.
10967 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
10968 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
10969 (xml_escape_text): New.
10970 * server.c (handle_query): Handle qXfer:libraries:read. Report it
10971 for qSupported.
10972 (handle_v_cont): Report errors.
10973 (gdbserver_version): Update.
10974 (main): Correct size of own_buf. Do not report initial DLL events.
10975 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
10976 (unloaded_dll, xml_escape_text): New.
10977 * win32-low.c (enum target_waitkind): Update comments.
10978 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
10979 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
10980 (win32_EnumProcessModules, win32_GetModuleInformation)
10981 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
10982 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
10983 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
10984 (win32_Module32First, win32_Module32Next, load_toolhelp)
10985 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
10986 (get_child_debug_event): Handle DLL events.
10987 (win32_wait): Likewise.
10988
10989 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10990
10991 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
10992 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
10993
10994 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10995
10996 * win32-low.c (handle_output_debug_string): Ignore event if not
10997 waiting.
10998
10999 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11000
11001 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11002
11003 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11004
11005 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11006
11007 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11008
11009 * inferiors.c (change_inferior_id): Add comment.
11010 * linux-low.c (check_removed_breakpoint): Add an early
11011 prototype. Improve debug output.
11012 (linux_attach): Doc update.
11013 (linux_detach_one_process, linux_detach): Clean up before releasing
11014 each process.
11015 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11016 * linux-low.h (struct process_info): Doc improvement.
11017 * mem-break.c (delete_all_breakpoints): New.
11018 * mem-break.h (delete_all_breakpoints): New prototype.
11019 * thread-db.c (find_first_thread): New.
11020 (thread_db_create_event): Call it instead of
11021 thread_db_find_new_threads. Clean up unused variables.
11022 (maybe_attach_thread): Remove first thread handling.
11023 (thread_db_find_new_threads): Use find_first_thread.
11024 (thread_db_get_tls_address): Likewise.
11025
11026 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11027
11028 * thread-db.c (thread_db_find_new_threads): Add prototype.
11029 (thread_db_create_event): Check for the main thread before adding
11030 a new thread.
11031 (maybe_attach_thread): Only enable event reporting if TID == 0.
11032 (thread_db_get_tls_address): Check for new threads.
11033
11034 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11035
11036 * linux-low.c (linux_create_inferior): Try execv before execvp.
11037 * spu-low.c (spu_create_inferior): Likewise.
11038
11039 2007-06-13 Mike Frysinger <vapier@gentoo.org>
11040
11041 * linux-low.c (linux_create_inferior): Change execv to execvp.
11042 * spu-low.c (spu_create_inferior): Likewies.
11043
11044 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11045
11046 * Makefile.in (clean): Clean new files instead of deleted ones.
11047 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11048 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11049 rules.
11050 * configure.srv: Specify XML files and new regformats for MIPS and
11051 MIPS64 GNU/Linux.
11052 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11053 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11054 an entry for the restart register.
11055 (mips_cannot_fetch_register, mips_cannot_store_register)
11056 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11057 register names to match the XML descriptions.
11058 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11059 restart register instead of $0.
11060
11061 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11062 Markus Deuling <deuling@de.ibm.com>
11063
11064 * remote-utils.c (decode_xfer_write): New function.
11065 * server.h (decode_xfer_write): Add prototype.
11066 * server.c (handle_query): Add PACKET_LEN argument. Support
11067 qXfer:spu:read and qXfer:spu:write packets.
11068 (main): Pass packet_len to handle_query.
11069 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11070 * target.h (target_ops): Add qxfer_spu.
11071
11072 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11073
11074 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11075 accessing non-seekable spufs files.
11076
11077 2007-05-16 Markus Deuling <deuling@de.ibm.com>
11078
11079 * server.c (handle_query): Add reply for qC packet.
11080
11081 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11082 Leo Zayas <lerele@champenstudios@com>
11083
11084 * server.h (check_remote_input_interrupt_request): New function.
11085 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11086 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11087 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11088 (check_remote_input_interrupt_request): New function.
11089 * server.h (check_remote_input_interrupt_request): Declare.
11090 * win32-low.c (winapi_DebugBreakProcess,
11091 winapi_GenerateConsoleCtrlEvent): New typedefs.
11092 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11093 to 250 ms.
11094 (win32_wait): Check for remote interrupt request
11095 with check_remote_input_interrupt_request.
11096 (win32_request_interrupt): New function.
11097 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11098
11099 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11100
11101 * win32-low.c (debug_registers_changed,
11102 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11103 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11104 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11105 (thread_rec): Get context using the low target.
11106 (child_add_thread): Call thread_added on the low target,
11107 which does the same thing.
11108 (regptr): Delete.
11109 (do_initial_child_stuff): Remove debug registers references.
11110 Set context using the low target. Resume threads after
11111 setting the contexts.
11112 (child_continue): Remove dead variable. Remove debug
11113 registers references.
11114 (child_fetch_inferior_registers): Go through the low target.
11115 (do_child_store_inferior_registers): Remove.
11116 (child_store_inferior_registers): Go through the low target.
11117 (win32_resume): Remove debug registers references.
11118 Set context using the low target.
11119 (handle_exception): Change return type to void. Don't record
11120 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11121 first chance exception.
11122 (get_child_debug_event): Change return type to void. Remove
11123 goto loop. Always return after waiting for debug event.
11124 (win32_wait): Convert to switch statement. Handle spurious
11125 events.
11126
11127 * win32-i386-low.c (debug_registers_changed,
11128 debug_registers_used): New.
11129 (initial_stuff): Rename to ...
11130 (i386_initial_stuff): ... this. Clear debug registers
11131 state variables.
11132 (store_debug_registers): Delete.
11133 (i386_get_thread_context): New.
11134 (load_debug_registers): Delete.
11135 (i386_set_thread_context): New.
11136 (i386_thread_added): New.
11137 (single_step): Rename to ...
11138 (i386_single_step): ... this.
11139 (do_fetch_inferior_registers): Rename to ...
11140 (i386_fetch_inferior_register): ... this.
11141 (i386_store_inferior_register): New.
11142 (the_low_target): Adapt to new interface.
11143
11144 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11145 (arm_get_thread_context): New.
11146 (arm_set_thread_context): New.
11147 (regptr): New.
11148 (do_fetch_inferior_registers): Rename to ...
11149 (arm_fetch_inferior_register): ... this.
11150 (arm_store_inferior_register): New.
11151 (arm_wince_breakpoint): Reimplement as unsigned long.
11152 (arm_wince_breakpoint_len): Define.
11153 (the_low_target): Adapt to new interface.
11154
11155 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11156 load_debug_registers. Add get_thread_context, set_thread_context,
11157 thread_added and store_inferior_register. Rename
11158 fetch_inferior_registers to fetch_inferior_register.
11159 (regptr): Remove declaration.
11160
11161 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11162
11163 * linux-low.c (linux_detach): Change return type to int. Return 0.
11164 * spu-low.c (spu_detach): Likewise.
11165
11166 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11167
11168 * target.h (target_ops): Change return type of detach to int.
11169 Add join.
11170 (join_inferior): New.
11171 * server.c (main): Don't skip detach support on mingw32.
11172 If the inferior doesn't support detaching return error.
11173 Call join_inferior instead of using waitpid.
11174 * linux-low.c (linux_join): New.
11175 (linux_target_op): Add linux_join.
11176 * spu-low.c (spu_join): New.
11177 (spu_target_ops): Add spu_join.
11178 * win32-low.c (win32_detach): Adapt to new interface.
11179 Reopen current_process_handle before detaching. Issue a child
11180 resume before detaching.
11181 (win32_join): New.
11182 (win32_target_op): Add win32_join.
11183
11184 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11185
11186 * win32-low.c (win32-attach): Fix return value.
11187 * target.h (target_ops): Describe ATTACH return values.
11188
11189 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11190
11191 * win32-low.c (GETPROCADDRESS): Define.
11192 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11193 (winapi_DebugSetProcessKillOnExit): Likewise.
11194 (win32_create_inferior): Force usage of ansi CreateProcessA.
11195 (win32_attach): Use GETPROCADDRESS.
11196 (win32_detach): Likewise.
11197
11198 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11199
11200 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11201
11202 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11203
11204 * win32-low.c: Commit leftover changes from 2007-03-29.
11205
11206 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11207
11208 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11209 fields short instead of int. Add explicit padding.
11210 (i387_cache_to_fsave): Remove unnecessary casts.
11211 (i387_fsave_to_cache): Doc fix.
11212 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11213
11214 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11215
11216 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11217 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11218
11219 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11220
11221 * configure.srv (arm*-*-mingw32ce*): Move near the other
11222 arm targets.
11223
11224 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11225
11226 * configure.ac: Add errno checking.
11227 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11228 sys/file.h and malloc.h.
11229 (AC_CHECK_DECLS): Add perror.
11230 (srv_mingwce): Handle.
11231 * configure.srv (i[34567]86-*-cygwin*): Add
11232 win32-i386-low.o to srv_tgtobj.
11233 (i[34567]86-*-mingw*): Likewise.
11234 (arm*-*-mingw32ce*): Add case.
11235 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11236 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11237 [__MINGW32CE__] (strerror): New function.
11238 [__MINGW32CE__] (errno): Define to GetLastError.
11239 [__MINGW32CE__] (COUNTOF): New macro.
11240 (remote_open): Remove extra close call.
11241 * mem-break.c (delete_breakpoint_at): New function.
11242 * mem-break.h (delete_breakpoint_at): Declare.
11243 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11244 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11245 [USE_WIN32API] (read, write): Add char* casts.
11246 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11247 * server.h: Include wincecompat.h on Windows CE.
11248 [HAVE_ERRNO_H]: Check.
11249 (perror): Declare if not declared.
11250 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11251 (perror_with_name): Remove errno declaration.
11252 * wincecompat.h: New.
11253 * wincecompat.c: New.
11254 * win32-low.h: New.
11255 * win32-arm-low.c: New.
11256 * win32-i386-low.c: New.
11257 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11258 (OUTMSG2): Make it safe.
11259 (_T): New macro.
11260 (COUNTOF): New macro.
11261 (NUM_REGS): Get it from the low target.
11262 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11263 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11264 (thread_rec): Let low target handle debug registers.
11265 (child_add_thread): Likewise.
11266 (child_init_thread_list): Likewise.
11267 (continue_one_thread): Likewise.
11268 (regptr): New.
11269 (do_child_fetch_inferior_registers): Move to ...
11270 * win32-i386-low.c: ... here, and rename to ...
11271 (do_fetch_inferior_registers): ... this.
11272 * win32-low.c (child_fetch_inferior_registers):
11273 Go through the low target.
11274 (do_child_store_inferior_registers): Use regptr.
11275 (strwinerror): New function.
11276 (win32_create_inferior): Handle Windows CE.
11277 Use strwinerror instead of strerror on Windows error
11278 codes. Add program to the error output.
11279 Don't close the main thread handle on Windows CE.
11280 (win32_attach): Use coredll.dll on Windows CE.
11281 (win32_kill): Close current process and current
11282 thread handles.
11283 (win32_detach): Use coredll.dll on Windows CE.
11284 (win32_resume): Let low target handle debug registers, and
11285 step request.
11286 (handle_exception): Add/Remove initial breakpoint. Avoid
11287 non-existant WSTOPSIG on Windows CE.
11288 (win32_read_inferior_memory): Cast to remove warning.
11289 (win32_arch_string): Go through the low target.
11290 (initialize_low): Call set_breakpoint_data with the low
11291 target's breakpoint.
11292 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11293 FOP_REGNUM, mappings): Move to ...
11294 * win32-i386-low.c: ... here.
11295 * win32-low.c (win32_thread_info): Move to ...
11296 * win32-low.h: ... here.
11297 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11298 win32-arm-low.c and wincecompat.c.
11299 (all:): Add $EXEEXT.
11300 (install-only:): Likewise.
11301 (gdbserver:): Likewise.
11302 (gdbreplay:): Likewise.
11303 * config.in: Regenerate.
11304 * configure: Regenerate.
11305
11306 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11307
11308 * win32-low.c: Rename typedef thread_info to
11309 win32_thread_info throughout.
11310
11311 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11312
11313 * win32-i386-low.c: Rename to ...
11314 * win32-low.c: ... this.
11315 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11316 * Makefile.in: Likewise.
11317
11318 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11319
11320 * remote-utils.c (monitor_output): Constify msg parameter.
11321 * server.h (monitor_output): Likewise.
11322 * win32-i386-low.c (handle_output_debug_string): New.
11323 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11324 handle_output_debug_string.
11325 (get_child_debug_event): Likewise.
11326
11327 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11328
11329 * server.c (main): Correct strtoul check.
11330
11331 2007-03-27 Jon Ringle <jon@ringle.org>
11332
11333 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11334
11335 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11336
11337 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11338
11339 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11340
11341 * terminal.h: Check HAVE_SGTTY_H.
11342
11343 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
11344
11345 * remote-utils.c (remote_open): Print out the assigned port number.
11346
11347 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11348
11349 * remote-utils.c (monitor_output): New function.
11350 * server.c (debug_threads): Define here.
11351 (monitor_show_help): New function.
11352 (handle_query): Handle qRcmd.
11353 (main): Do not handle 'd' packet.
11354 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11355 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11356 of debug_threads.
11357
11358 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11359
11360 * Makefile.in (EXEEXT): New.
11361 (clean): Use $(EXEEXT).
11362
11363 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11364
11365 * target.h (target_ops): Rename send_signal to request_interrupt,
11366 and remove enum target_signal parameter.
11367 * linux-low.c (linux_request_interrupt): Rename from
11368 linux_send_signal, and always send SIGINT.
11369 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11370 and always send SIGINT.
11371 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11372 of send_signal.
11373 (input_interrupt): Likewise.
11374
11375 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11376
11377 * server.c (get_features_xml): Check if target implemented
11378 arch_string.
11379 * win32-i386-low.c (win32_arch_string): New.
11380 (win32_target_ops): Add win32_arch_string as arch_string member.
11381
11382 2007-02-22 Markus Deuling <deuling@de.ibm.com>
11383
11384 * spu-low.c (spu_arch_string): New.
11385 (spu_target_ops): Add spu_arch_string.
11386
11387 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11388
11389 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11390 * configure.ac: Do not check for terminal.h.
11391 * configure, config.in: Regenerated.
11392
11393 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11394
11395 * Makefile.in (OBS): Add $(XML_BUILTIN).
11396 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11397 (clean): Update.
11398 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11399 (arm-with-iwmmxt.c): New.
11400 * config.in, configure: Regenerate.
11401 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11402 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11403 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11404 (arm*-*-linux*): Add iWMMXt and regset support.
11405 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11406 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11407 (arm_store_wmmxregset, target_regsets): New.
11408 * server.c (get_features_xml): Take annex argument. Check builtin
11409 XML documents.
11410 (handle_query): Handle multiple annexes.
11411
11412 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11413
11414 * remote-utils.c [USE_WIN32API] (read, write): Define.
11415 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11416 write.
11417
11418 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11419
11420 * linux-i386-low.c (the_low_target): Set arch_string.
11421 * linux-x86-64-low.c (the_low_target): Likewise.
11422 * linux-low.c (linux_arch_string): New.
11423 (linux_target_ops): Add it.
11424 * linux-low.h (struct linux_target_ops): Add arch_string.
11425 * server.c (write_qxfer_response): Use const void * for DATA.
11426 (get_features_xml): New.
11427 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11428 * target.h (struct target_ops): Add arch_string method.
11429
11430 2007-01-03 Denis Pilat <denis.pilat@st.com>
11431 Daniel Jacobowitz <dan@codesourcery.com>
11432
11433 * linux-low.c (linux_kill): Handle being called with no threads.
11434 * win32-i386-low.c (win32_kill): Likewise.
11435 (get_child_debug_event): Clear current_process_handle.
11436
11437 2006-12-30 Denis PILAT <denis.pilat@st.com>
11438 Daniel Jacobowitz <dan@codesourcery.com>
11439
11440 * remote-utils.c (remote_open): Check the type of specified
11441 serial port devices before opening them.
11442 * server.c (main): Kill the inferior if an error occurs during
11443 the first remote_open.
11444
11445 2006-12-05 Markus Deuling <deuling@de.ibm.com>
11446
11447 * README: Update supported targets.
11448
11449 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11450
11451 * Makefile.in (clean): Remove reg-mips64.c.
11452 (reg-mips64.c, reg-mips64.o): New rules.
11453 * configure.srv: Handle mips64. Include regset support for mips.
11454 * linux-mips-low.c (union mips_register): New.
11455 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11456 (mips_breakpoint, mips_breakpoint_at): Use int.
11457 (mips_collect_register, mips_supply_register)
11458 (mips_collect_register_32bit, mips_supply_register_32bit)
11459 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11460 (mips_store_fpregset, target_regsets): New.
11461 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11462
11463 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11464
11465 * configure.srv: Add target "spu*-*-*".
11466 * Makefile.in (clean): Remove reg-spu.c.
11467 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11468 * spu-low.c: New file.
11469
11470 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11471
11472 * configure.ac: Correct td_thr_tls_get_addr test.
11473 * configure: Regenerated.
11474
11475 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11476
11477 * linux-low.c (linux_wait_for_event): Reformat. Use the
11478 pass_signals array.
11479 * remote-utils.c (decode_address_to_semicolon): New.
11480 * server.c (pass_signals, handle_general_set): New.
11481 (handle_query): Mention QPassSignals for qSupported.
11482 (main): Call handle_general_set.
11483 * server.h (pass_signals, decode_address_to_semicolon): New.
11484
11485 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11486
11487 * server.c (handle_query): Correct error handling for read_auxv.
11488
11489 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11490
11491 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11492 and srv_linux_thread_db to yes.
11493 * linux-s390-low.c (s390_fill_gregset): New function.
11494 (target_regsets): Define data structure.
11495
11496 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11497
11498 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11499 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11500 * config.in, configure: Regenerated.
11501 * inferiors.c (gdb_id_to_thread): New function.
11502 (gdb_id_to_thread_id): Use it.
11503 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11504 * linux-low.h (struct process_info): Add th member.
11505 (thread_db_get_tls_address): New prototype.
11506 * remote-utils.c (decode_address): Make non-static.
11507 * server.c (handle_query): Handle qGetTLSAddr.
11508 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11509 * target.h (struct target_ops): Add get_tls_address.
11510 * thread-db.c (maybe_attach_thread): Save the thread handle.
11511 (thread_db_get_tls_address): New.
11512
11513 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11514
11515 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11516 (linux_resume_one_process): Take a siginfo_t *. Update all
11517 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11518 (struct pending_signals): Add a siginfo_t.
11519 (linux_wait_for_process): Always set last_status.
11520 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11521 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11522 * linux-low.h (struct process_info): Add last_status.
11523
11524 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11525
11526 * remote-utils.c (try_rle): New function.
11527 (putpkt_binary): Use it.
11528
11529 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11530
11531 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11532 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11533 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11534 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11535 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11536 point registers.
11537
11538 2006-08-08 Richard Sandiford <richard@codesourcery.com>
11539
11540 * server.c (terminal_fd): New variable.
11541 (old_foreground_pgrp): Likewise.
11542 (restore_old_foreground_pgrp): New function.
11543 (start_inferior): Record the terminal file descriptor in terminal_fd
11544 and its original foreground group in old_foreground_pgrp. Register
11545 restore_old_foreground_pgrp with atexit().
11546
11547 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11548
11549 * server.c (handle_query): Correct qPart to qXfer.
11550
11551 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11552
11553 * configure.ac: Check for more headers which are missing on
11554 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11555 * configure.srv: Add Cygwin and mingw32.
11556 * remote-utils.c: Don't include headers unconditionally which
11557 are missing on mingw32. Include <winsock.h> for mingw32.
11558 (remote_open): Adjust for mingw32 support. Flush
11559 standard error after writing to it.
11560 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11561 (unblock_async_io, enable_async_io, disable_async_io)
11562 (readchar, getpkt): Update for Winsock support.
11563 (prepare_resume_reply): Expect a protocol signal number.
11564 * server.c: Disable <sys/wait.h> on mingw32.
11565 (start_inferior): Adjust for mingw32 support. Flush
11566 standard error after writing to it.
11567 (attach_inferior): Likewise. Use protocol signal
11568 numbers.
11569 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11570 and names.
11571 * win32-i386-low.c: New file.
11572 * Makefile.in (XM_CLIBS): Set.
11573 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11574 (win32-i386-low.o): New dependency rule.
11575 * linux-low.c (linux_wait): Use target signal numbers.
11576 * target.h (struct target_ops): Doc fix.
11577 * server.h (target_signal_to_name): New prototype.
11578 * gdbreplay.c: Don't include headers unconditionally which
11579 are missing on mingw32. Include <winsock.h> for mingw32.
11580 (remote_close, remote_open): Adjust for Winsock support.
11581 * configure, config.in: Regenerated.
11582
11583 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11584
11585 * server.c (decode_xfer_read, write_qxfer_response): New.
11586 (handle_query): Take a packet length argument. Handle
11587 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11588 the qSupported response.
11589 (main): Update call to handle_query.
11590
11591 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11592
11593 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11594 (putpkt_binary): Renamed from putpkt and adjusted for binary
11595 data.
11596 (putpkt): New wrapper for putpkt_binary.
11597 (readchar): Don't mask off the high bit.
11598 (decode_X_packet): New function.
11599 * server.c (main): Call putpkt_binary if a handler sets the packet
11600 length. Save the length of the incoming packet. Handle 'X'.
11601 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11602
11603 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11604
11605 * server.c (handle_query): Handle qSupported.
11606
11607 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11608
11609 * remote-utils.c (all_symbols_looked_up): New variable.
11610 (look_up_one_symbol): Check it.
11611 * server.h (look_up_one_symbol): New declaration.
11612 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11613
11614 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11615
11616 * Makefile.in (linux-arm-low.o): Update dependencies.
11617 * linux-arm-low.c: Include "gdb_proc_service.h".
11618 (PTRACE_GET_THREAD_AREA): Define.
11619 (ps_get_thread_area): New function.
11620
11621 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11622
11623 * configure.srv (m68k*-*-uclinux*): New target.
11624 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11625 (linux_resume_one_process): Remove extraneous cast.
11626 (linux_read_offsets): New.
11627 (linux_target_op): Add linux_read_offsets on mmuless systems.
11628 * server.c (handle_query): Add qOffsets logic.
11629 * target.h (struct target_ops): Add read_offsets.
11630
11631 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11632
11633 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11634 (PTRACE_GET_THREAD_AREA): Define.
11635 (ps_get_thread_area): New function.
11636 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11637 (linux-x86-64-low.o): Update.
11638
11639 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11640
11641 * configure.ac: Remove checks for prfpregset_t.
11642 * gdb_proc_service.h: New file.
11643 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11644 new "gdb_proc_service.h".
11645 * proc-service.c: Likewise.
11646 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11647 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11648 * Makefile.in (gdb_proc_service_h): Updated.
11649 * configure, config.in: Regenerated.
11650
11651 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11652
11653 * remote-utils.c (prepare_resume_reply): Move declaration
11654 of gdb_id_from_wait to the top of the block.
11655
11656 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11657
11658 * linux-low.c (regsets_store_inferior_registers): Read the regset
11659 from the target before filling it.
11660
11661 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11662
11663 * server.c (attach_inferior): Return SIGTRAP for a successful
11664 attach.
11665
11666 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11667
11668 * Makefile.in (OBS): Add version.o.
11669 (STAGESTUFF): Delete.
11670 (version.o): Add dependencies.
11671 (version.c): Replace rule.
11672 (clean): Remove version.c.
11673 * server.c (gdbserver_version): New.
11674 (gdbserver_usage): Use printf.
11675 (main): Handle --version and --help.
11676 * server.h (version, host_name): Add declarations.
11677
11678 2005-12-23 Eli Zaretskii <eliz@gnu.org>
11679
11680 * linux-arm-low.c:
11681 * linux-arm-low.c:
11682 * inferiors.c:
11683 * i387-fp.h:
11684 * i387-fp.c:
11685 * gdbreplay.c:
11686 * regcache.c:
11687 * proc-service.c:
11688 * mem-break.h:
11689 * mem-break.c:
11690 * linux-x86-64-low.c:
11691 * linux-sh-low.c:
11692 * linux-s390-low.c:
11693 * linux-ppc64-low.c:
11694 * linux-ppc-low.c:
11695 * linux-mips-low.c:
11696 * linux-m68k-low.c:
11697 * linux-m32r-low.c:
11698 * linux-low.h:
11699 * linux-low.c:
11700 * linux-ia64-low.c:
11701 * linux-i386-low.c:
11702 * linux-crisv32-low.c:
11703 * thread-db.c:
11704 * terminal.h:
11705 * target.h:
11706 * target.c:
11707 * server.h:
11708 * server.c:
11709 * remote-utils.c:
11710 * regcache.h:
11711 * utils.c:
11712 * Makefile.in:
11713 * configure.ac:
11714 * gdbserver.1: Add (C) after Copyright. Update the FSF
11715 address.
11716
11717 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11718
11719 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11720 (arm_breakpoint_at): Recognize both breakpoints.
11721 (the_low_target): Use the correct breakpoint instruction.
11722
11723 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11724
11725 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11726 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11727 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11728 (the_low_target): Update.
11729
11730 2005-10-25 Andreas Schwab <schwab@suse.de>
11731
11732 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11733
11734 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11735 (ia64_num_regs): Reduce to 462.
11736
11737 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11738
11739 * acinclude.m4: Correct quoting.
11740 * aclocal.m4: Regenerated.
11741
11742 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11743 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11744 (thread_db_init): Call thread_db_err_str.
11745 * configure.ac: Check for TD_VERSION.
11746 * config.in, configure: Regenerated.
11747
11748 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11749
11750 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11751
11752 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11753
11754 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11755 is not available. Define HAVE_PTRACE_GETREGS if it is.
11756 * config.in, configure: Regenerated.
11757 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11758 * linux-i386-low.c, linux-m68k-low.c: Update to use
11759 HAVE_PTRACE_GETREGS.
11760 * linux-low.c (regsets_fetch_inferior_registers)
11761 (regsets_store_inferior_registers): Only return 0 if we processed
11762 GENERAL_REGS.
11763 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11764 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11765
11766 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11767
11768 * inferiors.c (struct thread_info): Add gdb_id.
11769 (add_thread): Add gdb_id argument.
11770 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11771 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11772 calls to add_thread.
11773 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11774 * server.c (handle_query): Use thread_to_gdb_id.
11775 (handle_v_cont, main): Use gdb_id_to_thread_id.
11776 * server.h (add_thread): Update prototype.
11777 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11778 prototypes.
11779
11780 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11781
11782 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11783 left-padded registers.
11784 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11785 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11786
11787 2005-07-01 Steve Ellcey <sje@cup.hp.com>
11788
11789 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11790 * configure: Regenerate.
11791 * config.in: Regenerate.
11792 * server.h (NEED_DECLARATION_STRERROR):
11793 Replace with !HAVE_DECL_STRERROR.
11794
11795 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11796
11797 * linux-low.c (linux_wait, linux_send_signal): Don't test
11798 an unsigned long variable for > 0 if it could be MAX_ULONG.
11799 * server.c (myresume): Likewise.
11800 * target.c (set_desired_inferior): Likewise.
11801
11802 2005-06-13 Mark Kettenis <kettenis@gnu.org>
11803
11804 * configure.ac: Simplify and improve check for socklen_t.
11805 * configure, config.in: Regenerate.
11806
11807 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11808
11809 * acconfig.h: Remove.
11810 * configure.ac: Add a test for socklen_t. Use three-argument
11811 AC_DEFINE throughout.
11812 * config.in: Regenerated using autoheader 2.59.
11813 * configure: Regenerated.
11814
11815 * gdbreplay.c (socklen_t): Provide a default.
11816 (remote_open): Use socklen_t.
11817 * remote-utils.c (socklen_t): Provide a default.
11818 (remote_open): Use socklen_t.
11819 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11820 unsigned char.
11821
11822 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11823 char for buffers.
11824 * linux-low.c (linux_read_memory, linux_write_memory)
11825 (linux_read_auxv): Likewise.
11826 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11827 (check_mem_write): Likewise.
11828 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11829 Likewise.
11830 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11831 (registers_from_string, register_data): Likewise.
11832 * server.c (handle_query, main): Likewise.
11833 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11834 (decode_M_packet): Likewise.
11835 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11836 * target.h (struct target_ops): Update read_memory, write_memory,
11837 and read_auxv.
11838 (read_inferior_memory, write_inferior_memory): Update.
11839 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11840 to unsigned char *.
11841 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11842 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11843 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11844 linux-s390-low.c, linux-sh-low.c: Update for changes in
11845 read_inferior_memory and the_low_target->breakpoint.
11846
11847 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11848
11849 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11850 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11851 * configure.srv: Add powerpc64-*-linux*.
11852 * linux-ppc64-low.c: New file.
11853
11854 2005-05-23 Orjan Friberg <orjanf@axis.com>
11855
11856 * linux-cris-low.c: New file with support for CRIS.
11857 * linux-crisv32-low.c: Ditto for CRISv32.
11858 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11859 (clean): Add reg-cris.c and reg-crisv32.c.
11860 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
11861 reg-crisv32.o, and reg-crisv32.c to make rules.
11862 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11863 recognized targets.
11864
11865 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11866
11867 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11868 of sizeof (PTRACE_XFER_TYPE).
11869 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11870
11871 2005-05-12 Orjan Friberg <orjanf@axis.com>
11872
11873 * target.h (struct target_ops): Add insert_watchpoint,
11874 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11875 pointers for hardware watchpoint support.
11876 * linux-low.h (struct linux_target_ops): Ditto.
11877 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11878 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11879 to linux_target_ops.
11880 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11881 reply packet.
11882 * server.c (main): Recognize 'Z' and 'z' packets.
11883
11884 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11885
11886 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11887 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11888 (the_low_target): Add new members.
11889
11890 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11891
11892 * proc-service.c (ps_lgetregs): Search all_processes instead of
11893 all_threads.
11894
11895 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11896
11897 * server.c (start_inferior): Change return type to int.
11898 (attach_inferior): Change sigptr to int *.
11899 (handle_v_cont, handle_v_requests): Change signal to int *.
11900 (main): Change signal to int.
11901
11902 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
11903
11904 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11905 * configure.srv: Add m32r*-*-linux*.
11906 * linux-m32r-low.c: New file.
11907
11908 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11909
11910 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11911
11912 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11913
11914 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11915 Take unsigned long arguments for PIDs.
11916 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11917 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11918 (wait_for_sigstop, linux_resume_one_process)
11919 (regsets_fetch_inferior_registers, linux_send_signal)
11920 (linux_read_auxv): Likewise. Update the types of variables holding
11921 PIDs. Update format string specifiers.
11922 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11923 * remote-utils.c (prepare_resume_reply): Likewise.
11924 * server.c (cont_thread, general_thread, step_thread)
11925 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11926 unsigned long.
11927 (handle_query): Update format specifiers.
11928 (handle_v_cont, main): Use strtoul for thread IDs.
11929 * server.h (struct inferior_list_entry): Use unsigned long for ID.
11930 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11931 (general_thread, step_thread, thread_from_wait)
11932 (old_thread_from_wait): Update.
11933 * target.h (struct thread_resume): Use unsigned long for THREAD.
11934 (struct target_ops): Use unsigned long for arguments to attach and
11935 thread_alive.
11936
11937 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
11938
11939 * acinclude.m4: Include bfd/bfd.m4 directly.
11940 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
11941 <agriffis@toolchain.org>.
11942 * aclocal.m4, configure: Regenerated.
11943
11944 2005-01-07 Andrew Cagney <cagney@gnu.org>
11945
11946 * configure.ac: Rename configure.in, require autoconf 2.59.
11947 * configure: Re-generate.
11948
11949 2004-12-08 Daniel Jacobowitz <dan@debian.org>
11950
11951 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
11952 LIBS when finished.
11953 * aclocal.m4: Regenerated.
11954 * configure: Regenerated.
11955
11956 2004-11-21 Andreas Schwab <schwab@suse.de>
11957
11958 * linux-m68k-low.c (m68k_num_gregs): Define.
11959 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
11960 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
11961 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
11962 (m68k_breakpoint_at): New. Add to the_low_target.
11963
11964 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
11965 srv_linux_thread_db to yes.
11966
11967 2004-10-20 Joel Brobecker <brobecker@gnat.com>
11968
11969 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
11970 (ARCH_SET_FS): Likewise.
11971 (ARCH_GET_FS): Likewise.
11972 (ARCH_GET_GS): Likewise.
11973
11974 2004-10-16 Daniel Jacobowitz <dan@debian.org>
11975
11976 * linux-i386-low.c (ps_get_thread_area): New.
11977 * linux-x86-64-low.c (ps_get_thread_area): New.
11978 * linux-low.c: Include <sys/syscall.h>.
11979 (linux_kill_one_process): Don't kill the first thread here.
11980 (linux_kill): Kill the first thread here.
11981 (kill_lwp): New function.
11982 (send_sigstop, linux_send_signal): Use it.
11983 * proc-service.c: Clean up #ifdefs.
11984 (fpregset_info): Delete.
11985 (ps_lgetregs): Update and enable implementation.
11986 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
11987 implementations.
11988 * remote-utils.c (struct sym_cache, symbol_cache): New.
11989 (input_interrupt): Print a clearer message.
11990 (async_io_enabled): New variable.
11991 (enable_async_io, disable_async_io): Use it. Update comments.
11992 (look_up_one_symbol): Use the symbol cache.
11993 * thread-db.c (thread_db_look_up_symbols): New function.
11994 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
11995
11996 2004-10-16 Daniel Jacobowitz <dan@debian.org>
11997
11998 * configure.in: Test for -rdynamic.
11999 * configure: Regenerated.
12000 * Makefile (INTERNAL_LDFLAGS): New.
12001 (gdbserver, gdbreplay): Use it.
12002
12003 2004-09-02 Andrew Cagney <cagney@gnu.org>
12004
12005 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12006
12007 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
12008
12009 * linux-low.c (linux_wait): Clear all_processes list also.
12010
12011 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12012
12013 * linux-low.c: Include <errno.h>. Remove extern declaration of
12014 errno.
12015
12016 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12017
12018 * gdbreplay.c, server.h, utils.c: Update copyright years.
12019
12020 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12021
12022 * server.c (main): Print child status or termination signal from
12023 variable 'signal', not 'sig'.
12024
12025 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12026
12027 * linux-low.c (linux_read_memory): Change return type to
12028 int. Check for and return error from ptrace().
12029 * target.c (read_inferior_memory): Change return type to int. Pass
12030 back return status from the_target->read_memory().
12031 * target.h (struct target_ops): Adapt *read_memory() prototype.
12032 Update comment.
12033 (read_inferior_memory): Adapt prototype.
12034 * server.c (main): Return an error packet if
12035 read_inferior_memory() returns an error.
12036
12037 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
12038
12039 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12040 Unify with other clean targets.
12041
12042 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12043
12044 * server.c (handle_v_cont): Call set_desired_inferior.
12045
12046 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12047
12048 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12049
12050 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12051
12052 * linux-low.c (linux_wait): Unblock async I/O.
12053 (linux_resume): Block and enable async I/O.
12054 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12055 * server.h (block_async_io, unblock_async_io): Add prototypes.
12056
12057 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12058
12059 * remote-utils.c (remote_open): Print a status notice after
12060 opening a TCP port.
12061 * server.c (attach_inferior): Print a status notice after
12062 attaching.
12063
12064 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12065
12066 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12067
12068 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
12069
12070 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12071 error packet.
12072 * server.c, target.h: Update copyright years.
12073
12074 2004-02-25 Roland McGrath <roland@redhat.com>
12075
12076 * target.h (struct target_ops): New member `read_auxv'.
12077 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12078 * linux-low.c (linux_read_auxv): New function.
12079 (linux_target_ops): Initialize `read_auxv' member to that.
12080
12081 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12082
12083 Committed by Jim Blandy <jimb@redhat.com>.
12084
12085 * linux-s390-low.c (s390_num_regs): Update.
12086 (s390_regmap): Remove control registers. Use __s390x__ predefine
12087 instead of GPR_SIZE to distiguish s390 and s390x targets.
12088
12089 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
12090
12091 * linux-low.c: Update copyright year.
12092 (check_removed_breakpoint): Clear pending_is_breakpoint.
12093 (linux_set_resume_request, linux_queue_one_thread)
12094 (resume_status_pending_p): New functions.
12095 (linux_continue_one_thread): Use process->resume.
12096 (linux_resume): Only resume threads if there are no pending events.
12097 * linux-low.h (struct process_info): Add resume request
12098 pointer.
12099
12100 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
12101
12102 * regcache.c (new_register_cache): Clear the allocated register
12103 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12104
12105 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
12106
12107 * linux-low.c (linux_resume): Take a struct thread_resume *
12108 argument.
12109 (linux_wait): Update call.
12110 (resume_ptr): New static variable.
12111 (linux_continue_one_thread): Renamed from
12112 linux_continue_one_process. Use resume_ptr.
12113 (linux_resume): Use linux_continue_one_thread.
12114 * server.c (handle_v_cont, handle_v_requests): New functions.
12115 (myresume): New function.
12116 (main): Handle 'v' case.
12117 * target.h (struct thread_resume): New type.
12118 (struct target_ops): Change argument of "resume" to struct
12119 thread_resume *.
12120 (myresume): Delete macro.
12121
12122 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12123
12124 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12125 (uninstall): Support DESTDIR.
12126
12127 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12128
12129 * configure.srv: Add xscale*linux copy of arm*linux entry.
12130
12131 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
12132
12133 * linux-arm-low.c (arm_reinsert_addr): New function.
12134 (the_low_target): Add arm_reinsert_addr.
12135
12136 2003-07-08 Mark Kettenis <kettenis@gnu.org>
12137
12138 * mem-break.c: Remove whitespace at end of file.
12139
12140 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12141
12142 * configure.in: Check whether we need to prototype strerror.
12143 * server.h: Optionally prototype strerror.
12144 * gdbreplay.c (perror_with_name): Use strerror.
12145 * linux-low.c (linux_attach_lwp): Use strerror.
12146 * utils.c (perror_with_name): Use strerror.
12147 * config.in, configure: Regenerated.
12148
12149 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12150
12151 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12152 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12153
12154 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
12155
12156 * Makefile.in (SFILES): Update.
12157 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12158 low-sun3.c: Remove files.
12159
12160 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
12161
12162 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12163 (linux_detach_one_process, linux_detach): New functions.
12164 (linux_target_ops): Add linux_detach.
12165 * server.c (main): Handle 'D' packet.
12166 * target.h (struct target_ops): Add "detach" member.
12167 (detach_inferior): Define.
12168
12169 2003-06-13 Mark Kettenis <kettenis@gnu.org>
12170
12171 From Kelley Cook <kelleycook@wideopenwest.com>:
12172 * configure.srv: Accept i[34567]86 variants.
12173
12174 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
12175
12176 * linux-low.c (linux_wait_for_event): Correct comment typos.
12177 (linux_resume_one_process): Call check_removed_breakpoint.
12178 (linux_send_signal): New function.
12179 (linux_target_ops): Add linux_send_signal.
12180 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12181 of kill.
12182 * target.h (struct target_ops): Add send_signal.
12183
12184 2003-05-29 Jim Blandy <jimb@redhat.com>
12185
12186 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12187 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12188 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12189 away part of the register's value.
12190
12191 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
12192
12193 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12194 (linux_wait_for_event, linux_init_signals): Likewise.
12195
12196 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
12197
12198 * configure.in: Check for stdlib.h.
12199 * configure: Regenerated.
12200 * config.in: Regenerated.
12201
12202 2003-01-04 Andreas Schwab <schwab@suse.de>
12203
12204 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12205
12206 2003-01-02 Andrew Cagney <ac131313@redhat.com>
12207
12208 * Makefile.in: Remove obsolete code.
12209
12210 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
12211
12212 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12213 defined(PT_FPR0_HI).
12214
12215 2002-11-17 Stuart Hughes <seh@zee2.com>
12216
12217 * linux-arm-low.c (arm_num_regs): Increase.
12218 (arm_regmap): Include status register.
12219
12220 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
12221
12222 * linux-low.c (register_addr): Remove incorrect -1 check.
12223
12224 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
12225
12226 * linux-low.c (linux_create_inferior): Call setpgid. Return
12227 the new PID.
12228 (unstopped_p, linux_signal_pid): Remove.
12229 (linux_target_ops): Remove linux_signal_pid.
12230 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12231 global instead of target method.
12232 * target.h (struct target_ops): Remove signal_pid. Update comment
12233 for create_inferior.
12234 * server.c (signal_pid): New variable.
12235 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
12236 gdbserver. Set the child to be the foreground process group.
12237 (attach_inferior): Set signal_pid.
12238
12239 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
12240
12241 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12242
12243 2002-08-20 Jim Blandy <jimb@redhat.com>
12244
12245 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12246 default for this.
12247
12248 2002-08-01 Andrew Cagney <cagney@redhat.com>
12249
12250 * Makefile.in: Make chill references obsolete.
12251
12252 2002-07-24 Kevin Buettner <kevinb@redhat.com>
12253
12254 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12255 * configure: Regenerate.
12256 * config.in: Regenerate.
12257
12258 2002-07-09 David O'Brien <obrien@FreeBSD.org>
12259
12260 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12261 (perror_with_name, remote_close, remote_open, expect, play): Static.
12262
12263 2002-07-04 Michal Ludvig <mludvig@suse.cz>
12264
12265 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
12266 byte offsets instead of an array of indexes.
12267 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12268
12269 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
12270
12271 * regcache.c: Add comment.
12272
12273 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
12274
12275 * thread-db.c: New file.
12276 * proc-service.c: New file.
12277 * acinclude.m4: New file.
12278 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12279 proc-service.o, and thread-db.o.
12280 (linux-low.o): Add USE_THREAD_DB.
12281 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12282 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12283 * aclocal.m4: Regenerated.
12284 * config.in: Regenerated.
12285 * configure: Regenerated.
12286 * configure.in: Check for proc_service.h, sys/procfs.h,
12287 thread_db.h, and linux/elf.h headrs.
12288 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12289 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12290 Check for -lthread_db and thread support.
12291 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12292 PowerPC, and SuperH.
12293 * i387-fp.c: Constify arguments.
12294 * i387-fp.h: Likewise.
12295 * inferiors.c: (struct thread_info): Renamed from
12296 `struct inferior_info'. Remove PID member. Use generic inferior
12297 list header. All uses updated.
12298 (inferiors, signal_pid): Removed.
12299 (all_threads): New variable.
12300 (get_thread): Define.
12301 (add_inferior_to_list): New function.
12302 (for_each_inferior): New function.
12303 (change_inferior_id): New function.
12304 (add_inferior): Removed.
12305 (remove_inferior): New function.
12306 (add_thread): New function.
12307 (free_one_thread): New function.
12308 (remove_thread): New function.
12309 (clear_inferiors): Use for_each_inferior and free_one_thread.
12310 (find_inferior): New function.
12311 (find_inferior_id): New function.
12312 (inferior_target_data): Update argument type.
12313 (set_inferior_target_data): Likewise.
12314 (inferior_regcache_data): Likewise.
12315 (set_inferior_regcache_data): Likewise.
12316 * linux-low.c (linux_bp_reinsert): Remove.
12317 (all_processes, stopping_threads, using_thrads)
12318 (struct pending_signals, debug_threads, pid_of): New.
12319 (inferior_pid): Replace with macro.
12320 (struct inferior_linux_data): Remove.
12321 (get_stop_pc, add_process): New functions.
12322 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12323 Use add_process and add_thread.
12324 (linux_attach_lwp): New function, based on old linux_attach. Use
12325 add_process and add_thread. Set stop_expected for new threads.
12326 (linux_attach): New function.
12327 (linux_kill_one_process): New function.
12328 (linux_kill): Kill all LWPs.
12329 (linux_thread_alive): Use find_inferior_id.
12330 (check_removed_breakpoints, status_pending_p): New functions.
12331 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12332 Update. Use WNOHANG. Wait for cloned processes also. Update process
12333 struct for the found process.
12334 (linux_wait_for_event): New function.
12335 (linux_wait): Use it. Support LWPs.
12336 (send_sigstop, wait_for_sigstop, stop_all_processes)
12337 (linux_resume_one_process, linux_continue_one_process): New functions.
12338 (linux_resume): Support LWPs.
12339 (REGISTER_RAW_SIZE): Remove.
12340 (fetch_register): Use register_size instead. Call supply_register.
12341 (usr_store_inferior_registers): Likewise. Call collect_register.
12342 Fix recursive case.
12343 (regsets_fetch_inferior_registers): Improve error message.
12344 (regsets_store_inferior_registers): Add debugging.
12345 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12346 (unstopped_p, linux_signal_pid): New functions.
12347 (linux_target_ops): Add linux_signal_pid.
12348 (linux_init_signals): New function.
12349 (initialize_low): Call it. Initialize using_threads.
12350 * regcache.c (inferior_regcache_data): Add valid
12351 flag.
12352 (get_regcache): Fetch registers lazily. Add fetch argument
12353 and update all callers.
12354 (regcache_invalidate_one, regcache_invalidate): New
12355 functions.
12356 (new_register_cache): Renamed from create_register_cache.
12357 Return the new regcache.
12358 (free_register_cache): Change argument to a void *.
12359 (registers_to_string, registers_from_string): Call get_regcache
12360 with fetch flag set.
12361 (register_data): Make static. Pass fetch flag to get_regcache.
12362 (supply_register): Call get_regcache with fetch flag clear.
12363 (collect_register): Call get_regcache with fetch flag set.
12364 (collect_register_as_string): New function.
12365 * regcache.h: Update.
12366 * remote-utils.c (putpkt): Flush after debug output and use
12367 stderr.
12368 Handle input interrupts while waiting for an ACK.
12369 (input_interrupt): Use signal_pid method.
12370 (getpkt): Flush after debug output and use stderr.
12371 (outreg): Use collect_register_as_string.
12372 (new_thread_notify, dead_thread_notify): New functions.
12373 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12374 and general_thread.
12375 (look_up_one_symbol): Flush after debug output.
12376 * server.c (step_thread, server_waiting): New variables.
12377 (start_inferior): Don't use signal_pid. Update call to mywait.
12378 (attach_inferior): Update call to mywait.
12379 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12380 (main): Don't fetch/store registers explicitly. Use
12381 set_desired_inferior. Support proposed ``Hs'' packet. Update
12382 calls to mywait.
12383 * server.h: Update.
12384 (struct inferior_list, struct_inferior_list_entry): New.
12385 * target.c (set_desired_inferior): New.
12386 (write_inferior_memory): Constify.
12387 (mywait): New function.
12388 * target.h: Update.
12389 (struct target_ops): New signal_pid method.
12390 (mywait): Removed macro, added prototype.
12391
12392 * linux-low.h (regset_func): Removed.
12393 (regset_fill_func, regset_store_func): New.
12394 (enum regset_type): New.
12395 (struct regset_info): Add type field. Use new operation types.
12396 (struct linux_target_ops): stop_pc renamed to get_pc.
12397 Add decr_pc_after_break and breakpoint_at.
12398 (get_process, get_thread_proess, get_process_thread)
12399 (strut process_info, all_processes, linux_attach_lwp)
12400 (thread_db_init): New.
12401
12402 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12403 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12404 (the_low_target): Add new members.
12405 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12406 (i386_store_fpxregset): Constify.
12407 (target_regsets): Add new kind identifier.
12408 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12409 (i386_set_pc): Add debugging.
12410 (i386_breakpoint_at): New function.
12411 (the_low_target): Add new members.
12412 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12413 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12414 (mips_breakpoint_at): New.
12415 (the_low_target): Add new members.
12416 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12417 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12418 (the_low_target): Add new members.
12419 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12420 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12421 (the_low_target): Add new members.
12422 * linux-x86-64-low.c (target_regsets): Add new kind
12423 identifier.
12424
12425 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
12426
12427 From Martin Pool <mbp@samba.org>:
12428 * server.c (gdbserver_usage): New function.
12429 (main): Call it.
12430
12431 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
12432
12433 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12434 stop_at -> stop_pc.
12435
12436 2002-05-04 Andrew Cagney <ac131313@redhat.com>
12437
12438 * Makefile.in: Remove obsolete code.
12439
12440 2002-04-24 Michal Ludvig <mludvig@suse.cz>
12441
12442 * linux-low.c (regsets_fetch_inferior_registers),
12443 (regsets_store_inferior_registers): Removed cast to int from
12444 ptrace() calls.
12445 * regcache.h: Added declaration of struct inferior_info.
12446
12447 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12448
12449 * inferiors.c (struct inferior_info): Add regcache_data.
12450 (add_inferior): Call create_register_cache.
12451 (clear_inferiors): Call free_register_cache.
12452 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12453 * regcache.c (struct inferior_regcache_data): New.
12454 (registers): Remove.
12455 (get_regcache): New function.
12456 (create_register_cache, free_register_cache): New functions.
12457 (set_register_cache): Don't initialize the register cache here.
12458 (registers_to_string, registers_from_string, register_data): Call
12459 get_regcache.
12460 * regcache.h: Add prototypes.
12461 * server.h: Likewise.
12462
12463 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12464
12465 * mem-break.c: New file.
12466 * mem-break.h: New file.
12467 * Makefile.in: Add mem-break.o rule; update server.h
12468 dependencies.
12469 * inferiors.c (struct inferior_info): Add target_data
12470 member.
12471 (clear_inferiors): Free target_data member if set.
12472 (inferior_target_data, set_inferior_target_data): New functions.
12473 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12474 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12475 * linux-low.c (linux_bp_reinsert): New variable.
12476 (struct inferior_linux_data): New.
12477 (linux_create_inferior): Use set_inferior_target_data.
12478 (linux_attach): Likewise. Call add_inferior.
12479 (linux_wait_for_one_inferior): New function.
12480 (linux_wait): Call it.
12481 (linux_write_memory): Add const.
12482 (initialize_low): Call set_breakpoint_data.
12483 * linux-low.h (struct linux_target_ops): Add breakpoint
12484 handling members.
12485 * server.c (attach_inferior): Remove extra add_inferior
12486 call.
12487 * server.h: Include mem-break.h. Update inferior.c
12488 prototypes.
12489 * target.c (read_inferior_memory)
12490 (write_inferior_memory): New functions.
12491 * target.h (read_inferior_memory)
12492 (write_inferior_memory): Change macros to prototypes.
12493 (struct target_ops): Update comments. Add const to write_memory
12494 definition.
12495
12496 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
12497
12498 * linux-low.c (usr_store_inferior_registers): Support
12499 registers which are allowed to fail to store.
12500 * linux-low.h (linux_target_ops): Likewise.
12501 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12502 (ppc_cannot_store_register): FPSCR may not be storable.
12503
12504 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12505
12506 * server.h: Include <string.h> if HAVE_STRING_H.
12507 * ChangeLog: Correct paths in last ChangeLog entry.
12508
12509 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12510
12511 * linux-low.h: Remove obsolete prototypes.
12512 (struct linux_target_ops): New.
12513 (extern the_low_target): New.
12514 * linux-low.c (num_regs, regmap): Remove declarations.
12515 (register_addr): Use the_low_target explicitly.
12516 (fetch_register): Likewise.
12517 (usr_fetch_inferior_registers): Likewise.
12518 (usr_store_inferior_registers): Likewise.
12519 * linux-arm-low.c (num_regs): Remove.
12520 (arm_num_regs): Define.
12521 (arm_regmap): Renamed from regmap, made static.
12522 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12523 made static.
12524 (arm_cannot_store_register): Renamed from cannot_store_register,
12525 made static.
12526 (the_low_target): New.
12527 * linux-i386-low.c (num_regs): Remove.
12528 (i386_num_regs): Define.
12529 (i386_regmap): Renamed from regmap, made static.
12530 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12531 made static.
12532 (i386_cannot_store_register): Renamed from cannot_store_register,
12533 made static.
12534 (the_low_target): New.
12535 * linux-ia64-low.c (num_regs): Remove.
12536 (ia64_num_regs): Define.
12537 (ia64_regmap): Renamed from regmap, made static.
12538 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12539 made static.
12540 (ia64_cannot_store_register): Renamed from cannot_store_register,
12541 made static.
12542 (the_low_target): New.
12543 * linux-m68k-low.c (num_regs): Remove.
12544 (m68k_num_regs): Define.
12545 (m68k_regmap): Renamed from regmap, made static.
12546 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12547 made static.
12548 (m68k_cannot_store_register): Renamed from cannot_store_register,
12549 made static.
12550 (the_low_target): New.
12551 * linux-mips-low.c (num_regs): Remove.
12552 (mips_num_regs): Define.
12553 (mips_regmap): Renamed from regmap, made static.
12554 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12555 made static.
12556 (mips_cannot_store_register): Renamed from cannot_store_register,
12557 made static.
12558 (the_low_target): New.
12559 * linux-ppc-low.c (num_regs): Remove.
12560 (ppc_num_regs): Define.
12561 (ppc_regmap): Renamed from regmap, made static.
12562 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12563 made static.
12564 (ppc_cannot_store_register): Renamed from cannot_store_register,
12565 made static.
12566 (the_low_target): New.
12567 * linux-s390-low.c (num_regs): Remove.
12568 (s390_num_regs): Define.
12569 (s390_regmap): Renamed from regmap, made static.
12570 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12571 made static.
12572 (s390_cannot_store_register): Renamed from cannot_store_register,
12573 made static.
12574 (the_low_target): New.
12575 * linux-sh-low.c (num_regs): Remove.
12576 (sh_num_regs): Define.
12577 (sh_regmap): Renamed from regmap, made static.
12578 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12579 made static.
12580 (sh_cannot_store_register): Renamed from cannot_store_register,
12581 made static.
12582 (the_low_target): New.
12583 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12584 (the_low_target): New.
12585
12586 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12587
12588 * Makefile.in: Add stamp-h target.
12589 * configure.in: Create stamp-h.
12590 * configure: Regenerated.
12591
12592 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12593
12594 * inferiors.c: New file.
12595 * target.c: New file.
12596 * target.h: New file.
12597 * Makefile.in: Add target.o and inferiors.o. Update
12598 dependencies.
12599 * linux-low.c (inferior_pid): New static variable,
12600 moved from server.c.
12601 (linux_create_inferior): Renamed from create_inferior.
12602 Call add_inferior. Return 0 on success instead of a PID.
12603 (linux_attach): Renamed from myattach.
12604 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12605 (linux_thread_alive): Renamed from mythread_alive.
12606 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12607 child dies.
12608 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12609 (regsets_store_inferior_registers): Correct error message.
12610 Add missing ``return 0''.
12611 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12612 (linux_store_registers): Renamed from store_inferior_registers.
12613 (linux_read_memory): Renamed from read_inferior_memory.
12614 (linux_write_memory): Renamed from write_inferior_memory.
12615 (linux_target_ops): New structure.
12616 (initialize_low): Call set_target_ops ().
12617 * remote-utils.c (unhexify): New function.
12618 (hexify): New function.
12619 (input_interrupt): Send signals to ``signal_pid''.
12620 * server.c (inferior_pid): Remove.
12621 (start_inferior): Update create_inferior call.
12622 (attach_inferior): Call add_inferior.
12623 (handle_query): New function.
12624 (main): Call handle_query for `q' packets.
12625 * server.h: Include "target.h". Remove obsolete prototypes.
12626 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12627
12628 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12629
12630 * Makefile.in: Add WARN_CFLAGS. Update configury
12631 dependencies.
12632 * configure.in: Check for <string.h>
12633 * configure: Regenerate.
12634 * config.in: Regenerate.
12635 * gdbreplay.c: Include needed system headers.
12636 (remote_open): Remove strchr prototype.
12637 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12638 * regcache.c (supply_register): Change buf argument to const void *.
12639 (supply_register_by_name): Likewise.
12640 (collect_register): Change buf argument to void *.
12641 (collect_register_by_name): Likewise.
12642 * regcache.h: Add missing prototypes.
12643 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12644 * server.c (handle_query): New function.
12645 (attached): New static variable, moved out of main.
12646 (main): Quiet longjmp clobber warnings.
12647 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12648 * utils.c (error): Remove NORETURN.
12649 (fatal): Likewise.
This page took 0.293713 seconds and 5 git commands to generate.