linux-ppc-low.c: Remove forward declaration, move ppc_arch_setup lower
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2
3 * linux-ppc-low.c (ppc_usrregs_info): Remove
4 forward-declaration.
5 (ppc_arch_setup): Move lower in file.
6
7 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
8
9 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
10 (ps_pdwrite): Likewise.
11
12 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
13
14 * linux-arm-low.c (arm_new_thread): Move pointer dereference
15 to after assert checks.
16
17 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
18
19 * proc-service.c (ps_pdread): Add/adjust casts.
20 (ps_pdwrite): Add/adjust casts.
21
22 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
23
24 * server.c (handle_search_memory_1): Cast return value of
25 memmem.
26
27 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
28
29 * server.c (write_qxfer_response): Change type of data to
30 gdb_byte *.
31
32 2015-10-29 Pedro Alves <palves@redhat.com>
33
34 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
35
36 2015-10-29 Pedro Alves <palves@redhat.com>
37
38 * tracepoint.c (clear_installed_tracepoints): Add casts.
39
40 2015-10-29 Pedro Alves <palves@redhat.com>
41
42 * server.c (handle_v_cont, process_serial_event): Add enum
43 gdb_signal casts to signal parsing code.
44
45 2015-10-29 Pedro Alves <palves@redhat.com>
46
47 * linux-low.h (NULL_REGSET): Define.
48 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
49 * linux-arm-low.c (arm_regsets): Likewise.
50 * linux-crisv32-low.c (cris_regsets): Likewise.
51 * linux-m68k-low.c (m68k_regsets): Likewise.
52 * linux-mips-low.c (mips_regsets): Likewise.
53 * linux-nios2-low.c (nios2_regsets): Likewise.
54 * linux-ppc-low.c (ppc_regsets): Likewise.
55 * linux-s390-low.c (s390_regsets): Likewise.
56 * linux-sh-low.c (sh_regsets): Likewise.
57 * linux-sparc-low.c (sparc_regsets): Likewise.
58 * linux-tic6x-low.c (tic6x_regsets): Likewise.
59 * linux-tile-low.c (tile_regsets): Likewise.
60 * linux-x86-low.c (x86_regsets): Likewise.
61 * linux-xtensa-low.c (xtensa_regsets): Likewise.
62
63 2015-10-29 Pedro Alves <palves@redhat.com>
64
65 * linux-low.h (NULL_REGSET): Define.
66 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
67 * linux-arm-low.c (arm_regsets): Likewise.
68 * linux-crisv32-low.c (cris_regsets): Likewise.
69 * linux-m68k-low.c (m68k_regsets): Likewise.
70 * linux-mips-low.c (mips_regsets): Likewise.
71 * linux-nios2-low.c (nios2_regsets): Likewise.
72 * linux-ppc-low.c (ppc_regsets): Likewise.
73 * linux-s390-low.c (s390_regsets): Likewise.
74 * linux-sh-low.c (sh_regsets): Likewise.
75 * linux-sparc-low.c (sparc_regsets): Likewise.
76 * linux-tic6x-low.c (tic6x_regsets): Likewise.
77 * linux-tile-low.c (tile_regsets): Likewise.
78 * linux-x86-low.c (x86_regsets): Likewise.
79 * linux-xtensa-low.c (xtensa_regsets): Likewise.
80
81 2015-10-26 Doug Evans <dje@google.com>
82
83 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
84
85 2015-10-26 Doug Evans <dje@google.com>
86
87 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
88
89 2015-10-26 Doug Evans <dje@google.com>
90
91 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
92 for debug_printf.
93 (attach_thread, find_new_threads_callback): Ditto.
94
95 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
96
97 * mem-break.h (set_breakpoint_data): Remove.
98
99 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
100
101 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
102 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
103 (initialize_low): Remove set_breakpoint_data call.
104 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
105 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
106 (initialize_low): Remove set_breakpoint_data call.
107 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
108 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
109 (initialize_low): Remove set_breakpoint_data call.
110
111 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
112
113 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
114 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
115 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
116 * target.h (target_breakpoint_kind_from_pc): New macro.
117
118 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
119
120 * linux-low.c (default_breakpoint_kind_from_pc): New function.
121 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
122 the default breakpoint kind.
123
124 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
125
126 * linux-arm-low.c (arm_supports_z_point_type): Add software
127 breakpoint support.
128
129 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
130
131 * linux-arm-low.c: Refactor breakpoint definitions.
132 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
133 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
134
135 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
136
137 * Makefile.in: Add arm.c/o.
138 * configure.srv: Likewise.
139 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
140 (arm_breakpoint_kind_from_pc): New function.
141 (arm_sw_breakpoint_from_kind): Return proper kind.
142 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
143
144 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
145
146 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
147 removal.
148 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
149 (struct raw_breakpoint) <size>: Remove.
150 (struct raw_breakpoint) <kind>: Add.
151 (bp_size): New function.
152 (bp_opcode): Likewise.
153 (find_raw_breakpoint_at): Adjust for kind.
154 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
155 (remove_memory_breakpoint): Adjust for kind call bp_size.
156 (set_raw_breakpoint_at): Adjust for kind.
157 (set_breakpoint): Likewise.
158 (set_breakpoint_at): Call breakpoint_kind_from_pc.
159 (delete_raw_breakpoint): Adjust for kind.
160 (delete_breakpoint): Likewise.
161 (find_gdb_breakpoint): Likewise.
162 (set_gdb_breakpoint_1): Likewise.
163 (set_gdb_breakpoint): Likewise.
164 (delete_gdb_breakpoint_1): Likewise.
165 (delete_gdb_breakpoint): Likewise.
166 (uninsert_raw_breakpoint): Likewise.
167 (reinsert_raw_breakpoint): Likewise.
168 (set_breakpoint_data): Remove.
169 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
170 (check_mem_read): Adjust for kind call bp_size.
171 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
172 (clone_one_breakpoint): Adjust for kind.
173 * mem-break.h (set_gdb_breakpoint): Likewise.
174 (delete_gdb_breakpoint): Likewise.
175 * server.c (process_serial_event): Likewise.
176
177 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
178
179 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
180 (struct linux_target_ops) <breakpoint>: Remove.
181 (struct linux_target_ops) <breakpoint_len>: Remove.
182 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
183 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
184 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
185 (arm_sw_breakpoint_from_kind): New function.
186 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
187 (struct linux_target_ops) <breakpoint>: Remove.
188 (struct linux_target_ops) <breakpoint_len>: Remove.
189 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
190 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
191 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
192 (struct linux_target_ops) <breakpoint>: Remove.
193 (struct linux_target_ops) <breakpoint_len>: Remove.
194 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
195 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
196 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
197 (struct linux_target_ops) <breakpoint>: Remove.
198 (struct linux_target_ops) <breakpoint_len>: Remove.
199 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
200 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
201 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
202 and sw_breakpoint_from_kind to increment the pc.
203 (linux_breakpoint_kind_from_pc): New function.
204 (linux_sw_breakpoint_from_kind): New function.
205 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
206 (initialize_low): Call breakpoint_kind_from_pc and
207 sw_breakpoint_from_kind to replace breakpoint_data/len.
208 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
209 New field.
210 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
211 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
212 (struct linux_target_ops) <breakpoint>: Remove.
213 (struct linux_target_ops) <breakpoint_len>: Remove.
214 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
215 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
216 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
217 (struct linux_target_ops) <breakpoint>: Remove.
218 (struct linux_target_ops) <breakpoint_len>: Remove.
219 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
220 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
221 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
222 (struct linux_target_ops) <breakpoint>: Remove.
223 (struct linux_target_ops) <breakpoint_len>: Remove.
224 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
225 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
226 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
227 (struct linux_target_ops) <breakpoint>: Remove.
228 (struct linux_target_ops) <breakpoint_len>: Remove.
229 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
230 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
231 * linux-ppc-low.c (ppc_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-s390-low.c (s390_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 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
242 (struct linux_target_ops) <breakpoint>: Remove.
243 (struct linux_target_ops) <breakpoint_len>: Remove.
244 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
245 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
246 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
247 (struct linux_target_ops) <breakpoint>: Remove.
248 (struct linux_target_ops) <breakpoint_len>: Remove.
249 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
250 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
251 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
252 (struct linux_target_ops) <breakpoint>: Remove.
253 (struct linux_target_ops) <breakpoint_len>: Remove.
254 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
255 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
256 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
257 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
258 (struct linux_target_ops) <breakpoint>: Remove.
259 (struct linux_target_ops) <breakpoint_len>: Remove.
260 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
261 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
262 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
263 (struct linux_target_ops) <breakpoint>: Remove.
264 (struct linux_target_ops) <breakpoint_len>: Remove.
265 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
266 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
267
268 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
269
270 * linux-cris-low.c (cris_get_pc): Remove void arg.
271
272 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
273
274 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
275 variable name.
276
277 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
278
279 * inferiors.c (thread_pid_matches_callback): New function.
280 (find_thread_process): New function.
281 (remove_thread): Reset current_thread.
282 (remove_process): Assert threads have been removed first.
283
284 2015-10-15 Yao Qi <yao.qi@linaro.org>
285
286 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
287 if it is 3.
288 (aarch64_remove_point): Likewise.
289 * regcache.c (regcache_register_size): New function.
290
291 2015-10-12 Yao Qi <yao.qi@linaro.org>
292
293 * linux-aarch64-low.c: Update all callers as emit_load_store
294 is renamed to aarch64_emit_load_store.
295
296 2015-10-12 Yao Qi <yao.qi@linaro.org>
297
298 * linux-aarch64-low.c: Update all callers of function renaming
299 from emit_insn to aarch64_emit_insn.
300
301 2015-10-12 Yao Qi <yao.qi@linaro.org>
302
303 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
304 arch/aarch64-insn.h.
305 (struct aarch64_memory_operand): Likewise.
306 (ENCODE): Likewise.
307 (emit_insn): Move to arch/aarch64-insn.c.
308 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
309 (emit_load_store): Move to arch/aarch64-insn.c.
310 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
311 (can_encode_int32): Remove.
312
313 2015-10-12 Yao Qi <yao.qi@linaro.org>
314
315 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
316 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
317 (aarch64_relocate_instruction): Likewise.
318 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
319 (struct aarch64_insn_visitor): Likewise.
320
321 2015-10-12 Yao Qi <yao.qi@linaro.org>
322
323 * linux-aarch64-low.c (struct aarch64_insn_data): New.
324 (struct aarch64_insn_visitor): New.
325 (struct aarch64_insn_relocation_data): New.
326 (aarch64_ftrace_insn_reloc_b): New function.
327 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
328 (aarch64_ftrace_insn_reloc_cb): Likewise.
329 (aarch64_ftrace_insn_reloc_tb): Likewise.
330 (aarch64_ftrace_insn_reloc_adr): Likewise.
331 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
332 (aarch64_ftrace_insn_reloc_others): Likewise.
333 (visitor): New.
334 (aarch64_relocate_instruction): Use visitor.
335
336 2015-10-12 Yao Qi <yao.qi@linaro.org>
337
338 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
339 int. Add argument buf.
340 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
341 aarch64_relocate_instruction.
342
343 2015-10-12 Yao Qi <yao.qi@linaro.org>
344
345 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
346 argument insn. Remove local variable insn. Don't call
347 target_read_uint32.
348 (aarch64_install_fast_tracepoint_jump_pad): Call
349 target_read_uint32.
350
351 2015-09-30 Yao Qi <yao.qi@linaro.org>
352
353 * linux-aarch64-low.c (emit_movk): Shorten a long line.
354 (emit_load_store_pair): Likewise.
355
356 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
357
358 * dll.c (match_dll): Add cast(s).
359 (unloaded_dll): Likewise.
360 * linux-low.c (second_thread_of_pid_p): Likewise.
361 (delete_lwp_callback): Likewise.
362 (count_events_callback): Likewise.
363 (select_event_lwp_callback): Likewise.
364 (linux_set_resume_request): Likewise.
365 * server.c (accumulate_file_name_length): Likewise.
366 (emit_dll_description): Likewise.
367 (handle_qxfer_threads_worker): Likewise.
368 (visit_actioned_threads): Likewise.
369 * thread-db.c (any_thread_of): Likewise.
370 * tracepoint.c (same_process_p): Likewise.
371 (match_blocktype): Likewise.
372 (build_traceframe_info_xml): Likewise.
373
374 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
375
376 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
377 assignment.
378 (gdb_unparse_agent_expr): Likewise.
379 * hostio.c (require_data): Likewise.
380 (handle_pread): Likewise.
381 * linux-low.c (disable_regset): Likewise.
382 (fetch_register): Likewise.
383 (store_register): Likewise.
384 (get_dynamic): Likewise.
385 (linux_qxfer_libraries_svr4): Likewise.
386 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
387 (set_fast_tracepoint_jump): Likewise.
388 (uninsert_fast_tracepoint_jumps_at): Likewise.
389 (reinsert_fast_tracepoint_jumps_at): Likewise.
390 (validate_inserted_breakpoint): Likewise.
391 (clone_agent_expr): Likewise.
392 * regcache.c (init_register_cache): Likewise.
393 * remote-utils.c (putpkt_binary_1): Likewise.
394 (decode_M_packet): Likewise.
395 (decode_X_packet): Likewise.
396 (look_up_one_symbol): Likewise.
397 (relocate_instruction): Likewise.
398 (monitor_output): Likewise.
399 * server.c (handle_search_memory): Likewise.
400 (handle_qxfer_exec_file): Likewise.
401 (handle_qxfer_libraries): Likewise.
402 (handle_qxfer): Likewise.
403 (handle_query): Likewise.
404 (handle_v_cont): Likewise.
405 (handle_v_run): Likewise.
406 (captured_main): Likewise.
407 * target.c (write_inferior_memory): Likewise.
408 * thread-db.c (try_thread_db_load_from_dir): Likewise.
409 * tracepoint.c (init_trace_buffer): Likewise.
410 (add_tracepoint_action): Likewise.
411 (add_traceframe): Likewise.
412 (add_traceframe_block): Likewise.
413 (cmd_qtdpsrc): Likewise.
414 (cmd_qtdv): Likewise.
415 (cmd_qtstatus): Likewise.
416 (response_source): Likewise.
417 (response_tsv): Likewise.
418 (cmd_qtnotes): Likewise.
419 (gdb_collect): Likewise.
420 (initialize_tracepoint): Likewise.
421
422 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
423
424 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
425 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
426 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
427 <NOP>: New.
428 (enum aarch64_condition_codes): New enum.
429 (w0): New static global.
430 (fp): Likewise.
431 (lr): Likewise.
432 (struct aarch64_memory_operand) <type>: New
433 MEMORY_OPERAND_POSTINDEX type.
434 (postindex_memory_operand): New helper function.
435 (emit_ret): New function.
436 (emit_load_store_pair): New function, factored out of emit_stp
437 with support for MEMORY_OPERAND_POSTINDEX.
438 (emit_stp): Rewrite using emit_load_store_pair.
439 (emit_ldp): New function.
440 (emit_load_store): Likewise.
441 (emit_ldr): Mention post-index instruction in comment.
442 (emit_ldrh): New function.
443 (emit_ldrb): New function.
444 (emit_ldrsw): Mention post-index instruction in comment.
445 (emit_str): Likewise.
446 (emit_subs): New function.
447 (emit_cmp): Likewise.
448 (emit_and): Likewise.
449 (emit_orr): Likewise.
450 (emit_orn): Likewise.
451 (emit_eor): Likewise.
452 (emit_mvn): Likewise.
453 (emit_lslv): Likewise.
454 (emit_lsrv): Likewise.
455 (emit_asrv): Likewise.
456 (emit_mul): Likewise.
457 (emit_sbfm): Likewise.
458 (emit_sbfx): Likewise.
459 (emit_ubfm): Likewise.
460 (emit_ubfx): Likewise.
461 (emit_csinc): Likewise.
462 (emit_cset): Likewise.
463 (emit_nop): Likewise.
464 (emit_ops_insns): New helper function.
465 (emit_pop): Likewise.
466 (emit_push): Likewise.
467 (aarch64_emit_prologue): New function.
468 (aarch64_emit_epilogue): Likewise.
469 (aarch64_emit_add): Likewise.
470 (aarch64_emit_sub): Likewise.
471 (aarch64_emit_mul): Likewise.
472 (aarch64_emit_lsh): Likewise.
473 (aarch64_emit_rsh_signed): Likewise.
474 (aarch64_emit_rsh_unsigned): Likewise.
475 (aarch64_emit_ext): Likewise.
476 (aarch64_emit_log_not): Likewise.
477 (aarch64_emit_bit_and): Likewise.
478 (aarch64_emit_bit_or): Likewise.
479 (aarch64_emit_bit_xor): Likewise.
480 (aarch64_emit_bit_not): Likewise.
481 (aarch64_emit_equal): Likewise.
482 (aarch64_emit_less_signed): Likewise.
483 (aarch64_emit_less_unsigned): Likewise.
484 (aarch64_emit_ref): Likewise.
485 (aarch64_emit_if_goto): Likewise.
486 (aarch64_emit_goto): Likewise.
487 (aarch64_write_goto_address): Likewise.
488 (aarch64_emit_const): Likewise.
489 (aarch64_emit_call): Likewise.
490 (aarch64_emit_reg): Likewise.
491 (aarch64_emit_pop): Likewise.
492 (aarch64_emit_stack_flush): Likewise.
493 (aarch64_emit_zero_ext): Likewise.
494 (aarch64_emit_swap): Likewise.
495 (aarch64_emit_stack_adjust): Likewise.
496 (aarch64_emit_int_call_1): Likewise.
497 (aarch64_emit_void_call_2): Likewise.
498 (aarch64_emit_eq_goto): Likewise.
499 (aarch64_emit_ne_goto): Likewise.
500 (aarch64_emit_lt_goto): Likewise.
501 (aarch64_emit_le_goto): Likewise.
502 (aarch64_emit_gt_goto): Likewise.
503 (aarch64_emit_ge_got): Likewise.
504 (aarch64_emit_ops_impl): New static global variable.
505 (aarch64_emit_ops): New target function, return
506 &aarch64_emit_ops_impl.
507 (struct linux_target_ops): Install it.
508
509 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
510
511 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
512 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
513 aarch64-ipa.o.
514 * linux-aarch64-ipa.c: New file.
515 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
516 and endian.h.
517 (aarch64_get_thread_area): New target method.
518 (extract_signed_bitfield): New helper function.
519 (aarch64_decode_ldr_literal): New function.
520 (enum aarch64_opcodes): New enum.
521 (struct aarch64_register): New struct.
522 (struct aarch64_operand): New struct.
523 (x0): New static global.
524 (x1): Likewise.
525 (x2): Likewise.
526 (x3): Likewise.
527 (x4): Likewise.
528 (w2): Likewise.
529 (ip0): Likewise.
530 (sp): Likewise.
531 (xzr): Likewise.
532 (aarch64_register): New helper function.
533 (register_operand): Likewise.
534 (immediate_operand): Likewise.
535 (struct aarch64_memory_operand): New struct.
536 (offset_memory_operand): New helper function.
537 (preindex_memory_operand): Likewise.
538 (enum aarch64_system_control_registers): New enum.
539 (ENCODE): New macro.
540 (emit_insn): New helper function.
541 (emit_b): New function.
542 (emit_bcond): Likewise.
543 (emit_cb): Likewise.
544 (emit_tb): Likewise.
545 (emit_blr): Likewise.
546 (emit_stp): Likewise.
547 (emit_ldp_q_offset): Likewise.
548 (emit_stp_q_offset): Likewise.
549 (emit_load_store): Likewise.
550 (emit_ldr): Likewise.
551 (emit_ldrsw): Likewise.
552 (emit_str): Likewise.
553 (emit_ldaxr): Likewise.
554 (emit_stxr): Likewise.
555 (emit_stlr): Likewise.
556 (emit_data_processing_reg): Likewise.
557 (emit_data_processing): Likewise.
558 (emit_add): Likewise.
559 (emit_sub): Likewise.
560 (emit_mov): Likewise.
561 (emit_movk): Likewise.
562 (emit_mov_addr): Likewise.
563 (emit_mrs): Likewise.
564 (emit_msr): Likewise.
565 (emit_sevl): Likewise.
566 (emit_wfe): Likewise.
567 (append_insns): Likewise.
568 (can_encode_int32_in): New helper function.
569 (aarch64_relocate_instruction): New function.
570 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
571 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
572 (struct linux_target_ops): Install aarch64_get_thread_area,
573 aarch64_install_fast_tracepoint_jump_pad and
574 aarch64_get_min_fast_tracepoint_insn_len.
575
576 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
577
578 * Makefile.in (aarch64-insn.o): New rule.
579 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
580
581 2015-09-21 Yao Qi <yao.qi@linaro.org>
582
583 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
584
585 2015-09-21 Yao Qi <yao.qi@linaro.org>
586
587 * tracepoint.c (max_jump_pad_size): Remove.
588
589 2015-09-18 Yao Qi <yao.qi@linaro.org>
590
591 * linux-aarch64-low.c: Don't include sys/uio.h.
592 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
593
594 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
595
596 * tracepoint.c (eval_result_type): Change prototype.
597 (condition_true_at_tracepoint): Fix argument to compiled_cond.
598
599 2015-09-15 Pedro Alves <palves@redhat.com>
600
601 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
602 Check whether to report exec events instead of checking whether
603 multiprocess is enabled.
604
605 2015-09-15 Pedro Alves <palves@redhat.com>
606
607 PR remote/18965
608 * remote-utils.c (prepare_resume_reply): Merge
609 TARGET_WAITKIND_VFORK_DONE switch case with the
610 TARGET_WAITKIND_FORKED case.
611
612 2015-09-15 Yao Qi <yao.qi@linaro.org>
613
614 * server.c (handle_query): Check string comparison using
615 "else if" instead of "if".
616
617 2015-09-15 Yao Qi <yao.qi@linaro.org>
618
619 * server.c (vCont_supported): New global variable.
620 (handle_query): Set vCont_supported to 1 if "vContSupported+"
621 matches. Append ";vContSupported+" to own_buf.
622 (handle_v_requests): Append ";s;S" to own_buf if target supports
623 hardware single step or vCont_supported is false.
624 (capture_main): Set vCont_supported to zero.
625
626 2015-09-15 Yao Qi <yao.qi@linaro.org>
627
628 * linux-low.c (linux_supports_conditional_breakpoints): Rename
629 it to ...
630 (linux_supports_hardware_single_step): ... New function.
631 (linux_target_ops): Update.
632 * lynx-low.c (lynx_target_ops): Set field
633 supports_hardware_single_step to target_can_do_hardware_single_step.
634 * nto-low.c (nto_target_ops): Likewise.
635 * spu-low.c (spu_target_ops): Likewise.
636 * win32-low.c (win32_target_ops): Likewise.
637 * target.c (target_can_do_hardware_single_step): New function.
638 * target.h (struct target_ops) <supports_conditional_breakpoints>:
639 Remove. <supports_hardware_single_step>: New field.
640 (target_supports_conditional_breakpoints): Remove.
641 (target_supports_hardware_single_step): New macro.
642 (target_can_do_hardware_single_step): Declare.
643 * server.c (handle_query): Use target_supports_hardware_single_step
644 instead of target_supports_conditional_breakpoints.
645
646 2015-09-15 Yao Qi <yao.qi@linaro.org>
647
648 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
649 function.
650 (struct linux_target_ops the_low_target): Install
651 aarch64_linux_siginfo_fixup.
652
653 2015-09-11 Don Breazeal <donb@codesourcery.com>
654 Luis Machado <lgustavo@codesourcery.com>
655
656 * linux-low.c (linux_mourn): Static declaration.
657 (linux_arch_setup): Move in front of
658 handle_extended_wait.
659 (linux_arch_setup_thread): New function.
660 (handle_extended_wait): Handle exec events. Call
661 linux_arch_setup_thread. Make event_lwp argument a
662 pointer-to-a-pointer.
663 (check_zombie_leaders): Do not check stopped threads.
664 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
665 (linux_low_filter_event): Add lwp and thread for exec'ing
666 non-leader thread if leader thread has been deleted.
667 Refactor code into linux_arch_setup_thread and call it.
668 Pass child lwp pointer by reference to handle_extended_wait.
669 (linux_wait_for_event_filtered): Update comment.
670 (linux_wait_1): Prevent clobbering exec event status.
671 (linux_supports_exec_events): New function.
672 (linux_target_ops) <supports_exec_events>: Initialize new member.
673 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
674 new member.
675 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
676 * server.c (report_exec_events): New global variable.
677 (handle_query): Handle qSupported query for exec-events feature.
678 (captured_main): Initialize report_exec_events.
679 * server.h (report_exec_events): Declare new global variable.
680 * target.h (struct target_ops) <supports_exec_events>: New
681 member.
682 (target_supports_exec_events): New macro.
683 * win32-low.c (win32_target_ops) <supports_exec_events>:
684 Initialize new member.
685
686 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
687
688 * linux-low.c (linux_low_enable_btrace): Remove.
689 (linux_target_ops): Replace linux_low_enable_btrace with
690 linux_enable_btrace.
691
692 2015-09-03 Yao Qi <yao.qi@linaro.org>
693
694 * linux-aarch64-low.c (aarch64_insert_point): Call
695 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
696 returns true.
697
698 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
699
700 * linux-low.c (check_stopped_by_breakpoint): Use
701 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
702
703 2015-08-27 Pedro Alves <palves@redhat.com>
704
705 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
706
707 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
708
709 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
710 the XNEW-family equivalent.
711 (compile_bytecodes): Likewise.
712 * dll.c (loaded_dll): Likewise.
713 * event-loop.c (append_callback_event): Likewise.
714 (create_file_handler): Likewise.
715 (create_file_event): Likewise.
716 * hostio.c (handle_open): Likewise.
717 * inferiors.c (add_thread): Likewise.
718 (add_process): Likewise.
719 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
720 * linux-arm-low.c (arm_new_process): Likewise.
721 (arm_new_thread): Likewise.
722 * linux-low.c (add_to_pid_list): Likewise.
723 (linux_add_process): Likewise.
724 (handle_extended_wait): Likewise.
725 (add_lwp): Likewise.
726 (enqueue_one_deferred_signal): Likewise.
727 (enqueue_pending_signal): Likewise.
728 (linux_resume_one_lwp_throw): Likewise.
729 (linux_resume_one_thread): Likewise.
730 (linux_read_memory): Likewise.
731 (linux_write_memory): Likewise.
732 * linux-mips-low.c (mips_linux_new_process): Likewise.
733 (mips_linux_new_thread): Likewise.
734 (mips_add_watchpoint): Likewise.
735 * linux-x86-low.c (initialize_low_arch): Likewise.
736 * lynx-low.c (lynx_add_process): Likewise.
737 * mem-break.c (set_raw_breakpoint_at): Likewise.
738 (set_breakpoint): Likewise.
739 (add_condition_to_breakpoint): Likewise.
740 (add_commands_to_breakpoint): Likewise.
741 (clone_agent_expr): Likewise.
742 (clone_one_breakpoint): Likewise.
743 * regcache.c (new_register_cache): Likewise.
744 * remote-utils.c (look_up_one_symbol): Likewise.
745 * server.c (queue_stop_reply): Likewise.
746 (start_inferior): Likewise.
747 (queue_stop_reply_callback): Likewise.
748 (handle_target_event): Likewise.
749 * spu-low.c (fetch_ppc_memory): Likewise.
750 (store_ppc_memory): Likewise.
751 * target.c (set_target_ops): Likewise.
752 * thread-db.c (thread_db_load_search): Likewise.
753 (try_thread_db_load_1): Likewise.
754 * tracepoint.c (add_tracepoint): Likewise.
755 (add_tracepoint_action): Likewise.
756 (create_trace_state_variable): Likewise.
757 (cmd_qtdpsrc): Likewise.
758 (cmd_qtro): Likewise.
759 (add_while_stepping_state): Likewise.
760 * win32-low.c (child_add_thread): Likewise.
761 (get_image_name): Likewise.
762
763 2015-08-25 Yao Qi <yao.qi@linaro.org>
764
765 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
766
767 2015-08-25 Yao Qi <yao.qi@linaro.org>
768
769 * Makefile.in (aarch64-linux.o): New rule.
770 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
771 srv_tgtobj.
772 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
773 (aarch64_init_debug_reg_state): Make it extern.
774 (aarch64_linux_prepare_to_resume): Remove.
775
776 2015-08-25 Yao Qi <yao.qi@linaro.org>
777
778 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
779 lwp_arch_private_info and ptid_of_lwp.
780
781 2015-08-25 Yao Qi <yao.qi@linaro.org>
782
783 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
784 Find proc_info by find_process_pid. All callers updated.
785
786 2015-08-25 Yao Qi <yao.qi@linaro.org>
787
788 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
789 Remove.
790 (debug_reg_change_callback): Remove.
791 (aarch64_notify_debug_reg_change): Remove.
792
793 2015-08-25 Yao Qi <yao.qi@linaro.org>
794
795 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
796 Call current_lwp_ptid.
797
798 2015-08-25 Yao Qi <yao.qi@linaro.org>
799
800 * linux-aarch64-low.c (debug_reg_change_callback): Use
801 debug_printf.
802
803 2015-08-25 Yao Qi <yao.qi@linaro.org>
804
805 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
806
807 2015-08-25 Yao Qi <yao.qi@linaro.org>
808
809 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
810
811 2015-08-25 Yao Qi <yao.qi@linaro.org>
812
813 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
814 the code.
815
816 2015-08-25 Yao Qi <yao.qi@linaro.org>
817
818 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
819 Remove.
820 (debug_reg_change_callback): Remove argument entry and add argument
821 lwp. Remove local variable thread. Don't print thread id in the
822 debugging output. Don't check whether pid of thread equals to pid.
823 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
824 iterate_over_lwps instead find_inferior.
825
826 2015-08-24 Pedro Alves <palves@redhat.com>
827
828 * inferiors.c (get_first_process): New function.
829 * inferiors.h (get_first_process): New declaration.
830 * remote-utils.c (read_ptid): Default to the first process in the
831 list, instead of to the current thread's process.
832
833 2015-08-24 Pedro Alves <palves@redhat.com>
834
835 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
836 * event-loop.c: Likewise.
837 * remote-utils.c: Likewise.
838 * tracepoint.c: Likewise.
839
840 2015-08-24 Pedro Alves <palves@redhat.com>
841
842 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
843 ptid_get_lwp.
844
845 2015-08-21 Pedro Alves <palves@redhat.com>
846
847 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
848 instead of literal 1.
849
850 2015-08-21 Pedro Alves <palves@redhat.com>
851
852 * tdesc.c (default_description): Explicitly zero-initialize.
853
854 2015-08-21 Pedro Alves <palves@redhat.com>
855
856 PR gdb/18749
857 * inferiors.c (remove_thread): Discard any pending stop reply for
858 this thread.
859 * server.c (remove_all_on_match_pid): Rename to ...
860 (remove_all_on_match_ptid): ... this. Work with a filter ptid
861 instead of a pid.
862 (discard_queued_stop_replies): Change parameter to a ptid. Now
863 extern.
864 (handle_v_kill, kill_inferior_callback, captured_main)
865 (process_serial_event): Adjust.
866 * server.h (discard_queued_stop_replies): Declare.
867
868 2015-08-21 Pedro Alves <palves@redhat.com>
869
870 * linux-low.c (wait_for_sigstop): Always switch to no thread
871 selected if the previously current thread dies.
872 * lynx-low.c (lynx_request_interrupt): Use the first thread's
873 process instead of the current thread's.
874 * remote-utils.c (input_interrupt): Don't check if there's no
875 current thread.
876 * server.c (gdb_read_memory, gdb_write_memory): If setting the
877 current thread to the general thread fails, error out.
878 (handle_qxfer_auxv, handle_qxfer_libraries)
879 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
880 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
881 (handle_query): Check if there's a thread selected instead of
882 checking whether there's any thread in the thread list.
883 (handle_qxfer_threads, handle_qxfer_btrace)
884 (handle_qxfer_btrace_conf): Don't error out early if there's no
885 thread in the thread list.
886 (handle_v_cont, myresume): Don't set the current thread to the
887 continue thread.
888 (process_serial_event) <Hg handling>: Also set thread_id if the
889 previous general thread is still alive.
890 (process_serial_event) <g/G handling>: If setting the current
891 thread to the general thread fails, error out.
892 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
893 thread's lwp instead of the current thread's.
894 * target.c (set_desired_thread): If the desired thread was not
895 found, leave the current thread pointing to NULL. Return an int
896 (boolean) indicating success.
897 * target.h (set_desired_thread): Change return type to int.
898
899 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
900
901 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
902 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
903 #includes.
904 (ps_get_thread_area): New function.
905
906 2015-08-19 Gary Benson <gbenson@redhat.com>
907
908 * hostio.c (handle_pread): Do not attempt to read more data
909 than hostio_reply_with_data can fit in a packet.
910
911 2015-08-18 Joel Brobecker <brobecker@adacore.com>
912
913 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
914
915 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
916
917 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
918
919 2015-08-06 Pedro Alves <palves@redhat.com>
920
921 * tracepoint.c (expr_eval_result): Now an int.
922
923 2015-08-06 Pedro Alves <palves@redhat.com>
924
925 * gdbthread.h (struct regcache): Forward declare.
926 (struct thread_info) <regcache_data>: Now a struct regcache
927 pointer.
928 * inferiors.c (inferior_regcache_data)
929 (set_inferior_regcache_data): Now work with struct regcache
930 pointers.
931 * inferiors.h (struct regcache): Forward declare.
932 (inferior_regcache_data, set_inferior_regcache_data): Now work
933 with struct regcache pointers.
934 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
935 (free_register_cache_thread): Remove struct regcache pointer
936 casts.
937
938 2015-08-06 Pedro Alves <palves@redhat.com>
939
940 * server.c (captured_main): On error, print the exception message
941 to stderr, and if run_once is set, throw a quit.
942
943 2015-08-06 Pedro Alves <palves@redhat.com>
944
945 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
946 the current thread.
947
948 2015-08-06 Pedro Alves <palves@redhat.com>
949
950 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
951 reading beyond the passed in buffer length.
952
953 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
954
955 * tracepoint.c (symbol_list) <required>: Remove.
956
957 2015-08-06 Pedro Alves <palves@redhat.com>
958
959 * linux-low.c (handle_extended_wait): Set the fork child's suspend
960 count if stopping and suspending threads.
961 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
962 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
963 (linux_detach): Complete an ongoing step-over.
964 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
965 throughout.
966 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
967 (linux_wait_1): If passing a signal to the inferior after
968 finishing a step-over, unsuspend and re-resume all lwps. If we
969 see a single-step event but the thread should be continuing, don't
970 pass the trap to gdb.
971 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
972 internal_error instead of gdb_assert.
973 (enqueue_pending_signal): New function.
974 (check_ptrace_stopped_lwp_gone): Add debug output.
975 (start_step_over): Use internal_error instead of gdb_assert.
976 (complete_ongoing_step_over): New function.
977 (linux_resume_one_thread): Don't resume a suspended thread.
978 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
979 it stepping.
980
981 2015-08-06 Pedro Alves <palves@redhat.com>
982
983 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
984 (linux_thread_alive): Use lwp_is_marked_dead.
985 (extended_event_reported): Delete.
986 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
987 instead of extended_event_reported.
988 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
989 as well.
990 (lwp_is_marked_dead): New function.
991 (lwp_running): Use lwp_is_marked_dead.
992 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
993 comment.
994
995 2015-08-06 Pedro Alves <palves@redhat.com>
996
997 * linux-low.c (linux_wait_1): Move fork event output out of the
998 !report_to_gdb check. Pass event_child->waitstatus to
999 target_waitstatus_to_string instead of ourstatus.
1000
1001 2015-08-04 Yao Qi <yao.qi@linaro.org>
1002
1003 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1004 if current_thread is 32 bit.
1005
1006 2015-08-04 Yao Qi <yao.qi@linaro.org>
1007
1008 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1009 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1010 * server.c (extended_protocol): Remove "static".
1011 * server.h (extended_protocol): Declare it.
1012
1013 2015-08-04 Yao Qi <yao.qi@linaro.org>
1014
1015 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1016 both aarch64 and aarch32.
1017 (aarch64_set_pc): Likewise.
1018
1019 2015-08-04 Yao Qi <yao.qi@linaro.org>
1020
1021 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1022 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1023 arm-with-neon.xml to srv_xmlfiles.
1024 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1025 (is_64bit_tdesc): New function.
1026 (aarch64_linux_read_description): New function.
1027 (aarch64_arch_setup): Call aarch64_linux_read_description.
1028 (regs_info): Rename to regs_info_aarch64.
1029 (aarch64_regs_info): Return right regs_info.
1030 (initialize_low_arch): Call initialize_low_arch_aarch32.
1031
1032 2015-08-04 Yao Qi <yao.qi@linaro.org>
1033
1034 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1035 * linux-aarch32-low.c: New file.
1036 * linux-aarch32-low.h: New file.
1037 * linux-arm-low.c (arm_fill_gregset): Move it to
1038 linux-aarch32-low.c.
1039 (arm_store_gregset): Likewise.
1040 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1041 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1042 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1043 (regs_info): Rename to regs_info_arm.
1044 (arm_regs_info): Return regs_info_aarch32 if
1045 have_ptrace_getregset is 1 and target description is
1046 arm_with_neon or arm_with_vfpv3.
1047 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1048 Call initialize_low_arch_aarch32 instead.
1049
1050 2015-08-04 Yao Qi <yao.qi@linaro.org>
1051
1052 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1053 * linux-low.c: ... here.
1054 * linux-low.h (have_ptrace_getregset): Declare it.
1055
1056 2015-08-04 Pedro Alves <palves@redhat.com>
1057
1058 * thread-db.c (struct thread_db): Use new typedefs.
1059 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1060 CHK calls.
1061 (disable_thread_event_reporting): Cast result of dlsym to
1062 destination function pointer type.
1063 (thread_db_mourn): Use td_ta_delete_ftype.
1064
1065 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1066
1067 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1068 arch variant.
1069 (CDX_BREAKPOINT): Define for R2.
1070 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1071 (the_low_target): Add comments.
1072
1073 2015-07-30 Yao Qi <yao.qi@linaro.org>
1074
1075 * linux-arm-low.c (arm_hwcap): Remove it.
1076 (arm_read_description): New local variable arm_hwcap. Don't
1077 set arm_hwcap to zero.
1078
1079 2015-07-30 Yao Qi <yao.qi@linaro.org>
1080
1081 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1082 Use regcache->tdesc instead.
1083 (arm_store_wmmxregset): Likewise.
1084 (arm_fill_vfpregset): Likewise.
1085 (arm_store_vfpregset): Likewise.
1086
1087 2015-07-30 Yao Qi <yao.qi@linaro.org>
1088
1089 * linux-arm-low.c: Include arch/arm.h.
1090 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1091 (arm_store_gregset): Likewise.
1092
1093 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1094
1095 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1096 ptrace's 4th parameter.
1097
1098 2015-07-27 Yao Qi <yao.qi@linaro.org>
1099
1100 * configure.srv (case aarch64*-*-linux*): Don't set
1101 srv_linux_usrregs.
1102
1103 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1104
1105 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1106 sys/ptrace.h.
1107 * linux-arm-low.c: Likewise.
1108 * linux-cris-low.c: Likewise.
1109 * linux-crisv32-low.c: Likewise.
1110 * linux-low.c: Likewise.
1111 * linux-m68k-low.c: Likewise.
1112 * linux-mips-low.c: Likewise.
1113 * linux-nios2-low.c: Likewise.
1114 * linux-s390-low.c: Likewise.
1115 * linux-sparc-low.c: Likewise.
1116 * linux-tic6x-low.c: Likewise.
1117 * linux-tile-low.c: Likewise.
1118 * linux-x86-low.c: Likewise.
1119
1120 2015-07-24 Pedro Alves <palves@redhat.com>
1121
1122 * config.in: Regenerate.
1123 * configure: Regenerate.
1124
1125 2015-07-24 Pedro Alves <palves@redhat.com>
1126
1127 * acinclude.m4: Include ../ptrace.m4.
1128 * configure.ac: Call GDB_AC_PTRACE.
1129 * config.in, configure: Regenerate.
1130
1131 2015-07-24 Yao Qi <yao.qi@linaro.org>
1132
1133 * linux-low.c (linux_create_inferior): Remove setting to
1134 proc->priv->new_inferior.
1135 (linux_attach): Likewise.
1136 (linux_low_filter_event): Likewise.
1137 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1138
1139 2015-07-24 Yao Qi <yao.qi@linaro.org>
1140
1141 * linux-low.c (linux_arch_setup): New function.
1142 (linux_low_filter_event): If proc->tdesc is NULL and
1143 proc->attached is true, call the_low_target.arch_setup.
1144 Otherwise, keep status pending, and return.
1145 (linux_resume_one_lwp_throw): Don't call get_pc if
1146 thread->while_stepping isn't NULL. Don't call
1147 get_thread_regcache if proc->tdesc is NULL.
1148 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1149 (linux_target_ops): Install arch_setup.
1150 * server.c (start_inferior): Call the_target->arch_setup.
1151 * target.h (struct target_ops) <arch_setup>: New field.
1152 (target_arch_setup): New marco.
1153 * lynx-low.c (lynx_target_ops): Update.
1154 * nto-low.c (nto_target_ops): Update.
1155 * spu-low.c (spu_target_ops): Update.
1156 * win32-low.c (win32_target_ops): Update.
1157
1158 2015-07-24 Yao Qi <yao.qi@linaro.org>
1159
1160 * linux-low.c (linux_add_process): Don't set
1161 proc->priv->new_inferior.
1162 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1163 (linux_attach): Likewise.
1164
1165 2015-07-24 Yao Qi <yao.qi@linaro.org>
1166
1167 * server.c (start_inferior): Code refactor.
1168
1169 2015-07-24 Yao Qi <yao.qi@linaro.org>
1170
1171 * server.c (process_serial_event): Set general_thread.
1172
1173 2015-07-21 Yao Qi <yao.qi@linaro.org>
1174
1175 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1176 aarch64_linux_get_debug_reg_capacity.
1177
1178 2015-07-17 Yao Qi <yao.qi@linaro.org>
1179
1180 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1181 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1182 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1183 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1184 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1185 (AARCH64_HWP_ALIGNMENT): Likewise.
1186 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1187 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1188 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1189 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1190 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1191 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1192 (struct aarch64_debug_reg_state): Likewise.
1193 (struct arch_lwp_info): Likewise.
1194 (aarch64_align_watchpoint): Likewise.
1195 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1196 (aarch64_watchpoint_length): Likewise.
1197 (aarch64_point_encode_ctrl_reg): Likewise
1198 (aarch64_point_is_aligned): Likewise.
1199 (aarch64_align_watchpoint): Likewise.
1200 (aarch64_linux_set_debug_regs):
1201 (aarch64_dr_state_insert_one_point): Likewise.
1202 (aarch64_dr_state_remove_one_point): Likewise.
1203 (aarch64_handle_breakpoint): Likewise.
1204 (aarch64_handle_aligned_watchpoint): Likewise.
1205 (aarch64_handle_unaligned_watchpoint): Likewise.
1206 (aarch64_handle_watchpoint): Likewise.
1207
1208 2015-07-17 Yao Qi <yao.qi@linaro.org>
1209
1210 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1211 and don't aarch64_get_debug_reg_state. All callers update.
1212 (aarch64_handle_aligned_watchpoint): Likewise.
1213 (aarch64_handle_unaligned_watchpoint): Likewise.
1214 (aarch64_handle_watchpoint): Likewise.
1215 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1216 (aarch64_remove_point): Likewise.
1217
1218 2015-07-17 Yao Qi <yao.qi@linaro.org>
1219
1220 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1221 debug_printf.
1222 (aarch64_handle_unaligned_watchpoint): Likewise.
1223
1224 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1225
1226 Revert the previous 3 commits:
1227 Move gdb_regex* to common/
1228 Move linux_find_memory_regions_full & co.
1229 gdbserver build-id attribute generator
1230
1231 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1232 Jan Kratochvil <jan.kratochvil@redhat.com>
1233
1234 gdbserver build-id attribute generator.
1235 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1236 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1237 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1238 (find_phdr): New.
1239 (get_dynamic): Use find_pdhr to traverse program headers.
1240 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1241 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1242 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1243 (get_hex_build_id): New.
1244 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1245 to reply XML document.
1246
1247 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1248 Jan Kratochvil <jan.kratochvil@redhat.com>
1249
1250 * target.c: Include target/target-utils.h and fcntl.h.
1251 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1252 (target_fileio_read_stralloc): New functions.
1253
1254 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1255
1256 * Makefile.in (OBS): Add gdb_regex.o.
1257 (gdb_regex.o): New.
1258 * config.in: Rebuilt.
1259 * configure: Rebuilt.
1260
1261 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1262 Jan Kratochvil <jan.kratochvil@redhat.com>
1263
1264 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1265 * Makefile.in (OBS): Add target-utils.o.
1266 (linux-maps.o, target-utils.o): New.
1267 * configure.srv (srv_linux_obj): Add linux-maps.o.
1268
1269 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1270
1271 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1272 function, return 1.
1273 (the_low_target): Install it.
1274
1275 2015-07-14 Pedro Alves <palves@redhat.com>
1276
1277 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1278 Instead, ignore ECHILD, and throw an error for other errnos.
1279
1280 2015-07-10 Pedro Alves <palves@redhat.com>
1281
1282 * event-loop.c (struct callback_event) <data>: Change type to
1283 gdb_client_data instance instead of gdb_client_data pointer.
1284 (append_callback_event): Adjust.
1285
1286 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1287
1288 * linux-aarch64-low.c: Add comments for each linux_target_ops
1289 method. Remove comments already covered in target_ops and
1290 linux_target_ops definitions.
1291 (the_low_target): Add comments for each unimplemented method.
1292
1293 2015-07-09 Yao Qi <yao.qi@linaro.org>
1294
1295 * linux-aarch64-low.c (aarch64_regmap): Remove.
1296 (aarch64_usrregs_info): Remove.
1297 (regs_info): Set field usrregs to NULL.
1298
1299 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1300
1301 * linux-low.c: Include "rsp-low.h"
1302 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1303 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1304 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1305 (handle_btrace_enable_pt): New.
1306 (handle_btrace_general_set): Support "pt".
1307 (handle_btrace_conf_general_set): Support "pt:size".
1308
1309 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1310
1311 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1312 Z_PACKET_SW_BP.
1313
1314 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1315
1316 * linux-aarch64-low.c: Remove comment about endianness.
1317 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1318 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1319 memcmp.
1320
1321 2015-06-24 Gary Benson <gbenson@redhat.com>
1322
1323 * linux-i386-ipa.c (stdint.h): Do not include.
1324 * lynx-i386-low.c (stdint.h): Likewise.
1325 * lynx-ppc-low.c (stdint.h): Likewise.
1326 * mem-break.c (stdint.h): Likewise.
1327 * thread-db.c (stdint.h): Likewise.
1328 * tracepoint.c (stdint.h): Likewise.
1329 * win32-low.c (stdint.h): Likewise.
1330
1331 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1332
1333 * server.c (write_qxfer_response): Update call to
1334 remote_escape_output.
1335
1336 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1337 Jan Kratochvil <jan.kratochvil@redhat.com>
1338
1339 Merge multiple hex conversions.
1340 * gdbreplay.c (tohex): Rename to 'fromhex'.
1341 (logchar): Use fromhex.
1342
1343 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1344
1345 * server.c (handle_qxfer_libraries): Set `version' attribute for
1346 <library-list>.
1347
1348 2015-06-10 Gary Benson <gbenson@redhat.com>
1349
1350 * target.h (struct target_ops) <multifs_open>: New field.
1351 <multifs_unlink>: Likewise.
1352 <multifs_readlink>: Likewise.
1353 * linux-low.c (nat/linux-namespaces.h): New include.
1354 (linux_target_ops): Initialize the_target->multifs_open,
1355 the_target->multifs_unlink and the_target->multifs_readlink.
1356 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1357 * hostio.c (hostio_fs_pid): New static variable.
1358 (hostio_handle_new_gdb_connection): New function.
1359 (handle_setfs): Likewise.
1360 (handle_open): Use the_target->multifs_open as appropriate.
1361 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1362 (handle_readlink): Use the_target->multifs_readlink as
1363 appropriate.
1364 (handle_vFile): Handle vFile:setfs packets.
1365 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1366 after target_handle_new_gdb_connection.
1367
1368 2015-06-10 Gary Benson <gbenson@redhat.com>
1369
1370 * configure.ac (AC_CHECK_FUNCS): Add setns.
1371 * config.in: Regenerate.
1372 * configure: Likewise.
1373 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1374 (linux-namespaces.o): New rule.
1375 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1376
1377 2015-06-09 Gary Benson <gbenson@redhat.com>
1378
1379 * hostio.c (handle_open): Process mode argument with
1380 fileio_to_host_mode.
1381
1382 2015-06-01 Yao Qi <yao.qi@linaro.org>
1383
1384 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1385 * linux-x86-low.c: Likewise.
1386
1387 2015-05-28 Don Breazeal <donb@codesourcery.com>
1388
1389 * linux-low.c (handle_extended_wait): Initialize
1390 thread_info.last_resume_kind for new fork children.
1391
1392 2015-05-15 Pedro Alves <palves@redhat.com>
1393
1394 * target.h (target_handle_new_gdb_connection): Rewrite using if
1395 wrapped in do/while.
1396
1397 2015-05-14 Joel Brobecker <brobecker@adacore.com>
1398
1399 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1400 * configure, config.in: Regenerate.
1401 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1402 Declare typedef.
1403
1404 2015-05-12 Don Breazeal <donb@codesourcery.com>
1405
1406 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1407 PTRACE_EVENT_VFORK_DONE.
1408 (linux_low_ptrace_options, extended_event_reported): Add vfork
1409 events.
1410 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1411 and "vforkdone" for RSP 'T' Stop Reply Packet.
1412 * server.h (report_vfork_events): Declare
1413 global variable.
1414
1415 2015-05-12 Don Breazeal <donb@codesourcery.com>
1416
1417 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1418 (the_low_target) <new_fork>: Initialize new member.
1419 * linux-arm-low.c (arm_new_fork): New function.
1420 (the_low_target) <new_fork>: Initialize new member.
1421 * linux-low.c (handle_extended_wait): Call new target function
1422 new_fork.
1423 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1424 * linux-mips-low.c (mips_add_watchpoint): New function
1425 extracted from mips_insert_point.
1426 (the_low_target) <new_fork>: Initialize new member.
1427 (mips_linux_new_fork): New function.
1428 (mips_insert_point): Call mips_add_watchpoint.
1429 * linux-x86-low.c (x86_linux_new_fork): New function.
1430 (the_low_target) <new_fork>: Initialize new member.
1431
1432 2015-05-12 Don Breazeal <donb@codesourcery.com>
1433
1434 * linux-low.c (handle_extended_wait): Implement return value,
1435 rename argument 'event_child' to 'event_lwp', handle
1436 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1437 (linux_low_ptrace_options): New function.
1438 (linux_low_filter_event): Call linux_low_ptrace_options,
1439 use different argument fo linux_enable_event_reporting,
1440 use return value from handle_extended_wait.
1441 (extended_event_reported): New function.
1442 (linux_wait_1): Call extended_event_reported and set
1443 status to report fork events.
1444 (linux_write_memory): Add pid to debug message.
1445 (reset_lwp_ptrace_options_callback): New function.
1446 (linux_handle_new_gdb_connection): New function.
1447 (linux_target_ops): Initialize new structure member.
1448 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1449 * lynx-low.c: Initialize new structure member.
1450 * remote-utils.c (prepare_resume_reply): Implement stop reason
1451 "fork" for "T" stop message.
1452 * server.c (handle_query): Call handle_new_gdb_connection.
1453 * server.h (report_fork_events): Declare global flag.
1454 * target.h (struct target_ops) <handle_new_gdb_connection>:
1455 New member.
1456 (target_handle_new_gdb_connection): New macro.
1457 * win32-low.c: Initialize new structure member.
1458
1459 2015-05-12 Don Breazeal <donb@codesourcery.com>
1460
1461 * mem-break.c (APPEND_TO_LIST): Define macro.
1462 (clone_agent_expr): New function.
1463 (clone_one_breakpoint): New function.
1464 (clone_all_breakpoints): New function.
1465 * mem-break.h: Declare new functions.
1466
1467 2015-05-12 Don Breazeal <donb@codesourcery.com>
1468
1469 * linux-low.c (linux_supports_fork_events): New function.
1470 (linux_supports_vfork_events): New function.
1471 (linux_target_ops): Initialize new structure members.
1472 (initialize_low): Call linux_check_ptrace_features.
1473 * lynx-low.c (lynx_target_ops): Initialize new structure
1474 members.
1475 * server.c (report_fork_events, report_vfork_events):
1476 New global flags.
1477 (handle_query): Add new features to qSupported packet and
1478 response.
1479 (captured_main): Initialize new global variables.
1480 * target.h (struct target_ops) <supports_fork_events>:
1481 New member.
1482 <supports_vfork_events>: New member.
1483 (target_supports_fork_events): New macro.
1484 (target_supports_vfork_events): New macro.
1485 * win32-low.c (win32_target_ops): Initialize new structure
1486 members.
1487
1488 2015-05-12 Gary Benson <gbenson@redhat.com>
1489
1490 * server.c (handle_qxfer_exec_file): Use current process
1491 if annex is empty.
1492
1493 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1494
1495 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1496 Remove HAVE_PTRACE_GETREGS conditionals.
1497 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1498 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1499
1500 2015-05-08 Yao Qi <yao.qi@linaro.org>
1501
1502 * linux-low.c (linux_supports_conditional_breakpoints): New
1503 function.
1504 (linux_target_ops): Install new target method.
1505 * lynx-low.c (lynx_target_ops): Install NULL hook for
1506 supports_conditional_breakpoints.
1507 * nto-low.c (nto_target_ops): Likewise.
1508 * spu-low.c (spu_target_ops): Likewise.
1509 * win32-low.c (win32_target_ops): Likewise.
1510 * server.c (handle_query): Check
1511 target_supports_conditional_breakpoints.
1512 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1513 New field.
1514 (target_supports_conditional_breakpoints): New macro.
1515
1516 2015-05-06 Pedro Alves <palves@redhat.com>
1517
1518 PR server/18081
1519 * server.c (start_inferior): If the process exits, mourn it.
1520
1521 2015-04-21 Gary Benson <gbenson@redhat.com>
1522
1523 * hostio.c (fileio_open_flags_to_host): Factored out to
1524 fileio_to_host_openflags in common/fileio.c. Single use
1525 updated.
1526
1527 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1528
1529 * linux-xtensa-low.c (xtensa_fill_gregset)
1530 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1531 XCHAL_HAVE_LOOP.
1532
1533 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1534
1535 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1536 (regs_info): Replace usrregs pointer with NULL.
1537
1538 2015-04-17 Gary Benson <gbenson@redhat.com>
1539
1540 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1541 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1542 * server.c (handle_qxfer_exec_file): New function.
1543 (qxfer_packets): Add exec-file entry.
1544 (handle_query): Report qXfer:exec-file:read as supported packet.
1545
1546 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1547
1548 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1549
1550 2015-04-09 Gary Benson <gbenson@redhat.com>
1551
1552 * hostio-errno.c (errno_to_fileio_error): Remove function.
1553 Update caller to use remote_fileio_to_fio_error.
1554
1555 2015-04-09 Yao Qi <yao.qi@linaro.org>
1556
1557 * linux-low.c (linux_insert_point): Call
1558 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1559 (linux_remove_point): Call remove_memory_breakpoint if type is
1560 raw_bkpt_type_sw.
1561 * linux-x86-low.c (x86_insert_point): Don't call
1562 insert_memory_breakpoint.
1563 (x86_remove_point): Don't call remove_memory_breakpoint.
1564
1565 2015-04-01 Pedro Alves <palves@redhat.com>
1566 Cleber Rosa <crosa@redhat.com>
1567
1568 * server.c (gdbserver_usage): Reorganize and extend the usage
1569 message.
1570
1571 2015-03-24 Pedro Alves <palves@redhat.com>
1572
1573 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1574 output. Also dump TRAP_TRACE.
1575 (linux_low_filter_event): In debug output, distinguish a
1576 resume_stop SIGSTOP from a delayed SIGSTOP.
1577
1578 2015-03-24 Gary Benson <gbenson@redhat.com>
1579
1580 * linux-x86-low.c (x86_linux_new_thread): Moved to
1581 nat/x86-linux.c.
1582 (x86_linux_prepare_to_resume): Likewise.
1583
1584 2015-03-24 Gary Benson <gbenson@redhat.com>
1585
1586 * Makefile.in (x86-linux-dregs.o): New rule.
1587 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1588 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1589 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1590 (x86_linux_dr_get): Likewise.
1591 (x86_linux_dr_set): Likewise.
1592 (update_debug_registers_callback): Likewise.
1593 (x86_linux_dr_set_addr): Likewise.
1594 (x86_linux_dr_get_addr): Likewise.
1595 (x86_linux_dr_set_control): Likewise.
1596 (x86_linux_dr_get_control): Likewise.
1597 (x86_linux_dr_get_status): Likewise.
1598 (x86_linux_update_debug_registers): Likewise.
1599
1600 2015-03-24 Gary Benson <gbenson@redhat.com>
1601
1602 * linux-x86-low.c (x86_linux_update_debug_registers):
1603 New function, factored out from...
1604 (x86_linux_prepare_to_resume): ...this.
1605
1606 2015-03-24 Gary Benson <gbenson@redhat.com>
1607
1608 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1609 (x86_linux_dr_set): Likewise.
1610 (update_debug_registers_callback): Likewise.
1611 (x86_linux_dr_set_addr): Likewise.
1612 (x86_linux_dr_get_addr): Likewise.
1613 (x86_linux_dr_set_control): Likewise.
1614 (x86_linux_dr_get_control): Likewise.
1615 (x86_linux_dr_get_status): Likewise.
1616 (x86_linux_prepare_to_resume): Likewise.
1617
1618 2015-03-24 Gary Benson <gbenson@redhat.com>
1619
1620 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1621 Use perror_with_name. Pass string through gettext.
1622 (x86_linux_dr_set): Likewise.
1623
1624 2015-03-24 Gary Benson <gbenson@redhat.com>
1625
1626 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1627 (x86_linux_dr_set_addr): ...this.
1628 (x86_dr_low_get_addr): Rename to...
1629 (x86_linux_dr_get_addr): ...this.
1630 (x86_dr_low_set_control): Rename to...
1631 (x86_linux_dr_set_control): ...this.
1632 (x86_dr_low_get_control): Rename to...
1633 (x86_linux_dr_get_control): ...this.
1634 (x86_dr_low_get_status): Rename to...
1635 (x86_linux_dr_get_status): ...this.
1636 (x86_dr_low): Update with new function names.
1637
1638 2015-03-24 Gary Benson <gbenson@redhat.com>
1639
1640 * Makefile.in (x86-linux.o): New rule.
1641 * configure.srv: Add x86-linux.o to relevant targets.
1642 * linux-low.c (lwp_set_arch_private_info): New function.
1643 (lwp_arch_private_info): Likewise.
1644 * linux-x86-low.c: Include nat/x86-linux.h.
1645 (arch_lwp_info): Removed structure.
1646 (update_debug_registers_callback):
1647 Use lwp_set_debug_registers_changed.
1648 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1649 and lwp_set_debug_registers_changed.
1650 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1651
1652 2015-03-24 Gary Benson <gbenson@redhat.com>
1653
1654 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1655 * linux-arm-low.c (arm_new_thread): Likewise.
1656 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1657 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1658 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1659 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1660
1661 2015-03-24 Gary Benson <gbenson@redhat.com>
1662
1663 * linux-low.c (ptid_of_lwp): New function.
1664 (lwp_is_stopped): Likewise.
1665 (lwp_stop_reason): Likewise.
1666 * linux-x86-low.c (update_debug_registers_callback):
1667 Use lwp_is_stopped.
1668 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1669 lwp_stop_reason.
1670
1671 2015-03-24 Gary Benson <gbenson@redhat.com>
1672
1673 * linux-low.h (linux_stop_lwp): Remove declaration.
1674
1675 2015-03-24 Gary Benson <gbenson@redhat.com>
1676
1677 * linux-low.h: Include nat/linux-nat.h.
1678 * linux-low.c (iterate_over_lwps_args): New structure.
1679 (iterate_over_lwps_filter): New function.
1680 (iterate_over_lwps): Likewise.
1681 * linux-x86-low.c (update_debug_registers_callback):
1682 Update signature to what iterate_over_lwps expects.
1683 Remove PID check that iterate_over_lwps now performs.
1684 (x86_dr_low_set_addr): Use iterate_over_lwps.
1685 (x86_dr_low_set_control): Likewise.
1686
1687 2015-03-24 Gary Benson <gbenson@redhat.com>
1688
1689 * linux-x86-low.c (x86_debug_reg_state): New function.
1690 (x86_linux_prepare_to_resume): Use the above.
1691
1692 2015-03-24 Gary Benson <gbenson@redhat.com>
1693
1694 * linux-low.c (current_lwp_ptid): New function.
1695 * linux-x86-low.c: Include nat/linux-nat.h.
1696 (x86_dr_low_get_addr): Use current_lwp_ptid.
1697 (x86_dr_low_get_control): Likewise.
1698 (x86_dr_low_get_status): Likewise.
1699
1700 2015-03-20 Pedro Alves <palves@redhat.com>
1701
1702 * tracepoint.c (cmd_qtstatus): Make "str" const.
1703
1704 2015-03-20 Pedro Alves <palves@redhat.com>
1705
1706 * server.c (handle_general_set): Make "req_str" const.
1707
1708 2015-03-19 Pedro Alves <palves@redhat.com>
1709
1710 * linux-low.c (linux_resume_one_lwp): Rename to ...
1711 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1712 instead call perror_with_name.
1713 (check_ptrace_stopped_lwp_gone): New function.
1714 (linux_resume_one_lwp): Reimplement as wrapper around
1715 linux_resume_one_lwp_throw that swallows errors if the LWP is
1716 gone.
1717
1718 2015-03-19 Pedro Alves <palves@redhat.com>
1719
1720 * linux-low.c (count_events_callback, select_event_lwp_callback):
1721 No longer check whether the thread has resume_stop as last resume
1722 kind.
1723
1724 2015-03-19 Pedro Alves <palves@redhat.com>
1725
1726 * linux-low.c (count_events_callback, select_event_lwp_callback):
1727 Use the lwp's status_pending_p field, not the thread's.
1728
1729 2015-03-19 Pedro Alves <palves@redhat.com>
1730
1731 * linux-low.c (select_event_lwp_callback): Update comments to
1732 no longer mention SIGTRAP.
1733
1734 2015-03-18 Gary Benson <gbenson@redhat.com>
1735
1736 * server.c (handle_query): Do not report vFile:fstat as supported.
1737
1738 2015-03-11 Gary Benson <gbenson@redhat.com>
1739
1740 * hostio.c (sys/types.h): New include.
1741 (sys/stat.h): Likewise.
1742 (common-remote-fileio.h): Likewise.
1743 (handle_fstat): New function.
1744 (handle_vFile): Handle vFile:fstat packets.
1745
1746 2015-03-11 Gary Benson <gbenson@redhat.com>
1747
1748 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1749 struct stat.st_blocks and struct stat.st_blksize.
1750 * configure: Regenerate.
1751 * config.in: Likewise.
1752 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1753 (OBS): Add common-remote-fileio.o.
1754 (common-remote-fileio.o): New rule.
1755
1756 2015-03-09 Pedro Alves <palves@redhat.com>
1757
1758 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1759 'struct sockaddr' pointer in 'accept' call.
1760
1761 2015-03-09 Pedro Alves <palves@redhat.com>
1762
1763 Revert:
1764 2015-03-07 Pedro Alves <palves@redhat.com>
1765 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1766 or <winsock2.h> here. Instead include "gdb_socket.h".
1767 (remote_open): Use union gdb_sockaddr_u.
1768 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1769 or <winsock2.h> here. Instead include "gdb_socket.h".
1770 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1771 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1772 or <sys/un.h>.
1773 (init_named_socket, gdb_agent_helper_thread): Use union
1774 gdb_sockaddr_u.
1775
1776 2015-03-07 Pedro Alves <palves@redhat.com>
1777
1778 * configure.ac (build_warnings): Move
1779 -Wdeclaration-after-statement to the C-specific set.
1780 * configure: Regenerate.
1781
1782 2015-03-07 Pedro Alves <palves@redhat.com>
1783
1784 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1785 or <winsock2.h> here. Instead include "gdb_socket.h".
1786 (remote_open): Use union gdb_sockaddr_u.
1787 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1788 or <winsock2.h> here. Instead include "gdb_socket.h".
1789 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1790 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1791 or <sys/un.h>.
1792 (init_named_socket, gdb_agent_helper_thread): Use union
1793 gdb_sockaddr_u.
1794
1795 2015-03-07 Pedro Alves <palves@redhat.com>
1796
1797 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1798 instead.
1799
1800 2015-03-06 Yao Qi <yao.qi@linaro.org>
1801
1802 * linux-aarch64-low.c (aarch64_insert_point): Use
1803 show_debug_regs as a boolean.
1804 (aarch64_remove_point): Likewise.
1805
1806 2015-03-05 Pedro Alves <palves@redhat.com>
1807
1808 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1809 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1810 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1811 * nto-low.c (nto_target_ops): Likewise.
1812 * spu-low.c (spu_target_ops): Likewise.
1813 * win32-low.c (win32_target_ops): Likewise.
1814
1815 2015-03-04 Pedro Alves <palves@redhat.com>
1816
1817 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
1818 Decide whether a breakpoint triggered based on the SIGTRAP's
1819 siginfo.si_code.
1820 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1821 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
1822 (linux_low_filter_event): Check for breakpoints before checking
1823 watchpoints.
1824 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1825 siginfo.si_code.
1826 (linux_stopped_by_sw_breakpoint)
1827 (linux_supports_stopped_by_sw_breakpoint)
1828 (linux_stopped_by_hw_breakpoint)
1829 (linux_supports_stopped_by_hw_breakpoint): New functions.
1830 (linux_target_ops): Install new target methods.
1831
1832 2015-03-04 Pedro Alves <palves@redhat.com>
1833
1834 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1835 * server.c (swbreak_feature, hwbreak_feature): New globals.
1836 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1837 (captured_main): Clear swbreak_feature and hwbreak_feature.
1838 * server.h (swbreak_feature, hwbreak_feature): Declare.
1839 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1840 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1841 supports_stopped_by_hw_breakpoint>: New fields.
1842 (target_supports_stopped_by_sw_breakpoint)
1843 (target_stopped_by_sw_breakpoint)
1844 (target_supports_stopped_by_hw_breakpoint)
1845 (target_stopped_by_hw_breakpoint): Declare.
1846
1847 2015-03-04 Pedro Alves <palves@redhat.com>
1848
1849 enum lwp_stop_reason -> enum target_stop_reason
1850 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1851 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1852 (linux_wait_1, stuck_in_jump_pad_callback)
1853 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1854 (linux_stopped_by_watchpoint):
1855 * linux-low.h (enum lwp_stop_reason): Delete.
1856 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1857 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1858
1859 2015-03-04 Yao Qi <yao.qi@linaro.org>
1860
1861 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1862
1863 2015-03-03 Gary Benson <gbenson@redhat.com>
1864
1865 * hostio.c (handle_vFile): Fix prefix lengths.
1866
1867 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1868
1869 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1870 ptr_bits.
1871
1872 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1873
1874 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1875 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1876 (clean): Add "rm -f" for above C files.
1877 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1878 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1879 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1880 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1881 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1882 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1883 (init_registers_s390x_vx_linux64)
1884 (init_registers_s390x_tevx_linux64)
1885 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1886 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1887 declarations.
1888 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1889 (s390_store_vxrs_high): New functions.
1890 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1891 NT_S390_VXRS_HIGH.
1892 (s390_arch_setup): Add logic for selecting one of the new target
1893 descriptions. Activate the new vector regsets if applicable.
1894 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1895 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1896 and init_registers_s390x_tevx_linux64.
1897
1898 2015-03-01 Pedro Alves <palves@redhat.com>
1899
1900 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1901 parameter.
1902
1903 2015-02-27 Pedro Alves <palves@redhat.com>
1904
1905 * linux-x86-low.c (u_debugreg_offset): New function.
1906 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1907
1908 2015-02-27 Pedro Alves <palves@redhat.com>
1909
1910 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1911 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1912 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1913 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1914 (ps_lsetfpregs, ps_getpid)
1915 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1916 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1917 (ps_lsetxregs, ps_plog): Declare.
1918
1919 2015-02-27 Pedro Alves <palves@redhat.com>
1920
1921 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1922 IP_AGENT_EXPORT_FUNC.
1923 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1924 IP_AGENT_EXPORT_FUNC.
1925 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1926 (IP_AGENT_EXPORT): Delete.
1927 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1928 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1929 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1930 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1931 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1932 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1933 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1934 (traceframe_read_count, traceframe_write_count)
1935 (traceframes_created, trace_state_variables, get_raw_reg)
1936 (get_trace_state_variable_value, set_trace_state_variable_value)
1937 (ust_loaded, helper_thread_id, cmd_buf): Use
1938 IPA_SYM_EXPORTED_NAME.
1939 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1940 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1941 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1942 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1943 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1944 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1945 EXTERN_C_PUSH/EXTERN_C_POP.
1946 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1947 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1948 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1949 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1950 (traceframe_write_count, traceframe_read_count)
1951 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1952 (about_to_request_buffer_space, get_trace_state_variable_value)
1953 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1954 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1955 EXTERN_C_PUSH/EXTERN_C_POP.
1956 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1957 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1958 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1959 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1960 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1961 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1962 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1963 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1964 Define.
1965 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1966 (IP_AGENT_EXPORT_VAR_DECL): Define.
1967 (tracing): Declare.
1968 (gdb_agent_get_raw_reg): Declare.
1969
1970 2015-02-27 Tom Tromey <tromey@redhat.com>
1971 Pedro Alves <palves@redhat.com>
1972
1973 Rename symbols whose names are reserved C++ keywords throughout.
1974
1975 2015-02-27 Pedro Alves <palves@redhat.com>
1976
1977 * Makefile.in (COMPILER): New, get it from autoconf.
1978 (CXX): Get from autoconf instead.
1979 (COMPILE.pre): Use COMPILER.
1980 (CC-LD): Rename to ...
1981 (CC_LD): ... this. Use COMPILER.
1982 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
1983 (CXX_FOR_TARGET): Default to g++ instead of gcc.
1984 * acinclude.m4: Include build-with-cxx.m4.
1985 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
1986 Disable -Werror by default if building in C++ mode.
1987 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
1988 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
1989 the C++ compiler. Save/restore CXXFLAGS too.
1990 * configure: Regenerate.
1991
1992 2015-02-27 Pedro Alves <palves@redhat.com>
1993
1994 * acinclude.m4: Include libiberty.m4.
1995 * configure.ac: Call libiberty_INIT.
1996 * config.in, configure: Regenerate.
1997
1998 2015-02-26 Pedro Alves <palves@redhat.com>
1999
2000 * linux-low.c (linux_wait_1): When incrementing the PC past a
2001 program breakpoint always use the_low_target.breakpoint_len as
2002 increment, rather than the maximum between that and
2003 the_low_target.decr_pc_after_break.
2004
2005 2015-02-23 Pedro Alves <palves@redhat.com>
2006
2007 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2008 thread was doing a step-over; always adjust the PC if
2009 we stepped over a permanent breakpoint.
2010 (linux_wait_1): If we stepped over breakpoint that was on top of a
2011 permanent breakpoint, manually advance the PC past it.
2012
2013 2015-02-23 Pedro Alves <palves@redhat.com>
2014
2015 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2016 modes.
2017 (x86_fill_gregset, x86_store_gregset): Use it when handling
2018 $orig_eax.
2019
2020 2015-02-20 Pedro Alves <palves@redhat.com>
2021
2022 * thread-db.c: Include "nat/linux-procfs.h".
2023 (thread_db_init): Skip listing new threads if the kernel supports
2024 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2025
2026 2015-02-20 Pedro Alves <palves@redhat.com>
2027
2028 * linux-low.c (status_pending_p_callback): Use ptid_match.
2029
2030 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2031
2032 PR breakpoints/16812
2033 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2034 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2035 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2036
2037 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2038
2039 PR breakpoints/15956
2040 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2041
2042 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2043
2044 * linux-low.c (linux_low_btrace_conf): Print size.
2045 * server.c (handle_btrace_conf_general_set): New.
2046 (hanle_general_set): Call handle_btrace_conf_general_set.
2047 (handle_query): Report Qbtrace-conf:bts:size as supported.
2048
2049 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2050
2051 * linux-low.c (linux_low_enable_btrace): Update parameters.
2052 (linux_low_btrace_conf): New.
2053 (linux_target_ops)<to_btrace_conf>: Initialize.
2054 * server.c (current_btrace_conf): New.
2055 (handle_btrace_enable): Rename to ...
2056 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
2057 to target_enable_btrace. Update comment. Update users.
2058 (handle_qxfer_btrace_conf): New.
2059 (qxfer_packets): Add btrace-conf entry.
2060 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2061 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2062 (target_ops)<read_btrace_conf>: New.
2063 (target_enable_btrace): Update parameters.
2064 (target_read_btrace_conf): New.
2065
2066 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2067
2068 * server.c (handle_btrace_general_set): Remove call to
2069 target_supports_btrace.
2070 (supported_btrace_packets): New.
2071 (handle_query): Call supported_btrace_packets.
2072 * target.h: include btrace-common.h.
2073 (btrace_target_info): Removed.
2074 (supports_btrace, target_supports_btrace): Update parameters.
2075
2076 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2077
2078 * Makefile.in (SFILES): Add common/btrace-common.c.
2079 (OBS): Add common/btrace-common.o.
2080 (btrace-common.o): Add build rules.
2081 * linux-low: Include btrace-common.h.
2082 (linux_low_read_btrace): Use struct btrace_data. Call
2083 btrace_data_init and btrace_data_fini.
2084
2085 2015-02-06 Pedro Alves <palves@redhat.com>
2086
2087 * thread-db.c (find_new_threads_callback): Add debug output.
2088
2089 2015-02-04 Pedro Alves <palves@redhat.com>
2090
2091 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2092 (resume_stopped_resumed_lwps): New function.
2093 (linux_wait_for_event_filtered): Use it.
2094
2095 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2096
2097 * Makefile.in (SFILES): Add linux-personality.c.
2098 (linux-personality.o): New rule.
2099 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2100 list of objects to be built.
2101 * linux-low.c: Include nat/linux-personality.h.
2102 (linux_create_inferior): Remove code to disable address space
2103 randomization (moved to ../nat/linux-personality.c). Create
2104 cleanup to disable address space randomization.
2105
2106 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2107
2108 * Makefile.in (posix-strerror.o): New rule.
2109 (mingw-strerror.o): Likewise.
2110 * configure: Regenerated.
2111 * configure.ac: Source file ../common/common.host. Initialize new
2112 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2113
2114 2015-01-14 Yao Qi <yao@codesourcery.com>
2115
2116 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2117 (ppc-linux.o): New rule.
2118 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2119 * configure.ac: AC_CHECK_FUNCS(getauxval).
2120 * config.in: Re-generated.
2121 * configure: Re-generated.
2122 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2123 ppc64_64bit_inferior_p
2124
2125 2015-01-14 Yao Qi <yao@codesourcery.com>
2126
2127 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2128 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2129 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2130 (PT_ORIG_R3, PT_TRAP): Likewise.
2131 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2132 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2133 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2134
2135 2015-01-10 Joel Brobecker <brobecker@adacore.com>
2136
2137 * i387-fp.c (i387_cache_to_xsave): In look over
2138 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2139 zmmh_low_space field by use of zmmh_high_space.
2140
2141 2015-01-09 Pedro Alves <palves@redhat.com>
2142
2143 * linux-low.c (step_over_bkpt): Move higher up in the file.
2144 (handle_extended_wait): Don't store the stop_pc here.
2145 (get_stop_pc): Adjust comments and rename to ...
2146 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2147 stopped for a software breakpoint or hardware breakpoint.
2148 (thread_still_has_status_pending_p): New function.
2149 (status_pending_p_callback): Use
2150 thread_still_has_status_pending_p. If the event is no longer
2151 interesting, resume the LWP.
2152 (handle_tracepoints): Add assert.
2153 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2154 (wstatus_maybe_breakpoint): New function.
2155 (cancel_breakpoint): Delete function.
2156 (check_stopped_by_watchpoint): New function, factored out from
2157 linux_low_filter_event.
2158 (lp_status_maybe_breakpoint): Delete function.
2159 (linux_low_filter_event): Remove filter_ptid argument.
2160 Leave thread group exits pending here. Store the LWP's stop PC.
2161 Always leave events pending.
2162 (linux_wait_for_event_filtered): Pull all events out of the
2163 kernel, and leave them all pending.
2164 (count_events_callback, select_event_lwp_callback): Consider all
2165 events.
2166 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2167 (select_event_lwp): Only give preference to the stepping LWP in
2168 all-stop mode. Adjust comments.
2169 (ignore_event): New function.
2170 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2171 references to cancel_breakpoints. Adjust to renames. Also give
2172 equal priority to all LWPs that have had events in non-stop mode.
2173 If reporting a software breakpoint event, unadjust the LWP's PC.
2174 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2175 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2176 Adjust.
2177 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2178 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2179 (linux_stopped_by_watchpoint): Adjust.
2180 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2181 * linux-low.h (enum lwp_stop_reason): New.
2182 (struct lwp_info) <stop_pc>: Adjust comment.
2183 <stopped_by_watchpoint>: Delete field.
2184 <stop_reason>: New field.
2185 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2186 * mem-break.c (software_breakpoint_inserted_here)
2187 (hardware_breakpoint_inserted_here): New function.
2188 * mem-break.h (software_breakpoint_inserted_here)
2189 (hardware_breakpoint_inserted_here): Declare.
2190 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2191 (cancel_breakpoints): Delete.
2192 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2193 (upload_fast_traceframes): Remove references to
2194 cancel_breakpoints.
2195
2196 2015-01-09 Pedro Alves <palves@redhat.com>
2197
2198 * thread-db.c (find_new_threads_callback): Ignore thread if the
2199 kernel thread ID is -1.
2200
2201 2015-01-09 Pedro Alves <palves@redhat.com>
2202
2203 * linux-low.c (linux_attach_fail_reason_string): Move to
2204 nat/linux-ptrace.c, and rename.
2205 (linux_attach_lwp): Update comment.
2206 (attach_proc_task_lwp_callback): New function.
2207 (linux_attach): Adjust to rename and use
2208 linux_proc_attach_tgid_threads.
2209 (linux_attach_fail_reason_string): Delete declaration.
2210
2211 2015-01-01 Joel Brobecker <brobecker@adacore.com>
2212
2213 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2214 * server.c (gdbserver_version): Likewise.
2215
2216 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2217
2218 * remote-utils.c: Include ctype.h.
2219 (input_interrupt): Explicitly handle the case when the char
2220 received is the NUL byte. Improve the printing of non-ASCII
2221 characters.
2222
2223 2014-12-16 Joel Brobecker <brobecker@adacore.com>
2224
2225 * linux-low.c (linux_low_filter_event): Update call to
2226 linux_enable_event_reporting following the addition of
2227 a new parameter to that function.
2228
2229 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
2230
2231 PR server/17457
2232 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2233 (AARCH64_FPCR_REGNO): Likewise.
2234 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2235 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2236 (aarch64_store_fpregset): Likewise.
2237
2238 2014-12-15 Joel Brobecker <brobecker@adacore.com>
2239
2240 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2241 Remove FIXME comment about assumption about N.
2242
2243 2014-12-13 Joel Brobecker <brobecker@adacore.com>
2244
2245 * configure.ac: If large-file support is disabled in GDBserver,
2246 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2247 * configure: Regenerate.
2248
2249 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2250
2251 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2252 warning upon ENODATA from ptrace.
2253 * linux-s390-low.c (s390_store_tdb): New.
2254 (s390_regsets): Add regset for NT_S390_TDB.
2255
2256 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2257
2258 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2259 without a fill_function.
2260 * linux-s390-low.c (s390_fill_last_break): Remove.
2261 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2262 (s390_arch_setup): Use regset's size instead of fill_function for
2263 loop end condition.
2264
2265 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2266
2267 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2268 the regset's store function when ptrace returned an error.
2269 * regcache.c (get_thread_regcache): Invalidate register cache
2270 before fetching inferior's registers.
2271
2272 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2273
2274 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2275 while-loop as for-loop.
2276 (regsets_store_inferior_registers): Likewise.
2277
2278 2014-11-28 Yao Qi <yao@codesourcery.com>
2279
2280 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2281 * config.in, configure: Re-generate.
2282 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2283 is defined.
2284
2285 2014-11-21 Yao Qi <yao@codesourcery.com>
2286
2287 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2288 (AC_CHECK_HEADERS): Remove malloc.h.
2289 * configure: Re-generated.
2290 * config.in: Re-generated.
2291 * server.h: Don't include alloca.h and malloc.h.
2292 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2293 Don't include malloc.h.
2294
2295 2014-11-17 Joel Brobecker <brobecker@adacore.com>
2296
2297 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2298 corresponding ERRNO check in same block.
2299
2300 2014-11-12 Pedro Alves <palves@redhat.com>
2301
2302 * server.c (cont_thread): Update comment.
2303 (start_inferior, attach_inferior): No longer clear cont_thread.
2304 (handle_v_cont): No longer set cont_thread.
2305 (captured_main): Clear cont_thread each time a GDB connects.
2306
2307 2014-11-12 Pedro Alves <palves@redhat.com>
2308
2309 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2310 thread, and don't resume all threads if the Hc thread has exited.
2311
2312 2014-11-12 Pedro Alves <palves@redhat.com>
2313
2314 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2315 the process group instead of to a specific LWP.
2316
2317 2014-10-15 Pedro Alves <palves@redhat.com>
2318
2319 PR server/17487
2320 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2321 parameter.
2322 (arm_set_thread_context): Delete.
2323 (the_low_target): Adjust.
2324 * win32-i386-low.c (debug_registers_changed)
2325 (debug_registers_used): Delete.
2326 (update_debug_registers_callback): New function.
2327 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2328 needing to update their debug registers.
2329 (win32_get_current_dr): New function.
2330 (x86_dr_low_get_addr, x86_dr_low_get_control)
2331 (x86_dr_low_get_status): Fetch the debug register from the thread
2332 record's context.
2333 (i386_initial_stuff): Adjust.
2334 (i386_get_thread_context): Remove current_event parameter. Don't
2335 clear debug_registers_changed nor copy DR values to
2336 debug_reg_state.
2337 (i386_set_thread_context): Delete.
2338 (i386_prepare_to_resume): New function.
2339 (i386_thread_added): Mark the thread as needing to update irs
2340 debug registers.
2341 (the_low_target): Remove i386_set_thread_context and install
2342 i386_prepare_to_resume.
2343 * win32-low.c (win32_get_thread_context): Adjust.
2344 (win32_set_thread_context): Use SetThreadContext
2345 directly.
2346 (win32_prepare_to_resume): New function.
2347 (win32_require_context): New function, factored out from ...
2348 (thread_rec): ... this.
2349 (continue_one_thread): Call win32_prepare_to_resume on each thread
2350 we're about to continue.
2351 (win32_resume): Call win32_prepare_to_resume on the event thread.
2352 * win32-low.h (struct win32_thread_info)
2353 <debug_registers_changed>: New field.
2354 (struct win32_target_ops): Change prototype of set_thread_context,
2355 delete set_thread_context and add prepare_to_resume.
2356 (win32_require_context): New declaration.
2357
2358 2014-10-08 Gary Benson <gbenson@redhat.com>
2359
2360 * server.h: Do not include common-exceptions.h.
2361
2362 2014-10-08 Gary Benson <gbenson@redhat.com>
2363
2364 * server.h: Do not include cleanups.h.
2365
2366 2014-09-30 James Hogan <james.hogan@imgtec.com>
2367
2368 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2369 mips64-dsp-linux.c.
2370
2371 2014-09-23 Yao Qi <yao@codesourcery.com>
2372
2373 * linux-low.c (lp_status_maybe_breakpoint): New function.
2374 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2375 (count_events_callback): Likewise.
2376 (select_event_lwp_callback): Likewise.
2377 (cancel_breakpoints_callback): Likewise.
2378
2379 2014-09-19 Don Breazeal <donb@codesourcery.com>
2380
2381 * linux-low.c (handle_extended_wait): Call
2382 linux_ptrace_get_extended_event.
2383 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2384 linux_is_extended_waitstatus.
2385
2386 2014-09-16 Joel Brobecker <brobecker@adacore.com>
2387
2388 * Makefile.in (CPPFLAGS): Define.
2389 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2390 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2391
2392 2014-09-16 Gary Benson <gbenson@redhat.com>
2393
2394 * inferiors.h (current_inferior): Renamed as...
2395 (current_thread): New variable. All uses updated.
2396 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2397 (maybe_move_out_of_jump_pad): Likewise.
2398 (cancel_breakpoint): Likewise.
2399 (linux_low_filter_event): Likewise.
2400 (wait_for_sigstop): Likewise.
2401 (linux_resume_one_lwp): Likewise.
2402 (need_step_over_p): Likewise.
2403 (start_step_over): Likewise.
2404 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2405 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2406 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2407 and save_inferior as saved_thread.
2408 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2409 saved_thread.
2410 (regcache_invalidate_thread): Likewise.
2411 * remote-utils.c (prepare_resume_reply): Likewise.
2412 * thread-db.c (thread_db_get_tls_address): Likewise.
2413 (disable_thread_event_reporting): Likewise.
2414 (remove_thread_event_breakpoints): Likewise.
2415 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2416 as saved_thread.
2417 * target.h (set_desired_inferior): Renamed as...
2418 (set_desired_thread): New declaration. All uses updated.
2419 * server.c (myresume): Updated comment to reference thread instead
2420 of inferior.
2421 (handle_serial_event): Likewise.
2422 (handle_target_event): Likewise.
2423
2424 2014-09-12 Tom Tromey <tromey@redhat.com>
2425 Gary Benson <gbenson@redhat.com>
2426
2427 * regcache.h: Include common-regcache.h.
2428 (regcache_read_pc): Don't declare.
2429 * regcache.c (get_thread_regcache_for_ptid): New function.
2430
2431 2014-09-11 Tom Tromey <tromey@redhat.com>
2432 Gary Benson <gbenson@redhat.com>
2433
2434 * symbol.c: New file.
2435 * Makefile.in (SFILES): Add symbol.c.
2436 (OBS): Add symbol.o.
2437
2438 2014-09-11 Gary Benson <gbenson@redhat.com>
2439
2440 * target.c (target_stop_ptid, target_continue_ptid): New
2441 functions.
2442
2443 2014-09-11 Tom Tromey <tromey@redhat.com>
2444 Gary Benson <gbenson@redhat.com>
2445
2446 * target.h: Include target/target.h.
2447 * target.c (target_read_memory, target_read_uint32)
2448 (target_write_memory): New functions.
2449
2450 2014-09-11 Gary Benson <gbenson@redhat.com>
2451
2452 * server.h (debug_hw_points): Don't declare.
2453 * server.c (debug_hw_points): Don't define. Replace all uses
2454 with show_debug_regs.
2455 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2456 all uses with show_debug_regs.
2457
2458 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2459
2460 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2461 endianness into account.
2462 (ppc_supply_ptrace_register): Likewise.
2463
2464 2014-09-03 James Hogan <james.hogan@imgtec.com>
2465
2466 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2467 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2468
2469 2014-09-03 Gary Benson <gbenson@redhat.com>
2470
2471 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2472 ALL_DEBUG_ADDRESS_REGISTERS.
2473
2474 2014-09-02 Gary Benson <gbenson@redhat.com>
2475
2476 * i386-low.h: Renamed as...
2477 * x86-low.h: New file. All type, function and variable name
2478 prefixes changed from "i386_" to "x86_". All references updated.
2479 * i386-low.c: Renamed as...
2480 * x86-low.c: New file. All type, function and variable name
2481 prefixes changed from "i386_" to "x86_". All references updated.
2482
2483 2014-09-02 Gary Benson <gbenson@redhat.com>
2484
2485 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2486 (x86_linux_new_thread): Likewise.
2487
2488 2014-08-29 Gary Benson <gbenson@redhat.com>
2489
2490 * server.h (setjmp.h): Do not include.
2491 (toplevel): Do not declare.
2492 (common-exceptions.h): Include.
2493 (cleanups.h): Likewise.
2494 * server.c (toplevel): Do not define.
2495 (exit_code): New static global.
2496 (detach_or_kill_for_exit_cleanup): New function.
2497 (main): New function. Original main renamed to...
2498 (captured_main): New function.
2499 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2500
2501 2014-08-29 Gary Benson <gbenson@redhat.com>
2502
2503 * Makefile.in (SFILES): Add common/common-exceptions.c.
2504 (OBS): Add common-exceptions.o.
2505 (common-exceptions.o): New rule.
2506 * utils.c (prepare_to_throw_exception): New function.
2507
2508 2014-08-29 Gary Benson <gbenson@redhat.com>
2509
2510 * config.in: Regenerate.
2511 * configure: Likewise.
2512
2513 2014-08-29 Gary Benson <gbenson@redhat.com>
2514
2515 * Makefile.in (SFILES): Add common/cleanups.c.
2516 (OBS): cleanups.o.
2517 (cleanups.o): New rule.
2518
2519 2014-08-29 Gary Benson <gbenson@redhat.com>
2520
2521 * utils.c (internal_vwarning): New function.
2522
2523 2014-08-28 Gary Benson <gbenson@redhat.com>
2524
2525 * utils.h (fatal): Remove declaration.
2526 * utils.c (fatal): Remove function.
2527
2528 2014-08-28 Gary Benson <gbenson@redhat.com>
2529
2530 * tracepoint.c (gdb_agent_init): Replace fatal with
2531 perror_with_name.
2532 (initialize_tracepoint): Likewise.
2533
2534 2014-08-28 Gary Benson <gbenson@redhat.com>
2535
2536 * remote-utils.c (remote_prepare): Replace fatal with error.
2537
2538 2014-08-28 Gary Benson <gbenson@redhat.com>
2539
2540 * linux-low.c (linux_async): Replace fatal with warning.
2541 Tidy up and return.
2542 (linux_start_non_stop): Return -1 if linux_async failed.
2543
2544 2014-08-28 Gary Benson <gbenson@redhat.com>
2545
2546 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2547 gdb_assert.
2548 (i386_dr_low_get_addr): Remove vague comment.
2549 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2550 gdb_assert.
2551
2552 2014-08-28 Gary Benson <gbenson@redhat.com>
2553
2554 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2555 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2556 internal_error.
2557 (linux_resume_one_lwp): Likewise.
2558 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2559 gdb_assert.
2560 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2561 with internal_error.
2562 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2563 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2564 (find_register_by_name): Replace fatal with internal_error.
2565 (find_regno): Likewise.
2566 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2567 * thread-db.c (thread_db_create_event): Likewise.
2568 (thread_db_load_search): Likewise.
2569 (try_thread_db_load_1): Likewise.
2570 * tracepoint.c (get_jump_space_head): Replace fatal with
2571 internal_error.
2572 (claim_trampoline_space): Likewise.
2573 (have_fast_tracepoint_trampoline_buffer): Likewise.
2574 (cmd_qtstart): Likewise.
2575 (stop_tracing): Likewise.
2576 (fast_tracepoint_collecting): Likewise.
2577 (target_malloc): Likewise.
2578 (download_tracepoint): Likewise.
2579 (download_trace_state_variables): Replace check with gdb_assert.
2580 (upload_fast_traceframes): Replace fatal with internal_error.
2581
2582 2014-08-19 Tom Tromey <tromey@redhat.com>
2583 Gary Benson <gbenson@redhat.com>
2584
2585 * Makefile.in (SFILES): Add common/common-debug.c.
2586 (OBS): Add common-debug.o.
2587 (common-debug.o): New rule.
2588 * debug.h (debug_printf): Don't declare.
2589 * debug.c (debug_printf): Renamed and rewritten as...
2590 (debug_vprintf): New function.
2591
2592 2014-08-19 Gary Benson <gbenson@redhat.com>
2593
2594 * utils.h: Do not include print-utils.h.
2595
2596 2014-08-19 Tom Tromey <tromey@redhat.com>
2597 Gary Benson <gbenson@redhat.com>
2598
2599 * server.h: Add static assertion.
2600 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2601
2602 2014-08-19 Tom Tromey <tromey@redhat.com>
2603 Gary Benson <gbenson@redhat.com>
2604
2605 * Makefile.in (SFILES): Add common/errors.c.
2606 (OBS): Add errors.o.
2607 (IPA_OBS): Add errors-ipa.o.
2608 (errors.o): New rule.
2609 (errors-ipa.o): Likewise.
2610 * utils.h (perror_with_name, error, warning): Don't declare.
2611 * utils.c (warning): Renamed and rewritten as...
2612 (vwarning): New function.
2613 (error): Renamed and rewritten as...
2614 (verror): New function.
2615 (internal_error): Renamed and rewritten as...
2616 (internal_verror): New function.
2617
2618 2014-08-07 Gary Benson <gbenson@redhat.com>
2619
2620 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2621 * configure: Regenerate.
2622 * config.in: Likewise.
2623 * server.h: Do not include errno.h.
2624 * event-loop.c: Likewise.
2625 * hostio-errno.c: Likewise.
2626 * linux-low.c: Likewise.
2627 * remote-utils.c: Likewise.
2628 * spu-low.c: Likewise.
2629 * utils.c: Likewise.
2630 * gdbreplay.c: Unconditionally include errno.h.
2631
2632 2014-08-07 Gary Benson <gbenson@redhat.com>
2633
2634 * server.h: Do not include string.h.
2635 * event-loop.c: Likewise.
2636 * linux-low.c: Likewise.
2637 * regcache.c: Likewise.
2638 * remote-utils.c: Likewise.
2639 * spu-low.c: Likewise.
2640 * utils.c: Likewise.
2641
2642 2014-08-07 Gary Benson <gbenson@redhat.com>
2643
2644 * server.h: Do not include gdb_assert.h.
2645
2646 2014-08-07 Gary Benson <gbenson@redhat.com>
2647
2648 * server.h: Do not include common-utils.h.
2649
2650 2014-08-07 Gary Benson <gbenson@redhat.com>
2651
2652 * server.h: Do not include ptid.h.
2653 * notif.h: Likewise.
2654
2655 2014-08-07 Gary Benson <gbenson@redhat.com>
2656
2657 * server.h: Do not include gdb_locale.h.
2658
2659 2014-08-07 Gary Benson <gbenson@redhat.com>
2660
2661 * server.h: Do not include gdb/signals.h.
2662 * win32-low.c: Likewise.
2663
2664 2014-08-07 Gary Benson <gbenson@redhat.com>
2665
2666 * server.h: Do not include pathmax.h.
2667
2668 2014-08-07 Gary Benson <gbenson@redhat.com>
2669
2670 * server.h: Do not include libiberty.h.
2671 * linux-bfin-low.c: Likewise.
2672
2673 2014-08-07 Gary Benson <gbenson@redhat.com>
2674
2675 * server.h: Do not include ansidecl.h.
2676
2677 2014-08-07 Gary Benson <gbenson@redhat.com>
2678
2679 * linux-x86-low.c: Do not include stddef.h.
2680 * lynx-ppc-low.c: Likewise.
2681 * tracepoint.c: Likewise.
2682
2683 2014-08-07 Gary Benson <gbenson@redhat.com>
2684
2685 * server.h: Do not include stdarg.h.
2686 * nto-low.c: Likewise.
2687
2688 2014-08-07 Gary Benson <gbenson@redhat.com>
2689
2690 * server.h: Do not include stdlib.h.
2691 * inferiors.c: Likewise.
2692 * linux-low.c: Likewise.
2693 * regcache.c: Likewise.
2694 * spu-low.c: Likewise.
2695 * tracepoint.c: Likewise.
2696 * utils.c: Likewise.
2697
2698 2014-08-07 Gary Benson <gbenson@redhat.com>
2699
2700 * server.h: Do not include stdio.h.
2701 * linux-low.c: Likewise.
2702 * remote-utils.c: Likewise.
2703 * spu-low.c: Likewise.
2704 * utils.c: Likewise.
2705 * wincecompat.c: Likewise.
2706
2707 2014-08-06 Gary Benson <gbenson@redhat.com>
2708
2709 * regcache.c (init_register_cache): Move conditionals inside if.
2710
2711 2014-08-06 Gary Benson <gbenson@redhat.com>
2712
2713 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2714
2715 2014-07-31 Gary Benson <gbenson@redhat.com>
2716
2717 * ax.h: Do not include server.h.
2718 * gdbthread.h: Likewise.
2719 * lynx-low.h: Likewise.
2720 * notif.h: Likewise.
2721
2722 2014-07-30 Gary Benson <gbenson@redhat.com>
2723
2724 * server.h: Include common-defs.h.
2725 Do not include config.h or build-gnulib-gdbserver/config.h.
2726
2727 2014-07-30 Gary Benson <gbenson@redhat.com>
2728
2729 * hostio-errno.c: Move server.h to top of includes list.
2730 * inferiors.c: Likewise.
2731 * linux-x86-low.c: Likewise.
2732 * notif.c: Include server.h.
2733
2734 2014-07-24 Tom Tromey <tromey@redhat.com>
2735 Gary Benson <gbenson@redhat.com>
2736
2737 * server.h (CORE_ADDR): Now unsigned.
2738
2739 2014-07-16 Pedro Alves <palves@redhat.com>
2740
2741 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2742
2743 2014-07-15 Pedro Alves <palves@redhat.com>
2744
2745 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2746 copy.
2747
2748 2014-07-11 Pedro Alves <palves@redhat.com>
2749
2750 * linux-low.c (kill_wait_lwp): New function, based on
2751 kill_one_lwp_callback, but use my_waitpid directly.
2752 (kill_one_lwp_callback, linux_kill): Use it.
2753
2754 2014-06-23 Pedro Alves <palves@redhat.com>
2755
2756 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2757 before setting DR0..DR3.
2758
2759 2014-06-20 Gary Benson <gbenson@redhat.com>
2760
2761 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2762 * configure: Regenerated.
2763 * config.in: Likewise.
2764
2765 2014-06-20 Gary Benson <gbenson@redhat.com>
2766
2767 * Makefile.in (SFILES): Update locations for files moved
2768 from common to nat.
2769 (object file files): Reordered.
2770
2771 2014-06-20 Gary Benson <gbenson@redhat.com>
2772
2773 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2774 (i386_dr_low_set_addr): Likewise.
2775 (i386_dr_low_get_addr): Likewise.
2776 (i386_dr_low_can_set_control): Likewise.
2777 (i386_dr_low_set_control): Likewise.
2778 (i386_dr_low_get_control): Likewise.
2779 (i386_dr_low_get_status): Likewise.
2780 (i386_get_debug_register_length): Likewise.
2781 * linux-x86-low.c (i386_dr_low_set_addr):
2782 Changed signature. Made static.
2783 (i386_dr_low_get_addr): Likewise.
2784 (i386_dr_low_set_control): Likewise.
2785 (i386_dr_low_get_control): Likewise.
2786 (i386_dr_low_get_status): Likewise.
2787 (i386_dr_low): New global variable.
2788 * win32-i386-low.c (i386_dr_low_set_addr):
2789 Changed signature. Made static.
2790 (i386_dr_low_get_addr): Likewise.
2791 (i386_dr_low_set_control): Likewise.
2792 (i386_dr_low_get_control): Likewise.
2793 (i386_dr_low_get_status): Likewise.
2794 (i386_dr_low): New global variable.
2795
2796 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2797
2798 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2799 * Makefile.in (AR, AR_FLAGS): Define.
2800 * configure: Regenerate.
2801
2802 2014-06-19 Gary Benson <gbenson@redhat.com>
2803
2804 * Makefile.in (i386-dregs.o): New rule.
2805 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2806 * i386-low.c (target.h): Remove include.
2807 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2808 (DR_CONTROL_SHIFT): Likewise.
2809 (DR_CONTROL_SIZE): Likewise.
2810 (DR_RW_EXECUTE): Likewise.
2811 (DR_RW_WRITE): Likewise.
2812 (DR_RW_READ): Likewise.
2813 (DR_RW_IORW): Likewise.
2814 (DR_LEN_1): Likewise.
2815 (DR_LEN_2): Likewise.
2816 (DR_LEN_4): Likewise.
2817 (DR_LEN_8): Likewise.
2818 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2819 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2820 (DR_ENABLE_SIZE): Likewise.
2821 (DR_LOCAL_SLOWDOWN): Likewise.
2822 (DR_GLOBAL_SLOWDOWN): Likewise.
2823 (DR_CONTROL_RESERVED): Likewise.
2824 (I386_DR_CONTROL_MASK): Likewise.
2825 (I386_DR_VACANT): Likewise.
2826 (I386_DR_LOCAL_ENABLE): Likewise.
2827 (I386_DR_GLOBAL_ENABLE): Likewise.
2828 (I386_DR_DISABLE): Likewise.
2829 (I386_DR_SET_RW_LEN): Likewise.
2830 (I386_DR_GET_RW_LEN): Likewise.
2831 (I386_DR_WATCH_HIT): Likewise.
2832 (i386_wp_op_t): Likewise.
2833 (i386_show_dr): Likewise.
2834 (i386_length_and_rw_bits): Likewise.
2835 (i386_insert_aligned_watchpoint): Likewise.
2836 (i386_remove_aligned_watchpoint): Likewise.
2837 (i386_handle_nonaligned_watchpoint): Likewise.
2838 i386_update_inferior_debug_regs(): Likewise.
2839 (i386_dr_insert_watchpoint): Likewise.
2840 (i386_dr_remove_watchpoint): Likewise.
2841 (i386_dr_region_ok_for_watchpoint): Likewise.
2842 (i386_dr_stopped_data_address): Likewise.
2843 (i386_dr_stopped_by_watchpoint): Likewise.
2844
2845 2014-06-19 Gary Benson <gbenson@redhat.com>
2846
2847 * i386-low.c (i386_dr_show): Renamed to
2848 i386_show_dr and made static. All uses updated.
2849 (i386_dr_length_and_rw_bits): Renamed to
2850 i386_length_and_rw_bits and made static.
2851 All uses updated.
2852 (i386_dr_insert_aligned_watchpoint): Renamed to
2853 i386_insert_aligned_watchpoint and made static.
2854 All uses updated.
2855 (i386_dr_remove_aligned_watchpoint): Renamed to
2856 i386_remove_aligned_watchpoint and made static.
2857 All uses updated.
2858 (i386_dr_update_inferior_debug_regs): Renamed to
2859 i386_update_inferior_debug_regs and made static.
2860 All uses updated.
2861
2862 2014-06-18 Gary Benson <gbenson@redhat.com>
2863
2864 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2865 (i386_dr_low_can_set_control): Likewise.
2866 (i386_get_debug_register_length): Likewise.
2867 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2868 (i386_dr_low_can_set_control): Likewise.
2869 (i386_get_debug_register_length): Likewise.
2870
2871 2014-06-17 Gary Benson <gbenson@redhat.com>
2872
2873 * i386-low.h (i386-dregs.h): New include.
2874 (DR_FIRSTADDR): Now in i386-dregs.h.
2875 (DR_LASTADDR): Likewise.
2876 (DR_NADDR): Likewise.
2877 (DR_STATUS): Likewise.
2878 (DR_CONTROL): Likewise.
2879 (i386_debug_reg_state): Likewise.
2880 (i386_dr_insert_watchpoint): Likewise.
2881 (i386_dr_remove_watchpoint): Likewise.
2882 (i386_dr_region_ok_for_watchpoint): Likewise.
2883 (i386_dr_stopped_data_address): Likewise.
2884 (i386_dr_stopped_by_watchpoint): Likewise.
2885 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2886
2887 2014-06-18 Gary Benson <gbenson@redhat.com>
2888
2889 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2890 i386_dr_insert_watchpoint.
2891 (i386_low_remove_watchpoint): Renamed to
2892 i386_dr_remove_watchpoint.
2893 (i386_low_region_ok_for_watchpoint): Renamed to
2894 i386_dr_region_ok_for_watchpoint.
2895 (i386_low_stopped_data_address): Renamed to
2896 i386_dr_stopped_data_address.
2897 (i386_low_stopped_by_watchpoint): Renamed to
2898 i386_dr_stopped_by_watchpoint.
2899 * i386-low.c (i386_show_dr): Renamed to
2900 i386_dr_show and made nonstatic. All uses updated.
2901 (i386_length_and_rw_bits): Renamed to
2902 i386_dr_length_and_rw_bits and made nonstatic.
2903 All uses updated.
2904 (i386_insert_aligned_watchpoint): Renamed to
2905 i386_dr_insert_aligned_watchpoint and made nonstatic.
2906 All uses updated.
2907 (i386_remove_aligned_watchpoint): Renamed to
2908 i386_dr_remove_aligned_watchpoint and made nonstatic.
2909 All uses updated.
2910 (i386_update_inferior_debug_regs): Renamed to
2911 i386_dr_update_inferior_debug_regs and made nonstatic.
2912 All uses updated.
2913 (i386_low_insert_watchpoint): Renamed to
2914 i386_dr_insert_watchpoint. All uses updated.
2915 (i386_low_remove_watchpoint): Renamed to
2916 i386_dr_remove_watchpoint. All uses updated.
2917 (i386_low_region_ok_for_watchpoint): Renamed to
2918 i386_dr_region_ok_for_watchpoint. All uses updated.
2919 (i386_low_stopped_data_address): Renamed to
2920 i386_dr_stopped_data_address. All uses updated.
2921 (i386_low_stopped_by_watchpoint): Renamed to
2922 i386_dr_stopped_by_watchpoint. All uses updated.
2923
2924 2014-06-18 Gary Benson <gbenson@redhat.com>
2925
2926 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2927 (i386_dr_low_can_set_control): Likewise.
2928 (i386_insert_aligned_watchpoint): New check.
2929
2930 2014-06-18 Gary Benson <gbenson@redhat.com>
2931
2932 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2933 Renamed to state.
2934
2935 2014-06-18 Gary Benson <gbenson@redhat.com>
2936
2937 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2938 instead of fatal and error.
2939 (i386_handle_nonaligned_watchpoint): Likewise.
2940
2941 2014-06-18 Gary Benson <gbenson@redhat.com>
2942
2943 * i386-low.c (i386_get_debug_register_length): New macro.
2944 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2945 (i386_show_dr): Use debug_printf instead of fprintf. Use
2946 phex to format values.
2947
2948 2014-06-18 Gary Benson <gbenson@redhat.com>
2949
2950 * i386-low.h: Comment changes.
2951 * i386-low.c: Likewise.
2952
2953 2014-06-18 Gary Benson <gbenson@redhat.com>
2954
2955 * i386-low.c: Whitespace changes.
2956
2957 2014-06-12 Tom Tromey <tromey@redhat.com>
2958
2959 * utils.c (freeargv): Remove.
2960
2961 2014-06-12 Tom Tromey <tromey@redhat.com>
2962
2963 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2964 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2965 (parse_debug_format_options): Likewise.
2966 (gdbserver_usage): Likewise.
2967 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2968 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2969 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2970 against libiberty.
2971 ($(LIBGNU)): Depend on libiberty.
2972 (all-lib): Recurse into all subdirs.
2973 (install-only): Invoke "install" target in subdirs.
2974 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2975 targets.
2976 * configure: Rebuild.
2977 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
2978 for vasprintf, vsnprintf, or gettimeofday.
2979 * configure.srv: Don't add safe-ctype.o or lbasename.o to
2980 srv_tgtobj.
2981
2982 2014-06-05 Joel Brobecker <brobecker@adacore.com>
2983
2984 * development.sh: Delete.
2985 * Makefile.in (config.status): Adjust dependency on development.sh.
2986 * configure.ac: Adjust development.sh source call.
2987 * configure: Regenerate.
2988
2989 2014-06-02 Pedro Alves <palves@redhat.com>
2990
2991 * ax.c (gdb_free_agent_expr): New function.
2992 * ax.h (gdb_free_agent_expr): New declaration.
2993 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
2994 list.
2995 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
2996 static.
2997 (clear_breakpoint_conditions_and_commands): New function.
2998 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
2999 (clear_breakpoint_conditions_and_commands): New declaration.
3000
3001 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3002
3003 * linux-aarch64-low.c (asm/ptrace.h): Include.
3004
3005 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3006
3007 Fix TLS access for -static -pthread.
3008 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3009 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3010 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3011
3012 2014-05-20 Pedro Alves <palves@redhat.com>
3013
3014 * linux-aarch64-low.c (aarch64_insert_point)
3015 (aarch64_remove_point): No longer check whether the type is
3016 supported here. Adjust to new interface.
3017 (the_low_target): Install aarch64_supports_z_point_type as
3018 supports_z_point_type method.
3019 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3020 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3021 instead of a Z packet char. Adjust.
3022 (arm_supports_z_point_type): New function.
3023 (arm_insert_point, arm_remove_point): Adjust to new interface.
3024 (the_low_target): Install arm_supports_z_point_type.
3025 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3026 (cris_insert_point, cris_remove_point): Adjust to new interface.
3027 Don't check whether the type is supported here.
3028 (the_low_target): Install cris_supports_z_point_type.
3029 * linux-low.c (linux_supports_z_point_type): New function.
3030 (linux_insert_point, linux_remove_point): Adjust to new interface.
3031 * linux-low.h (struct linux_target_ops) <insert_point,
3032 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3033 raw_breakpoint pointer parameter.
3034 <supports_z_point_type>: New method.
3035 * linux-mips-low.c (mips_supports_z_point_type): New function.
3036 (mips_insert_point, mips_remove_point): Adjust to new interface.
3037 Use mips_supports_z_point_type.
3038 (the_low_target): Install mips_supports_z_point_type.
3039 * linux-ppc-low.c (the_low_target): Install NULL as
3040 supports_z_point_type method.
3041 * linux-s390-low.c (the_low_target): Install NULL as
3042 supports_z_point_type method.
3043 * linux-sparc-low.c (the_low_target): Install NULL as
3044 supports_z_point_type method.
3045 * linux-x86-low.c (x86_supports_z_point_type): New function.
3046 (x86_insert_point): Adjust to new insert_point interface. Use
3047 insert_memory_breakpoint. Adjust to new
3048 i386_low_insert_watchpoint interface.
3049 (x86_remove_point): Adjust to remove_point interface. Use
3050 remove_memory_breakpoint. Adjust to new
3051 i386_low_remove_watchpoint interface.
3052 (the_low_target): Install x86_supports_z_point_type.
3053 * lynx-low.c (lynx_target_ops): Install NULL as
3054 supports_z_point_type callback.
3055 * nto-low.c (nto_supports_z_point_type): New.
3056 (nto_insert_point, nto_remove_point): Adjust to new interface.
3057 (nto_target_ops): Install nto_supports_z_point_type.
3058 * mem-break.c: Adjust intro comment.
3059 (struct raw_breakpoint) <raw_type, size>: New fields.
3060 <inserted>: Update comment.
3061 <shlib_disabled>: Delete field.
3062 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3063 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3064 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3065 (raw_bkpt_type_to_target_hw_bp_type): New function.
3066 (find_enabled_raw_code_breakpoint_at): New function.
3067 (find_raw_breakpoint_at): New type and size parameters. Use them.
3068 (insert_memory_breakpoint): New function, based off
3069 set_raw_breakpoint_at.
3070 (remove_memory_breakpoint): New function.
3071 (set_raw_breakpoint_at): Reimplement.
3072 (set_breakpoint): New, based on set_breakpoint_at.
3073 (set_breakpoint_at): Reimplement.
3074 (delete_raw_breakpoint): Go through the_target->remove_point
3075 instead of assuming memory breakpoints.
3076 (find_gdb_breakpoint_at): Delete.
3077 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3078 (find_gdb_breakpoint): New function.
3079 (set_gdb_breakpoint_at): Delete.
3080 (z_type_supported): New function.
3081 (set_gdb_breakpoint_1): New function, loosely based off
3082 set_gdb_breakpoint_at.
3083 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3084 (delete_gdb_breakpoint_at): Delete.
3085 (delete_gdb_breakpoint_1): New function, loosely based off
3086 delete_gdb_breakpoint_at.
3087 (delete_gdb_breakpoint): New function.
3088 (clear_gdb_breakpoint_conditions): Rename to ...
3089 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3090 breakpoint.
3091 (add_condition_to_breakpoint): Make static.
3092 (add_breakpoint_condition): Take a struct breakpoint pointer
3093 instead of an address. Adjust.
3094 (gdb_condition_true_at_breakpoint): Rename to ...
3095 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3096 z_type parameter.
3097 (gdb_condition_true_at_breakpoint): Reimplement.
3098 (add_breakpoint_commands): Take a struct breakpoint pointer
3099 instead of an address. Adjust.
3100 (gdb_no_commands_at_breakpoint): Rename to ...
3101 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3102 parameter. Return true if no breakpoint was found. Change debug
3103 output.
3104 (gdb_no_commands_at_breakpoint): Reimplement.
3105 (run_breakpoint_commands): Rename to ...
3106 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3107 and change return type to boolean.
3108 (run_breakpoint_commands): New function.
3109 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3110 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3111 breakpoint. Go through the_target->remove_point instead of
3112 assuming memory breakpoint.
3113 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3114 software and hardware breakpoints.
3115 (reinsert_raw_breakpoint): Go through the_target->insert_point
3116 instead of assuming memory breakpoint.
3117 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3118 software and hardware breakpoints.
3119 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3120 Check both software and hardware breakpoints.
3121 (validate_inserted_breakpoint): Assert the breakpoint is a
3122 software breakpoint. Set the inserted flag to -1 instead of
3123 setting shlib_disabled.
3124 (delete_disabled_breakpoints): Adjust.
3125 (validate_breakpoints): Only validate software breakpoints.
3126 Adjust to inserted flag change.
3127 (check_mem_read, check_mem_write): Skip breakpoint types other
3128 than software breakpoints. Adjust to inserted flag change.
3129 * mem-break.h (enum raw_bkpt_type): New enum.
3130 (raw_breakpoint, struct process_info): Forward declare.
3131 (Z_packet_to_target_hw_bp_type): Delete declaration.
3132 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3133 (set_gdb_breakpoint, delete_gdb_breakpoint)
3134 (clear_breakpoint_conditions): New declarations.
3135 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3136 (breakpoint_inserted_here): Update comment.
3137 (add_breakpoint_condition, add_breakpoint_commands): Replace
3138 address parameter with a breakpoint pointer parameter.
3139 (gdb_breakpoint_here): Update comment.
3140 (delete_gdb_breakpoint_at): Delete.
3141 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3142 * server.c (process_point_options): Take a struct breakpoint
3143 pointer instead of an address. Adjust.
3144 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3145 delete_gdb_breakpoint.
3146 * spu-low.c (spu_target_ops): Install NULL as
3147 supports_z_point_type method.
3148 * target.h: Include mem-break.h.
3149 (struct target_ops) <prepare_to_access_memory>: Update comment.
3150 <supports_z_point_type>: New field.
3151 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3152 instead of a char. Also take a raw breakpoint pointer.
3153 * win32-arm-low.c (the_low_target): Install NULL as
3154 supports_z_point_type.
3155 * win32-i386-low.c (i386_supports_z_point_type): New function.
3156 (i386_insert_point, i386_remove_point): Adjust to new interface.
3157 (the_low_target): Install i386_supports_z_point_type.
3158 * win32-low.c (win32_supports_z_point_type): New function.
3159 (win32_insert_point, win32_remove_point): Adjust to new interface.
3160 (win32_target_ops): Install win32_supports_z_point_type.
3161 * win32-low.h (struct win32_target_ops):
3162 <supports_z_point_type>: New method.
3163 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3164 instead of a char. Also take a raw breakpoint pointer.
3165
3166 2014-05-20 Pedro Alves <palves@redhat.com>
3167
3168 * mem-break.h: Include break-common.h.
3169 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3170 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3171 (Z_packet_to_target_hw_bp_type): New declaration.
3172 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3173 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3174 (Z_PACKET_ACCESS_WP): Delete macros.
3175 (Z_packet_to_hw_type): Delete function.
3176 * i386-low.h: Don't include break-common.h here.
3177 (Z_packet_to_hw_type): Delete declaration.
3178 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3179 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3180 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3181 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3182 * linux-aarch64-low.c: Don't include break-common.h here.
3183 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3184 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3185 (Z_packet_to_target_hw_bp_type): Delete function.
3186 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3187 function.
3188 (mips_insert_point, mips_remove_point): Use
3189 Z_packet_to_target_hw_bp_type.
3190
3191 2014-05-20 Pedro Alves <palves@redhat.com>
3192
3193 * linux-aarch64-low.c: Include break-common.h.
3194 (enum target_point_type): Delete.
3195 (Z_packet_to_point_type): Rename to ...
3196 (Z_packet_to_target_hw_bp_type): ... this, and return a
3197 target_hw_bp_type instead.
3198 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3199 instead of an enum target_point_type.
3200 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3201 breakpoint type.
3202 (aarch64_dr_state_insert_one_point)
3203 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3204 (aarch64_handle_aligned_watchpoint)
3205 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3206 Take an enum target_hw_bp_type instead of an enum
3207 target_point_type.
3208 (aarch64_supports_z_point_type): New function.
3209 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3210 use Z_packet_to_target_hw_bp_type.
3211
3212 2014-05-20 Joel Brobecker <brobecker@adacore.com>
3213
3214 * configure.ac: Only use -Werror by default when DEVELOPMENT
3215 is true.
3216 * configure: Regenerate.
3217
3218 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3219
3220 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3221 * linux-x86-low.c (X86_64_USER_REGS): New.
3222 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3223
3224 2014-04-28 Yao Qi <yao@codesourcery.com>
3225
3226 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3227 name.
3228
3229 2014-04-25 Pedro Alves <palves@redhat.com>
3230
3231 PR server/16255
3232 * linux-low.c (linux_attach_fail_reason_string): New function.
3233 (linux_attach_lwp): Delete.
3234 (linux_attach_lwp_1): Rename to ...
3235 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3236 argument. Remove "initial" parameter. Return int instead of
3237 void. Don't error or warn here.
3238 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3239 failure to attach to the tgid. Call warning when failing to
3240 attach to an lwp.
3241 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3242 argument. Remove "initial" parameter. Return int instead of
3243 void. Don't error or warn here.
3244 (linux_attach_fail_reason_string): New declaration.
3245 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3246 interface change. Use linux_attach_fail_reason_string.
3247
3248 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
3249 Walfred Tedeschi <walfred.tedeschi@intel.com>
3250
3251 * Makefile.in: Added rules to handle new files
3252 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3253 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3254 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3255 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3256 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3257 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3258 x32-avx512-linux.o.
3259 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3260 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3261 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3262 i386/x32-avx512.xml.
3263 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3264 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3265 i386/x32-avx512-linux.xml.
3266 * i387-fp.c (num_avx512_k_registers): New constant for number
3267 of K registers.
3268 (num_avx512_zmmh_low_registers): New constant for number of
3269 lower ZMM registers (0-15).
3270 (num_avx512_zmmh_high_registers): New constant for number of
3271 higher ZMM registers (16-31).
3272 (num_avx512_ymmh_registers): New contant for number of higher
3273 YMM registers (ymm16-31 added by avx521 on x86_64).
3274 (num_avx512_xmm_registers): New constant for number of higher
3275 XMM registers (xmm16-31 added by AVX512 on x86_64).
3276 (struct i387_xsave): Add space for AVX512 registers.
3277 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3278 Add code to handle AVX512 registers.
3279 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3280 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3281 prototypei from generated file.
3282 (tdesc_amd64_avx512_linux): Likewise.
3283 (init_registers_x32_avx512_linux): Likewise.
3284 (tdesc_x32_avx512_linux): Likewise.
3285 (init_registers_i386_avx512_linux): Likewise.
3286 (tdesc_i386_avx512_linux): Likewise.
3287 (x86_64_regmap): Add AVX512 registers.
3288 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3289 mask.
3290 (initialize_low_arch): Add code to initialize AVX512 registers.
3291
3292 2014-04-23 Pedro Alves <palves@redhat.com>
3293
3294 * mem-break.c (find_gdb_breakpoint_at): Make static.
3295 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3296
3297 2014-04-23 Pedro Alves <palves@redhat.com>
3298
3299 * i386-low.c: Don't include break-common.h here.
3300 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3301 prototype to take target_hw_bp_type as argument instead of a Z
3302 packet char.
3303 * i386-low.h: Include break-common.h here.
3304 (Z_packet_to_hw_type): Declare.
3305 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3306 prototypes.
3307 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3308 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3309 (x86_remove_point): Convert the packet number to a
3310 target_hw_bp_type before calling i386_low_remove_watchpoint.
3311 * win32-i386-low.c (i386_insert_point): Convert the packet number
3312 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3313 (i386_remove_point): Convert the packet number to a
3314 target_hw_bp_type before calling i386_low_remove_watchpoint.
3315
3316 2014-04-23 Pedro Alves <palves@redhat.com>
3317
3318 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3319
3320 2014-04-10 Pedro Alves <palves@redhat.com>
3321
3322 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3323 Check if the condition or command is NULL before checking if the
3324 breakpoint is known. On success, return true.
3325 * mem-break.h (add_breakpoint_condition): Document return.
3326 (add_breakpoint_commands): Add describing comment.
3327 * server.c (skip_to_semicolon): New function.
3328 (process_point_options): Use it.
3329
3330 2014-04-09 Pedro Alves <palves@redhat.com>
3331
3332 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3333 to lwpid_of.
3334
3335 2014-02-27 Pedro Alves <palves@redhat.com>
3336
3337 PR 12702
3338 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3339 macros.
3340 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3341 output.
3342 (last_thread_of_process_p): Take a PID argument instead of a
3343 thread pointer.
3344 (linux_wait_for_lwp): Delete.
3345 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3346 functions.
3347 (linux_low_filter_event): New function, party factored out from
3348 linux_wait_for_event.
3349 (linux_wait_for_event): Rename to ...
3350 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3351 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3352 sigsuspend. Check for zombie leaders.
3353 (linux_wait_for_event): Reimplement as wrapper around
3354 linux_wait_for_event_filtered.
3355 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3356 a normal or signal exit is seen, it's the whole process exiting.
3357 (wait_for_sigstop): No longer a for_each_inferior callback.
3358 Rewrite on top of linux_wait_for_event_filtered.
3359 (stop_all_lwps): Call wait_for_sigstop directly.
3360 * server.c (resume, handle_target_event): Handle
3361 TARGET_WAITKIND_NO_RESUMED.
3362
3363 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3364
3365 * win32-low.c (psapi_get_dll_name,
3366 * win32_CreateToolhelp32Snapshot): Delete.
3367 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3368 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3369 Delete.
3370 (handle_load_dll): Add function description.
3371 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3372
3373 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3374
3375 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3376 Add comment.
3377 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3378 base address when calling win32_add_one_solib.
3379 (handle_load_dll): Delete local variable load_addr.
3380 Remove 0x1000 offset applied to DLL base address when calling
3381 win32_add_one_solib.
3382 (handle_unload_dll): Add comment.
3383
3384 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3385
3386 * win32-low.c (win32_add_all_dlls): Renames
3387 win32_ensure_ntdll_loaded. Rewrite function documentation.
3388 Adjust implementation to always load all DLLs.
3389 Add 0x1000 offset to DLL base address when calling
3390 win32_add_one_solib.
3391 (child_initialization_done): New static global.
3392 (do_initial_child_stuff): Set child_initialization_done to
3393 zero during child initialization, and 1 after. Replace call
3394 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3395 Add comment.
3396 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3397 (handle_unload_dll): Add function documentation.
3398 (get_child_debug_event): Ignore load and unload DLL events
3399 during child initialization.
3400
3401 2014-02-20 Doug Evans <dje@google.com>
3402
3403 Remove global all_lwps.
3404 * inferiors.h (ptid_of): Move here from linux-low.h.
3405 (pid_of, lwpid_of): Ditto.
3406 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3407 parameter is a struct thread_info * now.
3408 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3409 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3410 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3411 directly.
3412 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3413 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3414 * linux-arm-low.c (update_registers_callback): Update, "entry"
3415 parameter is a struct thread_info * now.
3416 Fetch lwpid from current_inferior directly.
3417 (arm_insert_point): Pass &all_threads to find_inferior instead of
3418 &all_lwps.
3419 (arm_remove_point): Ditto.
3420 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3421 (arm_prepare_to_resume): Fetch pid from thread.
3422 (arm_read_description): Fetch lwpid from current_inferior directly.
3423 * linux-low.c (all_lwps): Delete.
3424 (delete_lwp): Delete call to remove_inferior.
3425 (handle_extended_wait): Fetch lwpid from thread.
3426 (add_lwp): Don't set lwp->entry.id. Remove call to
3427 add_inferior_to_list.
3428 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3429 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3430 (kill_one_lwp_callback): Ditto.
3431 (linux_kill): Don't dereference NULL pointer.
3432 Fetch ptid,lwpid from thread.
3433 (get_detach_signal): Fetch ptid from thread.
3434 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3435 Simplify call to regcache_invalidate_thread.
3436 (delete_lwp_callback): Update, "entry" parameter is a
3437 struct thread_info * now. Fetch pid from thread.
3438 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3439 (status_pending_p_callback): Update, "entry" parameter is a
3440 struct thread_info * now. Fetch ptid from thread.
3441 (find_lwp_pid): Update, "entry" parameter is a
3442 struct thread_info * now.
3443 (linux_wait_for_lwp): Fetch pid from thread.
3444 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3445 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3446 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3447 (dequeue_one_deferred_signal): Ditto.
3448 (cancel_breakpoint): Fetch ptid from current_inferior.
3449 (linux_wait_for_event): Pass &all_threads to find_inferior,
3450 not &all_lwps. Fetch ptid, lwpid from thread.
3451 (count_events_callback): Update, "entry" parameter is a
3452 struct thread_info * now.
3453 (select_singlestep_lwp_callback): Ditto.
3454 (select_event_lwp_callback): Ditto.
3455 (cancel_breakpoints_callback): Ditto.
3456 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3457 not &all_lwps.
3458 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3459 (unsuspend_one_lwp): Update, "entry" parameter is a
3460 struct thread_info * now.
3461 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3462 not &all_lwps.
3463 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3464 Fetch lwpid from thread, not lwp.
3465 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3466 Pass &all_threads to find_inferior, not &all_lwps.
3467 (send_sigstop): Fetch lwpid from thread, not lwp.
3468 (send_sigstop_callback): Update, "entry" parameter is a
3469 struct thread_info * now.
3470 (suspend_and_send_sigstop_callback): Ditto.
3471 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3472 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3473 struct thread_info * now.
3474 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3475 from thread, lwp.
3476 (lwp_running): Update, "entry" parameter is a
3477 struct thread_info * now.
3478 (stop_all_lwps): Fetch ptid from thread.
3479 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3480 (linux_resume_one_lwp): Fetch lwpid from thread.
3481 (linux_set_resume_request): Update, "entry" parameter is a
3482 struct thread_info * now. Fetch pid, lwpid from thread.
3483 (resume_status_pending_p): Update, "entry" parameter is a
3484 struct thread_info * now.
3485 (need_step_over_p): Ditto. Fetch lwpid from thread.
3486 (start_step_over): Fetch lwpid from thread.
3487 (linux_resume_one_thread): Update, "entry" parameter is a
3488 struct thread_info * now. Fetch lwpid from thread.
3489 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3490 (proceed_one_lwp): Update, "entry" parameter is a
3491 struct thread_info * now. Fetch lwpid from thread.
3492 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3493 struct thread_info * now.
3494 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3495 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3496 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3497 directly.
3498 (regsets_store_inferior_registers): Ditto.
3499 (fetch_register, store_register): Ditto.
3500 (linux_read_memory, linux_write_memory): Ditto.
3501 (linux_request_interrupt): Ditto.
3502 (linux_read_auxv): Ditto.
3503 (linux_xfer_siginfo): Ditto.
3504 (linux_qxfer_spu): Ditto.
3505 (linux_qxfer_libraries_svr4): Ditto.
3506 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3507 moved to inferiors.h.
3508 (get_lwp): Delete.
3509 (get_thread_lwp): Update.
3510 (struct lwp_info): Delete member "entry". Simplify comment for
3511 member "thread".
3512 (all_lwps): Delete.
3513 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3514 current_inferior directly.
3515 (update_watch_registers_callback): Update, "entry" parameter is a
3516 struct thread_info * now. Fetch pid from thread.
3517 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3518 (mips_insert_point): Fetch lwpid from current_inferior.
3519 Pass &all_threads to find_inferior, not &all_lwps.
3520 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3521 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3522 directly.
3523 (mips_stopped_data_address): Ditto.
3524 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3525 directly.
3526 * linux-tile-low.c (tile_arch_setup): Ditto.
3527 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3528 (update_debug_registers_callback): Update, "entry" parameter is a
3529 struct thread_info * now. Fetch pid from thread.
3530 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3531 Pass &all_threads to find_inferior, not &all_lwps.
3532 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3533 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3534 Pass &all_threads to find_inferior, not &all_lwps.
3535 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3536 (i386_dr_low_get_status): Ditto.
3537 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3538 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3539 (x86_linux_read_description): Ditto.
3540 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3541
3542 2014-02-20 Doug Evans <dje@google.com>
3543
3544 * inferiors.c (get_first_inferior): Fix buglet.
3545
3546 2014-02-19 Doug Evans <dje@google.com>
3547
3548 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3549 * inferiors.c (add_thread): Change result type to struct thread_info *.
3550 All callers updated.
3551 (add_lwp): Call add_thread here instead of in callers.
3552 All callers updated.
3553 * linux-low.h (get_lwp_thread): Rewrite.
3554 (struct lwp_info): New member "thread".
3555
3556 2014-02-19 Doug Evans <dje@google.com>
3557
3558 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3559 All callers updated.
3560
3561 2014-02-19 Doug Evans <dje@google.com>
3562
3563 * inferiors.c (add_thread): Fix whitespace.
3564
3565 2014-02-19 Doug Evans <dje@google.com>
3566
3567 * dll.c (clear_dlls): Replace accessing list implemention details
3568 with API function.
3569 * gdbthread.h (get_first_thread): Declare.
3570 * inferiors.c (for_each_inferior_with_data): New function.
3571 (get_first_thread): New function.
3572 (find_thread_ptid): Simplify.
3573 (get_first_inferior): New function.
3574 (clear_list): Delete.
3575 (one_inferior_p): New function.
3576 (clear_inferior_list): New function.
3577 (clear_inferiors): Update.
3578 * inferiors.h (for_each_inferior_with_data): Declare.
3579 (clear_inferior_list): Declare.
3580 (one_inferior_p): Declare.
3581 (get_first_inferior): Declare.
3582 * linux-low.c (linux_wait_for_event): Replace accessing list
3583 implemention details with API function.
3584 * server.c (target_running): Ditto.
3585 (accumulate_file_name_length): New function.
3586 (emit_dll_description): New function.
3587 (handle_qxfer_libraries): Replace accessing list implemention
3588 details with API function.
3589 (handle_qxfer_threads_worker): New function.
3590 (handle_qxfer_threads_proper): Replace accessing list implemention
3591 details with API function.
3592 (handle_query): Ditto.
3593 (visit_actioned_threads_callback_ftype): New typedef.
3594 (visit_actioned_threads_data): New struct.
3595 (visit_actioned_threads): Rewrite to be find_inferior callback.
3596 (resume): Call find_inferior.
3597 (handle_status): Replace accessing list implemention
3598 details with API function.
3599 (process_serial_event): Replace accessing list implemention details
3600 with API function.
3601 * target.c (set_desired_inferior): Replace accessing list implemention
3602 details with API function.
3603 * tracepoint.c (same_process_p): New function.
3604 (gdb_agent_about_to_close): Replace accessing list implemention
3605 details with API function.
3606 * win32-low.c (child_delete_thread): Replace accessing list
3607 implemention details with API function.
3608 (match_dll_by_basename): New function.
3609 (dll_is_loaded_by_basename): New function.
3610 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3611 details call to dll_is_loaded_by_basename.
3612
3613 2014-02-19 Doug Evans <dje@google.com>
3614
3615 * dll.h (struct dll_info): Add comment.
3616 * gdbthread.h (struct thread_info): Add comment.
3617 (current_ptid): Simplify.
3618 * inferiors.c (add_process): Update.
3619 (remove_process): Update.
3620 * inferiors.h (struct process_info): Rename member "head" to "entry".
3621 * linux-low.c (delete_lwp): Update.
3622 (add_lwp): Update.
3623 (last_thread_of_process_p): Update.
3624 (kill_one_lwp_callback, linux_kill): Update.
3625 (status_pending_p_callback): Update.
3626 (wait_for_sigstop): Update. Simplify read of ptid.
3627 (start_step_over): Update.
3628 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3629 (get_lwp_thread): Update.
3630 (struct lwp_info): Rename member "head" to "entry".
3631 * regcache.h (inferior_list_entry): Delete.
3632 * server.c (kill_inferior_callback): Update.
3633 (detach_or_kill_inferior_callback): Update.
3634 (print_started_pid): Update.
3635 (print_attached_pid): Update.
3636 (process_serial_event): Simplify read of ptid.
3637 * thread-db.c (thread_db_create_event): Update.
3638 (thread_db_get_tls_address): Update.
3639 * win32-low.c (current_inferior_ptid): Simplify.
3640
3641 2014-02-19 Tom Tromey <tromey@redhat.com>
3642
3643 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3644 argument.
3645 (target_supports_btrace): Update.
3646
3647 2014-02-14 Yao Qi <yao@codesourcery.com>
3648
3649 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3650 (rsp-low-ipa.o): New target.
3651
3652 2014-02-12 Tom Tromey <tromey@redhat.com>
3653
3654 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3655 convert_ascii_to_int.
3656 * regcache.c (registers_to_string): Likewise.
3657 * remote-utils.c (decode_M_packet): Likewise.
3658 * server.c (process_serial_event): Likewise.
3659
3660 2014-02-12 Tom Tromey <tromey@redhat.com>
3661
3662 * server.c (handle_query, handle_v_run): Use hex2bin, not
3663 unhexify.
3664 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3665
3666 2014-02-12 Tom Tromey <tromey@redhat.com>
3667
3668 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3669 convert_int_to_ascii.
3670 * regcache.c (registers_to_string, collect_register_as_string):
3671 Likewise.
3672 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3673 Likewise.
3674 * server.c (process_serial_event): Likewise.
3675 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3676 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3677
3678 2014-02-12 Tom Tromey <tromey@redhat.com>
3679
3680 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3681 bin2hex, not hexify.
3682 * tracepoint.c (cmd_qtstatus): Likewise.
3683
3684 2014-02-12 Tom Tromey <tromey@redhat.com>
3685
3686 * remote-utils.c (monitor_output): Pass explicit length to
3687 hexify.
3688
3689 2014-02-12 Tom Tromey <tromey@redhat.com>
3690
3691 * tracepoint.c: Include rsp-low.h.
3692 * server.c: Include rsp-low.h.
3693 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3694 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3695 declare.
3696 * remote-utils.c: Include rsp-low.h.
3697 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3698 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3699 (convert_int_to_ascii, convert_ascii_to_int): Move to
3700 common/rsp-low.c.
3701 * regcache.c: Include rsp-low.h.
3702 * ax.c: Include rsp-low.h.
3703 * Makefile.in (SFILES): Add common/rsp-low.c.
3704 (OBS): Add rsp-low.o.
3705 (rsp-low.o): New target.
3706
3707 2014-02-12 Tom Tromey <tromey@redhat.com>
3708
3709 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3710 Include print-utils.h.
3711 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3712 (plongest, thirty_two, phex_nz): Remove.
3713 * Makefile.in (SFILES): Add common/print-utils.c.
3714 (OBS): Add print-utils.o.
3715 (print-utils-ipa.o): New target.
3716 (print-utils.o): New target.
3717 (IPA_OBJS): Add print-utils-ipa.o.
3718
3719 2014-02-06 Tom Tromey <tromey@redhat.com>
3720
3721 * Makefile.in (SFILES): Fix indentation.
3722
3723 2014-02-05 Doug Evans <dje@google.com>
3724
3725 * linux-low.c (linux_wait_for_event): Improve comment.
3726 (linux_wait_1): Keep current_inferior in sync with event_child.
3727
3728 2014-01-22 Doug Evans <dje@google.com>
3729
3730 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3731
3732 2014-01-22 Doug Evans <dje@google.com>
3733
3734 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3735 * configure: Regenerate.
3736 * config.in: Regenerate.
3737 * Makefile.in (SFILES): Add debug.c.
3738 (OBS): Add debug.o.
3739 * debug.c: New file.
3740 * debug.h: New file.
3741 * linux-aarch64-low.c (*): Update all debugging printfs to use
3742 debug_printf instead of fprintf.
3743 * linux-arm-low.c (*): Ditto.
3744 * linux-cris-low.c (*): Ditto.
3745 * linux-crisv32-low.c (*): Ditto.
3746 * linux-m32r-low.c (*): Ditto.
3747 * linux-sparc-low.c (*): Ditto.
3748 * linux-x86.c (*): Ditto.
3749 * linux-low.c (*): Ditto.
3750 (linux_wait_1): Add calls to debug_enter, debug_exit.
3751 (linux_wait): Remove redundant debugging printf.
3752 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3753 (linux_resume, unstop_all_lwps): Ditto.
3754 * mem-break.c (*): Update all debugging printfs to use
3755 debug_printf instead of fprintf.
3756 * remote-utils.c (*): Ditto.
3757 * thread-db.c (*): Ditto.
3758 * server.c #include <ctype.h>, "gdb_vecs.h".
3759 (debug_threads): Moved to debug.c.
3760 (*): Update all debugging printfs to use debug_printf instead of
3761 fprintf.
3762 (start_inferior): Replace call to fflush with call to debug_flush.
3763 (monitor_show_help): Mention set debug-format.
3764 (parse_debug_format_options): New function.
3765 (handle_monitor_command): Handle "monitor set debug-format".
3766 (gdbserver_usage): Mention --debug-format.
3767 (main): Parse --debug-format.
3768 * server.h (debug_threads): Declaration moved to debug.h.
3769 #include "debug.h".
3770 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3771 trace_debug_1 that uses debug_printf.
3772 (tracepoint_look_up_symbols): Update all debugging printfs to use
3773 debug_printf instead of fprintf.
3774
3775 2014-01-20 Baruch Siach <baruch@tkos.co.il>
3776
3777 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3778 sys/ptrace.h.
3779
3780 2014-01-17 Pedro Alves <palves@redhat.com>
3781
3782 PR build/16445
3783 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3784 defined after including gdb_proc_service.h.
3785
3786 2014-01-16 Doug Evans <dje@google.com>
3787
3788 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3789 (match_dll): Use it.
3790
3791 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3792
3793 * target.h (target_ops) <read_btrace>: Change parameters and
3794 return type to allow error reporting.
3795 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3796 trace reading errors on.
3797 * linux-low.c (linux_low_read_btrace): Pass trace reading
3798 errors on.
3799 (linux_low_disable_btrace): New.
3800
3801 2014-01-15 Doug Evans <dje@google.com>
3802
3803 * inferiors.c (thread_id_to_gdb_id): Delete.
3804 * inferiors.h (thread_id_to_gdb_id): Delete.
3805
3806 2014-01-13 Eli Zaretskii <eliz@gnu.org>
3807
3808 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3809 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3810 versions.
3811
3812 2014-01-08 Pedro Alves <palves@redhat.com>
3813
3814 * server.c (handle_status): Don't discard previous queued stop
3815 replies or thread's pending status here.
3816 (main) <disconnection>: Do it here instead.
3817
3818 2014-01-08 Pedro Alves <palves@redhat.com>
3819
3820 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3821 * server.c (visit_actioned_threads, handle_pending_status): New
3822 function.
3823 (handle_v_cont): Factor out parts to ...
3824 (resume): ... this new function. If in all-stop, and a thread
3825 being resumed has a pending status, report it without actually
3826 resuming.
3827 (myresume): Adjust to use the new 'resume' function.
3828 (clear_pending_status_callback, set_pending_status_callback)
3829 (find_status_pending_thread_callback): New functions.
3830 (handle_status): Handle the case of multiple threads having
3831 interesting statuses to report. Report threads' real last signal
3832 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3833 with an interesting thread to report the status for, instead of
3834 always reporting the status of the first thread.
3835
3836 2014-01-01 Joel Brobecker <brobecker@adacore.com>
3837
3838 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3839 * gdbreplay.c (gdbreplay_version): Likewise.
3840
3841 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3842
3843 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3844 iov.iov_len with the real length in use.
3845
3846 2013-12-13 Joel Brobecker <brobecker@adacore.com>
3847
3848 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3849 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3850 for all targets that use win32-low.c.
3851 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3852 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3853
3854 2013-12-13 Pedro Alves <palves@redhat.com>
3855
3856 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3857 if equal to TARGET_WAITKIND_LOADED.
3858 * win32-low.c (cached_status): New static global.
3859 (win32_wait): Add declaration.
3860 (do_initial_child_stuff): Flush all initial pending debug events
3861 up to the initial breakpoint.
3862 (win32_wait): If CACHED_STATUS was set, return that instead
3863 of doing a real wait. Remove the code resuming the execution
3864 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3865 during the initial phase. Also remove the code changing
3866 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3867 TARGET_WAITKIND_STOPPED.
3868
3869 2013-12-11 Yao Qi <yao@codesourcery.com>
3870
3871 * notif.c (handle_notif_ack): Return 0 if no notification
3872 matches.
3873
3874 2013-11-20 Doug Evans <dje@google.com>
3875
3876 * linux-low.c (linux_set_resume_request): Fix comment.
3877
3878 2013-11-20 Doug Evans <dje@google.com>
3879
3880 * linux-low.c (resume_status_pending_p): Tweak comment.
3881
3882 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3883
3884 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3885 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3886 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3887 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3888 (srv_amd64_regobj): Add amd64-mpx.o.
3889 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3890 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3891 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3892 * i387-fp.c (num_pl_bnd_register) Added constant.
3893 (num_pl_bnd_cfg_registers) Added constant.
3894 (struct i387_xsave) Added reserved area and MPX fields.
3895 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3896 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3897 function.
3898 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3899 (init_registers_amd64_mpx_linux): Declare new function.
3900 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3901 (x86_64_regmap): Add MPX registers.
3902 (x86_linux_read_description): Add MPX case.
3903 (initialize_low_arch): Initialize MPX targets.
3904
3905 2013-11-18 Tom Tromey <tromey@redhat.com>
3906
3907 * configure: Rebuild.
3908 * configure.ac: Don't check for stdlib.h.
3909 * gdbreplay.c: Unconditionally include stdlib.h.
3910
3911 2013-11-18 Tom Tromey <tromey@redhat.com>
3912
3913 * config.in: Rebuild.
3914 * configure: Rebuild.
3915 * configure.ac: Don't use AC_HEADER_DIRENT.
3916
3917 2013-11-18 Tom Tromey <tromey@redhat.com>
3918
3919 * server.h: Don't check HAVE_STRING_H.
3920 * gdbreplay.c: Don't check HAVE_STRING_H.
3921 * configure: Rebuild.
3922
3923 2013-11-18 Tom Tromey <tromey@redhat.com>
3924
3925 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3926 LIBGNU.
3927
3928 2013-11-08 Tom Tromey <tromey@redhat.com>
3929
3930 * configure, config.in: Rebuild.
3931 * configure.ac: Remove unused configury.
3932
3933 2013-11-08 Tom Tromey <tromey@redhat.com>
3934
3935 * acinclude.m4: Include common.m4, codeset.m4.
3936 * configure, config.in: Rebuild.
3937 * configure.ac: Use GDB_AC_COMMON.
3938
3939 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3940
3941 * linux-s390-low.c (HWCAP_S390_TE): New define.
3942 (s390_arch_setup): Consider the TE field in the HWCAP for
3943 determining 'have_regset_tdb'.
3944
3945 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3946
3947 PR gdb/16014
3948 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3949 call to sizeof.
3950
3951 2013-10-02 Pedro Alves <palves@redhat.com>
3952
3953 * server.c (process_serial_event): Don't output "GDBserver
3954 exiting" if GDB is connected through stdio.
3955 * target.c (mywait): Likewise, be silent if GDB is connected
3956 through stdio.
3957
3958 2013-10-01 Joel Brobecker <brobecker@adacore.com>
3959
3960 * lynx-low.c (lynx_add_threads_after_attach): New function.
3961 (lynx_attach): Remove call to add_thread. Add call to
3962 lynx_add_threads_after_attach instead.
3963
3964 2013-09-28 Mike Frysinger <vapier@gentoo.org>
3965
3966 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3967 * config.in, configure: Regenerated.
3968
3969 2013-09-18 Yao Qi <yao@codesourcery.com>
3970
3971 PR server/15959
3972 * server.c (start_inferior): Clear 'resume_info'.
3973
3974 2013-09-16 Jiong Wang <jiwang@tilera.com>
3975
3976 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
3977 for each register.
3978
3979 2013-09-16 Jiong Wang <jiwang@tilera.com>
3980
3981 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
3982 linux-tile-low.o to srv_tgtobj.
3983
3984 2013-09-16 Will Newton <will.newton@linaro.org>
3985
3986 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
3987 out regs.
3988
3989 2013-09-06 Pedro Alves <palves@redhat.com>
3990
3991 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
3992 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
3993 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
3994 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
3995 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
3996 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
3997
3998 2013-09-06 Pedro Alves <palves@redhat.com>
3999
4000 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4001 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4002
4003 2013-09-06 Pedro Alves <palves@redhat.com>
4004
4005 * linux-amd64-ipa.c: Include tracepoint.h.
4006 * linux-i386-ipa.c: Include tracepoint.h.
4007
4008 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4009
4010 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4011 (ps_get_thread_area): New function.
4012
4013 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4014
4015 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4016 (initialize_low_arch): Call init_registers_crisv32 rather than
4017 init_register_crisv32.
4018
4019 2013-09-05 Pedro Alves <palves@redhat.com>
4020
4021 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4022 to ...
4023 * hostio.h: ... this new file.
4024 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4025 win32-low.c: Include hostio.h.
4026
4027 2013-09-05 Pedro Alves <palves@redhat.com>
4028
4029 * server.h (gdb_client_data, handler_func, callback_handler_func)
4030 (delete_file_handler, add_file_handler, append_callback_event)
4031 (delete_callback_event, start_event_loop, initialize_event_loop):
4032 Move to event-loop.h and include it.
4033 * event-loop.h: New file.
4034
4035 2013-09-05 Pedro Alves <palves@redhat.com>
4036
4037 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4038 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4039 (loaded_dll, unloaded_dll): Move to ...
4040 * dll.h: ... this new file.
4041 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4042
4043 2013-09-05 Pedro Alves <palves@redhat.com>
4044
4045 * server.h (current_process, get_thread_process, all_processes)
4046 (add_inferior_to_list, for_each_inferior, current_inferior)
4047 (remove_inferior, add_process, remove_process, find_process_pid)
4048 (have_started_inferiors_p, have_attached_inferiors_p)
4049 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4050 (clear_inferiors, find_inferior, find_inferior_id)
4051 (inferior_target_data, set_inferior_target_data)
4052 (inferior_regcache_data, set_inferior_regcache_data): Move to
4053 inferiors.h, and include it.
4054 * inferiors.h: New file.
4055
4056 2013-09-05 Pedro Alves <palves@redhat.com>
4057
4058 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4059 Move ...
4060 * ax.h: ... here.
4061
4062 2013-09-05 Pedro Alves <palves@redhat.com>
4063
4064 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4065 tracepoint.h.
4066 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4067 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4068 (handle_tracepoint_general_set, handle_tracepoint_query)
4069 (tracepoint_finished_step, tracepoint_was_hit)
4070 (release_while_stepping_state_list, current_traceframe)
4071 (in_readonly_region, traceframe_read_mem)
4072 (fetch_traceframe_registers, traceframe_read_sdata)
4073 (traceframe_read_info, struct fast_tpoint_collect_status)
4074 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4075 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4076 (supply_fast_tracepoint_registers)
4077 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4078 (ipa_tdesc, claim_trampoline_space)
4079 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4080 (agent_mem_read, agent_get_trace_state_variable_value)
4081 (agent_set_trace_state_variable_value, agent_tsv_read)
4082 (agent_mem_read_string, get_raw_reg_func_addr)
4083 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4084 * tracepoint.h: ... this new file.
4085
4086 2013-09-05 Pedro Alves <palves@redhat.com>
4087
4088 * server.h (perror_with_name, error, fatal, warning, paddress)
4089 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4090 include it.
4091 * utils.h: New file.
4092
4093 2013-09-05 Pedro Alves <palves@redhat.com>
4094
4095 * server.h (remote_debug, noack_mode, transport_is_reliable)
4096 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4097 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4098 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4099 (write_enn, initialize_async_io, enable_async_io)
4100 (disable_async_io, check_remote_input_interrupt_request)
4101 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4102 (dead_thread_notify, prepare_resume_reply)
4103 (decode_address_to_semicolon, decode_address, decode_m_packet)
4104 (decode_M_packet, decode_X_packet, decode_xfer_write)
4105 (decode_search_memory_packet, unhexify, hexify)
4106 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4107 (look_up_one_symbol, relocate_instruction)
4108 (monitor_output): Move to remote-utils.h, and include it.
4109 * remote-utils.h: New file.
4110
4111 2013-09-05 Pedro Alves <palves@redhat.com>
4112
4113 * server.h (_): Delete.
4114
4115 2013-09-02 Pedro Alves <palves@redhat.com>
4116
4117 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4118 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4119 allocated.
4120 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4121
4122 2013-09-02 Pierre Muller <muller@sourceware.org>
4123
4124 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4125 or WriteProcessMemory complete successfully and handle
4126 ERROR_PARTIAL_COPY error.
4127
4128 2013-09-02 Pedro Alves <palves@redhat.com>
4129
4130 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4131 error instead of EIO.
4132
4133 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4134
4135 PR server/15604
4136 * linux-low.c: Include filestuff.h.
4137 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4138 * lynx-low.c: Include filestuff.h.
4139 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4140 * server.c: Include filestuff.h.
4141 (main): Call notice_open_fds.
4142 * spu-low.c: Include filestuff.h.
4143 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4144
4145 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
4146
4147 * Makefile.in: Explain why ../target and ../nat are not
4148 listed as include file search paths.
4149 (linux-waitpid.o): New object file rule.
4150 * configure.srv (srv_native_linux_obj): New variable.
4151 Replace all occurrences of linux native object files with
4152 $srv_native_linux_obj.
4153 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4154 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4155 (linux_enable_event_reporting): Remove declaration.
4156 (my_waitpid): Moved to common/linux-waitpid.c.
4157 (linux_wait_for_event): Pass ptid when calling
4158 linux_enable_event_reporting.
4159 (linux_supports_tracefork_flag): Remove.
4160 (linux_enable_event_reporting): Likewise.
4161 (linux_tracefork_grandchild): Remove.
4162 (STACK_SIZE): Moved to common/linux-ptrace.c.
4163 (linux_tracefork_child): Remove.
4164 (linux_test_for_tracefork): Remove.
4165 (linux_look_up_symbols): Call linux_supports_traceclone.
4166 (initialize_low): Remove call to linux_test_for_tracefork.
4167 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4168 common/linux-ptrace.h.
4169 (PTRACE_TYPE_ARG4): Likewise.
4170 Include linux-ptrace.h.
4171
4172 2013-08-21 Pedro Alves <palves@redhat.com>
4173
4174 * config.in: Renegerate.
4175
4176 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
4177
4178 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4179 (SFILES): Remove $(srcdir)/common/target-common.c and
4180 add $(srcdir)/target/waitstatus.c.
4181 (OBS): Remove target-common.o and add waitstatus.o.
4182 (server_h): Remove $(srcdir)/../common/target-common.h and
4183 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4184 and $(srcdir)/../target/waitstatus.h.
4185 (target-common.o): Remove.
4186 (waitstatus.o): New target object file.
4187 * target.h: Do not include target-common.h and
4188 include target/resume.h, target/wait.h and
4189 target/waitstatus.h.
4190
4191 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
4192
4193 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4194 to PTRACE_TYPE_ARG3.
4195 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4196 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4197 PTRACE_TYPE_ARG4.
4198 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4199 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4200
4201 2013-07-27 Jie Zhang <jie@codesourcery.com>
4202 Daniel Jacobowitz <dan@codesourcery.com>
4203 Yao Qi <yao@codesourcery.com>
4204
4205 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4206 (mips-linux-watch.o): New rule.
4207 (mips_linux_watch_h): New variable.
4208 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4209 srv_tgtobj.
4210 * linux-mips-low.c: Include mips-linux-watch.h.
4211 (struct arch_process_info, struct arch_lwp_info): New.
4212 (update_watch_registers_callback): New function.
4213 (mips_linux_new_process, mips_linux_new_thread) New functions.
4214 (mips_linux_prepare_to_resume, mips_insert_point): New
4215 functions.
4216 (mips_remove_point, mips_stopped_by_watchpoint): New
4217 functions.
4218 (rsp_bp_type_to_target_hw_bp_type): New function.
4219 (mips_stopped_data_address): New function.
4220 (the_low_target): Add watchpoint support functions.
4221
4222 2013-07-27 Yao Qi <yao@codesourcery.com>
4223
4224 * i386-low.c: Include break-common.h.
4225 (enum target_hw_bp_type): Remove.
4226
4227 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
4228
4229 * Makefile.in (SFILES): /common/target-common.c.
4230 (OBS): Add target-common.o.
4231 (server_h): Add $(srcdir)/../common/target-common.h.
4232 (target-common.o): New target.
4233 * server.c (queue_stop_reply_callback): Free
4234 status string after use.
4235 * target.c (target_waitstatus_to_string): Remove.
4236 * target.h: Include target-common.h.
4237 (resume_kind): Likewise.
4238 (target_waitkind): Likewise.
4239 (target_waitstatus): Likewise.
4240 (TARGET_WNOHANG): Likewise.
4241
4242 2013-07-04 Yao Qi <yao@codesourcery.com>
4243
4244 * Makefile.in (host_alias): Use @host_noncanonical@.
4245 (target_alias): Use @target_noncanonical@.
4246 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4247 ACX_NONCANONICAL_HOST.
4248 * configure: Regenerated.
4249
4250 Revert:
4251 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4252
4253 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4254 * configure: Rebuild.
4255 * Makefile.in (version_host, version_target): Get from configure.
4256 (version.c): Use $(version_host) and $(version_target).
4257
4258 2013-07-03 Pedro Alves <palves@redhat.com>
4259
4260 * Makefile.in (config.status): Depend on development.sh.
4261 * acinclude.m4: Include libmcheck.m4.
4262 * configure: Regenerate.
4263
4264 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4265
4266 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4267 attribute inside the parentheses.
4268 (winapi_DebugSetProcessKillOnExit): Ditto.
4269 (winapi_DebugBreakProcess): Ditto.
4270 (winapi_GenerateConsoleCtrlEvent): Ditto.
4271
4272 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4273
4274 * notif.h (notif_event): Add a dummy member to avoid compiler
4275 errors.
4276
4277 2013-07-01 Pedro Alves <palves@redhat.com>
4278
4279 * hostio.c (HOSTIO_PATH_MAX): Define.
4280 (require_filename, handle_open, handle_unlink, handle_readlink):
4281 Use it.
4282
4283 2013-07-01 Pedro Alves <palves@redhat.com>
4284
4285 * server.h: Include "pathmax.h".
4286 * linux-low.c: Don't include sys/param.h.
4287 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4288 MAXPATHLEN.
4289 * win32-low.c: Don't include sys/param.h.
4290 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4291
4292 2013-07-01 Pedro Alves <palves@redhat.com>
4293
4294 * event-loop.c: Don't check HAVE_UNISTD_H before including
4295 <unistd.h>.
4296 * gdbreplay.c: Likewise.
4297 * remote-utils.c: Likewise.
4298 * server.c: Likewise.
4299 * configure.ac: Don't check for unistd.h.
4300 * configure: Regenerate.
4301
4302 2013-06-28 Tom Tromey <tromey@redhat.com>
4303
4304 * Makefile.in (version.c): Use version.in, not
4305 common/version.in.
4306
4307 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4308
4309 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4310 * configure: Rebuild.
4311 * Makefile.in (version_host, version_target): Get from configure.
4312 (version.c): Use $(version_host) and $(version_target).
4313
4314 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4315
4316 Fix trace-status to output user name without trailing colon.
4317 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4318
4319 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4320
4321 Fix trace-status to output proper start-time and stop-time.
4322 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4323 output start time and stop time in hex as gdb expects.
4324
4325 2013-06-26 Pedro Alves <pedro@codesourcery.com>
4326
4327 * tracepoint.c (build_traceframe_info_xml): Output trace state
4328 variables present in the trace buffer.
4329
4330 2013-06-24 Tom Tromey <tromey@redhat.com>
4331
4332 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4333 create-version.sh.
4334 (version.o): Remove.
4335 * gdbreplay.c: Include version.h.
4336 (version, host_name): Don't declare.
4337 * server.h: Include version.h.
4338 (version, host_name): Don't declare.
4339
4340 2013-06-12 Pedro Alves <palves@redhat.com>
4341
4342 * linux-x86-low.c (linux_is_elf64): Delete global.
4343 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4344 with local linux_pid_exe_is_elf_64_file use.
4345
4346 2013-06-11 Pedro Alves <palves@redhat.com>
4347
4348 * linux-low.c (regset_disabled, disable_regset): New functions.
4349 (regsets_fetch_inferior_registers)
4350 (regsets_store_inferior_registers): Use them.
4351 (initialize_regsets_info); Don't allocate the disabled_regsets
4352 array here.
4353 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4354 comment.
4355
4356 2013-06-11 Pedro Alves <palves@redhat.com>
4357
4358 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4359 xmalloc.
4360
4361 2013-06-11 Pedro Alves <palves@redhat.com>
4362
4363 * linux-x86-low.c (initialize_low_arch): Call
4364 init_registers_x32_avx_linux.
4365
4366 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4367
4368 Fix compatibility with Android Bionic.
4369 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4370 it is not empty.
4371
4372 2013-06-07 Pedro Alves <palves@redhat.com>
4373
4374 PR server/14823
4375 * Makefile.in (OBS): Add tdesc.o.
4376 (IPA_OBJS): Add tdesc-ipa.o.
4377 (tdesc-ipa.o): New rule.
4378 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4379 interface.
4380 * linux-low.c (new_inferior): Delete.
4381 (disabled_regsets, num_regsets): Delete.
4382 (linux_add_process): Adjust to set the new per-process
4383 new_inferior flag.
4384 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4385 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4386 was a stop. When calling arch_setup, switch the current inferior
4387 to the thread that got an event.
4388 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4389 (regsets_fetch_inferior_registers)
4390 (regsets_store_inferior_registers): New regsets_info parameter.
4391 Adjust to use it.
4392 (linux_register_in_regsets): New regs_info parameter. Adjust to
4393 use it.
4394 (register_addr, fetch_register, store_register): New usrregs_info
4395 parameter. Adjust to use it.
4396 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4397 parameter regs_info. Adjust to use it.
4398 (linux_fetch_registers): Get the current inferior's regs_info, and
4399 adjust to use it.
4400 (linux_store_registers): Ditto.
4401 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4402 (initialize_low): Don't initialize the target_regsets here. Call
4403 initialize_low_arch.
4404 * linux-low.h (target_regsets): Delete declaration.
4405 (struct regsets_info): New.
4406 (struct usrregs_info): New.
4407 (struct regs_info): New.
4408 (struct process_info_private) <new_inferior>: New field.
4409 (struct linux_target_ops): Delete the num_regs, regmap, and
4410 regset_bitmap fields. New field regs_info.
4411 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4412 * i387-fp.c (num_xmm_registers): Delete.
4413 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4414 calls to new interface.
4415 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4416 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4417 Infer the number of xmm registers from the regcache's target
4418 description.
4419 * i387-fp.h (num_xmm_registers): Delete.
4420 * inferiors.c (add_thread): Don't install the thread's regcache
4421 here.
4422 * proc-service.c (gregset_info): Fetch the current inferior's
4423 regs_info. Adjust to use it.
4424 * regcache.c: Include tdesc.h.
4425 (register_bytes, reg_defs, num_registers)
4426 (gdbserver_expedite_regs): Delete.
4427 (get_thread_regcache): If the thread doesn't have a regcache yet,
4428 create one, instead of aborting gdbserver.
4429 (regcache_invalidate_one): Rename to ...
4430 (regcache_invalidate_thread): ... this.
4431 (regcache_invalidate_one): New.
4432 (regcache_invalidate): Only invalidate registers of the current
4433 process.
4434 (init_register_cache): Add target_desc parameter, and use it.
4435 (new_register_cache): Ditto. Assert the target description has a
4436 non zero registers_size.
4437 (regcache_cpy): Add assertions. Adjust.
4438 (realloc_register_cache, set_register_cache): Delete.
4439 (registers_to_string, registers_from_string): Adjust.
4440 (find_register_by_name, find_regno, find_register_by_number)
4441 (register_cache_size): Add target_desc parameter, and use it.
4442 (free_register_cache_thread, free_register_cache_thread_one)
4443 (regcache_release, register_cache_size): New.
4444 (register_size): Add target_desc parameter, and use it.
4445 (register_data, supply_register, supply_register_zeroed)
4446 (supply_regblock, supply_register_by_name, collect_register)
4447 (collect_register_as_string, collect_register_by_name): Adjust.
4448 * regcache.h (struct target_desc): Forward declare.
4449 (struct regcache) <tdesc>: New field.
4450 (init_register_cache, new_register_cache): Add target_desc
4451 parameter.
4452 (regcache_invalidate_thread): Declare.
4453 (regcache_invalidate_one): Delete declaration.
4454 (regcache_release): Declare.
4455 (find_register_by_number, register_cache_size, register_size)
4456 (find_regno): Add target_desc parameter.
4457 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4458 declarations.
4459 * remote-utils.c: Include tdesc.h.
4460 (outreg, prepare_resume_reply): Adjust.
4461 * server.c: Include tdesc.h.
4462 (gdbserver_xmltarget): Delete declaration.
4463 (get_features_xml, process_serial_event): Adjust.
4464 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4465 declare.
4466 (struct process_info) <tdesc>: New field.
4467 (ipa_tdesc): Declare.
4468 * tdesc.c: New file.
4469 * tdesc.h: New file.
4470 * tracepoint.c: Include tdesc.h.
4471 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4472 (get_context_regcache): Adjust to pass ipa_tdesc down.
4473 (do_action_at_tracepoint): Adjust to get the register cache size
4474 from the context regcache's description.
4475 (traceframe_walk_blocks): Adjust to get the register cache size
4476 from the current trace frame's description.
4477 (traceframe_get_pc): Adjust to get current trace frame's
4478 description and pass it down.
4479 (gdb_collect): Adjust to get the register cache size from the
4480 IPA's description.
4481 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4482 (gdbserver_xmltarget): Delete.
4483 (initialize_low_tracepoint): Set the ipa's target description.
4484 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4485 (initialize_low_tracepoint): Set the ipa's target description.
4486 * linux-x86-low.c: Include tdesc.h.
4487 [__x86_64__] (is_64bit_tdesc): New.
4488 (ps_get_thread_area, x86_get_thread_area): Use it.
4489 (i386_cannot_store_register): Rename to ...
4490 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4491 (i386_cannot_fetch_register): Rename to ...
4492 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4493 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4494 to new interface.
4495 (target_regsets): Rename to ...
4496 (x86_regsets): ... this.
4497 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4498 interface.
4499 (x86_siginfo_fixup): Use is_64bit_tdesc.
4500 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4501 (tdesc_x32_avx_linux, tdesc_x32_linux)
4502 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4503 Declare.
4504 (x86_linux_update_xmltarget): Delete.
4505 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4506 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4507 (AMD64_LINUX_USER64_CS): New.
4508 (x86_linux_read_description): New, based on
4509 x86_linux_update_xmltarget.
4510 (same_process_callback): New.
4511 (x86_arch_setup_process_callback): New.
4512 (x86_linux_update_xmltarget): New.
4513 (x86_regsets_info): New.
4514 (amd64_linux_regs_info): New.
4515 (i386_linux_usrregs_info): New.
4516 (i386_linux_regs_info): New.
4517 (x86_linux_regs_info): New.
4518 (x86_arch_setup): Reimplement.
4519 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4520 (x86_emit_ops): Ditto.
4521 (the_low_target): Adjust. Install x86_linux_regs_info,
4522 x86_cannot_fetch_register, and x86_cannot_store_register.
4523 (initialize_low_arch): New.
4524 * linux-ia64-low.c (tdesc_ia64): Declare.
4525 (ia64_fetch_register): Adjust.
4526 (ia64_usrregs_info, regs_info): New globals.
4527 (ia64_regs_info): New function.
4528 (the_low_target): Adjust.
4529 (initialize_low_arch): New function.
4530 * linux-sparc-low.c (tdesc_sparc64): Declare.
4531 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4532 Adjust.
4533 (sparc_arch_setup): New function.
4534 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4535 (the_low_target): Adjust.
4536 (initialize_low_arch): New function.
4537 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4538 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4539 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4540 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4541 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4542 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4543 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4544 (tdesc_powerpc_isa205_vsx64l): Declare.
4545 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4546 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4547 (ppc_set_pc, ppc_get_hwcap): Adjust.
4548 (ppc_usrregs_info): Forward declare.
4549 (!__powerpc64__) ppc_regmap_adjusted: New global.
4550 (ppc_arch_setup): Adjust to the current process'es target
4551 description.
4552 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4553 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4554 (ppc_store_evrregset): Adjust.
4555 (target_regsets): Rename to ...
4556 (ppc_regsets): ... this, and make static.
4557 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4558 (ppc_regs_info): New function.
4559 (the_low_target): Adjust.
4560 (initialize_low_arch): New function.
4561 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4562 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4563 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4564 (tdesc_s390x_linux64v2): Declare.
4565 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4566 (s390_fill_gregset, s390_store_last_break): Adjust.
4567 (target_regsets): Rename to ...
4568 (s390_regsets): ... this, and make static.
4569 (s390_get_pc, s390_set_pc): Adjust.
4570 (s390_get_hwcap): New target_desc parameter, and use it.
4571 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4572 (s390_arch_setup): Adjust to set the current process'es target
4573 description. Don't adjust the regmap.
4574 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4575 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4576 (regs_info_3264): New globals.
4577 (s390_regs_info): New function.
4578 (the_low_target): Adjust.
4579 (initialize_low_arch): New function.
4580 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4581 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4582 [__mips64] (init_registers_mips_linux)
4583 (init_registers_mips_dsp_linux): Delete defines.
4584 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4585 (have_dsp): New global.
4586 (mips_read_description): New, based on mips_arch_setup.
4587 (mips_arch_setup): Reimplement.
4588 (get_usrregs_info): New function.
4589 (mips_cannot_fetch_register, mips_cannot_store_register)
4590 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4591 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4592 (target_regsets): Rename to ...
4593 (mips_regsets): ... this, and make static.
4594 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4595 (dsp_regs_info, regs_info): New globals.
4596 (mips_regs_info): New function.
4597 (the_low_target): Adjust.
4598 (initialize_low_arch): New function.
4599 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4600 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4601 Declare.
4602 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4603 (arm_read_description): New, with bits factored from
4604 arm_arch_setup.
4605 (arm_arch_setup): Reimplement.
4606 (target_regsets): Rename to ...
4607 (arm_regsets): ... this, and make static.
4608 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4609 (arm_regs_info): New function.
4610 (the_low_target): Adjust.
4611 (initialize_low_arch): New function.
4612 * linux-m68k-low.c (tdesc_m68k): Declare.
4613 (target_regsets): Rename to ...
4614 (m68k_regsets): ... this, and make static.
4615 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4616 (m68k_regs_info): New function.
4617 (m68k_arch_setup): New function.
4618 (the_low_target): Adjust.
4619 (initialize_low_arch): New function.
4620 * linux-sh-low.c (tdesc_sharch): Declare.
4621 (target_regsets): Rename to ...
4622 (sh_regsets): ... this, and make static.
4623 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4624 (sh_regs_info, sh_arch_setup): New functions.
4625 (the_low_target): Adjust.
4626 (initialize_low_arch): New function.
4627 * linux-bfin-low.c (tdesc_bfin): Declare.
4628 (bfin_arch_setup): New function.
4629 (bfin_usrregs_info, regs_info): New globals.
4630 (bfin_regs_info): New function.
4631 (the_low_target): Adjust.
4632 (initialize_low_arch): New function.
4633 * linux-cris-low.c (tdesc_cris): Declare.
4634 (cris_arch_setup): New function.
4635 (cris_usrregs_info, regs_info): New globals.
4636 (cris_regs_info): New function.
4637 (the_low_target): Adjust.
4638 (initialize_low_arch): New function.
4639 * linux-cris-low.c (tdesc_crisv32): Declare.
4640 (cris_arch_setup): New function.
4641 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4642 (cris_regs_info): New function.
4643 (the_low_target): Adjust.
4644 (initialize_low_arch): New function.
4645 * linux-m32r-low.c (tdesc_m32r): Declare.
4646 (m32r_arch_setup): New function.
4647 (m32r_usrregs_info, regs_info): New globals.
4648 (m32r_regs_info): Adjust.
4649 (initialize_low_arch): New function.
4650 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4651 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4652 (tic6x_usrregs_info): Forward declare.
4653 (tic6x_read_description): New function, based on ...
4654 (tic6x_arch_setup): ... this. Reimplement.
4655 (target_regsets): Rename to ...
4656 (tic6x_regsets): ... this, and make static.
4657 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4658 (tic6x_regs_info): New function.
4659 (the_low_target): Adjust.
4660 (initialize_low_arch): New function.
4661 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4662 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4663 (target_regsets): Rename to ...
4664 (xtensa_regsets): ... this, and make static.
4665 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4666 globals.
4667 (xtensa_arch_setup, xtensa_regs_info): New functions.
4668 (the_low_target): Adjust.
4669 (initialize_low_arch): New function.
4670 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4671 (nios2_arch_setup): Set the current process'es tdesc.
4672 (target_regsets): Rename to ...
4673 (nios2_regsets): ... this.
4674 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4675 (nios2_regs_info): New function.
4676 (the_low_target): Adjust.
4677 (initialize_low_arch): New function.
4678 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4679 (aarch64_arch_setup): Set the current process'es tdesc.
4680 (target_regsets): Rename to ...
4681 (aarch64_regsets): ... this.
4682 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4683 (aarch64_regs_info): New function.
4684 (the_low_target): Adjust.
4685 (initialize_low_arch): New function.
4686 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4687 globals.
4688 (target_regsets): Rename to ...
4689 (tile_regsets): ... this.
4690 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4691 (tile_regs_info): New function.
4692 (tile_arch_setup): Set the current process'es tdesc.
4693 (the_low_target): Adjust.
4694 (initialize_low_arch): New function.
4695 * spu-low.c (tdesc_spu): Declare.
4696 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4697 * win32-arm-low.c (tdesc_arm): Declare.
4698 (arm_arch_setup): New function.
4699 (the_low_target): Install arm_arch_setup instead of
4700 init_registers_arm.
4701 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4702 (init_windows_x86): Rename to ...
4703 (i386_arch_setup): ... this. Set `win32_tdesc'.
4704 (the_low_target): Adjust.
4705 * win32-low.c (win32_tdesc): New global.
4706 (child_add_thread): Don't create the thread cache here.
4707 (do_initial_child_stuff): Set the new process'es tdesc.
4708 * win32-low.h (struct target_desc): Forward declare.
4709 (win32_tdesc): Declare.
4710 * lynx-i386-low.c (tdesc_i386): Declare global.
4711 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4712 * lynx-low.c (lynx_tdesc): New global.
4713 (lynx_add_process): Set the new process'es tdesc.
4714 * lynx-low.h (struct target_desc): Forward declare.
4715 (lynx_tdesc): Declare global.
4716 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4717 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4718 * nto-low.c (nto_tdesc): New global.
4719 (do_attach): Set the new process'es tdesc.
4720 * nto-low.h (struct target_desc): Forward declare.
4721 (nto_tdesc): Declare.
4722 * nto-x86-low.c (tdesc_i386): Declare.
4723 (nto_x86_arch_setup): Set `nto_tdesc'.
4724
4725 2013-06-04 Gary Benson <gbenson@redhat.com>
4726
4727 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4728 to qSupported response when appropriate.
4729 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4730 with nonzero-length annex.
4731 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4732 arguments supplied in annex.
4733
4734 2013-05-31 Doug Evans <dje@google.com>
4735
4736 PR server/15594
4737 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4738 64 bits in 64-cross-32 environment.
4739
4740 2013-05-28 Pedro Alves <palves@redhat.com>
4741
4742 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4743 (aarch64-without-fpu.c): Delete rule.
4744 * configure.srv (aarch64*-*-linux*): Remove references to
4745 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4746 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4747 declaration.
4748
4749 2013-05-24 Pedro Alves <palves@redhat.com>
4750
4751 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4752 instead of strchr/decode_address. Error if the range isn't split
4753 with a ','. Don't assume there's be a ':' in the action.
4754
4755 2013-05-23 Yao Qi <yao@codesourcery.com>
4756 Pedro Alves <palves@redhat.com>
4757
4758 * linux-low.c (lwp_in_step_range): New function.
4759 (linux_wait_1): If the thread was range stepping and stopped
4760 outside the stepping range, report the stop to GDB. Otherwise,
4761 continue stepping. Add range stepping debug output.
4762 (linux_set_resume_request): Copy the step range from the resume
4763 request to the lwp.
4764 (linux_supports_range_stepping): New.
4765 (linux_target_ops) <supports_range_stepping>: Set to
4766 linux_supports_range_stepping.
4767 * linux-low.h (struct linux_target_ops)
4768 <supports_range_stepping>: New field.
4769 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4770 * linux-x86-low.c (x86_supports_range_stepping): New.
4771 (the_low_target) <supports_range_stepping>: Set to
4772 x86_supports_range_stepping.
4773 * server.c (handle_v_cont): Handle 'r' action.
4774 (handle_v_requests): Append ";r" if the target supports range
4775 stepping.
4776 * target.h (struct thread_resume) <step_range_start,
4777 step_range_end>: New fields.
4778 (struct target_ops) <supports_range_stepping>:
4779 New field.
4780 (target_supports_range_stepping): New macro.
4781
4782 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4783
4784 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4785 confusion in comment.
4786
4787 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4788
4789 * lynx-low.c (struct process_info_private): New type.
4790 (lynx_add_process): New function.
4791 (lynx_create_inferior, lynx_attach): Replace calls to
4792 add_process by calls to lynx_add_process.
4793 (lynx_resume): If PTID is null, then try using
4794 current_process()->private->last_wait_event_ptid.
4795 Add comments.
4796 (lynx_clear_inferiors): Delete. The contents of that function
4797 has been inlined in lynx_mourn;
4798 (lynx_wait_1): Save the ptid in the process's private data.
4799 (lynx_mourn): Free the process' private data. Replace call
4800 to lynx_clear_inferiors by call to clear_inferiors.
4801
4802 2013-05-17 Yao Qi <yao@codesourcery.com>
4803
4804 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4805 the right place.
4806
4807 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
4808
4809 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4810 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4811 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4812 PT_TEXT_END_ADDR guards. Update comments.
4813 (linux_target_op) <read_offsets>: Conditionally define to
4814 linux_read_offsets if the target is UCLIBC and if it defines
4815 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4816
4817 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4818 Andrew Jenner <andrew@codesourcery.com>
4819
4820 * Makefile.in (SFILES): Add linux-nios2-low.c.
4821 (clean): Add action to delete nios2-linux.c.
4822 (nios2-linux.c): New rule.
4823 * configure.srv: Add nios2*-*-linux*.
4824 * linux-nios2-low.c: New.
4825
4826 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4827
4828 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4829
4830 2013-04-25 Hui Zhu <hui@codesourcery.com>
4831
4832 PR gdb/15186
4833 * ax.c (ax_printf): Add fflush.
4834
4835 2013-04-22 Tom Tromey <tromey@redhat.com>
4836
4837 * Makefile.in (SFILES): Add filestuff.c.
4838 (OBS): Add filestuff.o.
4839 (filestuff.o): New target.
4840 * config.in, configure: Rebuild.
4841 * configure.ac: Check for fdwalk, pipe2.
4842
4843 2013-04-17 Pedro Alves <palves@redhat.com>
4844
4845 * configure.ac (USE_THREAD_DB): Delete variable.
4846 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4847 Don't AC_SUBST USE_THREAD_DB.
4848 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4849 * config.in, configure: Regenerate.
4850
4851 2013-04-16 Pedro Alves <palves@redhat.com>
4852
4853 * linux-low.h (struct lwp_info) <thread_known>: Move under
4854 the USE_THREAD_DB #ifdef.
4855
4856 2013-04-16 Pedro Alves <palves@redhat.com>
4857
4858 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4859 (linux-low.o): Delete rule.
4860 * linux-low.h: Always include "gdb_thread_db.h" instead of
4861 conditionally including thread_db.h.
4862 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4863 HAVE_THREAD_DB_H.
4864
4865 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4866
4867 * Makefile.in (install-only): Fix make install regression.
4868
4869 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4870
4871 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4872 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4873 installation.
4874 * gdbserver.1: Remove.
4875
4876 2013-03-22 Pedro Alves <palves@redhat.com>
4877
4878 * linux-low.c (handle_extended_wait): Don't call
4879 linux_enable_event_reporting.
4880
4881 2013-03-15 Tony Theodore <tonyt@logyst.com>
4882
4883 PR build/9098:
4884 * Makefile.in (SHELL): Use @SHELL@.
4885
4886 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4887
4888 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4889 compiler warning.
4890
4891 2013-03-13 Joel Brobecker <brobecker@adacore.com>
4892
4893 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4894 Remove extraneous NULL element.
4895
4896 2013-03-13 Yao Qi <yao@codesourcery.com>
4897
4898 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4899 'V' block in trace frame.
4900
4901 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4902
4903 * target.h (struct target_ops): Add btrace ops.
4904 (target_supports_btrace): New macro.
4905 (target_enable_btrace): New macro.
4906 (target_disable_btrace): New macro.
4907 (target_read_btrace): New macro.
4908 * gdbthread.h (struct thread_info): Add btrace field.
4909 * server.c: Include btrace-common.h.
4910 (handle_btrace_general_set): New function.
4911 (handle_btrace_enable): New function.
4912 (handle_btrace_disable): New function.
4913 (handle_general_set): Call handle_btrace_general_set.
4914 (handle_qxfer_btrace): New function.
4915 (struct qxfer qxfer_packets[]): Add btrace entry.
4916 * inferiors.c (remove_thread): Disable btrace.
4917 * linux-low: Include linux-btrace.h.
4918 (linux_low_enable_btrace): New function.
4919 (linux_low_read_btrace): New function.
4920 (linux_target_ops): Add btrace ops.
4921 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4922 Add srv_linux_btrace=yes.
4923 (x86_64-*-linux*): Add linux-btrace.o.
4924 Add srv_linux_btrace=yes.
4925 * configure.ac: Define HAVE_LINUX_BTRACE.
4926 * config.in: Regenerated.
4927 * configure: Regenerated.
4928
4929 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4930
4931 * server.c (handle_qxfer): Preserve error message if -3 is
4932 returned.
4933 (qxfer): Document the -3 return value.
4934
4935 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4936
4937 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4938 (linux_btrace_h): New variable.
4939 (linux-btrace.o): New rule.
4940
4941 2013-03-08 Stan Shebs <stan@codesourcery.com>
4942 Hafiz Abid Qadeer <abidh@codesourcery.com>
4943
4944 * tracepoint.c (trace_buffer_size): New global.
4945 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4946 (init_trace_buffer): Change to one-argument function. Allocate
4947 trace buffer memory.
4948 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4949 handle QTBuffer:size packet.
4950 (cmd_bigqtbuffer_size): New function.
4951 (initialize_tracepoint): Call init_trace_buffer with
4952 DEFAULT_TRACE_BUFFER_SIZE.
4953 * server.c (handle_query): Add QTBuffer:size in the
4954 supported packets.
4955
4956 2013-03-07 Yao Qi <yao@codesourcery.com>
4957
4958 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4959 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4960 of -1.
4961 (cmd_qtsp): Adjust condition. Do post increment.
4962 Set cur_action and cur_step_action back to 0.
4963
4964 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
4965
4966 PR server/15236
4967 * linux-low.c (linux_write_memory): Return early success if LEN is
4968 zero.
4969
4970 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
4971
4972 * configure.srv: Add x86_64-*-cygwin* as target.
4973
4974 2013-02-28 Tom Tromey <tromey@redhat.com>
4975
4976 * configure.ac: Invoke AC_SYS_LARGEFILE.
4977 * configure, config.in: Rebuild.
4978
4979 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
4980
4981 * win32-low.c: Throughout, fix format strings and casts of
4982 printf-like functions to avoid type related warnings on all
4983 platforms.
4984 (get_child_debug_event): Print dwDebugEventCode as hex since
4985 that's how it's usually documented.
4986
4987 2013-02-28 Yao Qi <yao@codesourcery.com>
4988
4989 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
4990 pulongest.
4991
4992 2013-02-27 Jiong Wang <jiwang@tilera.com>
4993
4994 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
4995 (reg-tilegx32.c): New rule.
4996 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
4997 * linux-tile-low.c (tile_arch_setup): New function. Invoke
4998 different register info initializer according to elf class.
4999 (init_registers_tilgx32): New function. The tilegx32 register info
5000 initializer.
5001 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5002 (tile_store_gregset): Likewise.
5003
5004 2013-02-27 Yao Qi <yao@codesourcery.com>
5005
5006 * server.c (process_point_options): Print debug message when
5007 debug_threads is true.
5008
5009 2013-02-26 Yao Qi <yao@codesourcery.com>
5010
5011 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5012
5013 2013-02-19 Pedro Alves <palves@redhat.com>
5014 Kai Tietz <ktietz@redhat.com>
5015
5016 PR gdb/15161
5017
5018 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5019 instead of strtoul to extract address from packet.
5020 (process_serial_event) <'z'>: Likewise.
5021
5022 2013-02-18 Yao Qi <yao@codesourcery.com>
5023
5024 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5025
5026 2013-02-14 Pedro Alves <palves@redhat.com>
5027
5028 Plug memory leak.
5029
5030 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5031 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5032
5033 2013-02-14 Pedro Alves <palves@redhat.com>
5034
5035 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5036
5037 2013-02-14 Pedro Alves <palves@redhat.com>
5038
5039 * tracepoint.c (save_string): Delete.
5040 (add_tracepoint_action): Use savestring instead of save_string.
5041
5042 2013-02-12 Pedro Alves <palves@redhat.com>
5043
5044 * linux-xtensa-low.c: Ditto.
5045 * xtensa-xtregs.c: Ditto.
5046
5047 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5048
5049 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5050 thread_db.
5051
5052 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5053
5054 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5055 aarch64_num_wp_regs and aarch64_num_bp_regs to
5056 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5057
5058 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5059
5060 * linux-aarch64-low.c (ps_get_thread_area): Replace
5061 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5062
5063 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5064 Marcus Shawcroft <marcus.shawcroft@arm.com>
5065 Nigel Stephens <nigel.stephens@arm.com>
5066 Yufeng Zhang <yufeng.zhang@arm.com>
5067
5068 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5069 (aarch64.c, aarch64-without-fpu.c): New targets.
5070 * configure.srv (aarch64*-*-linux*): New.
5071 * linux-aarch64-low.c: New file.
5072
5073 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5074
5075 * linux-low.c (handle_extended_wait, linux_create_inferior)
5076 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5077 (dequeue_one_deferred_signal, linux_resume_one_thread)
5078 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5079 (linux_tracefork_grandchild, linux_test_for_tracefork)
5080 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5081 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5082 where the argument is 0.
5083
5084 2013-01-25 Yao Qi <yao@codesourcery.com>
5085
5086 * event-loop.c: Include "queue.h".
5087 (gdb_event_p): New typedef.
5088 (struct gdb_event) <next_event>: Remove.
5089 (event_queue): Change to QUEUE(gdb_event_p).
5090 (async_queue_event): Remove.
5091 (gdb_event_xfree): New.
5092 (initialize_event_loop): New.
5093 (process_event): Use API from QUEUE.
5094 (wait_for_event): Likewise.
5095 * server.c (main): Call initialize_event_loop.
5096 * server.h (initialize_event_loop): Declare.
5097
5098 2013-01-18 Yao Qi <yao@codesourcery.com>
5099
5100 * ax.h (struct eval_agent_expr_context): New.
5101 (gdb_eval_agent_expr): Update declaration.
5102 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5103 TFRAME. Add new argument CTX.
5104 * server.h (struct eval_agent_expr_context): Declare.
5105 (agent_mem_read, agent_tsv_read): Update declaration.
5106 (agent_mem_read_string): Likewise.
5107 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5108 (add_traceframe_block): Add new argument TPOINT.
5109 Increase TPOINT->traceframe_usage.
5110 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5111 eval_tracepoint_agent_expr.
5112 (condition_true_at_tracepoint): Likewise.
5113 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5114 (agent_mem_read_string, agent_tsv_read): Likewise.
5115
5116 2013-01-16 Yao Qi <yao@codesourcery.com>
5117
5118 * linux-low.c (linux_resume_one_lwp): Don't check
5119 'lwp->bp_reinsert != 0'.
5120
5121 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5122 Pedro Alves <palves@redhat.com>
5123
5124 * lynx-low.c (ptrace_request_to_str): Define a temporary
5125 macro and use it to simplify this function's implementation.
5126
5127 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5128
5129 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5130 sets errno.
5131
5132 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5133
5134 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5135
5136 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5137
5138 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5139
5140 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5141
5142 * lynx-low.c (lynx_resume): Use the resume_info parameter
5143 to determine the ptid for the lynx_ptrace call, unless
5144 it is equal to minus_one_ptid, in which case we use the
5145 ptid of the current_inferior.
5146 (lynx_wait_1): After having received a thread create/exit
5147 event, resume the inferior's execution using the signaling
5148 thread's ptid, rather than the old ptid.
5149
5150 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5151
5152 * lynx-low.c (lynx_resume): Delete variable ret.
5153
5154 2013-01-01 Joel Brobecker <brobecker@adacore.com>
5155
5156 * gdbreplay.c (gdbreplay_version): Update copyright year.
5157 * server.c (gdbserver_version): Likewise.
5158
5159 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5160
5161 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5162 new thread.
5163
5164 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5165
5166 * lynx-low.c (ptrace_request_to_str): Add handling for
5167 PTRACE_GETTRACESIG.
5168
5169 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5170
5171 * lynx-low.c (lynx_attach): Delete variable new_process.
5172
5173 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5174
5175 * lynx-low.c (lynx_create_inferior): Delete variable
5176 new_process.
5177
5178 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5179
5180 * lynx-low.c (ptrace_request_to_str): Do not handle
5181 PTRACE_GETTHREADLIST if this macro does not exist.
5182
5183 2012-12-15 Yao Qi <yao@codesourcery.com>
5184
5185 * Makefile.in (OBS): Add notif.o.
5186 * notif.c, notif.h: New.
5187 * server.c: Include "notif.h".
5188 (struct vstop_notif) <next>: Remove.
5189 <base>: New field.
5190 (queue_stop_reply): Update.
5191 (push_event, send_next_stop_reply): Remove.
5192 (discard_queued_stop_replies): Update.
5193 (notif_stop): New variable.
5194 (handle_v_stopped): Remove.
5195 (handle_v_requests): Don't call handle_v_stopped. Call
5196 handle_ack_notif instead.
5197 (queue_stop_reply_callback): Call notif_event_enque instead
5198 of queue_stop_reply.
5199 (handle_status): Don't call send_next_stop_reply, call
5200 notif_write_event instead.
5201 (kill_inferior_callback): Likewise.
5202 (detach_or_kill_inferior_callback): Likewise.
5203 (main): Call initialize_notif.
5204 (process_serial_event): Call QUEUE_is_empty.
5205 (handle_target_event): Call notif_push instead of push event.
5206 * server.h (push_event): Remove declaration.
5207
5208 2012-12-10 Tom Tromey <tromey@redhat.com>
5209
5210 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5211 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5212 macros.
5213 (.c.o): Rewrite.
5214 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5215 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5216 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5217 (amd64-linux-ipa.o, ax.o): Rewrite.
5218 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5219 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5220 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5221 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5222 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5223 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5224 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5225 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5226 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5227 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5228 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5229 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5230 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5231 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5232 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5233 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5234 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5235 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5236 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5237 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5238 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5239 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5240 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5241 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5242 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5243 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5244 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5245 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5246 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5247 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5248 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5249 (reg-tilegx.o): Remove.
5250 (all_object_files): New macro.
5251 Include .deps files.
5252 * aclocal.m4, configure: Rebuild.
5253 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5254 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5255 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5256
5257 2012-12-05 Tom Tromey <tromey@redhat.com>
5258
5259 PR gdb/14917:
5260 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5261
5262 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
5263
5264 * configure.ac: Check for linux/perf_event.h.
5265 * config.in: Regenerated.
5266 * configure: Regenerated.
5267
5268 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5269
5270 * hostio.c (handle_readlink): Decrease buffer size
5271 parameter passed to readlink by one byte.
5272
5273 2012-11-26 Yao Qi <yao@codesourcery.com>
5274
5275 * configure.ac (build_warnings): Append '-Wempty-body'.
5276 * configure: Regenerated.
5277 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5278 body.
5279
5280 2012-11-15 Pierre Muller <muller@sourceware.org>
5281
5282 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5283 * config.in: Regenerate.
5284 * configure: Regenerate.
5285 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5286 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5287 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5288 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5289 header.
5290 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5291 instead of <sys/wait.h> header.
5292 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5293
5294 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
5295
5296 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5297 (various make rules): Remove -DGDBSERVER
5298
5299 2012-11-09 Yao Qi <yao@codesourcery.com>
5300
5301 * spu-low.c (current_ptid): Move it to ..
5302 * gdbthread.h: ... here. New.
5303 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5304 * server.c (myresume, process_serial_event): Likewise.
5305 * thread-db.c (thread_db_find_new_threads): Likewise.
5306 * tracepoint.c (run_inferior_command): Likewise.
5307
5308 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
5309
5310 * server.c (handle_search_memory_1): Include access length in
5311 warning message.
5312
5313 2012-09-05 Michael Brandt <michael.brandt@axis.com>
5314
5315 * linux-crisv32-low.c: Fix compile errors.
5316
5317 2012-09-04 Yao Qi <yao@codesourcery.com>
5318
5319 * tracepoint.c (cmd_qtsv): Adjust debug message.
5320 Don't check CUR_TPOINT.
5321
5322 2012-08-28 Yao Qi <yao@codesourcery.com>
5323
5324 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5325 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5326 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5327 Remove declarations of xmalloc, xreallloc, xstrdup and
5328 freeargv.
5329 * Makefile.in (libiberty_h): New.
5330 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5331 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5332
5333 2012-08-23 Yao Qi <yao@codesourcery.com>
5334
5335 * server.h: Remove declaration of 'xsnprintf'.
5336
5337 2012-08-22 Keith Seitz <keiths@redhat.com>
5338
5339 * server.h: Include build-gnulib-gbserver/config.h.
5340 * gdbreplay.c: Likewise.
5341
5342 2012-08-08 Doug Evans <dje@google.com>
5343
5344 * Makefile.in (SFILES): Add gdb_vecs.c.
5345 (OBS): Add gdb_vecs.o.
5346 (gdb_vecs_h, host_defs_h): New variables.
5347 (thread-db.o): Add $(gdb_vecs_h) dependency.
5348 (gdb_vecs.o): New rule.
5349 * thread-db.c: #include "gdb_vecs.h".
5350 (thread_db_load_search): Use a vector to iterate over path elements.
5351 Handle text appearing after "$pdir".
5352
5353 * configure.ac: Add check for strstr.
5354 * config.in: Regenerate.
5355 * configure: Regenerate.
5356
5357 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5358
5359 * hostio.c (handle_pread): If pread fails, fall back to attempting
5360 lseek/read.
5361 (handle_pwrite): Likewise for pwrite.
5362
5363 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5364
5365 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5366 between unsupported TYPE and unimplementable ADDR/LEN combination.
5367 (arm_insert_point): Act on new return value.
5368
5369 2012-07-31 Pedro Alves <palves@redhat.com>
5370
5371 * server.c (process_point_options): Only skip tokens if we find
5372 one that is unrecognized. Don't treat 'X' specially while
5373 skipping unrecognized tokens.
5374
5375 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5376
5377 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5378 to 4-byte-align HW breakpoint addresses for Thumb.
5379
5380 2012-07-27 Yao Qi <yao@codesourcery.com>
5381
5382 PR remote/14161.
5383
5384 * server.h: Declare gdb_agent_about_to_close.
5385 * target.c (kill_inferior): Include "agent.h".
5386 New. Send command 'kill'.
5387 * target.h (kill_inferior): Removed macro.
5388 * tracepoint.c (gdb_agent_about_to_close): New.
5389 (gdb_agent_helper_thread): Handle command 'close'.
5390 Wait endlessly until the inferior stops.
5391 Install gdb_agent_remove_socket to atexit hook.
5392 (agent_socket_name): New static variable.
5393 (gdb_agent_socket_init): Replace local variable 'name' with
5394 'agent_socket_name'.
5395 (gdb_agent_remove_socket): New.
5396
5397 2012-07-27 Yao Qi <yao@codesourcery.com>
5398
5399 * server.c (process_point_options): Stop at 'X' when parsing.
5400
5401 2012-07-19 Michael Eager <eager@eagercon.com>
5402
5403 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
5404 to hw_execute.
5405 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5406 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5407 hardware breakpoint.
5408
5409 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5410
5411 * gdbserver/linux-low.c (initialize_low): Call
5412 linux_ptrace_init_warnings.
5413
5414 2012-07-02 Doug Evans <dje@google.com>
5415
5416 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5417 pointer to int.
5418
5419 2012-07-02 Stan Shebs <stan@codesourcery.com>
5420
5421 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5422 (ax.o): Add it to build rule.
5423 (ax-ipa.o): Ditto.
5424 (OBS): Add format.o.
5425 (IPA_OBS): Add format.o.
5426 * server.c (handle_query): Claim support for breakpoint commands.
5427 (process_point_options): Add command case.
5428 (process_serial_event): Leave running if there are printfs in
5429 effect.
5430 * mem-break.h (any_persistent_commands): Declare.
5431 (add_breakpoint_commands): Declare.
5432 (gdb_no_commands_at_breakpoint): Declare.
5433 (run_breakpoint_commands): Declare.
5434 * mem-break.c (struct point_command_list): New struct.
5435 (struct breakpoint): New field command_list.
5436 (any_persistent_commands): New function.
5437 (add_commands_to_breakpoint): New function.
5438 (add_breakpoint_commands): New function.
5439 (gdb_no_commands_at_breakpoint): New function.
5440 (run_breakpoint_commands): New function.
5441 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5442 locally.
5443 * ax.c: Include format.h.
5444 (ax_printf): New function.
5445 (gdb_eval_agent_expr): Add printf opcode.
5446
5447 2012-06-13 Yao Qi <yao@codesourcery.com>
5448
5449 * server.c (start_inferior): Remove duplicated writes to fields
5450 'last_resume_kind' and 'last_status' of 'current_inferior'.
5451
5452 2012-06-12 Yao Qi <yao@codesourcery.com>
5453 Pedro Alves <palves@redhat.com>
5454
5455 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5456 comment.
5457 * server.c (handle_v_cont): Extend comment.
5458
5459 2012-06-11 Yao Qi <yao@codesourcery.com>
5460
5461 * linux-low.c (linux_attach): Add 'static'.
5462
5463 2012-06-06 Yao Qi <yao@codesourcery.com>
5464
5465 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5466
5467 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5468
5469 Fix gcc -flto compilation warning.
5470 * server.c (main): Make variable multi_mode and attach volatile.
5471
5472 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5473
5474 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5475 if the platform doesn't know about it.
5476
5477 2012-05-30 Jeff Kenton <jkenton@tilera.com>
5478
5479 * Makefile.in (SFILES): Add linux-tile-low.c.
5480 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5481 * configure.srv: Handle tilegx-*-linux*.
5482 * linux-tile-low.c: New file.
5483
5484 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5485
5486 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5487
5488 2012-05-24 Pedro Alves <palves@redhat.com>
5489
5490 PR gdb/7205
5491
5492 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
5493
5494 2012-05-24 Pedro Alves <palves@redhat.com>
5495
5496 PR gdb/7205
5497
5498 Replace target_signal with gdb_signal throughout.
5499
5500 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5501
5502 * linux-low.c (linux_store_registers): Avoid the copying sequence
5503 when no data has been retrieved by ptrace.
5504
5505 2012-05-22 Will Deacon <will.deacon@arm.com>
5506
5507 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5508 Include asm/ptrace.h.
5509 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5510 already defined.
5511
5512 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5513
5514 * linux-low.c (linux_store_registers): Don't re-retrieve data
5515 with ptrace that has already been obtained from /proc. Always
5516 copy any data retrieved with ptrace to the buffer supplied.
5517
5518 2012-05-11 Yao Qi <yao@codesourcery.com>
5519 Pedro Alves <palves@redhat.com>
5520
5521 * linux-low.c (enum stopping_threads_kind): New.
5522 (stopping_threads): Change type to `enum stopping_threads_kind'.
5523 (handle_extended_wait): If stopping and suspending threads, leave
5524 the new_lwp suspended too.
5525 (linux_wait_for_event): Adjust.
5526 (stop_all_lwps): Set `stopping_threads' to
5527 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5528 whether we're suspending threads or just stopping them. Assert no
5529 recursion happens.
5530
5531 2012-04-29 Yao Qi <yao@codesourcery.com>
5532
5533 * server.h: Move some code to ...
5534 * gdbthread.h: ... here. New.
5535 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5536 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5537 (nto-low.o, win32-low.o): Likewise.
5538 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5539 * regcache.c, remote-utils.c, server.c: Likewise.
5540 * target.c, tracepoint.c, win32-low.c: Likewise.
5541
5542 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5543
5544 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5545 (PTRACE_ARG4_TYPE): Likewise.
5546 (PTRACE_XFER_TYPE): Likewise.
5547 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5548 ptrace to PTRACE_ARG3_TYPE.
5549 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5550 (PTRACE_ARG4_TYPE): Likewise.
5551 (PTRACE_XFER_TYPE): Likewise.
5552 (linux_detach_one_lwp): Cast fourth argument of
5553 ptrace to long then PTRACE_ARG4_TYPE.
5554 (regsets_fetch_inferior_registers): Cast third argument of
5555 ptrace to long then PTRACE_ARG3_TYPE.
5556 (regsets_store_inferior_registers): Likewise.
5557
5558 2012-04-20 Pedro Alves <palves@redhat.com>
5559
5560 * configure: Regenerate.
5561
5562 2012-04-19 Pedro Alves <palves@redhat.com>
5563
5564 * Makefile.in (GNULIB_BUILDDIR): New.
5565 (LIBGNU, INCGNU, GNULIB_H): Adjust.
5566 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5567 (all, install-only, uninstall, clean-info, all-lib, clean): No
5568 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5569 (maintainer-clean realclean distclean): Use subdir_do.
5570 (subdir_do): New.
5571 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
5572 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
5573 * acinclude.m4: Include acx_configure_dir.m4.
5574 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5575 calls. Call AC_PROG_RANLIB. Configure gnulib using
5576 ACX_CONFIGURE_DIR.
5577 (GNULIB): New.
5578 (GNULIB_STDINT_H): Adjust.
5579 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5580 * gdbreplay.c: Include build-gnulib/config.h.
5581 * server.h: Likewise.
5582 * aclocal.m4: Regenerate.
5583 * config.in: Regenerate.
5584 * configure: Regenerate.
5585
5586 2012-04-19 Pedro Alves <palves@redhat.com>
5587
5588 * Makefile.in (LIBGNU, INCGNU): Adjust.
5589 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5590 (all, install-only, uninstall, clean-info, all-lib, clean)
5591 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5592 * configure.ac: Adjust AC_OUTPUT output.
5593 * aclocal.m4: Regenerate.
5594 * configure: Regenerate.
5595
5596 2012-04-19 Pedro Alves <palves@redhat.com>
5597
5598 * Makefile.in (generated_files): New.
5599 (server_h): Remove the explicit dependency on config.h, and depend
5600 on $generated_files.
5601
5602 2012-04-19 Pedro Alves <palves@redhat.com>
5603
5604 * Makefile.in (INCGNU): Add -Ignulib.
5605
5606 2012-04-19 Pedro Alves <palves@redhat.com>
5607
5608 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5609 (INCGNU): ... this, and spell out -I here.
5610 (GNULIB_LIB): Rename to ...
5611 (LIBGNU): ... this.
5612 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5613
5614 2012-04-19 Pedro Alves <palves@redhat.com>
5615
5616 * config.in: Regenerate.
5617
5618 2012-04-19 Pedro Alves <palves@redhat.com>
5619
5620 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5621 * server.h (memmem): Remove declaration.
5622 * config.in: Regenerate.
5623 * configure: Regenerate.
5624
5625 2012-04-19 Yao Qi <yao@codesourcery.com>
5626
5627 * Makefile.in (SFILES): Add common/vec.c.
5628 (OBS): Add vec.o.
5629 (vec.o): New rule.
5630
5631 2012-04-19 Yao Qi <yao@codesourcery.com>
5632
5633 * remote-utils.c (prepare_resume_reply): Replace with macro
5634 target_core_of_thread.
5635 * server.c (handle_qxfer_threads_proper): Likewise.
5636 * target.h (traget_core_of_thread): New macro.
5637
5638 2012-04-18 Pedro Alves <palves@redhat.com>
5639
5640 * aclocal.m4: Regenerate.
5641 * configure: Regenerate.
5642
5643 2012-04-16 Yao Qi <yao@codesourcery.com>
5644
5645 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5646 duplicated on address.
5647
5648 2012-04-16 Yao Qi <yao@codesourcery.com>
5649
5650 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5651 (struct tracepoint_action_ops) <send>: New field.
5652 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5653 (agent_expr_send, x_tracepoint_action_send): New.
5654 (l_tracepoint_action_send): New.
5655 (cmd_qtdp): Download and install tracepoint
5656 according to `use_agent'.
5657 (run_inferior_command): Add one more parameter `len'.
5658 Update callers.
5659 (tracepoint_send_agent): New.
5660 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5661
5662 2012-04-16 Yao Qi <yao@codesourcery.com>
5663
5664 * tracepoint.c (download_tracepoints): Moved to ...
5665 (cmd_qtstart): ... here.
5666
5667 2012-04-14 Yao Qi <yao@codesourcery.com>
5668
5669 * tracepoint.c: Include inttypes.h.
5670 (struct collect_memory_action): Use sized types.
5671 (struct tracepoint): Likewise.
5672 (cmd_qtdp, stop_tracing): Update print specifiers.
5673 (cmd_qtp, response_tracepoint): Likewise.
5674 (collect_data_at_tracepoint): Likewise.
5675 (collect_data_at_step): Likewise.
5676
5677 2012-04-14 Yao Qi <yao@codesourcery.com>
5678
5679 Import gnulib module inttypes.
5680 * aclocal.m4, config.in, configure: Regenerated.
5681
5682 2012-04-14 Yao Qi <yao@codesourcery.com>
5683
5684 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5685 Makefile and config.status at last.
5686
5687 2012-04-13 Yao Qi <yao@codesourcery.com>
5688
5689 * tracepoint.c: Include stdint.h unconditionally.
5690
5691 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5692
5693 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5694 on BFD_HAVE_SYS_PROCFS_TYPE.
5695 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5696 * configure: Regenerate.
5697 * config.in: Likewise.
5698
5699 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5700
5701 * Makefile.in (clean): Also remove x32.c x32-linux.c
5702 x32-avx.c x32-avx-linux.c.
5703 (x32.o): New target.
5704 (x32.c): Likewise.
5705 (x32-linux.o): Likewise.
5706 (x32-linux.c): Likewise.
5707 (x32-avx.o): Likewise.
5708 (x32-avx.c): Likewise.
5709 (x32-avx-linux.o): Likewise.
5710 (x32-avx-linux.c): Likewise.
5711
5712 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5713 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5714 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5715 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5716 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5717 i386/x32-avx-linux.xml.
5718
5719 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5720 (init_registers_x32_avx_linux): Likwise.
5721 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5722 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5723
5724 2012-04-13 Pedro Alves <palves@redhat.com>
5725
5726 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5727 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5728 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5729 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5730 the sub-make.
5731
5732 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5733
5734 * linux-x86-low.c (compat_x32_clock_t): New.
5735 (compat_x32_siginfo_t): Likewise.
5736 (compat_x32_siginfo_from_siginfo): Likewise.
5737 (siginfo_from_compat_x32_siginfo): Likewise.
5738 (linux_is_elf64): Likewise.
5739 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5740 and siginfo_from_compat_x32_siginfo for x32.
5741 (x86_arch_setup): Set linux_is_elf64.
5742
5743 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5744
5745 PR gdb/13969
5746 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5747 e_machine field.
5748 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5749 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5750 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5751 compatible with process.
5752
5753 2012-04-12 Yao Qi <yao@codesourcery.com>
5754
5755 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5756 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5757 (install-only, install-info, clean): Handle sub dir gnulib.
5758 (all-lib, am--refresh): New targets.
5759 (memmem.o): Remove target.
5760 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5761 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5762 (AC_REPLACE_FUNCS): Remove memmem.
5763 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5764 (AC_OUTPUT): Generate Makefile in gnulib/.
5765 * aclocal.m4, config.in, configure: Regenerated.
5766
5767 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5768
5769 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5770
5771 2012-04-05 Pedro Alves <palves@redhat.com>
5772
5773 -Werror=strict-aliasing
5774
5775 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5776 pointer.
5777
5778 2012-04-04 Pedro Alves <palves@redhat.com>
5779
5780 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5781 (sparc_store_gregset_from_stack, sparc_store_gregset)
5782 (sparc_breakpoint_at): Fix formatting.
5783
5784 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5785
5786 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5787 are available.
5788 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5789 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5790 * config.in: Regenerate.
5791 * configure: Likewise.
5792
5793 2012-03-29 Pedro Alves <palves@redhat.com>
5794
5795 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5796 Correct ptrace arguments.
5797
5798 2012-03-28 Pedro Alves <palves@redhat.com>
5799
5800 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5801 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5802 (IA64_FR1_REGNUM): New defines.
5803 (ia64_fetch_register): New.
5804 (the_low_target): Install it.
5805 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5806 field.
5807 * linux-low.c (linux_fetch_registers): Try the
5808 the_low_target.fetch_register hook first.
5809
5810 * linux-arm-low.c (the_low_target): Adjust.
5811 * linux-bfin-low.c (the_low_target): Adjust.
5812 * linux-cris-low.c (the_low_target): Adjust.
5813 * linux-crisv32-low.c (the_low_target): Adjust.
5814 * linux-m32r-low.c (the_low_target): Adjust.
5815 * linux-m68k-low.c (the_low_target): Adjust.
5816 * linux-mips-low.c (the_low_target): Adjust.
5817 * linux-ppc-low.c (the_low_target): Adjust.
5818 * linux-s390-low.c (the_low_target): Adjust.
5819 * linux-sh-low.c (the_low_target): Adjust.
5820 * linux-sparc-low.c (the_low_target): Adjust.
5821 * linux-tic6x-low.c (the_low_target): Adjust.
5822 * linux-x86-low.c (the_low_target): Adjust.
5823 * linux-xtensa-low.c (the_low_target): Adjust.
5824
5825 2012-03-26 Pedro Alves <palves@redhat.com>
5826
5827 * server.c (handle_qxfer_libraries): Don't bail early if
5828 the_target->qxfer_libraries_svr4 is not NULL.
5829
5830 2012-03-26 Pedro Alves <palves@redhat.com>
5831
5832 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5833
5834 2012-03-23 Pedro Alves <palves@redhat.com>
5835
5836 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5837 "library-list-svr4" element's start tag when the the DSO list is
5838 empty.
5839
5840 2012-03-23 Pedro Alves <palves@redhat.com>
5841
5842 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5843 a variable whose type size is the same as the inferior's pointer
5844 size.
5845
5846 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5847
5848 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5849 struct siginfo.
5850 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5851 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5852 * linux-low.h: Include <signal.h>.
5853 (struct siginfo): Remove forward declaration.
5854 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5855 struct siginfo.
5856
5857 2012-03-21 Mike Frysinger <vapier@gentoo.org>
5858
5859 * .gitignore: Ignore more files.
5860
5861 2012-03-19 Pedro Alves <palves@redhat.com>
5862 Jan Kratochvil <jan.kratochvil@redhat.com>
5863
5864 * server.c (cont_thread, general_thread): Add describing comments.
5865 (start_inferior): Clear `cont_thread'.
5866 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5867 of a process.
5868
5869 2012-03-15 Yao Qi <yao@codesourcery.com>
5870
5871 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5872 handling to ...
5873 (cmd_qtdp): ... here.
5874
5875 2012-03-15 Yao Qi <yao@codesourcery.com>
5876
5877 * tracepoint.c (struct tracepoint_action_ops): New.
5878 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5879 (m_tracepoint_action_download): New.
5880 (r_tracepoint_action_download): New.
5881 (x_tracepoint_action_download): New.
5882 (l_tracepoint_action_download): New.
5883 (add_tracepoint_action): Install `action->ops' according type.
5884 (download_tracepoint_1): Move code `download' function pointer
5885 of various tracepoint_action_ops.
5886
5887 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5888
5889 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5890 linux_ptrace_attach_warnings.
5891
5892 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5893
5894 * Makefile.in (linux-ptrace.o): New.
5895 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5896 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5897 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5898 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5899 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5900 of these targets.
5901 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5902
5903 2012-03-08 Yao Qi <yao@codesourcery.com>
5904 Pedro Alves <palves@redhat.com>
5905
5906 Fix PR server/13392.
5907 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5908 offset of JMP insn.
5909 * tracepoint.c (remove_tracepoint): New.
5910 (cmd_qtdp): Call remove_tracepoint when failed to install.
5911
5912 2012-03-07 Pedro Alves <palves@redhat.com>
5913
5914 * linux-low.c (get_detach_signal): New.
5915 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5916 Pass on pending signals to PTRACE_DETACH. Check the result of the
5917 ptrace call.
5918 * server.c (program_signals, program_signals_p): New.
5919 (handle_general_set): Handle QProgramSignals.
5920 * server.h (program_signals, program_signals_p): Declare.
5921
5922 2012-03-05 Pedro Alves <palves@redhat.com>
5923 Jan Kratochvil <jan.kratochvil@redhat.com>
5924
5925 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5926 New comment why.
5927
5928 2012-03-03 Yao Qi <yao@codesourcery.com>
5929
5930 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5931 agent_look_up_symbols.
5932
5933 2012-03-03 Yao Qi <yao@codesourcery.com>
5934
5935 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5936 (linux-x86-low.o): Likewise.
5937 * server.h: Remove in_process_agent_loaded.
5938 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5939 common/agent.c.
5940 Update callers.
5941
5942 2012-03-03 Yao Qi <yao@codesourcery.com>
5943
5944 * tracepoint.c (gdb_agent_capability): New global.
5945 (in_process_agent_loaded_ust): Renamed to
5946 `in_process_agent_supports_ust'.
5947 Update callers.
5948 (in_process_agent_supports_ust): Call agent_capability_check.
5949 (clear_installed_tracepoints): Assert that agent supports
5950 agent.
5951
5952 2012-03-03 Yao Qi <yao@codesourcery.com>
5953
5954 * linux-low.c (linux_supports_agent): New.
5955 (linux_target_ops): Initialize field `supports_agent' with
5956 linux_supports_agent.
5957 * target.h (struct target_ops) <supports_agent>: New.
5958 (target_supports_agent): New macro.
5959 * server.c (handle_general_set): Handle packet 'QAgent'.
5960 (handle_query): Send `QAgent+'.
5961 * Makefile.in (server.o): Depends on agent.h.
5962
5963 2012-03-03 Yao Qi <yao@codesourcery.com>
5964
5965 * Makefile.in (OBS): Add agent.o.
5966 Add new rule for agent.o.
5967 Track dependence of tracepoint.c on agent.h.
5968 * tracepoint.c (run_inferior_command_1):
5969 (run_inferior_command): Call agent_run_command.
5970 (gdb_ust_connect_sync_socket): Deleted. Move it to
5971 common/agent.c.
5972 (resume_thread, stop_thread): Likewise.
5973 (gdb_ust_socket_init): Renamed to ...
5974 (gdb_agent_socket_init): ... New.
5975 (gdb_ust_thread): Renamed to ...
5976 (gdb_agent_helper_thread): ... New.
5977 (gdb_ust_init): Move some code to ...
5978 (gdb_agent_init): ... here. New.
5979 [HAVE_UST]: Call gdb_ust_init.
5980 (initialize_tracepoint_ftlib): Call gdb_agent_init.
5981 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
5982 * config.in, configure: Regenerated.
5983
5984 2012-03-02 Pedro Alves <palves@redhat.com>
5985
5986 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
5987 * linux-low.c (struct simple_pid_list): New.
5988 (stopped_pids): New a struct simple_pid_list pointer.
5989 (add_to_pid_list, pull_pid_from_list): New.
5990 (handle_extended_wait): Don't assume the first signal new children
5991 report is SIGSTOP. Adjust call to pull_pid_from_list.
5992 (linux_wait_for_lwp): Adjust.
5993
5994 2012-03-02 Yao Qi <yao@codesourcery.com>
5995
5996 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
5997 debug log.
5998
5999 2012-03-02 Yao Qi <yao@codesourcery.com>
6000
6001 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6002 `stop_pc' and `tpoint'. Update caller.
6003
6004 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6005
6006 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6007 * linux-low.c (use_linux_regsets): New macro.
6008 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6009 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6010 (linux_register_in_regsets): New function.
6011 (usr_fetch_inferior_registers): Skip registers covered by
6012 regsets.
6013 (usr_store_inferior_registers): Likewise.
6014 (usr_fetch_inferior_registers): New macro.
6015 (usr_store_inferior_registers): Likewise.
6016 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6017 (linux_store_registers): Likewise.
6018 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6019 prototype.
6020 (init_registers_mips64_dsp_linux): Likewise.
6021 (init_registers_mips_linux): New macro.
6022 (init_registers_mips_dsp_linux): Likewise.
6023 (mips_dsp_num_regs): Likewise.
6024 (DSP_BASE, DSP_CONTROL): New fallback macros.
6025 (mips_base_regs): New macro.
6026 (mips_regmap): Use it. Fix the size.
6027 (mips_dsp_regmap): New variable.
6028 (mips_dsp_regset_bitmap): Likewise.
6029 (mips_arch_setup): New function.
6030 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6031 than mips_regmap.
6032 (mips_cannot_store_register): Likewise.
6033 (the_low_target): Update .arch_setup, .num_regs and .regmap
6034 initializers. Add .regset_bitmap initializer.
6035 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6036 initializer.
6037 * linux-bfin-low.c (the_low_target): Likewise.
6038 * linux-cris-low.c (the_low_target): Likewise.
6039 * linux-crisv32-low.c (the_low_target): Likewise.
6040 * linux-ia64-low.c (the_low_target): Likewise.
6041 * linux-m32r-low.c (the_low_target): Likewise.
6042 * linux-m68k-low.c (the_low_target): Likewise.
6043 * linux-ppc-low.c (the_low_target): Likewise.
6044 * linux-s390-low.c (the_low_target): Likewise.
6045 * linux-sh-low.c (the_low_target): Likewise.
6046 * linux-sparc-low.c (the_low_target): Likewise.
6047 * linux-tic6x-low.c (the_low_target): Likewise.
6048 * linux-x86-low.c (the_low_target): Likewise.
6049 * linux-xtensa-low.c (the_low_target): Likewise.
6050 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6051 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6052 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6053 srv_xmlfiles.
6054 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6055 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6056
6057 2012-02-29 Yao Qi <yao@codesourcery.com>
6058 Pedro Alves <palves@redhat.com>
6059
6060 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6061 `step_over_finished' is true.
6062
6063 2012-02-27 Pedro Alves <palves@redhat.com>
6064
6065 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6066 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6067
6068 2012-02-27 Pedro Alves <palves@redhat.com>
6069
6070 PR server/9684
6071 * linux-low.c (pid_is_stopped): New.
6072 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6073
6074 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
6075
6076 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6077 of conditions.
6078
6079 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6080
6081 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6082
6083 2012-02-24 Luis Machado <lgustavo@codesourcery>
6084
6085 * server.c (handle_query): Advertise support for target-side
6086 breakpoint condition evaluation.
6087 (process_point_options): New function.
6088 (process_serial_event): When inserting a breakpoint, check for
6089 a target-side condition that should be evaluated.
6090
6091 * mem-break.c: Include regcache.h and ax.h.
6092 (point_cond_list_t): New data structure.
6093 (breakpoint) <cond_list>: New field.
6094 (find_gdb_breakpoint_at): Make non-static.
6095 (delete_gdb_breakpoint_at): Clear any target-side
6096 conditions.
6097 (clear_gdb_breakpoint_conditions): New function.
6098 (add_condition_to_breakpoint): Likewise.
6099 (add_breakpoint_condition): Likewise.
6100 (gdb_condition_true_at_breakpoint): Likewise.
6101 (gdb_breakpoint_here): Return result directly instead
6102 of going through a local variable.
6103
6104 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6105 (clear_gdb_breakpoint_conditions): Likewise.
6106 (add_breakpoint_condition): Likewise.
6107 (gdb_condition_true_at_breakpoint): Likewise.
6108
6109 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6110 (need_step_over_p): Take target-side breakpoint condition into
6111 consideration.
6112
6113 2012-02-24 Luis Machado <lgustavo@codesourcery>
6114
6115 * server.h: Include tracepoint.h.
6116 (agent_mem_read, agent_get_trace_state_variable_value,
6117 agent_set_trace_state_variable_value,
6118 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6119 get_set_tsv_func_addr): New prototypes.
6120
6121 * ax.h: New include file.
6122 * ax.c: New source file.
6123
6124 * tracepoint.c: Include ax.h.
6125 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6126 agent_expr, eval_result_type): Move to ax.h.
6127 (parse_agent_expr): Rename to ...
6128 (gdb_parse_agent_expr): ... this, make it non-static and move
6129 to ax.h.
6130 (unparse_agent_expr) Rename to ...
6131 (gdb_unparse_agent_expr): ... this, make it non-static and move
6132 to ax.h.
6133 (eval_agent_expr): Rename to ...
6134 (eval_tracepoint_agent_expr): ... this.
6135 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6136 forward declarations.
6137 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6138 (agent_get_trace_state_variable_value): New function.
6139 (agent_set_trace_state_variable_value): New function.
6140 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6141 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6142 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6143 (condition_true_at_tracepoint): Likewise.
6144 (parse_agent_expr): Rename to ...
6145 (gdb_parse_agent_expr): ... this and move to ax.c.
6146 (unparse_agent_expr): Rename to ...
6147 (gdb_unparse_agent_expr): ... this and move to ax.c.
6148 (gdb_agent_op_name): Move to ax.c.
6149 (eval_agent_expr): Rename to ...
6150 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6151 and move to ax.c.
6152 (eval_tracepoint_agent_expr): New function.
6153 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
6154 non-static.
6155 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6156 ax.c.
6157 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6158 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6159 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6160 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6161 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6162 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6163 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6164 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6165 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6166 (compile_bytecodes): Remove forward declaration.
6167 (is_goto_target): Move to ax.c.
6168 (compile_bytecodes): Move to ax.c and call
6169 agent_get_trace_state_variable_value (...) and
6170 agent_set_trace_state_variable_value (...).
6171
6172 * Makefile.in: Update ax.c and IPA dependencies.
6173
6174 2012-02-24 Pedro Alves <palves@redhat.com>
6175
6176 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6177 (cmd_bigqtbuffer_circular): ... this. Only handle
6178 'QTBuffer:circular:'.
6179 (handle_tracepoint_general_set): Adjust.
6180
6181 2012-02-16 Yao Qi <yao@codesourcery.com>
6182
6183 * inferiors.c: Move code to ...
6184 * dll.c: .... here. New.
6185 * server.h: Declare clear_dlls.
6186 * Makefile.in (SFILES): Add dll.c.
6187 (OBS): Add dll.o
6188 (dll.o): New rule.
6189
6190 2012-02-11 Yao Qi <yao@codesourcery.com>
6191
6192 * server.c: (handle_monitor_command): Add a new parameter
6193 `own_buf'.
6194 (handle_query): Update caller.
6195
6196 2012-02-09 Joel Brobecker <brobecker@adacore.com>
6197
6198 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6199 * configure, config.in: Regenerate.
6200 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6201 is not defined.
6202
6203 2012-02-02 Pedro Alves <palves@redhat.com>
6204
6205 Try SIGKILL first, then PTRACE_KILL.
6206 * linux-low.c (linux_kill_one_lwp): New.
6207 (linux_kill_one_lwp): Rename to ...
6208 (kill_one_lwp_callback): ... this. Use the new
6209 linux_kill_one_lwp.
6210
6211 2012-02-02 Pedro Alves <palves@redhat.com>
6212
6213 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6214 inferior.
6215
6216 2012-01-27 Pedro Alves <palves@redhat.com>
6217
6218 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6219 (elf_64_file_p): Make static.
6220 (linux_pid_exe_is_elf_64_file): New.
6221 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6222 Delete declarations.
6223 (linux_pid_exe_is_elf_64_file): Declare.
6224 * linux-x86-low.c (x86_arch_setup): Use
6225 linux_pid_exe_is_elf_64_file.
6226
6227 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6228
6229 * linux-low.c (linux_wait_for_event_1): Rename to ...
6230 (linux_wait_for_event): ... here and merge it with former
6231 linux_wait_for_event - new variable wait_ptid, use it.
6232 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6233
6234 2012-01-23 Pedro Alves <palves@redhat.com>
6235
6236 * server.c (main): Avoid yet another case of infinite loop while
6237 detaching/killing after a longjmp.
6238
6239 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6240
6241 Code cleanup.
6242 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6243
6244 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6245
6246 * hostio.c (handle_readlink): New function.
6247 (handle_vFile): Call it to handle "vFile:readlink" packets.
6248
6249 2012-01-20 Pedro Alves <palves@redhat.com>
6250 Ulrich Weigand <ulrich.weigand@linaro.org>
6251
6252 * server.c (handle_v_requests): Only support vAttach and vRun to
6253 start multiple processes when in extended protocol mode.
6254
6255 2012-01-17 Pedro Alves <palves@redhat.com>
6256
6257 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6258 memalign plus mprotect to allocate the scratch buffer.
6259
6260 2012-01-13 Pedro Alves <palves@redhat.com>
6261
6262 * server.c (attach_inferior): Clear `cont_thread'.
6263
6264 2012-01-13 Pedro Alves <palves@redhat.com>
6265
6266 * server.c (main): Avoid infinite loop while detaching/killing
6267 after a longjmp.
6268
6269 2012-01-09 Doug Evans <dje@google.com>
6270
6271 * server.c (start_inferior): Set last_ptid in --wrapper case.
6272
6273 2012-01-06 Yao Qi <yao@codesourcery.com>
6274
6275 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6276 defined.
6277 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6278
6279 2012-01-04 Yao Qi <yao@codesourcery.com>
6280
6281 * tracepoint.c (cmd_qtdp): Print debug message
6282 for static tracepoint.
6283
6284 2012-01-04 Yao Qi <yao@codesourcery.com>
6285
6286 * tracepoint.c (trace_vdebug): Differentiate debug message
6287 between gdbserver and IPA.
6288
6289 2012-01-03 Yao Qi <yao@codesourcery.com>
6290
6291 * tracepoint.c (tracepoint_was_hit): Don't collect for
6292 static tracepoint.
6293
6294 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6295
6296 * terminal.h: Reformat copyright header.
6297
6298 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6299
6300 * server.c (gdbserver_version): Update copyright year.
6301 * gdbreplay.c (gdbreplay_version): Likewise.
6302
6303 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6304
6305 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6306
6307 Revert:
6308 2011-12-18 Hui Zhu <teawater@gmail.com>
6309 * linux-low.c (linux_create_inferior): Save return value to ret.
6310
6311 2011-12-18 Hui Zhu <teawater@gmail.com>
6312
6313 * linux-low.c (linux_create_inferior): Save return value to ret.
6314
6315 2011-12-16 Doug Evans <dje@google.com>
6316
6317 * linux-low.c (linux_create_inferior): If stdio connection,
6318 redirect stdin from /dev/null, stdout to stderr.
6319 * remote-utils.c (remote_is_stdio): New static global.
6320 (remote_connection_is_stdio): New function.
6321 (remote_prepare): Handle stdio connection.
6322 (remote_open): Ditto.
6323 (remote_close): Don't close stdin for stdio connections.
6324 (read_prim,write_prim): New functions. Replace all calls to
6325 read/write to these.
6326 * server.c (main): Watch for "-" argument. Move call to
6327 remote_prepare before start_inferior.
6328 * server.h (STDIO_CONNECTION_NAME): New macro.
6329 (remote_connection_is_stdio): Declare.
6330
6331 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6332 in debugging output.
6333
6334 2011-12-15 Yao Qi <yao@codesourcery.com>
6335
6336 * tracepoint.c: Include sys/syscall.h.
6337 (gdb_ust_thread): Remove preprocessor conditional.
6338
6339 2011-12-14 Pedro Alves <pedro@codesourcery.com>
6340
6341 * linux-low.c (linux_detach_one_lwp): Call
6342 the_low_target.prepare_to_resume before detaching.
6343
6344 2011-12-14 Yao Qi <yao@codesourcery.com>
6345
6346 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6347 of write.
6348
6349 2011-12-14 Yao Qi <yao@codesourcery.com>
6350
6351 * i386-low.c (i386_low_stopped_data_address): Initialize local
6352 variable `control'.
6353
6354 2011-12-13 Pedro Alves <pedro@codesourcery.com>
6355
6356 PR remote/13492
6357
6358 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6359 DR_CONTROL unless necessary. Extend comments.
6360 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6361 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6362
6363 2011-12-13 Yao Qi <yao@codesourcery.com>
6364
6365 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6366 macros.
6367 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6368
6369 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6370
6371 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6372 Print new debug message for such case.
6373
6374 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6375
6376 Fix overlapping memcpy.
6377 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6378 the read_inferior_memory transfer.
6379 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6380 write_inferior_memory transfer.
6381 (set_fast_tracepoint_jump): New variable buf. Use it for the
6382 read_inferior_memory and write_inferior_memory transfers.
6383 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6384 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6385 Use it for the write_inferior_memory transfer.
6386 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6387 buffers.
6388
6389 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6390
6391 * linux-low.c (fetch_register, store_register): Make code
6392 consistent, fix formatting.
6393
6394 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6395
6396 * linux-low.c (usr_store_inferior_registers): Factor out code
6397 to handle individual registers into...
6398 (store_register): ... this new function.
6399
6400 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6401
6402 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6403 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6404 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6405 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6406 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6407 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6408 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6409 (srv_xmlfiles): Add new XML files.
6410
6411 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6412 and <sys/uio.h>.
6413 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6414 (init_registers_s390_linux32v1): Add prototype.
6415 (init_registers_s390_linux32v2): Likewise.
6416 (init_registers_s390_linux64v1): Likewise.
6417 (init_registers_s390_linux64v2): Likewise.
6418 (init_registers_s390x_linux64v1): Likewise.
6419 (init_registers_s390x_linux64v2): Likewise.
6420 (s390_num_regs): Increment to 52.
6421 (s390_regmap): Add orig_r2 register.
6422 (s390_num_regs_3264): Increment to 68.
6423 (s390_regmap_3264): Add orig_r2 register.
6424 (s390_collect_ptrace_register): Handle orig_r2 register.
6425 (s390_supply_ptrace_register): Likewise.
6426 (s390_fill_last_break): New function.
6427 (s390_store_last_break): Likewise.
6428 (s390_fill_system_call): New function.
6429 (s390_store_system_call): Likewise.
6430 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6431 register sets.
6432 (s390_check_regset): New function.
6433 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6434 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6435 Update target_regsets for available register sets.
6436
6437 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6438 Jan Kratochvil <jan.kratochvil@redhat.com>
6439
6440 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6441 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6442 New.
6443 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6444 * linux-low.h (struct process_info_private): New member r_debug.
6445 * server.c (handle_qxfer_libraries): Call
6446 the_target->qxfer_libraries_svr4.
6447 (handle_qxfer_libraries_svr4): New function.
6448 (qxfer_packets): New entry "libraries-svr4".
6449 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6450 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6451 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6452 PACKET_qXfer_libraries_svr4.
6453
6454 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6455
6456 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6457 PSW address/mask between 8-byte and 16-byte formats.
6458 (s390_supply_ptrace_register): Likewise.
6459 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6460 basic addressing mode bit.
6461
6462 2011-11-24 Stan Shebs <stan@codesourcery.com>
6463
6464 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6465
6466 2011-11-17 Stan Shebs <stan@codesourcery.com>
6467
6468 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6469 (tracing_start_time): New global.
6470 (tracing_stop_time): New global.
6471 (tracing_user_name): New global.
6472 (tracing_notes): New global.
6473 (tracing_stop_note): New global.
6474 (cmd_qtstart): Set traceframe_usage, start_time.
6475 (stop_tracing): Set stop_time.
6476 (cmd_qtstatus): Report additional status.
6477 (cmd_qtp): New function.
6478 (handle_tracepoint_query): Call it.
6479 (cmd_qtnotes): New function.
6480 (handle_tracepoint_general_set): Call it.
6481 (get_timestamp): Rename from tsv_get_timestamp.
6482
6483 2011-11-14 Stan Shebs <stan@codesourcery.com>
6484 Kwok Cheung Yeung <kcy@codesourcery.com>
6485
6486 * linux-x86-low.c (small_jump_insn): New.
6487 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6488 trampoline and error message, build a trampoline and issue a small
6489 jump instruction to it.
6490 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6491 trampoline and error message.
6492 (x86_get_min_fast_tracepoint_insn_len): New.
6493 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6494 * linux-low.h (struct linux_target_ops): Add arguments to
6495 install_fast_tracepoint_jump_pad operation, add new operation.
6496 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6497 arguments.
6498 (linux_get_min_fast_tracepoint_insn_len): New function.
6499 (linux_target_op): Add new operation.
6500 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6501 (gdb_trampoline_buffer_end): Ditto.
6502 (gdb_trampoline_buffer_error): Ditto.
6503 (struct ipa_sym_addresses): Add fields for new IPA variables.
6504 (symbol_list): Add entries for new IPA variables.
6505 (struct tracepoint): Add fields to hold the address range of the
6506 trampoline used by the tracepoint.
6507 (trampoline_buffer_head): New static variable.
6508 (trampoline_buffer_tail): Ditto.
6509 (claim_trampoline_space): New function.
6510 (have_fast_tracepoint_trampoline_buffer): New function.
6511 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6512 structure.
6513 (install_fast_tracepoint): Ditto, also add error buffer argument.
6514 (cmd_qtminftpilen): New function.
6515 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6516 (fast_tracepoint_from_trampoline_address): New function.
6517 (fast_tracepoint_collecting): Handle trampoline as part of jump
6518 pad space.
6519 (set_trampoline_buffer_space): New function.
6520 (initialize_tracepoint): Initialize new IPA variables.
6521 * target.h (struct target_ops): Add arguments to
6522 install_fast_tracepoint_jump_pad operation, add new
6523 get_min_fast_tracepoint_insn_len operation.
6524 (target_get_min_fast_tracepoint_insn_len): New.
6525 (install_fast_tracepoint_jump_pad): Add arguments.
6526 * server.h (IPA_BUFSIZ): Define.
6527 * linux-i386-ipa.c: Include extra header files.
6528 (initialize_fast_tracepoint_trampoline_buffer): New function.
6529 (initialize_low_tracepoint): Call it.
6530 * server.h (set_trampoline_buffer_space): Declare.
6531 (claim_trampoline_space): Ditto.
6532 (have_fast_tracepoint_trampoline_buffer): Ditto.
6533
6534 2011-11-14 Yao Qi <yao@codesourcery.com>
6535
6536 * server.c (handle_query): Handle InstallInTrace for qSupported.
6537 * tracepoint.c (add_tracepoint): Sort list.
6538 (install_tracepoint, download_tracepoint): New.
6539 (cmd_qtdp): Call them to install and download tracepoints.
6540 (sort_tracepoints): Removed.
6541 (cmd_qtstart): Update.
6542
6543 2011-11-14 Yao Qi <yao@codesourcery.com>
6544
6545 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6546 * mem-break.h: Declare.
6547 * tracepoint.c (cmd_qtstart): Move some code to ...
6548 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6549 New.
6550 (download_tracepoints): Move some code to ...
6551 (download_tracepoint_1): ... here. New.
6552
6553 2011-11-08 Yao Qi <yao@codesourcery.com>
6554
6555 * remote-utils.c (relocate_instruction): A comment fix.
6556
6557 2011-11-07 Joel Brobecker <brobecker@adacore.com>
6558
6559 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6560 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6561 dr_status_mirror and dr_control_mirror from debug_reg_state.
6562 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6563 (i386_initial_stuff): Remove use of deleted globals.
6564 (i386_get_thread_context, i386_set_thread_context,
6565 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6566 from debug_reg_state.
6567
6568 2011-11-05 Yao Qi <yao@codesourcery.com>
6569
6570 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6571 address as TPOINT's.
6572
6573 2011-11-02 Stan Shebs <stan@codesourcery.com>
6574
6575 * tracepoint.c (agent_mem_read_string): New function.
6576 (eval_agent_expr): Call it for tracenz.
6577 * server.c (handle_query): Report support for tracenz.
6578
6579 2011-11-02 Yao Qi <yao@codesourcery.com>
6580
6581 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6582
6583 2011-11-02 Yao Qi <yao@codesourcery.com>
6584
6585 * target.h: Fix a typo in comment.
6586
6587 2011-10-31 Pedro Alves <pedro@codesourcery.com>
6588
6589 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6590 clobber the breakpoints' shadows with fast tracepoint jumps.
6591 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6592 * target.c (write_inferior_memory): Also pass MYADDR down to
6593 check_mem_write.
6594
6595 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6596
6597 * configure.ac: Check support for personality routine.
6598 * configure: Regenerate.
6599 * config.in: Likewise.
6600 * linux-low.c: Include <sys/personality.h>.
6601 Define ADDR_NO_RANDOMIZE if necessary.
6602 (linux_create_inferior): Disable address space randomization when
6603 forking inferior, if requested.
6604 (linux_supports_disable_randomization): New function.
6605 (linux_target_ops): Install it.
6606 * server.h (disable_randomization): Declare.
6607 * server.c (disable_randomization): New global variable.
6608 (handle_general_set): Handle QDisableRandomization.
6609 (handle_query): Likewise for qSupported.
6610 (main): Support --disable-randomization and --no-disable-randomization
6611 command line arguments.
6612 * target.h (struct target_ops): Add supports_disable_randomization.
6613 (target_supports_disable_randomization): New macro.
6614
6615 2011-09-29 Mike Frysinger <vapier@gentoo.org>
6616
6617 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6618 ifdef check.
6619 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6620 [!PT_GETDSBT] (target_loadmap): New definition.
6621 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6622 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6623 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6624 and PT_GETDSBT to LINUX_LOADMAP.
6625 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6626 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6627
6628 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6629
6630 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6631 (arm_linux_hwbp_cap): New static variable.
6632 (arm_linux_get_hwbp_cap): Replace by ...
6633 (arm_linux_init_hwbp_cap): ... this new function.
6634 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6635 (arm_linux_get_hw_watchpoint_count): Likewise.
6636 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6637 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6638 (arm_prepare_to_resume): Use perror_with_name instead of error.
6639
6640 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6641
6642 * linux-arm-low.c: Include <signal.h>.
6643 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6644 (struct arm_linux_hwbp_cap): New data type.
6645 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6646 (struct arm_linux_hw_breakpoint): New data type.
6647 (MAX_BPTS, MAX_WPTS): Define.
6648 (struct arch_process_info, struct arch_lwp_info): New data types.
6649 (arm_linux_get_hwbp_cap): New function.
6650 (arm_linux_get_hw_breakpoint_count): Likewise.
6651 (arm_linux_get_hw_watchpoint_count): Likewise.
6652 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6653 (arm_hwbp_control_initialize): Likewise.
6654 (arm_hwbp_control_is_enabled): Likewise.
6655 (arm_hwbp_control_is_initialized): Likewise.
6656 (arm_hwbp_control_disable): Likewise.
6657 (arm_linux_hw_breakpoint_equal): Likewise.
6658 (arm_linux_hw_point_initialize): Likewise.
6659 (struct update_registers_data): New data structure.
6660 (update_registers_callback: New function.
6661 (arm_insert_point): Likewise.
6662 (arm_remove_point): Likewise.
6663 (arm_stopped_by_watchpoint): Likewise.
6664 (arm_stopped_data_address): Likewise.
6665 (arm_new_process): Likewise.
6666 (arm_new_thread): Likewise.
6667 (arm_prepare_to_resume): Likewise.
6668 (the_low_target): Register arm_insert_point, arm_remove_point,
6669 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6670 arm_new_thread, and arm_prepare_to_resume.
6671
6672 2011-09-15 Stan Shebs <stan@codesourcery.com>
6673
6674 * server.h (struct emit_ops): Add compare-goto fields.
6675 * tracepoint.c (gdb_agent_op_sizes): New table.
6676 (emit_eq_goto): New function.
6677 (emit_ne_goto): New function.
6678 (emit_lt_goto): New function.
6679 (emit_le_goto): New function.
6680 (emit_gt_goto): New function.
6681 (emit_ge_goto): New function.
6682 (is_goto_target): New function.
6683 (compile_bytecodes): Recognize special cases of compare-goto
6684 combinations and call specialized emitters for them.
6685 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6686 (amd64_emit_ne_goto): New function.
6687 (amd64_emit_lt_goto): New function.
6688 (amd64_emit_le_goto): New function.
6689 (amd64_emit_gt_goto): New function.
6690 (amd64_emit_ge_goto): New function.
6691 (amd64_emit_ops): Add the new functions.
6692 (i386_emit_eq_goto): New function.
6693 (i386_emit_ne_goto): New function.
6694 (i386_emit_lt_goto): New function.
6695 (i386_emit_le_goto): New function.
6696 (i386_emit_gt_goto): New function.
6697 (i386_emit_ge_goto): New function.
6698 (i386_emit_ops): Add the new functions.
6699
6700 2011-09-08 Stan Shebs <stan@codesourcery.com>
6701
6702 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6703 (i386_emit_epilogue): Restore %ebx.
6704
6705 2011-08-31 Jie Zhang <jzhang918@gmail.com>
6706
6707 * server.c (step_thread): Remove definition.
6708 (process_serial_event): Don't handle Hs.
6709 * server.h (step_thread): Remove declaration.
6710 * target.c (set_desired_inferior): Remove use of step_thread.
6711
6712 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6713
6714 * linux-low.c: Include linux-procfs.h.
6715 (linux_attach_lwp_1): Update comments.
6716 (linux_attach): Scan for existing threads when attaching to a
6717 process that is the tgid.
6718 * Makefile.in: Update dependencies.
6719
6720 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6721
6722 * configure.srv: Add linux-procfs.o dependencies.
6723
6724 2011-08-14 Yao Qi <yao@codesourcery.com>
6725
6726 * target.h (struct target_ops): Fix indent.
6727 * win32-low.c (win32_target_ops): Fix comment.
6728
6729 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
6730 Yao Qi <yao@codesourcery.com>
6731
6732 * Makefile.in (clean): Remove tic6x-*.c files.
6733 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6734 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6735 (tic6x-c64xp-linux.c): Likewise.
6736 * configure.srv: Add support for tic6x-*-uclinux.
6737 * linux-tic6x-low.c: New.
6738 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6739
6740 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
6741 Yao Qi <yao@codesourcery.com>
6742
6743 * target.h (struct target_ops): Add read_loadmap.
6744 * linux-low.c (struct target_loadseg): New type.
6745 (struct target_loadmap): New type.
6746 (linux_read_loadmap): New function.
6747 (linux_target_ops): Add linux_read_loadmap.
6748 * server.c (handle_query): Support qXfer:fdpic:read packet.
6749 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6750 to NULL.
6751
6752 2011-08-05 Eli Zaretskii <eliz@gnu.org>
6753
6754 * win32-low.c: Include <stdint.h>.
6755
6756 2011-07-22 Pedro Alves <pedro@codesourcery.com>
6757
6758 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6759 to the inferior here.
6760 (i386_remove_aligned_watchpoint): Ditto.
6761 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6762 fit part of the watchpoint in the debug registers.
6763 (i386_update_inferior_debug_regs): New.
6764 (i386_low_insert_watchpoint): Work on a local mirror of the debug
6765 registers, and only update the inferior on success.
6766 (i386_low_remove_watchpoint): Ditto.
6767
6768 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6769
6770 * linux-low.c (compare_ints, unique, list_threads, show_process,
6771 linux_core_of_thread): Delete.
6772 (linux_target_ops): Change linux_core_of_thread to
6773 linux_common_core_of_thread.
6774 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6775 * utils.c (malloc_failure): Change type of argument.
6776 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6777 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6778 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6779 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6780 (IPA_OBJS): Add common-utils-ipa.o.
6781 (ptid_h, linux_osdata_h): New macros.
6782 (server_h): Add common/common-utils.h, common/xml-utils.h,
6783 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6784 common/ptid.h.
6785 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6786 ptid.o, buffer.o): New rules.
6787 (linux-low.o): Add common/linux-osdata.h as a dependency.
6788 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6789 * configure.ac: Add AC_HEADER_DIRENT check.
6790 * config.in: Regenerate.
6791 * configure: Regenerate.
6792 * remote-utils.c (xml_escape_text): Delete.
6793 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6794 buffer_xml_printf): Move to common/buffer.c.
6795 * server.c (main): Remove call to initialize_inferiors.
6796 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6797 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6798 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6799 internal_error, gdb_assert, gdb_assert_fail): Delete.
6800 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6801 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6802 common/buffer.h.
6803 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6804 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6805 initialize_inferiors): Delete.
6806
6807 2011-07-20 Pedro Alves <pedro@codesourcery.com>
6808
6809 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6810 symbol error.
6811
6812 2011-05-31 Pedro Alves <pedro@codesourcery.com>
6813
6814 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6815 assertion.
6816 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6817
6818 2011-05-26 Yao Qi <yao@codesourcery.com>
6819
6820 * Makefile.in (thread-db.o): Track dependence to
6821 common/gdb_thread_db.h.
6822 * thread-db.c: include gdb_thread_db.h from right place.
6823
6824 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6825
6826 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6827 __FILE__ and __LINE__ to internal_error.
6828
6829 2011-05-13 Doug Evans <dje@google.com>
6830
6831 * thread-db.c (try_thread_db_load_from_sdir): New function.
6832 (try_thread_db_load_from_dir): New function.
6833 (thread_db_load_search): Handle $sdir, ignore $pdir.
6834 Remove trying of system directories if search of
6835 libthread-db-search-path fails, that is now done via $sdir.
6836
6837 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6838
6839 * server.c (handle_query): Add EnableDisableTracepoints to the list
6840 of supported features.
6841 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
6842 tracepoints.
6843 (cmd_qtenable_disable): New.
6844 (cmd_qtstart): Install tracepoints even if disabled.
6845 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6846 receiving a QTEnable or QTDisable packet.
6847 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6848 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6849 tracepoints.
6850 (gdb_probe): Skip data collection if static tracepoint is disabled.
6851
6852 2011-05-10 Doug Evans <dje@google.com>
6853
6854 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6855
6856 2011-05-04 Doug Evans <dje@google.com>
6857
6858 * linux-low.c (linux_join): Skip process lookup.
6859 * spu-low.c (spu_join): Ditto.
6860 * server.c (join_inferiors_callback): Delete.
6861 (process_serial_event): For 'D' packet (detach) call join_inferior
6862 directly.
6863
6864 2011-05-04 Joseph Myers <joseph@codesourcery.com>
6865
6866 * README: Don't mention xscale*-*-linux*.
6867 * configure.srv (xscale*-*-linux*): Don't handle target.
6868
6869 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6870
6871 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6872 casting pointers.
6873 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6874 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6875 (i386_emit_void_call_2): Likewise.
6876
6877 2011-04-26 Yao Qi <yao@codesourcery.com>
6878
6879 * linux-low.c: Move common macros to linux-ptrace.h.
6880 Include linux-ptrace.h.
6881 * Makefile.in (linux_ptrace_h): New.
6882 (linux-low.o): Depends on linux-ptrace.h.
6883
6884 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6885
6886 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6887 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6888 (remote_prepare): New function with most of the TCP code from ...
6889 (remote_open): ... here. Detect PORT here unconditionally. Move also
6890 setting transport_is_reliable.
6891 * server.c (run_once): New variable.
6892 (gdbserver_usage): Document it.
6893 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6894 the first run if RUN_ONCE.
6895 * server.h (run_once, remote_prepare): New declarations.
6896
6897 2011-04-19 Tom Tromey <tromey@redhat.com>
6898
6899 * win32-low.c (handle_load_dll): Remove duplicate "the".
6900
6901 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6902
6903 Remove support for old Cygwin 1.5 versions.
6904 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6905 function to avoid warning.
6906 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6907 warning.
6908
6909 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6910
6911 * gdbserver/server.h (Macro _): Define it if not available.
6912
6913 2011-03-14 Michael Snyder <msnyder@vmware.com>
6914
6915 * hostio.c (handle_close): Remove unnecessary null test.
6916
6917 2011-03-10 Joel Brobecker <brobecker@adacore.com>
6918
6919 * Makefile.in (maintainer-clean realclean distclean): Remove
6920 "make ... subdir_do" command.
6921
6922 2011-03-10 Michael Snyder <msnyder@vmware.com>
6923
6924 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6925
6926 * server.c (handle_v_run): Free alloced buffer on early return.
6927
6928 2011-03-09 Yao Qi <yao@codesourcery.com>
6929
6930 Revert:
6931 2011-03-04 Yao Qi <yao@codesourcery.com>
6932
6933 * Makefile.in: Remove GNU make feature --directory.
6934
6935 2011-03-05 Yao Qi <yao@codesourcery.com>
6936
6937 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6938 (subdir_do): New make target. Copied from gdb/Makefile.
6939 (maintainer-clean, realclean, distclean, clean): Call corresponding
6940 make targets in common/Makefile.
6941
6942 2011-02-11 Yao Qi <yao@codesourcery.com>
6943
6944 * configure.ac: Call AC_PROG_RANLIB.
6945 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6946 * configure: Regenerate.
6947
6948 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6949
6950 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6951
6952 2011-03-06 Yao Qi <yao@codesourcery.com>
6953
6954 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6955
6956 2011-03-05 Yao Qi <yao@codesourcery.com>
6957
6958 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6959 (subdir_do): New make target. Copied from gdb/Makefile.
6960 (maintainer-clean, realclean, distclean, clean): Call corresponding
6961 make targets in common/Makefile.
6962
6963 2011-03-04 Yao Qi <yao@codesourcery.com>
6964
6965 * Makefile.in: Remove GNU make feature --directory.
6966
6967 2011-03-04 Michael Snyder <msnyder@vmware.com>
6968
6969 * server.c (queue_stop_reply): Call xmalloc not malloc.
6970
6971 2011-03-02 Michael Snyder <msnyder@vmware.com>
6972
6973 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6974
6975 2011-02-28 Michael Snyder <msnyder@vmware.com>
6976
6977 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6978 (cmd_qtframe): Ditto.
6979 (cmd_qtbuffer): Ditto.
6980 (cmd_bigqtbuffer): Ditto.
6981
6982 * utils.c (decimal2str): Initialize 'width' to nine, then
6983 don't mess with it.
6984
6985 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6986
6987 * hostio.c (require_data): Free *data, not data.
6988
6989 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6990
6991 * hostio.c (require_data): Use free, not xfree.
6992
6993 2011-02-27 Michael Snyder <msnyder@vmware.com>
6994
6995 * server.c (handle_query): Discard unused value.
6996
6997 * hostio.c (require_data): Free malloc memory before returning
6998 error.
6999
7000 2011-02-26 Michael Snyder <msnyder@vmware.com>
7001
7002 * linux-low.c (list_threads): Call closedir for dirent.
7003
7004 2011-02-27 Michael Snyder <msnyder@vmware.com>
7005
7006 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7007 a case statement falls through.
7008
7009 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7010
7011 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7012 in comparison.
7013
7014 2011-02-26 Michael Snyder <msnyder@vmware.com>
7015
7016 * utils.c (decimal2str): Eliminate dead code and dead param.
7017 (pulongest): Drop dead param from call to decimal2str.
7018 (plongest): Ditto.
7019
7020 2011-02-24 Joel Brobecker <brobecker@adacore.com>
7021
7022 Revert the following patch (not approved yet):
7023 2011-02-21 Hui Zhu <teawater@gmail.com>
7024 * tracepoint.c (tp_printf): New function.
7025 (eval_agent_expr): Handle gdb_agent_op_printf.
7026
7027 2011-02-21 Hui Zhu <teawater@gmail.com>
7028
7029 * tracepoint.c (tp_printf): New function.
7030 (eval_agent_expr): Handle gdb_agent_op_printf.
7031
7032 2011-02-18 Tom Tromey <tromey@redhat.com>
7033
7034 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7035 (tracepoint.o): Likewise.
7036 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7037 (gdb_agent_op_names): Likewise.
7038
7039 2011-02-18 Tom Tromey <tromey@redhat.com>
7040
7041 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7042 gdb_agent_op_rot>: New constants.
7043 (gdb_agent_op_names): Add pick and roll.
7044 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7045 cases.
7046
7047 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7048
7049 * aclocal.m4: Regenerated with aclocal-1.11.1.
7050
7051 2011-02-14 Pedro Alves <pedro@codesourcery.com>
7052
7053 * server.c (handle_qxfer_traceframe_info): New.
7054 (qxfer_packets): Register "traceframe-info".
7055 (handle_query): Report support for qXfer:traceframe-info:read+.
7056 * tracepoint.c (match_blocktype): New.
7057 (traceframe_find_block_type): Rename to ...
7058 (traceframe_walk_blocks): ... this. Add callback filter argument,
7059 and use it.
7060 (traceframe_find_block_type): New, reimplemented on top of
7061 traceframe_walk_blocks.
7062 (build_traceframe_info_xml): New.
7063 (traceframe_read_info): New.
7064 * server.h (traceframe_read_info): Declare.
7065
7066 2011-02-11 Yao Qi <yao@codesourcery.com>
7067
7068 * configure.ac: Call AC_PROG_RANLIB.
7069 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7070 * configure: Regenerate.
7071
7072 2011-02-07 Pedro Alves <pedro@codesourcery.com>
7073
7074 * server.c (gdb_read_memory): Change return semantics to allow
7075 partial transfers.
7076 (handle_search_memory_1): Adjust.
7077 (process_serial_event) <'m' packet>: Handle partial transfers.
7078 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7079
7080 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7081
7082 * regcache.c (init_register_cache): Initialize
7083 regcache->register_status.
7084 (free_register_cache): Release regcache->register_status.
7085 (regcache_cpy): Copy register_status.
7086 (registers_to_string): Print 'x's for unavailable registers.
7087 (supply_register): Mark the register's status valid or
7088 unavailable, depending on whether a buffer was passed in or not.
7089 (supply_register_zeroed): New.
7090 (supply_regblock): Mark the registers' status valid or
7091 unavailable, depending on whether a buffer was passed in or not.
7092 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7093 (struct regcache): New `register_status' field.
7094 (supply_register_zeroed): Declare.
7095 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7096 supply_register_zeroed, rather than passing a NULL buffer to
7097 supply_register.
7098 * tracepoint.c (fetch_traceframe_registers): Update comment.
7099
7100 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7101
7102 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7103 buffer explicit.
7104
7105 2011-01-25 Pedro Alves <pedro@codesourcery.com>
7106
7107 * server.h (decode_xfer_write): Change prototype.
7108 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7109 and don't extract the annex here.
7110 * server.c (decode_xfer_read): Remove `annex' parameter,
7111 and don't extract the annex here.
7112 (decode_xfer): New.
7113 (struct qxfer): New.
7114 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7115 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7116 (handle_qxfer_statictrace): New functions, abstracted out from
7117 handle_query, and made to use the struct qxfer interface.
7118 (handle_threads_qxfer_proper): Rename to ...
7119 (handle_qxfer_threads_proper): ... this.
7120 (handle_threads_qxfer): Rename to ...
7121 (handle_qxfer_threads): ... this. Adjust.
7122 (qxfer_packets): New array.
7123 (handle_qxfer): New function.
7124 (handle_query): Use handle_qxfer.
7125
7126 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7127
7128 * gdbreplay.c: Shorten lines of >= 80 columns.
7129 * linux-low.c: Ditto.
7130 * linux-ppc-low.c: Ditto.
7131 * linux-s390-low.c: Ditto.
7132 * linux-sparc-low.c: Ditto.
7133 * linux-x86-low.c: Ditto.
7134 * linux-xtensa-low.c: Ditto.
7135 * mem-break.c: Ditto.
7136 * nto-low.c: Ditto.
7137 * regcache.h: Ditto.
7138 * remote-utils.c: Ditto.
7139 * server.c: Ditto.
7140 * server.h: Ditto.
7141 * thread-db.c: Ditto.
7142 * tracepoint.c: Ditto.
7143 * utils.c: Ditto.
7144 * win32-low.h: Ditto.
7145
7146 2011-01-05 Joel Brobecker <brobecker@adacore.com>
7147
7148 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7149 update.
7150
7151 2011-01-01 Joel Brobecker <brobecker@adacore.com>
7152
7153 * server.c (gdbserver_version): Update copyright year in version
7154 output.
7155 * gdbreplay.c (gdbreplay_version): Ditto.
7156
7157 2010-12-29 Jie Zhang <jie.zhang@analog.com>
7158
7159 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7160 * linux-bfin-low.c: New file.
7161 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7162 PT_DATA_ADDR for BFIN targets.
7163 * Makefile.in (SFILES): Add linux-bfin-low.c.
7164 (clean): Remove reg-bfin.c.
7165 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7166 * README: Mention supported Blackfin targets.
7167
7168 2010-12-23 Mike Frysinger <vapier@gentoo.org>
7169
7170 * .gitignore: New file.
7171
7172 2010-11-16 Mike Frysinger <vapier@gentoo.org>
7173
7174 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7175
7176 2010-10-22 Jie Zhang <jie@codesourcery.com>
7177
7178 * Makefile.in: Add FLAGS_TO_PASS variable.
7179 (install): Remove dependency of install-only and recursively
7180 invoke make for install-only.
7181
7182 2010-10-04 Doug Evans <dje@google.com>
7183
7184 * Makefile.in (uninstall): Use $(DESTDIR).
7185
7186 2010-09-24 Pedro Alves <pedro@codesourcery.com>
7187
7188 PR gdb/11842
7189
7190 * linux-x86-low.c (compat_siginfo_from_siginfo)
7191 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7192 si_code is < 0. Check for si_code == SI_TIMER before checking for
7193 si_code < 0.
7194
7195 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7196
7197 * lynx-i386-low.c: New file.
7198 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7199
7200 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7201
7202 * lynx-low.c (ptrace_request_to_str): Remove handling for
7203 request values that have been removed in LynxOS 5.x.
7204
7205 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7206
7207 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7208 <ptrace.h>
7209
7210 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7211
7212 * configure.ac: Add --enable-inprocess-agent option.
7213 * configure: Rebuilt.
7214
7215 2010-09-06 Yao Qi <yao@codesourcery.com>
7216
7217 * linux-low.c (linux_kill): Remove unused variable.
7218 (linux_stabilize_threads): Likewise.
7219 * server.c (start_inferior): Likewise.
7220 (queue_stop_reply_callback): Likewise.
7221 * tracepoint.c (do_action_at_tracepoint): Likewise.
7222
7223 2010-09-06 Yao Qi <yao@codesourcery.com>
7224
7225 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7226 on return.
7227
7228 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7229
7230 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7231
7232 2010-09-06 Pedro Alves <pedro@codesourcery.com>
7233
7234 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7235 "$(IPA_DEPFILES)".
7236
7237 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7238
7239 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7240 gdbserver/lynx-ppc-low.c: New files.
7241 * Makefile.in (lynx_low_h): New variable.
7242 (lynx-low.o, lynx-ppc-low.o): New rules.
7243 * configure.ac: On LynxOS, link with -lnetinet.
7244 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7245 * configure: regenerate.
7246
7247 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7248
7249 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7250 * configure.ac: Add check for vasprintf and vsnprintf.
7251 * configure, config.in: Regenerate.
7252 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7253
7254 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7255
7256 * gdbreplay.c: Move include of alloca.h up, next to include of
7257 malloc.h.
7258 * server.h: Add include of malloc.h.
7259 * mem-break.c: Remove include of malloc.h.
7260 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7261
7262 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7263
7264 * Makefile.in (memmem.o): Build with -Wno-error.
7265
7266 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7267
7268 * utils.c (xsnprintf): Make non-static.
7269 * server.h: Add xsnprintf declaration.
7270 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7271 replace calls to snprintf by calls to xsnprintf throughout.
7272
7273 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7274
7275 * configure.ac: Add configure check for alloca.
7276 * configure, config.in: Regenerate.
7277 * server.h: Include alloca.h if it exists.
7278 * gdbreplay.c: Include alloca.h if it exists.
7279
7280 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7281
7282 * linux-low.c (__SIGRTMIN): Define if not already defined.
7283 (linux_create_inferior): Check for __ANDROID__ rather than
7284 __SIGRTMIN.
7285 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7286 are already deferred.
7287 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7288 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7289 stopped and already has a pending signal to report.
7290 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7291 a pending signal to report or is moving out of a jump pad.
7292 (linux_init_signals): Check for __ANDROID__ rather than
7293 __SIGRTMIN.
7294
7295 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7296
7297 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7298 debug_threads check. Avoid a linear search when not doing debug
7299 output.
7300
7301 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7302
7303 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7304 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7305 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7306 (process_event): Change local fd's type to gdb_fildes_t.
7307 (create_file_handler): Adjust prototype.
7308 (delete_file_handler): Adjust prototype.
7309 (handle_file_event): Adjust prototype. Use pfildes.
7310 (create_file_event): Adjsut prototype.
7311 * remote-utils.c (remote_desc, listen_desc): Change type to
7312 gdb_fildes_t.
7313 * server.h: New gdb_fildes_t typedef.
7314 [USE_WIN32API]: Include winsock2.h.
7315 (delete_file_handler, add_file_handler): Adjust prototypes.
7316 (pfildes): Declare.
7317 * utils.c (pfildes): New.
7318
7319 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7320
7321 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7322 * configure: Regenerate.
7323
7324 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7325
7326 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7327 (linux_done_accessing_memory): ... this.
7328 (linux_target_ops): Adjust.
7329 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7330 * nto-low.c (nto_target_ops): Adjust comment.
7331 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7332 * spu-low.c (spu_target_ops): Adjust comment.
7333 * target.h (target_ops): Rename unprepare_to_access_memory field
7334 to done_accessing_memory.
7335 (unprepare_to_access_memory): Rename to ...
7336 (done_accessing_memory): ... this.
7337
7338 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7339
7340 * linux-low.c (linux_prepare_to_access_memory): New.
7341 (linux_unprepare_to_access_memory): New.
7342 (linux_target_ops): Install them.
7343 * server.c (read_memory): Rename to ...
7344 (gdb_read_memory): ... this. Use
7345 prepare_to_access_memory/prepare_to_access_memory.
7346 (write_memory): Rename to ...
7347 (gdb_write_memory): ... this. Use
7348 prepare_to_access_memory/prepare_to_access_memory.
7349 (handle_search_memory_1): Adjust.
7350 (process_serial_event): Adjust.
7351 * target.h (struct target_ops): New fields
7352 prepare_to_access_memory and unprepare_to_access_memory.
7353 (prepare_to_access_memory, unprepare_to_access_memory): New.
7354 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7355 prepare_to_access_memory/prepare_to_access_memory.
7356 * nto-low.c (nto_target_ops): Adjust.
7357 * spu-low.c (spu_target_ops): Adjust.
7358 * win32-low.c (win32_target_ops): Adjust.
7359
7360 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7361
7362 * Makefile.in (WARN_CFLAGS): Get it from configure.
7363 (WERROR_CFLAGS): New.
7364 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7365 * configure.ac: Introduce --enable-werror, which adds -Werror to
7366 the compiler command line. Enabled by default. Disable with
7367 --disable-werror. Add -Wdeclaration-after-statement
7368 Wpointer-arith and -Wformat-nonliteral to warning flags.
7369 * configure: Regenerate.
7370
7371 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7372
7373 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7374
7375 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7376
7377 * gdbreplay.c (remote_error): New.
7378 (gdbchar): New.
7379 (expect): Use gdbchar. Check for error reading from GDB.
7380 Clarify sync error output.
7381 (play): Check for errors writing to GDB.
7382 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7383 * remote-utils.c (getpkt): Check for errors writing to the remote
7384 descriptor.
7385
7386 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7387
7388 * linux-low.c (linux_wait_1): Move non-debugging code out of
7389 `debug_threads' control.
7390
7391 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7392
7393 * linux-low.c (linux_wait_1): Don't set last_status here.
7394 * server.c (push_event, queue_stop_reply_callback): Assert we're
7395 not pushing a TARGET_WAITKIND_IGNORE event.
7396 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7397 (myresume, handle_target_event): Set the thread's last_resume_kind
7398 and last_status from the target returned status.
7399
7400 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7401
7402 PR threads/10729
7403
7404 * linux-x86-low.c (update_debug_registers_callback): New.
7405 (i386_dr_low_set_addr): Use it.
7406 (i386_dr_low_get_addr): New.
7407 (i386_dr_low_set_control): Use update_debug_registers_callback.
7408 (i386_dr_low_get_control): New.
7409 (i386_dr_low_get_status): Adjust.
7410 * linux-low.c (linux_stop_lwp): New.
7411 * linux-low.h (linux_stop_lwp): Declare.
7412
7413 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7414 argument instead of a i386_debug_reg_state.
7415 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7416 a i386_debug_reg_state.
7417 (i386_insert_aligned_watchpoint): Adjust.
7418 (i386_remove_aligned_watchpoint): Adjust.
7419 (i386_low_stopped_data_address): Read the debug registers from the
7420 inferior instead of from the mirrors.
7421 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7422 (i386_dr_low_get_addr): Declare.
7423 (i386_dr_low_get_control): Declare.
7424 (i386_dr_low_get_status): Change prototype.
7425
7426 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7427 (i386_dr_low_get_addr): New.
7428 (i386_dr_low_get_control): New.
7429 (i386_dr_low_get_status): Adjust prototype. Return
7430 dr_status_mirror.
7431 (i386_initial_stuff): Clear dr_status_mirror and
7432 dr_control_mirror.
7433 (i386_get_thread_context): Adjust.
7434 (i386_set_thread_context): Adjust.
7435 (i386_thread_added): Adjust.
7436
7437 2010-08-24 Pedro Alves <pedro@codesourcery.com>
7438
7439 * linux-low.h (linux_thread_area): Delete declaration.
7440
7441 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7442
7443 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7444 after its termination.
7445
7446 2010-08-09 Pedro Alves <pedro@codesourcery.com>
7447
7448 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7449 (gdb_wants_all_stopped): Delete.
7450 (linux_wait_1): Don't call them.
7451 * server.c (handle_v_cont): Tag all threads as want-stopped.
7452 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7453 stopped as "client-wants-stopped".
7454
7455 2010-07-31 Pedro Alves <pedro@codesourcery.com>
7456
7457 * Makefile.in (signals_h): New.
7458 (server_h): Depend on it.
7459 (server.o): Don't depend on $(signals_def).
7460 (signals.o): Depend on $(signals_def).
7461
7462 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7463
7464 * Makefile.in (signals_def): New.
7465 (server_h): Append include/gdb/signals.h and signals_def.
7466 (server.o): Append signals_def.
7467
7468 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7469
7470 * server.c (handle_target_event): Use target_signal_to_host for
7471 resume_info.sig initialization.
7472 * target.h (struct thread_resume) <sig>: New comment.
7473
7474 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7475
7476 * server.c (handle_query): strcpy() the returned string from paddress()
7477 instead of sprintf().
7478 * utils.c (paddress): Return phex_nz().
7479
7480 2010-07-07 Joel Brobecker <brobecker@adacore.com>
7481
7482 * server.c (handle_v_cont): Call mourn_inferior if process
7483 just exited.
7484 (myresume): Likewise.
7485
7486 2010-07-01 Pedro Alves <pedro@codesourcery.com>
7487
7488 Static tracepoints, and integration with UST.
7489
7490 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7491 * mem-break.c (uninsert_all_breakpoints)
7492 (reinsert_all_breakpoints): New.
7493 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7494 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7495 (gdb_agent_ust_loaded, helper_thread_id)
7496 (gdb_agent_helper_thread_id): New macros.
7497 (struct ipa_sym_addresses): Add addr_ust_loaded,
7498 addr_helper_thread_id, addr_cmd_buf.
7499 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7500 (in_process_agent_loaded_ust): New.
7501 (write_e_ust_not_loaded): New.
7502 (maybe_write_ipa_ust_not_loaded): New.
7503 (struct collect_static_trace_data_action): New.
7504 (enum tracepoint_type) <static_tracepoint>: New.
7505 (struct tracepoint) <handle>: Mention static tracepoints.
7506 (struct static_tracepoint_ctx): New.
7507 (CMD_BUF_SIZE): New.
7508 (add_tracepoint_action): Handle static tracepoint actions.
7509 (unprobe_marker_at): New.
7510 (clear_installed_tracepoints): Handle static tracepoints.
7511 (cmd_qtdp): Handle static tracepoints.
7512 (probe_marker_at): New.
7513 (cmd_qtstart): Handle static tracepoints.
7514 (response_tracepoint): Handle static tracepoints.
7515 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7516 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7517 (get_context_regcache): Handle static tracepoints.
7518 (do_action_at_tracepoint): Handle static tracepoint actions.
7519 (traceframe_find_block_type): Handle static trace data blocks.
7520 (traceframe_read_sdata): New.
7521 (download_tracepoints): Download static tracepoint actions.
7522 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7523 (GDB_PROBE_NAME): New.
7524 (ust_ops): New.
7525 (GET_UST_SYM): New.
7526 (USTF): New.
7527 (dlsym_ust): New.
7528 (ust_marker_to_static_tracepoint): New.
7529 (gdb_probe): New.
7530 (collect_ust_data_at_tracepoint): New.
7531 (gdb_ust_probe): New.
7532 (UNIX_PATH_MAX, SOCK_DIR): New.
7533 (gdb_ust_connect_sync_socket): New.
7534 (resume_thread, stop_thread): New.
7535 (run_inferior_command): New.
7536 (init_named_socket): New.
7537 (gdb_ust_socket_init): New.
7538 (cstr_to_hexstr): New.
7539 (next_st): New.
7540 (first_marker, next_marker): New.
7541 (response_ust_marker): New.
7542 (cmd_qtfstm, cmd_qtsstm): New.
7543 (unprobe_marker_at, probe_marker_at): New.
7544 (cmd_qtstmat, gdb_ust_thread): New.
7545 (gdb_ust_init): New.
7546 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7547 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7548 (ST_REGENTRY): New.
7549 (x86_64_st_collect_regmap): New.
7550 (X86_64_NUM_ST_COLLECT_GREGS): New.
7551 (AMD64_RIP_REGNUM): New.
7552 (supply_static_tracepoint_registers): New.
7553 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7554 (ST_REGENTRY): New.
7555 (i386_st_collect_regmap): New.
7556 (i386_NUM_ST_COLLECT_GREGS): New.
7557 (supply_static_tracepoint_registers): New.
7558 * server.c (handle_query): Handle qXfer:statictrace:read.
7559 <qSupported>: Report support for StaticTracepoints, and
7560 qXfer:statictrace:read features.
7561 * server.h (traceframe_read_sdata)
7562 (supply_static_tracepoint_registers): Declare.
7563 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7564 (unpack_varlen_hex): Include in IPA build.
7565 * Makefile.in (ustlibs, ustinc): New.
7566 (IPA_OBJS): Add remote-utils-ipa.o.
7567 ($(IPA_LIB)): Link -ldl and -lpthread.
7568 (UST_CFLAGS): New.
7569 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7570 * config.in, configure: Regenerate.
7571
7572 2010-06-20 Ian Lance Taylor <iant@google.com>
7573 Pedro Alves <pedro@codesourcery.com>
7574
7575 * linux-x86-low.c (always_true): Delete.
7576 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7577 trying to fool the compiler with always_true.
7578
7579 2010-06-20 Pedro Alves <pedro@codesourcery.com>
7580
7581 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7582 conditions in gdbserver.
7583
7584 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7585
7586 * spu-low.c (spu_read_memory): Wrap around local store limit.
7587 (spu_write_memory): Likewise.
7588
7589 2010-06-15 Pedro Alves <pedro@codesourcery.com>
7590
7591 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7592 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7593 LONGEST uses.
7594 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7595 uses.
7596 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7597 uses with LONGEST uses.
7598
7599 2010-06-14 Stan Shebs <stan@codesourcery.com>
7600 Pedro Alves <pedro@codesourcery.com>
7601
7602 Bytecode compiler.
7603
7604 * linux-x86-low.c: Include limits.h.
7605 (add_insns): New.
7606 (always_true): New.
7607 (EMIT_ASM): New.
7608 (EMIT_ASM32): New.
7609 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7610 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7611 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7612 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7613 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7614 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7615 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7616 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7617 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7618 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7619 (amd64_emit_void_call_2): New.
7620 (amd64_emit_ops): New.
7621 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7622 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7623 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7624 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7625 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7626 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7627 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7628 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7629 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7630 (i386_emit_stack_adjust, i386_emit_int_call_1)
7631 (i386_emit_void_call_2): New.
7632 (i386_emit_ops): New.
7633 (x86_emit_ops): New.
7634 (the_low_target): Install x86_emit_ops.
7635 * server.h (struct emit_ops): New.
7636 (get_raw_reg_func_addr): Declare.
7637 (current_insn_ptr, emit_error): Declare.
7638 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7639 (set_trace_state_variable_value): New defines.
7640 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7641 addr_get_trace_state_variable_value and
7642 addr_set_trace_state_variable_value.
7643 (symbol_list): New fields for get_raw_reg,
7644 get_trace_state_variable_value and set_trace_state_variable_value.
7645 (condfn): New typedef.
7646 (struct tracepoint): New field `compiled_cond'.
7647 (do_action_at_tracepoint): Clear compiled_cond.
7648 (get_trace_state_variable_value, set_trace_state_variable_value):
7649 Export in the IPA.
7650 (condition_true_at_tracepoint): If there's a compiled condition,
7651 run that.
7652 (current_insn_ptr, emit_error): New globals.
7653 (struct bytecode_address): New.
7654 (get_raw_reg_func_addr): New.
7655 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7656 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7657 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7658 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7659 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7660 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7661 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7662 (compile_tracepoint_condition, compile_bytecodes): New.
7663 * target.h (emit_ops): Forward declare.
7664 (struct target_ops): New field emit_ops.
7665 (target_emit_ops): New.
7666 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7667 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7668 * linux-low.c (linux_emit_ops): New.
7669 (linux_target_ops): Install it.
7670 * linux-low.h (struct linux_target_ops): New field emit_ops.
7671
7672 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7673
7674 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7675 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7676
7677 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7678 Stan Shebs <stan@codesourcery.com>
7679
7680 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7681 (all): Depend on $(extra_libraries).
7682 (install-only): Install the IPA.
7683 (IPA_OBJS, IPA_LIB): New.
7684 (clean): Remove the IPA lib.
7685 (IPAGENT_CFLAGS): New.
7686 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7687 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7688 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7689 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7690 * configure.ac: Check for atomic builtins support in the compiler.
7691 (IPA_DEPFILES, extra_libraries): Define.
7692 * configure.srv (ipa_obj): Add description.
7693 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7694 (i[34567]86-*-linux*): Set ipa_obj.
7695 (x86_64-*-linux*): Set ipa_obj.
7696 * linux-low.c (stabilizing_threads): New.
7697 (supports_fast_tracepoints): New.
7698 (linux_detach): Stabilize threads before detaching.
7699 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7700 the lwp is either not stabilizing, or is moving out of a jump pad.
7701 (linux_fast_tracepoint_collecting): New.
7702 (maybe_move_out_of_jump_pad): New.
7703 (enqueue_one_deferred_signal): New.
7704 (dequeue_one_deferred_signal): New.
7705 (linux_wait_for_event_1): If moving out of a jump pad, defer
7706 pending signals to later.
7707 (linux_stabilize_threads): New.
7708 (linux_wait_1): Check if threads need moving out of jump pads, and
7709 do it if so.
7710 (stuck_in_jump_pad_callback): New.
7711 (move_out_of_jump_pad_callback): New.
7712 (lwp_running): New.
7713 (linux_resume_one_lwp): Handle moving out of jump pads.
7714 (linux_set_resume_request): Dequeue deferred signals.
7715 (need_step_over_p): Also step over fast tracepoint jumps.
7716 (start_step_over): Also uninsert fast tracepoint jumps.
7717 (finish_step_over): Also reinsert fast tracepoint jumps.
7718 (linux_install_fast_tracepoint_jump): New.
7719 (linux_target_ops): Install linux_stabilize_threads and
7720 linux_install_fast_tracepoint_jump_pad.
7721 * linux-low.h (linux_target_ops) <get_thread_area,
7722 install_fast_tracepoint_jump_pad>: New fields.
7723 (struct lwp_info) <collecting_fast_tracepoint,
7724 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7725 (linux_get_thread_area): Declare.
7726 * linux-x86-low.c (jump_insn): New.
7727 (x86_get_thread_area): New.
7728 (append_insns): New.
7729 (push_opcode): New.
7730 (amd64_install_fast_tracepoint_jump_pad): New.
7731 (i386_install_fast_tracepoint_jump_pad): New.
7732 (x86_install_fast_tracepoint_jump_pad): New.
7733 (the_low_target): Install x86_get_thread_area and
7734 x86_install_fast_tracepoint_jump_pad.
7735 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7736 (struct fast_tracepoint_jump): New.
7737 (fast_tracepoint_jump_insn): New.
7738 (fast_tracepoint_jump_shadow): New.
7739 (find_fast_tracepoint_jump_at): New.
7740 (fast_tracepoint_jump_here): New.
7741 (delete_fast_tracepoint_jump): New.
7742 (set_fast_tracepoint_jump): New.
7743 (uninsert_fast_tracepoint_jumps_at): New.
7744 (reinsert_fast_tracepoint_jumps_at): New.
7745 (set_breakpoint_at): Use write_inferior_memory.
7746 (uninsert_raw_breakpoint): Use write_inferior_memory.
7747 (check_mem_read): Mask out fast tracepoint jumps.
7748 (check_mem_write): Mask out fast tracepoint jumps.
7749 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7750 (set_fast_tracepoint_jump): Declare.
7751 (delete_fast_tracepoint_jump)
7752 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7753 (reinsert_fast_tracepoint_jumps_at): Declare.
7754 * regcache.c: Don't compile many functions when building the
7755 in-process agent library.
7756 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7757 the register buffer in the heap.
7758 (free_register_cache): If the register buffer isn't owned by the
7759 regcache, don't free it.
7760 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7761 pre-existing register caches.
7762 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7763 type.
7764 (convert_ascii_to_int): : Constify `from' parameter type.
7765 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7766 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7767 the needed buffer in-place.
7768 (relocate_instruction): New.
7769 * server.c (handle_query) <qSymbols>: If the target supports
7770 tracepoints, give it a chance of looking up symbols. Report
7771 support for fast tracepoints.
7772 (handle_status): Stabilize threads.
7773 (process_serial_event): Adjust.
7774 * server.h (struct fast_tracepoint_jump): Forward declare.
7775 (struct process_info) <fast_tracepoint_jumps>: New field.
7776 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7777 (decode_X_packet, decode_M_packet): Adjust.
7778 (relocate_instruction): Declare.
7779 (in_process_agent_loaded): Declare.
7780 (tracepoint_look_up_symbols): Declare.
7781 (struct fast_tpoint_collect_status): Declare.
7782 (fast_tracepoint_collecting): Declare.
7783 (force_unlock_trace_buffer): Declare.
7784 (handle_tracepoint_bkpts): Declare.
7785 (initialize_low_tracepoint)
7786 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7787 * target.h (struct target_ops) <stabilize_threads,
7788 install_fast_tracepoint_jump_pad>: New fields.
7789 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7790 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7791 [HAVE_STDINT_H]: Include stdint.h.
7792 (trace_debug_1): Rename to ...
7793 (trace_vdebug): ... this.
7794 (trace_debug): Rename to ...
7795 (trace_debug_1): ... this. Add `level' parameter.
7796 (trace_debug): New.
7797 (ATTR_USED, ATTR_NOINLINE): New.
7798 (IP_AGENT_EXPORT): New.
7799 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7800 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7801 (about_to_request_buffer_space, trace_buffer_is_full)
7802 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7803 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7804 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7805 (traceframe_write_count, traceframes_created)
7806 (trace_state_variables)
7807 New renaming defines.
7808 (struct ipa_sym_addresses): New.
7809 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7810 (symbol_list): New.
7811 (ipa_sym_addrs): New.
7812 (all_tracepoint_symbols_looked_up): New.
7813 (in_process_agent_loaded): New.
7814 (write_e_ipa_not_loaded): New.
7815 (maybe_write_ipa_not_loaded): New.
7816 (tracepoint_look_up_symbols): New.
7817 (debug_threads) [IN_PROCESS_AGENT]: New.
7818 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7819 (UNKNOWN_SIDE_EFFECTS): New.
7820 (stop_tracing): New.
7821 (flush_trace_buffer): New.
7822 (stop_tracing_bkpt): New.
7823 (flush_trace_buffer_bkpt): New.
7824 (read_inferior_integer): New.
7825 (read_inferior_uinteger): New.
7826 (read_inferior_data_pointer): New.
7827 (write_inferior_data_pointer): New.
7828 (write_inferior_integer): New.
7829 (write_inferior_uinteger): New.
7830 (struct collect_static_trace_data_action): Delete.
7831 (enum tracepoint_type): New.
7832 (struct tracepoint) <type>: New field `type'.
7833 <actions_str, step_actions, step_actions_str>: Only include in
7834 GDBserver.
7835 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7836 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7837 (tracepoints): Use IP_AGENT_EXPORT.
7838 (last_tracepoint): Don't include in the IPA.
7839 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7840 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7841 (alloced_trace_state_variables): New.
7842 (trace_state_variables): Use IP_AGENT_EXPORT.
7843 (traceframe_t): Delete unused variable.
7844 (circular_trace_buffer): Don't include in the IPA.
7845 (trace_buffer_start): Delete.
7846 (struct trace_buffer_control): New.
7847 (trace_buffer_free): Delete.
7848 (struct ipa_trace_buffer_control): New.
7849 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7850 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7851 New.
7852 (trace_buffer_ctrl): New.
7853 (TRACE_BUFFER_CTRL_CURR): New.
7854 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7855 Reimplement as macros.
7856 (trace_buffer_wrap): Delete.
7857 (traceframe_write_count, traceframe_read_count)
7858 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7859 (struct tracepoint_hit_ctx) <type>: New field.
7860 (struct fast_tracepoint_ctx): New.
7861 (memory_barrier): New.
7862 (cmpxchg): New.
7863 (record_tracepoint_error): Update atomically in the IPA.
7864 (clear_inferior_trace_buffer): New.
7865 (about_to_request_buffer_space): New.
7866 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7867 updating the same buffer.
7868 (add_tracepoint): Default the tracepoint's type to trap
7869 tracepoint, and orig_size to -1.
7870 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7871 internal variables.
7872 (create_trace_state_variable): New parameter `gdb'. Handle it.
7873 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7874 (cmd_qtdp): Handle fast tracepoints.
7875 (cmd_qtdv): Adjust.
7876 (max_jump_pad_size): New.
7877 (gdb_jump_pad_head): New.
7878 (get_jump_space_head): New.
7879 (claim_jump_space): New.
7880 (sort_tracepoints): New.
7881 (MAX_JUMP_SIZE): New.
7882 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7883 IPA.
7884 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7885 support. Upload fast traceframes, and delete internal IPA
7886 breakpoints.
7887 (stop_tracing_handler): New.
7888 (flush_trace_buffer_handler): New.
7889 (cmd_qtstop): Upload fast tracepoints.
7890 (response_tracepoint): Handle fast tracepoints.
7891 (tracepoint_finished_step): Upload fast traceframes. Set the
7892 tracepoint hit context's tracepoint type.
7893 (handle_tracepoint_bkpts): New.
7894 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7895 type. Add comment about fast tracepoints.
7896 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7897 non-existing action_str field.
7898 (get_context_regcache): Handle fast tracepoints.
7899 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7900 to the regcache.
7901 (fast_tracepoint_from_jump_pad_address): New.
7902 (fast_tracepoint_from_ipa_tpoint_address): New.
7903 (collecting_t): New.
7904 (force_unlock_trace_buffer): New.
7905 (fast_tracepoint_collecting): New.
7906 (collecting): New.
7907 (gdb_collect): New.
7908 (write_inferior_data_ptr): New.
7909 (target_tp_heap): New.
7910 (target_malloc): New.
7911 (download_agent_expr): New.
7912 (UALIGN): New.
7913 (download_tracepoints): New.
7914 (download_trace_state_variables): New.
7915 (upload_fast_traceframes): New.
7916 (IPA_FIRST_TRACEFRAME): New.
7917 (IPA_NEXT_TRACEFRAME_1): New.
7918 (IPA_NEXT_TRACEFRAME): New.
7919 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7920 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7921 (gdb_jump_pad_buffer_end): New.
7922 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7923 (initialize_tracepoint): Adjust.
7924 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7925 buffer. Initialize the low module.
7926 * utils.c (PREFIX, TOOLNAME): New.
7927 (malloc_failure): Use PREFIX.
7928 (error): In the IPA, an error causes an exit.
7929 (fatal, warning): Use PREFIX.
7930 (internal_error): Use TOOLNAME.
7931 (NUMCELLS): Increase to 10.
7932 * configure, config.in: Regenerate.
7933
7934 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7935
7936 * server.c (handle_query) <qSupported>: Do two passes over the
7937 qSupported string to avoid nesting strtok.
7938
7939 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7940
7941 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7942 (CDEPS): New.
7943 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7944 -Wl,--dynamic-list.
7945 * configure: Regenerate.
7946 * proc-service.list: New.
7947
7948 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7949
7950 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7951 New comment.
7952
7953 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
7954
7955 * gdbreplay.c (remote_open): Check error return from socket() call by
7956 its equality to -1 not by it being negative.
7957 * remote-utils.c (remote_open): Likewise.
7958
7959 2010-05-23 Pedro Alves <pedro@codesourcery.com>
7960
7961 * config.h: Regenerate.
7962
7963 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7964
7965 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7966 doesn't provide PTRACE_GET_THREAD_AREA.
7967
7968 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7969
7970 * linux-m68k-low.c: Include <asm/ptrace.h>
7971 (ps_get_thread_area): Implement.
7972
7973 2010-05-03 Doug Evans <dje@google.com>
7974
7975 * event-loop.c (struct callback_event): New struct.
7976 (callback_list): New global.
7977 (append_callback_event, delete_callback_event): New functions.
7978 (process_callback): New function.
7979 (start_event_loop): Call it.
7980 * remote-utils.c (NOT_SCHEDULED): Define.
7981 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
7982 moved out of readchar.
7983 (readchar): Rewrite. Call reschedule before returning.
7984 (reset_readchar): New function.
7985 (remote_close): Call it.
7986 (process_remaining, reschedule): New functions.
7987 * server.h (callback_handler_func): New typedef.
7988 (append_callback_event, delete_callback_event): Declare.
7989
7990 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7991
7992 * proc-service.c (ps_pglobal_lookup): Use
7993 thread_db_look_up_one_symbol.
7994 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
7995 parameter. Use it instead of all_symbols_looked_up.
7996 * server.h (struct process_info) <all_symbols_looked_up>: Delete
7997 field.
7998 (all_symbols_looked_up): Don't declare.
7999 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8000 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8001 field.
8002 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8003 Set all_symbols_looked_up here.
8004 (thread_db_look_up_one_symbol): New.
8005 (thread_db_get_tls_address): Adjust.
8006 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8007 thread_db object on the heap, and tentatively set it in the
8008 process structure.
8009 (thread_db_init): Don't set all_symbols_looked_up here.
8010 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8011
8012 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8013
8014 * linux-low.c (linux_kill, linux_detach): Adjust.
8015 (status_pending_p_callback): Remove redundant statement. Check
8016 for !TARGET_WAITIKIND_IGNORE, instead of
8017 TARGET_WAITKIND_STOPPED.
8018 (handle_tracepoints): Make sure LWP is locked. Adjust.
8019 (linux_wait_for_event_1): Adjust.
8020 (linux_cancel_breakpoints): New.
8021 (unsuspend_one_lwp): New.
8022 (unsuspend_all_lwps): New.
8023 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8024 (send_sigstop_callback): Change return type to int, add new
8025 `except' parameter and handle it.
8026 (suspend_and_send_sigstop_callback): New.
8027 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8028 pass them down. If SUSPEND, also increment the lwp's suspend
8029 count.
8030 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8031 (need_step_over_p): Don't consider suspended LWPs.
8032 (start_step_over): Adjust.
8033 (proceed_one_lwp): Change return type to int, add new `except'
8034 parameter and handle it.
8035 (unsuspend_and_proceed_one_lwp): New.
8036 (proceed_all_lwps): Use find_inferior instead of
8037 for_each_inferior.
8038 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8039 also decrement the suspend count of LWPs. Pass `except' down,
8040 instead of hacking its suspend count.
8041 (linux_pause_all): Add `freeze' parameter. Adjust.
8042 (linux_unpause_all): New.
8043 (linux_target_ops): Install linux_unpause_all.
8044 * server.c (handle_status): Adjust.
8045 * target.h (struct target_ops): New fields `unpause_all' and
8046 `cancel_breakpoints'. Add new parameter to `pause_all'.
8047 (pause_all): Add new `freeze' parameter.
8048 (unpause_all): New.
8049 (cancel_breakpoints): New.
8050 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8051 cancel breakpoints.
8052 (cmd_qtstart): Pause threads.
8053 (stop_tracing): Pause threads, and cancel breakpoints.
8054 * win32-low.c (win32_target_ops): Adjust.
8055
8056 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8057
8058 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8059 the inferior right away from here...
8060 (linux_wait_1): ... to here, and adjust to check the thread's
8061 last_resume_kind instead of the lwp's step or stop_expected flags.
8062
8063 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8064
8065 * README: Use consistent `GDB' and `GDBserver' spellings.
8066
8067 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8068
8069 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8070 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8071 (linux_detach_one_lwp): Assume the lwp is stopped.
8072 (any_thread_of): Delete.
8073 (linux_detach): Stop all lwps here. Don't blindly delete all
8074 breakpoints.
8075 (delete_lwp_callback): New.
8076 (linux_mourn): Delete all lwps of the process that is gone.
8077 (linux_wait_1): Don't delete the last lwp of the process here.
8078 * mem-break.h (mark_breakpoints_out): Declare.
8079 * mem-break.c (mark_breakpoints_out): New.
8080 (free_all_breakpoints): Use it.
8081 * server.c (handle_target_event): If the process is gone, mark
8082 breakpoints out.
8083 * thread-db.c (struct thread_db) <create_bp>: New field.
8084 (thread_db_enable_reporting): Fix prototype. Store a thread event
8085 breakpoint reference in the thread_db struct.
8086 (thread_db_load_search): Clear the thread_db object.
8087 (try_thread_db_load_1): Ditto.
8088 (switch_to_process): New.
8089 (disable_thread_event_reporting): Use it.
8090 (remove_thread_event_breakpoints): New.
8091 (thread_db_detach, thread_db_mourn): Use it.
8092
8093 2010-05-01 Pedro Alves <pedro@codesourcery.com>
8094
8095 * linux-low.c (linux_enable_event_reporting): New.
8096 (linux_wait_for_event_1, handle_extended_wait): Use it.
8097
8098 2010-04-30 Pedro Alves <pedro@codesourcery.com>
8099
8100 * linux-low.c (linux_kill_one_lwp, linux_kill)
8101 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8102 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8103 SIGSTOP even if the LWP is stopped.
8104 (send_sigstop_callback): New.
8105 (stop_all_lwps): Use send_sigstop_callback instead.
8106 (linux_resume_one_thread): Adjust.
8107 (proceed_one_lwp): Still proceed an LWP that the client has
8108 requested to stop, if we haven't reported it as stopped yet. Make
8109 sure that LWPs the client want stopped, have a pending SIGSTOP.
8110
8111 2010-04-26 Doug Evans <dje@google.com>
8112
8113 * server.c (handle_general_set): Make static.
8114
8115 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8116 Print received char after testing for error/eof instead of before.
8117 (input_interrupt): Tweak comment.
8118
8119 2010-04-23 Doug Evans <dje@google.com>
8120
8121 * server.c (start_inferior): Print inferior argv if --debug.
8122
8123 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8124
8125 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8126 * nto-x86-low.c: Include server.h
8127
8128 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8129
8130 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8131 be consistent with other sources of this directory.
8132 (init_registers_amd64): Correct name of source file of this function
8133 in the comment.
8134
8135 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8136
8137 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8138 64-bit executables.
8139
8140 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8141
8142 * win32-i386-low.c: Add 64-bit support.
8143 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8144 (init_registers_amd64): Declare.
8145 (mappings): Add 64-bit version of array.
8146 (init_windows_x86): New function.
8147 (the_low_target): Change init_arch field to init_windows_x86.
8148
8149 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8150
8151 * win32-low.c: Adapt to support also 64-bit architecture.
8152 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8153 (get_image_name): Use SIZE_T type for local variable `done'.
8154 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8155 (toolhelp_get_dll_name): Idem.
8156 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8157 Use uintptr_t typecast to avoid warning.
8158 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8159 (handle_exception): Use phex_nz to avoid warning.
8160 (win32_wait): Remove unused local variable `process'.
8161
8162 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8163
8164 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8165 `amd64-avx.o'.
8166
8167 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8168
8169 * configure.ac: Use `ws2_32' library for srv_mingw.
8170 * configure: Regenerate.
8171 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8172 * remote-utils.c: Likewise.
8173
8174 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8175
8176 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8177 if __x86_64__ is defined.
8178
8179 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8180
8181 * configure: Regenerate.
8182
8183 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8184
8185 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8186 * target.h (target_ops): New get_tib_address field.
8187 * win32-low.h (win32_thread_info): Add thread_local_base field.
8188 * win32-low.c (child_add_thread): Add tlb argument.
8189 Set thread_local_base field to TLB.
8190 (get_child_debug_event): Adapt to child_add_thread change.
8191 (win32_get_tib_address): New function.
8192 (win32_target_ops): Set get_tib_address field to
8193 win32_get_tib_address.
8194 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8195
8196 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8197
8198 * linux-low.c (linux_mourn): Also remove the process.
8199 * server.c (handle_target_event): Don't remove the process here.
8200 * nto-low.c (nto_mourn): New.
8201 (nto_target_ops): Install it.
8202 * spu-low.c (spu_mourn): New.
8203 (spu_target_ops): Install it.
8204 * win32-low.c (win32_mourn): New.
8205 (win32_target_ops): Install it.
8206
8207 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8208
8209 * server.h (buffer_xml_printf): Remove redundant `;'.
8210
8211 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8212
8213 * regcache.c (set_register_cache): Invalidate regcaches before
8214 changing the register cache layout.
8215 (regcache_invalidate_one): Allow a NULL regcache.
8216 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8217 regcaches before changing the register cache layout or the target
8218 regsets.
8219
8220 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8221
8222 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8223 variable warning on Linux/x86-64.
8224
8225 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8226
8227 GDBserver disconnected tracing support.
8228
8229 * linux-low.c (linux_remove_process): Delete.
8230 (add_lwp): Don't set last_resume_kind here.
8231 (linux_kill): Use `mourn'.
8232 (linux_detach): Use `thread_db_detach', and `mourn'.
8233 (linux_mourn): New.
8234 (linux_attach_lwp_1): Adjust comment.
8235 (linux_attach): last_resume_kind moved the thread_info; adjust.
8236 (status_pending_p_callback): Adjust.
8237 (linux_wait_for_event_1): Adjust.
8238 (count_events_callback, select_singlestep_lwp_callback)
8239 (select_event_lwp_callback, cancel_breakpoints_callback)
8240 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8241 (proceed_one_lwp): Adjust.
8242 (linux_async): Add debug output.
8243 (linux_thread_stopped): New.
8244 (linux_pause_all): New.
8245 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8246 linux_pause_all.
8247 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8248 (thread_db_free): Delete declaration.
8249 (thread_db_detach, thread_db_mourn): Declare.
8250 * thread-db.c (thread_db_init): Use thread_db_mourn.
8251 (thread_db_free): Delete, split in two.
8252 (disable_thread_event_reporting): New.
8253 (thread_db_detach): New.
8254 (thread_db_mourn): New.
8255
8256 * server.h (struct thread_info) <last_resume_kind>: New field.
8257 <attached>: Add comment.
8258 <gdb_detached>: New field.
8259 (handler_func): Change return type to int.
8260 (handle_serial_event, handle_target_event): Ditto.
8261 (gdb_connected): Declare.
8262 (tracing): Delete.
8263 (disconnected_tracing): Declare.
8264 (stop_tracing): Declare.
8265
8266 * server.c (handle_query) <qSupported>: Report support for
8267 disconnected tracing.
8268 (queue_stop_reply_callback): Account for running threads.
8269 (gdb_wants_thread_stopped): New.
8270 (gdb_wants_all_threads_stopped): New.
8271 (gdb_reattached_process): New.
8272 (handle_status): Clear the `gdb_detached' flag of all processes.
8273 In all-stop, stop all threads.
8274 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8275 (process_serial_event): If the remote connection breaks, or if an
8276 exit was forced with "monitor exit", force an event loop exit.
8277 Handle disconnected tracing on detach.
8278 (handle_serial_event): Adjust.
8279 (handle_target_event): If GDB isn't connected, forward events back
8280 to the inferior, unless the last process exited, in which case,
8281 exit gdbserver. Adjust interface.
8282
8283 * remote-utils.c (remote_open): Don't block in accept. Instead
8284 register an event loop source on the listen socket file
8285 descriptor. Refactor bits into ...
8286 (listen_desc): ... this new global.
8287 (gdb_connected): ... this new function.
8288 (enable_async_notification): ... this new function.
8289 (handle_accept_event): ... this new function.
8290 (remote_close): Clear remote_desc.
8291
8292 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8293
8294 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8295 New fields.
8296 (mourn_inferior): Define.
8297 (target_process_qsupported): Avoid the dangling else problem.
8298 (thread_stopped): Define.
8299 (pause_all): Define.
8300 (target_waitstatus_to_string): Declare.
8301 * target.c (target_waitstatus_to_string): New.
8302
8303 * tracepoint.c (tracing): Make extern.
8304 (disconnected_tracing): New.
8305 (stop_tracing): Make extern. Handle tracing stops due to GDB
8306 disconnecting.
8307 (cmd_qtdisconnected): New.
8308 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8309 (handle_tracepoint_general_set): Handle QTDisconnected.
8310
8311 * event-loop.c (event_handler_func): Change return type to int.
8312 (process_event): Bail out if the event handler wants the event
8313 loop to stop.
8314 (handle_file_event): Ditto.
8315 (start_event_loop): Bail out if the event handler wants the event
8316 loop to stop.
8317
8318 * nto-low.c (nto_target_ops): Adjust.
8319 * spu-low.c (spu_wait): Don't remove the process here.
8320 (spu_target_ops): Adjust.
8321 * win32-low.c (win32_wait): Don't remove the process here.
8322 (win32_target_ops): Adjust.
8323
8324 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8325
8326 * regcache.c (realloc_register_cache): Invalidate inferior's
8327 regcache before recreating it.
8328
8329 2010-04-09 Pedro Alves <pedro@codesourcery.com>
8330
8331 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8332
8333 2010-04-09 Stan Shebs <stan@codesourcery.com>
8334 Pedro Alves <pedro@codesourcery.com>
8335
8336 * server.h (LONGEST): New.
8337 (struct thread_info) <while_stepping>: New field.
8338 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8339 Declare.
8340 (initialize_tracepoint, handle_tracepoint_general_set)
8341 (handle_tracepoint_query, tracepoint_finished_step)
8342 (tracepoint_was_hit, release_while_stepping_state_list):
8343 (current_traceframe): Declare.
8344 * server.c (handle_general_set): Handle tracepoint packets.
8345 (read_memory): New.
8346 (write_memory): New.
8347 (handle_search_memory_1): Use read_memory.
8348 (handle_query): Report support for conditional tracepoints, trace
8349 state variables, and tracepoint sources. Handle tracepoint
8350 queries.
8351 (main): Initialize the tracepoints module.
8352 (process_serial_event): Handle traceframe reads/writes.
8353
8354 * linux-low.c (handle_tracepoints): New.
8355 (linux_wait_1): Call it.
8356 (linux_resume_one_lwp): Handle while-stepping.
8357 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8358 (linux_target_ops): Install them.
8359 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8360 New field.
8361 * linux-x86-low.c (x86_supports_tracepoints): New.
8362 (the_low_target). Install it.
8363
8364 * mem-break.h (delete_breakpoint): Declare.
8365 * mem-break.c (delete_breakpoint): Make external.
8366
8367 * target.h (struct target_ops): Add `supports_tracepoints',
8368 `read_pc', and `write_pc' fields.
8369 (target_supports_tracepoints): Define.
8370 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8371 (phex_nz): New.
8372
8373 * regcache.h (struct regcache) <registers_owned>: New field.
8374 (init_register_cache, regcache_cpy): Declare.
8375 (regcache_read_pc, regcache_write_pc): Declare.
8376 (register_cache_size): Declare.
8377 (supply_regblock): Declare.
8378 * regcache.c (init_register_cache): New.
8379 (new_register_cache): Use it.
8380 (regcache_cpy): New.
8381 (register_cache_size): New.
8382 (supply_regblock): New.
8383 (regcache_read_pc, regcache_write_pc): New.
8384
8385 * tracepoint.c: New.
8386
8387 * Makefile.in (OBS): Add tracepoint.o.
8388 (tracepoint.o): New rule.
8389
8390 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8391
8392 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8393 (i386-mmx.o): New.
8394 (i386-mmx.c): Likewise.
8395 (i386-mmx-linux.o): Likewise.
8396 (i386-mmx-linux.c): Likewise.
8397
8398 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8399 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8400 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8401 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8402
8403 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8404 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8405 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8406
8407 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8408
8409 * Makefile.in (clean): Updated.
8410 (i386-avx.o): New.
8411 (i386-avx.c): Likewise.
8412 (i386-avx-linux.o): Likewise.
8413 (i386-avx-linux.c): Likewise.
8414 (amd64-avx.o): Likewise.
8415 (amd64-avx.c): Likewise.
8416 (amd64-avx-linux.o): Likewise.
8417 (amd64-avx-linux.c): Likewise.
8418
8419 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8420 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8421 (srv_amd64_regobj): Add amd64-avx.o.
8422 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8423 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8424 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8425 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8426 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8427 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8428 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8429
8430 * i387-fp.c: Include "i386-xstate.h".
8431 (i387_xsave): New.
8432 (i387_cache_to_xsave): Likewise.
8433 (i387_xsave_to_cache): Likewise.
8434 (x86_xcr0): Likewise.
8435
8436 * i387-fp.h (i387_cache_to_xsave): Likewise.
8437 (i387_xsave_to_cache): Likewise.
8438 (x86_xcr0): Likewise.
8439
8440 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8441 * linux-crisv32-low.c (target_regsets): Likewise.
8442 * linux-m68k-low.c (target_regsets): Likewise.
8443 * linux-mips-low.c (target_regsets): Likewise.
8444 * linux-ppc-low.c (target_regsets): Likewise.
8445 * linux-s390-low.c (target_regsets): Likewise.
8446 * linux-sh-low.c (target_regsets): Likewise.
8447 * linux-sparc-low.c (target_regsets): Likewise.
8448 * linux-xtensa-low.c (target_regsets): Likewise.
8449
8450 * linux-low.c: Include <sys/uio.h>.
8451 (regsets_fetch_inferior_registers): Support nt_type.
8452 (regsets_store_inferior_registers): Likewise.
8453 (linux_process_qsupported): New.
8454 (linux_target_ops): Add linux_process_qsupported.
8455
8456 * linux-low.h (regset_info): Add nt_type.
8457 (linux_target_ops): Add process_qsupported.
8458
8459 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8460 and <sys/uio.h>.
8461 (init_registers_i386_avx_linux): New.
8462 (init_registers_amd64_avx_linux): Likewise.
8463 (xmltarget_i386_linux_no_xml): Likewise.
8464 (xmltarget_amd64_linux_no_xml): Likewise.
8465 (PTRACE_GETREGSET): Likewise.
8466 (PTRACE_SETREGSET): Likewise.
8467 (x86_fill_xstateregset): Likewise.
8468 (x86_store_xstateregset): Likewise.
8469 (use_xml): Likewise.
8470 (x86_linux_update_xmltarget): Likewise.
8471 (x86_linux_process_qsupported): Likewise.
8472 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8473 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8474 init_registers_i386_linux here. Call
8475 x86_linux_update_xmltarget.
8476 (the_low_target): Add x86_linux_process_qsupported.
8477
8478 * server.c (handle_query): Call target_process_qsupported.
8479
8480 * target.h (target_ops): Add process_qsupported.
8481 (target_process_qsupported): New.
8482
8483 2010-04-03 Pedro Alves <pedro@codesourcery.com>
8484
8485 * inferiors.c (add_thread): Set last_status kind to
8486 TARGET_WAITKIND_IGNORE.
8487 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8488 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8489 (linux_wait_1): Move `thread' local definition to block that uses
8490 it. Don't NULL initialize `event_child'.
8491 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8492 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8493 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8494
8495 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8496
8497 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8498 an extended waitstatus, or by a watchpoint.
8499 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8500 thread was stepping or has been stopped by a watchpoint.
8501
8502 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8503
8504 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8505 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8506 of another, then delete the previous, and validate all
8507 breakpoints.
8508 (validate_inserted_breakpoint): New.
8509 (delete_disabled_breakpoints): New.
8510 (validate_breakpoints): New.
8511 (check_mem_read): Validate breakpoints before trusting their
8512 shadow. Delete disabled breakpoints.
8513 (check_mem_write): Validate breakpoints before trusting they
8514 should be inserted. Delete disabled breakpoints.
8515 * mem-break.h (validate_breakpoints):
8516 * server.c (handle_query): Validate breakpoints when we see a
8517 qSymbol query.
8518
8519 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8520
8521 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8522 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8523 if we could tell there's a GDB breakpoint at stop_pc.
8524 (need_step_over_p): Don't do a step over if we find a GDB
8525 breakpoint at the resume PC.
8526
8527 * mem-break.c (struct raw_breakpoint): New.
8528 (enum bkpt_type): New type `gdb_breakpoint'.
8529 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8530 fields. New field `raw'.
8531 (find_raw_breakpoint_at): New.
8532 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8533 breakpoint instead.
8534 (set_breakpoint_at): Adjust.
8535 (delete_raw_breakpoint): New.
8536 (release_breakpoint): New.
8537 (delete_breakpoint): Rename to...
8538 (delete_breakpoint_1): ... this. Add proc parameter. Use
8539 release_breakpoint. Return ENOENT.
8540 (delete_breakpoint): Reimplement.
8541 (find_breakpoint_at): Delete.
8542 (find_gdb_breakpoint_at): New.
8543 (delete_breakpoint_at): Delete.
8544 (set_gdb_breakpoint_at): New.
8545 (delete_gdb_breakpoint_at): New.
8546 (gdb_breakpoint_here): New.
8547 (set_reinsert_breakpoint): Use release_breakpoint.
8548 (uninsert_breakpoint): Rename to ...
8549 (uninsert_raw_breakpoint): ... this.
8550 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8551 (reinsert_raw_breakpoint): Change parameter type to
8552 raw_breakpoint.
8553 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8554 instead.
8555 (check_breakpoints): Adjust. Use release_breakpoint.
8556 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8557 (breakpoint_inserted_here): Ditto.
8558 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8559 Don't trust the breakpoint's shadow if it is not inserted.
8560 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8561 (delete_all_breakpoints): Adjust.
8562 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8563 use delete_breakpoint_1.
8564
8565 * mem-break.h (breakpoints_supported): Delete declaration.
8566 (set_gdb_breakpoint_at): Declare.
8567 (gdb_breakpoint_here): Declare.
8568 (delete_breakpoint_at): Delete.
8569 (delete_gdb_breakpoint_at): Declare.
8570
8571 * server.h (struct raw_breakpoint): Forward declare.
8572 (struct process_info): New field `raw_breakpoints'.
8573
8574 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8575 breakpoints.
8576
8577 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8578
8579 * linux-low.c (status_pending_p_callback): Fix comment.
8580 (linux_wait_for_event_1): Move most of the internal breakpoint
8581 handling from here...
8582 (linux_wait_1): ... to here.
8583 (count_events_callback): New.
8584 (select_singlestep_lwp_callback): New.
8585 (select_event_lwp_callback): New.
8586 (cancel_breakpoints_callback): New.
8587 (select_event_lwp): New.
8588 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8589 priority to all LWPs that have had events that should be reported
8590 to the client. Cancel breakpoints when about to reporting the
8591 event to the client, not while stopping lwps. No longer cancel
8592 finished single-steps here.
8593 (cancel_finished_single_step): Delete.
8594 (cancel_finished_single_steps): Delete.
8595
8596 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8597
8598 * mem-break.c (enum bkpt_type): New.
8599 (struct breakpoint): New field `type'.
8600 (set_breakpoint_at): Change return type to struct breakpoint
8601 pointer. Set type to `other_breakpoint' by default.
8602 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8603 in the breakpoint list.
8604 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8605 (reinsert_breakpoint): Rename to ...
8606 (reinsert_raw_breakpoint): ... this.
8607 (reinsert_breakpoints_at): Adjust.
8608 * mem-break.h (struct breakpoint): Declare.
8609 (set_breakpoint_at): Change return type to struct breakpoint
8610 pointer.
8611
8612 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8613
8614 * server.c (handle_query): Assign, not compare.
8615
8616 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8617
8618 Teach linux gdbserver to step-over-breakpoints.
8619
8620 * linux-low.c (can_hardware_single_step): New.
8621 (supports_breakpoints): New.
8622 (handle_extended_wait): If stopping threads, read the stop pc of
8623 the new cloned LWP.
8624 (get_pc): New.
8625 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8626 low target doesn't support retrieving the PC.
8627 (add_lwp): Set last_resume_kind to resume_continue.
8628 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8629 (linux_attach): Don't clear stop_expected. Set the lwp's
8630 last_resume_kind to resume_stop.
8631 (linux_detach_one_lwp): Don't check for removed breakpoints.
8632 (check_removed_breakpoint): Delete.
8633 (status_pending_p): Rename to ...
8634 (status_pending_p_callback): ... this. Don't check for removed
8635 breakpoints. Don't consider threads that are stopped from GDB's
8636 perspective.
8637 (linux_wait_for_lwp): Always read the stop_pc here.
8638 (cancel_breakpoint): New.
8639 (step_over_bkpt): New global.
8640 (linux_wait_for_event_1): Implement stepping over breakpoints.
8641 (gdb_wants_lwp_stopped): New.
8642 (gdb_wants_all_stopped): New.
8643 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8644 single-step traps here. Store the thread's last reported target
8645 wait status.
8646 (send_sigstop): Don't clear stop_expected. Always set it,
8647 instead.
8648 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8649 (cancel_finished_single_step): New.
8650 (cancel_finished_single_steps): New.
8651 (wait_for_sigstop): Don't cancel finished single-step traps here.
8652 (linux_resume_one_lwp): Don't check for removed breakpoints.
8653 Don't set `step' on non-hardware step archs.
8654 (linux_set_resume_request): Ignore resume_stop requests if already
8655 stopping or stopped. Set the lwp's last_resume_kind.
8656 (resume_status_pending_p): Don't check for removed breakpoints.
8657 (need_step_over_p): New.
8658 (start_step_over): New.
8659 (finish_step_over): New.
8660 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8661 requests. Clear the thread's last reported target waitstatus.
8662 Don't use the `suspended' flag. Don't consider pending breakpoints.
8663 (linux_resume): Start a step-over if necessary.
8664 (proceed_one_lwp): New.
8665 (proceed_all_lwps): New.
8666 (unstop_all_lwps): New.
8667 * linux-low.h (struct lwp_info): Rewrite comment for the
8668 `suspended' flag. Add the `stop_pc' field. Delete the
8669 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8670 Add `'last_resume_kind' and `need_step_over' fields.
8671 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8672 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8673 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8674 (set_raw_breakpoint_at): New.
8675 (set_breakpoint_at): Rewrite to use it.
8676 (reinsert_breakpoint_handler): Delete.
8677 (set_reinsert_breakpoint): New.
8678 (reinsert_breakpoint_by_bp): Delete.
8679 (delete_reinsert_breakpoints): New.
8680 (uninsert_breakpoint): Rewrite.
8681 (uninsert_breakpoints_at): New.
8682 (reinsert_breakpoint): Rewrite.
8683 (reinsert_breakpoints_at): New.
8684 (check_breakpoints): Rewrite.
8685 (breakpoint_here): New.
8686 (breakpoint_inserted_here): New.
8687 (check_mem_read): Adjust.
8688 * mem-break.h (breakpoints_supported, breakpoint_here)
8689 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8690 (reinsert_breakpoint_by_bp): Delete declaration.
8691 (delete_reinsert_breakpoints): Declare.
8692 (reinsert_breakpoint): Delete declaration.
8693 (reinsert_breakpoints_at): Declare.
8694 (uninsert_breakpoint): Delete declaration.
8695 (uninsert_breakpoints_at): Declare.
8696 (check_breakpoints): Adjust prototype.
8697 * server.h: Adjust include order.
8698 (struct thread_info): Declare here. Add a `last_status' field.
8699
8700 2010-03-23 Michael Snyder <msnyder@vmware.com>
8701
8702 * server.c (crc32): New function.
8703 (handle_query): Add handling for 'qCRC:' request.
8704
8705 2010-03-23 Pedro Alves <pedro@codesourcery.com>
8706
8707 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8708 lwp had been stopped by a watchpoint.
8709
8710 2010-03-16 Pedro Alves <pedro@codesourcery.com>
8711
8712 * server.h (internal_error): Declare.
8713 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8714 * utils.c (internal_error): New function.
8715
8716 2010-03-15 Andreas Schwab <schwab@redhat.com>
8717
8718 * configure.srv: Fix typo setting srv_regobj.
8719
8720 2010-03-15 Pedro Alves <pedro@codesourcery.com>
8721
8722 * linux-low.c (fetch_register): Avoid passing a non string literal
8723 format to `error'.
8724 (usr_store_inferior_registers): Ditto.
8725
8726 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8727
8728 * linux-low.c (linux_write_memory): Bail out early if peeking
8729 memory failed.
8730
8731 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8732
8733 * linux-low.h (struct lwp_info): New fields
8734 `stopped_by_watchpoint' and `stopped_data_address'.
8735 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8736 here, and cache them in the lwp object.
8737 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8738 directly.
8739 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8740 field.
8741 (linux_stopped_by_watchpoint): Rewrite.
8742 (linux_stopped_data_address): Rewrite.
8743
8744 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
8745
8746 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8747 switching the current inferior, not before.
8748
8749 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8750
8751 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8752 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8753 i386-linux.c and amd64-linux.c.
8754 (reg-i386.o): Removed.
8755 (reg-i386.c): Likewise.
8756 (reg-i386-linux.o): Likewise.
8757 (reg-i386-linux.c): Likewise.
8758 (reg-x86-64.o): Likewise.
8759 (reg-x86-64.c): Likewise.
8760 (reg-x86-64-linux.o): Likewise.
8761 (reg-x86-64-linux.c): Likewise.
8762 (i386.o): New.
8763 (i386.c): Likewise.
8764 (i386-linux.o): Likewise.
8765 (i386-linux.c): Likewise.
8766 (amd64.o): Likewise.
8767 (amd64.c): Likewise.
8768 (amd64-linux.o): Likewise.
8769 (amd64-linux.c): Likewise.
8770
8771 * configure.srv (srv_i386_regobj): New.
8772 (srv_i386_linux_regobj): Likewise.
8773 (srv_amd64_regobj): Likewise.
8774 (srv_amd64_linux_regobj): Likewise.
8775 (srv_i386_32bit_xmlfiles): Likewise.
8776 (srv_i386_64bit_xmlfiles): Likewise.
8777 (srv_i386_xmlfiles): Likewise.
8778 (srv_amd64_xmlfiles): Likewise.
8779 (srv_i386_linux_xmlfiles): Likewise.
8780 (srv_amd64_linux_xmlfiles): Likewise.
8781 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8782 srv_xmlfiles to $srv_i386_xmlfiles.
8783 (i[34567]86-*-mingw32ce*): Likewise.
8784 (i[34567]86-*-mingw*): Likewise.
8785 (i[34567]86-*-nto*): Likewise.
8786 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8787 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8788 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8789 (x86_64-*-linux*): Likewise.
8790
8791 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8792 (init_registers_amd64_linux): New.
8793 (x86_arch_setup): Replace init_registers_x86_64_linux with
8794 init_registers_amd64_linux.
8795
8796 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8797
8798 * configure.ac: Check for libdl. If it is not available link against
8799 static libthread_db.
8800 * configure: Regenerate.
8801
8802 2010-02-22 Pedro Alves <pedro@codesourcery.com>
8803
8804 PR9605
8805
8806 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8807 handing a read watchpoint.
8808 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8809
8810 2010-02-12 Doug Evans <dje@google.com>
8811
8812 * linux-low.c (linux_supports_tracefork_flag): Document.
8813 (linux_look_up_symbols): Add comment.
8814
8815 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8816
8817 * regcache.c (supply_register): Clear regcache if buf is NULL.
8818
8819 2010-02-02 Nicolas Roche <roche@sourceware.org>
8820 Joel Brobecker <brobecker@adacore.com>
8821
8822 * inferiors.c (find_inferior): Add function documentation.
8823 (unloaded_dll): Handle the case where the unloaded dll has not
8824 been previously registered in the dll list.
8825
8826 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8827
8828 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8829 (thumb2_breakpoint): New.
8830 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8831
8832 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8833
8834 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8835 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8836 breakpoints.
8837
8838 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8839
8840 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8841
8842 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8843
8844 * linux-s390-low.c (s390_collect_ptrace_register)
8845 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8846
8847 2010-01-21 Doug Evans <dje@google.com>
8848
8849 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8850 (PTRACE_ARG4_TYPE): New macro.
8851 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8852 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8853 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8854 (usr_store_inferior_registers): Ditto.
8855 (linux_read_memory, linux_write_memory): Ditto.
8856 (linux_test_for_tracefork): Ditto.
8857
8858 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8859 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8860
8861 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8862
8863 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8864 target.
8865
8866 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8867
8868 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8869 prototype to take a regcache. Adjust.
8870
8871 2010-01-20 Pedro Alves <pedro@codesourcery.com>
8872
8873 * regcache.h (struct thread_info): Forward declare.
8874 (struct regcache): New.
8875 (new_register_cache): Adjust prototype.
8876 (get_thread_regcache): Declare.
8877 (free_register_cache): Adjust prototype.
8878 (registers_to_string, registers_from_string): Ditto.
8879 (supply_register, supply_register_by_name, collect_register)
8880 (collect_register_as_string, collect_register_by_name): Ditto.
8881 * regcache.c (struct inferior_regcache_data): Delete.
8882 (get_regcache): Rename to ...
8883 (get_thread_regcache): ... this. Adjust. Switch inferior before
8884 fetching registers.
8885 (regcache_invalidate_one): Adjust.
8886 (regcache_invalidate): Fix prototype.
8887 (new_register_cache): Return the new register cache.
8888 (free_register_cache): Change prototype.
8889 (realloc_register_cache): Adjust.
8890 (registers_to_string): Change prototype to take a regcache. Adjust.
8891 (registers_from_string): Ditto.
8892 (register_data): Ditto.
8893 (supply_register): Ditto.
8894 (supply_register_by_name): Ditto.
8895 (collect_register): Ditto.
8896 (collect_register_as_string): Ditto.
8897 (collect_register_by_name): Ditto.
8898 * server.c (process_serial_event): Adjust.
8899 * linux-low.h (regset_fill_func, regset_store_func): Change
8900 prototype.
8901 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8902 Change prototype.
8903 * linux-low.c (get_stop_pc): Adjust.
8904 (check_removed_breakpoint): Adjust.
8905 (linux_wait_for_event): Adjust.
8906 (linux_resume_one_lwp): Adjust.
8907 (fetch_register): Add regcache parameter. Adjust.
8908 (usr_store_inferior_registers): Ditto.
8909 (regsets_fetch_inferior_registers): Ditto.
8910 (regsets_store_inferior_registers): Ditto.
8911 (linux_fetch_registers, linux_store_registers): Ditto.
8912 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8913 regcache. Adjust.
8914 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8915 Ditto.
8916 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8917 prototype to take a regcache.
8918 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8919 * remote-utils.c (convert_ascii_to_int, outreg)
8920 (prepare_resume_reply): Change prototype to take a regcache.
8921 Adjust.
8922 * target.h (struct target_ops) <fetch_registers, store_registers>:
8923 Change prototype to take a regcache.
8924 (fetch_inferior_registers, store_inferior_registers): Change
8925 prototype to take a regcache. Adjust.
8926 * proc-service.c (ps_lgetregs): Adjust.
8927 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8928 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8929 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8930 take a regcache. Adjust.
8931 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8932 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8933 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8934 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8935 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8936 (cris_cannot_fetch_register):
8937 (cris_breakpoint_at): Change prototype to take a regcache.
8938 Adjust.
8939 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8940 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8941 to take a regcache. Adjust.
8942 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8943 Adjust.
8944 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8945 take a regcache. Adjust.
8946 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8947 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8948 (m68k_set_pc): Change prototype to take a regcache. Adjust.
8949 * linux-mips-low.c (mips_get_pc):
8950 (mips_set_pc): Change prototype to take a regcache. Adjust.
8951 (mips_reinsert_addr): Adjust.
8952 (mips_collect_register): Change prototype to take a regcache.
8953 Adjust.
8954 (mips_supply_register):
8955 (mips_collect_register_32bit, mips_supply_register_32bit)
8956 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8957 (mips_store_fpregset): Ditto.
8958 * linux-ppc-low.c (ppc_supply_ptrace_register)
8959 (ppc_supply_ptrace_register): Ditto.
8960 (parse_spufs_run): Adjust.
8961 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8962 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8963 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8964 take a regcache. Adjust.
8965 * linux-s390-low.c (s390_collect_ptrace_register)
8966 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8967 (s390_set_pc): Change prototype to take a regcache. Adjust.
8968 (s390_arch_setup): Adjust.
8969 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8970 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
8971 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8972 (sparc_fill_gregset, sparc_store_gregset_from_stack)
8973 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8974 regcache. Adjust.
8975 (sparc_breakpoint_at): Adjust.
8976 * linux-xtensa-low.c (xtensa_fill_gregset):
8977 (xtensa_store_gregset):
8978 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
8979 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
8980 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
8981 prototype to take a regcache. Adjust.
8982 * win32-arm-low.c (arm_fetch_inferior_register)
8983 (arm_store_inferior_register): Change prototype to take a
8984 regcache. Adjust.
8985 * win32-i386-low.c (i386_fetch_inferior_register)
8986 (i386_store_inferior_register): Change prototype to take a
8987 regcache. Adjust.
8988 * win32-low.c (child_fetch_inferior_registers)
8989 (child_store_inferior_registers): Change prototype to take a
8990 regcache. Adjust.
8991 (win32_wait): Adjust.
8992 (win32_fetch_inferior_registers): Change prototype to take a
8993 regcache. Adjust.
8994 (win32_store_inferior_registers): Adjust.
8995 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
8996 store_inferior_register>: Change prototype to take a regcache.
8997
8998 2010-01-20 Doug Evans <dje@google.com>
8999
9000 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9001 #ifdef.
9002 (linux_wait_for_event1, linux_init_signals): Ditto.
9003 (W_STOPCODE): Provide definition if missing.
9004
9005 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9006
9007 * linux-low.c (linux_core_of_thread): New.
9008 (compare_ints, show_process, list_threads): New.
9009 (linux_qxfer_osdata): Report threads and cores.
9010 (linux_target_op): Register linux_core_of_thread.
9011 * remote-utils.c (prepare_resume_reply): Report the core.
9012 (buffer_xml_printf): Support %d specifier.
9013 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9014 New.
9015 (handle_query): Handle qXfer:threads. Announce availability
9016 thereof.
9017 * target.h (struct target_ops): New field core_of_thread.
9018
9019 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9020
9021 * Makefile.in (clean): Remove new generated files.
9022 (reg-s390.o, reg-s390.c): Remove rules.
9023 (reg-s390x.o, reg-s390x.c): Likewise.
9024 (s390-linux32.o, s390-linux32.c): Add rules.
9025 (s390-linux64.o, s390-linux64.c): Likewise.
9026 (s390x-linux64.o, s390x-linux64.c): Likewise.
9027 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9028 * linux-s390-low.c: Include <elf.h>.
9029 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9030 (init_registers_s390): Remove prototype.
9031 (init_registers_s390x): Likewise.
9032 (init_registers_s390_linux32): Add prototype.
9033 (init_registers_s390_linux64): Likewise.
9034 (init_registers_s390x_linux64): Likewise.
9035 (s390_num_regs_3264): New define.
9036 (s390_regmap_3264): New global variable.
9037 (s390_cannot_fetch_register): Remove obsolete check.
9038 (s390_cannot_store_register): Likewise.
9039 (s390_collect_ptrace_register): Handle upper/lower register halves.
9040 (s390_supply_ptrace_register): Likewise.
9041 (s390_fill_gregset): Update to register number changes.
9042 (s390_get_hwcap): New routine.
9043 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9044 Install appropriate regmap and register set.
9045
9046 2010-01-01 Joel Brobecker <brobecker@adacore.com>
9047
9048 * server.c (gdbserver_version): Update copyright year to 2010.
9049 * gdbreplay.c (gdbreplay_version): Likewise.
9050
9051 2009-12-28 Doug Evans <dje@google.com>
9052
9053 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9054 elf/external.h. Include <elf.h> instead but only if necessary.
9055
9056 2009-12-28 Pedro Alves <pedro@codesourcery.com>
9057
9058 * linux-low.c (linux_remove_process): Remove `detaching'
9059 parameter. Don't release/detach from thread_db here.
9060 (linux_kill): Release/detach from thread_db here, ...
9061 (linux_detach): ... and here, before actually detaching.
9062 (linux_wait_1): ... and here, when a process exits.
9063 * thread-db.c (any_thread_of): New.
9064 (thread_db_free): Switch the current inferior to a thread of the
9065 passed in process.
9066
9067 2009-12-21 Doug Evans <dje@google.com>
9068
9069 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9070
9071 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9072 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9073 warning ifndef __NR_tkill. Move setting of errno there too.
9074 Delete unnecessary resetting of errno after syscall.
9075 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9076
9077 * configure.ac: Check for dladdr.
9078 * config.in: Regenerate.
9079 * configure: Regenerate.
9080 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9081 (try_thread_db_load): Update.
9082
9083 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9084
9085 2009-12-18 Doug Evans <dje@google.com>
9086
9087 * event-loop.c: Include unistd.h if it exists.
9088
9089 * linux-low.c (my_waitpid): Move definition away from being in
9090 between linux_tracefork_child/linux_test_for_tracefork.
9091
9092 * gdb_proc_service.h (psaddr_t): Fix type.
9093 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9094 signature to match glibc.
9095
9096 2009-12-16 Doug Evans <dje@google.com>
9097
9098 * linux-low.c (linux_read_memory): Fix argument to read.
9099
9100 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9101
9102 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9103 events, don't leave current_inferior pointing at null.
9104
9105 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9106
9107 * win32-low.c (LOG): Delete.
9108 (OUTMSG): Output to stderr.
9109 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9110 on compile time LOG macro.
9111 (win32_wait): Fix debug output.
9112
9113 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9114
9115 * win32-low.c (win32_add_one_solib): If the dll name is
9116 "ntdll.dll", prepend the system directory to the dll path.
9117
9118 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9119
9120 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9121
9122 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
9123 Vladimir Prus <vladimir@codesourcery.com>
9124
9125 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9126 * configure.ac: Check for __mcoldfire__ and set
9127 gdb_cv_m68k_is_coldfire.
9128 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9129 reg-cf.o and reg-m68k.o.
9130 * configure: Regenerated.
9131
9132 2009-11-16 Pedro Alves <pedro@codesourcery.com>
9133
9134 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9135 Pass it to thread_db_free.
9136 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9137 proper `detaching' argument to linux_remove_process.
9138 * linux-low.h (thread_db_free): Add `detaching' parameter.
9139 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9140 to thread_db_free.
9141 (thread_db_free): Add `detaching' parameter. Only
9142 call td_ta_clear_event if detaching from process.
9143
9144 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9145
9146 * thread-db.c (thread_db_free): Fix typo.
9147
9148 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9149
9150 PR gdb/10838
9151 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9152
9153 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9154
9155 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9156 with an i686 compiler.
9157 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9158 needed.
9159 * configure: Rebuilt.
9160
9161 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9162
9163 PR gdb/10783
9164
9165 * server.c (handle_search_memory_1): Correct read_addr initialization
9166 in loop for searching subsequent chunks.
9167
9168 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9169
9170 * configure.ac: New --with-libthread-db option.
9171 * thread-db.c: Allow direct dependence on libthread_db.
9172 (thread_db_free): Adjust.
9173 * config.in: Regenerate.
9174 * configure: Likewise.
9175
9176 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9177
9178 PR gdb/10757
9179 * thread-db.c (attach_thread): New function.
9180 (maybe_attach_thread): Return success/failure.
9181 (find_new_threads_callback): Adjust.
9182 (thread_db_find_new_threads): Loop until no new threads.
9183
9184 2009-10-13 Pedro Alves <pedro@codesourcery.com>
9185
9186 * proc-service.c (ps_lgetregs): Formatting.
9187
9188 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9189
9190 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9191 * configure.ac: Adjust.
9192 * linux-low.h (struct process_info_private): Move members to struct
9193 thread_db.
9194 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9195 * linux-low.c (linux_remove_process): Adjust.
9196 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9197 * server.c (handle_query): Move code ...
9198 (handle_monitor_command): ... here. New function.
9199 * target.h (struct target_ops): New member.
9200 * thread-db.c (struct thread_db): New.
9201 (libthread_db_search_path): New variable.
9202 (thread_db_create_event, thread_db_enable_reporting)
9203 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9204 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9205 (try_thread_db_load_1, dladdr_to_soname): New functions.
9206 (try_thread_db_load, thread_db_load_search): New functions.
9207 (thread_db_init): Search for libthread_db.
9208 (thread_db_free): New function.
9209 (thread_db_handle_monitor_command): Likewise.
9210 * config.in: Regenerate.
9211 * configure: Regenerate.
9212
9213 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9214
9215 * spu-low.c (spu_kill): Wait for inferior to terminate.
9216 Call clear_inferiors.
9217 (spu_detach): Call clear_inferiors.
9218
9219 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9220
9221 * aclocal.m4: Regenerate.
9222 * config.in: Likewise.
9223 * configure: Likewise.
9224
9225 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9226
9227 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9228 (parse_spufs_run): New function.
9229 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9230 (ppc_breakpoint_at): Handle SPU breakpoints.
9231
9232 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9233
9234 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9235 (SPUFS_MAGIC): Define.
9236 (spu_enumerate_spu_ids): New function.
9237 (linux_qxfer_spu): New function.
9238 (linux_target_ops): Install linux_qxfer_spu.
9239
9240 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9241
9242 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9243 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9244 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9245 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9246 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9247 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9248 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9249 (init_registers_powerpc_cell32l): Add prototype.
9250 (init_registers_powerpc_cell64l): Likewise.
9251 (ppc_arch_setup): Detect Cell/B.E. architecture.
9252
9253 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9254
9255 * Makefile.in (datarootdir): New variable.
9256
9257 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9258
9259 * linux-low.c (linux_write_memory): Update debugging output.
9260 * Makefile.in (clean): Add new descriptions.
9261 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9262 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9263 * configure.srv: Add new files for arm*-*-linux*.
9264 * linux-arm-low.c: Add new declarations.
9265 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9266 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9267 (HWCAP_VFPv3D16): New.
9268 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9269 instead of __IWMMXT__.
9270 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9271 (arm_arch_setup): New.
9272 (target_regsets): Remove #ifdef. Add VFP regset.
9273 (the_low_target): Use arm_arch_setup.
9274
9275 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9276
9277 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9278 the main thread again.
9279
9280 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9281
9282 Adding Neutrino gdbserver.
9283 * configure: Regenerated.
9284 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9285 * configure.srv (i[34567]86-*-nto*): New target.
9286 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9287 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9288 (nto_comctrl) [__QNX__]: New function.
9289 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9290
9291 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
9292
9293 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9294 srv_tgtobj.
9295
9296 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9297 Pedro Alves <pedro@codesourcery.com>
9298
9299 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9300 don't support CONTEXT_EXTENDED_REGISTERS.
9301 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9302 (the_low_target): Install them.
9303 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9304 failing with ERROR_PIPE_NOT_CONNECTED.
9305
9306 2009-06-30 Doug Evans <dje@google.com>
9307 Pierre Muller <muller@ics.u-strasbg.fr>
9308
9309 Add h/w watchpoint support to x86-linux, win32-i386.
9310 * Makefile.in (SFILES): Add i386-low.c
9311 (i386_low_h): Define.
9312 (i386-low.o): Add dependencies.
9313 (linux-x86-low.o): Add i386-low.h dependency.
9314 (win32-i386-low.o): Ditto.
9315 * i386-low.c: New file.
9316 * i386-low.h: New file.
9317 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9318 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9319 * linux-low.c (linux_add_process): Initialize arch_private.
9320 (linux_remove_process): Free arch_private.
9321 (add_lwp): Initialize arch_private.
9322 (delete_lwp): Free arch_private.
9323 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9324 provided.
9325 * linux-low.h (process_info_private): New member arch_private.
9326 (lwp_info): New member arch_private.
9327 (linux_target_ops): New members new_process, new_thread,
9328 prepare_to_resume.
9329 (ptid_of): New macro.
9330 * linux-x86-low.c: Include stddef.h, i386-low.h.
9331 (arch_process_info): New struct.
9332 (arch_lwp_info): New struct.
9333 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9334 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9335 (i386_dr_low_get_status): New function.
9336 (x86_insert_point, x86_remove_point): New functions.
9337 (x86_stopped_by_watchpoint): New function.
9338 (x86_stopped_data_address): New function.
9339 (x86_linux_new_process, x86_linux_new_thread): New functions.
9340 (x86_linux_prepare_to_resume): New function.
9341 (the_low_target): Add entries for insert_point, remove_point,
9342 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9343 prepare_to_resume.
9344 * server.c (debug_hw_points): New global.
9345 (monitor_show_help): Document set debug-hw-points.
9346 (handle_query): Process "set debug-hw-points".
9347 * server.h (debug_hw_points): Declare.
9348 (paddress): Declare.
9349 * utils.c (NUMCELLS, CELLSIZE): New macros.
9350 (get_sell, xsnprintf, paddress): New functions.
9351 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9352 remove_point, stopped_by_watchpoint, stopped_data_address.
9353 * win32-i386-low.c: Include i386-low.h.
9354 (debug_reg_state): Replaces dr.
9355 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9356 (i386_dr_low_get_status): New function.
9357 (i386_insert_point, i386_remove_point): New functions.
9358 (i386_stopped_by_watchpoint): New function.
9359 (i386_stopped_data_address): New function.
9360 (i386_initial_stuff): Update.
9361 (get_thread_context,set_thread_context,i386_thread_added): Update.
9362 (the_low_target): Add entries for insert_point,
9363 remove_point, stopped_by_watchpoint, stopped_data_address.
9364 * win32-low.c (win32_insert_watchpoint): New function.
9365 (win32_remove_watchpoint): New function.
9366 (win32_stopped_by_watchpoint): New function.
9367 (win32_stopped_data_address): New function.
9368 (win32_target_ops): Add entries for insert_watchpoint,
9369 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9370 * win32-low.h (win32_target_ops): New members insert_point,
9371 remove_point, stopped_by_watchpoint, stopped_data_address.
9372
9373 2009-06-25 Pedro Alves <pedro@codesourcery.com>
9374
9375 * server.c (process_serial_event): Re-return unsupported, not
9376 error, if the type isn't recognized. Re-allow supporting only
9377 insert or remove packets. Also call require_running for
9378 breakpoints. Add missing break statement to default case. Tidy.
9379 * target.h (struct target_ops): Rename insert_watchpoint to
9380 insert_point, and remove_watchpoint to remove_point.
9381
9382 * linux-low.h (struct linux_target_ops): Likewise.
9383 * linux-low.c (linux_insert_watchpoint): Rename to ...
9384 (linux_insert_point): ... this. Adjust.
9385 (linux_remove_watchpoint): Rename to ...
9386 (linux_remove_point): ... this. Adjust.
9387 (linux_target_ops): Adjust.
9388 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9389 (cris_insert_point): ... this.
9390 (cris_remove_watchpoint): Rename to ...
9391 (cris_remove_point): ... this.
9392 (the_low_target): Adjust.
9393
9394 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9395
9396 * server.c (handle_v_kill): Pass signal_pid to
9397 kill_inferior if multi_process is zero.
9398
9399 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9400
9401 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9402 * target.h (target_ops): Comment for *_watchpoint to make it clear
9403 the functions can get types '0' and '1'.
9404
9405 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9406
9407 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9408 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9409 * regcache.c (get_regcache): Likewise.
9410 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9411 * win32-low.c (child_fetch_inferior_registers): Remove check for
9412 regno 0.
9413
9414 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9415 Pedro Alves <pedro@codesourcery.com>
9416
9417 * target.h (struct target_ops) <supports_multi_process>: New
9418 callback.
9419 (target_supports_multi_process): New.
9420 * server.c (handle_query): Even if GDB reports support, only
9421 enable multi-process if the target also supports it. Report
9422 multi-process support only if the target backend supports it.
9423 * linux-low.c (linux_supports_multi_process): New function.
9424 (linux_target_ops): Install it as target_supports_multi_process
9425 callback.
9426
9427 2009-05-24 Doug Evans <dje@google.com>
9428
9429 Global renaming of find_thread_pid to find_thread_ptid.
9430 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9431 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9432 All callers updated.
9433
9434 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9435 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9436 directly.
9437
9438 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9439 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9440 (linux_resume_one_lwp): Ditto.
9441
9442 2009-05-23 Doug Evans <dje@google.com>
9443
9444 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9445 from struct inferior_list_entry * to struct lwp_info *.
9446 All callers updated.
9447
9448 2009-05-13 Doug Evans <dje@google.com>
9449
9450 * linux-x86-low.c: Don't include assert.h.
9451 (x86_siginfo_fixup): Use fatal, not assert.
9452 (x86_arch_setup): Fix comment.
9453
9454 2009-05-12 Doug Evans <dje@google.com>
9455
9456 Biarch support for i386/amd64 gdbserver.
9457 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9458 Add linux-x86-low.c.
9459 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9460 (linux-x86-low.o): Add.
9461 * linux-x86-64-low.c: Delete.
9462 * linux-i386-low.c: Delete.
9463 * linux-x86-low.c: New file.
9464 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9465 linux-x86-low.o.
9466 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9467 linux-x86-low.o.
9468 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9469 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9470 (linux_child_pid_to_exec_file): New function.
9471 (elf_64_header_p, elf_64_file_p): New functions.
9472 (siginfo_fixup): New function.
9473 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9474 give target a chance to convert layout.
9475 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9476 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9477
9478 2009-05-07 Doug Evans <dje@google.com>
9479
9480 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9481 (regsets_store_inferior_registers): Ditto.
9482
9483 2009-05-06 Pedro Alves <pedro@codesourcery.com>
9484
9485 PR server/10048
9486
9487 * linux-low.c (must_set_ptrace_flags): Delete.
9488 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9489 of the global.
9490 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9491 `lwp->must_set_ptrace_flags' instead.
9492 (linux_wait_for_event_1): Set ptrace options here.
9493 (linux_wait_1): ... not here.
9494
9495 2009-04-30 Doug Evans <dje@google.com>
9496
9497 * inferiors.c (started_inferior_callback): New function.
9498 (attached_inferior_callback): New function.
9499 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9500 * server.c (print_started_pid, print_attached_pid): New functions.
9501 (detach_or_kill_for_exit): New function.
9502 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9503 * server.h (have_started_inferiors_p): Declare.
9504 (have_attached_inferiors_p): Declare.
9505
9506 * inferiors.c (remove_process): Fix memory leak, free process.
9507 * linux-low.c (linux_remove_process): New function.
9508 (linux_kill): Call it instead of remove_process.
9509 (linux_detach, linux_wait_1): Ditto.
9510
9511 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9512
9513 * configure.srv: Add x86 Windows CE target.
9514
9515 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9516
9517 * inferiors.c (get_thread_process): Make global.
9518 * server.h (get_thread_process): Add prototype.
9519 * thread-db.c (find_one_thread): Use get_thread_process
9520 instead of current_process.
9521 (thread_db_get_tls_address): Do not crash if called when
9522 thread layer is not yet initialized.
9523
9524 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9525
9526 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9527 * spu-low.c (current_tid): Rename to ...
9528 (current_ptid): ... this.
9529 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9530 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9531 ptid_get_lwp (current_ptid) instead of current_tid.
9532 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9533 instead of current_tid. Use find_process_pid to verify pid
9534 argument is valid. Pass proper argument to remove_process.
9535 (spu_thread_alive): Compare current_ptid instead of current_tid.
9536 (spu_resume): Likewise.
9537
9538 2009-04-02 Pedro Alves <pedro@codesourcery.com>
9539
9540 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9541 variable.
9542
9543 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9544
9545 Implement the multiprocess extensions, and add linux multiprocess
9546 support.
9547
9548 * server.h (ULONGEST): Declare.
9549 (struct ptid, ptid_t): New.
9550 (minus_one_ptid, null_ptid): Declare.
9551 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9552 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9553 (struct inferior_list_entry): Change `id' type from unsigned from
9554 to ptid_t.
9555 (struct sym_cache, struct breakpoint, struct
9556 process_info_private): Forward declare.
9557 (struct process_info): Declare.
9558 (current_process): Declare.
9559 (all_processes): Declare.
9560 (initialize_inferiors): Declare.
9561 (add_thread): Adjust to use ptid_t.
9562 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9563 (add_process, remove_process, find_thread_pid): Declare.
9564 (find_inferior_id): Adjust to use ptid_t.
9565 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9566 (multi_process): Declare.
9567 (push_event): Adjust to use ptid_t.
9568 (read_ptid, write_ptid): Declare.
9569 (prepare_resume_reply): Adjust to use ptid_t.
9570 (clear_symbol_cache): Declare.
9571 * inferiors.c (all_processes): New.
9572 (null_ptid, minus_one_ptid): New.
9573 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9574 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9575 (add_thread): Change unsigned long to ptid. Remove gdb_id
9576 parameter. Adjust.
9577 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9578 (gdb_id_to_thread): Rename to ...
9579 (find_thread_pid): ... this. Change unsigned long to ptid.
9580 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9581 (loaded_dll, pull_pid_from_list): Adjust.
9582 (add_process, remove_process, find_process_pid)
9583 (get_thread_process, current_process, initialize_inferiors): New.
9584 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9585 (struct target_waitstatus) <related_pid>: Ditto.
9586 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9587 return type to int.
9588 (struct target_ops) <join>: Add `pid' argument.
9589 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9590 (struct target_ops) <wait>: Add `ptid' field. Change return type
9591 to ptid.
9592 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9593 (mywait): Add `ptid' argument. Change return type to ptid_t.
9594 (target_pid_to_str): Declare.
9595 * target.c (set_desired_inferior): Adjust to use ptids.
9596 (mywait): Add new `ptid' argument. Adjust.
9597 (target_pid_to_str): New.
9598 * mem-break.h (free_all_breakpoints): Declare.
9599 * mem-break.c (breakpoints): Delelete.
9600 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9601 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9602 to use per-process breakpoint list.
9603 (free_all_breakpoints): New.
9604 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9605 (symbol_cache, all_symbols_looked_up): Delete.
9606 (hexchars): New.
9607 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9608 read_ptid): New.
9609 (prepare_resume_reply): Change ptid argument's type from unsigned
9610 long to ptid_t. Adjust. Implement W;process and X;process.
9611 (free_sym_cache, clear_symbol_cache): New.
9612 (look_up_one_symbol): Adjust to per-process symbol cache. *
9613 * server.c (cont_thread, general_thread, step_thread): Change type
9614 to ptid_t.
9615 (attached): Delete.
9616 (multi_process): New.
9617 (last_ptid): Change type to ptid_t.
9618 (struct vstop_notif) <ptid>: Change type to ptid_t.
9619 (queue_stop_reply, push_event): Change `ptid' argument's type to
9620 ptid_t.
9621 (discard_queued_stop_replies): Add `pid' argument.
9622 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9623 changes. Don't reference the `attached' global.
9624 (attach_inferior): Adjust to mywait interface changes.
9625 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9626 features. Handle and report "multiprocess+". Handle
9627 "qAttached:PID".
9628 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9629 changes.
9630 (handle_v_kill): New.
9631 (handle_v_stopped): Adjust to use target_pid_to_str.
9632 (handle_v_requests): Allow multiple attaches and runs when
9633 multiprocess extensions are in effect. Handle "vKill".
9634 (myresume): Adjust to use ptids.
9635 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9636 (handle_status): Adjust to discard_queued_stop_replies interface
9637 change.
9638 (first_thread_of, kill_inferior_callback)
9639 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9640 (main): Call initialize_inferiors. Adjust to use ptids, killing
9641 and detaching from all inferiors. Handle multiprocess packet
9642 variants.
9643 * linux-low.h: Include gdb_proc_service.h.
9644 (struct process_info_private): New.
9645 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9646 <lwpid_of>: Use ptid_get_lwp.
9647 (get_lwp_thread): Adjust.
9648 (struct lwp_info): Add `dead' member.
9649 (find_lwp_pid): Declare.
9650 * linux-low.c (thread_db_active): Delete.
9651 (new_inferior): Adjust comment.
9652 (inferior_pid): Delete.
9653 (linux_add_process): New.
9654 (handle_extended_wait): Adjust.
9655 (add_lwp): Change unsigned long to ptid.
9656 (linux_create_inferior): Add process to processes table. Adjust
9657 to use ptids. Don't set new_inferior here.
9658 (linux_attach_lwp): Rename to ...
9659 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9660 it. Adjust to use ptids.
9661 (linux_attach_lwp): New.
9662 (linux_attach): Add process to processes table. Don't set
9663 new_inferior here.
9664 (struct counter): New.
9665 (second_thread_of_pid_p, last_thread_of_process_p): New.
9666 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9667 multiple processes.
9668 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9669 processes. Remove process from process table.
9670 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9671 to multiple processes.
9672 (any_thread_of): New.
9673 (linux_detach): Add `pid' argument, and handle it. Remove process
9674 from processes table.
9675 (linux_join): Add `pid' argument. Handle it.
9676 (linux_thread_alive): Change unsighed long argument to ptid_t.
9677 Consider dead lwps as not being alive.
9678 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9679 threads we're not interested in.
9680 (same_lwp, find_lwp_pid): New.
9681 (linux_wait_for_lwp): Change `pid' argument's type from int to
9682 ptid_t. Adjust.
9683 (linux_wait_for_event): Rename to ...
9684 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9685 from int to ptid_t. Adjust.
9686 (linux_wait_for_event): New.
9687 (linux_wait_1): Add `ptid' argument. Change return type to
9688 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9689 that exit from the process table.
9690 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9691 Adjust.
9692 (mark_lwp_dead): New.
9693 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9694 stopping all threads, mark its main lwp as dead.
9695 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9696 ptids.
9697 (fetch_register, usr_store_inferior_registers)
9698 (regsets_fetch_inferior_registers)
9699 (regsets_store_inferior_registers, linux_read_memory)
9700 (linux_write_memory): Inline `inferior_pid'.
9701 (linux_look_up_symbols): Adjust to use per-process
9702 `thread_db_active'.
9703 (linux_request_interrupt): Adjust to use ptids.
9704 (linux_read_auxv): Inline `inferior_pid'.
9705 (initialize_low): Don't reference thread_db_active.
9706 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9707 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9708 (ps_getpid): Return the pid of the current inferior.
9709 * thread-db.c (proc_handle, thread_agent): Delete.
9710 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9711 per-process data.
9712 (find_one_thread): Change argument type to ptid_t. Adjust to
9713 per-process data.
9714 (maybe_attach_thread): Adjust to per-process data and ptids.
9715 (thread_db_find_new_threads): Ditto.
9716 (thread_db_init): Ditto.
9717 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9718 processes table. Adjust to use ptids.
9719 (spu_kill, spu_detach): Adjust interface. Remove process from
9720 processes table.
9721 (spu_join, spu_thread_alive): Adjust interface.
9722 (spu_wait): Adjust interface. Remove process from processes
9723 table. Adjust to use ptids.
9724 * win32-low.c (current_inferior_tid): Delete.
9725 (current_inferior_ptid): New.
9726 (debug_event_ptid): New.
9727 (thread_rec): Take a ptid. Adjust.
9728 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9729 (child_delete_thread): Ditto.
9730 (do_initial_child_stuff): Add `attached' argument. Add process to
9731 processes table.
9732 (child_fetch_inferior_registers, child_store_inferior_registers):
9733 Adjust.
9734 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9735 (win32_attach): Pass 1 to do_initial_child_stuff.
9736 (win32_kill): Adjust interface. Remove process from processes
9737 table.
9738 (win32_detach): Ditto.
9739 (win32_join): Adjust interface.
9740 (win32_thread_alive): Take a ptid.
9741 (win32_resume): Adjust to use ptids.
9742 (get_child_debug_event): Ditto.
9743 (win32_wait): Adjust interface. Remove exiting process from
9744 processes table.
9745
9746 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9747
9748 Non-stop mode support.
9749
9750 * server.h (non_stop): Declare.
9751 (gdb_client_data, handler_func): Declare.
9752 (delete_file_handler, add_file_handler, start_event_loop):
9753 Declare.
9754 (handle_serial_event, handle_target_event, push_event)
9755 (putpkt_notif): Declare.
9756 * target.h (enum resume_kind): New.
9757 (struct thread_resume): Replace `step' field by `kind' field.
9758 (TARGET_WNOHANG): Define.
9759 (struct target_ops) <wait>: Add `options' argument.
9760 <supports_non_stop, async, start_non_stop>: New fields.
9761 (target_supports_non_stop, target_async): New.
9762 (start_non_stop): Declare.
9763 (mywait): Add `options' argument.
9764 * target.c (mywait): Add `options' argument. Print child exit
9765 notifications here.
9766 (start_non_stop): New.
9767 * server.c (non_stop, own_buf, mem_buf): New globals.
9768 (struct vstop_notif): New.
9769 (notif_queue): New global.
9770 (queue_stop_reply, push_event, discard_queued_stop_replies)
9771 (send_next_stop_reply): New.
9772 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9773 interface changes.
9774 (attach_inferior): In non-stop mode, don't wait for the target
9775 here.
9776 (handle_general_set): Handle QNonStop.
9777 (handle_query): When handling qC, return the current general
9778 thread, instead of the first thread of the list.
9779 (handle_query): If the backend supports non-stop mode, include
9780 QNonStop+ in the qSupported query response.
9781 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9782 and non-stop mode.
9783 (handle_v_attach, handle_v_run): Handle non-stop mode.
9784 (handle_v_stopped): New.
9785 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9786 (myresume): Adjust to use resume_kind. Handle non-stop.
9787 (queue_stop_reply_callback): New.
9788 (handle_status): Handle non-stop mode.
9789 (main): Clear non_stop flag on reconnection. Use the event-loop.
9790 Refactor serial protocol handling from here ...
9791 (process_serial_event): ... to this new function. When GDB
9792 selects any thread, select one here. In non-stop mode, wait until
9793 GDB acks all pending events before exiting.
9794 (handle_serial_event, handle_target_event): New.
9795 * remote-utils.c (remote_open): Install remote_desc in the event
9796 loop.
9797 (remote_close): Remove remote_desc from the event loop.
9798 (putpkt_binary): Rename to...
9799 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9800 (putpkt_binary): New as wrapper around putpkt_binary_1.
9801 (putpkt_notif): New.
9802 (prepare_resume_reply): In non-stop mode, don't change the
9803 general_thread.
9804 * event-loop.c: New.
9805 * Makefile.in (OBJ): Add event-loop.o.
9806 (event-loop.o): New rule.
9807
9808 * linux-low.h (pid_of): Moved here.
9809 (lwpid_of): New.
9810 (get_lwp_thread): Use lwpid_of.
9811 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9812 * linux-low.c (pid_of): Delete.
9813 (inferior_pid): Use lwpid_of.
9814 (linux_event_pipe): New.
9815 (target_is_async_p): New.
9816 (delete_lwp): New.
9817 (handle_extended_wait): Use lwpid_of.
9818 (add_lwp): Don't set lwpid field.
9819 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9820 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9821 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9822 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9823 first. Adjust to linux_wait_for_event interface changes. Use
9824 lwpid_of.
9825 (linux_detach): Don't delete the main lwp here.
9826 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9827 (status_pending_p): Don't consider explicitly suspended lwps.
9828 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9829 pointer. Add OPTIONS argument. Change return type to int. Use
9830 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9831 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9832 pointer. Add status pointer argument. Return a pid instead of a
9833 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9834 changes. In non-stop mode, don't switch to a random thread.
9835 (linux_wait): Rename to...
9836 (linux_wait_1): ... this. Add target_options argument, and handle
9837 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9838 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9839 clean exit and signal exit code. Don't stop all threads in
9840 non-stop mode. In all-stop mode, only stop all threads when
9841 reporting a stop to GDB. Handle explicit thread stop requests.
9842 (async_file_flush, async_file_mark): New.
9843 (linux_wait): New.
9844 (send_sigstop): Use lwpid_of.
9845 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9846 interface changes. In non-stop mode, don't switch to a random
9847 thread.
9848 (linux_resume_one_lwp): Use lwpid_of.
9849 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9850 (linux_resume_one_thread): ... this. Handle resume_stop. In
9851 non-stop mode, don't look for pending flag in all threads.
9852 (resume_status_pending_p): Don't consider explicitly suspended
9853 threads.
9854 (my_waitpid): Reimplement. Emulate __WALL.
9855 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9856 Use lwpid_of.
9857 (sigchld_handler, linux_supports_non_stop, linux_async)
9858 (linux_start_non_stop): New.
9859 (linux_target_ops): Register linux_supports_non_stop, linux_async
9860 and linux_start_non_stop.
9861 (initialize_low): Install SIGCHLD handler.
9862 * thread-db.c (thread_db_create_event, find_one_thread)
9863 (thread_db_get_tls_address): Use lwpid_of.
9864 * win32-low.c (win32_detach): Adjust to use resume_kind.
9865 (win32_wait): Add `options' argument.
9866 * spu-low.c (spu_resume): Adjust to use resume_kind.
9867 (spu_wait): Add `options' argument.
9868
9869 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9870
9871 Decouple target code from remote protocol.
9872
9873 * target.h (enum target_waitkind): New.
9874 (struct target_waitstatus): New.
9875 (struct target_ops) <wait>: Return an unsigned long. Take a
9876 target_waitstatus pointer instead of a char pointer.
9877 (mywait): Likewise.
9878 * target.c (mywait): Change prototype to return an unsigned long.
9879 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9880 * server.h (thread_from_wait, old_thread_from_wait): Delete
9881 declarations.
9882 (prepare_resume_reply): Change prototype to take a
9883 target_waitstatus.
9884 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9885 (last_status, last_ptid): New.
9886 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9887 pid instead of a signal.
9888 (attach_inferior): Remove "status" and "signal" parameters.
9889 Adjust.
9890 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9891 not as an address.
9892 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9893 (handle_v_requests, myresume): Remove "status" and "signal"
9894 parameters. Adjust.
9895 (handle_status): New.
9896 (main): Delete local `status'. Adjust.
9897 * remote-utils.c: Include target.h.
9898 (prepare_resume_reply): Change prototype to take a
9899 target_waitstatus. Adjust.
9900
9901 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9902 interface.
9903 * spu-low.c (spu_wait): Adjust.
9904 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9905 Delete.
9906 (win32_wait): Adjust.
9907
9908 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9909
9910 * target.h (struct thread_resume): Delete leave_stopped member.
9911 (struct target_ops): Add a `n' argument to the `resume' callback.
9912 * server.c (start_inferior): Adjust.
9913 (handle_v_cont, myresume): Adjust.
9914 * linux-low.c (check_removed_breakpoint): Adjust to resume
9915 interface change, and to removed leave_stopped field.
9916 (resume_ptr): Delete.
9917 (struct thread_resume_array): New.
9918 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9919 resume interface change.
9920 (linux_continue_one_thread, linux_queue_one_thread)
9921 (resume_status_pending_p): Check if the resume field is NULL
9922 instead of checking the leave_stopped member.
9923 (linux_resume): Adjust to the target resume interface change.
9924 * spu-low.c (spu_resume): Adjust to the target resume interface
9925 change.
9926 * win32-low.c (win32_detach, win32_resume): Ditto.
9927
9928 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9929
9930 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9931 flag.
9932 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9933 pending.
9934 (linux_continue_one_thread): Only preserve the stepping flag if
9935 there's a pending breakpoint.
9936
9937 2009-03-31 Pedro Alves <pedro@codesourcery.com>
9938
9939 * server.c (main): After the inferior having exited, call
9940 remote_close before exiting gdbserver.
9941
9942 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9943
9944 Fix size of FPSCR in Power 7 processors.
9945 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9946 (PPC_FEATURE_HAS_DFP): New #define.
9947 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9948 size of the FPSCR.
9949
9950 2009-03-23 Pedro Alves <pedro@codesourcery.com>
9951
9952 * server.c (handle_query) Whitespace and formatting.
9953
9954 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9955
9956 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9957 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9958 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9959 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9960 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9961 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9962 Makefile.in, configure.ac: Fix whitespace throughout.
9963 * configure: Regenerate.
9964
9965 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9966
9967 * inferiors.c (find_inferior): Make it safe for the callback
9968 function to delete the currently iterated inferior.
9969
9970 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9971
9972 * Makefile.in (linuw_low_h): Move higher.
9973 (thread-db.o): Depend on $(linux_low_h).
9974
9975 2009-03-17 Pedro Alves <pedro@codesourcery.com>
9976
9977 Rename "process" to "lwp" throughout.
9978
9979 * linux-low.c (all_processes): Rename to...
9980 (all_lwps): ... this.
9981 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
9982 (add_process): Rename to ...
9983 (add_lwp): ... this. Adjust.
9984 (linux_create_inferior): Adjust.
9985 (linux_attach_lwp): Adjust.
9986 (linux_attach): Adjust.
9987 (linux_kill_one_process): Rename to ...
9988 (linux_kill_one_lwp): ... this. Adjust.
9989 (linux_kill): Adjust.
9990 (linux_detach_one_process): Rename to ...
9991 (linux_detach_one_lwp): ... this. Adjust.
9992 (linux_detach): Adjust.
9993 (check_removed_breakpoint): Adjust.
9994 (status_pending_p): Adjust.
9995 (linux_wait_for_process): Rename to ...
9996 (linux_wait_for_lwp): ... this. Adjust.
9997 (linux_wait_for_event): Adjust.
9998 (send_sigstop): Adjust.
9999 (wait_for_sigstop): Adjust.
10000 (stop_all_processes): Rename to ...
10001 (stop_all_lwps): ... this.
10002 (linux_resume_one_process): Rename to ...
10003 (linux_resume_one_lwp): ... this. Adjust.
10004 (linux_set_resume_request, linux_continue_one_thread)
10005 (linux_queue_one_thread, resume_status_pending_p)
10006 (usr_store_inferior_registers, regsets_store_inferior_registers)
10007 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10008 Adjust.
10009 * linux-low.h (get_process): Rename to ...
10010 (get_lwp): ... this. Adjust.
10011 (get_thread_process): Rename to ...
10012 (get_thread_lwp): ... this. Adjust.
10013 (get_process_thread): Rename to ...
10014 (get_lwp_thread): ... this. Adjust.
10015 (struct process_info): Rename to ...
10016 (struct lwp_info): ... this.
10017 (all_processes): Rename to ...
10018 (all_lwps): ... this.
10019 * proc-service.c (ps_lgetregs): Adjust.
10020 * thread-db.c (thread_db_create_event, find_one_thread)
10021 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10022
10023 2009-03-14 Pedro Alves <pedro@codesourcery.com>
10024
10025 * server.c (handle_query): Handle "qAttached".
10026
10027 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10028
10029 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10030 GPLv3, update license URL.
10031
10032 2009-03-01 Doug Evans <dje@google.com>
10033
10034 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
10035 (server_h): Add gdb_signals.h.
10036 (signals.o): Update.
10037 * server.h (target_signal_from_host,target_signal_to_host_p)
10038 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10039
10040 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10041
10042 * remote-utils.c (getpkt): Also generate remote-debug
10043 information if noack_mode is set.
10044
10045 2009-02-06 Pedro Alves <pedro@codesourcery.com>
10046
10047 * server.c (handle_query): Report qXfer:siginfo:read and
10048 qXfer:siginfo:write as supported and handle them.
10049 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10050 * linux-low.c (linux_xfer_siginfo): New.
10051 (linux_target_ops): Set it.
10052
10053 2009-01-26 Pedro Alves <pedro@codesourcery.com>
10054
10055 * server.c (gdbserver_usage): Mention --remote-debug.
10056 (main): Accept '--remote-debug' switch.
10057
10058 2009-01-18 Doug Evans <dje@google.com>
10059
10060 * regcache.c (new_register_cache): No need to check result of xcalloc.
10061 * server.c (handle_search_memory): Back out calls to xmalloc,
10062 result is checked and error is returned to user upon failure.
10063 (handle_query): Ditto. Add more checks for result of malloc.
10064 (handle_v_cont): Check result of malloc, report error back to
10065 user upon failure.
10066 (handle_v_run): Ditto. Call freeargv.
10067 * server.h (freeargv): Declare.
10068 * utils.c (freeargv): New fn.
10069
10070 2009-01-15 Doug Evans <dje@google.com>
10071
10072 * gdbreplay.c (perror_with_name): Make arg const char *.
10073 * server.h (target_signal_to_name): Make return type const char *.
10074 * thread-db.c (thread_db_err_str): Make return type const char *.
10075 * utils.c (perror_with_name): Make arg const char *.
10076
10077 2009-01-14 Pedro Alves <pedro@codesourcery.com>
10078
10079 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10080 when handling a EXIT_PROCESS_DEBUG_EVENT.
10081
10082 2009-01-06 Joel Brobecker <brobecker@adacore.com>
10083
10084 * gdbreplay.c (gdbreplay_version): Update copyright year.
10085 * server.c (gdbserver_version): Likewise.
10086
10087 2009-01-05 Doug Evans <dje@google.com>
10088
10089 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
10090 (handle_extended_wait): Improve comment.
10091
10092 2008-12-13 Doug Evans <dje@google.com>
10093
10094 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10095 * server.h (ATTR_MALLOC): New macro.
10096 (xmalloc,xcalloc,xstrdup): Declare.
10097 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10098 * inferiors.c: Ditto.
10099 * linux-low.c: Ditto.
10100 * mem-break.c: Ditto.
10101 * regcache.c: Ditto.
10102 * remote-utils.c: Ditto.
10103 * server.c: Ditto.
10104 * target.c: Ditto.
10105 * win32-low.c: Ditto.
10106
10107 2008-12-12 Doug Evans <dje@google.com>
10108
10109 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10110 in debugging printf.
10111
10112 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10113
10114 2008-12-09 Doug Evans <dje@google.com>
10115
10116 * linux-low.h (struct process_info): Delete member tid, unused.
10117 * thread-db.c (find_one_thread): Update.
10118 (maybe_attach_thread): Update.
10119
10120 2008-12-02 Pedro Alves <pedro@codesourcery.com>
10121
10122 * target.h (struct target_ops): Add qxfer_osdata member.
10123 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10124 and dirent.h.
10125 (linux_qxfer_osdata): New functions.
10126 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10127 callback.
10128 * server.c (handle_query): Handle "qXfer:osdata:read:".
10129 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10130 (buffer_xml_printf): New functions.
10131 * server.h (struct buffer): New.
10132 (buffer_grow_str, buffer_grow_str0): New macros.
10133 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10134 (buffer_xml_printf): Declare.
10135
10136 2008-11-24 Doug Evans <dje@google.com>
10137
10138 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10139
10140 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10141
10142 * server.c (handle_v_run): Always use the supplied argument list.
10143
10144 2008-11-19 Bob Wilson <bob.wilson@acm.org>
10145
10146 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10147 (xtensa_regmap_table): Add entry for scompare1.
10148
10149 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10150
10151 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10152 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10153 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10154 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10155 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10156 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10157 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10158 XML target descriptions.
10159 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10160 when inferior is running on an ISA 2.05 or later processor. Add
10161 special case to return offset for full 64-bit slot of FPSCR when
10162 in 32-bits.
10163
10164 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10165
10166 * Makefile.in (SFILES, clean): Added sparc64 files.
10167 (reg-sparc64.o, reg-sparc64.c): New.
10168 * configure.srv (sparc*-*-linux*): New configuration.
10169 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10170 syscall arguments for SPARC.
10171 (regsets_store_inferior_registers): Likewise.
10172 * linux-sparc-low.c: New file.
10173
10174 2008-10-21 Doug Evans <dje@google.com>
10175
10176 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10177 (READLINE_DIR,READLINE_DEP): Delete.
10178 (INTERNAL_CFLAGS): Update.
10179 (LINTFLAGS): Update.
10180
10181 2008-10-10 Pedro Alves <pedro@codesourcery.com>
10182
10183 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10184 whole argv from the last run, not just argv[0].
10185
10186 2008-09-08 Pedro Alves <pedro@codesourcery.com>
10187
10188 * regcache.c (new_register_cache): Return NULL if the register
10189 cache size isn't known yet.
10190 (free_register_cache): Avoid dereferencing a NULL regcache.
10191
10192 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10193
10194 * configure.srv: Merge MIPS and MIPS64.
10195
10196 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10197
10198 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10199
10200 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
10201
10202 * Makefile.in: Add required vsx dependencies.
10203
10204 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10205 Declare init_registers_powerpc_vsx32l.
10206 Declare init_registers_powerpc_vsx64l.
10207 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10208 (ppc_arch_setup): Check for VSX in hwcap.
10209 (ppc_fill_vsxregset): New function.
10210 (ppc_store_vsxregset): New function.
10211 Add new VSX entry in regset_info target_regsets.
10212
10213 * configure.srv: Add new VSX dependencies.
10214
10215 2008-08-12 Pedro Alves <pedro@codesourcery.com>
10216
10217 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10218 (remote_open): Set or clear transport_is_reliable.
10219 (putpkt_binary): Don't expect acks in noack mode.
10220 (getpkt): Don't send ack/nac in noack mode.
10221 * server.c (handle_general_set): Handle QStartNoAckMode.
10222 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10223 qSupported.
10224 (main): Reset noack_mode on every connection.
10225 * server.h (noack_mode): Declare.
10226
10227 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10228
10229 * Makefile.in (GDBREPLAY_OBS): New variable.
10230 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10231
10232 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10233 Daniel Jacobowitz <dan@codesourcery.com>
10234
10235 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10236 (usr_store_inferior_registers): Likewise.
10237 (regsets_store_inferior_registers): Likewise.
10238
10239 2008-07-31 Rolf Jansen <rj@surtec.com>
10240 Pedro Alves <pedro@codesourcery.com>
10241
10242 * configure.ac: Check for memmem declaration.
10243 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10244 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10245 (disable_packet_qfThreadInfo): Unconditionally compile.
10246 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10247 * configure, config.in: Regenerate.
10248
10249 2008-07-28 Doug Kwan <dougkwan@google.com>
10250
10251 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10252 (linux_write_memory): Remove declaration of errno.
10253
10254 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10255
10256 * linux-low.c (handle_extended_wait): Do not use "status"
10257 variable uninitialized.
10258
10259 2008-07-07 Pedro Alves <pedro@codesourcery.com>
10260
10261 * server.c (handle_v_attach): Inhibit reporting dll changes.
10262
10263 2008-06-27 Pedro Alves <pedro@codesourcery.com>
10264
10265 * remote-utils.c (prepare_resume_reply): If requested, don't
10266 output "thread:TID" in the T stop reply.
10267
10268 * server.c (disable_packet_vCont, disable_packet_Tthread)
10269 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10270 (handle_query): If requested, disable support for qC, qfThreadInfo
10271 and qsThreadInfo.
10272 (handle_v_requests): If requested, disable support for vCont.
10273 (gdbserver_show_disableable): New.
10274 (main): Handle --disable-packet and --disable-packet=LIST.
10275
10276 * server.h (disable_packet_vCont, disable_packet_Tthread)
10277 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10278
10279 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10280
10281 * server.c (gdbserver_usage): Mention --version.
10282
10283 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10284
10285 * Makefile.in (gdbreplay.o): New rule.
10286
10287 2008-06-06 Joseph Myers <joseph@codesourcery.com>
10288
10289 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10290 message, not gdbserver.
10291
10292 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
10293 Nathan Sidwell <nathan@codesourcery.com>
10294 Joseph Myers <joseph@codesourcery.com>
10295
10296 * acinclude.m4: Include ../../config/acx.m4.
10297 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10298 * configure, config.in: Regenerate.
10299 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10300 * server.c (gdbserver_version): Print PKGVERSION.
10301 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10302 (main): Adjust gdbserver_usage calls.
10303 * gdbreplay.c (version, host_name): Add declarations.
10304 (gdbreplay_version, gdbreplay_usage): New.
10305 (main): Accept --version and --help options.
10306
10307 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10308
10309 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10310 (arm_breakpoint_at): Handle Thumb.
10311 (the_low_target): Add comment.
10312
10313 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10314
10315 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10316
10317 2008-05-09 Doug Evans <dje@google.com>
10318
10319 * server.h (decode_search_memory_packet): Declare.
10320 * remote-utils.c (decode_search_memory_packet): New fn.
10321 * server.c (handle_search_memory_1): New fn.
10322 (handle_search_memory): New fn.
10323 (handle_query): Process qSearch:memory packets.
10324
10325 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10326
10327 * regcache.c (registers_length): Remove.
10328 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10329 full register packet.
10330 * regcache.h (registers_length): Remove prototype.
10331 * server.h (PBUFSIZ): Define to 16384.
10332
10333 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10334
10335 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10336 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10337 powerpc-64l.o, and powerpc-altivec64l.o.
10338 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10339 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10340 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10341 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10342 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10343 to srv_xmlfiles.
10344
10345 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10346 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10347 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10348 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10349 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10350 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10351 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10352 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10353 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10354 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10355 (clean): Update.
10356
10357 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10358 (init_registers_powerpc_32l): ... this new prototype.
10359 (init_registers_powerpc_32): Remove, replace by ...
10360 (init_registers_powerpc_altivec32l): ... this new prototype.
10361 (init_registers_powerpc_e500): Remove, replace by ...
10362 (init_registers_powerpc_e500l): ... this new prototype.
10363 (init_registers_ppc64): Remove, replace by ...
10364 (init_registers_powerpc_64l): ... this new prototype.
10365 (init_registers_powerpc_64): Remove, replace by ...
10366 (init_registers_powerpc_altivec64l): ... this new prototype.
10367 (ppc_num_regs): Set to 73.
10368 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10369 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10370 (ppc_cannot_store_register): Handle orig_r3 and trap.
10371 (ppc_arch_setup): Update init_registers_... calls.
10372 (ppc_fill_gregset): Handle orig_r3 and trap.
10373
10374 * inferiors.c (clear_inferiors): Reset current_inferior.
10375
10376 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
10377
10378 * acinclude.m4: Add override.m4.
10379 * configure: Regenerate.
10380
10381 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10382
10383 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10384 initial call to init_register_ppc64.
10385
10386 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10387
10388 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10389 single powerpc*-*-linux* case.
10390 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10391
10392 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10393
10394 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
10395 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
10396 from reg_xmlfiles.
10397 * linux-ppc-low.c: Include <elf.h>.
10398 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10399 (ppc_hwcap): New global variable.
10400 (ppc_regmap): Remove __SPE__ #ifdef sections.
10401 (ppc_regmap_e500): New global variable.
10402 (ppc_cannot_store_register): Update __SPE__ special case.
10403 (ppc_get_hwcap): New function.
10404 (ppc_arch_setup): Use it to determine whether inferior supports
10405 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10406 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10407 Do not access registers if target does not support AltiVec.
10408 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10409 Do not access registers if target does not support SPE.
10410 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10411
10412 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10413
10414 * linux-low.c (disabled_regsets, num_regsets): New.
10415 (use_regsets_p): Delete.
10416 (linux_wait_for_process): Clear disabled_regsets.
10417 (regsets_fetch_inferior_registers): Check and set it.
10418 (regsets_store_inferior_registers): Likewise.
10419 (linux_fetch_registers, linux_store_registers): Do not use
10420 use_regsets_p.
10421 (initialize_low): Allocate disabled_regsets.
10422
10423 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10424
10425 * Makefile.in (LIBOBJS): New.
10426 (OBS): Use LIBOBJS.
10427 (memmem.o): New rule.
10428 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10429 * configure: Regenerated.
10430
10431 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10432
10433 * server.c (handle_query): Never return "unsupported" for
10434 qXfer:features:read queries.
10435
10436 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10437
10438 * server.c (get_features_xml): Fix inverted condition.
10439 (handle_query): Always support qXfer:feature:read.
10440
10441 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10442
10443 * server.c (wrapper_argv): New.
10444 (start_inferior): Handle wrapper_argv. If set, expect an extra
10445 trap.
10446 (gdbserver_usage): Document --wrapper.
10447 (main): Parse --wrapper.
10448
10449 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10450
10451 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10452 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10453 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10454 (ppc_set_pc): Likewise.
10455 (ppc_arch_setup): New function.
10456 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10457 of collect_register.
10458 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
10459
10460 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10461
10462 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10463 instead of linux-ppc64-low.o.
10464 * linux-ppc64-low.c: Remove file.
10465 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10466 (linux-ppc64-low.o): Remove rule.
10467
10468 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10469 (init_registers_powerpc_64): Likewise.
10470 (ppc_regmap): Conditionally define depending on __powerpc64__.
10471 (ppc_cannot_store_register): Do not special-case "fpscr" when
10472 compiled on __powerpc64__.
10473 (ppc_collect_ptrace_register): New function.
10474 (ppc_supply_ptrace_register): New function.
10475 (ppc_breakpoint): Change type to "unsigned int".
10476 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10477 (the_low_target): Conditionally provide initializers for the
10478 arch_setup member depending on __powerpc64__. Install
10479 collect_ptrace_register and supply_ptrace_register members.
10480
10481 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10482
10483 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10484 * server.c (gdbserver_xmltarget): Define.
10485 (get_features_xml): Use it to replace "target.xml" and arch_string.
10486
10487 * configure.srv: Remove srv_xmltarget. Add XML files that were
10488 mentioned there to srv_xmlfiles instead. Remove conditional tests
10489 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10490 srv_xmlfiles and srv_regobj to include all possible choices.
10491 * configure.ac (srv_xmltarget): Remove.
10492 (srv_xmlfiles): Do not add "target.xml".
10493 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10494 checks for supplementary target information.
10495 * configure: Regenerate.
10496 * Makefile.in (XML_TARGET): Remove.
10497 (target.xml): Remove rule.
10498 (clean): Do not clean up target.xml.
10499 (.PRECIOUS): Do not mention target.xml.
10500
10501 * target.h (struct target_ops): Remove arch_string member.
10502 * linux-low.c (linux_arch_string): Remove.
10503 (linux_target_ops): Remove arch_string initializer.
10504 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10505 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10506 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10507 * spu-low.c (spu_arch_string): Remove.
10508 (spu_target_ops): Remove arch_string initializer.
10509 * win32-low.c (win32_arch_string): Remove.
10510 (win32_target_ops): Remove arch_string initializer.
10511 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10512 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10513 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10514
10515 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10516
10517 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10518 by collect_ptrace_register and supply_ptrace_register hooks.
10519 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10520 instead of checking for the_low_target.left_pad_xfer.
10521 (usr_store_inferior_registers): Use collect_ptrace_register callback
10522 instead of checking for the_low_target.left_pad_xfer.
10523
10524 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10525 (s390_supply_ptrace_register): Likewise.
10526 (s390_fill_gregset): Call s390_collect_ptrace_register.
10527 (the_low_target): Update.
10528
10529 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10530 (ppc_supply_ptrace_register): Likewise.
10531 (the_low_target): Update.
10532
10533 * linux-i386-low.c (the_low_target): Update.
10534 * linux-x86-64-low.c (the_low_target): Update.
10535
10536 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10537
10538 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10539 reg-s390.o and reg-s390x.o.
10540
10541 * linux-low.c (new_inferior): New global variable.
10542 (linux_create_inferior, linux_attach): Set it.
10543 (linux_wait_for_process): Call the_low_target.arch_setup after the
10544 target has stopped for the first time.
10545 (initialize_low): Do not call the_low_target.arch_setup.
10546
10547 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10548 (s390_set_pc): Likewise.
10549 (s390_arch_setup): New function.
10550 (the_low_target): Use s390_arch_setup as arch_setup routine.
10551
10552 * regcache.c (realloc_register_cache): New function.
10553 (set_register_cache): Call it for each existing regcache.
10554
10555 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10556
10557 * server.h (init_registers): Remove prototype.
10558
10559 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10560 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10561 instead of init_registers ().
10562 * linux-arm-low.c (init_registers_arm): Add prototype.
10563 (init_registers_arm_with_iwmmxt): Likewise.
10564 (the_low_target): Add initializer for arch_setup field.
10565 * linux-cris-low.c (init_registers_cris): Add prototype.
10566 (the_low_target): Add initializer for arch_setup field.
10567 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10568 (the_low_target): Add initializer for arch_setup field.
10569 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10570 (the_low_target): Add initializer for arch_setup field.
10571 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10572 (the_low_target): Add initializer for arch_setup field.
10573 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10574 (the_low_target): Add initializer for arch_setup field.
10575 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10576 (the_low_target): Add initializer for arch_setup field.
10577 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10578 (init_registers_mips64_linux): Likewise.
10579 (the_low_target): Add initializer for arch_setup field.
10580 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10581 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10582 (the_low_target): Add initializer for arch_setup field.
10583 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10584 (init_registers_powerpc_64): Likewise.
10585 (the_low_target): Add initializer for arch_setup field.
10586 * linux-s390-low.c (init_registers_s390): Add prototype.
10587 (init_registers_s390x): Likewise.
10588 (the_low_target): Add initializer for arch_setup field.
10589 * linux-sh-low.c (init_registers_sh): Add prototype.
10590 (the_low_target): Add initializer for arch_setup field.
10591 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10592 (the_low_target): Add initializer for arch_setup field.
10593 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10594 (the_low_target): Add initializer for arch_setup field.
10595
10596 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10597 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10598 instead of init_registers ().
10599 * win32-arm-low.c (init_registers_arm): Add prototype.
10600 (the_low_target): Add initializer for arch_setup field.
10601 * win32-i386-low.c (init_registers_i386): Add prototype.
10602 (the_low_target): Add initializer for arch_setup field.
10603
10604 * spu-low.c (init_registers_spu): Add prototype.
10605 (initialize_low): Call initialie_registers_spu () instead of
10606 initialize_registers ().
10607
10608 2008-02-19 Pedro Alves <pedro@codesourcery.com>
10609
10610 * server.c (handle_v_requests): When handling the vRun and vAttach
10611 packets, if already debugging a process, don't kill it. Return an
10612 error instead.
10613
10614 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10615
10616 * server.c (handle_query): Correct length check.
10617
10618 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10619
10620 * win32-low.c (do_initial_child_stuff): Add process handle
10621 parameter. Set current_process_handle and current_process_id from the
10622 parameters. Clear globals.
10623 (win32_create_inferior): Don't set current_process_handle and
10624 current_process_id here. Instead pass them on the call to
10625 do_initial_child_stuff.
10626 (win32_attach): Likewise.
10627 (win32_clear_inferiors): New.
10628 (win32_kill): Don't close the current process handle or the
10629 current thread handle here. Instead call win32_clear_inferiors.
10630 (win32_detach): Don't open a new handle to the process. Call
10631 win32_clear_inferiors.
10632 (win32_join): Don't rely on current_process_handle; open a new
10633 handle using the process id.
10634 (win32_wait): Call win32_clear_inferiors when the inferior process
10635 has exited.
10636
10637 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10638
10639 * server.c (monitor_show_help): Add "exit".
10640
10641 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10642
10643 * Makefile.in (SFILES): Add linux-xtensa-low.c.
10644 (clean): Add reg-xtensa.c.
10645 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
10646 * configure.srv (xtensa*-*-linux*) New target.
10647 * linux-xtensa-low.c: New.
10648 * xtensa-xtregs.c: New.
10649
10650 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10651
10652 * hostio.c: Don't include errno.h.
10653 (errno_to_fileio_errno): Move to hostio-errno.
10654 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10655 error number outputting to the target->hostio_last_error callback.
10656 (hostio_packet_error): Use FILEIO_EINVAL directly.
10657 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10658 calls to hostio_error.
10659 * hostio-errno.c: New.
10660 * server.h (hostio_last_error_from_errno): Declare.
10661 * target.h (target_ops): Add hostio_last_error member.
10662 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10663 as hostio_last_error handler.
10664 * spu-low.c (spu_target_ops): Likewise.
10665 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10666 (wince_hostio_last_error): New functions.
10667 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10668 as hostio_last_error handler.
10669 (win32_target_ops) [!_WIN32_WCE]: Register
10670 hostio_last_error_from_errno as hostio_last_error handler.
10671 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10672 (hostio-errno.o): New rule.
10673 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10674 * configure.srv (srv_hostio_err_objs): New variable. Default to
10675 hostio-errno.o.
10676 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10677 * configure: Regenerate.
10678
10679 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10680
10681 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10682 (linux_kill, linux_detach): Clean up the process list.
10683 * remote-utils.c (remote_open): Improve port number parsing.
10684 (putpkt_binary, input_interrupt): Only send interrupts if the target
10685 is running.
10686 * server.c (extended_protocol): Make static.
10687 (attached): Define earlier.
10688 (exit_requested, response_needed, program_argv): New variables.
10689 (target_running): New.
10690 (start_inferior): Clear attached here.
10691 (attach_inferior): Set attached here.
10692 (require_running): Define.
10693 (handle_query): Use require_running and target_running. Implement
10694 "monitor exit".
10695 (handle_v_attach, handle_v_run): New.
10696 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10697 (gdbserver_usage): Update.
10698 (main): Redo argument parsing. Handle --debug and --multi. Handle
10699 --attach along with other options or after the port. Save
10700 program_argv. Support no initial program. Resynchronize
10701 communication with GDB after an error. Handle "monitor exit".
10702 Use require_running and target_running. Always allow the extended
10703 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10704 restart in extended mode.
10705 * README: Refer to the GDB manual. Update --attach usage.
10706
10707 2007-12-20 Andreas Schwab <schwab@suse.de>
10708
10709 * linux-low.c (STACK_SIZE): Define.
10710 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10711 (linux_test_for_tracefork): Likewise.
10712
10713 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10714
10715 * linux-low.c (linux_wait_for_event): Update messages. Do not
10716 reinsert auto-delete breakpoints.
10717 * mem-break.c (struct breakpoint): Change return type of handler to
10718 int.
10719 (set_breakpoint_at): Update handler type.
10720 (reinsert_breakpoint_handler): Return 1 instead of calling
10721 delete_breakpoint.
10722 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10723 setting a new one.
10724 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10725 * mem-break.h (set_breakpoint_at): Update handler type.
10726 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10727 * win32-low.c (auto_delete_breakpoint): New.
10728 (get_child_debug_event): Use it.
10729
10730 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10731
10732 * configure.ac: Check for pread and pwrite.
10733 * hostio.c (handle_pread): Fall back to lseek and read.
10734 (handle_pwrite): Fall back to lseek and write.
10735 * config.in, configure: Regenerated.
10736
10737 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10738
10739 * server.c (myresume): Add own_buf argument.
10740 (main): Update calls.
10741
10742 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10743
10744 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10745 * remote-utils.c (remote_open): Do not call disable_async_io.
10746 (block_async_io): Delete.
10747 (unblock_async_io): Make static.
10748 (initialize_async_io): New.
10749 * server.c (handle_v_cont): Handle async I/O here.
10750 (myresume): Likewise. Move other common resume tasks here...
10751 (main): ... from here. Call initialize_async_io. Disable async
10752 I/O before the main loop.
10753 * server.h (initialize_async_io): Declare.
10754 (block_async_io, unblock_async_io): Delete prototypes.
10755 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10756
10757 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10758
10759 * remote-utils.c (readchar): Allow binary data in received messages.
10760
10761 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10762
10763 * win32-low.c (attaching): New global.
10764 (win32_create_inferior): Clear the `attaching' global.
10765 (win32_attach): Set the `attaching' global.
10766 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10767 attaching. Only set a breakpoint at the entry point if not
10768 attaching.
10769
10770 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10771
10772 * server.c (main): Don't report dll events on the initial
10773 connection on attaches.
10774
10775 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10776
10777 * server.c (main): Relax numerical bases supported for the pid of
10778 the --attach command line argument.
10779
10780 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10781
10782 * win32-low.c (win32_attach): Call OpenProcess before
10783 DebugActiveProcess, not after. Add last error output to error
10784 call.
10785
10786 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10787
10788 * win32-low.c (win32_get_thread_context)
10789 (win32_set_thread_context): New functions.
10790 (thread_rec): Use win32_get_thread_context.
10791 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10792 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10793 field.
10794
10795 2007-12-03 Leo Zayas
10796 Pedro Alves <pedro_alves@portugalmail.pt>
10797
10798 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10799 global variables.
10800 (child_add_thread): Minor cleanup.
10801 (child_continue): Resume artificially suspended threads before
10802 calling ContinueDebugEvent.
10803 (suspend_one_thread): New.
10804 (fake_breakpoint_event): New.
10805 (get_child_debug_event): Change return type to int. Check here if
10806 gdb sent an interrupt request. If a soft interrupt was requested,
10807 fake a breakpoint event. Return 0 if there is no event to handle,
10808 and 1 otherwise.
10809 (win32_wait): Don't check here if gdb sent an interrupt request.
10810 Ensure there is a valid event to handle.
10811 (win32_request_interrupt): Add soft interruption method as last
10812 resort.
10813
10814 2007-12-03 Leo Zayas
10815 Pedro Alves <pedro_alves@portugalmail.pt>
10816
10817 * win32-low.h (win32_thread_info): Add descriptions to the
10818 structure members. Replace `suspend_count' counter by a
10819 `suspended' flag.
10820 * win32-low.c (thread_rec): Update condition of when to get the
10821 context from the inferior. Rely on ContextFlags being set if it
10822 has already been retrieved. Only suspend the inferior thread if
10823 we haven't already. Warn if that fails.
10824 (continue_one_thread): s/suspend_count/suspended/. Only call
10825 ResumeThread once. Warn if that fails.
10826
10827 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10828
10829 * win32-low.c (win32_wait): Don't read from the inferior when it
10830 has already exited.
10831
10832 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10833
10834 * Makefile.in (win32_low_h): New variable.
10835 (win32-low.o): Add dependency on $(win32_low_h).
10836 (win32-arm-low.o, win32-i386-low.o): New rules.
10837
10838 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10839
10840 * hostio.c: Correct copyright year.
10841
10842 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10843
10844 * Makefile.in (OBS): Add hostio.o.
10845 (hostio.o): New rule.
10846 * server.h (handle_vFile): Declare.
10847 * hostio.c: New file.
10848 * server.c (handle_v_requests): Take packet_len and new_packet_len
10849 for binary packets. Call handle_vFile.
10850 (main): Update call to handle_v_requests.
10851
10852 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10853
10854 * linux-low.c: Include <sched.h>.
10855
10856 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10857
10858 * linux-low.c (linux_tracefork_grandchild): New.
10859 (linux_tracefork_child): Use clone.
10860 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10861
10862 2007-10-31 Joel Brobecker <brobecker@adacore.com>
10863
10864 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10865
10866 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10867
10868 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10869
10870 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10871
10872 * inferiors.c (change_inferior_id): Delete.
10873 (add_pid_to_list, pull_pid_from_list): New.
10874 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10875 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10876 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10877 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10878 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10879 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10880 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10881 (using_threads): Always set to 1.
10882 (handle_extended_wait): New.
10883 (add_process): Do not set TID.
10884 (linux_create_inferior): Set must_set_ptrace_flags.
10885 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10886 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10887 (linux_thread_alive): Rename TID argument to LWPID.
10888 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10889 (linux_wait_for_event): Do not use TID or check using_threads. Update
10890 call to dead_thread_notify. Call handle_extended_wait.
10891 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10892 (send_sigstop): Delete sigstop_sent.
10893 (wait_for_sigstop): Avoid TID.
10894 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10895 (linux_test_for_tracefork): New.
10896 (linux_lookup_signals): Use thread_db_active and
10897 linux_supports_tracefork_flag.
10898 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10899 * linux-low.h (get_process_thread): Avoid TID.
10900 (struct process_ifo): Move thread_known and tid to the end. Remove
10901 sigstop_sent.
10902 (linux_attach_lwp, thread_db_init): Update prototypes.
10903 * server.h (change_inferior_id): Delete prototype.
10904 (add_pid_to_list, pull_pid_from_list): New prototypes.
10905 * thread-db.c (thread_db_use_events): New.
10906 (find_first_thread): Rename to...
10907 (find_one_thread): ...this. Update callers and messages. Do not
10908 call fatal. Check thread_db_use_events. Do not call
10909 change_inferior_id or new_thread_notify.
10910 (maybe_attach_thread): Update. Do not call new_thread_notify.
10911 (thread_db_init): Set thread_db_use_events. Check use_events.
10912 * utils.c (fatal, warning): Correct message prefix.
10913
10914 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10915
10916 * Makefile.in (clean): Remove new files.
10917 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10918 (powerpc-64.o, powerpc-64.c): New rules.
10919 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10920 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10921 with SPE.
10922 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10923 SPE targets.
10924 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10925 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10926 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10927 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10928 (target_regsets): Add AltiVec and SPE register sets.
10929 * configure.ac: Check for AltiVec and SPE.
10930 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10931 (ppc_fill_vrregset, ppc_store_vrregset): New.
10932 (target_regsets): Add AltiVec register set.
10933 * configure: Regenerated.
10934
10935 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10936
10937 * linux-low.c (O_LARGEFILE): Define.
10938 (linux_read_memory): Use /proc/PID/mem.
10939 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10940 * configure, config.in: Regenerated.
10941
10942 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10943
10944 * linux-low.c (linux_wait_for_event): Do not pass signals while
10945 single-stepping.
10946
10947 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10948
10949 * win32-low.c (create_process): New.
10950 (win32_create_inferior): Use create_process instead of
10951 CreateProcess. If create_process failed retry appending an ".exe"
10952 suffix. Store the GetLastError result immediatelly after
10953 create_process calls and use it on the call to error.
10954
10955 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10956
10957 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10958
10959 2007-08-23 Joel Brobecker <brobecker@adacore.com>
10960
10961 * configure.ac: Switch license to GPLv3.
10962
10963 2007-08-01 Michael Snyder <msnyder@access-company.com>
10964
10965 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10966
10967 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
10968
10969 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10970 typedef.
10971 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10972 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
10973 CloseToolhelp32Snapshot.
10974 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10975 CloseToolhelp32Snapshot.
10976
10977 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
10978
10979 * server.c (main): Check for inferior exit before main loop.
10980
10981 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
10982
10983 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
10984 instead of on tmp_desc.
10985
10986 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
10987 Daniel Jacobowitz <dan@codesourcery.com>
10988
10989 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
10990 (add_thread): Minor cleanups.
10991 (clear_inferiors): Move lower in the file. Clear the DLL
10992 list.
10993 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
10994 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
10995 (xml_escape_text): New.
10996 * server.c (handle_query): Handle qXfer:libraries:read. Report it
10997 for qSupported.
10998 (handle_v_cont): Report errors.
10999 (gdbserver_version): Update.
11000 (main): Correct size of own_buf. Do not report initial DLL events.
11001 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11002 (unloaded_dll, xml_escape_text): New.
11003 * win32-low.c (enum target_waitkind): Update comments.
11004 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11005 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11006 (win32_EnumProcessModules, win32_GetModuleInformation)
11007 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11008 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11009 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11010 (win32_Module32First, win32_Module32Next, load_toolhelp)
11011 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11012 (get_child_debug_event): Handle DLL events.
11013 (win32_wait): Likewise.
11014
11015 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11016
11017 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11018 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11019
11020 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11021
11022 * win32-low.c (handle_output_debug_string): Ignore event if not
11023 waiting.
11024
11025 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11026
11027 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11028
11029 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11030
11031 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11032
11033 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11034
11035 * inferiors.c (change_inferior_id): Add comment.
11036 * linux-low.c (check_removed_breakpoint): Add an early
11037 prototype. Improve debug output.
11038 (linux_attach): Doc update.
11039 (linux_detach_one_process, linux_detach): Clean up before releasing
11040 each process.
11041 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11042 * linux-low.h (struct process_info): Doc improvement.
11043 * mem-break.c (delete_all_breakpoints): New.
11044 * mem-break.h (delete_all_breakpoints): New prototype.
11045 * thread-db.c (find_first_thread): New.
11046 (thread_db_create_event): Call it instead of
11047 thread_db_find_new_threads. Clean up unused variables.
11048 (maybe_attach_thread): Remove first thread handling.
11049 (thread_db_find_new_threads): Use find_first_thread.
11050 (thread_db_get_tls_address): Likewise.
11051
11052 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11053
11054 * thread-db.c (thread_db_find_new_threads): Add prototype.
11055 (thread_db_create_event): Check for the main thread before adding
11056 a new thread.
11057 (maybe_attach_thread): Only enable event reporting if TID == 0.
11058 (thread_db_get_tls_address): Check for new threads.
11059
11060 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11061
11062 * linux-low.c (linux_create_inferior): Try execv before execvp.
11063 * spu-low.c (spu_create_inferior): Likewise.
11064
11065 2007-06-13 Mike Frysinger <vapier@gentoo.org>
11066
11067 * linux-low.c (linux_create_inferior): Change execv to execvp.
11068 * spu-low.c (spu_create_inferior): Likewies.
11069
11070 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11071
11072 * Makefile.in (clean): Clean new files instead of deleted ones.
11073 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11074 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11075 rules.
11076 * configure.srv: Specify XML files and new regformats for MIPS and
11077 MIPS64 GNU/Linux.
11078 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11079 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11080 an entry for the restart register.
11081 (mips_cannot_fetch_register, mips_cannot_store_register)
11082 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11083 register names to match the XML descriptions.
11084 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11085 restart register instead of $0.
11086
11087 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11088 Markus Deuling <deuling@de.ibm.com>
11089
11090 * remote-utils.c (decode_xfer_write): New function.
11091 * server.h (decode_xfer_write): Add prototype.
11092 * server.c (handle_query): Add PACKET_LEN argument. Support
11093 qXfer:spu:read and qXfer:spu:write packets.
11094 (main): Pass packet_len to handle_query.
11095 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11096 * target.h (target_ops): Add qxfer_spu.
11097
11098 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11099
11100 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11101 accessing non-seekable spufs files.
11102
11103 2007-05-16 Markus Deuling <deuling@de.ibm.com>
11104
11105 * server.c (handle_query): Add reply for qC packet.
11106
11107 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11108 Leo Zayas <lerele@champenstudios@com>
11109
11110 * server.h (check_remote_input_interrupt_request): New function.
11111 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11112 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11113 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11114 (check_remote_input_interrupt_request): New function.
11115 * server.h (check_remote_input_interrupt_request): Declare.
11116 * win32-low.c (winapi_DebugBreakProcess,
11117 winapi_GenerateConsoleCtrlEvent): New typedefs.
11118 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11119 to 250 ms.
11120 (win32_wait): Check for remote interrupt request
11121 with check_remote_input_interrupt_request.
11122 (win32_request_interrupt): New function.
11123 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11124
11125 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11126
11127 * win32-low.c (debug_registers_changed,
11128 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11129 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11130 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11131 (thread_rec): Get context using the low target.
11132 (child_add_thread): Call thread_added on the low target,
11133 which does the same thing.
11134 (regptr): Delete.
11135 (do_initial_child_stuff): Remove debug registers references.
11136 Set context using the low target. Resume threads after
11137 setting the contexts.
11138 (child_continue): Remove dead variable. Remove debug
11139 registers references.
11140 (child_fetch_inferior_registers): Go through the low target.
11141 (do_child_store_inferior_registers): Remove.
11142 (child_store_inferior_registers): Go through the low target.
11143 (win32_resume): Remove debug registers references.
11144 Set context using the low target.
11145 (handle_exception): Change return type to void. Don't record
11146 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11147 first chance exception.
11148 (get_child_debug_event): Change return type to void. Remove
11149 goto loop. Always return after waiting for debug event.
11150 (win32_wait): Convert to switch statement. Handle spurious
11151 events.
11152
11153 * win32-i386-low.c (debug_registers_changed,
11154 debug_registers_used): New.
11155 (initial_stuff): Rename to ...
11156 (i386_initial_stuff): ... this. Clear debug registers
11157 state variables.
11158 (store_debug_registers): Delete.
11159 (i386_get_thread_context): New.
11160 (load_debug_registers): Delete.
11161 (i386_set_thread_context): New.
11162 (i386_thread_added): New.
11163 (single_step): Rename to ...
11164 (i386_single_step): ... this.
11165 (do_fetch_inferior_registers): Rename to ...
11166 (i386_fetch_inferior_register): ... this.
11167 (i386_store_inferior_register): New.
11168 (the_low_target): Adapt to new interface.
11169
11170 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11171 (arm_get_thread_context): New.
11172 (arm_set_thread_context): New.
11173 (regptr): New.
11174 (do_fetch_inferior_registers): Rename to ...
11175 (arm_fetch_inferior_register): ... this.
11176 (arm_store_inferior_register): New.
11177 (arm_wince_breakpoint): Reimplement as unsigned long.
11178 (arm_wince_breakpoint_len): Define.
11179 (the_low_target): Adapt to new interface.
11180
11181 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11182 load_debug_registers. Add get_thread_context, set_thread_context,
11183 thread_added and store_inferior_register. Rename
11184 fetch_inferior_registers to fetch_inferior_register.
11185 (regptr): Remove declaration.
11186
11187 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11188
11189 * linux-low.c (linux_detach): Change return type to int. Return 0.
11190 * spu-low.c (spu_detach): Likewise.
11191
11192 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11193
11194 * target.h (target_ops): Change return type of detach to int.
11195 Add join.
11196 (join_inferior): New.
11197 * server.c (main): Don't skip detach support on mingw32.
11198 If the inferior doesn't support detaching return error.
11199 Call join_inferior instead of using waitpid.
11200 * linux-low.c (linux_join): New.
11201 (linux_target_op): Add linux_join.
11202 * spu-low.c (spu_join): New.
11203 (spu_target_ops): Add spu_join.
11204 * win32-low.c (win32_detach): Adapt to new interface.
11205 Reopen current_process_handle before detaching. Issue a child
11206 resume before detaching.
11207 (win32_join): New.
11208 (win32_target_op): Add win32_join.
11209
11210 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11211
11212 * win32-low.c (win32-attach): Fix return value.
11213 * target.h (target_ops): Describe ATTACH return values.
11214
11215 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11216
11217 * win32-low.c (GETPROCADDRESS): Define.
11218 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11219 (winapi_DebugSetProcessKillOnExit): Likewise.
11220 (win32_create_inferior): Force usage of ansi CreateProcessA.
11221 (win32_attach): Use GETPROCADDRESS.
11222 (win32_detach): Likewise.
11223
11224 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11225
11226 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11227
11228 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11229
11230 * win32-low.c: Commit leftover changes from 2007-03-29.
11231
11232 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11233
11234 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11235 fields short instead of int. Add explicit padding.
11236 (i387_cache_to_fsave): Remove unnecessary casts.
11237 (i387_fsave_to_cache): Doc fix.
11238 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11239
11240 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11241
11242 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11243 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11244
11245 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11246
11247 * configure.srv (arm*-*-mingw32ce*): Move near the other
11248 arm targets.
11249
11250 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11251
11252 * configure.ac: Add errno checking.
11253 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11254 sys/file.h and malloc.h.
11255 (AC_CHECK_DECLS): Add perror.
11256 (srv_mingwce): Handle.
11257 * configure.srv (i[34567]86-*-cygwin*): Add
11258 win32-i386-low.o to srv_tgtobj.
11259 (i[34567]86-*-mingw*): Likewise.
11260 (arm*-*-mingw32ce*): Add case.
11261 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11262 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11263 [__MINGW32CE__] (strerror): New function.
11264 [__MINGW32CE__] (errno): Define to GetLastError.
11265 [__MINGW32CE__] (COUNTOF): New macro.
11266 (remote_open): Remove extra close call.
11267 * mem-break.c (delete_breakpoint_at): New function.
11268 * mem-break.h (delete_breakpoint_at): Declare.
11269 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11270 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11271 [USE_WIN32API] (read, write): Add char* casts.
11272 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11273 * server.h: Include wincecompat.h on Windows CE.
11274 [HAVE_ERRNO_H]: Check.
11275 (perror): Declare if not declared.
11276 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11277 (perror_with_name): Remove errno declaration.
11278 * wincecompat.h: New.
11279 * wincecompat.c: New.
11280 * win32-low.h: New.
11281 * win32-arm-low.c: New.
11282 * win32-i386-low.c: New.
11283 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11284 (OUTMSG2): Make it safe.
11285 (_T): New macro.
11286 (COUNTOF): New macro.
11287 (NUM_REGS): Get it from the low target.
11288 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11289 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11290 (thread_rec): Let low target handle debug registers.
11291 (child_add_thread): Likewise.
11292 (child_init_thread_list): Likewise.
11293 (continue_one_thread): Likewise.
11294 (regptr): New.
11295 (do_child_fetch_inferior_registers): Move to ...
11296 * win32-i386-low.c: ... here, and rename to ...
11297 (do_fetch_inferior_registers): ... this.
11298 * win32-low.c (child_fetch_inferior_registers):
11299 Go through the low target.
11300 (do_child_store_inferior_registers): Use regptr.
11301 (strwinerror): New function.
11302 (win32_create_inferior): Handle Windows CE.
11303 Use strwinerror instead of strerror on Windows error
11304 codes. Add program to the error output.
11305 Don't close the main thread handle on Windows CE.
11306 (win32_attach): Use coredll.dll on Windows CE.
11307 (win32_kill): Close current process and current
11308 thread handles.
11309 (win32_detach): Use coredll.dll on Windows CE.
11310 (win32_resume): Let low target handle debug registers, and
11311 step request.
11312 (handle_exception): Add/Remove initial breakpoint. Avoid
11313 non-existant WSTOPSIG on Windows CE.
11314 (win32_read_inferior_memory): Cast to remove warning.
11315 (win32_arch_string): Go through the low target.
11316 (initialize_low): Call set_breakpoint_data with the low
11317 target's breakpoint.
11318 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11319 FOP_REGNUM, mappings): Move to ...
11320 * win32-i386-low.c: ... here.
11321 * win32-low.c (win32_thread_info): Move to ...
11322 * win32-low.h: ... here.
11323 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11324 win32-arm-low.c and wincecompat.c.
11325 (all:): Add $EXEEXT.
11326 (install-only:): Likewise.
11327 (gdbserver:): Likewise.
11328 (gdbreplay:): Likewise.
11329 * config.in: Regenerate.
11330 * configure: Regenerate.
11331
11332 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11333
11334 * win32-low.c: Rename typedef thread_info to
11335 win32_thread_info throughout.
11336
11337 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11338
11339 * win32-i386-low.c: Rename to ...
11340 * win32-low.c: ... this.
11341 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11342 * Makefile.in: Likewise.
11343
11344 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11345
11346 * remote-utils.c (monitor_output): Constify msg parameter.
11347 * server.h (monitor_output): Likewise.
11348 * win32-i386-low.c (handle_output_debug_string): New.
11349 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11350 handle_output_debug_string.
11351 (get_child_debug_event): Likewise.
11352
11353 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11354
11355 * server.c (main): Correct strtoul check.
11356
11357 2007-03-27 Jon Ringle <jon@ringle.org>
11358
11359 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11360
11361 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11362
11363 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11364
11365 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11366
11367 * terminal.h: Check HAVE_SGTTY_H.
11368
11369 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
11370
11371 * remote-utils.c (remote_open): Print out the assigned port number.
11372
11373 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11374
11375 * remote-utils.c (monitor_output): New function.
11376 * server.c (debug_threads): Define here.
11377 (monitor_show_help): New function.
11378 (handle_query): Handle qRcmd.
11379 (main): Do not handle 'd' packet.
11380 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11381 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11382 of debug_threads.
11383
11384 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11385
11386 * Makefile.in (EXEEXT): New.
11387 (clean): Use $(EXEEXT).
11388
11389 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11390
11391 * target.h (target_ops): Rename send_signal to request_interrupt,
11392 and remove enum target_signal parameter.
11393 * linux-low.c (linux_request_interrupt): Rename from
11394 linux_send_signal, and always send SIGINT.
11395 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11396 and always send SIGINT.
11397 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11398 of send_signal.
11399 (input_interrupt): Likewise.
11400
11401 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11402
11403 * server.c (get_features_xml): Check if target implemented
11404 arch_string.
11405 * win32-i386-low.c (win32_arch_string): New.
11406 (win32_target_ops): Add win32_arch_string as arch_string member.
11407
11408 2007-02-22 Markus Deuling <deuling@de.ibm.com>
11409
11410 * spu-low.c (spu_arch_string): New.
11411 (spu_target_ops): Add spu_arch_string.
11412
11413 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11414
11415 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11416 * configure.ac: Do not check for terminal.h.
11417 * configure, config.in: Regenerated.
11418
11419 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11420
11421 * Makefile.in (OBS): Add $(XML_BUILTIN).
11422 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11423 (clean): Update.
11424 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11425 (arm-with-iwmmxt.c): New.
11426 * config.in, configure: Regenerate.
11427 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11428 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11429 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11430 (arm*-*-linux*): Add iWMMXt and regset support.
11431 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11432 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11433 (arm_store_wmmxregset, target_regsets): New.
11434 * server.c (get_features_xml): Take annex argument. Check builtin
11435 XML documents.
11436 (handle_query): Handle multiple annexes.
11437
11438 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11439
11440 * remote-utils.c [USE_WIN32API] (read, write): Define.
11441 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11442 write.
11443
11444 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11445
11446 * linux-i386-low.c (the_low_target): Set arch_string.
11447 * linux-x86-64-low.c (the_low_target): Likewise.
11448 * linux-low.c (linux_arch_string): New.
11449 (linux_target_ops): Add it.
11450 * linux-low.h (struct linux_target_ops): Add arch_string.
11451 * server.c (write_qxfer_response): Use const void * for DATA.
11452 (get_features_xml): New.
11453 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11454 * target.h (struct target_ops): Add arch_string method.
11455
11456 2007-01-03 Denis Pilat <denis.pilat@st.com>
11457 Daniel Jacobowitz <dan@codesourcery.com>
11458
11459 * linux-low.c (linux_kill): Handle being called with no threads.
11460 * win32-i386-low.c (win32_kill): Likewise.
11461 (get_child_debug_event): Clear current_process_handle.
11462
11463 2006-12-30 Denis PILAT <denis.pilat@st.com>
11464 Daniel Jacobowitz <dan@codesourcery.com>
11465
11466 * remote-utils.c (remote_open): Check the type of specified
11467 serial port devices before opening them.
11468 * server.c (main): Kill the inferior if an error occurs during
11469 the first remote_open.
11470
11471 2006-12-05 Markus Deuling <deuling@de.ibm.com>
11472
11473 * README: Update supported targets.
11474
11475 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11476
11477 * Makefile.in (clean): Remove reg-mips64.c.
11478 (reg-mips64.c, reg-mips64.o): New rules.
11479 * configure.srv: Handle mips64. Include regset support for mips.
11480 * linux-mips-low.c (union mips_register): New.
11481 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11482 (mips_breakpoint, mips_breakpoint_at): Use int.
11483 (mips_collect_register, mips_supply_register)
11484 (mips_collect_register_32bit, mips_supply_register_32bit)
11485 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11486 (mips_store_fpregset, target_regsets): New.
11487 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11488
11489 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11490
11491 * configure.srv: Add target "spu*-*-*".
11492 * Makefile.in (clean): Remove reg-spu.c.
11493 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11494 * spu-low.c: New file.
11495
11496 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11497
11498 * configure.ac: Correct td_thr_tls_get_addr test.
11499 * configure: Regenerated.
11500
11501 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11502
11503 * linux-low.c (linux_wait_for_event): Reformat. Use the
11504 pass_signals array.
11505 * remote-utils.c (decode_address_to_semicolon): New.
11506 * server.c (pass_signals, handle_general_set): New.
11507 (handle_query): Mention QPassSignals for qSupported.
11508 (main): Call handle_general_set.
11509 * server.h (pass_signals, decode_address_to_semicolon): New.
11510
11511 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11512
11513 * server.c (handle_query): Correct error handling for read_auxv.
11514
11515 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11516
11517 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11518 and srv_linux_thread_db to yes.
11519 * linux-s390-low.c (s390_fill_gregset): New function.
11520 (target_regsets): Define data structure.
11521
11522 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11523
11524 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11525 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11526 * config.in, configure: Regenerated.
11527 * inferiors.c (gdb_id_to_thread): New function.
11528 (gdb_id_to_thread_id): Use it.
11529 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11530 * linux-low.h (struct process_info): Add th member.
11531 (thread_db_get_tls_address): New prototype.
11532 * remote-utils.c (decode_address): Make non-static.
11533 * server.c (handle_query): Handle qGetTLSAddr.
11534 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11535 * target.h (struct target_ops): Add get_tls_address.
11536 * thread-db.c (maybe_attach_thread): Save the thread handle.
11537 (thread_db_get_tls_address): New.
11538
11539 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11540
11541 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11542 (linux_resume_one_process): Take a siginfo_t *. Update all
11543 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11544 (struct pending_signals): Add a siginfo_t.
11545 (linux_wait_for_process): Always set last_status.
11546 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11547 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11548 * linux-low.h (struct process_info): Add last_status.
11549
11550 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11551
11552 * remote-utils.c (try_rle): New function.
11553 (putpkt_binary): Use it.
11554
11555 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11556
11557 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11558 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11559 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11560 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11561 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11562 point registers.
11563
11564 2006-08-08 Richard Sandiford <richard@codesourcery.com>
11565
11566 * server.c (terminal_fd): New variable.
11567 (old_foreground_pgrp): Likewise.
11568 (restore_old_foreground_pgrp): New function.
11569 (start_inferior): Record the terminal file descriptor in terminal_fd
11570 and its original foreground group in old_foreground_pgrp. Register
11571 restore_old_foreground_pgrp with atexit().
11572
11573 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11574
11575 * server.c (handle_query): Correct qPart to qXfer.
11576
11577 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11578
11579 * configure.ac: Check for more headers which are missing on
11580 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11581 * configure.srv: Add Cygwin and mingw32.
11582 * remote-utils.c: Don't include headers unconditionally which
11583 are missing on mingw32. Include <winsock.h> for mingw32.
11584 (remote_open): Adjust for mingw32 support. Flush
11585 standard error after writing to it.
11586 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11587 (unblock_async_io, enable_async_io, disable_async_io)
11588 (readchar, getpkt): Update for Winsock support.
11589 (prepare_resume_reply): Expect a protocol signal number.
11590 * server.c: Disable <sys/wait.h> on mingw32.
11591 (start_inferior): Adjust for mingw32 support. Flush
11592 standard error after writing to it.
11593 (attach_inferior): Likewise. Use protocol signal
11594 numbers.
11595 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11596 and names.
11597 * win32-i386-low.c: New file.
11598 * Makefile.in (XM_CLIBS): Set.
11599 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11600 (win32-i386-low.o): New dependency rule.
11601 * linux-low.c (linux_wait): Use target signal numbers.
11602 * target.h (struct target_ops): Doc fix.
11603 * server.h (target_signal_to_name): New prototype.
11604 * gdbreplay.c: Don't include headers unconditionally which
11605 are missing on mingw32. Include <winsock.h> for mingw32.
11606 (remote_close, remote_open): Adjust for Winsock support.
11607 * configure, config.in: Regenerated.
11608
11609 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11610
11611 * server.c (decode_xfer_read, write_qxfer_response): New.
11612 (handle_query): Take a packet length argument. Handle
11613 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11614 the qSupported response.
11615 (main): Update call to handle_query.
11616
11617 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11618
11619 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11620 (putpkt_binary): Renamed from putpkt and adjusted for binary
11621 data.
11622 (putpkt): New wrapper for putpkt_binary.
11623 (readchar): Don't mask off the high bit.
11624 (decode_X_packet): New function.
11625 * server.c (main): Call putpkt_binary if a handler sets the packet
11626 length. Save the length of the incoming packet. Handle 'X'.
11627 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11628
11629 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11630
11631 * server.c (handle_query): Handle qSupported.
11632
11633 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11634
11635 * remote-utils.c (all_symbols_looked_up): New variable.
11636 (look_up_one_symbol): Check it.
11637 * server.h (look_up_one_symbol): New declaration.
11638 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11639
11640 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11641
11642 * Makefile.in (linux-arm-low.o): Update dependencies.
11643 * linux-arm-low.c: Include "gdb_proc_service.h".
11644 (PTRACE_GET_THREAD_AREA): Define.
11645 (ps_get_thread_area): New function.
11646
11647 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11648
11649 * configure.srv (m68k*-*-uclinux*): New target.
11650 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11651 (linux_resume_one_process): Remove extraneous cast.
11652 (linux_read_offsets): New.
11653 (linux_target_op): Add linux_read_offsets on mmuless systems.
11654 * server.c (handle_query): Add qOffsets logic.
11655 * target.h (struct target_ops): Add read_offsets.
11656
11657 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11658
11659 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11660 (PTRACE_GET_THREAD_AREA): Define.
11661 (ps_get_thread_area): New function.
11662 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11663 (linux-x86-64-low.o): Update.
11664
11665 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11666
11667 * configure.ac: Remove checks for prfpregset_t.
11668 * gdb_proc_service.h: New file.
11669 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11670 new "gdb_proc_service.h".
11671 * proc-service.c: Likewise.
11672 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11673 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11674 * Makefile.in (gdb_proc_service_h): Updated.
11675 * configure, config.in: Regenerated.
11676
11677 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11678
11679 * remote-utils.c (prepare_resume_reply): Move declaration
11680 of gdb_id_from_wait to the top of the block.
11681
11682 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11683
11684 * linux-low.c (regsets_store_inferior_registers): Read the regset
11685 from the target before filling it.
11686
11687 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11688
11689 * server.c (attach_inferior): Return SIGTRAP for a successful
11690 attach.
11691
11692 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11693
11694 * Makefile.in (OBS): Add version.o.
11695 (STAGESTUFF): Delete.
11696 (version.o): Add dependencies.
11697 (version.c): Replace rule.
11698 (clean): Remove version.c.
11699 * server.c (gdbserver_version): New.
11700 (gdbserver_usage): Use printf.
11701 (main): Handle --version and --help.
11702 * server.h (version, host_name): Add declarations.
11703
11704 2005-12-23 Eli Zaretskii <eliz@gnu.org>
11705
11706 * linux-arm-low.c:
11707 * linux-arm-low.c:
11708 * inferiors.c:
11709 * i387-fp.h:
11710 * i387-fp.c:
11711 * gdbreplay.c:
11712 * regcache.c:
11713 * proc-service.c:
11714 * mem-break.h:
11715 * mem-break.c:
11716 * linux-x86-64-low.c:
11717 * linux-sh-low.c:
11718 * linux-s390-low.c:
11719 * linux-ppc64-low.c:
11720 * linux-ppc-low.c:
11721 * linux-mips-low.c:
11722 * linux-m68k-low.c:
11723 * linux-m32r-low.c:
11724 * linux-low.h:
11725 * linux-low.c:
11726 * linux-ia64-low.c:
11727 * linux-i386-low.c:
11728 * linux-crisv32-low.c:
11729 * thread-db.c:
11730 * terminal.h:
11731 * target.h:
11732 * target.c:
11733 * server.h:
11734 * server.c:
11735 * remote-utils.c:
11736 * regcache.h:
11737 * utils.c:
11738 * Makefile.in:
11739 * configure.ac:
11740 * gdbserver.1: Add (C) after Copyright. Update the FSF
11741 address.
11742
11743 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11744
11745 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11746 (arm_breakpoint_at): Recognize both breakpoints.
11747 (the_low_target): Use the correct breakpoint instruction.
11748
11749 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11750
11751 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11752 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11753 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11754 (the_low_target): Update.
11755
11756 2005-10-25 Andreas Schwab <schwab@suse.de>
11757
11758 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11759
11760 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11761 (ia64_num_regs): Reduce to 462.
11762
11763 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11764
11765 * acinclude.m4: Correct quoting.
11766 * aclocal.m4: Regenerated.
11767
11768 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11769 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11770 (thread_db_init): Call thread_db_err_str.
11771 * configure.ac: Check for TD_VERSION.
11772 * config.in, configure: Regenerated.
11773
11774 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11775
11776 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11777
11778 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11779
11780 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11781 is not available. Define HAVE_PTRACE_GETREGS if it is.
11782 * config.in, configure: Regenerated.
11783 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11784 * linux-i386-low.c, linux-m68k-low.c: Update to use
11785 HAVE_PTRACE_GETREGS.
11786 * linux-low.c (regsets_fetch_inferior_registers)
11787 (regsets_store_inferior_registers): Only return 0 if we processed
11788 GENERAL_REGS.
11789 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11790 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11791
11792 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11793
11794 * inferiors.c (struct thread_info): Add gdb_id.
11795 (add_thread): Add gdb_id argument.
11796 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11797 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11798 calls to add_thread.
11799 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11800 * server.c (handle_query): Use thread_to_gdb_id.
11801 (handle_v_cont, main): Use gdb_id_to_thread_id.
11802 * server.h (add_thread): Update prototype.
11803 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11804 prototypes.
11805
11806 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11807
11808 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11809 left-padded registers.
11810 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11811 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11812
11813 2005-07-01 Steve Ellcey <sje@cup.hp.com>
11814
11815 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11816 * configure: Regenerate.
11817 * config.in: Regenerate.
11818 * server.h (NEED_DECLARATION_STRERROR):
11819 Replace with !HAVE_DECL_STRERROR.
11820
11821 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11822
11823 * linux-low.c (linux_wait, linux_send_signal): Don't test
11824 an unsigned long variable for > 0 if it could be MAX_ULONG.
11825 * server.c (myresume): Likewise.
11826 * target.c (set_desired_inferior): Likewise.
11827
11828 2005-06-13 Mark Kettenis <kettenis@gnu.org>
11829
11830 * configure.ac: Simplify and improve check for socklen_t.
11831 * configure, config.in: Regenerate.
11832
11833 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11834
11835 * acconfig.h: Remove.
11836 * configure.ac: Add a test for socklen_t. Use three-argument
11837 AC_DEFINE throughout.
11838 * config.in: Regenerated using autoheader 2.59.
11839 * configure: Regenerated.
11840
11841 * gdbreplay.c (socklen_t): Provide a default.
11842 (remote_open): Use socklen_t.
11843 * remote-utils.c (socklen_t): Provide a default.
11844 (remote_open): Use socklen_t.
11845 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11846 unsigned char.
11847
11848 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11849 char for buffers.
11850 * linux-low.c (linux_read_memory, linux_write_memory)
11851 (linux_read_auxv): Likewise.
11852 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11853 (check_mem_write): Likewise.
11854 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11855 Likewise.
11856 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11857 (registers_from_string, register_data): Likewise.
11858 * server.c (handle_query, main): Likewise.
11859 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11860 (decode_M_packet): Likewise.
11861 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11862 * target.h (struct target_ops): Update read_memory, write_memory,
11863 and read_auxv.
11864 (read_inferior_memory, write_inferior_memory): Update.
11865 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11866 to unsigned char *.
11867 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11868 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11869 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11870 linux-s390-low.c, linux-sh-low.c: Update for changes in
11871 read_inferior_memory and the_low_target->breakpoint.
11872
11873 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11874
11875 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11876 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11877 * configure.srv: Add powerpc64-*-linux*.
11878 * linux-ppc64-low.c: New file.
11879
11880 2005-05-23 Orjan Friberg <orjanf@axis.com>
11881
11882 * linux-cris-low.c: New file with support for CRIS.
11883 * linux-crisv32-low.c: Ditto for CRISv32.
11884 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11885 (clean): Add reg-cris.c and reg-crisv32.c.
11886 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
11887 reg-crisv32.o, and reg-crisv32.c to make rules.
11888 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11889 recognized targets.
11890
11891 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11892
11893 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11894 of sizeof (PTRACE_XFER_TYPE).
11895 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11896
11897 2005-05-12 Orjan Friberg <orjanf@axis.com>
11898
11899 * target.h (struct target_ops): Add insert_watchpoint,
11900 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11901 pointers for hardware watchpoint support.
11902 * linux-low.h (struct linux_target_ops): Ditto.
11903 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11904 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11905 to linux_target_ops.
11906 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11907 reply packet.
11908 * server.c (main): Recognize 'Z' and 'z' packets.
11909
11910 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11911
11912 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11913 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11914 (the_low_target): Add new members.
11915
11916 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11917
11918 * proc-service.c (ps_lgetregs): Search all_processes instead of
11919 all_threads.
11920
11921 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11922
11923 * server.c (start_inferior): Change return type to int.
11924 (attach_inferior): Change sigptr to int *.
11925 (handle_v_cont, handle_v_requests): Change signal to int *.
11926 (main): Change signal to int.
11927
11928 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
11929
11930 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11931 * configure.srv: Add m32r*-*-linux*.
11932 * linux-m32r-low.c: New file.
11933
11934 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11935
11936 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11937
11938 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11939
11940 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11941 Take unsigned long arguments for PIDs.
11942 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11943 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11944 (wait_for_sigstop, linux_resume_one_process)
11945 (regsets_fetch_inferior_registers, linux_send_signal)
11946 (linux_read_auxv): Likewise. Update the types of variables holding
11947 PIDs. Update format string specifiers.
11948 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11949 * remote-utils.c (prepare_resume_reply): Likewise.
11950 * server.c (cont_thread, general_thread, step_thread)
11951 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11952 unsigned long.
11953 (handle_query): Update format specifiers.
11954 (handle_v_cont, main): Use strtoul for thread IDs.
11955 * server.h (struct inferior_list_entry): Use unsigned long for ID.
11956 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11957 (general_thread, step_thread, thread_from_wait)
11958 (old_thread_from_wait): Update.
11959 * target.h (struct thread_resume): Use unsigned long for THREAD.
11960 (struct target_ops): Use unsigned long for arguments to attach and
11961 thread_alive.
11962
11963 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
11964
11965 * acinclude.m4: Include bfd/bfd.m4 directly.
11966 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
11967 <agriffis@toolchain.org>.
11968 * aclocal.m4, configure: Regenerated.
11969
11970 2005-01-07 Andrew Cagney <cagney@gnu.org>
11971
11972 * configure.ac: Rename configure.in, require autoconf 2.59.
11973 * configure: Re-generate.
11974
11975 2004-12-08 Daniel Jacobowitz <dan@debian.org>
11976
11977 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
11978 LIBS when finished.
11979 * aclocal.m4: Regenerated.
11980 * configure: Regenerated.
11981
11982 2004-11-21 Andreas Schwab <schwab@suse.de>
11983
11984 * linux-m68k-low.c (m68k_num_gregs): Define.
11985 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
11986 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
11987 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
11988 (m68k_breakpoint_at): New. Add to the_low_target.
11989
11990 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
11991 srv_linux_thread_db to yes.
11992
11993 2004-10-20 Joel Brobecker <brobecker@gnat.com>
11994
11995 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
11996 (ARCH_SET_FS): Likewise.
11997 (ARCH_GET_FS): Likewise.
11998 (ARCH_GET_GS): Likewise.
11999
12000 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12001
12002 * linux-i386-low.c (ps_get_thread_area): New.
12003 * linux-x86-64-low.c (ps_get_thread_area): New.
12004 * linux-low.c: Include <sys/syscall.h>.
12005 (linux_kill_one_process): Don't kill the first thread here.
12006 (linux_kill): Kill the first thread here.
12007 (kill_lwp): New function.
12008 (send_sigstop, linux_send_signal): Use it.
12009 * proc-service.c: Clean up #ifdefs.
12010 (fpregset_info): Delete.
12011 (ps_lgetregs): Update and enable implementation.
12012 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12013 implementations.
12014 * remote-utils.c (struct sym_cache, symbol_cache): New.
12015 (input_interrupt): Print a clearer message.
12016 (async_io_enabled): New variable.
12017 (enable_async_io, disable_async_io): Use it. Update comments.
12018 (look_up_one_symbol): Use the symbol cache.
12019 * thread-db.c (thread_db_look_up_symbols): New function.
12020 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12021
12022 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12023
12024 * configure.in: Test for -rdynamic.
12025 * configure: Regenerated.
12026 * Makefile (INTERNAL_LDFLAGS): New.
12027 (gdbserver, gdbreplay): Use it.
12028
12029 2004-09-02 Andrew Cagney <cagney@gnu.org>
12030
12031 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12032
12033 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
12034
12035 * linux-low.c (linux_wait): Clear all_processes list also.
12036
12037 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12038
12039 * linux-low.c: Include <errno.h>. Remove extern declaration of
12040 errno.
12041
12042 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12043
12044 * gdbreplay.c, server.h, utils.c: Update copyright years.
12045
12046 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12047
12048 * server.c (main): Print child status or termination signal from
12049 variable 'signal', not 'sig'.
12050
12051 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12052
12053 * linux-low.c (linux_read_memory): Change return type to
12054 int. Check for and return error from ptrace().
12055 * target.c (read_inferior_memory): Change return type to int. Pass
12056 back return status from the_target->read_memory().
12057 * target.h (struct target_ops): Adapt *read_memory() prototype.
12058 Update comment.
12059 (read_inferior_memory): Adapt prototype.
12060 * server.c (main): Return an error packet if
12061 read_inferior_memory() returns an error.
12062
12063 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
12064
12065 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12066 Unify with other clean targets.
12067
12068 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12069
12070 * server.c (handle_v_cont): Call set_desired_inferior.
12071
12072 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12073
12074 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12075
12076 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12077
12078 * linux-low.c (linux_wait): Unblock async I/O.
12079 (linux_resume): Block and enable async I/O.
12080 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12081 * server.h (block_async_io, unblock_async_io): Add prototypes.
12082
12083 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12084
12085 * remote-utils.c (remote_open): Print a status notice after
12086 opening a TCP port.
12087 * server.c (attach_inferior): Print a status notice after
12088 attaching.
12089
12090 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12091
12092 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12093
12094 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
12095
12096 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12097 error packet.
12098 * server.c, target.h: Update copyright years.
12099
12100 2004-02-25 Roland McGrath <roland@redhat.com>
12101
12102 * target.h (struct target_ops): New member `read_auxv'.
12103 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12104 * linux-low.c (linux_read_auxv): New function.
12105 (linux_target_ops): Initialize `read_auxv' member to that.
12106
12107 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12108
12109 Committed by Jim Blandy <jimb@redhat.com>.
12110
12111 * linux-s390-low.c (s390_num_regs): Update.
12112 (s390_regmap): Remove control registers. Use __s390x__ predefine
12113 instead of GPR_SIZE to distiguish s390 and s390x targets.
12114
12115 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
12116
12117 * linux-low.c: Update copyright year.
12118 (check_removed_breakpoint): Clear pending_is_breakpoint.
12119 (linux_set_resume_request, linux_queue_one_thread)
12120 (resume_status_pending_p): New functions.
12121 (linux_continue_one_thread): Use process->resume.
12122 (linux_resume): Only resume threads if there are no pending events.
12123 * linux-low.h (struct process_info): Add resume request
12124 pointer.
12125
12126 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
12127
12128 * regcache.c (new_register_cache): Clear the allocated register
12129 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12130
12131 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
12132
12133 * linux-low.c (linux_resume): Take a struct thread_resume *
12134 argument.
12135 (linux_wait): Update call.
12136 (resume_ptr): New static variable.
12137 (linux_continue_one_thread): Renamed from
12138 linux_continue_one_process. Use resume_ptr.
12139 (linux_resume): Use linux_continue_one_thread.
12140 * server.c (handle_v_cont, handle_v_requests): New functions.
12141 (myresume): New function.
12142 (main): Handle 'v' case.
12143 * target.h (struct thread_resume): New type.
12144 (struct target_ops): Change argument of "resume" to struct
12145 thread_resume *.
12146 (myresume): Delete macro.
12147
12148 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12149
12150 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12151 (uninstall): Support DESTDIR.
12152
12153 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12154
12155 * configure.srv: Add xscale*linux copy of arm*linux entry.
12156
12157 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
12158
12159 * linux-arm-low.c (arm_reinsert_addr): New function.
12160 (the_low_target): Add arm_reinsert_addr.
12161
12162 2003-07-08 Mark Kettenis <kettenis@gnu.org>
12163
12164 * mem-break.c: Remove whitespace at end of file.
12165
12166 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12167
12168 * configure.in: Check whether we need to prototype strerror.
12169 * server.h: Optionally prototype strerror.
12170 * gdbreplay.c (perror_with_name): Use strerror.
12171 * linux-low.c (linux_attach_lwp): Use strerror.
12172 * utils.c (perror_with_name): Use strerror.
12173 * config.in, configure: Regenerated.
12174
12175 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12176
12177 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12178 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12179
12180 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
12181
12182 * Makefile.in (SFILES): Update.
12183 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12184 low-sun3.c: Remove files.
12185
12186 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
12187
12188 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12189 (linux_detach_one_process, linux_detach): New functions.
12190 (linux_target_ops): Add linux_detach.
12191 * server.c (main): Handle 'D' packet.
12192 * target.h (struct target_ops): Add "detach" member.
12193 (detach_inferior): Define.
12194
12195 2003-06-13 Mark Kettenis <kettenis@gnu.org>
12196
12197 From Kelley Cook <kelleycook@wideopenwest.com>:
12198 * configure.srv: Accept i[34567]86 variants.
12199
12200 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
12201
12202 * linux-low.c (linux_wait_for_event): Correct comment typos.
12203 (linux_resume_one_process): Call check_removed_breakpoint.
12204 (linux_send_signal): New function.
12205 (linux_target_ops): Add linux_send_signal.
12206 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12207 of kill.
12208 * target.h (struct target_ops): Add send_signal.
12209
12210 2003-05-29 Jim Blandy <jimb@redhat.com>
12211
12212 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12213 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12214 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12215 away part of the register's value.
12216
12217 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
12218
12219 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12220 (linux_wait_for_event, linux_init_signals): Likewise.
12221
12222 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
12223
12224 * configure.in: Check for stdlib.h.
12225 * configure: Regenerated.
12226 * config.in: Regenerated.
12227
12228 2003-01-04 Andreas Schwab <schwab@suse.de>
12229
12230 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12231
12232 2003-01-02 Andrew Cagney <ac131313@redhat.com>
12233
12234 * Makefile.in: Remove obsolete code.
12235
12236 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
12237
12238 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12239 defined(PT_FPR0_HI).
12240
12241 2002-11-17 Stuart Hughes <seh@zee2.com>
12242
12243 * linux-arm-low.c (arm_num_regs): Increase.
12244 (arm_regmap): Include status register.
12245
12246 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
12247
12248 * linux-low.c (register_addr): Remove incorrect -1 check.
12249
12250 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
12251
12252 * linux-low.c (linux_create_inferior): Call setpgid. Return
12253 the new PID.
12254 (unstopped_p, linux_signal_pid): Remove.
12255 (linux_target_ops): Remove linux_signal_pid.
12256 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12257 global instead of target method.
12258 * target.h (struct target_ops): Remove signal_pid. Update comment
12259 for create_inferior.
12260 * server.c (signal_pid): New variable.
12261 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
12262 gdbserver. Set the child to be the foreground process group.
12263 (attach_inferior): Set signal_pid.
12264
12265 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
12266
12267 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12268
12269 2002-08-20 Jim Blandy <jimb@redhat.com>
12270
12271 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12272 default for this.
12273
12274 2002-08-01 Andrew Cagney <cagney@redhat.com>
12275
12276 * Makefile.in: Make chill references obsolete.
12277
12278 2002-07-24 Kevin Buettner <kevinb@redhat.com>
12279
12280 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12281 * configure: Regenerate.
12282 * config.in: Regenerate.
12283
12284 2002-07-09 David O'Brien <obrien@FreeBSD.org>
12285
12286 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12287 (perror_with_name, remote_close, remote_open, expect, play): Static.
12288
12289 2002-07-04 Michal Ludvig <mludvig@suse.cz>
12290
12291 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
12292 byte offsets instead of an array of indexes.
12293 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12294
12295 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
12296
12297 * regcache.c: Add comment.
12298
12299 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
12300
12301 * thread-db.c: New file.
12302 * proc-service.c: New file.
12303 * acinclude.m4: New file.
12304 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12305 proc-service.o, and thread-db.o.
12306 (linux-low.o): Add USE_THREAD_DB.
12307 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12308 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12309 * aclocal.m4: Regenerated.
12310 * config.in: Regenerated.
12311 * configure: Regenerated.
12312 * configure.in: Check for proc_service.h, sys/procfs.h,
12313 thread_db.h, and linux/elf.h headrs.
12314 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12315 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12316 Check for -lthread_db and thread support.
12317 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12318 PowerPC, and SuperH.
12319 * i387-fp.c: Constify arguments.
12320 * i387-fp.h: Likewise.
12321 * inferiors.c: (struct thread_info): Renamed from
12322 `struct inferior_info'. Remove PID member. Use generic inferior
12323 list header. All uses updated.
12324 (inferiors, signal_pid): Removed.
12325 (all_threads): New variable.
12326 (get_thread): Define.
12327 (add_inferior_to_list): New function.
12328 (for_each_inferior): New function.
12329 (change_inferior_id): New function.
12330 (add_inferior): Removed.
12331 (remove_inferior): New function.
12332 (add_thread): New function.
12333 (free_one_thread): New function.
12334 (remove_thread): New function.
12335 (clear_inferiors): Use for_each_inferior and free_one_thread.
12336 (find_inferior): New function.
12337 (find_inferior_id): New function.
12338 (inferior_target_data): Update argument type.
12339 (set_inferior_target_data): Likewise.
12340 (inferior_regcache_data): Likewise.
12341 (set_inferior_regcache_data): Likewise.
12342 * linux-low.c (linux_bp_reinsert): Remove.
12343 (all_processes, stopping_threads, using_thrads)
12344 (struct pending_signals, debug_threads, pid_of): New.
12345 (inferior_pid): Replace with macro.
12346 (struct inferior_linux_data): Remove.
12347 (get_stop_pc, add_process): New functions.
12348 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12349 Use add_process and add_thread.
12350 (linux_attach_lwp): New function, based on old linux_attach. Use
12351 add_process and add_thread. Set stop_expected for new threads.
12352 (linux_attach): New function.
12353 (linux_kill_one_process): New function.
12354 (linux_kill): Kill all LWPs.
12355 (linux_thread_alive): Use find_inferior_id.
12356 (check_removed_breakpoints, status_pending_p): New functions.
12357 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12358 Update. Use WNOHANG. Wait for cloned processes also. Update process
12359 struct for the found process.
12360 (linux_wait_for_event): New function.
12361 (linux_wait): Use it. Support LWPs.
12362 (send_sigstop, wait_for_sigstop, stop_all_processes)
12363 (linux_resume_one_process, linux_continue_one_process): New functions.
12364 (linux_resume): Support LWPs.
12365 (REGISTER_RAW_SIZE): Remove.
12366 (fetch_register): Use register_size instead. Call supply_register.
12367 (usr_store_inferior_registers): Likewise. Call collect_register.
12368 Fix recursive case.
12369 (regsets_fetch_inferior_registers): Improve error message.
12370 (regsets_store_inferior_registers): Add debugging.
12371 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12372 (unstopped_p, linux_signal_pid): New functions.
12373 (linux_target_ops): Add linux_signal_pid.
12374 (linux_init_signals): New function.
12375 (initialize_low): Call it. Initialize using_threads.
12376 * regcache.c (inferior_regcache_data): Add valid
12377 flag.
12378 (get_regcache): Fetch registers lazily. Add fetch argument
12379 and update all callers.
12380 (regcache_invalidate_one, regcache_invalidate): New
12381 functions.
12382 (new_register_cache): Renamed from create_register_cache.
12383 Return the new regcache.
12384 (free_register_cache): Change argument to a void *.
12385 (registers_to_string, registers_from_string): Call get_regcache
12386 with fetch flag set.
12387 (register_data): Make static. Pass fetch flag to get_regcache.
12388 (supply_register): Call get_regcache with fetch flag clear.
12389 (collect_register): Call get_regcache with fetch flag set.
12390 (collect_register_as_string): New function.
12391 * regcache.h: Update.
12392 * remote-utils.c (putpkt): Flush after debug output and use
12393 stderr.
12394 Handle input interrupts while waiting for an ACK.
12395 (input_interrupt): Use signal_pid method.
12396 (getpkt): Flush after debug output and use stderr.
12397 (outreg): Use collect_register_as_string.
12398 (new_thread_notify, dead_thread_notify): New functions.
12399 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12400 and general_thread.
12401 (look_up_one_symbol): Flush after debug output.
12402 * server.c (step_thread, server_waiting): New variables.
12403 (start_inferior): Don't use signal_pid. Update call to mywait.
12404 (attach_inferior): Update call to mywait.
12405 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12406 (main): Don't fetch/store registers explicitly. Use
12407 set_desired_inferior. Support proposed ``Hs'' packet. Update
12408 calls to mywait.
12409 * server.h: Update.
12410 (struct inferior_list, struct_inferior_list_entry): New.
12411 * target.c (set_desired_inferior): New.
12412 (write_inferior_memory): Constify.
12413 (mywait): New function.
12414 * target.h: Update.
12415 (struct target_ops): New signal_pid method.
12416 (mywait): Removed macro, added prototype.
12417
12418 * linux-low.h (regset_func): Removed.
12419 (regset_fill_func, regset_store_func): New.
12420 (enum regset_type): New.
12421 (struct regset_info): Add type field. Use new operation types.
12422 (struct linux_target_ops): stop_pc renamed to get_pc.
12423 Add decr_pc_after_break and breakpoint_at.
12424 (get_process, get_thread_proess, get_process_thread)
12425 (strut process_info, all_processes, linux_attach_lwp)
12426 (thread_db_init): New.
12427
12428 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12429 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12430 (the_low_target): Add new members.
12431 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12432 (i386_store_fpxregset): Constify.
12433 (target_regsets): Add new kind identifier.
12434 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12435 (i386_set_pc): Add debugging.
12436 (i386_breakpoint_at): New function.
12437 (the_low_target): Add new members.
12438 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12439 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12440 (mips_breakpoint_at): New.
12441 (the_low_target): Add new members.
12442 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12443 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12444 (the_low_target): Add new members.
12445 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12446 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12447 (the_low_target): Add new members.
12448 * linux-x86-64-low.c (target_regsets): Add new kind
12449 identifier.
12450
12451 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
12452
12453 From Martin Pool <mbp@samba.org>:
12454 * server.c (gdbserver_usage): New function.
12455 (main): Call it.
12456
12457 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
12458
12459 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12460 stop_at -> stop_pc.
12461
12462 2002-05-04 Andrew Cagney <ac131313@redhat.com>
12463
12464 * Makefile.in: Remove obsolete code.
12465
12466 2002-04-24 Michal Ludvig <mludvig@suse.cz>
12467
12468 * linux-low.c (regsets_fetch_inferior_registers),
12469 (regsets_store_inferior_registers): Removed cast to int from
12470 ptrace() calls.
12471 * regcache.h: Added declaration of struct inferior_info.
12472
12473 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12474
12475 * inferiors.c (struct inferior_info): Add regcache_data.
12476 (add_inferior): Call create_register_cache.
12477 (clear_inferiors): Call free_register_cache.
12478 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12479 * regcache.c (struct inferior_regcache_data): New.
12480 (registers): Remove.
12481 (get_regcache): New function.
12482 (create_register_cache, free_register_cache): New functions.
12483 (set_register_cache): Don't initialize the register cache here.
12484 (registers_to_string, registers_from_string, register_data): Call
12485 get_regcache.
12486 * regcache.h: Add prototypes.
12487 * server.h: Likewise.
12488
12489 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12490
12491 * mem-break.c: New file.
12492 * mem-break.h: New file.
12493 * Makefile.in: Add mem-break.o rule; update server.h
12494 dependencies.
12495 * inferiors.c (struct inferior_info): Add target_data
12496 member.
12497 (clear_inferiors): Free target_data member if set.
12498 (inferior_target_data, set_inferior_target_data): New functions.
12499 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12500 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12501 * linux-low.c (linux_bp_reinsert): New variable.
12502 (struct inferior_linux_data): New.
12503 (linux_create_inferior): Use set_inferior_target_data.
12504 (linux_attach): Likewise. Call add_inferior.
12505 (linux_wait_for_one_inferior): New function.
12506 (linux_wait): Call it.
12507 (linux_write_memory): Add const.
12508 (initialize_low): Call set_breakpoint_data.
12509 * linux-low.h (struct linux_target_ops): Add breakpoint
12510 handling members.
12511 * server.c (attach_inferior): Remove extra add_inferior
12512 call.
12513 * server.h: Include mem-break.h. Update inferior.c
12514 prototypes.
12515 * target.c (read_inferior_memory)
12516 (write_inferior_memory): New functions.
12517 * target.h (read_inferior_memory)
12518 (write_inferior_memory): Change macros to prototypes.
12519 (struct target_ops): Update comments. Add const to write_memory
12520 definition.
12521
12522 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
12523
12524 * linux-low.c (usr_store_inferior_registers): Support
12525 registers which are allowed to fail to store.
12526 * linux-low.h (linux_target_ops): Likewise.
12527 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12528 (ppc_cannot_store_register): FPSCR may not be storable.
12529
12530 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12531
12532 * server.h: Include <string.h> if HAVE_STRING_H.
12533 * ChangeLog: Correct paths in last ChangeLog entry.
12534
12535 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12536
12537 * linux-low.h: Remove obsolete prototypes.
12538 (struct linux_target_ops): New.
12539 (extern the_low_target): New.
12540 * linux-low.c (num_regs, regmap): Remove declarations.
12541 (register_addr): Use the_low_target explicitly.
12542 (fetch_register): Likewise.
12543 (usr_fetch_inferior_registers): Likewise.
12544 (usr_store_inferior_registers): Likewise.
12545 * linux-arm-low.c (num_regs): Remove.
12546 (arm_num_regs): Define.
12547 (arm_regmap): Renamed from regmap, made static.
12548 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12549 made static.
12550 (arm_cannot_store_register): Renamed from cannot_store_register,
12551 made static.
12552 (the_low_target): New.
12553 * linux-i386-low.c (num_regs): Remove.
12554 (i386_num_regs): Define.
12555 (i386_regmap): Renamed from regmap, made static.
12556 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12557 made static.
12558 (i386_cannot_store_register): Renamed from cannot_store_register,
12559 made static.
12560 (the_low_target): New.
12561 * linux-ia64-low.c (num_regs): Remove.
12562 (ia64_num_regs): Define.
12563 (ia64_regmap): Renamed from regmap, made static.
12564 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12565 made static.
12566 (ia64_cannot_store_register): Renamed from cannot_store_register,
12567 made static.
12568 (the_low_target): New.
12569 * linux-m68k-low.c (num_regs): Remove.
12570 (m68k_num_regs): Define.
12571 (m68k_regmap): Renamed from regmap, made static.
12572 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12573 made static.
12574 (m68k_cannot_store_register): Renamed from cannot_store_register,
12575 made static.
12576 (the_low_target): New.
12577 * linux-mips-low.c (num_regs): Remove.
12578 (mips_num_regs): Define.
12579 (mips_regmap): Renamed from regmap, made static.
12580 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12581 made static.
12582 (mips_cannot_store_register): Renamed from cannot_store_register,
12583 made static.
12584 (the_low_target): New.
12585 * linux-ppc-low.c (num_regs): Remove.
12586 (ppc_num_regs): Define.
12587 (ppc_regmap): Renamed from regmap, made static.
12588 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12589 made static.
12590 (ppc_cannot_store_register): Renamed from cannot_store_register,
12591 made static.
12592 (the_low_target): New.
12593 * linux-s390-low.c (num_regs): Remove.
12594 (s390_num_regs): Define.
12595 (s390_regmap): Renamed from regmap, made static.
12596 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12597 made static.
12598 (s390_cannot_store_register): Renamed from cannot_store_register,
12599 made static.
12600 (the_low_target): New.
12601 * linux-sh-low.c (num_regs): Remove.
12602 (sh_num_regs): Define.
12603 (sh_regmap): Renamed from regmap, made static.
12604 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12605 made static.
12606 (sh_cannot_store_register): Renamed from cannot_store_register,
12607 made static.
12608 (the_low_target): New.
12609 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12610 (the_low_target): New.
12611
12612 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12613
12614 * Makefile.in: Add stamp-h target.
12615 * configure.in: Create stamp-h.
12616 * configure: Regenerated.
12617
12618 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12619
12620 * inferiors.c: New file.
12621 * target.c: New file.
12622 * target.h: New file.
12623 * Makefile.in: Add target.o and inferiors.o. Update
12624 dependencies.
12625 * linux-low.c (inferior_pid): New static variable,
12626 moved from server.c.
12627 (linux_create_inferior): Renamed from create_inferior.
12628 Call add_inferior. Return 0 on success instead of a PID.
12629 (linux_attach): Renamed from myattach.
12630 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12631 (linux_thread_alive): Renamed from mythread_alive.
12632 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12633 child dies.
12634 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12635 (regsets_store_inferior_registers): Correct error message.
12636 Add missing ``return 0''.
12637 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12638 (linux_store_registers): Renamed from store_inferior_registers.
12639 (linux_read_memory): Renamed from read_inferior_memory.
12640 (linux_write_memory): Renamed from write_inferior_memory.
12641 (linux_target_ops): New structure.
12642 (initialize_low): Call set_target_ops ().
12643 * remote-utils.c (unhexify): New function.
12644 (hexify): New function.
12645 (input_interrupt): Send signals to ``signal_pid''.
12646 * server.c (inferior_pid): Remove.
12647 (start_inferior): Update create_inferior call.
12648 (attach_inferior): Call add_inferior.
12649 (handle_query): New function.
12650 (main): Call handle_query for `q' packets.
12651 * server.h: Include "target.h". Remove obsolete prototypes.
12652 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12653
12654 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12655
12656 * Makefile.in: Add WARN_CFLAGS. Update configury
12657 dependencies.
12658 * configure.in: Check for <string.h>
12659 * configure: Regenerate.
12660 * config.in: Regenerate.
12661 * gdbreplay.c: Include needed system headers.
12662 (remote_open): Remove strchr prototype.
12663 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12664 * regcache.c (supply_register): Change buf argument to const void *.
12665 (supply_register_by_name): Likewise.
12666 (collect_register): Change buf argument to void *.
12667 (collect_register_by_name): Likewise.
12668 * regcache.h: Add missing prototypes.
12669 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12670 * server.c (handle_query): New function.
12671 (attached): New static variable, moved out of main.
12672 (main): Quiet longjmp clobber warnings.
12673 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12674 * utils.c (error): Remove NORETURN.
12675 (fatal): Likewise.
This page took 0.343766 seconds and 4 git commands to generate.