]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
[C++/mingw] Fix windows-nat.c::xlate
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
c0879059
PA
12015-11-17 Pedro Alves <palves@redhat.com>
2
3 * win32-low.c (handle_output_debug_string): Remove parameter.
4 (win32_kill): Remove our_status local and adjust call to
5 handle_output_debug_string.
6 (get_child_debug_event): Adjust call to
7 handle_output_debug_string.
8
1996e237
SM
92015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
10
11 * linux-mips-low.c (mips_fill_gregset): Add cast.
12 (mips_store_gregset): Likewise.
13 (mips_fill_fpregset): Likewise.
14 (mips_store_fpregset): Likewise.
15
cbec665b
SM
162015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
17
18 * linux-mips-low.c (mips_add_watchpoint): Rename private to
19 priv.
20
eb3e3c67
SM
212015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
22
23 * linux-mips-low.c (mips_linux_new_thread): Change type of
24 watch_type to enum target_hw_bp_type.
25
171de4b8
SM
262015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
27
28 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
29 Change return type to arm_hwbp_type.
30
04248ead
SM
312015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
32
33 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
34 (arm_store_gregset): Likewise.
35 * linux-arm-low.c (arm_get_hwcap): Likewise.
36 (arm_read_description): Likewise.
37
04b3479c
SM
382015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
39
40 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
41
2bc84e8a
SM
422015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
43
44 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
45 (ppc_fill_vsxregset): Likewise.
46 (ppc_store_vsxregset): Likewise.
47 (ppc_fill_vrregset): Likewise.
48 (ppc_store_vrregset): Likewise.
49 (ppc_fill_evrregset): Likewise.
50 (ppc_store_evrregset): Likewise.
51
e6c5bb05
SM
522015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
53
54 * linux-ppc-low.c (ppc_usrregs_info): Remove
55 forward-declaration.
56 (ppc_arch_setup): Move lower in file.
57
7ea45d72
SM
582015-10-30 Simon Marchi <simon.marchi@ericsson.com>
59
60 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
61 (ps_pdwrite): Likewise.
62
69291610
HW
632015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
64
65 * linux-arm-low.c (arm_new_thread): Move pointer dereference
66 to after assert checks.
67
b42945fd
SM
682015-10-29 Simon Marchi <simon.marchi@ericsson.com>
69
70 * proc-service.c (ps_pdread): Add/adjust casts.
71 (ps_pdwrite): Add/adjust casts.
72
d6f85c84
SM
732015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
74
75 * server.c (handle_search_memory_1): Cast return value of
76 memmem.
77
f98cd059
SM
782015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
79
80 * server.c (write_qxfer_response): Change type of data to
81 gdb_byte *.
82
d2412fa5
PA
832015-10-29 Pedro Alves <palves@redhat.com>
84
85 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
86
c17414a2
PA
872015-10-29 Pedro Alves <palves@redhat.com>
88
89 * tracepoint.c (clear_installed_tracepoints): Add casts.
90
e053fbc4
PA
912015-10-29 Pedro Alves <palves@redhat.com>
92
93 * server.c (handle_v_cont, process_serial_event): Add enum
94 gdb_signal casts to signal parsing code.
95
add67df8
PA
962015-10-29 Pedro Alves <palves@redhat.com>
97
98 * linux-low.h (NULL_REGSET): Define.
99 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
100 * linux-arm-low.c (arm_regsets): Likewise.
101 * linux-crisv32-low.c (cris_regsets): Likewise.
102 * linux-m68k-low.c (m68k_regsets): Likewise.
103 * linux-mips-low.c (mips_regsets): Likewise.
104 * linux-nios2-low.c (nios2_regsets): Likewise.
105 * linux-ppc-low.c (ppc_regsets): Likewise.
106 * linux-s390-low.c (s390_regsets): Likewise.
107 * linux-sh-low.c (sh_regsets): Likewise.
108 * linux-sparc-low.c (sparc_regsets): Likewise.
109 * linux-tic6x-low.c (tic6x_regsets): Likewise.
110 * linux-tile-low.c (tile_regsets): Likewise.
111 * linux-x86-low.c (x86_regsets): Likewise.
112 * linux-xtensa-low.c (xtensa_regsets): Likewise.
113
50bc912a
PA
1142015-10-29 Pedro Alves <palves@redhat.com>
115
116 * linux-low.h (NULL_REGSET): Define.
117 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
118 * linux-arm-low.c (arm_regsets): Likewise.
119 * linux-crisv32-low.c (cris_regsets): Likewise.
120 * linux-m68k-low.c (m68k_regsets): Likewise.
121 * linux-mips-low.c (mips_regsets): Likewise.
122 * linux-nios2-low.c (nios2_regsets): Likewise.
123 * linux-ppc-low.c (ppc_regsets): Likewise.
124 * linux-s390-low.c (s390_regsets): Likewise.
125 * linux-sh-low.c (sh_regsets): Likewise.
126 * linux-sparc-low.c (sparc_regsets): Likewise.
127 * linux-tic6x-low.c (tic6x_regsets): Likewise.
128 * linux-tile-low.c (tile_regsets): Likewise.
129 * linux-x86-low.c (x86_regsets): Likewise.
130 * linux-xtensa-low.c (xtensa_regsets): Likewise.
131
682b2546
DE
1322015-10-26 Doug Evans <dje@google.com>
133
134 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
135
963843d4
DE
1362015-10-26 Doug Evans <dje@google.com>
137
138 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
139
d41401ac
DE
1402015-10-26 Doug Evans <dje@google.com>
141
142 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
143 for debug_printf.
144 (attach_thread, find_new_threads_callback): Ditto.
145
3db28855
AT
1462015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
147
148 * mem-break.h (set_breakpoint_data): Remove.
149
fb78e89c
AT
1502015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
151
152 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
153 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
154 (initialize_low): Remove set_breakpoint_data call.
155 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
156 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
157 (initialize_low): Remove set_breakpoint_data call.
158 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
159 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
160 (initialize_low): Remove set_breakpoint_data call.
161
2e6ee069
AT
1622015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
163
164 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
165 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
166 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
167 * target.h (target_breakpoint_kind_from_pc): New macro.
168
1652a986
AT
1692015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
170
171 * linux-low.c (default_breakpoint_kind_from_pc): New function.
172 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
173 the default breakpoint kind.
174
abeead09
AT
1752015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
176
177 * linux-arm-low.c (arm_supports_z_point_type): Add software
178 breakpoint support.
179
b0b4b501
AT
1802015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
181
182 * linux-arm-low.c: Refactor breakpoint definitions.
183 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
184 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
185
8689682c
AT
1862015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
187
188 * Makefile.in: Add arm.c/o.
189 * configure.srv: Likewise.
190 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
191 (arm_breakpoint_kind_from_pc): New function.
192 (arm_sw_breakpoint_from_kind): Return proper kind.
193 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
194
27165294
AT
1952015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
196
197 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
198 removal.
199 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
200 (struct raw_breakpoint) <size>: Remove.
201 (struct raw_breakpoint) <kind>: Add.
202 (bp_size): New function.
203 (bp_opcode): Likewise.
204 (find_raw_breakpoint_at): Adjust for kind.
205 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
206 (remove_memory_breakpoint): Adjust for kind call bp_size.
207 (set_raw_breakpoint_at): Adjust for kind.
208 (set_breakpoint): Likewise.
209 (set_breakpoint_at): Call breakpoint_kind_from_pc.
210 (delete_raw_breakpoint): Adjust for kind.
211 (delete_breakpoint): Likewise.
212 (find_gdb_breakpoint): Likewise.
213 (set_gdb_breakpoint_1): Likewise.
214 (set_gdb_breakpoint): Likewise.
215 (delete_gdb_breakpoint_1): Likewise.
216 (delete_gdb_breakpoint): Likewise.
217 (uninsert_raw_breakpoint): Likewise.
218 (reinsert_raw_breakpoint): Likewise.
219 (set_breakpoint_data): Remove.
220 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
221 (check_mem_read): Adjust for kind call bp_size.
222 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
223 (clone_one_breakpoint): Adjust for kind.
224 * mem-break.h (set_gdb_breakpoint): Likewise.
225 (delete_gdb_breakpoint): Likewise.
226 * server.c (process_serial_event): Likewise.
227
dd373349
AT
2282015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
229
230 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
231 (struct linux_target_ops) <breakpoint>: Remove.
232 (struct linux_target_ops) <breakpoint_len>: Remove.
233 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
234 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
235 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
236 (arm_sw_breakpoint_from_kind): New function.
237 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
238 (struct linux_target_ops) <breakpoint>: Remove.
239 (struct linux_target_ops) <breakpoint_len>: Remove.
240 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
241 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
242 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
243 (struct linux_target_ops) <breakpoint>: Remove.
244 (struct linux_target_ops) <breakpoint_len>: Remove.
245 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
246 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
247 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
248 (struct linux_target_ops) <breakpoint>: Remove.
249 (struct linux_target_ops) <breakpoint_len>: Remove.
250 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
251 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
252 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
253 and sw_breakpoint_from_kind to increment the pc.
254 (linux_breakpoint_kind_from_pc): New function.
255 (linux_sw_breakpoint_from_kind): New function.
256 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
257 (initialize_low): Call breakpoint_kind_from_pc and
258 sw_breakpoint_from_kind to replace breakpoint_data/len.
259 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
260 New field.
261 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
262 * linux-m32r-low.c (m32r_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 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
268 (struct linux_target_ops) <breakpoint>: Remove.
269 (struct linux_target_ops) <breakpoint_len>: Remove.
270 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
271 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
272 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
273 (struct linux_target_ops) <breakpoint>: Remove.
274 (struct linux_target_ops) <breakpoint_len>: Remove.
275 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
276 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
277 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
278 (struct linux_target_ops) <breakpoint>: Remove.
279 (struct linux_target_ops) <breakpoint_len>: Remove.
280 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
281 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
282 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
283 (struct linux_target_ops) <breakpoint>: Remove.
284 (struct linux_target_ops) <breakpoint_len>: Remove.
285 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
286 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
287 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
288 (struct linux_target_ops) <breakpoint>: Remove.
289 (struct linux_target_ops) <breakpoint_len>: Remove.
290 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
291 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
292 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
293 (struct linux_target_ops) <breakpoint>: Remove.
294 (struct linux_target_ops) <breakpoint_len>: Remove.
295 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
296 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
297 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
298 (struct linux_target_ops) <breakpoint>: Remove.
299 (struct linux_target_ops) <breakpoint_len>: Remove.
300 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
301 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
302 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
303 (struct linux_target_ops) <breakpoint>: Remove.
304 (struct linux_target_ops) <breakpoint_len>: Remove.
305 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
306 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
307 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
308 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
309 (struct linux_target_ops) <breakpoint>: Remove.
310 (struct linux_target_ops) <breakpoint_len>: Remove.
311 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
312 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
313 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
314 (struct linux_target_ops) <breakpoint>: Remove.
315 (struct linux_target_ops) <breakpoint_len>: Remove.
316 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
317 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
318
4cd98a19
AT
3192015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
320
321 * linux-cris-low.c (cris_get_pc): Remove void arg.
322
774ee6d2
AR
3232015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
324
325 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
326 variable name.
327
833dcd29
AR
3282015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
329
330 * inferiors.c (thread_pid_matches_callback): New function.
331 (find_thread_process): New function.
332 (remove_thread): Reset current_thread.
333 (remove_process): Assert threads have been removed first.
334
8d689ee5
YQ
3352015-10-15 Yao Qi <yao.qi@linaro.org>
336
337 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
338 if it is 3.
339 (aarch64_remove_point): Likewise.
340 * regcache.c (regcache_register_size): New function.
341
1c2e1515
YQ
3422015-10-12 Yao Qi <yao.qi@linaro.org>
343
344 * linux-aarch64-low.c: Update all callers as emit_load_store
345 is renamed to aarch64_emit_load_store.
346
e1c587c3
YQ
3472015-10-12 Yao Qi <yao.qi@linaro.org>
348
349 * linux-aarch64-low.c: Update all callers of function renaming
350 from emit_insn to aarch64_emit_insn.
351
b6542f81
YQ
3522015-10-12 Yao Qi <yao.qi@linaro.org>
353
354 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
355 arch/aarch64-insn.h.
356 (struct aarch64_memory_operand): Likewise.
357 (ENCODE): Likewise.
358 (emit_insn): Move to arch/aarch64-insn.c.
359 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
360 (emit_load_store): Move to arch/aarch64-insn.c.
361 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
362 (can_encode_int32): Remove.
363
246994ce
YQ
3642015-10-12 Yao Qi <yao.qi@linaro.org>
365
366 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
367 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
368 (aarch64_relocate_instruction): Likewise.
369 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
370 (struct aarch64_insn_visitor): Likewise.
371
0badd99f
YQ
3722015-10-12 Yao Qi <yao.qi@linaro.org>
373
374 * linux-aarch64-low.c (struct aarch64_insn_data): New.
375 (struct aarch64_insn_visitor): New.
376 (struct aarch64_insn_relocation_data): New.
377 (aarch64_ftrace_insn_reloc_b): New function.
378 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
379 (aarch64_ftrace_insn_reloc_cb): Likewise.
380 (aarch64_ftrace_insn_reloc_tb): Likewise.
381 (aarch64_ftrace_insn_reloc_adr): Likewise.
382 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
383 (aarch64_ftrace_insn_reloc_others): Likewise.
384 (visitor): New.
385 (aarch64_relocate_instruction): Use visitor.
386
dfaffe9d
YQ
3872015-10-12 Yao Qi <yao.qi@linaro.org>
388
389 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
390 int. Add argument buf.
391 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
392 aarch64_relocate_instruction.
393
70b439f0
YQ
3942015-10-12 Yao Qi <yao.qi@linaro.org>
395
396 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
397 argument insn. Remove local variable insn. Don't call
398 target_read_uint32.
399 (aarch64_install_fast_tracepoint_jump_pad): Call
400 target_read_uint32.
401
7781c06f
YQ
4022015-09-30 Yao Qi <yao.qi@linaro.org>
403
404 * linux-aarch64-low.c (emit_movk): Shorten a long line.
405 (emit_load_store_pair): Likewise.
406
9a3c8263
SM
4072015-09-25 Simon Marchi <simon.marchi@ericsson.com>
408
409 * dll.c (match_dll): Add cast(s).
410 (unloaded_dll): Likewise.
411 * linux-low.c (second_thread_of_pid_p): Likewise.
412 (delete_lwp_callback): Likewise.
413 (count_events_callback): Likewise.
414 (select_event_lwp_callback): Likewise.
415 (linux_set_resume_request): Likewise.
416 * server.c (accumulate_file_name_length): Likewise.
417 (emit_dll_description): Likewise.
418 (handle_qxfer_threads_worker): Likewise.
419 (visit_actioned_threads): Likewise.
420 * thread-db.c (any_thread_of): Likewise.
421 * tracepoint.c (same_process_p): Likewise.
422 (match_blocktype): Likewise.
423 (build_traceframe_info_xml): Likewise.
424
224c3ddb
SM
4252015-09-25 Simon Marchi <simon.marchi@ericsson.com>
426
427 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
428 assignment.
429 (gdb_unparse_agent_expr): Likewise.
430 * hostio.c (require_data): Likewise.
431 (handle_pread): Likewise.
432 * linux-low.c (disable_regset): Likewise.
433 (fetch_register): Likewise.
434 (store_register): Likewise.
435 (get_dynamic): Likewise.
436 (linux_qxfer_libraries_svr4): Likewise.
437 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
438 (set_fast_tracepoint_jump): Likewise.
439 (uninsert_fast_tracepoint_jumps_at): Likewise.
440 (reinsert_fast_tracepoint_jumps_at): Likewise.
441 (validate_inserted_breakpoint): Likewise.
442 (clone_agent_expr): Likewise.
443 * regcache.c (init_register_cache): Likewise.
444 * remote-utils.c (putpkt_binary_1): Likewise.
445 (decode_M_packet): Likewise.
446 (decode_X_packet): Likewise.
447 (look_up_one_symbol): Likewise.
448 (relocate_instruction): Likewise.
449 (monitor_output): Likewise.
450 * server.c (handle_search_memory): Likewise.
451 (handle_qxfer_exec_file): Likewise.
452 (handle_qxfer_libraries): Likewise.
453 (handle_qxfer): Likewise.
454 (handle_query): Likewise.
455 (handle_v_cont): Likewise.
456 (handle_v_run): Likewise.
457 (captured_main): Likewise.
458 * target.c (write_inferior_memory): Likewise.
459 * thread-db.c (try_thread_db_load_from_dir): Likewise.
460 * tracepoint.c (init_trace_buffer): Likewise.
461 (add_tracepoint_action): Likewise.
462 (add_traceframe): Likewise.
463 (add_traceframe_block): Likewise.
464 (cmd_qtdpsrc): Likewise.
465 (cmd_qtdv): Likewise.
466 (cmd_qtstatus): Likewise.
467 (response_source): Likewise.
468 (response_tsv): Likewise.
469 (cmd_qtnotes): Likewise.
470 (gdb_collect): Likewise.
471 (initialize_tracepoint): Likewise.
472
afbe19f8
PL
4732015-09-21 Pierre Langlois <pierre.langlois@arm.com>
474
475 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
476 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
477 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
478 <NOP>: New.
479 (enum aarch64_condition_codes): New enum.
480 (w0): New static global.
481 (fp): Likewise.
482 (lr): Likewise.
483 (struct aarch64_memory_operand) <type>: New
484 MEMORY_OPERAND_POSTINDEX type.
485 (postindex_memory_operand): New helper function.
486 (emit_ret): New function.
487 (emit_load_store_pair): New function, factored out of emit_stp
488 with support for MEMORY_OPERAND_POSTINDEX.
489 (emit_stp): Rewrite using emit_load_store_pair.
490 (emit_ldp): New function.
491 (emit_load_store): Likewise.
492 (emit_ldr): Mention post-index instruction in comment.
493 (emit_ldrh): New function.
494 (emit_ldrb): New function.
495 (emit_ldrsw): Mention post-index instruction in comment.
496 (emit_str): Likewise.
497 (emit_subs): New function.
498 (emit_cmp): Likewise.
499 (emit_and): Likewise.
500 (emit_orr): Likewise.
501 (emit_orn): Likewise.
502 (emit_eor): Likewise.
503 (emit_mvn): Likewise.
504 (emit_lslv): Likewise.
505 (emit_lsrv): Likewise.
506 (emit_asrv): Likewise.
507 (emit_mul): Likewise.
508 (emit_sbfm): Likewise.
509 (emit_sbfx): Likewise.
510 (emit_ubfm): Likewise.
511 (emit_ubfx): Likewise.
512 (emit_csinc): Likewise.
513 (emit_cset): Likewise.
514 (emit_nop): Likewise.
515 (emit_ops_insns): New helper function.
516 (emit_pop): Likewise.
517 (emit_push): Likewise.
518 (aarch64_emit_prologue): New function.
519 (aarch64_emit_epilogue): Likewise.
520 (aarch64_emit_add): Likewise.
521 (aarch64_emit_sub): Likewise.
522 (aarch64_emit_mul): Likewise.
523 (aarch64_emit_lsh): Likewise.
524 (aarch64_emit_rsh_signed): Likewise.
525 (aarch64_emit_rsh_unsigned): Likewise.
526 (aarch64_emit_ext): Likewise.
527 (aarch64_emit_log_not): Likewise.
528 (aarch64_emit_bit_and): Likewise.
529 (aarch64_emit_bit_or): Likewise.
530 (aarch64_emit_bit_xor): Likewise.
531 (aarch64_emit_bit_not): Likewise.
532 (aarch64_emit_equal): Likewise.
533 (aarch64_emit_less_signed): Likewise.
534 (aarch64_emit_less_unsigned): Likewise.
535 (aarch64_emit_ref): Likewise.
536 (aarch64_emit_if_goto): Likewise.
537 (aarch64_emit_goto): Likewise.
538 (aarch64_write_goto_address): Likewise.
539 (aarch64_emit_const): Likewise.
540 (aarch64_emit_call): Likewise.
541 (aarch64_emit_reg): Likewise.
542 (aarch64_emit_pop): Likewise.
543 (aarch64_emit_stack_flush): Likewise.
544 (aarch64_emit_zero_ext): Likewise.
545 (aarch64_emit_swap): Likewise.
546 (aarch64_emit_stack_adjust): Likewise.
547 (aarch64_emit_int_call_1): Likewise.
548 (aarch64_emit_void_call_2): Likewise.
549 (aarch64_emit_eq_goto): Likewise.
550 (aarch64_emit_ne_goto): Likewise.
551 (aarch64_emit_lt_goto): Likewise.
552 (aarch64_emit_le_goto): Likewise.
553 (aarch64_emit_gt_goto): Likewise.
554 (aarch64_emit_ge_got): Likewise.
555 (aarch64_emit_ops_impl): New static global variable.
556 (aarch64_emit_ops): New target function, return
557 &aarch64_emit_ops_impl.
558 (struct linux_target_ops): Install it.
559
bb903df0
PL
5602015-09-21 Pierre Langlois <pierre.langlois@arm.com>
561
562 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
563 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
564 aarch64-ipa.o.
565 * linux-aarch64-ipa.c: New file.
566 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
567 and endian.h.
568 (aarch64_get_thread_area): New target method.
569 (extract_signed_bitfield): New helper function.
570 (aarch64_decode_ldr_literal): New function.
571 (enum aarch64_opcodes): New enum.
572 (struct aarch64_register): New struct.
573 (struct aarch64_operand): New struct.
574 (x0): New static global.
575 (x1): Likewise.
576 (x2): Likewise.
577 (x3): Likewise.
578 (x4): Likewise.
579 (w2): Likewise.
580 (ip0): Likewise.
581 (sp): Likewise.
582 (xzr): Likewise.
583 (aarch64_register): New helper function.
584 (register_operand): Likewise.
585 (immediate_operand): Likewise.
586 (struct aarch64_memory_operand): New struct.
587 (offset_memory_operand): New helper function.
588 (preindex_memory_operand): Likewise.
589 (enum aarch64_system_control_registers): New enum.
590 (ENCODE): New macro.
591 (emit_insn): New helper function.
592 (emit_b): New function.
593 (emit_bcond): Likewise.
594 (emit_cb): Likewise.
595 (emit_tb): Likewise.
596 (emit_blr): Likewise.
597 (emit_stp): Likewise.
598 (emit_ldp_q_offset): Likewise.
599 (emit_stp_q_offset): Likewise.
600 (emit_load_store): Likewise.
601 (emit_ldr): Likewise.
602 (emit_ldrsw): Likewise.
603 (emit_str): Likewise.
604 (emit_ldaxr): Likewise.
605 (emit_stxr): Likewise.
606 (emit_stlr): Likewise.
607 (emit_data_processing_reg): Likewise.
608 (emit_data_processing): Likewise.
609 (emit_add): Likewise.
610 (emit_sub): Likewise.
611 (emit_mov): Likewise.
612 (emit_movk): Likewise.
613 (emit_mov_addr): Likewise.
614 (emit_mrs): Likewise.
615 (emit_msr): Likewise.
616 (emit_sevl): Likewise.
617 (emit_wfe): Likewise.
618 (append_insns): Likewise.
619 (can_encode_int32_in): New helper function.
620 (aarch64_relocate_instruction): New function.
621 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
622 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
623 (struct linux_target_ops): Install aarch64_get_thread_area,
624 aarch64_install_fast_tracepoint_jump_pad and
625 aarch64_get_min_fast_tracepoint_insn_len.
626
787749ea
PL
6272015-09-21 Pierre Langlois <pierre.langlois@arm.com>
628
629 * Makefile.in (aarch64-insn.o): New rule.
630 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
631
9812b2e6
YQ
6322015-09-21 Yao Qi <yao.qi@linaro.org>
633
634 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
635
18fe412b
YQ
6362015-09-21 Yao Qi <yao.qi@linaro.org>
637
638 * tracepoint.c (max_jump_pad_size): Remove.
639
a0cc84cd
YQ
6402015-09-18 Yao Qi <yao.qi@linaro.org>
641
642 * linux-aarch64-low.c: Don't include sys/uio.h.
643 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
644
d78908cf
WW
6452015-09-16 Wei-cheng Wang <cole945@gmail.com>
646
647 * tracepoint.c (eval_result_type): Change prototype.
648 (condition_true_at_tracepoint): Fix argument to compiled_cond.
649
d57e0d50
PA
6502015-09-15 Pedro Alves <palves@redhat.com>
651
652 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
653 Check whether to report exec events instead of checking whether
654 multiprocess is enabled.
655
5a676acc
PA
6562015-09-15 Pedro Alves <palves@redhat.com>
657
658 PR remote/18965
659 * remote-utils.c (prepare_resume_reply): Merge
660 TARGET_WAITKIND_VFORK_DONE switch case with the
661 TARGET_WAITKIND_FORKED case.
662
7c5d0fad
YQ
6632015-09-15 Yao Qi <yao.qi@linaro.org>
664
665 * server.c (handle_query): Check string comparison using
666 "else if" instead of "if".
667
750ce8d1
YQ
6682015-09-15 Yao Qi <yao.qi@linaro.org>
669
670 * server.c (vCont_supported): New global variable.
671 (handle_query): Set vCont_supported to 1 if "vContSupported+"
672 matches. Append ";vContSupported+" to own_buf.
673 (handle_v_requests): Append ";s;S" to own_buf if target supports
674 hardware single step or vCont_supported is false.
675 (capture_main): Set vCont_supported to zero.
676
70b90b91
YQ
6772015-09-15 Yao Qi <yao.qi@linaro.org>
678
679 * linux-low.c (linux_supports_conditional_breakpoints): Rename
680 it to ...
681 (linux_supports_hardware_single_step): ... New function.
682 (linux_target_ops): Update.
683 * lynx-low.c (lynx_target_ops): Set field
684 supports_hardware_single_step to target_can_do_hardware_single_step.
685 * nto-low.c (nto_target_ops): Likewise.
686 * spu-low.c (spu_target_ops): Likewise.
687 * win32-low.c (win32_target_ops): Likewise.
688 * target.c (target_can_do_hardware_single_step): New function.
689 * target.h (struct target_ops) <supports_conditional_breakpoints>:
690 Remove. <supports_hardware_single_step>: New field.
691 (target_supports_conditional_breakpoints): Remove.
692 (target_supports_hardware_single_step): New macro.
693 (target_can_do_hardware_single_step): Declare.
694 * server.c (handle_query): Use target_supports_hardware_single_step
695 instead of target_supports_conditional_breakpoints.
696
ade90bde
YQ
6972015-09-15 Yao Qi <yao.qi@linaro.org>
698
699 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
700 function.
701 (struct linux_target_ops the_low_target): Install
702 aarch64_linux_siginfo_fixup.
703
94585166
DB
7042015-09-11 Don Breazeal <donb@codesourcery.com>
705 Luis Machado <lgustavo@codesourcery.com>
706
707 * linux-low.c (linux_mourn): Static declaration.
708 (linux_arch_setup): Move in front of
709 handle_extended_wait.
710 (linux_arch_setup_thread): New function.
711 (handle_extended_wait): Handle exec events. Call
712 linux_arch_setup_thread. Make event_lwp argument a
713 pointer-to-a-pointer.
714 (check_zombie_leaders): Do not check stopped threads.
715 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
716 (linux_low_filter_event): Add lwp and thread for exec'ing
717 non-leader thread if leader thread has been deleted.
718 Refactor code into linux_arch_setup_thread and call it.
719 Pass child lwp pointer by reference to handle_extended_wait.
720 (linux_wait_for_event_filtered): Update comment.
721 (linux_wait_1): Prevent clobbering exec event status.
722 (linux_supports_exec_events): New function.
723 (linux_target_ops) <supports_exec_events>: Initialize new member.
724 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
725 new member.
726 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
727 * server.c (report_exec_events): New global variable.
728 (handle_query): Handle qSupported query for exec-events feature.
729 (captured_main): Initialize report_exec_events.
730 * server.h (report_exec_events): Declare new global variable.
731 * target.h (struct target_ops) <supports_exec_events>: New
732 member.
733 (target_supports_exec_events): New macro.
734 * win32-low.c (win32_target_ops) <supports_exec_events>:
735 Initialize new member.
736
0568462b
MM
7372015-09-09 Markus Metzger <markus.t.metzger@intel.com>
738
739 * linux-low.c (linux_low_enable_btrace): Remove.
740 (linux_target_ops): Replace linux_low_enable_btrace with
741 linux_enable_btrace.
742
39edd165
YQ
7432015-09-03 Yao Qi <yao.qi@linaro.org>
744
745 * linux-aarch64-low.c (aarch64_insert_point): Call
746 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
747 returns true.
748
1db33b5a
UW
7492015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
750
751 * linux-low.c (check_stopped_by_breakpoint): Use
752 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
753
ab290430
PA
7542015-08-27 Pedro Alves <palves@redhat.com>
755
756 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
757
8d749320
SM
7582015-08-26 Simon Marchi <simon.marchi@ericsson.com>
759
6711b7f8
SM
760 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
761 the XNEW-family equivalent.
8d749320
SM
762 (compile_bytecodes): Likewise.
763 * dll.c (loaded_dll): Likewise.
764 * event-loop.c (append_callback_event): Likewise.
765 (create_file_handler): Likewise.
766 (create_file_event): Likewise.
767 * hostio.c (handle_open): Likewise.
768 * inferiors.c (add_thread): Likewise.
769 (add_process): Likewise.
770 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
771 * linux-arm-low.c (arm_new_process): Likewise.
772 (arm_new_thread): Likewise.
773 * linux-low.c (add_to_pid_list): Likewise.
774 (linux_add_process): Likewise.
775 (handle_extended_wait): Likewise.
776 (add_lwp): Likewise.
777 (enqueue_one_deferred_signal): Likewise.
778 (enqueue_pending_signal): Likewise.
779 (linux_resume_one_lwp_throw): Likewise.
780 (linux_resume_one_thread): Likewise.
781 (linux_read_memory): Likewise.
782 (linux_write_memory): Likewise.
783 * linux-mips-low.c (mips_linux_new_process): Likewise.
784 (mips_linux_new_thread): Likewise.
785 (mips_add_watchpoint): Likewise.
786 * linux-x86-low.c (initialize_low_arch): Likewise.
787 * lynx-low.c (lynx_add_process): Likewise.
788 * mem-break.c (set_raw_breakpoint_at): Likewise.
789 (set_breakpoint): Likewise.
790 (add_condition_to_breakpoint): Likewise.
791 (add_commands_to_breakpoint): Likewise.
792 (clone_agent_expr): Likewise.
793 (clone_one_breakpoint): Likewise.
794 * regcache.c (new_register_cache): Likewise.
795 * remote-utils.c (look_up_one_symbol): Likewise.
796 * server.c (queue_stop_reply): Likewise.
797 (start_inferior): Likewise.
798 (queue_stop_reply_callback): Likewise.
799 (handle_target_event): Likewise.
800 * spu-low.c (fetch_ppc_memory): Likewise.
801 (store_ppc_memory): Likewise.
802 * target.c (set_target_ops): Likewise.
803 * thread-db.c (thread_db_load_search): Likewise.
804 (try_thread_db_load_1): Likewise.
805 * tracepoint.c (add_tracepoint): Likewise.
806 (add_tracepoint_action): Likewise.
807 (create_trace_state_variable): Likewise.
808 (cmd_qtdpsrc): Likewise.
809 (cmd_qtro): Likewise.
810 (add_while_stepping_state): Likewise.
811 * win32-low.c (child_add_thread): Likewise.
812 (get_image_name): Likewise.
813
ed8b7b42
YQ
8142015-08-25 Yao Qi <yao.qi@linaro.org>
815
816 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
817
db3cb7cb
YQ
8182015-08-25 Yao Qi <yao.qi@linaro.org>
819
820 * Makefile.in (aarch64-linux.o): New rule.
821 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
822 srv_tgtobj.
823 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
824 (aarch64_init_debug_reg_state): Make it extern.
825 (aarch64_linux_prepare_to_resume): Remove.
826
f6011a1c
YQ
8272015-08-25 Yao Qi <yao.qi@linaro.org>
828
829 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
830 lwp_arch_private_info and ptid_of_lwp.
831
88e2cf7e
YQ
8322015-08-25 Yao Qi <yao.qi@linaro.org>
833
834 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
835 Find proc_info by find_process_pid. All callers updated.
836
5e35436e
YQ
8372015-08-25 Yao Qi <yao.qi@linaro.org>
838
839 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
840 Remove.
841 (debug_reg_change_callback): Remove.
842 (aarch64_notify_debug_reg_change): Remove.
843
4a8a7965
YQ
8442015-08-25 Yao Qi <yao.qi@linaro.org>
845
846 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
847 Call current_lwp_ptid.
848
32a271ee
YQ
8492015-08-25 Yao Qi <yao.qi@linaro.org>
850
851 * linux-aarch64-low.c (debug_reg_change_callback): Use
852 debug_printf.
853
0d51c8d7
YQ
8542015-08-25 Yao Qi <yao.qi@linaro.org>
855
856 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
857
31a43dd5
YQ
8582015-08-25 Yao Qi <yao.qi@linaro.org>
859
860 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
861
8ee52567
YQ
8622015-08-25 Yao Qi <yao.qi@linaro.org>
863
864 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
865 the code.
866
ff3f0f45
YQ
8672015-08-25 Yao Qi <yao.qi@linaro.org>
868
869 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
870 Remove.
871 (debug_reg_change_callback): Remove argument entry and add argument
872 lwp. Remove local variable thread. Don't print thread id in the
873 debugging output. Don't check whether pid of thread equals to pid.
874 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
875 iterate_over_lwps instead find_inferior.
876
3d40fbb5
PA
8772015-08-24 Pedro Alves <palves@redhat.com>
878
879 * inferiors.c (get_first_process): New function.
880 * inferiors.h (get_first_process): New declaration.
881 * remote-utils.c (read_ptid): Default to the first process in the
882 list, instead of to the current thread's process.
883
438e1e42
PA
8842015-08-24 Pedro Alves <palves@redhat.com>
885
886 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
887 * event-loop.c: Likewise.
888 * remote-utils.c: Likewise.
889 * tracepoint.c: Likewise.
890
a8c6d4fc
PA
8912015-08-24 Pedro Alves <palves@redhat.com>
892
893 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
894 ptid_get_lwp.
895
99b0bb12
PA
8962015-08-21 Pedro Alves <palves@redhat.com>
897
898 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
899 instead of literal 1.
900
f8904751
PA
9012015-08-21 Pedro Alves <palves@redhat.com>
902
903 * tdesc.c (default_description): Explicitly zero-initialize.
904
465a859e
PA
9052015-08-21 Pedro Alves <palves@redhat.com>
906
907 PR gdb/18749
908 * inferiors.c (remove_thread): Discard any pending stop reply for
909 this thread.
910 * server.c (remove_all_on_match_pid): Rename to ...
911 (remove_all_on_match_ptid): ... this. Work with a filter ptid
912 instead of a pid.
913 (discard_queued_stop_replies): Change parameter to a ptid. Now
914 extern.
915 (handle_v_kill, kill_inferior_callback, captured_main)
916 (process_serial_event): Adjust.
917 * server.h (discard_queued_stop_replies): Declare.
918
f0db101d
PA
9192015-08-21 Pedro Alves <palves@redhat.com>
920
921 * linux-low.c (wait_for_sigstop): Always switch to no thread
922 selected if the previously current thread dies.
923 * lynx-low.c (lynx_request_interrupt): Use the first thread's
924 process instead of the current thread's.
925 * remote-utils.c (input_interrupt): Don't check if there's no
926 current thread.
927 * server.c (gdb_read_memory, gdb_write_memory): If setting the
928 current thread to the general thread fails, error out.
929 (handle_qxfer_auxv, handle_qxfer_libraries)
930 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
931 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
932 (handle_query): Check if there's a thread selected instead of
933 checking whether there's any thread in the thread list.
934 (handle_qxfer_threads, handle_qxfer_btrace)
935 (handle_qxfer_btrace_conf): Don't error out early if there's no
936 thread in the thread list.
937 (handle_v_cont, myresume): Don't set the current thread to the
938 continue thread.
939 (process_serial_event) <Hg handling>: Also set thread_id if the
940 previous general thread is still alive.
941 (process_serial_event) <g/G handling>: If setting the current
942 thread to the general thread fails, error out.
943 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
944 thread's lwp instead of the current thread's.
945 * target.c (set_desired_thread): If the desired thread was not
946 found, leave the current thread pointing to NULL. Return an int
947 (boolean) indicating success.
948 * target.h (set_desired_thread): Change return type to int.
949
40045d91
MF
9502015-08-20 Max Filippov <jcmvbkbc@gmail.com>
951
952 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
953 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
954 #includes.
955 (ps_get_thread_area): New function.
956
45face3b
GB
9572015-08-19 Gary Benson <gbenson@redhat.com>
958
959 * hostio.c (handle_pread): Do not attempt to read more data
960 than hostio_reply_with_data can fit in a packet.
961
16d5f642
JB
9622015-08-18 Joel Brobecker <brobecker@adacore.com>
963
964 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
965
a738da3a
MF
9662015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
967
968 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
969
33ebda9d
PA
9702015-08-06 Pedro Alves <palves@redhat.com>
971
972 * tracepoint.c (expr_eval_result): Now an int.
973
a44892be
PA
9742015-08-06 Pedro Alves <palves@redhat.com>
975
976 * gdbthread.h (struct regcache): Forward declare.
977 (struct thread_info) <regcache_data>: Now a struct regcache
978 pointer.
979 * inferiors.c (inferior_regcache_data)
980 (set_inferior_regcache_data): Now work with struct regcache
981 pointers.
982 * inferiors.h (struct regcache): Forward declare.
983 (inferior_regcache_data, set_inferior_regcache_data): Now work
984 with struct regcache pointers.
985 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
986 (free_register_cache_thread): Remove struct regcache pointer
987 casts.
988
608a1e46
PA
9892015-08-06 Pedro Alves <palves@redhat.com>
990
991 * server.c (captured_main): On error, print the exception message
992 to stderr, and if run_once is set, throw a quit.
993
f0ce0d3a
PA
9942015-08-06 Pedro Alves <palves@redhat.com>
995
996 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
997 the current thread.
998
bf47e248
PA
9992015-08-06 Pedro Alves <palves@redhat.com>
1000
1001 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1002 reading beyond the passed in buffer length.
1003
b6b9ffcc
PL
10042015-08-06 Pierre Langlois <pierre.langlois@arm.com>
1005
1006 * tracepoint.c (symbol_list) <required>: Remove.
1007
863d01bd
PA
10082015-08-06 Pedro Alves <palves@redhat.com>
1009
1010 * linux-low.c (handle_extended_wait): Set the fork child's suspend
1011 count if stopping and suspending threads.
1012 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1013 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1014 (linux_detach): Complete an ongoing step-over.
1015 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
1016 throughout.
1017 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1018 (linux_wait_1): If passing a signal to the inferior after
1019 finishing a step-over, unsuspend and re-resume all lwps. If we
1020 see a single-step event but the thread should be continuing, don't
1021 pass the trap to gdb.
1022 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1023 internal_error instead of gdb_assert.
1024 (enqueue_pending_signal): New function.
1025 (check_ptrace_stopped_lwp_gone): Add debug output.
1026 (start_step_over): Use internal_error instead of gdb_assert.
1027 (complete_ongoing_step_over): New function.
1028 (linux_resume_one_thread): Don't resume a suspended thread.
1029 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1030 it stepping.
1031
00db26fa
PA
10322015-08-06 Pedro Alves <palves@redhat.com>
1033
1034 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1035 (linux_thread_alive): Use lwp_is_marked_dead.
1036 (extended_event_reported): Delete.
1037 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1038 instead of extended_event_reported.
1039 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1040 as well.
1041 (lwp_is_marked_dead): New function.
1042 (lwp_running): Use lwp_is_marked_dead.
1043 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1044 comment.
1045
ad071a30
PA
10462015-08-06 Pedro Alves <palves@redhat.com>
1047
1048 * linux-low.c (linux_wait_1): Move fork event output out of the
1049 !report_to_gdb check. Pass event_child->waitstatus to
1050 target_waitstatus_to_string instead of ourstatus.
1051
524b57e6
YQ
10522015-08-04 Yao Qi <yao.qi@linaro.org>
1053
1054 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1055 if current_thread is 32 bit.
1056
6085d6f6
YQ
10572015-08-04 Yao Qi <yao.qi@linaro.org>
1058
1059 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1060 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1061 * server.c (extended_protocol): Remove "static".
1062 * server.h (extended_protocol): Declare it.
1063
8a7e4587
YQ
10642015-08-04 Yao Qi <yao.qi@linaro.org>
1065
1066 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1067 both aarch64 and aarch32.
1068 (aarch64_set_pc): Likewise.
1069
3b53ae99
YQ
10702015-08-04 Yao Qi <yao.qi@linaro.org>
1071
1072 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1073 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1074 arm-with-neon.xml to srv_xmlfiles.
1075 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1076 (is_64bit_tdesc): New function.
1077 (aarch64_linux_read_description): New function.
1078 (aarch64_arch_setup): Call aarch64_linux_read_description.
1079 (regs_info): Rename to regs_info_aarch64.
1080 (aarch64_regs_info): Return right regs_info.
1081 (initialize_low_arch): Call initialize_low_arch_aarch32.
1082
bd9e6534
YQ
10832015-08-04 Yao Qi <yao.qi@linaro.org>
1084
1085 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1086 * linux-aarch32-low.c: New file.
1087 * linux-aarch32-low.h: New file.
1088 * linux-arm-low.c (arm_fill_gregset): Move it to
1089 linux-aarch32-low.c.
1090 (arm_store_gregset): Likewise.
1091 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1092 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1093 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1094 (regs_info): Rename to regs_info_arm.
1095 (arm_regs_info): Return regs_info_aarch32 if
1096 have_ptrace_getregset is 1 and target description is
1097 arm_with_neon or arm_with_vfpv3.
1098 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1099 Call initialize_low_arch_aarch32 instead.
1100
ded48a5e
YQ
11012015-08-04 Yao Qi <yao.qi@linaro.org>
1102
1103 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1104 * linux-low.c: ... here.
1105 * linux-low.h (have_ptrace_getregset): Declare it.
1106
96e9210f
PA
11072015-08-04 Pedro Alves <palves@redhat.com>
1108
1109 * thread-db.c (struct thread_db): Use new typedefs.
1110 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1111 CHK calls.
1112 (disable_thread_event_reporting): Cast result of dlsym to
1113 destination function pointer type.
1114 (thread_db_mourn): Use td_ta_delete_ftype.
1115
af60a1ef
SL
11162015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1117
1118 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1119 arch variant.
1120 (CDX_BREAKPOINT): Define for R2.
1121 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1122 (the_low_target): Add comments.
1123
e8b41681
YQ
11242015-07-30 Yao Qi <yao.qi@linaro.org>
1125
1126 * linux-arm-low.c (arm_hwcap): Remove it.
1127 (arm_read_description): New local variable arm_hwcap. Don't
1128 set arm_hwcap to zero.
1129
89abb039
YQ
11302015-07-30 Yao Qi <yao.qi@linaro.org>
1131
1132 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1133 Use regcache->tdesc instead.
1134 (arm_store_wmmxregset): Likewise.
1135 (arm_fill_vfpregset): Likewise.
1136 (arm_store_vfpregset): Likewise.
1137
deca266c
YQ
11382015-07-30 Yao Qi <yao.qi@linaro.org>
1139
1140 * linux-arm-low.c: Include arch/arm.h.
1141 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1142 (arm_store_gregset): Likewise.
1143
aa58a496
SM
11442015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1145
1146 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1147 ptrace's 4th parameter.
1148
50904b25
YQ
11492015-07-27 Yao Qi <yao.qi@linaro.org>
1150
1151 * configure.srv (case aarch64*-*-linux*): Don't set
1152 srv_linux_usrregs.
1153
5826e159
PA
11542015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1155
1156 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1157 sys/ptrace.h.
1158 * linux-arm-low.c: Likewise.
1159 * linux-cris-low.c: Likewise.
1160 * linux-crisv32-low.c: Likewise.
1161 * linux-low.c: Likewise.
1162 * linux-m68k-low.c: Likewise.
1163 * linux-mips-low.c: Likewise.
1164 * linux-nios2-low.c: Likewise.
1165 * linux-s390-low.c: Likewise.
1166 * linux-sparc-low.c: Likewise.
1167 * linux-tic6x-low.c: Likewise.
1168 * linux-tile-low.c: Likewise.
1169 * linux-x86-low.c: Likewise.
1170
54019719
PA
11712015-07-24 Pedro Alves <palves@redhat.com>
1172
1173 * config.in: Regenerate.
1174 * configure: Regenerate.
1175
eb7aa561
PA
11762015-07-24 Pedro Alves <palves@redhat.com>
1177
1178 * acinclude.m4: Include ../ptrace.m4.
1179 * configure.ac: Call GDB_AC_PTRACE.
1180 * config.in, configure: Regenerate.
1181
55d7b841
YQ
11822015-07-24 Yao Qi <yao.qi@linaro.org>
1183
1184 * linux-low.c (linux_create_inferior): Remove setting to
1185 proc->priv->new_inferior.
1186 (linux_attach): Likewise.
1187 (linux_low_filter_event): Likewise.
1188 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1189
c06cbd92
YQ
11902015-07-24 Yao Qi <yao.qi@linaro.org>
1191
1192 * linux-low.c (linux_arch_setup): New function.
1193 (linux_low_filter_event): If proc->tdesc is NULL and
1194 proc->attached is true, call the_low_target.arch_setup.
1195 Otherwise, keep status pending, and return.
1196 (linux_resume_one_lwp_throw): Don't call get_pc if
1197 thread->while_stepping isn't NULL. Don't call
1198 get_thread_regcache if proc->tdesc is NULL.
1199 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1200 (linux_target_ops): Install arch_setup.
1201 * server.c (start_inferior): Call the_target->arch_setup.
1202 * target.h (struct target_ops) <arch_setup>: New field.
1203 (target_arch_setup): New marco.
1204 * lynx-low.c (lynx_target_ops): Update.
1205 * nto-low.c (nto_target_ops): Update.
1206 * spu-low.c (spu_target_ops): Update.
1207 * win32-low.c (win32_target_ops): Update.
1208
5ae3ebba
YQ
12092015-07-24 Yao Qi <yao.qi@linaro.org>
1210
1211 * linux-low.c (linux_add_process): Don't set
1212 proc->priv->new_inferior.
1213 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1214 (linux_attach): Likewise.
1215
eb97750b
YQ
12162015-07-24 Yao Qi <yao.qi@linaro.org>
1217
1218 * server.c (start_inferior): Code refactor.
1219
51aee833
YQ
12202015-07-24 Yao Qi <yao.qi@linaro.org>
1221
1222 * server.c (process_serial_event): Set general_thread.
1223
af1b22f3
YQ
12242015-07-21 Yao Qi <yao.qi@linaro.org>
1225
1226 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1227 aarch64_linux_get_debug_reg_capacity.
1228
554717a3
YQ
12292015-07-17 Yao Qi <yao.qi@linaro.org>
1230
1231 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1232 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1233 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1234 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1235 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1236 (AARCH64_HWP_ALIGNMENT): Likewise.
1237 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1238 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1239 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1240 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1241 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1242 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1243 (struct aarch64_debug_reg_state): Likewise.
1244 (struct arch_lwp_info): Likewise.
1245 (aarch64_align_watchpoint): Likewise.
1246 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1247 (aarch64_watchpoint_length): Likewise.
1248 (aarch64_point_encode_ctrl_reg): Likewise
1249 (aarch64_point_is_aligned): Likewise.
1250 (aarch64_align_watchpoint): Likewise.
1251 (aarch64_linux_set_debug_regs):
1252 (aarch64_dr_state_insert_one_point): Likewise.
1253 (aarch64_dr_state_remove_one_point): Likewise.
1254 (aarch64_handle_breakpoint): Likewise.
1255 (aarch64_handle_aligned_watchpoint): Likewise.
1256 (aarch64_handle_unaligned_watchpoint): Likewise.
1257 (aarch64_handle_watchpoint): Likewise.
1258
c67ca4de
YQ
12592015-07-17 Yao Qi <yao.qi@linaro.org>
1260
1261 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1262 and don't aarch64_get_debug_reg_state. All callers update.
1263 (aarch64_handle_aligned_watchpoint): Likewise.
1264 (aarch64_handle_unaligned_watchpoint): Likewise.
1265 (aarch64_handle_watchpoint): Likewise.
1266 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1267 (aarch64_remove_point): Likewise.
1268
25abf979
YQ
12692015-07-17 Yao Qi <yao.qi@linaro.org>
1270
1271 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1272 debug_printf.
1273 (aarch64_handle_unaligned_watchpoint): Likewise.
1274
db1ff28b
JK
12752015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1276
1277 Revert the previous 3 commits:
1278 Move gdb_regex* to common/
1279 Move linux_find_memory_regions_full & co.
1280 gdbserver build-id attribute generator
1281
700ca40f
JK
12822015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1283 Jan Kratochvil <jan.kratochvil@redhat.com>
1284
1285 gdbserver build-id attribute generator.
1286 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1287 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1288 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1289 (find_phdr): New.
1290 (get_dynamic): Use find_pdhr to traverse program headers.
1291 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1292 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1293 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1294 (get_hex_build_id): New.
1295 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1296 to reply XML document.
1297
9904185c
JK
12982015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1299 Jan Kratochvil <jan.kratochvil@redhat.com>
1300
1301 * target.c: Include target/target-utils.h and fcntl.h.
1302 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1303 (target_fileio_read_stralloc): New functions.
1304
6e5b4429
JK
13052015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1306
1307 * Makefile.in (OBS): Add gdb_regex.o.
1308 (gdb_regex.o): New.
1309 * config.in: Rebuilt.
1310 * configure: Rebuilt.
1311
ddc98fbf
JK
13122015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1313 Jan Kratochvil <jan.kratochvil@redhat.com>
1314
1315 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1316 * Makefile.in (OBS): Add target-utils.o.
1317 (linux-maps.o, target-utils.o): New.
1318 * configure.srv (srv_linux_obj): Add linux-maps.o.
1319
e57bb7a0
PL
13202015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1321
1322 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1323 function, return 1.
1324 (the_low_target): Install it.
1325
586b02a9
PA
13262015-07-14 Pedro Alves <palves@redhat.com>
1327
1328 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1329 Instead, ignore ECHILD, and throw an error for other errnos.
1330
58c1b36c
PA
13312015-07-10 Pedro Alves <palves@redhat.com>
1332
1333 * event-loop.c (struct callback_event) <data>: Change type to
1334 gdb_client_data instance instead of gdb_client_data pointer.
1335 (append_callback_event): Adjust.
1336
421530db
PL
13372015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1338
1339 * linux-aarch64-low.c: Add comments for each linux_target_ops
1340 method. Remove comments already covered in target_ops and
1341 linux_target_ops definitions.
1342 (the_low_target): Add comments for each unimplemented method.
1343
c2d65f38
YQ
13442015-07-09 Yao Qi <yao.qi@linaro.org>
1345
1346 * linux-aarch64-low.c (aarch64_regmap): Remove.
1347 (aarch64_usrregs_info): Remove.
1348 (regs_info): Set field usrregs to NULL.
1349
b20a6524
MM
13502015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1351
1352 * linux-low.c: Include "rsp-low.h"
1353 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1354 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1355 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1356 (handle_btrace_enable_pt): New.
1357 (handle_btrace_general_set): Support "pt".
1358 (handle_btrace_conf_general_set): Support "pt:size".
1359
96c97461
PL
13602015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1361
1362 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1363 Z_PACKET_SW_BP.
1364
37d66942
PL
13652015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1366
1367 * linux-aarch64-low.c: Remove comment about endianness.
1368 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1369 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1370 memcmp.
1371
dc06243f
GB
13722015-06-24 Gary Benson <gbenson@redhat.com>
1373
1374 * linux-i386-ipa.c (stdint.h): Do not include.
1375 * lynx-i386-low.c (stdint.h): Likewise.
1376 * lynx-ppc-low.c (stdint.h): Likewise.
1377 * mem-break.c (stdint.h): Likewise.
1378 * thread-db.c (stdint.h): Likewise.
1379 * tracepoint.c (stdint.h): Likewise.
1380 * win32-low.c (stdint.h): Likewise.
1381
124e13d9
SM
13822015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1383
1384 * server.c (write_qxfer_response): Update call to
1385 remote_escape_output.
1386
909c2cda
JK
13872015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1388 Jan Kratochvil <jan.kratochvil@redhat.com>
1389
1390 Merge multiple hex conversions.
1391 * gdbreplay.c (tohex): Rename to 'fromhex'.
1392 (logchar): Use fromhex.
1393
24c05f46
JK
13942015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1395
1396 * server.c (handle_qxfer_libraries): Set `version' attribute for
1397 <library-list>.
1398
14d2069a
GB
13992015-06-10 Gary Benson <gbenson@redhat.com>
1400
1401 * target.h (struct target_ops) <multifs_open>: New field.
1402 <multifs_unlink>: Likewise.
1403 <multifs_readlink>: Likewise.
1404 * linux-low.c (nat/linux-namespaces.h): New include.
1405 (linux_target_ops): Initialize the_target->multifs_open,
1406 the_target->multifs_unlink and the_target->multifs_readlink.
1407 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1408 * hostio.c (hostio_fs_pid): New static variable.
1409 (hostio_handle_new_gdb_connection): New function.
1410 (handle_setfs): Likewise.
1411 (handle_open): Use the_target->multifs_open as appropriate.
1412 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1413 (handle_readlink): Use the_target->multifs_readlink as
1414 appropriate.
1415 (handle_vFile): Handle vFile:setfs packets.
1416 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1417 after target_handle_new_gdb_connection.
1418
4b8b5e72
GB
14192015-06-10 Gary Benson <gbenson@redhat.com>
1420
1421 * configure.ac (AC_CHECK_FUNCS): Add setns.
1422 * config.in: Regenerate.
1423 * configure: Likewise.
1424 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1425 (linux-namespaces.o): New rule.
1426 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1427
3ac2e371
GB
14282015-06-09 Gary Benson <gbenson@redhat.com>
1429
1430 * hostio.c (handle_open): Process mode argument with
1431 fileio_to_host_mode.
1432
ca9b78ce
YQ
14332015-06-01 Yao Qi <yao.qi@linaro.org>
1434
1435 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1436 * linux-x86-low.c: Likewise.
1437
bfacd19d
DB
14382015-05-28 Don Breazeal <donb@codesourcery.com>
1439
1440 * linux-low.c (handle_extended_wait): Initialize
1441 thread_info.last_resume_kind for new fork children.
1442
452003ef
PA
14432015-05-15 Pedro Alves <palves@redhat.com>
1444
1445 * target.h (target_handle_new_gdb_connection): Rewrite using if
1446 wrapped in do/while.
1447
1041a03c
JB
14482015-05-14 Joel Brobecker <brobecker@adacore.com>
1449
1450 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1451 * configure, config.in: Regenerate.
1452 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1453 Declare typedef.
1454
c269dbdb
DB
14552015-05-12 Don Breazeal <donb@codesourcery.com>
1456
1457 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1458 PTRACE_EVENT_VFORK_DONE.
1459 (linux_low_ptrace_options, extended_event_reported): Add vfork
1460 events.
1461 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1462 and "vforkdone" for RSP 'T' Stop Reply Packet.
1463 * server.h (report_vfork_events): Declare
1464 global variable.
1465
3a8a0396
DB
14662015-05-12 Don Breazeal <donb@codesourcery.com>
1467
1468 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1469 (the_low_target) <new_fork>: Initialize new member.
1470 * linux-arm-low.c (arm_new_fork): New function.
1471 (the_low_target) <new_fork>: Initialize new member.
1472 * linux-low.c (handle_extended_wait): Call new target function
1473 new_fork.
1474 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1475 * linux-mips-low.c (mips_add_watchpoint): New function
1476 extracted from mips_insert_point.
1477 (the_low_target) <new_fork>: Initialize new member.
1478 (mips_linux_new_fork): New function.
1479 (mips_insert_point): Call mips_add_watchpoint.
1480 * linux-x86-low.c (x86_linux_new_fork): New function.
1481 (the_low_target) <new_fork>: Initialize new member.
1482
de0d863e
DB
14832015-05-12 Don Breazeal <donb@codesourcery.com>
1484
1485 * linux-low.c (handle_extended_wait): Implement return value,
1486 rename argument 'event_child' to 'event_lwp', handle
1487 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1488 (linux_low_ptrace_options): New function.
1489 (linux_low_filter_event): Call linux_low_ptrace_options,
1490 use different argument fo linux_enable_event_reporting,
1491 use return value from handle_extended_wait.
1492 (extended_event_reported): New function.
1493 (linux_wait_1): Call extended_event_reported and set
1494 status to report fork events.
1495 (linux_write_memory): Add pid to debug message.
1496 (reset_lwp_ptrace_options_callback): New function.
1497 (linux_handle_new_gdb_connection): New function.
1498 (linux_target_ops): Initialize new structure member.
1499 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1500 * lynx-low.c: Initialize new structure member.
1501 * remote-utils.c (prepare_resume_reply): Implement stop reason
1502 "fork" for "T" stop message.
1503 * server.c (handle_query): Call handle_new_gdb_connection.
1504 * server.h (report_fork_events): Declare global flag.
1505 * target.h (struct target_ops) <handle_new_gdb_connection>:
1506 New member.
1507 (target_handle_new_gdb_connection): New macro.
1508 * win32-low.c: Initialize new structure member.
1509
ddcbc397
DB
15102015-05-12 Don Breazeal <donb@codesourcery.com>
1511
1512 * mem-break.c (APPEND_TO_LIST): Define macro.
1513 (clone_agent_expr): New function.
1514 (clone_one_breakpoint): New function.
1515 (clone_all_breakpoints): New function.
1516 * mem-break.h: Declare new functions.
1517
89245bc0
DB
15182015-05-12 Don Breazeal <donb@codesourcery.com>
1519
1520 * linux-low.c (linux_supports_fork_events): New function.
1521 (linux_supports_vfork_events): New function.
1522 (linux_target_ops): Initialize new structure members.
1523 (initialize_low): Call linux_check_ptrace_features.
1524 * lynx-low.c (lynx_target_ops): Initialize new structure
1525 members.
1526 * server.c (report_fork_events, report_vfork_events):
1527 New global flags.
1528 (handle_query): Add new features to qSupported packet and
1529 response.
1530 (captured_main): Initialize new global variables.
1531 * target.h (struct target_ops) <supports_fork_events>:
1532 New member.
1533 <supports_vfork_events>: New member.
1534 (target_supports_fork_events): New macro.
1535 (target_supports_vfork_events): New macro.
1536 * win32-low.c (win32_target_ops): Initialize new structure
1537 members.
1538
835205d0
GB
15392015-05-12 Gary Benson <gbenson@redhat.com>
1540
1541 * server.c (handle_qxfer_exec_file): Use current process
1542 if annex is empty.
1543
21e94bd9
SL
15442015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1545
1546 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1547 Remove HAVE_PTRACE_GETREGS conditionals.
1548 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1549 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1550
45614f15
YQ
15512015-05-08 Yao Qi <yao.qi@linaro.org>
1552
1553 * linux-low.c (linux_supports_conditional_breakpoints): New
1554 function.
1555 (linux_target_ops): Install new target method.
1556 * lynx-low.c (lynx_target_ops): Install NULL hook for
1557 supports_conditional_breakpoints.
1558 * nto-low.c (nto_target_ops): Likewise.
1559 * spu-low.c (spu_target_ops): Likewise.
1560 * win32-low.c (win32_target_ops): Likewise.
1561 * server.c (handle_query): Check
1562 target_supports_conditional_breakpoints.
1563 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1564 New field.
1565 (target_supports_conditional_breakpoints): New macro.
1566
80ad801e
PA
15672015-05-06 Pedro Alves <palves@redhat.com>
1568
1569 PR server/18081
1570 * server.c (start_inferior): If the process exits, mourn it.
1571
819843c7
GB
15722015-04-21 Gary Benson <gbenson@redhat.com>
1573
1574 * hostio.c (fileio_open_flags_to_host): Factored out to
1575 fileio_to_host_openflags in common/fileio.c. Single use
1576 updated.
1577
a2d5a9d7
MF
15782015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1579
1580 * linux-xtensa-low.c (xtensa_fill_gregset)
1581 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1582 XCHAL_HAVE_LOOP.
1583
deb44829
MF
15842015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1585
1586 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1587 (regs_info): Replace usrregs pointer with NULL.
1588
e57f1de3
GB
15892015-04-17 Gary Benson <gbenson@redhat.com>
1590
1591 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1592 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1593 * server.c (handle_qxfer_exec_file): New function.
1594 (qxfer_packets): Add exec-file entry.
1595 (handle_query): Report qXfer:exec-file:read as supported packet.
1596
62828379
RN
15972015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1598
1599 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1600
b88bb450
GB
16012015-04-09 Gary Benson <gbenson@redhat.com>
1602
1603 * hostio-errno.c (errno_to_fileio_error): Remove function.
1604 Update caller to use remote_fileio_to_fio_error.
1605
c8f4bfdd
YQ
16062015-04-09 Yao Qi <yao.qi@linaro.org>
1607
1608 * linux-low.c (linux_insert_point): Call
1609 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1610 (linux_remove_point): Call remove_memory_breakpoint if type is
1611 raw_bkpt_type_sw.
1612 * linux-x86-low.c (x86_insert_point): Don't call
1613 insert_memory_breakpoint.
1614 (x86_remove_point): Don't call remove_memory_breakpoint.
1615
41f98f02
PA
16162015-04-01 Pedro Alves <palves@redhat.com>
1617 Cleber Rosa <crosa@redhat.com>
1618
1619 * server.c (gdbserver_usage): Reorganize and extend the usage
1620 message.
1621
2bf6fb9d
PA
16222015-03-24 Pedro Alves <palves@redhat.com>
1623
1624 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1625 output. Also dump TRAP_TRACE.
1626 (linux_low_filter_event): In debug output, distinguish a
1627 resume_stop SIGSTOP from a delayed SIGSTOP.
1628
369f6daa
GB
16292015-03-24 Gary Benson <gbenson@redhat.com>
1630
1631 * linux-x86-low.c (x86_linux_new_thread): Moved to
1632 nat/x86-linux.c.
1633 (x86_linux_prepare_to_resume): Likewise.
1634
8e5d4070
GB
16352015-03-24 Gary Benson <gbenson@redhat.com>
1636
1637 * Makefile.in (x86-linux-dregs.o): New rule.
1638 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1639 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1640 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1641 (x86_linux_dr_get): Likewise.
1642 (x86_linux_dr_set): Likewise.
1643 (update_debug_registers_callback): Likewise.
1644 (x86_linux_dr_set_addr): Likewise.
1645 (x86_linux_dr_get_addr): Likewise.
1646 (x86_linux_dr_set_control): Likewise.
1647 (x86_linux_dr_get_control): Likewise.
1648 (x86_linux_dr_get_status): Likewise.
1649 (x86_linux_update_debug_registers): Likewise.
1650
2b95d440
GB
16512015-03-24 Gary Benson <gbenson@redhat.com>
1652
1653 * linux-x86-low.c (x86_linux_update_debug_registers):
1654 New function, factored out from...
1655 (x86_linux_prepare_to_resume): ...this.
1656
14b0bc68
GB
16572015-03-24 Gary Benson <gbenson@redhat.com>
1658
1659 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1660 (x86_linux_dr_set): Likewise.
1661 (update_debug_registers_callback): Likewise.
1662 (x86_linux_dr_set_addr): Likewise.
1663 (x86_linux_dr_get_addr): Likewise.
1664 (x86_linux_dr_set_control): Likewise.
1665 (x86_linux_dr_get_control): Likewise.
1666 (x86_linux_dr_get_status): Likewise.
1667 (x86_linux_prepare_to_resume): Likewise.
1668
5dfe6ca8
GB
16692015-03-24 Gary Benson <gbenson@redhat.com>
1670
1671 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1672 Use perror_with_name. Pass string through gettext.
1673 (x86_linux_dr_set): Likewise.
1674
d33472ad
GB
16752015-03-24 Gary Benson <gbenson@redhat.com>
1676
1677 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1678 (x86_linux_dr_set_addr): ...this.
1679 (x86_dr_low_get_addr): Rename to...
1680 (x86_linux_dr_get_addr): ...this.
1681 (x86_dr_low_set_control): Rename to...
1682 (x86_linux_dr_set_control): ...this.
1683 (x86_dr_low_get_control): Rename to...
1684 (x86_linux_dr_get_control): ...this.
1685 (x86_dr_low_get_status): Rename to...
1686 (x86_linux_dr_get_status): ...this.
1687 (x86_dr_low): Update with new function names.
1688
4b134ca1
GB
16892015-03-24 Gary Benson <gbenson@redhat.com>
1690
1691 * Makefile.in (x86-linux.o): New rule.
1692 * configure.srv: Add x86-linux.o to relevant targets.
1693 * linux-low.c (lwp_set_arch_private_info): New function.
1694 (lwp_arch_private_info): Likewise.
1695 * linux-x86-low.c: Include nat/x86-linux.h.
1696 (arch_lwp_info): Removed structure.
1697 (update_debug_registers_callback):
1698 Use lwp_set_debug_registers_changed.
1699 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1700 and lwp_set_debug_registers_changed.
1701 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1702
34c703da
GB
17032015-03-24 Gary Benson <gbenson@redhat.com>
1704
1705 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1706 * linux-arm-low.c (arm_new_thread): Likewise.
1707 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1708 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1709 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1710 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1711
cff068da
GB
17122015-03-24 Gary Benson <gbenson@redhat.com>
1713
1714 * linux-low.c (ptid_of_lwp): New function.
1715 (lwp_is_stopped): Likewise.
1716 (lwp_stop_reason): Likewise.
1717 * linux-x86-low.c (update_debug_registers_callback):
1718 Use lwp_is_stopped.
1719 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1720 lwp_stop_reason.
1721
b2f7c7e8
GB
17222015-03-24 Gary Benson <gbenson@redhat.com>
1723
1724 * linux-low.h (linux_stop_lwp): Remove declaration.
1725
6d4ee8c6
GB
17262015-03-24 Gary Benson <gbenson@redhat.com>
1727
1728 * linux-low.h: Include nat/linux-nat.h.
1729 * linux-low.c (iterate_over_lwps_args): New structure.
1730 (iterate_over_lwps_filter): New function.
1731 (iterate_over_lwps): Likewise.
1732 * linux-x86-low.c (update_debug_registers_callback):
1733 Update signature to what iterate_over_lwps expects.
1734 Remove PID check that iterate_over_lwps now performs.
1735 (x86_dr_low_set_addr): Use iterate_over_lwps.
1736 (x86_dr_low_set_control): Likewise.
1737
70a0bb6b
GB
17382015-03-24 Gary Benson <gbenson@redhat.com>
1739
1740 * linux-x86-low.c (x86_debug_reg_state): New function.
1741 (x86_linux_prepare_to_resume): Use the above.
1742
7b669087
GB
17432015-03-24 Gary Benson <gbenson@redhat.com>
1744
1745 * linux-low.c (current_lwp_ptid): New function.
1746 * linux-x86-low.c: Include nat/linux-nat.h.
1747 (x86_dr_low_get_addr): Use current_lwp_ptid.
1748 (x86_dr_low_get_control): Likewise.
1749 (x86_dr_low_get_status): Likewise.
1750
eef49a3d
PA
17512015-03-20 Pedro Alves <palves@redhat.com>
1752
1753 * tracepoint.c (cmd_qtstatus): Make "str" const.
1754
b2333d22
PA
17552015-03-20 Pedro Alves <palves@redhat.com>
1756
1757 * server.c (handle_general_set): Make "req_str" const.
1758
23f238d3
PA
17592015-03-19 Pedro Alves <palves@redhat.com>
1760
1761 * linux-low.c (linux_resume_one_lwp): Rename to ...
1762 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1763 instead call perror_with_name.
1764 (check_ptrace_stopped_lwp_gone): New function.
1765 (linux_resume_one_lwp): Reimplement as wrapper around
1766 linux_resume_one_lwp_throw that swallows errors if the LWP is
1767 gone.
1768
91baf43f
PA
17692015-03-19 Pedro Alves <palves@redhat.com>
1770
1771 * linux-low.c (count_events_callback, select_event_lwp_callback):
1772 No longer check whether the thread has resume_stop as last resume
1773 kind.
1774
8bf3b159
PA
17752015-03-19 Pedro Alves <palves@redhat.com>
1776
1777 * linux-low.c (count_events_callback, select_event_lwp_callback):
1778 Use the lwp's status_pending_p field, not the thread's.
1779
b90fc188
PA
17802015-03-19 Pedro Alves <palves@redhat.com>
1781
1782 * linux-low.c (select_event_lwp_callback): Update comments to
1783 no longer mention SIGTRAP.
1784
464b0089
GB
17852015-03-18 Gary Benson <gbenson@redhat.com>
1786
1787 * server.c (handle_query): Do not report vFile:fstat as supported.
1788
aa9e327f
GB
17892015-03-11 Gary Benson <gbenson@redhat.com>
1790
1791 * hostio.c (sys/types.h): New include.
1792 (sys/stat.h): Likewise.
1793 (common-remote-fileio.h): Likewise.
1794 (handle_fstat): New function.
1795 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 1796
791c0056
GB
17972015-03-11 Gary Benson <gbenson@redhat.com>
1798
1799 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1800 struct stat.st_blocks and struct stat.st_blksize.
1801 * configure: Regenerate.
1802 * config.in: Likewise.
1803 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1804 (OBS): Add common-remote-fileio.o.
1805 (common-remote-fileio.o): New rule.
1806
9a9df970
PA
18072015-03-09 Pedro Alves <palves@redhat.com>
1808
1809 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1810 'struct sockaddr' pointer in 'accept' call.
1811
9eb1356e
PA
18122015-03-09 Pedro Alves <palves@redhat.com>
1813
1814 Revert:
1815 2015-03-07 Pedro Alves <palves@redhat.com>
1816 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1817 or <winsock2.h> here. Instead include "gdb_socket.h".
1818 (remote_open): Use union gdb_sockaddr_u.
1819 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1820 or <winsock2.h> here. Instead include "gdb_socket.h".
1821 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1822 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1823 or <sys/un.h>.
1824 (init_named_socket, gdb_agent_helper_thread): Use union
1825 gdb_sockaddr_u.
1826
aac331e4
PA
18272015-03-07 Pedro Alves <palves@redhat.com>
1828
1829 * configure.ac (build_warnings): Move
1830 -Wdeclaration-after-statement to the C-specific set.
1831 * configure: Regenerate.
1832
366c75fc
PA
18332015-03-07 Pedro Alves <palves@redhat.com>
1834
1835 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1836 or <winsock2.h> here. Instead include "gdb_socket.h".
1837 (remote_open): Use union gdb_sockaddr_u.
1838 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1839 or <winsock2.h> here. Instead include "gdb_socket.h".
1840 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1841 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1842 or <sys/un.h>.
1843 (init_named_socket, gdb_agent_helper_thread): Use union
1844 gdb_sockaddr_u.
1845
492d29ea
PA
18462015-03-07 Pedro Alves <palves@redhat.com>
1847
1848 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1849 instead.
1850
60a191ed
YQ
18512015-03-06 Yao Qi <yao.qi@linaro.org>
1852
1853 * linux-aarch64-low.c (aarch64_insert_point): Use
1854 show_debug_regs as a boolean.
1855 (aarch64_remove_point): Likewise.
1856
f5771b1d
PA
18572015-03-05 Pedro Alves <palves@redhat.com>
1858
1859 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1860 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1861 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1862 * nto-low.c (nto_target_ops): Likewise.
1863 * spu-low.c (spu_target_ops): Likewise.
1864 * win32-low.c (win32_target_ops): Likewise.
1865
3e572f71
PA
18662015-03-04 Pedro Alves <palves@redhat.com>
1867
72f4393d 1868 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
1869 Decide whether a breakpoint triggered based on the SIGTRAP's
1870 siginfo.si_code.
72f4393d
L
1871 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1872 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
1873 (linux_low_filter_event): Check for breakpoints before checking
1874 watchpoints.
1875 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1876 siginfo.si_code.
72f4393d
L
1877 (linux_stopped_by_sw_breakpoint)
1878 (linux_supports_stopped_by_sw_breakpoint)
1879 (linux_stopped_by_hw_breakpoint)
1880 (linux_supports_stopped_by_hw_breakpoint): New functions.
1881 (linux_target_ops): Install new target methods.
3e572f71 1882
1ec68e26
PA
18832015-03-04 Pedro Alves <palves@redhat.com>
1884
1885 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1886 * server.c (swbreak_feature, hwbreak_feature): New globals.
1887 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1888 (captured_main): Clear swbreak_feature and hwbreak_feature.
1889 * server.h (swbreak_feature, hwbreak_feature): Declare.
1890 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1891 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1892 supports_stopped_by_hw_breakpoint>: New fields.
1893 (target_supports_stopped_by_sw_breakpoint)
1894 (target_stopped_by_sw_breakpoint)
1895 (target_supports_stopped_by_hw_breakpoint)
1896 (target_stopped_by_hw_breakpoint): Declare.
1897
15c66dd6
PA
18982015-03-04 Pedro Alves <palves@redhat.com>
1899
1900 enum lwp_stop_reason -> enum target_stop_reason
1901 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1902 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1903 (linux_wait_1, stuck_in_jump_pad_callback)
1904 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1905 (linux_stopped_by_watchpoint):
1906 * linux-low.h (enum lwp_stop_reason): Delete.
1907 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1908 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1909
98fc70d6
YQ
19102015-03-04 Yao Qi <yao.qi@linaro.org>
1911
1912 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1913
dd2ac174
GB
19142015-03-03 Gary Benson <gbenson@redhat.com>
1915
1916 * hostio.c (handle_vFile): Fix prefix lengths.
1917
d68e53f4
MM
19182015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1919
1920 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1921 ptr_bits.
1922
bf2d68ab
AA
19232015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1924
1925 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1926 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1927 (clean): Add "rm -f" for above C files.
1928 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1929 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1930 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1931 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1932 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1933 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1934 (init_registers_s390x_vx_linux64)
1935 (init_registers_s390x_tevx_linux64)
1936 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1937 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1938 declarations.
1939 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1940 (s390_store_vxrs_high): New functions.
1941 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1942 NT_S390_VXRS_HIGH.
1943 (s390_arch_setup): Add logic for selecting one of the new target
1944 descriptions. Activate the new vector regsets if applicable.
1945 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1946 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1947 and init_registers_s390x_tevx_linux64.
1948
c966a859
PA
19492015-03-01 Pedro Alves <palves@redhat.com>
1950
1951 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1952 parameter.
1953
4180215b
PA
19542015-02-27 Pedro Alves <palves@redhat.com>
1955
1956 * linux-x86-low.c (u_debugreg_offset): New function.
1957 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1958
749bab01
PA
19592015-02-27 Pedro Alves <palves@redhat.com>
1960
1961 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1962 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1963 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1964 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1965 (ps_lsetfpregs, ps_getpid)
1966 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1967 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1968 (ps_lsetxregs, ps_plog): Declare.
1969
3c14e5a3
PA
19702015-02-27 Pedro Alves <palves@redhat.com>
1971
1972 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1973 IP_AGENT_EXPORT_FUNC.
1974 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1975 IP_AGENT_EXPORT_FUNC.
1976 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1977 (IP_AGENT_EXPORT): Delete.
1978 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1979 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1980 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1981 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1982 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1983 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1984 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1985 (traceframe_read_count, traceframe_write_count)
1986 (traceframes_created, trace_state_variables, get_raw_reg)
1987 (get_trace_state_variable_value, set_trace_state_variable_value)
1988 (ust_loaded, helper_thread_id, cmd_buf): Use
1989 IPA_SYM_EXPORTED_NAME.
1990 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1991 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1992 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1993 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1994 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1995 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1996 EXTERN_C_PUSH/EXTERN_C_POP.
1997 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1998 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1999 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2000 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2001 (traceframe_write_count, traceframe_read_count)
2002 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2003 (about_to_request_buffer_space, get_trace_state_variable_value)
2004 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2005 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2006 EXTERN_C_PUSH/EXTERN_C_POP.
2007 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2008 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2009 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2010 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2011 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2012 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2013 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2014 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2015 Define.
2016 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2017 (IP_AGENT_EXPORT_VAR_DECL): Define.
2018 (tracing): Declare.
2019 (gdb_agent_get_raw_reg): Declare.
2020
fe978cb0
PA
20212015-02-27 Tom Tromey <tromey@redhat.com>
2022 Pedro Alves <palves@redhat.com>
2023
2024 Rename symbols whose names are reserved C++ keywords throughout.
2025
3bc3d82a
PA
20262015-02-27 Pedro Alves <palves@redhat.com>
2027
2028 * Makefile.in (COMPILER): New, get it from autoconf.
2029 (CXX): Get from autoconf instead.
2030 (COMPILE.pre): Use COMPILER.
2031 (CC-LD): Rename to ...
2032 (CC_LD): ... this. Use COMPILER.
2033 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2034 (CXX_FOR_TARGET): Default to g++ instead of gcc.
2035 * acinclude.m4: Include build-with-cxx.m4.
2036 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2037 Disable -Werror by default if building in C++ mode.
2038 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2039 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2040 the C++ compiler. Save/restore CXXFLAGS too.
2041 * configure: Regenerate.
2042
07697489
PA
20432015-02-27 Pedro Alves <palves@redhat.com>
2044
2045 * acinclude.m4: Include libiberty.m4.
2046 * configure.ac: Call libiberty_INIT.
2047 * config.in, configure: Regenerate.
2048
9beb7c4e
PA
20492015-02-26 Pedro Alves <palves@redhat.com>
2050
2051 * linux-low.c (linux_wait_1): When incrementing the PC past a
2052 program breakpoint always use the_low_target.breakpoint_len as
2053 increment, rather than the maximum between that and
2054 the_low_target.decr_pc_after_break.
2055
8090aef2
PA
20562015-02-23 Pedro Alves <palves@redhat.com>
2057
2058 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2059 thread was doing a step-over; always adjust the PC if
2060 we stepped over a permanent breakpoint.
2061 (linux_wait_1): If we stepped over breakpoint that was on top of a
2062 permanent breakpoint, manually advance the PC past it.
2063
bc9540e8
PA
20642015-02-23 Pedro Alves <palves@redhat.com>
2065
2066 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2067 modes.
2068 (x86_fill_gregset, x86_store_gregset): Use it when handling
2069 $orig_eax.
2070
2db9a427
PA
20712015-02-20 Pedro Alves <palves@redhat.com>
2072
2073 * thread-db.c: Include "nat/linux-procfs.h".
2074 (thread_db_init): Skip listing new threads if the kernel supports
2075 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2076
afa8d396
PA
20772015-02-20 Pedro Alves <palves@redhat.com>
2078
2079 * linux-low.c (status_pending_p_callback): Use ptid_match.
2080
c9587f88
AT
20812015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2082
2083 PR breakpoints/16812
2084 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2085 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2086 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2087
b05ec7a5
AT
20882015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2089
2090 PR breakpoints/15956
2091 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2092
d33501a5
MM
20932015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2094
2095 * linux-low.c (linux_low_btrace_conf): Print size.
2096 * server.c (handle_btrace_conf_general_set): New.
2097 (hanle_general_set): Call handle_btrace_conf_general_set.
2098 (handle_query): Report Qbtrace-conf:bts:size as supported.
2099
f4abbc16
MM
21002015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2101
2102 * linux-low.c (linux_low_enable_btrace): Update parameters.
2103 (linux_low_btrace_conf): New.
2104 (linux_target_ops)<to_btrace_conf>: Initialize.
2105 * server.c (current_btrace_conf): New.
2106 (handle_btrace_enable): Rename to ...
2107 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
2108 to target_enable_btrace. Update comment. Update users.
2109 (handle_qxfer_btrace_conf): New.
2110 (qxfer_packets): Add btrace-conf entry.
2111 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2112 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2113 (target_ops)<read_btrace_conf>: New.
2114 (target_enable_btrace): Update parameters.
2115 (target_read_btrace_conf): New.
2116
043c3577
MM
21172015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2118
2119 * server.c (handle_btrace_general_set): Remove call to
2120 target_supports_btrace.
2121 (supported_btrace_packets): New.
2122 (handle_query): Call supported_btrace_packets.
2123 * target.h: include btrace-common.h.
2124 (btrace_target_info): Removed.
2125 (supports_btrace, target_supports_btrace): Update parameters.
2126
734b0e4b
MM
21272015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2128
2129 * Makefile.in (SFILES): Add common/btrace-common.c.
2130 (OBS): Add common/btrace-common.o.
2131 (btrace-common.o): Add build rules.
2132 * linux-low: Include btrace-common.h.
2133 (linux_low_read_btrace): Use struct btrace_data. Call
2134 btrace_data_init and btrace_data_fini.
2135
d6c146e9
PA
21362015-02-06 Pedro Alves <palves@redhat.com>
2137
2138 * thread-db.c (find_new_threads_callback): Add debug output.
2139
20ba1ce6
PA
21402015-02-04 Pedro Alves <palves@redhat.com>
2141
2142 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2143 (resume_stopped_resumed_lwps): New function.
2144 (linux_wait_for_event_filtered): Use it.
2145
8cc73a39
SDJ
21462015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2147
2148 * Makefile.in (SFILES): Add linux-personality.c.
2149 (linux-personality.o): New rule.
2150 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2151 list of objects to be built.
2152 * linux-low.c: Include nat/linux-personality.h.
2153 (linux_create_inferior): Remove code to disable address space
2154 randomization (moved to ../nat/linux-personality.c). Create
2155 cleanup to disable address space randomization.
2156
fb23d554
SDJ
21572015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2158
2159 * Makefile.in (posix-strerror.o): New rule.
2160 (mingw-strerror.o): Likewise.
2161 * configure: Regenerated.
2162 * configure.ac: Source file ../common/common.host. Initialize new
2163 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2164
cdf43629
YQ
21652015-01-14 Yao Qi <yao@codesourcery.com>
2166
2167 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2168 (ppc-linux.o): New rule.
2169 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2170 * configure.ac: AC_CHECK_FUNCS(getauxval).
2171 * config.in: Re-generated.
2172 * configure: Re-generated.
2173 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2174 ppc64_64bit_inferior_p
2175
514c5338
YQ
21762015-01-14 Yao Qi <yao@codesourcery.com>
2177
2178 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2179 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2180 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2181 (PT_ORIG_R3, PT_TRAP): Likewise.
2182 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2183 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2184 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2185
3368c1e5
JB
21862015-01-10 Joel Brobecker <brobecker@adacore.com>
2187
2188 * i387-fp.c (i387_cache_to_xsave): In look over
2189 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2190 zmmh_low_space field by use of zmmh_high_space.
2191
582511be
PA
21922015-01-09 Pedro Alves <palves@redhat.com>
2193
2194 * linux-low.c (step_over_bkpt): Move higher up in the file.
2195 (handle_extended_wait): Don't store the stop_pc here.
2196 (get_stop_pc): Adjust comments and rename to ...
2197 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2198 stopped for a software breakpoint or hardware breakpoint.
2199 (thread_still_has_status_pending_p): New function.
2200 (status_pending_p_callback): Use
2201 thread_still_has_status_pending_p. If the event is no longer
2202 interesting, resume the LWP.
2203 (handle_tracepoints): Add assert.
2204 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2205 (wstatus_maybe_breakpoint): New function.
2206 (cancel_breakpoint): Delete function.
2207 (check_stopped_by_watchpoint): New function, factored out from
2208 linux_low_filter_event.
2209 (lp_status_maybe_breakpoint): Delete function.
2210 (linux_low_filter_event): Remove filter_ptid argument.
2211 Leave thread group exits pending here. Store the LWP's stop PC.
2212 Always leave events pending.
2213 (linux_wait_for_event_filtered): Pull all events out of the
2214 kernel, and leave them all pending.
2215 (count_events_callback, select_event_lwp_callback): Consider all
2216 events.
2217 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2218 (select_event_lwp): Only give preference to the stepping LWP in
2219 all-stop mode. Adjust comments.
2220 (ignore_event): New function.
2221 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2222 references to cancel_breakpoints. Adjust to renames. Also give
2223 equal priority to all LWPs that have had events in non-stop mode.
2224 If reporting a software breakpoint event, unadjust the LWP's PC.
2225 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2226 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2227 Adjust.
2228 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2229 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2230 (linux_stopped_by_watchpoint): Adjust.
2231 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2232 * linux-low.h (enum lwp_stop_reason): New.
2233 (struct lwp_info) <stop_pc>: Adjust comment.
2234 <stopped_by_watchpoint>: Delete field.
2235 <stop_reason>: New field.
2236 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2237 * mem-break.c (software_breakpoint_inserted_here)
2238 (hardware_breakpoint_inserted_here): New function.
2239 * mem-break.h (software_breakpoint_inserted_here)
2240 (hardware_breakpoint_inserted_here): Declare.
2241 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2242 (cancel_breakpoints): Delete.
2243 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2244 (upload_fast_traceframes): Remove references to
2245 cancel_breakpoints.
2246
a33e3959
PA
22472015-01-09 Pedro Alves <palves@redhat.com>
2248
2249 * thread-db.c (find_new_threads_callback): Ignore thread if the
2250 kernel thread ID is -1.
2251
8784d563
PA
22522015-01-09 Pedro Alves <palves@redhat.com>
2253
2254 * linux-low.c (linux_attach_fail_reason_string): Move to
2255 nat/linux-ptrace.c, and rename.
2256 (linux_attach_lwp): Update comment.
2257 (attach_proc_task_lwp_callback): New function.
2258 (linux_attach): Adjust to rename and use
2259 linux_proc_attach_tgid_threads.
2260 (linux_attach_fail_reason_string): Delete declaration.
2261
76f2b779
JB
22622015-01-01 Joel Brobecker <brobecker@adacore.com>
2263
2264 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2265 * server.c (gdbserver_version): Likewise.
2266
fafcc06a
SDJ
22672014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2268
2269 * remote-utils.c: Include ctype.h.
2270 (input_interrupt): Explicitly handle the case when the char
2271 received is the NUL byte. Improve the printing of non-ASCII
2272 characters.
2273
beed38b8
JB
22742014-12-16 Joel Brobecker <brobecker@adacore.com>
2275
2276 * linux-low.c (linux_low_filter_event): Update call to
2277 linux_enable_event_reporting following the addition of
2278 a new parameter to that function.
2279
bf330350
CU
22802014-12-16 Catalin Udma <catalin.udma@freescale.com>
2281
2282 PR server/17457
2283 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2284 (AARCH64_FPCR_REGNO): Likewise.
2285 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2286 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2287 (aarch64_store_fpregset): Likewise.
2288
5227d625
JB
22892014-12-15 Joel Brobecker <brobecker@adacore.com>
2290
2291 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2292 Remove FIXME comment about assumption about N.
2293
f93b65a0
JB
22942014-12-13 Joel Brobecker <brobecker@adacore.com>
2295
2296 * configure.ac: If large-file support is disabled in GDBserver,
2297 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2298 * configure: Regenerate.
2299
e5a9158d
AA
23002014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2301
2302 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2303 warning upon ENODATA from ptrace.
2304 * linux-s390-low.c (s390_store_tdb): New.
2305 (s390_regsets): Add regset for NT_S390_TDB.
2306
feea5f36
AA
23072014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2308
2309 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2310 without a fill_function.
2311 * linux-s390-low.c (s390_fill_last_break): Remove.
2312 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2313 (s390_arch_setup): Use regset's size instead of fill_function for
2314 loop end condition.
2315
098dbe61
AA
23162014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2317
2318 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2319 the regset's store function when ptrace returned an error.
2320 * regcache.c (get_thread_regcache): Invalidate register cache
2321 before fetching inferior's registers.
2322
28eef672
AA
23232014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2324
2325 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2326 while-loop as for-loop.
2327 (regsets_store_inferior_registers): Likewise.
2328
bdca27a2
YQ
23292014-11-28 Yao Qi <yao@codesourcery.com>
2330
2331 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2332 * config.in, configure: Re-generate.
2333 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2334 is defined.
2335
9c232dda
YQ
23362014-11-21 Yao Qi <yao@codesourcery.com>
2337
2338 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2339 (AC_CHECK_HEADERS): Remove malloc.h.
2340 * configure: Re-generated.
2341 * config.in: Re-generated.
2342 * server.h: Don't include alloca.h and malloc.h.
2343 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2344 Don't include malloc.h.
2345
43968415
JB
23462014-11-17 Joel Brobecker <brobecker@adacore.com>
2347
2348 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2349 corresponding ERRNO check in same block.
2350
40e91bc7
PA
23512014-11-12 Pedro Alves <palves@redhat.com>
2352
2353 * server.c (cont_thread): Update comment.
2354 (start_inferior, attach_inferior): No longer clear cont_thread.
2355 (handle_v_cont): No longer set cont_thread.
2356 (captured_main): Clear cont_thread each time a GDB connects.
2357
c2c118cf
PA
23582014-11-12 Pedro Alves <palves@redhat.com>
2359
2360 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2361 thread, and don't resume all threads if the Hc thread has exited.
2362
78708b7c
PA
23632014-11-12 Pedro Alves <palves@redhat.com>
2364
2365 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2366 the process group instead of to a specific LWP.
2367
a2abc7de
PA
23682014-10-15 Pedro Alves <palves@redhat.com>
2369
2370 PR server/17487
2371 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2372 parameter.
2373 (arm_set_thread_context): Delete.
2374 (the_low_target): Adjust.
2375 * win32-i386-low.c (debug_registers_changed)
2376 (debug_registers_used): Delete.
2377 (update_debug_registers_callback): New function.
2378 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2379 needing to update their debug registers.
2380 (win32_get_current_dr): New function.
2381 (x86_dr_low_get_addr, x86_dr_low_get_control)
2382 (x86_dr_low_get_status): Fetch the debug register from the thread
2383 record's context.
2384 (i386_initial_stuff): Adjust.
2385 (i386_get_thread_context): Remove current_event parameter. Don't
2386 clear debug_registers_changed nor copy DR values to
2387 debug_reg_state.
2388 (i386_set_thread_context): Delete.
2389 (i386_prepare_to_resume): New function.
2390 (i386_thread_added): Mark the thread as needing to update irs
2391 debug registers.
2392 (the_low_target): Remove i386_set_thread_context and install
2393 i386_prepare_to_resume.
2394 * win32-low.c (win32_get_thread_context): Adjust.
2395 (win32_set_thread_context): Use SetThreadContext
2396 directly.
2397 (win32_prepare_to_resume): New function.
2398 (win32_require_context): New function, factored out from ...
2399 (thread_rec): ... this.
2400 (continue_one_thread): Call win32_prepare_to_resume on each thread
2401 we're about to continue.
2402 (win32_resume): Call win32_prepare_to_resume on the event thread.
2403 * win32-low.h (struct win32_thread_info)
2404 <debug_registers_changed>: New field.
2405 (struct win32_target_ops): Change prototype of set_thread_context,
2406 delete set_thread_context and add prepare_to_resume.
2407 (win32_require_context): New declaration.
2408
a442d071
GB
24092014-10-08 Gary Benson <gbenson@redhat.com>
2410
2411 * server.h: Do not include common-exceptions.h.
2412
6f1947e8
GB
24132014-10-08 Gary Benson <gbenson@redhat.com>
2414
2415 * server.h: Do not include cleanups.h.
2416
63b434a4
JH
24172014-09-30 James Hogan <james.hogan@imgtec.com>
2418
2419 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2420 mips64-dsp-linux.c.
2421
c4d9ceb6
YQ
24222014-09-23 Yao Qi <yao@codesourcery.com>
2423
2424 * linux-low.c (lp_status_maybe_breakpoint): New function.
2425 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2426 (count_events_callback): Likewise.
2427 (select_event_lwp_callback): Likewise.
2428 (cancel_breakpoints_callback): Likewise.
2429
89a5711c
DB
24302014-09-19 Don Breazeal <donb@codesourcery.com>
2431
2432 * linux-low.c (handle_extended_wait): Call
2433 linux_ptrace_get_extended_event.
2434 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2435 linux_is_extended_waitstatus.
2436
bffc0964
JB
24372014-09-16 Joel Brobecker <brobecker@adacore.com>
2438
2439 * Makefile.in (CPPFLAGS): Define.
2440 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2441 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2442
0bfdf32f
GB
24432014-09-16 Gary Benson <gbenson@redhat.com>
2444
2445 * inferiors.h (current_inferior): Renamed as...
2446 (current_thread): New variable. All uses updated.
2447 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2448 (maybe_move_out_of_jump_pad): Likewise.
2449 (cancel_breakpoint): Likewise.
2450 (linux_low_filter_event): Likewise.
2451 (wait_for_sigstop): Likewise.
2452 (linux_resume_one_lwp): Likewise.
2453 (need_step_over_p): Likewise.
2454 (start_step_over): Likewise.
2455 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2456 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2457 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2458 and save_inferior as saved_thread.
2459 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2460 saved_thread.
2461 (regcache_invalidate_thread): Likewise.
2462 * remote-utils.c (prepare_resume_reply): Likewise.
2463 * thread-db.c (thread_db_get_tls_address): Likewise.
2464 (disable_thread_event_reporting): Likewise.
2465 (remove_thread_event_breakpoints): Likewise.
2466 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2467 as saved_thread.
2468 * target.h (set_desired_inferior): Renamed as...
2469 (set_desired_thread): New declaration. All uses updated.
2470 * server.c (myresume): Updated comment to reference thread instead
2471 of inferior.
2472 (handle_serial_event): Likewise.
2473 (handle_target_event): Likewise.
2474
361c8ade
GB
24752014-09-12 Tom Tromey <tromey@redhat.com>
2476 Gary Benson <gbenson@redhat.com>
2477
2478 * regcache.h: Include common-regcache.h.
2479 (regcache_read_pc): Don't declare.
2480 * regcache.c (get_thread_regcache_for_ptid): New function.
2481
bd9269f7
GB
24822014-09-11 Tom Tromey <tromey@redhat.com>
2483 Gary Benson <gbenson@redhat.com>
2484
2485 * symbol.c: New file.
2486 * Makefile.in (SFILES): Add symbol.c.
2487 (OBS): Add symbol.o.
2488
f8c1d06b
GB
24892014-09-11 Gary Benson <gbenson@redhat.com>
2490
2491 * target.c (target_stop_ptid, target_continue_ptid): New
2492 functions.
2493
721ec300
GB
24942014-09-11 Tom Tromey <tromey@redhat.com>
2495 Gary Benson <gbenson@redhat.com>
2496
2497 * target.h: Include target/target.h.
2498 * target.c (target_read_memory, target_read_uint32)
2499 (target_write_memory): New functions.
2500
c5e92cca
GB
25012014-09-11 Gary Benson <gbenson@redhat.com>
2502
2503 * server.h (debug_hw_points): Don't declare.
2504 * server.c (debug_hw_points): Don't define. Replace all uses
2505 with show_debug_regs.
2506 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2507 all uses with show_debug_regs.
2508
2e4bb98a
EBM
25092014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2510
2511 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2512 endianness into account.
2513 (ppc_supply_ptrace_register): Likewise.
2514
ac740bc7
JH
25152014-09-03 James Hogan <james.hogan@imgtec.com>
2516
2517 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2518 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2519
97ea6506
GB
25202014-09-03 Gary Benson <gbenson@redhat.com>
2521
2522 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2523 ALL_DEBUG_ADDRESS_REGISTERS.
2524
df7e5265
GB
25252014-09-02 Gary Benson <gbenson@redhat.com>
2526
2527 * i386-low.h: Renamed as...
2528 * x86-low.h: New file. All type, function and variable name
2529 prefixes changed from "i386_" to "x86_". All references updated.
2530 * i386-low.c: Renamed as...
2531 * x86-low.c: New file. All type, function and variable name
2532 prefixes changed from "i386_" to "x86_". All references updated.
2533
ed859da7
GB
25342014-09-02 Gary Benson <gbenson@redhat.com>
2535
2536 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2537 (x86_linux_new_thread): Likewise.
2538
860789c7
GB
25392014-08-29 Gary Benson <gbenson@redhat.com>
2540
2541 * server.h (setjmp.h): Do not include.
2542 (toplevel): Do not declare.
2543 (common-exceptions.h): Include.
2544 (cleanups.h): Likewise.
2545 * server.c (toplevel): Do not define.
2546 (exit_code): New static global.
2547 (detach_or_kill_for_exit_cleanup): New function.
2548 (main): New function. Original main renamed to...
2549 (captured_main): New function.
2550 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2551
ff55e1b5
GB
25522014-08-29 Gary Benson <gbenson@redhat.com>
2553
2554 * Makefile.in (SFILES): Add common/common-exceptions.c.
2555 (OBS): Add common-exceptions.o.
2556 (common-exceptions.o): New rule.
2557 * utils.c (prepare_to_throw_exception): New function.
2558
e9bcb658
GB
25592014-08-29 Gary Benson <gbenson@redhat.com>
2560
2561 * config.in: Regenerate.
2562 * configure: Likewise.
2563
e3180625
GB
25642014-08-29 Gary Benson <gbenson@redhat.com>
2565
2566 * Makefile.in (SFILES): Add common/cleanups.c.
2567 (OBS): cleanups.o.
2568 (cleanups.o): New rule.
2569
e3d6ba5d
GB
25702014-08-29 Gary Benson <gbenson@redhat.com>
2571
2572 * utils.c (internal_vwarning): New function.
2573
7096e886
GB
25742014-08-28 Gary Benson <gbenson@redhat.com>
2575
2576 * utils.h (fatal): Remove declaration.
2577 * utils.c (fatal): Remove function.
2578
14ce3192
GB
25792014-08-28 Gary Benson <gbenson@redhat.com>
2580
2581 * tracepoint.c (gdb_agent_init): Replace fatal with
2582 perror_with_name.
2583 (initialize_tracepoint): Likewise.
2584
50278d59
GB
25852014-08-28 Gary Benson <gbenson@redhat.com>
2586
2587 * remote-utils.c (remote_prepare): Replace fatal with error.
2588
aa96c426
GB
25892014-08-28 Gary Benson <gbenson@redhat.com>
2590
2591 * linux-low.c (linux_async): Replace fatal with warning.
2592 Tidy up and return.
2593 (linux_start_non_stop): Return -1 if linux_async failed.
2594
f7160e97
GB
25952014-08-28 Gary Benson <gbenson@redhat.com>
2596
2597 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2598 gdb_assert.
2599 (i386_dr_low_get_addr): Remove vague comment.
2600 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2601 gdb_assert.
2602
38e08fca
GB
26032014-08-28 Gary Benson <gbenson@redhat.com>
2604
2605 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2606 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2607 internal_error.
2608 (linux_resume_one_lwp): Likewise.
2609 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2610 gdb_assert.
2611 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2612 with internal_error.
2613 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2614 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2615 (find_register_by_name): Replace fatal with internal_error.
2616 (find_regno): Likewise.
2617 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2618 * thread-db.c (thread_db_create_event): Likewise.
2619 (thread_db_load_search): Likewise.
2620 (try_thread_db_load_1): Likewise.
2621 * tracepoint.c (get_jump_space_head): Replace fatal with
2622 internal_error.
2623 (claim_trampoline_space): Likewise.
2624 (have_fast_tracepoint_trampoline_buffer): Likewise.
2625 (cmd_qtstart): Likewise.
2626 (stop_tracing): Likewise.
2627 (fast_tracepoint_collecting): Likewise.
2628 (target_malloc): Likewise.
2629 (download_tracepoint): Likewise.
2630 (download_trace_state_variables): Replace check with gdb_assert.
2631 (upload_fast_traceframes): Replace fatal with internal_error.
2632
34abf635
GB
26332014-08-19 Tom Tromey <tromey@redhat.com>
2634 Gary Benson <gbenson@redhat.com>
2635
2636 * Makefile.in (SFILES): Add common/common-debug.c.
2637 (OBS): Add common-debug.o.
2638 (common-debug.o): New rule.
2639 * debug.h (debug_printf): Don't declare.
2640 * debug.c (debug_printf): Renamed and rewritten as...
2641 (debug_vprintf): New function.
2642
f6e94d78
GB
26432014-08-19 Gary Benson <gbenson@redhat.com>
2644
2645 * utils.h: Do not include print-utils.h.
2646
9239eeab
GB
26472014-08-19 Tom Tromey <tromey@redhat.com>
2648 Gary Benson <gbenson@redhat.com>
2649
2650 * server.h: Add static assertion.
2651 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2652
ef87c8bb
GB
26532014-08-19 Tom Tromey <tromey@redhat.com>
2654 Gary Benson <gbenson@redhat.com>
2655
2656 * Makefile.in (SFILES): Add common/errors.c.
2657 (OBS): Add errors.o.
2658 (IPA_OBS): Add errors-ipa.o.
2659 (errors.o): New rule.
2660 (errors-ipa.o): Likewise.
2661 * utils.h (perror_with_name, error, warning): Don't declare.
2662 * utils.c (warning): Renamed and rewritten as...
2663 (vwarning): New function.
2664 (error): Renamed and rewritten as...
2665 (verror): New function.
2666 (internal_error): Renamed and rewritten as...
2667 (internal_verror): New function.
2668
bb974a24
GB
26692014-08-07 Gary Benson <gbenson@redhat.com>
2670
2671 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2672 * configure: Regenerate.
2673 * config.in: Likewise.
2674 * server.h: Do not include errno.h.
2675 * event-loop.c: Likewise.
2676 * hostio-errno.c: Likewise.
2677 * linux-low.c: Likewise.
2678 * remote-utils.c: Likewise.
2679 * spu-low.c: Likewise.
2680 * utils.c: Likewise.
2681 * gdbreplay.c: Unconditionally include errno.h.
2682
6d3d12eb
GB
26832014-08-07 Gary Benson <gbenson@redhat.com>
2684
2685 * server.h: Do not include string.h.
2686 * event-loop.c: Likewise.
2687 * linux-low.c: Likewise.
2688 * regcache.c: Likewise.
2689 * remote-utils.c: Likewise.
2690 * spu-low.c: Likewise.
2691 * utils.c: Likewise.
2692
dccbb609
GB
26932014-08-07 Gary Benson <gbenson@redhat.com>
2694
2695 * server.h: Do not include gdb_assert.h.
2696
e76df0d0
GB
26972014-08-07 Gary Benson <gbenson@redhat.com>
2698
2699 * server.h: Do not include common-utils.h.
2700
4cb9c816
GB
27012014-08-07 Gary Benson <gbenson@redhat.com>
2702
2703 * server.h: Do not include ptid.h.
2704 * notif.h: Likewise.
2705
3995eeee
GB
27062014-08-07 Gary Benson <gbenson@redhat.com>
2707
2708 * server.h: Do not include gdb_locale.h.
2709
cb9f1a9b
GB
27102014-08-07 Gary Benson <gbenson@redhat.com>
2711
2712 * server.h: Do not include gdb/signals.h.
2713 * win32-low.c: Likewise.
2714
a5fceff8
GB
27152014-08-07 Gary Benson <gbenson@redhat.com>
2716
2717 * server.h: Do not include pathmax.h.
2718
b9391142
GB
27192014-08-07 Gary Benson <gbenson@redhat.com>
2720
2721 * server.h: Do not include libiberty.h.
2722 * linux-bfin-low.c: Likewise.
2723
0e443c87
GB
27242014-08-07 Gary Benson <gbenson@redhat.com>
2725
2726 * server.h: Do not include ansidecl.h.
2727
8ebb3f56
GB
27282014-08-07 Gary Benson <gbenson@redhat.com>
2729
2730 * linux-x86-low.c: Do not include stddef.h.
2731 * lynx-ppc-low.c: Likewise.
2732 * tracepoint.c: Likewise.
2733
8980bdf6
GB
27342014-08-07 Gary Benson <gbenson@redhat.com>
2735
2736 * server.h: Do not include stdarg.h.
2737 * nto-low.c: Likewise.
2738
d7096f71
GB
27392014-08-07 Gary Benson <gbenson@redhat.com>
2740
2741 * server.h: Do not include stdlib.h.
2742 * inferiors.c: Likewise.
2743 * linux-low.c: Likewise.
2744 * regcache.c: Likewise.
2745 * spu-low.c: Likewise.
2746 * tracepoint.c: Likewise.
2747 * utils.c: Likewise.
2748
d02f550d
GB
27492014-08-07 Gary Benson <gbenson@redhat.com>
2750
2751 * server.h: Do not include stdio.h.
2752 * linux-low.c: Likewise.
2753 * remote-utils.c: Likewise.
2754 * spu-low.c: Likewise.
2755 * utils.c: Likewise.
2756 * wincecompat.c: Likewise.
2757
87f6c4e3
GB
27582014-08-06 Gary Benson <gbenson@redhat.com>
2759
2760 * regcache.c (init_register_cache): Move conditionals inside if.
2761
7089dca4
GB
27622014-08-06 Gary Benson <gbenson@redhat.com>
2763
2764 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2765
462f517e
GB
27662014-07-31 Gary Benson <gbenson@redhat.com>
2767
2768 * ax.h: Do not include server.h.
2769 * gdbthread.h: Likewise.
2770 * lynx-low.h: Likewise.
2771 * notif.h: Likewise.
2772
976411d6
GB
27732014-07-30 Gary Benson <gbenson@redhat.com>
2774
2775 * server.h: Include common-defs.h.
2776 Do not include config.h or build-gnulib-gdbserver/config.h.
2777
d41f6d8e
GB
27782014-07-30 Gary Benson <gbenson@redhat.com>
2779
2780 * hostio-errno.c: Move server.h to top of includes list.
2781 * inferiors.c: Likewise.
2782 * linux-x86-low.c: Likewise.
2783 * notif.c: Include server.h.
2784
314c6a35
TT
27852014-07-24 Tom Tromey <tromey@redhat.com>
2786 Gary Benson <gbenson@redhat.com>
2787
2788 * server.h (CORE_ADDR): Now unsigned.
2789
69ff6be5
PA
27902014-07-16 Pedro Alves <palves@redhat.com>
2791
2792 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2793
ce9e3fe7
PA
27942014-07-15 Pedro Alves <palves@redhat.com>
2795
2796 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2797 copy.
2798
e76126e8
PA
27992014-07-11 Pedro Alves <palves@redhat.com>
2800
2801 * linux-low.c (kill_wait_lwp): New function, based on
2802 kill_one_lwp_callback, but use my_waitpid directly.
2803 (kill_one_lwp_callback, linux_kill): Use it.
2804
8e9db26e
PA
28052014-06-23 Pedro Alves <palves@redhat.com>
2806
2807 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2808 before setting DR0..DR3.
2809
698b3e08
GB
28102014-06-20 Gary Benson <gbenson@redhat.com>
2811
2812 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2813 * configure: Regenerated.
2814 * config.in: Likewise.
2815
125f8a3d
GB
28162014-06-20 Gary Benson <gbenson@redhat.com>
2817
2818 * Makefile.in (SFILES): Update locations for files moved
2819 from common to nat.
2820 (object file files): Reordered.
2821
42995dbd
GB
28222014-06-20 Gary Benson <gbenson@redhat.com>
2823
2824 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2825 (i386_dr_low_set_addr): Likewise.
2826 (i386_dr_low_get_addr): Likewise.
2827 (i386_dr_low_can_set_control): Likewise.
2828 (i386_dr_low_set_control): Likewise.
2829 (i386_dr_low_get_control): Likewise.
2830 (i386_dr_low_get_status): Likewise.
2831 (i386_get_debug_register_length): Likewise.
2832 * linux-x86-low.c (i386_dr_low_set_addr):
2833 Changed signature. Made static.
2834 (i386_dr_low_get_addr): Likewise.
2835 (i386_dr_low_set_control): Likewise.
2836 (i386_dr_low_get_control): Likewise.
2837 (i386_dr_low_get_status): Likewise.
2838 (i386_dr_low): New global variable.
2839 * win32-i386-low.c (i386_dr_low_set_addr):
2840 Changed signature. Made static.
2841 (i386_dr_low_get_addr): Likewise.
2842 (i386_dr_low_set_control): Likewise.
2843 (i386_dr_low_get_control): Likewise.
2844 (i386_dr_low_get_status): Likewise.
2845 (i386_dr_low): New global variable.
2846
e1d2394b
MS
28472014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2848
2849 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2850 * Makefile.in (AR, AR_FLAGS): Define.
2851 * configure: Regenerate.
2852
3a8ee006
GB
28532014-06-19 Gary Benson <gbenson@redhat.com>
2854
2855 * Makefile.in (i386-dregs.o): New rule.
2856 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2857 * i386-low.c (target.h): Remove include.
2858 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2859 (DR_CONTROL_SHIFT): Likewise.
2860 (DR_CONTROL_SIZE): Likewise.
2861 (DR_RW_EXECUTE): Likewise.
2862 (DR_RW_WRITE): Likewise.
2863 (DR_RW_READ): Likewise.
2864 (DR_RW_IORW): Likewise.
2865 (DR_LEN_1): Likewise.
2866 (DR_LEN_2): Likewise.
2867 (DR_LEN_4): Likewise.
2868 (DR_LEN_8): Likewise.
2869 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2870 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2871 (DR_ENABLE_SIZE): Likewise.
2872 (DR_LOCAL_SLOWDOWN): Likewise.
2873 (DR_GLOBAL_SLOWDOWN): Likewise.
2874 (DR_CONTROL_RESERVED): Likewise.
2875 (I386_DR_CONTROL_MASK): Likewise.
2876 (I386_DR_VACANT): Likewise.
2877 (I386_DR_LOCAL_ENABLE): Likewise.
2878 (I386_DR_GLOBAL_ENABLE): Likewise.
2879 (I386_DR_DISABLE): Likewise.
2880 (I386_DR_SET_RW_LEN): Likewise.
2881 (I386_DR_GET_RW_LEN): Likewise.
2882 (I386_DR_WATCH_HIT): Likewise.
2883 (i386_wp_op_t): Likewise.
2884 (i386_show_dr): Likewise.
2885 (i386_length_and_rw_bits): Likewise.
2886 (i386_insert_aligned_watchpoint): Likewise.
2887 (i386_remove_aligned_watchpoint): Likewise.
2888 (i386_handle_nonaligned_watchpoint): Likewise.
2889 i386_update_inferior_debug_regs(): Likewise.
2890 (i386_dr_insert_watchpoint): Likewise.
2891 (i386_dr_remove_watchpoint): Likewise.
2892 (i386_dr_region_ok_for_watchpoint): Likewise.
2893 (i386_dr_stopped_data_address): Likewise.
2894 (i386_dr_stopped_by_watchpoint): Likewise.
2895
8f26655c
GB
28962014-06-19 Gary Benson <gbenson@redhat.com>
2897
2898 * i386-low.c (i386_dr_show): Renamed to
2899 i386_show_dr and made static. All uses updated.
2900 (i386_dr_length_and_rw_bits): Renamed to
2901 i386_length_and_rw_bits and made static.
2902 All uses updated.
2903 (i386_dr_insert_aligned_watchpoint): Renamed to
2904 i386_insert_aligned_watchpoint and made static.
2905 All uses updated.
2906 (i386_dr_remove_aligned_watchpoint): Renamed to
2907 i386_remove_aligned_watchpoint and made static.
2908 All uses updated.
2909 (i386_dr_update_inferior_debug_regs): Renamed to
2910 i386_update_inferior_debug_regs and made static.
2911 All uses updated.
2912
b9228891
GB
29132014-06-18 Gary Benson <gbenson@redhat.com>
2914
5171def3
GB
2915 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2916 (i386_dr_low_can_set_control): Likewise.
2917 (i386_get_debug_register_length): Likewise.
2918 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2919 (i386_dr_low_can_set_control): Likewise.
2920 (i386_get_debug_register_length): Likewise.
2921
29222014-06-17 Gary Benson <gbenson@redhat.com>
2923
b9228891
GB
2924 * i386-low.h (i386-dregs.h): New include.
2925 (DR_FIRSTADDR): Now in i386-dregs.h.
2926 (DR_LASTADDR): Likewise.
2927 (DR_NADDR): Likewise.
2928 (DR_STATUS): Likewise.
2929 (DR_CONTROL): Likewise.
2930 (i386_debug_reg_state): Likewise.
2931 (i386_dr_insert_watchpoint): Likewise.
2932 (i386_dr_remove_watchpoint): Likewise.
2933 (i386_dr_region_ok_for_watchpoint): Likewise.
2934 (i386_dr_stopped_data_address): Likewise.
2935 (i386_dr_stopped_by_watchpoint): Likewise.
2936 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2937
4be83cc2
GB
29382014-06-18 Gary Benson <gbenson@redhat.com>
2939
2940 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2941 i386_dr_insert_watchpoint.
2942 (i386_low_remove_watchpoint): Renamed to
2943 i386_dr_remove_watchpoint.
2944 (i386_low_region_ok_for_watchpoint): Renamed to
2945 i386_dr_region_ok_for_watchpoint.
2946 (i386_low_stopped_data_address): Renamed to
2947 i386_dr_stopped_data_address.
2948 (i386_low_stopped_by_watchpoint): Renamed to
2949 i386_dr_stopped_by_watchpoint.
2950 * i386-low.c (i386_show_dr): Renamed to
2951 i386_dr_show and made nonstatic. All uses updated.
2952 (i386_length_and_rw_bits): Renamed to
2953 i386_dr_length_and_rw_bits and made nonstatic.
2954 All uses updated.
2955 (i386_insert_aligned_watchpoint): Renamed to
2956 i386_dr_insert_aligned_watchpoint and made nonstatic.
2957 All uses updated.
2958 (i386_remove_aligned_watchpoint): Renamed to
2959 i386_dr_remove_aligned_watchpoint and made nonstatic.
2960 All uses updated.
2961 (i386_update_inferior_debug_regs): Renamed to
2962 i386_dr_update_inferior_debug_regs and made nonstatic.
2963 All uses updated.
2964 (i386_low_insert_watchpoint): Renamed to
2965 i386_dr_insert_watchpoint. All uses updated.
2966 (i386_low_remove_watchpoint): Renamed to
2967 i386_dr_remove_watchpoint. All uses updated.
2968 (i386_low_region_ok_for_watchpoint): Renamed to
2969 i386_dr_region_ok_for_watchpoint. All uses updated.
2970 (i386_low_stopped_data_address): Renamed to
2971 i386_dr_stopped_data_address. All uses updated.
2972 (i386_low_stopped_by_watchpoint): Renamed to
2973 i386_dr_stopped_by_watchpoint. All uses updated.
2974
131aa0d4
GB
29752014-06-18 Gary Benson <gbenson@redhat.com>
2976
2977 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2978 (i386_dr_low_can_set_control): Likewise.
2979 (i386_insert_aligned_watchpoint): New check.
2980
d9305f7f
GB
29812014-06-18 Gary Benson <gbenson@redhat.com>
2982
2983 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2984 Renamed to state.
2985
e927c9fc
GB
29862014-06-18 Gary Benson <gbenson@redhat.com>
2987
2988 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2989 instead of fatal and error.
2990 (i386_handle_nonaligned_watchpoint): Likewise.
2991
1b6d4134
GB
29922014-06-18 Gary Benson <gbenson@redhat.com>
2993
2994 * i386-low.c (i386_get_debug_register_length): New macro.
2995 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2996 (i386_show_dr): Use debug_printf instead of fprintf. Use
2997 phex to format values.
2998
6e62758f
GB
29992014-06-18 Gary Benson <gbenson@redhat.com>
3000
3001 * i386-low.h: Comment changes.
3002 * i386-low.c: Likewise.
3003
fc6e2f03
GB
30042014-06-18 Gary Benson <gbenson@redhat.com>
3005
3006 * i386-low.c: Whitespace changes.
3007
f9d1eeed
TT
30082014-06-12 Tom Tromey <tromey@redhat.com>
3009
3010 * utils.c (freeargv): Remove.
3011
0b04e523
TT
30122014-06-12 Tom Tromey <tromey@redhat.com>
3013
3014 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3015 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3016 (parse_debug_format_options): Likewise.
3017 (gdbserver_usage): Likewise.
3018 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3019 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3020 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3021 against libiberty.
3022 ($(LIBGNU)): Depend on libiberty.
3023 (all-lib): Recurse into all subdirs.
3024 (install-only): Invoke "install" target in subdirs.
3025 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3026 targets.
3027 * configure: Rebuild.
3028 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
3029 for vasprintf, vsnprintf, or gettimeofday.
3030 * configure.srv: Don't add safe-ctype.o or lbasename.o to
3031 srv_tgtobj.
3032
270c9937
JB
30332014-06-05 Joel Brobecker <brobecker@adacore.com>
3034
3035 * development.sh: Delete.
3036 * Makefile.in (config.status): Adjust dependency on development.sh.
3037 * configure.ac: Adjust development.sh source call.
3038 * configure: Regenerate.
3039
0a261ed8
PA
30402014-06-02 Pedro Alves <palves@redhat.com>
3041
3042 * ax.c (gdb_free_agent_expr): New function.
3043 * ax.h (gdb_free_agent_expr): New declaration.
3044 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3045 list.
3046 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3047 static.
3048 (clear_breakpoint_conditions_and_commands): New function.
3049 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3050 (clear_breakpoint_conditions_and_commands): New declaration.
3051
e9dae05e
RR
30522014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3053
3054 * linux-aarch64-low.c (asm/ptrace.h): Include.
3055
5876f503
JK
30562014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3057
3058 Fix TLS access for -static -pthread.
3059 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3060 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3061 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3062
802e8e6d
PA
30632014-05-20 Pedro Alves <palves@redhat.com>
3064
3065 * linux-aarch64-low.c (aarch64_insert_point)
3066 (aarch64_remove_point): No longer check whether the type is
3067 supported here. Adjust to new interface.
3068 (the_low_target): Install aarch64_supports_z_point_type as
3069 supports_z_point_type method.
3070 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3071 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3072 instead of a Z packet char. Adjust.
3073 (arm_supports_z_point_type): New function.
3074 (arm_insert_point, arm_remove_point): Adjust to new interface.
3075 (the_low_target): Install arm_supports_z_point_type.
3076 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3077 (cris_insert_point, cris_remove_point): Adjust to new interface.
3078 Don't check whether the type is supported here.
3079 (the_low_target): Install cris_supports_z_point_type.
3080 * linux-low.c (linux_supports_z_point_type): New function.
3081 (linux_insert_point, linux_remove_point): Adjust to new interface.
3082 * linux-low.h (struct linux_target_ops) <insert_point,
3083 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3084 raw_breakpoint pointer parameter.
3085 <supports_z_point_type>: New method.
3086 * linux-mips-low.c (mips_supports_z_point_type): New function.
3087 (mips_insert_point, mips_remove_point): Adjust to new interface.
3088 Use mips_supports_z_point_type.
3089 (the_low_target): Install mips_supports_z_point_type.
3090 * linux-ppc-low.c (the_low_target): Install NULL as
3091 supports_z_point_type method.
3092 * linux-s390-low.c (the_low_target): Install NULL as
3093 supports_z_point_type method.
3094 * linux-sparc-low.c (the_low_target): Install NULL as
3095 supports_z_point_type method.
3096 * linux-x86-low.c (x86_supports_z_point_type): New function.
3097 (x86_insert_point): Adjust to new insert_point interface. Use
3098 insert_memory_breakpoint. Adjust to new
3099 i386_low_insert_watchpoint interface.
3100 (x86_remove_point): Adjust to remove_point interface. Use
3101 remove_memory_breakpoint. Adjust to new
3102 i386_low_remove_watchpoint interface.
3103 (the_low_target): Install x86_supports_z_point_type.
3104 * lynx-low.c (lynx_target_ops): Install NULL as
3105 supports_z_point_type callback.
3106 * nto-low.c (nto_supports_z_point_type): New.
3107 (nto_insert_point, nto_remove_point): Adjust to new interface.
3108 (nto_target_ops): Install nto_supports_z_point_type.
3109 * mem-break.c: Adjust intro comment.
3110 (struct raw_breakpoint) <raw_type, size>: New fields.
3111 <inserted>: Update comment.
3112 <shlib_disabled>: Delete field.
3113 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3114 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3115 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3116 (raw_bkpt_type_to_target_hw_bp_type): New function.
3117 (find_enabled_raw_code_breakpoint_at): New function.
3118 (find_raw_breakpoint_at): New type and size parameters. Use them.
3119 (insert_memory_breakpoint): New function, based off
3120 set_raw_breakpoint_at.
3121 (remove_memory_breakpoint): New function.
3122 (set_raw_breakpoint_at): Reimplement.
3123 (set_breakpoint): New, based on set_breakpoint_at.
3124 (set_breakpoint_at): Reimplement.
3125 (delete_raw_breakpoint): Go through the_target->remove_point
3126 instead of assuming memory breakpoints.
3127 (find_gdb_breakpoint_at): Delete.
3128 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3129 (find_gdb_breakpoint): New function.
3130 (set_gdb_breakpoint_at): Delete.
3131 (z_type_supported): New function.
3132 (set_gdb_breakpoint_1): New function, loosely based off
3133 set_gdb_breakpoint_at.
3134 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3135 (delete_gdb_breakpoint_at): Delete.
3136 (delete_gdb_breakpoint_1): New function, loosely based off
3137 delete_gdb_breakpoint_at.
3138 (delete_gdb_breakpoint): New function.
3139 (clear_gdb_breakpoint_conditions): Rename to ...
3140 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3141 breakpoint.
3142 (add_condition_to_breakpoint): Make static.
3143 (add_breakpoint_condition): Take a struct breakpoint pointer
3144 instead of an address. Adjust.
3145 (gdb_condition_true_at_breakpoint): Rename to ...
3146 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3147 z_type parameter.
3148 (gdb_condition_true_at_breakpoint): Reimplement.
3149 (add_breakpoint_commands): Take a struct breakpoint pointer
3150 instead of an address. Adjust.
3151 (gdb_no_commands_at_breakpoint): Rename to ...
3152 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3153 parameter. Return true if no breakpoint was found. Change debug
3154 output.
3155 (gdb_no_commands_at_breakpoint): Reimplement.
3156 (run_breakpoint_commands): Rename to ...
3157 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3158 and change return type to boolean.
3159 (run_breakpoint_commands): New function.
3160 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3161 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3162 breakpoint. Go through the_target->remove_point instead of
3163 assuming memory breakpoint.
3164 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3165 software and hardware breakpoints.
3166 (reinsert_raw_breakpoint): Go through the_target->insert_point
3167 instead of assuming memory breakpoint.
3168 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3169 software and hardware breakpoints.
3170 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3171 Check both software and hardware breakpoints.
3172 (validate_inserted_breakpoint): Assert the breakpoint is a
3173 software breakpoint. Set the inserted flag to -1 instead of
3174 setting shlib_disabled.
3175 (delete_disabled_breakpoints): Adjust.
3176 (validate_breakpoints): Only validate software breakpoints.
3177 Adjust to inserted flag change.
3178 (check_mem_read, check_mem_write): Skip breakpoint types other
3179 than software breakpoints. Adjust to inserted flag change.
3180 * mem-break.h (enum raw_bkpt_type): New enum.
3181 (raw_breakpoint, struct process_info): Forward declare.
3182 (Z_packet_to_target_hw_bp_type): Delete declaration.
3183 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3184 (set_gdb_breakpoint, delete_gdb_breakpoint)
3185 (clear_breakpoint_conditions): New declarations.
3186 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3187 (breakpoint_inserted_here): Update comment.
3188 (add_breakpoint_condition, add_breakpoint_commands): Replace
3189 address parameter with a breakpoint pointer parameter.
3190 (gdb_breakpoint_here): Update comment.
3191 (delete_gdb_breakpoint_at): Delete.
3192 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3193 * server.c (process_point_options): Take a struct breakpoint
3194 pointer instead of an address. Adjust.
3195 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3196 delete_gdb_breakpoint.
3197 * spu-low.c (spu_target_ops): Install NULL as
3198 supports_z_point_type method.
3199 * target.h: Include mem-break.h.
3200 (struct target_ops) <prepare_to_access_memory>: Update comment.
3201 <supports_z_point_type>: New field.
3202 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3203 instead of a char. Also take a raw breakpoint pointer.
3204 * win32-arm-low.c (the_low_target): Install NULL as
3205 supports_z_point_type.
3206 * win32-i386-low.c (i386_supports_z_point_type): New function.
3207 (i386_insert_point, i386_remove_point): Adjust to new interface.
3208 (the_low_target): Install i386_supports_z_point_type.
3209 * win32-low.c (win32_supports_z_point_type): New function.
3210 (win32_insert_point, win32_remove_point): Adjust to new interface.
3211 (win32_target_ops): Install win32_supports_z_point_type.
3212 * win32-low.h (struct win32_target_ops):
3213 <supports_z_point_type>: New method.
3214 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3215 instead of a char. Also take a raw breakpoint pointer.
3216
932539e3
PA
32172014-05-20 Pedro Alves <palves@redhat.com>
3218
3219 * mem-break.h: Include break-common.h.
3220 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3221 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3222 (Z_packet_to_target_hw_bp_type): New declaration.
3223 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3224 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3225 (Z_PACKET_ACCESS_WP): Delete macros.
3226 (Z_packet_to_hw_type): Delete function.
3227 * i386-low.h: Don't include break-common.h here.
3228 (Z_packet_to_hw_type): Delete declaration.
3229 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3230 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3231 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3232 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3233 * linux-aarch64-low.c: Don't include break-common.h here.
3234 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3235 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3236 (Z_packet_to_target_hw_bp_type): Delete function.
3237 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3238 function.
3239 (mips_insert_point, mips_remove_point): Use
3240 Z_packet_to_target_hw_bp_type.
3241
4ff0d3d8
PA
32422014-05-20 Pedro Alves <palves@redhat.com>
3243
3244 * linux-aarch64-low.c: Include break-common.h.
3245 (enum target_point_type): Delete.
3246 (Z_packet_to_point_type): Rename to ...
3247 (Z_packet_to_target_hw_bp_type): ... this, and return a
3248 target_hw_bp_type instead.
3249 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3250 instead of an enum target_point_type.
3251 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3252 breakpoint type.
3253 (aarch64_dr_state_insert_one_point)
3254 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3255 (aarch64_handle_aligned_watchpoint)
3256 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3257 Take an enum target_hw_bp_type instead of an enum
3258 target_point_type.
3259 (aarch64_supports_z_point_type): New function.
3260 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3261 use Z_packet_to_target_hw_bp_type.
3262
786dc519
JB
32632014-05-20 Joel Brobecker <brobecker@adacore.com>
3264
3265 * configure.ac: Only use -Werror by default when DEVELOPMENT
3266 is true.
3267 * configure: Regenerate.
3268
9e0aa64f
JK
32692014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3270
3271 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3272 * linux-x86-low.c (X86_64_USER_REGS): New.
3273 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3274
2b577b92
YQ
32752014-04-28 Yao Qi <yao@codesourcery.com>
3276
3277 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3278 name.
3279
94611da2
PA
32802014-04-25 Pedro Alves <palves@redhat.com>
3281
3282 PR server/16255
3283 * linux-low.c (linux_attach_fail_reason_string): New function.
3284 (linux_attach_lwp): Delete.
3285 (linux_attach_lwp_1): Rename to ...
3286 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3287 argument. Remove "initial" parameter. Return int instead of
3288 void. Don't error or warn here.
3289 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3290 failure to attach to the tgid. Call warning when failing to
3291 attach to an lwp.
3292 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3293 argument. Remove "initial" parameter. Return int instead of
3294 void. Don't error or warn here.
3295 (linux_attach_fail_reason_string): New declaration.
3296 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3297 interface change. Use linux_attach_fail_reason_string.
3298
01f9f808
MS
32992014-04-24 Michael Sturm <michael.sturm@mintel.com>
3300 Walfred Tedeschi <walfred.tedeschi@intel.com>
3301
3302 * Makefile.in: Added rules to handle new files
3303 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3304 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3305 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3306 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3307 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3308 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3309 x32-avx512-linux.o.
3310 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3311 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3312 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3313 i386/x32-avx512.xml.
3314 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3315 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3316 i386/x32-avx512-linux.xml.
3317 * i387-fp.c (num_avx512_k_registers): New constant for number
3318 of K registers.
3319 (num_avx512_zmmh_low_registers): New constant for number of
3320 lower ZMM registers (0-15).
3321 (num_avx512_zmmh_high_registers): New constant for number of
3322 higher ZMM registers (16-31).
3323 (num_avx512_ymmh_registers): New contant for number of higher
3324 YMM registers (ymm16-31 added by avx521 on x86_64).
3325 (num_avx512_xmm_registers): New constant for number of higher
3326 XMM registers (xmm16-31 added by AVX512 on x86_64).
3327 (struct i387_xsave): Add space for AVX512 registers.
3328 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3329 Add code to handle AVX512 registers.
3330 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3331 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3332 prototypei from generated file.
3333 (tdesc_amd64_avx512_linux): Likewise.
3334 (init_registers_x32_avx512_linux): Likewise.
3335 (tdesc_x32_avx512_linux): Likewise.
3336 (init_registers_i386_avx512_linux): Likewise.
3337 (tdesc_i386_avx512_linux): Likewise.
3338 (x86_64_regmap): Add AVX512 registers.
3339 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3340 mask.
3341 (initialize_low_arch): Add code to initialize AVX512 registers.
3342
51aa91f9
PA
33432014-04-23 Pedro Alves <palves@redhat.com>
3344
3345 * mem-break.c (find_gdb_breakpoint_at): Make static.
3346 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3347
a4165e94
PA
33482014-04-23 Pedro Alves <palves@redhat.com>
3349
3350 * i386-low.c: Don't include break-common.h here.
3351 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3352 prototype to take target_hw_bp_type as argument instead of a Z
3353 packet char.
3354 * i386-low.h: Include break-common.h here.
3355 (Z_packet_to_hw_type): Declare.
3356 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3357 prototypes.
3358 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3359 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3360 (x86_remove_point): Convert the packet number to a
3361 target_hw_bp_type before calling i386_low_remove_watchpoint.
3362 * win32-i386-low.c (i386_insert_point): Convert the packet number
3363 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3364 (i386_remove_point): Convert the packet number to a
3365 target_hw_bp_type before calling i386_low_remove_watchpoint.
3366
b8acf843
PA
33672014-04-23 Pedro Alves <palves@redhat.com>
3368
3369 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3370
d708bcd1
PA
33712014-04-10 Pedro Alves <palves@redhat.com>
3372
3373 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3374 Check if the condition or command is NULL before checking if the
3375 breakpoint is known. On success, return true.
3376 * mem-break.h (add_breakpoint_condition): Document return.
3377 (add_breakpoint_commands): Add describing comment.
3378 * server.c (skip_to_semicolon): New function.
3379 (process_point_options): Use it.
3380
2eec7d5b
PA
33812014-04-09 Pedro Alves <palves@redhat.com>
3382
3383 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3384 to lwpid_of.
3385
fa96cb38
PA
33862014-02-27 Pedro Alves <palves@redhat.com>
3387
3388 PR 12702
3389 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3390 macros.
3391 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3392 output.
3393 (last_thread_of_process_p): Take a PID argument instead of a
3394 thread pointer.
3395 (linux_wait_for_lwp): Delete.
3396 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3397 functions.
3398 (linux_low_filter_event): New function, party factored out from
3399 linux_wait_for_event.
3400 (linux_wait_for_event): Rename to ...
3401 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3402 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3403 sigsuspend. Check for zombie leaders.
3404 (linux_wait_for_event): Reimplement as wrapper around
3405 linux_wait_for_event_filtered.
3406 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3407 a normal or signal exit is seen, it's the whole process exiting.
3408 (wait_for_sigstop): No longer a for_each_inferior callback.
3409 Rewrite on top of linux_wait_for_event_filtered.
3410 (stop_all_lwps): Call wait_for_sigstop directly.
3411 * server.c (resume, handle_target_event): Handle
3412 TARGET_WAITKIND_NO_RESUMED.
3413
d763de10
JB
34142014-02-26 Joel Brobecker <brobecker@adacore.com>
3415
3416 * win32-low.c (psapi_get_dll_name,
3417 * win32_CreateToolhelp32Snapshot): Delete.
3418 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3419 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3420 Delete.
3421 (handle_load_dll): Add function description.
3422 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3423
850a0f76
JB
34242014-02-26 Joel Brobecker <brobecker@adacore.com>
3425
3426 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3427 Add comment.
3428 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3429 base address when calling win32_add_one_solib.
3430 (handle_load_dll): Delete local variable load_addr.
3431 Remove 0x1000 offset applied to DLL base address when calling
3432 win32_add_one_solib.
3433 (handle_unload_dll): Add comment.
3434
f25b3fc3
JB
34352014-02-26 Joel Brobecker <brobecker@adacore.com>
3436
3437 * win32-low.c (win32_add_all_dlls): Renames
3438 win32_ensure_ntdll_loaded. Rewrite function documentation.
3439 Adjust implementation to always load all DLLs.
3440 Add 0x1000 offset to DLL base address when calling
3441 win32_add_one_solib.
3442 (child_initialization_done): New static global.
3443 (do_initial_child_stuff): Set child_initialization_done to
3444 zero during child initialization, and 1 after. Replace call
3445 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3446 Add comment.
3447 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3448 (handle_unload_dll): Add function documentation.
3449 (get_child_debug_event): Ignore load and unload DLL events
3450 during child initialization.
3451
d86d4aaf
DE
34522014-02-20 Doug Evans <dje@google.com>
3453
3bc32da3 3454 Remove global all_lwps.
d86d4aaf
DE
3455 * inferiors.h (ptid_of): Move here from linux-low.h.
3456 (pid_of, lwpid_of): Ditto.
3457 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3458 parameter is a struct thread_info * now.
3459 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3460 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3461 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3462 directly.
3463 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3464 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3465 * linux-arm-low.c (update_registers_callback): Update, "entry"
3466 parameter is a struct thread_info * now.
3467 Fetch lwpid from current_inferior directly.
3468 (arm_insert_point): Pass &all_threads to find_inferior instead of
3469 &all_lwps.
3470 (arm_remove_point): Ditto.
3471 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3472 (arm_prepare_to_resume): Fetch pid from thread.
3473 (arm_read_description): Fetch lwpid from current_inferior directly.
3474 * linux-low.c (all_lwps): Delete.
3475 (delete_lwp): Delete call to remove_inferior.
3476 (handle_extended_wait): Fetch lwpid from thread.
3477 (add_lwp): Don't set lwp->entry.id. Remove call to
3478 add_inferior_to_list.
3479 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3480 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3481 (kill_one_lwp_callback): Ditto.
3482 (linux_kill): Don't dereference NULL pointer.
3483 Fetch ptid,lwpid from thread.
3484 (get_detach_signal): Fetch ptid from thread.
3485 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3486 Simplify call to regcache_invalidate_thread.
3487 (delete_lwp_callback): Update, "entry" parameter is a
3488 struct thread_info * now. Fetch pid from thread.
3489 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3490 (status_pending_p_callback): Update, "entry" parameter is a
3491 struct thread_info * now. Fetch ptid from thread.
3492 (find_lwp_pid): Update, "entry" parameter is a
3493 struct thread_info * now.
3494 (linux_wait_for_lwp): Fetch pid from thread.
3495 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3496 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3497 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3498 (dequeue_one_deferred_signal): Ditto.
3499 (cancel_breakpoint): Fetch ptid from current_inferior.
3500 (linux_wait_for_event): Pass &all_threads to find_inferior,
3501 not &all_lwps. Fetch ptid, lwpid from thread.
3502 (count_events_callback): Update, "entry" parameter is a
3503 struct thread_info * now.
3504 (select_singlestep_lwp_callback): Ditto.
3505 (select_event_lwp_callback): Ditto.
3506 (cancel_breakpoints_callback): Ditto.
3507 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3508 not &all_lwps.
3509 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3510 (unsuspend_one_lwp): Update, "entry" parameter is a
3511 struct thread_info * now.
3512 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3513 not &all_lwps.
3514 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3515 Fetch lwpid from thread, not lwp.
3516 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3517 Pass &all_threads to find_inferior, not &all_lwps.
3518 (send_sigstop): Fetch lwpid from thread, not lwp.
3519 (send_sigstop_callback): Update, "entry" parameter is a
3520 struct thread_info * now.
3521 (suspend_and_send_sigstop_callback): Ditto.
3522 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3523 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3524 struct thread_info * now.
3525 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3526 from thread, lwp.
3527 (lwp_running): Update, "entry" parameter is a
3528 struct thread_info * now.
3529 (stop_all_lwps): Fetch ptid from thread.
3530 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3531 (linux_resume_one_lwp): Fetch lwpid from thread.
3532 (linux_set_resume_request): Update, "entry" parameter is a
3533 struct thread_info * now. Fetch pid, lwpid from thread.
3534 (resume_status_pending_p): Update, "entry" parameter is a
3535 struct thread_info * now.
3536 (need_step_over_p): Ditto. Fetch lwpid from thread.
3537 (start_step_over): Fetch lwpid from thread.
3538 (linux_resume_one_thread): Update, "entry" parameter is a
3539 struct thread_info * now. Fetch lwpid from thread.
3540 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3541 (proceed_one_lwp): Update, "entry" parameter is a
3542 struct thread_info * now. Fetch lwpid from thread.
3543 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3544 struct thread_info * now.
3545 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3546 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3547 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3548 directly.
3549 (regsets_store_inferior_registers): Ditto.
3550 (fetch_register, store_register): Ditto.
3551 (linux_read_memory, linux_write_memory): Ditto.
3552 (linux_request_interrupt): Ditto.
3553 (linux_read_auxv): Ditto.
3554 (linux_xfer_siginfo): Ditto.
3555 (linux_qxfer_spu): Ditto.
3556 (linux_qxfer_libraries_svr4): Ditto.
3557 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3558 moved to inferiors.h.
3559 (get_lwp): Delete.
3560 (get_thread_lwp): Update.
3561 (struct lwp_info): Delete member "entry". Simplify comment for
3562 member "thread".
3563 (all_lwps): Delete.
3564 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3565 current_inferior directly.
3566 (update_watch_registers_callback): Update, "entry" parameter is a
3567 struct thread_info * now. Fetch pid from thread.
3568 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3569 (mips_insert_point): Fetch lwpid from current_inferior.
3570 Pass &all_threads to find_inferior, not &all_lwps.
3571 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3572 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3573 directly.
3574 (mips_stopped_data_address): Ditto.
3575 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3576 directly.
3577 * linux-tile-low.c (tile_arch_setup): Ditto.
3578 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3579 (update_debug_registers_callback): Update, "entry" parameter is a
3580 struct thread_info * now. Fetch pid from thread.
3581 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3582 Pass &all_threads to find_inferior, not &all_lwps.
3583 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3584 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3585 Pass &all_threads to find_inferior, not &all_lwps.
3586 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3587 (i386_dr_low_get_status): Ditto.
3588 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3589 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3590 (x86_linux_read_description): Ditto.
3591 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3592
3b8361aa
DE
35932014-02-20 Doug Evans <dje@google.com>
3594
3595 * inferiors.c (get_first_inferior): Fix buglet.
3596
f7667f0d
DE
35972014-02-19 Doug Evans <dje@google.com>
3598
3599 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3600 * inferiors.c (add_thread): Change result type to struct thread_info *.
3601 All callers updated.
3602 (add_lwp): Call add_thread here instead of in callers.
3603 All callers updated.
3604 * linux-low.h (get_lwp_thread): Rewrite.
3605 (struct lwp_info): New member "thread".
3606
b3312d80
DE
36072014-02-19 Doug Evans <dje@google.com>
3608
3609 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3610 All callers updated.
3611
ecc6f45c
DE
36122014-02-19 Doug Evans <dje@google.com>
3613
3614 * inferiors.c (add_thread): Fix whitespace.
3615
649ebbca
DE
36162014-02-19 Doug Evans <dje@google.com>
3617
3618 * dll.c (clear_dlls): Replace accessing list implemention details
3619 with API function.
3620 * gdbthread.h (get_first_thread): Declare.
3621 * inferiors.c (for_each_inferior_with_data): New function.
3622 (get_first_thread): New function.
3623 (find_thread_ptid): Simplify.
3624 (get_first_inferior): New function.
3625 (clear_list): Delete.
3626 (one_inferior_p): New function.
3627 (clear_inferior_list): New function.
3628 (clear_inferiors): Update.
3629 * inferiors.h (for_each_inferior_with_data): Declare.
3630 (clear_inferior_list): Declare.
3631 (one_inferior_p): Declare.
3632 (get_first_inferior): Declare.
3633 * linux-low.c (linux_wait_for_event): Replace accessing list
3634 implemention details with API function.
3635 * server.c (target_running): Ditto.
3636 (accumulate_file_name_length): New function.
3637 (emit_dll_description): New function.
3638 (handle_qxfer_libraries): Replace accessing list implemention
3639 details with API function.
3640 (handle_qxfer_threads_worker): New function.
3641 (handle_qxfer_threads_proper): Replace accessing list implemention
3642 details with API function.
3643 (handle_query): Ditto.
3644 (visit_actioned_threads_callback_ftype): New typedef.
3645 (visit_actioned_threads_data): New struct.
3646 (visit_actioned_threads): Rewrite to be find_inferior callback.
3647 (resume): Call find_inferior.
3648 (handle_status): Replace accessing list implemention
3649 details with API function.
3650 (process_serial_event): Replace accessing list implemention details
3651 with API function.
3652 * target.c (set_desired_inferior): Replace accessing list implemention
3653 details with API function.
3654 * tracepoint.c (same_process_p): New function.
3655 (gdb_agent_about_to_close): Replace accessing list implemention
3656 details with API function.
3657 * win32-low.c (child_delete_thread): Replace accessing list
3658 implemention details with API function.
3659 (match_dll_by_basename): New function.
3660 (dll_is_loaded_by_basename): New function.
3661 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3662 details call to dll_is_loaded_by_basename.
3663
80894984
DE
36642014-02-19 Doug Evans <dje@google.com>
3665
3666 * dll.h (struct dll_info): Add comment.
3667 * gdbthread.h (struct thread_info): Add comment.
3668 (current_ptid): Simplify.
3669 * inferiors.c (add_process): Update.
3670 (remove_process): Update.
3671 * inferiors.h (struct process_info): Rename member "head" to "entry".
3672 * linux-low.c (delete_lwp): Update.
3673 (add_lwp): Update.
3674 (last_thread_of_process_p): Update.
3675 (kill_one_lwp_callback, linux_kill): Update.
3676 (status_pending_p_callback): Update.
3677 (wait_for_sigstop): Update. Simplify read of ptid.
3678 (start_step_over): Update.
3679 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3680 (get_lwp_thread): Update.
3681 (struct lwp_info): Rename member "head" to "entry".
3682 * regcache.h (inferior_list_entry): Delete.
3683 * server.c (kill_inferior_callback): Update.
3684 (detach_or_kill_inferior_callback): Update.
3685 (print_started_pid): Update.
3686 (print_attached_pid): Update.
3687 (process_serial_event): Simplify read of ptid.
3688 * thread-db.c (thread_db_create_event): Update.
3689 (thread_db_get_tls_address): Update.
3690 * win32-low.c (current_inferior_ptid): Simplify.
3691
46917d26
TT
36922014-02-19 Tom Tromey <tromey@redhat.com>
3693
3694 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3695 argument.
3696 (target_supports_btrace): Update.
3697
0759a81e
YQ
36982014-02-14 Yao Qi <yao@codesourcery.com>
3699
3700 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3701 (rsp-low-ipa.o): New target.
3702
a7191e8b
TT
37032014-02-12 Tom Tromey <tromey@redhat.com>
3704
3705 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3706 convert_ascii_to_int.
3707 * regcache.c (registers_to_string): Likewise.
3708 * remote-utils.c (decode_M_packet): Likewise.
3709 * server.c (process_serial_event): Likewise.
3710
ff0e980e
TT
37112014-02-12 Tom Tromey <tromey@redhat.com>
3712
3713 * server.c (handle_query, handle_v_run): Use hex2bin, not
3714 unhexify.
3715 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3716
e9371aff
TT
37172014-02-12 Tom Tromey <tromey@redhat.com>
3718
3719 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3720 convert_int_to_ascii.
3721 * regcache.c (registers_to_string, collect_register_as_string):
3722 Likewise.
3723 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3724 Likewise.
3725 * server.c (process_serial_event): Likewise.
3726 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3727 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3728
971dc0b8
TT
37292014-02-12 Tom Tromey <tromey@redhat.com>
3730
3731 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3732 bin2hex, not hexify.
3733 * tracepoint.c (cmd_qtstatus): Likewise.
3734
0a822afb
TT
37352014-02-12 Tom Tromey <tromey@redhat.com>
3736
3737 * remote-utils.c (monitor_output): Pass explicit length to
3738 hexify.
3739
9c3d6531
TT
37402014-02-12 Tom Tromey <tromey@redhat.com>
3741
3742 * tracepoint.c: Include rsp-low.h.
3743 * server.c: Include rsp-low.h.
3744 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3745 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3746 declare.
3747 * remote-utils.c: Include rsp-low.h.
3748 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3749 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3750 (convert_int_to_ascii, convert_ascii_to_int): Move to
3751 common/rsp-low.c.
3752 * regcache.c: Include rsp-low.h.
3753 * ax.c: Include rsp-low.h.
3754 * Makefile.in (SFILES): Add common/rsp-low.c.
3755 (OBS): Add rsp-low.o.
3756 (rsp-low.o): New target.
3757
01fd3ea5
TT
37582014-02-12 Tom Tromey <tromey@redhat.com>
3759
3760 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3761 Include print-utils.h.
3762 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3763 (plongest, thirty_two, phex_nz): Remove.
3764 * Makefile.in (SFILES): Add common/print-utils.c.
3765 (OBS): Add print-utils.o.
3766 (print-utils-ipa.o): New target.
3767 (print-utils.o): New target.
3768 (IPA_OBJS): Add print-utils-ipa.o.
3769
e99dc820
TT
37702014-02-06 Tom Tromey <tromey@redhat.com>
3771
3772 * Makefile.in (SFILES): Fix indentation.
3773
ee1e2d4f
DE
37742014-02-05 Doug Evans <dje@google.com>
3775
3776 * linux-low.c (linux_wait_for_event): Improve comment.
3777 (linux_wait_1): Keep current_inferior in sync with event_child.
3778
f5a02773
DE
37792014-01-22 Doug Evans <dje@google.com>
3780
3781 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3782
87ce2a04
DE
37832014-01-22 Doug Evans <dje@google.com>
3784
3785 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3786 * configure: Regenerate.
3787 * config.in: Regenerate.
3788 * Makefile.in (SFILES): Add debug.c.
3789 (OBS): Add debug.o.
3790 * debug.c: New file.
3791 * debug.h: New file.
3792 * linux-aarch64-low.c (*): Update all debugging printfs to use
3793 debug_printf instead of fprintf.
3794 * linux-arm-low.c (*): Ditto.
3795 * linux-cris-low.c (*): Ditto.
3796 * linux-crisv32-low.c (*): Ditto.
3797 * linux-m32r-low.c (*): Ditto.
3798 * linux-sparc-low.c (*): Ditto.
3799 * linux-x86.c (*): Ditto.
3800 * linux-low.c (*): Ditto.
3801 (linux_wait_1): Add calls to debug_enter, debug_exit.
3802 (linux_wait): Remove redundant debugging printf.
3803 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3804 (linux_resume, unstop_all_lwps): Ditto.
3805 * mem-break.c (*): Update all debugging printfs to use
3806 debug_printf instead of fprintf.
3807 * remote-utils.c (*): Ditto.
3808 * thread-db.c (*): Ditto.
3809 * server.c #include <ctype.h>, "gdb_vecs.h".
3810 (debug_threads): Moved to debug.c.
3811 (*): Update all debugging printfs to use debug_printf instead of
3812 fprintf.
3813 (start_inferior): Replace call to fflush with call to debug_flush.
3814 (monitor_show_help): Mention set debug-format.
3815 (parse_debug_format_options): New function.
3816 (handle_monitor_command): Handle "monitor set debug-format".
3817 (gdbserver_usage): Mention --debug-format.
3818 (main): Parse --debug-format.
3819 * server.h (debug_threads): Declaration moved to debug.h.
3820 #include "debug.h".
3821 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3822 trace_debug_1 that uses debug_printf.
3823 (tracepoint_look_up_symbols): Update all debugging printfs to use
3824 debug_printf instead of fprintf.
3825
e671835b
BS
38262014-01-20 Baruch Siach <baruch@tkos.co.il>
3827
3828 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3829 sys/ptrace.h.
3830
b5737fa9
PA
38312014-01-17 Pedro Alves <palves@redhat.com>
3832
ea38d2a9 3833 PR build/16445
c7faa97a
PA
3834 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3835 defined after including gdb_proc_service.h.
b5737fa9 3836
40ed484e
DE
38372014-01-16 Doug Evans <dje@google.com>
3838
3839 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3840 (match_dll): Use it.
3841
969c39fb
MM
38422014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3843
3844 * target.h (target_ops) <read_btrace>: Change parameters and
3845 return type to allow error reporting.
3846 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3847 trace reading errors on.
3848 * linux-low.c (linux_low_read_btrace): Pass trace reading
3849 errors on.
3850 (linux_low_disable_btrace): New.
3851
ab7f45ba
DE
38522014-01-15 Doug Evans <dje@google.com>
3853
3854 * inferiors.c (thread_id_to_gdb_id): Delete.
3855 * inferiors.h (thread_id_to_gdb_id): Delete.
3856
66af0f44
EZ
38572014-01-13 Eli Zaretskii <eliz@gnu.org>
3858
3859 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3860 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3861 versions.
3862
9939e131
PA
38632014-01-08 Pedro Alves <palves@redhat.com>
3864
3865 * server.c (handle_status): Don't discard previous queued stop
3866 replies or thread's pending status here.
3867 (main) <disconnection>: Do it here instead.
3868
b7ea362b
PA
38692014-01-08 Pedro Alves <palves@redhat.com>
3870
3871 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3872 * server.c (visit_actioned_threads, handle_pending_status): New
3873 function.
3874 (handle_v_cont): Factor out parts to ...
3875 (resume): ... this new function. If in all-stop, and a thread
3876 being resumed has a pending status, report it without actually
3877 resuming.
3878 (myresume): Adjust to use the new 'resume' function.
3879 (clear_pending_status_callback, set_pending_status_callback)
3880 (find_status_pending_thread_callback): New functions.
3881 (handle_status): Handle the case of multiple threads having
3882 interesting statuses to report. Report threads' real last signal
3883 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3884 with an interesting thread to report the status for, instead of
3885 always reporting the status of the first thread.
3886
28498c42
JB
38872014-01-01 Joel Brobecker <brobecker@adacore.com>
3888
3889 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3890 * gdbreplay.c (gdbreplay_version): Likewise.
3891
f45c82da
YZ
38922013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3893
3894 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3895 iov.iov_len with the real length in use.
3896
379a5e2d
JB
38972013-12-13 Joel Brobecker <brobecker@adacore.com>
3898
3899 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3900 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3901 for all targets that use win32-low.c.
3902 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3903 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3904
4210d83e
PA
39052013-12-13 Pedro Alves <palves@redhat.com>
3906
3907 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3908 if equal to TARGET_WAITKIND_LOADED.
3909 * win32-low.c (cached_status): New static global.
3910 (win32_wait): Add declaration.
3911 (do_initial_child_stuff): Flush all initial pending debug events
3912 up to the initial breakpoint.
3913 (win32_wait): If CACHED_STATUS was set, return that instead
3914 of doing a real wait. Remove the code resuming the execution
3915 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3916 during the initial phase. Also remove the code changing
3917 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3918 TARGET_WAITKIND_STOPPED.
3919
e7f0d979
YQ
39202013-12-11 Yao Qi <yao@codesourcery.com>
3921
3922 * notif.c (handle_notif_ack): Return 0 if no notification
3923 matches.
3924
ebcf782c
DE
39252013-11-20 Doug Evans <dje@google.com>
3926
3927 * linux-low.c (linux_set_resume_request): Fix comment.
3928
20ad9378
DE
39292013-11-20 Doug Evans <dje@google.com>
3930
3931 * linux-low.c (resume_status_pending_p): Tweak comment.
3932
a196ebeb
WT
39332013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3934
3935 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3936 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3937 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3938 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3939 (srv_amd64_regobj): Add amd64-mpx.o.
3940 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3941 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3942 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3943 * i387-fp.c (num_pl_bnd_register) Added constant.
3944 (num_pl_bnd_cfg_registers) Added constant.
3945 (struct i387_xsave) Added reserved area and MPX fields.
3946 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3947 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3948 function.
3949 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3950 (init_registers_amd64_mpx_linux): Declare new function.
3951 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3952 (x86_64_regmap): Add MPX registers.
3953 (x86_linux_read_description): Add MPX case.
3954 (initialize_low_arch): Initialize MPX targets.
3955
0080a2f6
TT
39562013-11-18 Tom Tromey <tromey@redhat.com>
3957
3958 * configure: Rebuild.
3959 * configure.ac: Don't check for stdlib.h.
3960 * gdbreplay.c: Unconditionally include stdlib.h.
3961
2978b111
TT
39622013-11-18 Tom Tromey <tromey@redhat.com>
3963
3964 * config.in: Rebuild.
3965 * configure: Rebuild.
3966 * configure.ac: Don't use AC_HEADER_DIRENT.
3967
a3d08894
TT
39682013-11-18 Tom Tromey <tromey@redhat.com>
3969
3970 * server.h: Don't check HAVE_STRING_H.
3971 * gdbreplay.c: Don't check HAVE_STRING_H.
3972 * configure: Rebuild.
3973
0a5dd17d
TT
39742013-11-18 Tom Tromey <tromey@redhat.com>
3975
3976 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3977 LIBGNU.
3978
1bd2f0ba
TT
39792013-11-08 Tom Tromey <tromey@redhat.com>
3980
3981 * configure, config.in: Rebuild.
3982 * configure.ac: Remove unused configury.
3983
3266f10b
TT
39842013-11-08 Tom Tromey <tromey@redhat.com>
3985
3986 * acinclude.m4: Include common.m4, codeset.m4.
3987 * configure, config.in: Rebuild.
3988 * configure.ac: Use GDB_AC_COMMON.
3989
6682d959
AA
39902013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3991
3992 * linux-s390-low.c (HWCAP_S390_TE): New define.
3993 (s390_arch_setup): Consider the TE field in the HWCAP for
3994 determining 'have_regset_tdb'.
3995
fd0a4d76
SDJ
39962013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3997
3998 PR gdb/16014
3999 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4000 call to sizeof.
4001
1a3d890b
PA
40022013-10-02 Pedro Alves <palves@redhat.com>
4003
4004 * server.c (process_serial_event): Don't output "GDBserver
4005 exiting" if GDB is connected through stdio.
4006 * target.c (mywait): Likewise, be silent if GDB is connected
4007 through stdio.
4008
97ad4581
JB
40092013-10-01 Joel Brobecker <brobecker@adacore.com>
4010
4011 * lynx-low.c (lynx_add_threads_after_attach): New function.
4012 (lynx_attach): Remove call to add_thread. Add call to
4013 lynx_add_threads_after_attach instead.
4014
5b4e221c
MF
40152013-09-28 Mike Frysinger <vapier@gentoo.org>
4016
4017 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4018 * config.in, configure: Regenerated.
4019
ee47b2f8
YQ
40202013-09-18 Yao Qi <yao@codesourcery.com>
4021
4022 PR server/15959
4023 * server.c (start_inferior): Clear 'resume_info'.
4024
d6707650 40252013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 4026
d6707650
JW
4027 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4028 for each register.
4029
9243dd0e 40302013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 4031
9243dd0e
JW
4032 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4033 linux-tile-low.o to srv_tgtobj.
4034
c623a6ef
WN
40352013-09-16 Will Newton <will.newton@linaro.org>
4036
4037 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4038 out regs.
4039
fb71d39e
PA
40402013-09-06 Pedro Alves <palves@redhat.com>
4041
4042 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4043 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4044 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4045 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4046 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4047 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4048
8e7e9910
PA
40492013-09-06 Pedro Alves <palves@redhat.com>
4050
4051 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4052 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4053
7c3a12ca
PA
40542013-09-06 Pedro Alves <palves@redhat.com>
4055
4056 * linux-amd64-ipa.c: Include tracepoint.h.
4057 * linux-i386-ipa.c: Include tracepoint.h.
4058
8eb3d7b6
RW
40592013-09-06 Ricard Wanderlof <ricardw@axis.com>
4060
4061 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4062 (ps_get_thread_area): New function.
4063
eddddb9d
RW
40642013-09-06 Ricard Wanderlof <ricardw@axis.com>
4065
4066 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4067 (initialize_low_arch): Call init_registers_crisv32 rather than
4068 init_register_crisv32.
4069
533b0600
PA
40702013-09-05 Pedro Alves <palves@redhat.com>
4071
4072 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4073 to ...
4074 * hostio.h: ... this new file.
4075 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4076 win32-low.c: Include hostio.h.
4077
0ce3d3b5
PA
40782013-09-05 Pedro Alves <palves@redhat.com>
4079
4080 * server.h (gdb_client_data, handler_func, callback_handler_func)
4081 (delete_file_handler, add_file_handler, append_callback_event)
4082 (delete_callback_event, start_event_loop, initialize_event_loop):
4083 Move to event-loop.h and include it.
4084 * event-loop.h: New file.
4085
799cdc37
PA
40862013-09-05 Pedro Alves <palves@redhat.com>
4087
4088 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4089 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4090 (loaded_dll, unloaded_dll): Move to ...
4091 * dll.h: ... this new file.
4092 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4093
6a6bbd9d
PA
40942013-09-05 Pedro Alves <palves@redhat.com>
4095
4096 * server.h (current_process, get_thread_process, all_processes)
4097 (add_inferior_to_list, for_each_inferior, current_inferior)
4098 (remove_inferior, add_process, remove_process, find_process_pid)
4099 (have_started_inferiors_p, have_attached_inferiors_p)
4100 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4101 (clear_inferiors, find_inferior, find_inferior_id)
4102 (inferior_target_data, set_inferior_target_data)
4103 (inferior_regcache_data, set_inferior_regcache_data): Move to
4104 inferiors.h, and include it.
4105 * inferiors.h: New file.
4106
f699aaba
PA
41072013-09-05 Pedro Alves <palves@redhat.com>
4108
4109 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4110 Move ...
72f4393d 4111 * ax.h: ... here.
f699aaba 4112
c144c7a0
PA
41132013-09-05 Pedro Alves <palves@redhat.com>
4114
4115 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4116 tracepoint.h.
4117 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4118 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4119 (handle_tracepoint_general_set, handle_tracepoint_query)
4120 (tracepoint_finished_step, tracepoint_was_hit)
4121 (release_while_stepping_state_list, current_traceframe)
4122 (in_readonly_region, traceframe_read_mem)
4123 (fetch_traceframe_registers, traceframe_read_sdata)
4124 (traceframe_read_info, struct fast_tpoint_collect_status)
4125 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4126 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4127 (supply_fast_tracepoint_registers)
4128 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4129 (ipa_tdesc, claim_trampoline_space)
4130 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4131 (agent_mem_read, agent_get_trace_state_variable_value)
4132 (agent_set_trace_state_variable_value, agent_tsv_read)
4133 (agent_mem_read_string, get_raw_reg_func_addr)
4134 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4135 * tracepoint.h: ... this new file.
4136
ff42e6ab
PA
41372013-09-05 Pedro Alves <palves@redhat.com>
4138
4139 * server.h (perror_with_name, error, fatal, warning, paddress)
4140 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4141 include it.
4142 * utils.h: New file.
4143
541af0f4
PA
41442013-09-05 Pedro Alves <palves@redhat.com>
4145
4146 * server.h (remote_debug, noack_mode, transport_is_reliable)
4147 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4148 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4149 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4150 (write_enn, initialize_async_io, enable_async_io)
4151 (disable_async_io, check_remote_input_interrupt_request)
4152 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4153 (dead_thread_notify, prepare_resume_reply)
4154 (decode_address_to_semicolon, decode_address, decode_m_packet)
4155 (decode_M_packet, decode_X_packet, decode_xfer_write)
4156 (decode_search_memory_packet, unhexify, hexify)
4157 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4158 (look_up_one_symbol, relocate_instruction)
4159 (monitor_output): Move to remote-utils.h, and include it.
4160 * remote-utils.h: New file.
4161
eebdf26b
PA
41622013-09-05 Pedro Alves <palves@redhat.com>
4163
4164 * server.h (_): Delete.
4165
3aafd2ff
PA
41662013-09-02 Pedro Alves <palves@redhat.com>
4167
4168 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4169 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4170 allocated.
4171 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4172
cee83bcb
PM
41732013-09-02 Pierre Muller <muller@sourceware.org>
4174
4175 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4176 or WriteProcessMemory complete successfully and handle
4177 ERROR_PARTIAL_COPY error.
4178
9a13b2fa
PA
41792013-09-02 Pedro Alves <palves@redhat.com>
4180
4181 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4182 error instead of EIO.
4183
602e3198
JK
41842013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4185
4186 PR server/15604
4187 * linux-low.c: Include filestuff.h.
4188 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4189 * lynx-low.c: Include filestuff.h.
4190 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4191 * server.c: Include filestuff.h.
4192 (main): Call notice_open_fds.
4193 * spu-low.c: Include filestuff.h.
4194 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4195
96d7229d
LM
41962013-08-22 Luis Machado <lgustavo@codesourcery.com>
4197
4198 * Makefile.in: Explain why ../target and ../nat are not
4199 listed as include file search paths.
4200 (linux-waitpid.o): New object file rule.
4201 * configure.srv (srv_native_linux_obj): New variable.
4202 Replace all occurrences of linux native object files with
4203 $srv_native_linux_obj.
4204 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4205 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4206 (linux_enable_event_reporting): Remove declaration.
4207 (my_waitpid): Moved to common/linux-waitpid.c.
4208 (linux_wait_for_event): Pass ptid when calling
4209 linux_enable_event_reporting.
4210 (linux_supports_tracefork_flag): Remove.
4211 (linux_enable_event_reporting): Likewise.
4212 (linux_tracefork_grandchild): Remove.
4213 (STACK_SIZE): Moved to common/linux-ptrace.c.
4214 (linux_tracefork_child): Remove.
4215 (linux_test_for_tracefork): Remove.
4216 (linux_look_up_symbols): Call linux_supports_traceclone.
4217 (initialize_low): Remove call to linux_test_for_tracefork.
4218 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4219 common/linux-ptrace.h.
4220 (PTRACE_TYPE_ARG4): Likewise.
4221 Include linux-ptrace.h.
4222
32940073
PA
42232013-08-21 Pedro Alves <palves@redhat.com>
4224
4225 * config.in: Renegerate.
4226
33b60d58 42272013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 4228
33b60d58
LM
4229 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4230 (SFILES): Remove $(srcdir)/common/target-common.c and
4231 add $(srcdir)/target/waitstatus.c.
4232 (OBS): Remove target-common.o and add waitstatus.o.
4233 (server_h): Remove $(srcdir)/../common/target-common.h and
4234 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4235 and $(srcdir)/../target/waitstatus.h.
4236 (target-common.o): Remove.
4237 (waitstatus.o): New target object file.
4238 * target.h: Do not include target-common.h and
4239 include target/resume.h, target/wait.h and
4240 target/waitstatus.h.
4241
b8e1b30e
LM
42422013-08-13 Luis Machado <lgustavo@codesourcery.com>
4243
4244 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4245 to PTRACE_TYPE_ARG3.
4246 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4247 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4248 PTRACE_TYPE_ARG4.
4249 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4250 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4251
7a60ad40
YQ
42522013-07-27 Jie Zhang <jie@codesourcery.com>
4253 Daniel Jacobowitz <dan@codesourcery.com>
4254 Yao Qi <yao@codesourcery.com>
4255
4256 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4257 (mips-linux-watch.o): New rule.
4258 (mips_linux_watch_h): New variable.
4259 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4260 srv_tgtobj.
4261 * linux-mips-low.c: Include mips-linux-watch.h.
4262 (struct arch_process_info, struct arch_lwp_info): New.
4263 (update_watch_registers_callback): New function.
4264 (mips_linux_new_process, mips_linux_new_thread) New functions.
4265 (mips_linux_prepare_to_resume, mips_insert_point): New
4266 functions.
4267 (mips_remove_point, mips_stopped_by_watchpoint): New
4268 functions.
4269 (rsp_bp_type_to_target_hw_bp_type): New function.
4270 (mips_stopped_data_address): New function.
4271 (the_low_target): Add watchpoint support functions.
4272
de6f69ad
YQ
42732013-07-27 Yao Qi <yao@codesourcery.com>
4274
4275 * i386-low.c: Include break-common.h.
4276 (enum target_hw_bp_type): Remove.
4277
3360c0bf
LM
42782013-07-24 Luis Machado <lgustavo@codesourcery.com>
4279
4280 * Makefile.in (SFILES): /common/target-common.c.
4281 (OBS): Add target-common.o.
4282 (server_h): Add $(srcdir)/../common/target-common.h.
4283 (target-common.o): New target.
4284 * server.c (queue_stop_reply_callback): Free
4285 status string after use.
4286 * target.c (target_waitstatus_to_string): Remove.
4287 * target.h: Include target-common.h.
4288 (resume_kind): Likewise.
4289 (target_waitkind): Likewise.
4290 (target_waitstatus): Likewise.
4291 (TARGET_WNOHANG): Likewise.
4292
bd885420
YQ
42932013-07-04 Yao Qi <yao@codesourcery.com>
4294
4295 * Makefile.in (host_alias): Use @host_noncanonical@.
4296 (target_alias): Use @target_noncanonical@.
4297 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4298 ACX_NONCANONICAL_HOST.
4299 * configure: Regenerated.
4300
4301 Revert:
4302 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4303
4304 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4305 * configure: Rebuild.
4306 * Makefile.in (version_host, version_target): Get from configure.
4307 (version.c): Use $(version_host) and $(version_target).
4308
17ef446e
PA
43092013-07-03 Pedro Alves <palves@redhat.com>
4310
4311 * Makefile.in (config.status): Depend on development.sh.
4312 * acinclude.m4: Include libmcheck.m4.
4313 * configure: Regenerate.
4314
7a9a7487
MG
43152013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4316
4317 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4318 attribute inside the parentheses.
4319 (winapi_DebugSetProcessKillOnExit): Ditto.
4320 (winapi_DebugBreakProcess): Ditto.
4321 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 4322
49b64de6
MG
43232013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4324
4325 * notif.h (notif_event): Add a dummy member to avoid compiler
4326 errors.
4327
d5749ee7
PA
43282013-07-01 Pedro Alves <palves@redhat.com>
4329
4330 * hostio.c (HOSTIO_PATH_MAX): Define.
4331 (require_filename, handle_open, handle_unlink, handle_readlink):
4332 Use it.
4333
d8d2a3ee
PA
43342013-07-01 Pedro Alves <palves@redhat.com>
4335
4336 * server.h: Include "pathmax.h".
4337 * linux-low.c: Don't include sys/param.h.
4338 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4339 MAXPATHLEN.
4340 * win32-low.c: Don't include sys/param.h.
4341 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4342
bc7dea8d
PA
43432013-07-01 Pedro Alves <palves@redhat.com>
4344
4345 * event-loop.c: Don't check HAVE_UNISTD_H before including
4346 <unistd.h>.
4347 * gdbreplay.c: Likewise.
4348 * remote-utils.c: Likewise.
4349 * server.c: Likewise.
4350 * configure.ac: Don't check for unistd.h.
4351 * configure: Regenerate.
4352
d6c2da54
TT
43532013-06-28 Tom Tromey <tromey@redhat.com>
4354
4355 * Makefile.in (version.c): Use version.in, not
4356 common/version.in.
4357
257b6bec
MG
43582013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4359
4360 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4361 * configure: Rebuild.
4362 * Makefile.in (version_host, version_target): Get from configure.
4363 (version.c): Use $(version_host) and $(version_target).
4364
86ebe149
DK
43652013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4366
4367 Fix trace-status to output user name without trailing colon.
4368 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4369
f30aa5af
DK
43702013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4371
4372 Fix trace-status to output proper start-time and stop-time.
4373 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4374 output start time and stop time in hex as gdb expects.
4375
28a93511
YQ
43762013-06-26 Pedro Alves <pedro@codesourcery.com>
4377
4378 * tracepoint.c (build_traceframe_info_xml): Output trace state
4379 variables present in the trace buffer.
4380
01208463
TT
43812013-06-24 Tom Tromey <tromey@redhat.com>
4382
4383 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4384 create-version.sh.
4385 (version.o): Remove.
4386 * gdbreplay.c: Include version.h.
4387 (version, host_name): Don't declare.
4388 * server.h: Include version.h.
4389 (version, host_name): Don't declare.
4390
760256f9
PA
43912013-06-12 Pedro Alves <palves@redhat.com>
4392
4393 * linux-x86-low.c (linux_is_elf64): Delete global.
4394 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4395 with local linux_pid_exe_is_elf_64_file use.
4396
030031ee
PA
43972013-06-11 Pedro Alves <palves@redhat.com>
4398
4399 * linux-low.c (regset_disabled, disable_regset): New functions.
4400 (regsets_fetch_inferior_registers)
4401 (regsets_store_inferior_registers): Use them.
4402 (initialize_regsets_info); Don't allocate the disabled_regsets
4403 array here.
4404 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4405 comment.
4406
5da6eb0a
PA
44072013-06-11 Pedro Alves <palves@redhat.com>
4408
4409 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4410 xmalloc.
4411
7e5aaa09
PA
44122013-06-11 Pedro Alves <palves@redhat.com>
4413
4414 * linux-x86-low.c (initialize_low_arch): Call
4415 init_registers_x32_avx_linux.
4416
d878444c
JK
44172013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4418
4419 Fix compatibility with Android Bionic.
4420 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4421 it is not empty.
4422
3aee8918
PA
44232013-06-07 Pedro Alves <palves@redhat.com>
4424
5f2b57b5 4425 PR server/14823
3aee8918
PA
4426 * Makefile.in (OBS): Add tdesc.o.
4427 (IPA_OBJS): Add tdesc-ipa.o.
4428 (tdesc-ipa.o): New rule.
4429 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4430 interface.
4431 * linux-low.c (new_inferior): Delete.
4432 (disabled_regsets, num_regsets): Delete.
4433 (linux_add_process): Adjust to set the new per-process
4434 new_inferior flag.
4435 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4436 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4437 was a stop. When calling arch_setup, switch the current inferior
4438 to the thread that got an event.
4439 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4440 (regsets_fetch_inferior_registers)
4441 (regsets_store_inferior_registers): New regsets_info parameter.
4442 Adjust to use it.
4443 (linux_register_in_regsets): New regs_info parameter. Adjust to
4444 use it.
4445 (register_addr, fetch_register, store_register): New usrregs_info
4446 parameter. Adjust to use it.
4447 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4448 parameter regs_info. Adjust to use it.
4449 (linux_fetch_registers): Get the current inferior's regs_info, and
4450 adjust to use it.
4451 (linux_store_registers): Ditto.
4452 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4453 (initialize_low): Don't initialize the target_regsets here. Call
4454 initialize_low_arch.
4455 * linux-low.h (target_regsets): Delete declaration.
4456 (struct regsets_info): New.
4457 (struct usrregs_info): New.
4458 (struct regs_info): New.
4459 (struct process_info_private) <new_inferior>: New field.
4460 (struct linux_target_ops): Delete the num_regs, regmap, and
4461 regset_bitmap fields. New field regs_info.
4462 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4463 * i387-fp.c (num_xmm_registers): Delete.
4464 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4465 calls to new interface.
4466 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4467 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4468 Infer the number of xmm registers from the regcache's target
4469 description.
4470 * i387-fp.h (num_xmm_registers): Delete.
4471 * inferiors.c (add_thread): Don't install the thread's regcache
4472 here.
4473 * proc-service.c (gregset_info): Fetch the current inferior's
4474 regs_info. Adjust to use it.
4475 * regcache.c: Include tdesc.h.
4476 (register_bytes, reg_defs, num_registers)
4477 (gdbserver_expedite_regs): Delete.
4478 (get_thread_regcache): If the thread doesn't have a regcache yet,
4479 create one, instead of aborting gdbserver.
4480 (regcache_invalidate_one): Rename to ...
4481 (regcache_invalidate_thread): ... this.
4482 (regcache_invalidate_one): New.
4483 (regcache_invalidate): Only invalidate registers of the current
4484 process.
4485 (init_register_cache): Add target_desc parameter, and use it.
4486 (new_register_cache): Ditto. Assert the target description has a
4487 non zero registers_size.
4488 (regcache_cpy): Add assertions. Adjust.
4489 (realloc_register_cache, set_register_cache): Delete.
4490 (registers_to_string, registers_from_string): Adjust.
4491 (find_register_by_name, find_regno, find_register_by_number)
4492 (register_cache_size): Add target_desc parameter, and use it.
4493 (free_register_cache_thread, free_register_cache_thread_one)
4494 (regcache_release, register_cache_size): New.
4495 (register_size): Add target_desc parameter, and use it.
4496 (register_data, supply_register, supply_register_zeroed)
4497 (supply_regblock, supply_register_by_name, collect_register)
4498 (collect_register_as_string, collect_register_by_name): Adjust.
4499 * regcache.h (struct target_desc): Forward declare.
4500 (struct regcache) <tdesc>: New field.
4501 (init_register_cache, new_register_cache): Add target_desc
4502 parameter.
4503 (regcache_invalidate_thread): Declare.
4504 (regcache_invalidate_one): Delete declaration.
4505 (regcache_release): Declare.
4506 (find_register_by_number, register_cache_size, register_size)
4507 (find_regno): Add target_desc parameter.
4508 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4509 declarations.
4510 * remote-utils.c: Include tdesc.h.
4511 (outreg, prepare_resume_reply): Adjust.
4512 * server.c: Include tdesc.h.
4513 (gdbserver_xmltarget): Delete declaration.
4514 (get_features_xml, process_serial_event): Adjust.
4515 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4516 declare.
4517 (struct process_info) <tdesc>: New field.
4518 (ipa_tdesc): Declare.
4519 * tdesc.c: New file.
4520 * tdesc.h: New file.
4521 * tracepoint.c: Include tdesc.h.
4522 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4523 (get_context_regcache): Adjust to pass ipa_tdesc down.
4524 (do_action_at_tracepoint): Adjust to get the register cache size
4525 from the context regcache's description.
4526 (traceframe_walk_blocks): Adjust to get the register cache size
4527 from the current trace frame's description.
4528 (traceframe_get_pc): Adjust to get current trace frame's
4529 description and pass it down.
4530 (gdb_collect): Adjust to get the register cache size from the
4531 IPA's description.
4532 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4533 (gdbserver_xmltarget): Delete.
4534 (initialize_low_tracepoint): Set the ipa's target description.
4535 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4536 (initialize_low_tracepoint): Set the ipa's target description.
4537 * linux-x86-low.c: Include tdesc.h.
4538 [__x86_64__] (is_64bit_tdesc): New.
4539 (ps_get_thread_area, x86_get_thread_area): Use it.
4540 (i386_cannot_store_register): Rename to ...
4541 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4542 (i386_cannot_fetch_register): Rename to ...
4543 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4544 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4545 to new interface.
4546 (target_regsets): Rename to ...
4547 (x86_regsets): ... this.
4548 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4549 interface.
4550 (x86_siginfo_fixup): Use is_64bit_tdesc.
4551 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4552 (tdesc_x32_avx_linux, tdesc_x32_linux)
4553 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4554 Declare.
4555 (x86_linux_update_xmltarget): Delete.
4556 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4557 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4558 (AMD64_LINUX_USER64_CS): New.
4559 (x86_linux_read_description): New, based on
4560 x86_linux_update_xmltarget.
4561 (same_process_callback): New.
4562 (x86_arch_setup_process_callback): New.
4563 (x86_linux_update_xmltarget): New.
4564 (x86_regsets_info): New.
4565 (amd64_linux_regs_info): New.
4566 (i386_linux_usrregs_info): New.
4567 (i386_linux_regs_info): New.
4568 (x86_linux_regs_info): New.
4569 (x86_arch_setup): Reimplement.
4570 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4571 (x86_emit_ops): Ditto.
4572 (the_low_target): Adjust. Install x86_linux_regs_info,
4573 x86_cannot_fetch_register, and x86_cannot_store_register.
4574 (initialize_low_arch): New.
4575 * linux-ia64-low.c (tdesc_ia64): Declare.
4576 (ia64_fetch_register): Adjust.
4577 (ia64_usrregs_info, regs_info): New globals.
4578 (ia64_regs_info): New function.
4579 (the_low_target): Adjust.
4580 (initialize_low_arch): New function.
4581 * linux-sparc-low.c (tdesc_sparc64): Declare.
4582 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4583 Adjust.
4584 (sparc_arch_setup): New function.
4585 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4586 (the_low_target): Adjust.
4587 (initialize_low_arch): New function.
4588 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4589 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4590 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4591 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4592 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4593 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4594 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4595 (tdesc_powerpc_isa205_vsx64l): Declare.
4596 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4597 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4598 (ppc_set_pc, ppc_get_hwcap): Adjust.
4599 (ppc_usrregs_info): Forward declare.
4600 (!__powerpc64__) ppc_regmap_adjusted: New global.
4601 (ppc_arch_setup): Adjust to the current process'es target
4602 description.
4603 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4604 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4605 (ppc_store_evrregset): Adjust.
4606 (target_regsets): Rename to ...
4607 (ppc_regsets): ... this, and make static.
4608 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4609 (ppc_regs_info): New function.
4610 (the_low_target): Adjust.
4611 (initialize_low_arch): New function.
4612 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4613 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4614 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4615 (tdesc_s390x_linux64v2): Declare.
4616 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4617 (s390_fill_gregset, s390_store_last_break): Adjust.
4618 (target_regsets): Rename to ...
4619 (s390_regsets): ... this, and make static.
4620 (s390_get_pc, s390_set_pc): Adjust.
4621 (s390_get_hwcap): New target_desc parameter, and use it.
4622 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4623 (s390_arch_setup): Adjust to set the current process'es target
4624 description. Don't adjust the regmap.
4625 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4626 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4627 (regs_info_3264): New globals.
4628 (s390_regs_info): New function.
4629 (the_low_target): Adjust.
4630 (initialize_low_arch): New function.
4631 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4632 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4633 [__mips64] (init_registers_mips_linux)
4634 (init_registers_mips_dsp_linux): Delete defines.
4635 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4636 (have_dsp): New global.
4637 (mips_read_description): New, based on mips_arch_setup.
4638 (mips_arch_setup): Reimplement.
4639 (get_usrregs_info): New function.
4640 (mips_cannot_fetch_register, mips_cannot_store_register)
4641 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4642 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4643 (target_regsets): Rename to ...
4644 (mips_regsets): ... this, and make static.
4645 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4646 (dsp_regs_info, regs_info): New globals.
4647 (mips_regs_info): New function.
4648 (the_low_target): Adjust.
4649 (initialize_low_arch): New function.
4650 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4651 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4652 Declare.
4653 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4654 (arm_read_description): New, with bits factored from
4655 arm_arch_setup.
4656 (arm_arch_setup): Reimplement.
4657 (target_regsets): Rename to ...
4658 (arm_regsets): ... this, and make static.
4659 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4660 (arm_regs_info): New function.
4661 (the_low_target): Adjust.
4662 (initialize_low_arch): New function.
4663 * linux-m68k-low.c (tdesc_m68k): Declare.
4664 (target_regsets): Rename to ...
4665 (m68k_regsets): ... this, and make static.
4666 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4667 (m68k_regs_info): New function.
4668 (m68k_arch_setup): New function.
4669 (the_low_target): Adjust.
4670 (initialize_low_arch): New function.
4671 * linux-sh-low.c (tdesc_sharch): Declare.
4672 (target_regsets): Rename to ...
4673 (sh_regsets): ... this, and make static.
4674 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4675 (sh_regs_info, sh_arch_setup): New functions.
4676 (the_low_target): Adjust.
4677 (initialize_low_arch): New function.
4678 * linux-bfin-low.c (tdesc_bfin): Declare.
4679 (bfin_arch_setup): New function.
4680 (bfin_usrregs_info, regs_info): New globals.
4681 (bfin_regs_info): New function.
4682 (the_low_target): Adjust.
4683 (initialize_low_arch): New function.
4684 * linux-cris-low.c (tdesc_cris): Declare.
4685 (cris_arch_setup): New function.
4686 (cris_usrregs_info, regs_info): New globals.
4687 (cris_regs_info): New function.
4688 (the_low_target): Adjust.
4689 (initialize_low_arch): New function.
4690 * linux-cris-low.c (tdesc_crisv32): Declare.
4691 (cris_arch_setup): New function.
4692 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4693 (cris_regs_info): New function.
4694 (the_low_target): Adjust.
4695 (initialize_low_arch): New function.
4696 * linux-m32r-low.c (tdesc_m32r): Declare.
4697 (m32r_arch_setup): New function.
4698 (m32r_usrregs_info, regs_info): New globals.
4699 (m32r_regs_info): Adjust.
4700 (initialize_low_arch): New function.
4701 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4702 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4703 (tic6x_usrregs_info): Forward declare.
4704 (tic6x_read_description): New function, based on ...
4705 (tic6x_arch_setup): ... this. Reimplement.
4706 (target_regsets): Rename to ...
4707 (tic6x_regsets): ... this, and make static.
4708 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4709 (tic6x_regs_info): New function.
4710 (the_low_target): Adjust.
4711 (initialize_low_arch): New function.
4712 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4713 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4714 (target_regsets): Rename to ...
4715 (xtensa_regsets): ... this, and make static.
4716 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4717 globals.
4718 (xtensa_arch_setup, xtensa_regs_info): New functions.
4719 (the_low_target): Adjust.
4720 (initialize_low_arch): New function.
4721 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4722 (nios2_arch_setup): Set the current process'es tdesc.
4723 (target_regsets): Rename to ...
4724 (nios2_regsets): ... this.
4725 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4726 (nios2_regs_info): New function.
4727 (the_low_target): Adjust.
4728 (initialize_low_arch): New function.
a261b8f5
PA
4729 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4730 (aarch64_arch_setup): Set the current process'es tdesc.
4731 (target_regsets): Rename to ...
4732 (aarch64_regsets): ... this.
4733 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4734 (aarch64_regs_info): New function.
4735 (the_low_target): Adjust.
4736 (initialize_low_arch): New function.
3aee8918
PA
4737 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4738 globals.
4739 (target_regsets): Rename to ...
4740 (tile_regsets): ... this.
4741 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4742 (tile_regs_info): New function.
4743 (tile_arch_setup): Set the current process'es tdesc.
4744 (the_low_target): Adjust.
4745 (initialize_low_arch): New function.
4746 * spu-low.c (tdesc_spu): Declare.
4747 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4748 * win32-arm-low.c (tdesc_arm): Declare.
4749 (arm_arch_setup): New function.
4750 (the_low_target): Install arm_arch_setup instead of
4751 init_registers_arm.
4752 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4753 (init_windows_x86): Rename to ...
4754 (i386_arch_setup): ... this. Set `win32_tdesc'.
4755 (the_low_target): Adjust.
4756 * win32-low.c (win32_tdesc): New global.
4757 (child_add_thread): Don't create the thread cache here.
4758 (do_initial_child_stuff): Set the new process'es tdesc.
4759 * win32-low.h (struct target_desc): Forward declare.
4760 (win32_tdesc): Declare.
4761 * lynx-i386-low.c (tdesc_i386): Declare global.
4762 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4763 * lynx-low.c (lynx_tdesc): New global.
4764 (lynx_add_process): Set the new process'es tdesc.
4765 * lynx-low.h (struct target_desc): Forward declare.
4766 (lynx_tdesc): Declare global.
4767 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4768 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4769 * nto-low.c (nto_tdesc): New global.
4770 (do_attach): Set the new process'es tdesc.
4771 * nto-low.h (struct target_desc): Forward declare.
4772 (nto_tdesc): Declare.
4773 * nto-x86-low.c (tdesc_i386): Declare.
4774 (nto_x86_arch_setup): Set `nto_tdesc'.
4775
b1fbec62
GB
47762013-06-04 Gary Benson <gbenson@redhat.com>
4777
4778 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4779 to qSupported response when appropriate.
4780 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4781 with nonzero-length annex.
4782 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4783 arguments supplied in annex.
4784
d1ec4ce7
DE
47852013-05-31 Doug Evans <dje@google.com>
4786
ac44adcb 4787 PR server/15594
d1ec4ce7
DE
4788 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4789 64 bits in 64-cross-32 environment.
4790
9b25f2d3
PA
47912013-05-28 Pedro Alves <palves@redhat.com>
4792
4793 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4794 (aarch64-without-fpu.c): Delete rule.
4795 * configure.srv (aarch64*-*-linux*): Remove references to
4796 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4797 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4798 declaration.
4799
6740dc9c
PA
48002013-05-24 Pedro Alves <palves@redhat.com>
4801
4802 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4803 instead of strchr/decode_address. Error if the range isn't split
4804 with a ','. Don't assume there's be a ':' in the action.
4805
c2d6af84
PA
48062013-05-23 Yao Qi <yao@codesourcery.com>
4807 Pedro Alves <palves@redhat.com>
4808
4809 * linux-low.c (lwp_in_step_range): New function.
4810 (linux_wait_1): If the thread was range stepping and stopped
4811 outside the stepping range, report the stop to GDB. Otherwise,
4812 continue stepping. Add range stepping debug output.
4813 (linux_set_resume_request): Copy the step range from the resume
4814 request to the lwp.
4815 (linux_supports_range_stepping): New.
4816 (linux_target_ops) <supports_range_stepping>: Set to
4817 linux_supports_range_stepping.
4818 * linux-low.h (struct linux_target_ops)
4819 <supports_range_stepping>: New field.
4820 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4821 * linux-x86-low.c (x86_supports_range_stepping): New.
4822 (the_low_target) <supports_range_stepping>: Set to
4823 x86_supports_range_stepping.
4824 * server.c (handle_v_cont): Handle 'r' action.
4825 (handle_v_requests): Append ";r" if the target supports range
4826 stepping.
4827 * target.h (struct thread_resume) <step_range_start,
4828 step_range_end>: New fields.
4829 (struct target_ops) <supports_range_stepping>:
4830 New field.
4831 (target_supports_range_stepping): New macro.
4832
58794e1a
JB
48332013-05-17 Joel Brobecker <brobecker@adacore.com>
4834
4835 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4836 confusion in comment.
4837
d631c5a7
JB
48382013-05-17 Joel Brobecker <brobecker@adacore.com>
4839
4840 * lynx-low.c (struct process_info_private): New type.
4841 (lynx_add_process): New function.
4842 (lynx_create_inferior, lynx_attach): Replace calls to
4843 add_process by calls to lynx_add_process.
4844 (lynx_resume): If PTID is null, then try using
4845 current_process()->private->last_wait_event_ptid.
4846 Add comments.
4847 (lynx_clear_inferiors): Delete. The contents of that function
4848 has been inlined in lynx_mourn;
4849 (lynx_wait_1): Save the ptid in the process's private data.
4850 (lynx_mourn): Free the process' private data. Replace call
4851 to lynx_clear_inferiors by call to clear_inferiors.
4852
96f7a20f
YQ
48532013-05-17 Yao Qi <yao@codesourcery.com>
4854
4855 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4856 the right place.
4857
db0dfaa0
LM
48582013-05-16 Luis Machado <lgustavo@codesourcery.com>
4859
4860 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4861 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4862 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4863 PT_TEXT_END_ADDR guards. Update comments.
4864 (linux_target_op) <read_offsets>: Conditionally define to
4865 linux_read_offsets if the target is UCLIBC and if it defines
4866 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4867
68f5f838
SL
48682013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4869 Andrew Jenner <andrew@codesourcery.com>
4870
4871 * Makefile.in (SFILES): Add linux-nios2-low.c.
4872 (clean): Add action to delete nios2-linux.c.
4873 (nios2-linux.c): New rule.
4874 * configure.srv: Add nios2*-*-linux*.
4875 * linux-nios2-low.c: New.
4876
1ebff1fd
HAQ
48772013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4878
4879 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4880
f6150862
HZ
48812013-04-25 Hui Zhu <hui@codesourcery.com>
4882
4883 PR gdb/15186
f6150862
HZ
4884 * ax.c (ax_printf): Add fflush.
4885
614c279d
TT
48862013-04-22 Tom Tromey <tromey@redhat.com>
4887
4888 * Makefile.in (SFILES): Add filestuff.c.
4889 (OBS): Add filestuff.o.
4890 (filestuff.o): New target.
4891 * config.in, configure: Rebuild.
4892 * configure.ac: Check for fdwalk, pipe2.
4893
7d4e5717
PA
48942013-04-17 Pedro Alves <palves@redhat.com>
4895
4896 * configure.ac (USE_THREAD_DB): Delete variable.
4897 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4898 Don't AC_SUBST USE_THREAD_DB.
4899 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4900 * config.in, configure: Regenerate.
4901
d5c93e41
PA
49022013-04-16 Pedro Alves <palves@redhat.com>
4903
4904 * linux-low.h (struct lwp_info) <thread_known>: Move under
4905 the USE_THREAD_DB #ifdef.
4906
04f5fe89
PA
49072013-04-16 Pedro Alves <palves@redhat.com>
4908
4909 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4910 (linux-low.o): Delete rule.
4911 * linux-low.h: Always include "gdb_thread_db.h" instead of
4912 conditionally including thread_db.h.
4913 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4914 HAVE_THREAD_DB_H.
4915
480b27bf
JK
49162013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4917
4918 * Makefile.in (install-only): Fix make install regression.
4919
43662968
JK
49202013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4921
4922 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4923 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4924 installation.
4925 * gdbserver.1: Remove.
4926
3e74e146
PA
49272013-03-22 Pedro Alves <palves@redhat.com>
4928
4929 * linux-low.c (handle_extended_wait): Don't call
4930 linux_enable_event_reporting.
4931
a8347a2a
TT
49322013-03-15 Tony Theodore <tonyt@logyst.com>
4933
4934 PR build/9098:
4935 * Makefile.in (SHELL): Use @SHELL@.
4936
eeb56fa7
SDJ
49372013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4938
4939 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4940 compiler warning.
4941
4fa7e2ff
JB
49422013-03-13 Joel Brobecker <brobecker@adacore.com>
4943
4944 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4945 Remove extraneous NULL element.
4946
8ddb1965
YQ
49472013-03-13 Yao Qi <yao@codesourcery.com>
4948
4949 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4950 'V' block in trace frame.
4951
9accd112
MM
49522013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4953
4954 * target.h (struct target_ops): Add btrace ops.
4955 (target_supports_btrace): New macro.
4956 (target_enable_btrace): New macro.
4957 (target_disable_btrace): New macro.
4958 (target_read_btrace): New macro.
4959 * gdbthread.h (struct thread_info): Add btrace field.
4960 * server.c: Include btrace-common.h.
4961 (handle_btrace_general_set): New function.
4962 (handle_btrace_enable): New function.
4963 (handle_btrace_disable): New function.
4964 (handle_general_set): Call handle_btrace_general_set.
4965 (handle_qxfer_btrace): New function.
4966 (struct qxfer qxfer_packets[]): Add btrace entry.
4967 * inferiors.c (remove_thread): Disable btrace.
4968 * linux-low: Include linux-btrace.h.
4969 (linux_low_enable_btrace): New function.
4970 (linux_low_read_btrace): New function.
4971 (linux_target_ops): Add btrace ops.
4972 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4973 Add srv_linux_btrace=yes.
4974 (x86_64-*-linux*): Add linux-btrace.o.
4975 Add srv_linux_btrace=yes.
4976 * configure.ac: Define HAVE_LINUX_BTRACE.
4977 * config.in: Regenerated.
4978 * configure: Regenerated.
4979
5cc22e4c
MM
49802013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4981
4982 * server.c (handle_qxfer): Preserve error message if -3 is
4983 returned.
4984 (qxfer): Document the -3 return value.
4985
7c97f91e
MM
49862013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4987
4988 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4989 (linux_btrace_h): New variable.
4990 (linux-btrace.o): New rule.
4991
be9a119c 49922013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
4993 Hafiz Abid Qadeer <abidh@codesourcery.com>
4994
4995 * tracepoint.c (trace_buffer_size): New global.
4996 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4997 (init_trace_buffer): Change to one-argument function. Allocate
4998 trace buffer memory.
4999 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5000 handle QTBuffer:size packet.
5001 (cmd_bigqtbuffer_size): New function.
5002 (initialize_tracepoint): Call init_trace_buffer with
5003 DEFAULT_TRACE_BUFFER_SIZE.
5004 * server.c (handle_query): Add QTBuffer:size in the
5005 supported packets.
5006
e64f7499
YQ
50072013-03-07 Yao Qi <yao@codesourcery.com>
5008
5009 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5010 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5011 of -1.
5012 (cmd_qtsp): Adjust condition. Do post increment.
5013 Set cur_action and cur_step_action back to 0.
5014
f0ae6fc3
PA
50152013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
5016
5017 PR server/15236
5018 * linux-low.c (linux_write_memory): Return early success if LEN is
5019 zero.
5020
b5b0b0af
CV
50212013-03-05 Corinna Vinschen <vinschen@redhat.de>
5022
334ad4a8 5023 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 5024
589bc927
TT
50252013-02-28 Tom Tromey <tromey@redhat.com>
5026
5027 * configure.ac: Invoke AC_SYS_LARGEFILE.
5028 * configure, config.in: Rebuild.
5029
dfe07582
CV
50302013-02-28 Corinna Vinschen <vinschen@redhat.com>
5031
5032 * win32-low.c: Throughout, fix format strings and casts of
5033 printf-like functions to avoid type related warnings on all
5034 platforms.
5035 (get_child_debug_event): Print dwDebugEventCode as hex since
5036 that's how it's usually documented.
5037
736cd585
YQ
50382013-02-28 Yao Qi <yao@codesourcery.com>
5039
5040 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5041 pulongest.
5042
e1f58301
JW
50432013-02-27 Jiong Wang <jiwang@tilera.com>
5044
5045 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5046 (reg-tilegx32.c): New rule.
5047 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5048 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5049 different register info initializer according to elf class.
5050 (init_registers_tilgx32): New function. The tilegx32 register info
5051 initializer.
5052 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5053 (tile_store_gregset): Likewise.
5054
d171ca78
YQ
50552013-02-27 Yao Qi <yao@codesourcery.com>
5056
5057 * server.c (process_point_options): Print debug message when
5058 debug_threads is true.
5059
282bbdf3
YQ
50602013-02-26 Yao Qi <yao@codesourcery.com>
5061
5062 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5063
aca22551
PA
50642013-02-19 Pedro Alves <palves@redhat.com>
5065 Kai Tietz <ktietz@redhat.com>
5066
5067 PR gdb/15161
5068
5069 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5070 instead of strtoul to extract address from packet.
5071 (process_serial_event) <'z'>: Likewise.
5072
4f3cee1c
YQ
50732013-02-18 Yao Qi <yao@codesourcery.com>
5074
5075 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5076
8e1d55a3
PA
50772013-02-14 Pedro Alves <palves@redhat.com>
5078
5079 Plug memory leak.
5080
5081 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5082 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5083
458820da
PA
50842013-02-14 Pedro Alves <palves@redhat.com>
5085
5086 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5087
baea0dae
PA
50882013-02-14 Pedro Alves <palves@redhat.com>
5089
5090 * tracepoint.c (save_string): Delete.
5091 (add_tracepoint_action): Use savestring instead of save_string.
5092
0b1afbb3
PA
50932013-02-12 Pedro Alves <palves@redhat.com>
5094
5095 * linux-xtensa-low.c: Ditto.
5096 * xtensa-xtregs.c: Ditto.
5097
8a4ac37e
PA
50982013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5099
5100 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5101 thread_db.
5102
148de6bb
MS
51032013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5104
5105 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5106 aarch64_num_wp_regs and aarch64_num_bp_regs to
5107 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5108
55fac6e0
MS
51092013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5110
5111 * linux-aarch64-low.c (ps_get_thread_area): Replace
5112 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5113
176eb98c
MS
51142013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5115 Marcus Shawcroft <marcus.shawcroft@arm.com>
5116 Nigel Stephens <nigel.stephens@arm.com>
5117 Yufeng Zhang <yufeng.zhang@arm.com>
5118
5119 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5120 (aarch64.c, aarch64-without-fpu.c): New targets.
5121 * configure.srv (aarch64*-*-linux*): New.
5122 * linux-aarch64-low.c: New file.
5123
56f7af9c
MS
51242013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5125
43aaf8b6 5126 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
5127 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5128 (dequeue_one_deferred_signal, linux_resume_one_thread)
5129 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5130 (linux_tracefork_grandchild, linux_test_for_tracefork)
5131 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5132 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5133 where the argument is 0.
5134
60f662b0
YQ
51352013-01-25 Yao Qi <yao@codesourcery.com>
5136
5137 * event-loop.c: Include "queue.h".
5138 (gdb_event_p): New typedef.
5139 (struct gdb_event) <next_event>: Remove.
5140 (event_queue): Change to QUEUE(gdb_event_p).
5141 (async_queue_event): Remove.
5142 (gdb_event_xfree): New.
5143 (initialize_event_loop): New.
5144 (process_event): Use API from QUEUE.
5145 (wait_for_event): Likewise.
5146 * server.c (main): Call initialize_event_loop.
5147 * server.h (initialize_event_loop): Declare.
5148
5ae4861a
YQ
51492013-01-18 Yao Qi <yao@codesourcery.com>
5150
5151 * ax.h (struct eval_agent_expr_context): New.
5152 (gdb_eval_agent_expr): Update declaration.
5153 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5154 TFRAME. Add new argument CTX.
5155 * server.h (struct eval_agent_expr_context): Declare.
5156 (agent_mem_read, agent_tsv_read): Update declaration.
5157 (agent_mem_read_string): Likewise.
5158 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5159 (add_traceframe_block): Add new argument TPOINT.
5160 Increase TPOINT->traceframe_usage.
5161 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5162 eval_tracepoint_agent_expr.
5163 (condition_true_at_tracepoint): Likewise.
5164 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5165 (agent_mem_read_string, agent_tsv_read): Likewise.
5166
85e00e85
YQ
51672013-01-16 Yao Qi <yao@codesourcery.com>
5168
5169 * linux-low.c (linux_resume_one_lwp): Don't check
5170 'lwp->bp_reinsert != 0'.
5171
4039cf45
JB
51722013-01-07 Joel Brobecker <brobecker@adacore.com>
5173 Pedro Alves <palves@redhat.com>
5174
5175 * lynx-low.c (ptrace_request_to_str): Define a temporary
5176 macro and use it to simplify this function's implementation.
5177
9044dee2
JB
51782013-01-07 Joel Brobecker <brobecker@adacore.com>
5179
5180 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5181 sets errno.
5182
e6352c8f
JB
51832013-01-07 Joel Brobecker <brobecker@adacore.com>
5184
5185 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5186
50681a27
JB
51872013-01-07 Joel Brobecker <brobecker@adacore.com>
5188
5189 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5190
3f6e77ef
JB
51912013-01-07 Joel Brobecker <brobecker@adacore.com>
5192
5193 * lynx-low.c (lynx_resume): Use the resume_info parameter
5194 to determine the ptid for the lynx_ptrace call, unless
5195 it is equal to minus_one_ptid, in which case we use the
5196 ptid of the current_inferior.
5197 (lynx_wait_1): After having received a thread create/exit
5198 event, resume the inferior's execution using the signaling
5199 thread's ptid, rather than the old ptid.
5200
7fda33ae
JB
52012013-01-07 Joel Brobecker <brobecker@adacore.com>
5202
5203 * lynx-low.c (lynx_resume): Delete variable ret.
5204
b9786c74
JB
52052013-01-01 Joel Brobecker <brobecker@adacore.com>
5206
5207 * gdbreplay.c (gdbreplay_version): Update copyright year.
5208 * server.c (gdbserver_version): Likewise.
5209
8b93d60f
JB
52102012-12-17 Joel Brobecker <brobecker@adacore.com>
5211
5212 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5213 new thread.
5214
037335a7
JB
52152012-12-17 Joel Brobecker <brobecker@adacore.com>
5216
5217 * lynx-low.c (ptrace_request_to_str): Add handling for
5218 PTRACE_GETTRACESIG.
5219
52d4cbd8
JB
52202012-12-17 Joel Brobecker <brobecker@adacore.com>
5221
5222 * lynx-low.c (lynx_attach): Delete variable new_process.
5223
ab8f6ca9
JB
52242012-12-17 Joel Brobecker <brobecker@adacore.com>
5225
5226 * lynx-low.c (lynx_create_inferior): Delete variable
5227 new_process.
5228
78cbc024
JB
52292012-12-17 Joel Brobecker <brobecker@adacore.com>
5230
5231 * lynx-low.c (ptrace_request_to_str): Do not handle
5232 PTRACE_GETTHREADLIST if this macro does not exist.
5233
14a00470
YQ
52342012-12-15 Yao Qi <yao@codesourcery.com>
5235
5236 * Makefile.in (OBS): Add notif.o.
5237 * notif.c, notif.h: New.
5238 * server.c: Include "notif.h".
5239 (struct vstop_notif) <next>: Remove.
5240 <base>: New field.
5241 (queue_stop_reply): Update.
5242 (push_event, send_next_stop_reply): Remove.
5243 (discard_queued_stop_replies): Update.
5244 (notif_stop): New variable.
5245 (handle_v_stopped): Remove.
5246 (handle_v_requests): Don't call handle_v_stopped. Call
5247 handle_ack_notif instead.
5248 (queue_stop_reply_callback): Call notif_event_enque instead
5249 of queue_stop_reply.
5250 (handle_status): Don't call send_next_stop_reply, call
5251 notif_write_event instead.
5252 (kill_inferior_callback): Likewise.
5253 (detach_or_kill_inferior_callback): Likewise.
5254 (main): Call initialize_notif.
5255 (process_serial_event): Call QUEUE_is_empty.
5256 (handle_target_event): Call notif_push instead of push event.
5257 * server.h (push_event): Remove declaration.
5258
61c125b9
TT
52592012-12-10 Tom Tromey <tromey@redhat.com>
5260
5261 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5262 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5263 macros.
5264 (.c.o): Rewrite.
5265 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5266 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5267 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5268 (amd64-linux-ipa.o, ax.o): Rewrite.
5269 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5270 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5271 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5272 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5273 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5274 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5275 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5276 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5277 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5278 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5279 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5280 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5281 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5282 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5283 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5284 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5285 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5286 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5287 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5288 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5289 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5290 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5291 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5292 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5293 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5294 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5295 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5296 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5297 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5298 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5299 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5300 (reg-tilegx.o): Remove.
5301 (all_object_files): New macro.
5302 Include .deps files.
5303 * aclocal.m4, configure: Rebuild.
5304 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5305 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5306 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5307
e90e9ad9
TT
53082012-12-05 Tom Tromey <tromey@redhat.com>
5309
5310 PR gdb/14917:
5311 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5312
02d403bf 53132012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
5314
5315 * configure.ac: Check for linux/perf_event.h.
5316 * config.in: Regenerated.
5317 * configure: Regenerated.
5318
0270a750
PA
53192012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5320
5321 * hostio.c (handle_readlink): Decrease buffer size
5322 parameter passed to readlink by one byte.
5323
8c29b58e
YQ
53242012-11-26 Yao Qi <yao@codesourcery.com>
5325
5326 * configure.ac (build_warnings): Append '-Wempty-body'.
5327 * configure: Regenerated.
5328 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5329 body.
5330
8bdce1ff
PM
53312012-11-15 Pierre Muller <muller@sourceware.org>
5332
5333 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5334 * config.in: Regenerate.
5335 * configure: Regenerate.
5336 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5337 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5338 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5339 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5340 header.
5341 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5342 instead of <sys/wait.h> header.
5343 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5344
02d403bf 53452012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
5346
5347 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5348 (various make rules): Remove -DGDBSERVER
5349
fbd5db48
YQ
53502012-11-09 Yao Qi <yao@codesourcery.com>
5351
5352 * spu-low.c (current_ptid): Move it to ..
5353 * gdbthread.h: ... here. New.
5354 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5355 * server.c (myresume, process_serial_event): Likewise.
5356 * thread-db.c (thread_db_find_new_threads): Likewise.
5357 * tracepoint.c (run_inferior_command): Likewise.
5358
b3dc46ff
AB
53592012-10-01 Andrew Burgess <aburgess@broadcom.com>
5360
5361 * server.c (handle_search_memory_1): Include access length in
5362 warning message.
5363
07c04788
HPN
53642012-09-05 Michael Brandt <michael.brandt@axis.com>
5365
5366 * linux-crisv32-low.c: Fix compile errors.
5367
918d227b
YQ
53682012-09-04 Yao Qi <yao@codesourcery.com>
5369
5370 * tracepoint.c (cmd_qtsv): Adjust debug message.
5371 Don't check CUR_TPOINT.
5372
18c1b81a
YQ
53732012-08-28 Yao Qi <yao@codesourcery.com>
5374
5375 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5376 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5377 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5378 Remove declarations of xmalloc, xreallloc, xstrdup and
5379 freeargv.
5380 * Makefile.in (libiberty_h): New.
5381 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5382 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5383
dc82f37b
YQ
53842012-08-23 Yao Qi <yao@codesourcery.com>
5385
5386 * server.h: Remove declaration of 'xsnprintf'.
5387
406b1477
KS
53882012-08-22 Keith Seitz <keiths@redhat.com>
5389
5390 * server.h: Include build-gnulib-gbserver/config.h.
5391 * gdbreplay.c: Likewise.
5392
e6712ff1
DE
53932012-08-08 Doug Evans <dje@google.com>
5394
5395 * Makefile.in (SFILES): Add gdb_vecs.c.
5396 (OBS): Add gdb_vecs.o.
5397 (gdb_vecs_h, host_defs_h): New variables.
5398 (thread-db.o): Add $(gdb_vecs_h) dependency.
5399 (gdb_vecs.o): New rule.
5400 * thread-db.c: #include "gdb_vecs.h".
5401 (thread_db_load_search): Use a vector to iterate over path elements.
5402 Handle text appearing after "$pdir".
5403
5404 * configure.ac: Add check for strstr.
5405 * config.in: Regenerate.
5406 * configure: Regenerate.
5407
7c3270ae
UW
54082012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5409
5410 * hostio.c (handle_pread): If pread fails, fall back to attempting
5411 lseek/read.
5412 (handle_pwrite): Likewise for pwrite.
5413
b62e2b27
UW
54142012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5415
5416 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5417 between unsupported TYPE and unimplementable ADDR/LEN combination.
5418 (arm_insert_point): Act on new return value.
5419
78a99e91
PA
54202012-07-31 Pedro Alves <palves@redhat.com>
5421
5422 * server.c (process_point_options): Only skip tokens if we find
5423 one that is unrecognized. Don't treat 'X' specially while
5424 skipping unrecognized tokens.
5425
fcf303ab
UW
54262012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5427
5428 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5429 to 4-byte-align HW breakpoint addresses for Thumb.
5430
7255706c
YQ
54312012-07-27 Yao Qi <yao@codesourcery.com>
5432
5433 PR remote/14161.
5434
5435 * server.h: Declare gdb_agent_about_to_close.
5436 * target.c (kill_inferior): Include "agent.h".
5437 New. Send command 'kill'.
5438 * target.h (kill_inferior): Removed macro.
5439 * tracepoint.c (gdb_agent_about_to_close): New.
5440 (gdb_agent_helper_thread): Handle command 'close'.
5441 Wait endlessly until the inferior stops.
5442 Install gdb_agent_remove_socket to atexit hook.
5443 (agent_socket_name): New static variable.
5444 (gdb_agent_socket_init): Replace local variable 'name' with
5445 'agent_socket_name'.
5446 (gdb_agent_remove_socket): New.
5447
5a3f286f
YQ
54482012-07-27 Yao Qi <yao@codesourcery.com>
5449
5450 * server.c (process_point_options): Stop at 'X' when parsing.
5451
961bd387
ME
54522012-07-19 Michael Eager <eager@eagercon.com>
5453
a261b8f5 5454 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
5455 to hw_execute.
5456 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5457 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5458 hardware breakpoint.
5459
aa7c7447
JK
54602012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5461
5462 * gdbserver/linux-low.c (initialize_low): Call
5463 linux_ptrace_init_warnings.
5464
7f216e7c
DE
54652012-07-02 Doug Evans <dje@google.com>
5466
5467 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5468 pointer to int.
5469
d3ce09f5
SS
54702012-07-02 Stan Shebs <stan@codesourcery.com>
5471
5472 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5473 (ax.o): Add it to build rule.
5474 (ax-ipa.o): Ditto.
5475 (OBS): Add format.o.
5476 (IPA_OBS): Add format.o.
5477 * server.c (handle_query): Claim support for breakpoint commands.
5478 (process_point_options): Add command case.
5479 (process_serial_event): Leave running if there are printfs in
5480 effect.
5481 * mem-break.h (any_persistent_commands): Declare.
5482 (add_breakpoint_commands): Declare.
5483 (gdb_no_commands_at_breakpoint): Declare.
5484 (run_breakpoint_commands): Declare.
5485 * mem-break.c (struct point_command_list): New struct.
5486 (struct breakpoint): New field command_list.
5487 (any_persistent_commands): New function.
5488 (add_commands_to_breakpoint): New function.
5489 (add_breakpoint_commands): New function.
5490 (gdb_no_commands_at_breakpoint): New function.
5491 (run_breakpoint_commands): New function.
5492 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5493 locally.
5494 * ax.c: Include format.h.
5495 (ax_printf): New function.
5496 (gdb_eval_agent_expr): Add printf opcode.
5497
2f8f6aed
YQ
54982012-06-13 Yao Qi <yao@codesourcery.com>
5499
5500 * server.c (start_inferior): Remove duplicated writes to fields
5501 'last_resume_kind' and 'last_status' of 'current_inferior'.
5502
0c9070b3
YQ
55032012-06-12 Yao Qi <yao@codesourcery.com>
5504 Pedro Alves <palves@redhat.com>
5505
5506 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5507 comment.
5508 * server.c (handle_v_cont): Extend comment.
5509
c52daf70
YQ
55102012-06-11 Yao Qi <yao@codesourcery.com>
5511
5512 * linux-low.c (linux_attach): Add 'static'.
5513
d38bbb0a
YQ
55142012-06-06 Yao Qi <yao@codesourcery.com>
5515
5516 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5517
89dc0afd
JK
55182012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5519
5520 Fix gcc -flto compilation warning.
5521 * server.c (main): Make variable multi_mode and attach volatile.
5522
75f62ce7
TJB
55232012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5524
5525 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5526 if the platform doesn't know about it.
5527
65f479b6
PA
55282012-05-30 Jeff Kenton <jkenton@tilera.com>
5529
5530 * Makefile.in (SFILES): Add linux-tile-low.c.
5531 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5532 * configure.srv: Handle tilegx-*-linux*.
5533 * linux-tile-low.c: New file.
5534
0c5bf5a9
JK
55352012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5536
5537 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5538
a493e3e2
PA
55392012-05-24 Pedro Alves <palves@redhat.com>
5540
5541 PR gdb/7205
5542
43aaf8b6 5543 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 5544
2ea28649
PA
55452012-05-24 Pedro Alves <palves@redhat.com>
5546
5547 PR gdb/7205
5548
5549 Replace target_signal with gdb_signal throughout.
5550
8d409d16
MR
55512012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5552
5553 * linux-low.c (linux_store_registers): Avoid the copying sequence
5554 when no data has been retrieved by ptrace.
5555
23512c01
MGD
55562012-05-22 Will Deacon <will.deacon@arm.com>
5557
5558 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5559 Include asm/ptrace.h.
5560 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5561 already defined.
5562
4934b29e
MR
55632012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5564
5565 * linux-low.c (linux_store_registers): Don't re-retrieve data
5566 with ptrace that has already been obtained from /proc. Always
5567 copy any data retrieved with ptrace to the buffer supplied.
5568
bde24c0a
PA
55692012-05-11 Yao Qi <yao@codesourcery.com>
5570 Pedro Alves <palves@redhat.com>
5571
5572 * linux-low.c (enum stopping_threads_kind): New.
5573 (stopping_threads): Change type to `enum stopping_threads_kind'.
5574 (handle_extended_wait): If stopping and suspending threads, leave
5575 the new_lwp suspended too.
5576 (linux_wait_for_event): Adjust.
5577 (stop_all_lwps): Set `stopping_threads' to
5578 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5579 whether we're suspending threads or just stopping them. Assert no
5580 recursion happens.
5581
623b6bdf
YQ
55822012-04-29 Yao Qi <yao@codesourcery.com>
5583
5584 * server.h: Move some code to ...
5585 * gdbthread.h: ... here. New.
5586 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5587 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5588 (nto-low.o, win32-low.o): Likewise.
5589 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5590 * regcache.c, remote-utils.c, server.c: Likewise.
5591 * target.c, tracepoint.c, win32-low.c: Likewise.
5592
f15f9948
TJB
55932012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5594
5595 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5596 (PTRACE_ARG4_TYPE): Likewise.
5597 (PTRACE_XFER_TYPE): Likewise.
5598 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5599 ptrace to PTRACE_ARG3_TYPE.
5600 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5601 (PTRACE_ARG4_TYPE): Likewise.
5602 (PTRACE_XFER_TYPE): Likewise.
5603 (linux_detach_one_lwp): Cast fourth argument of
5604 ptrace to long then PTRACE_ARG4_TYPE.
5605 (regsets_fetch_inferior_registers): Cast third argument of
5606 ptrace to long then PTRACE_ARG3_TYPE.
5607 (regsets_store_inferior_registers): Likewise.
5608
38ea300a
PA
56092012-04-20 Pedro Alves <palves@redhat.com>
5610
5611 * configure: Regenerate.
5612
c971b7fa
PA
56132012-04-19 Pedro Alves <palves@redhat.com>
5614
43aaf8b6 5615 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 5616 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
5617 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5618 (all, install-only, uninstall, clean-info, all-lib, clean): No
5619 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5620 (maintainer-clean realclean distclean): Use subdir_do.
5621 (subdir_do): New.
5622 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 5623 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
5624 * acinclude.m4: Include acx_configure_dir.m4.
5625 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5626 calls. Call AC_PROG_RANLIB. Configure gnulib using
5627 ACX_CONFIGURE_DIR.
5628 (GNULIB): New.
5629 (GNULIB_STDINT_H): Adjust.
5630 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5631 * gdbreplay.c: Include build-gnulib/config.h.
5632 * server.h: Likewise.
5633 * aclocal.m4: Regenerate.
5634 * config.in: Regenerate.
5635 * configure: Regenerate.
c971b7fa 5636
809277f8
PA
56372012-04-19 Pedro Alves <palves@redhat.com>
5638
5639 * Makefile.in (LIBGNU, INCGNU): Adjust.
5640 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5641 (all, install-only, uninstall, clean-info, all-lib, clean)
5642 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5643 * configure.ac: Adjust AC_OUTPUT output.
5644 * aclocal.m4: Regenerate.
5645 * configure: Regenerate.
5646
fd9bb8b8
PA
56472012-04-19 Pedro Alves <palves@redhat.com>
5648
5649 * Makefile.in (generated_files): New.
5650 (server_h): Remove the explicit dependency on config.h, and depend
5651 on $generated_files.
5652
1c298c66
PA
56532012-04-19 Pedro Alves <palves@redhat.com>
5654
5655 * Makefile.in (INCGNU): Add -Ignulib.
5656
57c4b50b
PA
56572012-04-19 Pedro Alves <palves@redhat.com>
5658
5659 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5660 (INCGNU): ... this, and spell out -I here.
5661 (GNULIB_LIB): Rename to ...
5662 (LIBGNU): ... this.
5663 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5664
1030e047
PA
56652012-04-19 Pedro Alves <palves@redhat.com>
5666
5667 * config.in: Regenerate.
5668
447d4319
PA
56692012-04-19 Pedro Alves <palves@redhat.com>
5670
5671 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5672 * server.h (memmem): Remove declaration.
5673 * config.in: Regenerate.
5674 * configure: Regenerate.
5675
aad9eab9
YQ
56762012-04-19 Yao Qi <yao@codesourcery.com>
5677
5678 * Makefile.in (SFILES): Add common/vec.c.
5679 (OBS): Add vec.o.
5680 (vec.o): New rule.
5681
3e10640f
YQ
56822012-04-19 Yao Qi <yao@codesourcery.com>
5683
5684 * remote-utils.c (prepare_resume_reply): Replace with macro
5685 target_core_of_thread.
5686 * server.c (handle_qxfer_threads_proper): Likewise.
5687 * target.h (traget_core_of_thread): New macro.
5688
71622373
PA
56892012-04-18 Pedro Alves <palves@redhat.com>
5690
5691 * aclocal.m4: Regenerate.
5692 * configure: Regenerate.
5693
80d26939
YQ
56942012-04-16 Yao Qi <yao@codesourcery.com>
5695
5696 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5697 duplicated on address.
5698
42476b70
YQ
56992012-04-16 Yao Qi <yao@codesourcery.com>
5700
5701 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5702 (struct tracepoint_action_ops) <send>: New field.
5703 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5704 (agent_expr_send, x_tracepoint_action_send): New.
5705 (l_tracepoint_action_send): New.
5706 (cmd_qtdp): Download and install tracepoint
5707 according to `use_agent'.
5708 (run_inferior_command): Add one more parameter `len'.
5709 Update callers.
5710 (tracepoint_send_agent): New.
5711 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5712
7bc83639
YQ
57132012-04-16 Yao Qi <yao@codesourcery.com>
5714
5715 * tracepoint.c (download_tracepoints): Moved to ...
5716 (cmd_qtstart): ... here.
5717
5f18041e
YQ
57182012-04-14 Yao Qi <yao@codesourcery.com>
5719
5720 * tracepoint.c: Include inttypes.h.
5721 (struct collect_memory_action): Use sized types.
5722 (struct tracepoint): Likewise.
5723 (cmd_qtdp, stop_tracing): Update print specifiers.
5724 (cmd_qtp, response_tracepoint): Likewise.
5725 (collect_data_at_tracepoint): Likewise.
5726 (collect_data_at_step): Likewise.
5727
55a8c076
YQ
57282012-04-14 Yao Qi <yao@codesourcery.com>
5729
5730 Import gnulib module inttypes.
5731 * aclocal.m4, config.in, configure: Regenerated.
5732
dc750257
YQ
57332012-04-14 Yao Qi <yao@codesourcery.com>
5734
5735 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5736 Makefile and config.status at last.
5737
0ab5faf9
YQ
57382012-04-13 Yao Qi <yao@codesourcery.com>
5739
5740 * tracepoint.c: Include stdint.h unconditionally.
5741
18f5fd81
TJB
57422012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5743
5744 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5745 on BFD_HAVE_SYS_PROCFS_TYPE.
5746 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5747 * configure: Regenerate.
5748 * config.in: Likewise.
5749
4d47af5c
L
57502012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5751
5752 * Makefile.in (clean): Also remove x32.c x32-linux.c
5753 x32-avx.c x32-avx-linux.c.
5754 (x32.o): New target.
5755 (x32.c): Likewise.
5756 (x32-linux.o): Likewise.
5757 (x32-linux.c): Likewise.
5758 (x32-avx.o): Likewise.
5759 (x32-avx.c): Likewise.
5760 (x32-avx-linux.o): Likewise.
5761 (x32-avx-linux.c): Likewise.
5762
5763 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5764 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5765 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5766 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5767 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5768 i386/x32-avx-linux.xml.
5769
5770 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5771 (init_registers_x32_avx_linux): Likwise.
5772 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5773 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5774
ecedbe58
PA
57752012-04-13 Pedro Alves <palves@redhat.com>
5776
5777 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5778 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5779 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5780 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5781 the sub-make.
5782
c92b5177
L
57832012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5784
5785 * linux-x86-low.c (compat_x32_clock_t): New.
5786 (compat_x32_siginfo_t): Likewise.
5787 (compat_x32_siginfo_from_siginfo): Likewise.
5788 (siginfo_from_compat_x32_siginfo): Likewise.
5789 (linux_is_elf64): Likewise.
5790 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5791 and siginfo_from_compat_x32_siginfo for x32.
5792 (x86_arch_setup): Set linux_is_elf64.
5793
214d508e
L
57942012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5795
5796 PR gdb/13969
5797 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5798 e_machine field.
5799 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5800 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5801 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5802 compatible with process.
5803
c9a1864a
YQ
58042012-04-12 Yao Qi <yao@codesourcery.com>
5805
5806 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5807 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5808 (install-only, install-info, clean): Handle sub dir gnulib.
5809 (all-lib, am--refresh): New targets.
5810 (memmem.o): Remove target.
5811 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5812 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5813 (AC_REPLACE_FUNCS): Remove memmem.
5814 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5815 (AC_OUTPUT): Generate Makefile in gnulib/.
5816 * aclocal.m4, config.in, configure: Regenerated.
5817
367ba2c2
MR
58182012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5819
5820 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5821
9d236627
PA
58222012-04-05 Pedro Alves <palves@redhat.com>
5823
5824 -Werror=strict-aliasing
5825
5826 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5827 pointer.
5828
111217b3
PA
58292012-04-04 Pedro Alves <palves@redhat.com>
5830
5831 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5832 (sparc_store_gregset_from_stack, sparc_store_gregset)
5833 (sparc_breakpoint_at): Fix formatting.
5834
8365dcf5
TJB
58352012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5836
5837 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5838 are available.
5839 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5840 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5841 * config.in: Regenerate.
5842 * configure: Likewise.
5843
689cc2ae
PA
58442012-03-29 Pedro Alves <palves@redhat.com>
5845
5846 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5847 Correct ptrace arguments.
5848
c14dfd32
PA
58492012-03-28 Pedro Alves <palves@redhat.com>
5850
5851 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5852 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5853 (IA64_FR1_REGNUM): New defines.
5854 (ia64_fetch_register): New.
5855 (the_low_target): Install it.
5856 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5857 field.
5858 * linux-low.c (linux_fetch_registers): Try the
5859 the_low_target.fetch_register hook first.
5860
5861 * linux-arm-low.c (the_low_target): Adjust.
5862 * linux-bfin-low.c (the_low_target): Adjust.
5863 * linux-cris-low.c (the_low_target): Adjust.
5864 * linux-crisv32-low.c (the_low_target): Adjust.
5865 * linux-m32r-low.c (the_low_target): Adjust.
5866 * linux-m68k-low.c (the_low_target): Adjust.
5867 * linux-mips-low.c (the_low_target): Adjust.
5868 * linux-ppc-low.c (the_low_target): Adjust.
5869 * linux-s390-low.c (the_low_target): Adjust.
5870 * linux-sh-low.c (the_low_target): Adjust.
5871 * linux-sparc-low.c (the_low_target): Adjust.
5872 * linux-tic6x-low.c (the_low_target): Adjust.
5873 * linux-x86-low.c (the_low_target): Adjust.
5874 * linux-xtensa-low.c (the_low_target): Adjust.
5875
63c88e13
PA
58762012-03-26 Pedro Alves <palves@redhat.com>
5877
5878 * server.c (handle_qxfer_libraries): Don't bail early if
5879 the_target->qxfer_libraries_svr4 is not NULL.
5880
fb723180
PA
58812012-03-26 Pedro Alves <palves@redhat.com>
5882
5883 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5884
0afae3cf
PA
58852012-03-23 Pedro Alves <palves@redhat.com>
5886
5887 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5888 "library-list-svr4" element's start tag when the the DSO list is
5889 empty.
5890
485f1ee4
PA
58912012-03-23 Pedro Alves <palves@redhat.com>
5892
5893 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5894 a variable whose type size is the same as the inferior's pointer
5895 size.
5896
a5362b9a
TS
58972012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5898
5899 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5900 struct siginfo.
5901 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5902 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5903 * linux-low.h: Include <signal.h>.
5904 (struct siginfo): Remove forward declaration.
5905 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5906 struct siginfo.
5907
d226c142
MF
59082012-03-21 Mike Frysinger <vapier@gentoo.org>
5909
5910 * .gitignore: Ignore more files.
5911
122f36ef
PA
59122012-03-19 Pedro Alves <palves@redhat.com>
5913 Jan Kratochvil <jan.kratochvil@redhat.com>
5914
5915 * server.c (cont_thread, general_thread): Add describing comments.
5916 (start_inferior): Clear `cont_thread'.
5917 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5918 of a process.
5919
fc3e5175
YQ
59202012-03-15 Yao Qi <yao@codesourcery.com>
5921
5922 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5923 handling to ...
5924 (cmd_qtdp): ... here.
5925
8d0d92cd
YQ
59262012-03-15 Yao Qi <yao@codesourcery.com>
5927
5928 * tracepoint.c (struct tracepoint_action_ops): New.
5929 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5930 (m_tracepoint_action_download): New.
5931 (r_tracepoint_action_download): New.
5932 (x_tracepoint_action_download): New.
5933 (l_tracepoint_action_download): New.
5934 (add_tracepoint_action): Install `action->ops' according type.
5935 (download_tracepoint_1): Move code `download' function pointer
5936 of various tracepoint_action_ops.
5937
87b0bb13
JK
59382012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5939
5940 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5941 linux_ptrace_attach_warnings.
5942
5f572dec
JK
59432012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5944
5945 * Makefile.in (linux-ptrace.o): New.
5946 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5947 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5948 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5949 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5950 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5951 of these targets.
5952 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5953
f4647387
YQ
59542012-03-08 Yao Qi <yao@codesourcery.com>
5955 Pedro Alves <palves@redhat.com>
5956
5957 Fix PR server/13392.
5958 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5959 offset of JMP insn.
5960 * tracepoint.c (remove_tracepoint): New.
5961 (cmd_qtdp): Call remove_tracepoint when failed to install.
5962
9b224c5e
PA
59632012-03-07 Pedro Alves <palves@redhat.com>
5964
5965 * linux-low.c (get_detach_signal): New.
5966 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5967 Pass on pending signals to PTRACE_DETACH. Check the result of the
5968 ptrace call.
5969 * server.c (program_signals, program_signals_p): New.
5970 (handle_general_set): Handle QProgramSignals.
5971 * server.h (program_signals, program_signals_p): Declare.
5972
e237a7e2
JK
59732012-03-05 Pedro Alves <palves@redhat.com>
5974 Jan Kratochvil <jan.kratochvil@redhat.com>
5975
5976 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5977 New comment why.
5978
5808517f
YQ
59792012-03-03 Yao Qi <yao@codesourcery.com>
5980
5981 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5982 agent_look_up_symbols.
5983
58b4daa5
YQ
59842012-03-03 Yao Qi <yao@codesourcery.com>
5985
5986 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5987 (linux-x86-low.o): Likewise.
5988 * server.h: Remove in_process_agent_loaded.
5989 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5990 common/agent.c.
5991 Update callers.
5992
8ffcbaaf
YQ
59932012-03-03 Yao Qi <yao@codesourcery.com>
5994
5995 * tracepoint.c (gdb_agent_capability): New global.
5996 (in_process_agent_loaded_ust): Renamed to
5997 `in_process_agent_supports_ust'.
5998 Update callers.
5999 (in_process_agent_supports_ust): Call agent_capability_check.
6000 (clear_installed_tracepoints): Assert that agent supports
6001 agent.
6002
d1feda86
YQ
60032012-03-03 Yao Qi <yao@codesourcery.com>
6004
6005 * linux-low.c (linux_supports_agent): New.
6006 (linux_target_ops): Initialize field `supports_agent' with
6007 linux_supports_agent.
6008 * target.h (struct target_ops) <supports_agent>: New.
6009 (target_supports_agent): New macro.
6010 * server.c (handle_general_set): Handle packet 'QAgent'.
6011 (handle_query): Send `QAgent+'.
6012 * Makefile.in (server.o): Depends on agent.h.
6013
2fa291ac
YQ
60142012-03-03 Yao Qi <yao@codesourcery.com>
6015
6016 * Makefile.in (OBS): Add agent.o.
6017 Add new rule for agent.o.
6018 Track dependence of tracepoint.c on agent.h.
6019 * tracepoint.c (run_inferior_command_1):
6020 (run_inferior_command): Call agent_run_command.
6021 (gdb_ust_connect_sync_socket): Deleted. Move it to
6022 common/agent.c.
6023 (resume_thread, stop_thread): Likewise.
6024 (gdb_ust_socket_init): Renamed to ...
6025 (gdb_agent_socket_init): ... New.
6026 (gdb_ust_thread): Renamed to ...
6027 (gdb_agent_helper_thread): ... New.
6028 (gdb_ust_init): Move some code to ...
6029 (gdb_agent_init): ... here. New.
6030 [HAVE_UST]: Call gdb_ust_init.
6031 (initialize_tracepoint_ftlib): Call gdb_agent_init.
6032 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6033 * config.in, configure: Regenerated.
6034
05044653
PA
60352012-03-02 Pedro Alves <palves@redhat.com>
6036
6037 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6038 * linux-low.c (struct simple_pid_list): New.
6039 (stopped_pids): New a struct simple_pid_list pointer.
6040 (add_to_pid_list, pull_pid_from_list): New.
6041 (handle_extended_wait): Don't assume the first signal new children
6042 report is SIGSTOP. Adjust call to pull_pid_from_list.
6043 (linux_wait_for_lwp): Adjust.
6044
8d00225b
YQ
60452012-03-02 Yao Qi <yao@codesourcery.com>
6046
6047 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6048 debug log.
6049
19560ba5
YQ
60502012-03-02 Yao Qi <yao@codesourcery.com>
6051
6052 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6053 `stop_pc' and `tpoint'. Update caller.
6054
1faeff08
MR
60552012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6056
6057 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6058 * linux-low.c (use_linux_regsets): New macro.
6059 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6060 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6061 (linux_register_in_regsets): New function.
6062 (usr_fetch_inferior_registers): Skip registers covered by
6063 regsets.
6064 (usr_store_inferior_registers): Likewise.
6065 (usr_fetch_inferior_registers): New macro.
6066 (usr_store_inferior_registers): Likewise.
6067 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6068 (linux_store_registers): Likewise.
6069 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6070 prototype.
6071 (init_registers_mips64_dsp_linux): Likewise.
6072 (init_registers_mips_linux): New macro.
6073 (init_registers_mips_dsp_linux): Likewise.
6074 (mips_dsp_num_regs): Likewise.
6075 (DSP_BASE, DSP_CONTROL): New fallback macros.
6076 (mips_base_regs): New macro.
6077 (mips_regmap): Use it. Fix the size.
6078 (mips_dsp_regmap): New variable.
6079 (mips_dsp_regset_bitmap): Likewise.
6080 (mips_arch_setup): New function.
6081 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6082 than mips_regmap.
6083 (mips_cannot_store_register): Likewise.
6084 (the_low_target): Update .arch_setup, .num_regs and .regmap
6085 initializers. Add .regset_bitmap initializer.
6086 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6087 initializer.
6088 * linux-bfin-low.c (the_low_target): Likewise.
6089 * linux-cris-low.c (the_low_target): Likewise.
6090 * linux-crisv32-low.c (the_low_target): Likewise.
6091 * linux-ia64-low.c (the_low_target): Likewise.
6092 * linux-m32r-low.c (the_low_target): Likewise.
6093 * linux-m68k-low.c (the_low_target): Likewise.
6094 * linux-ppc-low.c (the_low_target): Likewise.
6095 * linux-s390-low.c (the_low_target): Likewise.
6096 * linux-sh-low.c (the_low_target): Likewise.
6097 * linux-sparc-low.c (the_low_target): Likewise.
6098 * linux-tic6x-low.c (the_low_target): Likewise.
6099 * linux-x86-low.c (the_low_target): Likewise.
6100 * linux-xtensa-low.c (the_low_target): Likewise.
6101 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6102 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6103 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6104 srv_xmlfiles.
6105 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6106 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6107
c03e6ccc
YQ
61082012-02-29 Yao Qi <yao@codesourcery.com>
6109 Pedro Alves <palves@redhat.com>
6110
6111 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6112 `step_over_finished' is true.
6113
644cebc9
PA
61142012-02-27 Pedro Alves <palves@redhat.com>
6115
6116 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6117 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6118
c14d7ab2
PA
61192012-02-27 Pedro Alves <palves@redhat.com>
6120
6121 PR server/9684
6122 * linux-low.c (pid_is_stopped): New.
6123 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6124
412c89dd
LM
61252012-02-25 Luis Machado <lgustavo@codesourcery.com>
6126
6127 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6128 of conditions.
6129
b745defe
MR
61302012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6131
6132 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6133
9f3a5c85
LM
61342012-02-24 Luis Machado <lgustavo@codesourcery>
6135
6136 * server.c (handle_query): Advertise support for target-side
6137 breakpoint condition evaluation.
6138 (process_point_options): New function.
6139 (process_serial_event): When inserting a breakpoint, check for
6140 a target-side condition that should be evaluated.
6141
6142 * mem-break.c: Include regcache.h and ax.h.
6143 (point_cond_list_t): New data structure.
6144 (breakpoint) <cond_list>: New field.
6145 (find_gdb_breakpoint_at): Make non-static.
6146 (delete_gdb_breakpoint_at): Clear any target-side
6147 conditions.
6148 (clear_gdb_breakpoint_conditions): New function.
6149 (add_condition_to_breakpoint): Likewise.
6150 (add_breakpoint_condition): Likewise.
6151 (gdb_condition_true_at_breakpoint): Likewise.
6152 (gdb_breakpoint_here): Return result directly instead
6153 of going through a local variable.
6154
6155 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6156 (clear_gdb_breakpoint_conditions): Likewise.
6157 (add_breakpoint_condition): Likewise.
6158 (gdb_condition_true_at_breakpoint): Likewise.
6159
6160 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6161 (need_step_over_p): Take target-side breakpoint condition into
6162 consideration.
6163
5e1dc496
LM
61642012-02-24 Luis Machado <lgustavo@codesourcery>
6165
6166 * server.h: Include tracepoint.h.
6167 (agent_mem_read, agent_get_trace_state_variable_value,
6168 agent_set_trace_state_variable_value,
6169 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6170 get_set_tsv_func_addr): New prototypes.
6171
6172 * ax.h: New include file.
6173 * ax.c: New source file.
6174
6175 * tracepoint.c: Include ax.h.
6176 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6177 agent_expr, eval_result_type): Move to ax.h.
6178 (parse_agent_expr): Rename to ...
6179 (gdb_parse_agent_expr): ... this, make it non-static and move
6180 to ax.h.
6181 (unparse_agent_expr) Rename to ...
6182 (gdb_unparse_agent_expr): ... this, make it non-static and move
6183 to ax.h.
6184 (eval_agent_expr): Rename to ...
6185 (eval_tracepoint_agent_expr): ... this.
6186 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6187 forward declarations.
6188 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6189 (agent_get_trace_state_variable_value): New function.
6190 (agent_set_trace_state_variable_value): New function.
6191 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6192 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6193 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6194 (condition_true_at_tracepoint): Likewise.
6195 (parse_agent_expr): Rename to ...
6196 (gdb_parse_agent_expr): ... this and move to ax.c.
6197 (unparse_agent_expr): Rename to ...
6198 (gdb_unparse_agent_expr): ... this and move to ax.c.
6199 (gdb_agent_op_name): Move to ax.c.
6200 (eval_agent_expr): Rename to ...
6201 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6202 and move to ax.c.
6203 (eval_tracepoint_agent_expr): New function.
6204 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 6205 non-static.
5e1dc496
LM
6206 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6207 ax.c.
6208 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6209 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6210 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6211 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6212 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6213 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6214 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6215 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6216 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6217 (compile_bytecodes): Remove forward declaration.
6218 (is_goto_target): Move to ax.c.
6219 (compile_bytecodes): Move to ax.c and call
6220 agent_get_trace_state_variable_value (...) and
6221 agent_set_trace_state_variable_value (...).
6222
6223 * Makefile.in: Update ax.c and IPA dependencies.
6224
277e4e52
PA
62252012-02-24 Pedro Alves <palves@redhat.com>
6226
6227 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6228 (cmd_bigqtbuffer_circular): ... this. Only handle
6229 'QTBuffer:circular:'.
6230 (handle_tracepoint_general_set): Adjust.
6231
bf4c19f7
YQ
62322012-02-16 Yao Qi <yao@codesourcery.com>
6233
6234 * inferiors.c: Move code to ...
6235 * dll.c: .... here. New.
6236 * server.h: Declare clear_dlls.
6237 * Makefile.in (SFILES): Add dll.c.
6238 (OBS): Add dll.o
6239 (dll.o): New rule.
6240
d73f2619
YQ
62412012-02-11 Yao Qi <yao@codesourcery.com>
6242
6243 * server.c: (handle_monitor_command): Add a new parameter
6244 `own_buf'.
6245 (handle_query): Update caller.
6246
f8255c2a
JB
62472012-02-09 Joel Brobecker <brobecker@adacore.com>
6248
6249 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6250 * configure, config.in: Regenerate.
6251 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6252 is not defined.
6253
da84f473
PA
62542012-02-02 Pedro Alves <palves@redhat.com>
6255
6256 Try SIGKILL first, then PTRACE_KILL.
6257 * linux-low.c (linux_kill_one_lwp): New.
6258 (linux_kill_one_lwp): Rename to ...
6259 (kill_one_lwp_callback): ... this. Use the new
6260 linux_kill_one_lwp.
6261
e886a173
PA
62622012-02-02 Pedro Alves <palves@redhat.com>
6263
6264 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6265 inferior.
6266
be07f1a2
PA
62672012-01-27 Pedro Alves <palves@redhat.com>
6268
6269 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6270 (elf_64_file_p): Make static.
6271 (linux_pid_exe_is_elf_64_file): New.
6272 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6273 Delete declarations.
6274 (linux_pid_exe_is_elf_64_file): Declare.
6275 * linux-x86-low.c (x86_arch_setup): Use
6276 linux_pid_exe_is_elf_64_file.
6277
d8301ad1
JK
62782012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6279
6280 * linux-low.c (linux_wait_for_event_1): Rename to ...
6281 (linux_wait_for_event): ... here and merge it with former
6282 linux_wait_for_event - new variable wait_ptid, use it.
6283 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6284
01b17894
PA
62852012-01-23 Pedro Alves <palves@redhat.com>
6286
6287 * server.c (main): Avoid yet another case of infinite loop while
6288 detaching/killing after a longjmp.
6289
e825046f
JK
62902012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6291
6292 Code cleanup.
6293 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6294
b9e7b9c3
UW
62952012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6296
6297 * hostio.c (handle_readlink): New function.
6298 (handle_vFile): Call it to handle "vFile:readlink" packets.
6299
901f9912
UW
63002012-01-20 Pedro Alves <palves@redhat.com>
6301 Ulrich Weigand <ulrich.weigand@linaro.org>
6302
6303 * server.c (handle_v_requests): Only support vAttach and vRun to
6304 start multiple processes when in extended protocol mode.
6305
fc1ab1a0
PA
63062012-01-17 Pedro Alves <palves@redhat.com>
6307
6308 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6309 memalign plus mprotect to allocate the scratch buffer.
6310
7d5d4e98
PA
63112012-01-13 Pedro Alves <palves@redhat.com>
6312
6313 * server.c (attach_inferior): Clear `cont_thread'.
6314
f128d5e9
PA
63152012-01-13 Pedro Alves <palves@redhat.com>
6316
6317 * server.c (main): Avoid infinite loop while detaching/killing
6318 after a longjmp.
6319
06db92f0
DE
63202012-01-09 Doug Evans <dje@google.com>
6321
6322 * server.c (start_inferior): Set last_ptid in --wrapper case.
6323
32d92999
YQ
63242012-01-06 Yao Qi <yao@codesourcery.com>
6325
6326 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6327 defined.
6328 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6329
5e0a92a9
YQ
63302012-01-04 Yao Qi <yao@codesourcery.com>
6331
6332 * tracepoint.c (cmd_qtdp): Print debug message
6333 for static tracepoint.
6334
ae639e8c
YQ
63352012-01-04 Yao Qi <yao@codesourcery.com>
6336
6337 * tracepoint.c (trace_vdebug): Differentiate debug message
6338 between gdbserver and IPA.
6339
f72429c5
YQ
63402012-01-03 Yao Qi <yao@codesourcery.com>
6341
6342 * tracepoint.c (tracepoint_was_hit): Don't collect for
6343 static tracepoint.
6344
12c3e59c
JB
63452012-01-02 Joel Brobecker <brobecker@adacore.com>
6346
6347 * terminal.h: Reformat copyright header.
6348
67827812
JB
63492012-01-02 Joel Brobecker <brobecker@adacore.com>
6350
6351 * server.c (gdbserver_version): Update copyright year.
6352 * gdbreplay.c (gdbreplay_version): Likewise.
6353
3e52c33d
JK
63542011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6355
6356 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6357
6358 Revert:
6359 2011-12-18 Hui Zhu <teawater@gmail.com>
6360 * linux-low.c (linux_create_inferior): Save return value to ret.
6361
66f1260e
HZ
63622011-12-18 Hui Zhu <teawater@gmail.com>
6363
6364 * linux-low.c (linux_create_inferior): Save return value to ret.
6365
e77616d7
DE
63662011-12-16 Doug Evans <dje@google.com>
6367
e7b06c57
DE
6368 * linux-low.c (linux_create_inferior): If stdio connection,
6369 redirect stdin from /dev/null, stdout to stderr.
6370 * remote-utils.c (remote_is_stdio): New static global.
6371 (remote_connection_is_stdio): New function.
6372 (remote_prepare): Handle stdio connection.
6373 (remote_open): Ditto.
6374 (remote_close): Don't close stdin for stdio connections.
6375 (read_prim,write_prim): New functions. Replace all calls to
6376 read/write to these.
6377 * server.c (main): Watch for "-" argument. Move call to
6378 remote_prepare before start_inferior.
6379 * server.h (STDIO_CONNECTION_NAME): New macro.
6380 (remote_connection_is_stdio): Declare.
6381
e77616d7
DE
6382 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6383 in debugging output.
6384
82067193
YQ
63852011-12-15 Yao Qi <yao@codesourcery.com>
6386
6387 * tracepoint.c: Include sys/syscall.h.
6388 (gdb_ust_thread): Remove preprocessor conditional.
6389
82bfbe7e
PA
63902011-12-14 Pedro Alves <pedro@codesourcery.com>
6391
6392 * linux-low.c (linux_detach_one_lwp): Call
6393 the_low_target.prepare_to_resume before detaching.
6394
712c6575
YQ
63952011-12-14 Yao Qi <yao@codesourcery.com>
6396
6397 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6398 of write.
6399
d54d1edf
YQ
64002011-12-14 Yao Qi <yao@codesourcery.com>
6401
6402 * i386-low.c (i386_low_stopped_data_address): Initialize local
6403 variable `control'.
6404
6210a125
PA
64052011-12-13 Pedro Alves <pedro@codesourcery.com>
6406
6407 PR remote/13492
6408
6409 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6410 DR_CONTROL unless necessary. Extend comments.
6411 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6412 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6413
2ece8244
YQ
64142011-12-13 Yao Qi <yao@codesourcery.com>
6415
6416 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6417 macros.
6418 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6419
784867a5
JK
64202011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6421
6422 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6423 Print new debug message for such case.
6424
6bf36717
JK
64252011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6426
6427 Fix overlapping memcpy.
6428 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6429 the read_inferior_memory transfer.
6430 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6431 write_inferior_memory transfer.
6432 (set_fast_tracepoint_jump): New variable buf. Use it for the
6433 read_inferior_memory and write_inferior_memory transfers.
6434 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6435 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6436 Use it for the write_inferior_memory transfer.
6437 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6438 buffers.
6439
50275556
MR
64402011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6441
6442 * linux-low.c (fetch_register, store_register): Make code
6443 consistent, fix formatting.
6444
7325beb4
MR
64452011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6446
6447 * linux-low.c (usr_store_inferior_registers): Factor out code
6448 to handle individual registers into...
6449 (store_register): ... this new function.
6450
c642a434
UW
64512011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6452
6453 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6454 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6455 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6456 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6457 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6458 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6459 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6460 (srv_xmlfiles): Add new XML files.
6461
6462 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6463 and <sys/uio.h>.
6464 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6465 (init_registers_s390_linux32v1): Add prototype.
6466 (init_registers_s390_linux32v2): Likewise.
6467 (init_registers_s390_linux64v1): Likewise.
6468 (init_registers_s390_linux64v2): Likewise.
6469 (init_registers_s390x_linux64v1): Likewise.
6470 (init_registers_s390x_linux64v2): Likewise.
6471 (s390_num_regs): Increment to 52.
6472 (s390_regmap): Add orig_r2 register.
6473 (s390_num_regs_3264): Increment to 68.
6474 (s390_regmap_3264): Add orig_r2 register.
6475 (s390_collect_ptrace_register): Handle orig_r2 register.
6476 (s390_supply_ptrace_register): Likewise.
6477 (s390_fill_last_break): New function.
6478 (s390_store_last_break): Likewise.
6479 (s390_fill_system_call): New function.
6480 (s390_store_system_call): Likewise.
6481 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6482 register sets.
6483 (s390_check_regset): New function.
6484 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6485 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6486 Update target_regsets for available register sets.
6487
2268b414
JK
64882011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6489 Jan Kratochvil <jan.kratochvil@redhat.com>
6490
6491 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6492 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6493 New.
6494 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6495 * linux-low.h (struct process_info_private): New member r_debug.
6496 * server.c (handle_qxfer_libraries): Call
6497 the_target->qxfer_libraries_svr4.
6498 (handle_qxfer_libraries_svr4): New function.
6499 (qxfer_packets): New entry "libraries-svr4".
6500 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6501 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6502 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6503 PACKET_qXfer_libraries_svr4.
6504
d6db1fab
UW
65052011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6506
6507 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6508 PSW address/mask between 8-byte and 16-byte formats.
6509 (s390_supply_ptrace_register): Likewise.
6510 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6511 basic addressing mode bit.
6512
242f5f1c
SS
65132011-11-24 Stan Shebs <stan@codesourcery.com>
6514
6515 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6516
f196051f
SS
65172011-11-17 Stan Shebs <stan@codesourcery.com>
6518
6519 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6520 (tracing_start_time): New global.
6521 (tracing_stop_time): New global.
6522 (tracing_user_name): New global.
6523 (tracing_notes): New global.
6524 (tracing_stop_note): New global.
6525 (cmd_qtstart): Set traceframe_usage, start_time.
6526 (stop_tracing): Set stop_time.
6527 (cmd_qtstatus): Report additional status.
6528 (cmd_qtp): New function.
6529 (handle_tracepoint_query): Call it.
6530 (cmd_qtnotes): New function.
6531 (handle_tracepoint_general_set): Call it.
6532 (get_timestamp): Rename from tsv_get_timestamp.
6533
405f8e94
SS
65342011-11-14 Stan Shebs <stan@codesourcery.com>
6535 Kwok Cheung Yeung <kcy@codesourcery.com>
6536
6537 * linux-x86-low.c (small_jump_insn): New.
6538 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6539 trampoline and error message, build a trampoline and issue a small
6540 jump instruction to it.
6541 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6542 trampoline and error message.
6543 (x86_get_min_fast_tracepoint_insn_len): New.
6544 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6545 * linux-low.h (struct linux_target_ops): Add arguments to
6546 install_fast_tracepoint_jump_pad operation, add new operation.
6547 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6548 arguments.
6549 (linux_get_min_fast_tracepoint_insn_len): New function.
6550 (linux_target_op): Add new operation.
6551 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6552 (gdb_trampoline_buffer_end): Ditto.
6553 (gdb_trampoline_buffer_error): Ditto.
6554 (struct ipa_sym_addresses): Add fields for new IPA variables.
6555 (symbol_list): Add entries for new IPA variables.
6556 (struct tracepoint): Add fields to hold the address range of the
6557 trampoline used by the tracepoint.
6558 (trampoline_buffer_head): New static variable.
6559 (trampoline_buffer_tail): Ditto.
6560 (claim_trampoline_space): New function.
6561 (have_fast_tracepoint_trampoline_buffer): New function.
6562 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6563 structure.
6564 (install_fast_tracepoint): Ditto, also add error buffer argument.
6565 (cmd_qtminftpilen): New function.
6566 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6567 (fast_tracepoint_from_trampoline_address): New function.
6568 (fast_tracepoint_collecting): Handle trampoline as part of jump
6569 pad space.
6570 (set_trampoline_buffer_space): New function.
6571 (initialize_tracepoint): Initialize new IPA variables.
6572 * target.h (struct target_ops): Add arguments to
6573 install_fast_tracepoint_jump_pad operation, add new
6574 get_min_fast_tracepoint_insn_len operation.
6575 (target_get_min_fast_tracepoint_insn_len): New.
6576 (install_fast_tracepoint_jump_pad): Add arguments.
6577 * server.h (IPA_BUFSIZ): Define.
6578 * linux-i386-ipa.c: Include extra header files.
6579 (initialize_fast_tracepoint_trampoline_buffer): New function.
6580 (initialize_low_tracepoint): Call it.
6581 * server.h (set_trampoline_buffer_space): Declare.
6582 (claim_trampoline_space): Ditto.
6583 (have_fast_tracepoint_trampoline_buffer): Ditto.
6584
1e4d1764
YQ
65852011-11-14 Yao Qi <yao@codesourcery.com>
6586
6587 * server.c (handle_query): Handle InstallInTrace for qSupported.
6588 * tracepoint.c (add_tracepoint): Sort list.
6589 (install_tracepoint, download_tracepoint): New.
6590 (cmd_qtdp): Call them to install and download tracepoints.
6591 (sort_tracepoints): Removed.
6592 (cmd_qtstart): Update.
6593
5c73ff4e
YQ
65942011-11-14 Yao Qi <yao@codesourcery.com>
6595
6596 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6597 * mem-break.h: Declare.
6598 * tracepoint.c (cmd_qtstart): Move some code to ...
6599 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6600 New.
6601 (download_tracepoints): Move some code to ...
6602 (download_tracepoint_1): ... here. New.
6603
86a30030
YQ
66042011-11-08 Yao Qi <yao@codesourcery.com>
6605
6606 * remote-utils.c (relocate_instruction): A comment fix.
6607
8d26e50c
JB
66082011-11-07 Joel Brobecker <brobecker@adacore.com>
6609
6610 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6611 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6612 dr_status_mirror and dr_control_mirror from debug_reg_state.
6613 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6614 (i386_initial_stuff): Remove use of deleted globals.
6615 (i386_get_thread_context, i386_set_thread_context,
6616 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6617 from debug_reg_state.
6618
a59306a3
YQ
66192011-11-05 Yao Qi <yao@codesourcery.com>
6620
6621 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6622 address as TPOINT's.
6623
3065dfb6
SS
66242011-11-02 Stan Shebs <stan@codesourcery.com>
6625
6626 * tracepoint.c (agent_mem_read_string): New function.
6627 (eval_agent_expr): Call it for tracenz.
6628 * server.c (handle_query): Report support for tracenz.
6629
fd0d8c7c
YQ
66302011-11-02 Yao Qi <yao@codesourcery.com>
6631
6632 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6633
609086b1
YQ
66342011-11-02 Yao Qi <yao@codesourcery.com>
6635
6636 * target.h: Fix a typo in comment.
6637
b9fd1791
PA
66382011-10-31 Pedro Alves <pedro@codesourcery.com>
6639
6640 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6641 clobber the breakpoints' shadows with fast tracepoint jumps.
6642 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6643 * target.c (write_inferior_memory): Also pass MYADDR down to
6644 check_mem_write.
6645
03583c20
UW
66462011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6647
6648 * configure.ac: Check support for personality routine.
6649 * configure: Regenerate.
6650 * config.in: Likewise.
6651 * linux-low.c: Include <sys/personality.h>.
6652 Define ADDR_NO_RANDOMIZE if necessary.
6653 (linux_create_inferior): Disable address space randomization when
6654 forking inferior, if requested.
6655 (linux_supports_disable_randomization): New function.
6656 (linux_target_ops): Install it.
6657 * server.h (disable_randomization): Declare.
6658 * server.c (disable_randomization): New global variable.
6659 (handle_general_set): Handle QDisableRandomization.
6660 (handle_query): Likewise for qSupported.
6661 (main): Support --disable-randomization and --no-disable-randomization
6662 command line arguments.
6663 * target.h (struct target_ops): Add supports_disable_randomization.
6664 (target_supports_disable_randomization): New macro.
6665
723b724b
MF
66662011-09-29 Mike Frysinger <vapier@gentoo.org>
6667
6668 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6669 ifdef check.
6670 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6671 [!PT_GETDSBT] (target_loadmap): New definition.
6672 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6673 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6674 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6675 and PT_GETDSBT to LINUX_LOADMAP.
6676 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6677 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6678
55329a5c 66792011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
6680
6681 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6682 (arm_linux_hwbp_cap): New static variable.
6683 (arm_linux_get_hwbp_cap): Replace by ...
6684 (arm_linux_init_hwbp_cap): ... this new function.
6685 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6686 (arm_linux_get_hw_watchpoint_count): Likewise.
6687 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6688 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6689 (arm_prepare_to_resume): Use perror_with_name instead of error.
6690
55329a5c 66912011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
6692
6693 * linux-arm-low.c: Include <signal.h>.
6694 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6695 (struct arm_linux_hwbp_cap): New data type.
6696 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6697 (struct arm_linux_hw_breakpoint): New data type.
6698 (MAX_BPTS, MAX_WPTS): Define.
6699 (struct arch_process_info, struct arch_lwp_info): New data types.
6700 (arm_linux_get_hwbp_cap): New function.
6701 (arm_linux_get_hw_breakpoint_count): Likewise.
6702 (arm_linux_get_hw_watchpoint_count): Likewise.
6703 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6704 (arm_hwbp_control_initialize): Likewise.
6705 (arm_hwbp_control_is_enabled): Likewise.
6706 (arm_hwbp_control_is_initialized): Likewise.
6707 (arm_hwbp_control_disable): Likewise.
6708 (arm_linux_hw_breakpoint_equal): Likewise.
6709 (arm_linux_hw_point_initialize): Likewise.
6710 (struct update_registers_data): New data structure.
6711 (update_registers_callback: New function.
6712 (arm_insert_point): Likewise.
6713 (arm_remove_point): Likewise.
6714 (arm_stopped_by_watchpoint): Likewise.
6715 (arm_stopped_data_address): Likewise.
6716 (arm_new_process): Likewise.
6717 (arm_new_thread): Likewise.
6718 (arm_prepare_to_resume): Likewise.
6719 (the_low_target): Register arm_insert_point, arm_remove_point,
6720 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6721 arm_new_thread, and arm_prepare_to_resume.
6722
6b9801d4
SS
67232011-09-15 Stan Shebs <stan@codesourcery.com>
6724
6725 * server.h (struct emit_ops): Add compare-goto fields.
6726 * tracepoint.c (gdb_agent_op_sizes): New table.
6727 (emit_eq_goto): New function.
6728 (emit_ne_goto): New function.
6729 (emit_lt_goto): New function.
6730 (emit_le_goto): New function.
6731 (emit_gt_goto): New function.
6732 (emit_ge_goto): New function.
6733 (is_goto_target): New function.
6734 (compile_bytecodes): Recognize special cases of compare-goto
6735 combinations and call specialized emitters for them.
6736 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6737 (amd64_emit_ne_goto): New function.
6738 (amd64_emit_lt_goto): New function.
6739 (amd64_emit_le_goto): New function.
6740 (amd64_emit_gt_goto): New function.
6741 (amd64_emit_ge_goto): New function.
6742 (amd64_emit_ops): Add the new functions.
6743 (i386_emit_eq_goto): New function.
6744 (i386_emit_ne_goto): New function.
6745 (i386_emit_lt_goto): New function.
6746 (i386_emit_le_goto): New function.
6747 (i386_emit_gt_goto): New function.
6748 (i386_emit_ge_goto): New function.
6749 (i386_emit_ops): Add the new functions.
6750
bf15cbda
SS
67512011-09-08 Stan Shebs <stan@codesourcery.com>
6752
6753 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6754 (i386_emit_epilogue): Restore %ebx.
6755
943ca1dd
JZ
67562011-08-31 Jie Zhang <jzhang918@gmail.com>
6757
6758 * server.c (step_thread): Remove definition.
6759 (process_serial_event): Don't handle Hs.
6760 * server.h (step_thread): Remove declaration.
6761 * target.c (set_desired_inferior): Remove use of step_thread.
6762
e3deef73
LM
67632011-08-24 Luis Machado <lgustavo@codesourcery.com>
6764
6765 * linux-low.c: Include linux-procfs.h.
6766 (linux_attach_lwp_1): Update comments.
6767 (linux_attach): Scan for existing threads when attaching to a
6768 process that is the tgid.
6769 * Makefile.in: Update dependencies.
6770
13da1c97
LM
67712011-08-24 Luis Machado <lgustavo@codesourcery.com>
6772
6773 * configure.srv: Add linux-procfs.o dependencies.
6774
881127c9
YQ
67752011-08-14 Yao Qi <yao@codesourcery.com>
6776
6777 * target.h (struct target_ops): Fix indent.
6778 * win32-low.c (win32_target_ops): Fix comment.
6779
58dbd541
YQ
67802011-08-14 Andrew Jenner <andrew@codesourcery.com>
6781 Yao Qi <yao@codesourcery.com>
6782
6783 * Makefile.in (clean): Remove tic6x-*.c files.
6784 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6785 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6786 (tic6x-c64xp-linux.c): Likewise.
6787 * configure.srv: Add support for tic6x-*-uclinux.
6788 * linux-tic6x-low.c: New.
6789 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6790
78d85199
YQ
67912011-08-14 Andrew Stubbs <ams@codesourcery.com>
6792 Yao Qi <yao@codesourcery.com>
6793
6794 * target.h (struct target_ops): Add read_loadmap.
6795 * linux-low.c (struct target_loadseg): New type.
6796 (struct target_loadmap): New type.
6797 (linux_read_loadmap): New function.
6798 (linux_target_ops): Add linux_read_loadmap.
6799 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
6800 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6801 to NULL.
78d85199 6802
a959a88d
EZ
68032011-08-05 Eli Zaretskii <eliz@gnu.org>
6804
6805 * win32-low.c: Include <stdint.h>.
6806
1ced966e
PA
68072011-07-22 Pedro Alves <pedro@codesourcery.com>
6808
6809 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6810 to the inferior here.
6811 (i386_remove_aligned_watchpoint): Ditto.
6812 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6813 fit part of the watchpoint in the debug registers.
6814 (i386_update_inferior_debug_regs): New.
6815 (i386_low_insert_watchpoint): Work on a local mirror of the debug
6816 registers, and only update the inferior on success.
6817 (i386_low_remove_watchpoint): Ditto.
6818
d26e3629
KY
68192011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6820
6821 * linux-low.c (compare_ints, unique, list_threads, show_process,
6822 linux_core_of_thread): Delete.
6823 (linux_target_ops): Change linux_core_of_thread to
6824 linux_common_core_of_thread.
6825 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6826 * utils.c (malloc_failure): Change type of argument.
6827 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6828 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6829 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6830 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6831 (IPA_OBJS): Add common-utils-ipa.o.
6832 (ptid_h, linux_osdata_h): New macros.
6833 (server_h): Add common/common-utils.h, common/xml-utils.h,
6834 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6835 common/ptid.h.
6836 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6837 ptid.o, buffer.o): New rules.
6838 (linux-low.o): Add common/linux-osdata.h as a dependency.
6839 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6840 * configure.ac: Add AC_HEADER_DIRENT check.
6841 * config.in: Regenerate.
6842 * configure: Regenerate.
6843 * remote-utils.c (xml_escape_text): Delete.
6844 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6845 buffer_xml_printf): Move to common/buffer.c.
6846 * server.c (main): Remove call to initialize_inferiors.
6847 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6848 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6849 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6850 internal_error, gdb_assert, gdb_assert_fail): Delete.
6851 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6852 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6853 common/buffer.h.
6854 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6855 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6856 initialize_inferiors): Delete.
6857
2275a1a7
PA
68582011-07-20 Pedro Alves <pedro@codesourcery.com>
6859
6860 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6861 symbol error.
6862
0a5b1e09
PA
68632011-05-31 Pedro Alves <pedro@codesourcery.com>
6864
6865 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6866 assertion.
6867 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6868
6938fd34
YQ
68692011-05-26 Yao Qi <yao@codesourcery.com>
6870
6871 * Makefile.in (thread-db.o): Track dependence to
6872 common/gdb_thread_db.h.
6873 * thread-db.c: include gdb_thread_db.h from right place.
6874
b481f9e0
TT
68752011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6876
6877 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6878 __FILE__ and __LINE__ to internal_error.
6879
98a5dd13
DE
68802011-05-13 Doug Evans <dje@google.com>
6881
6882 * thread-db.c (try_thread_db_load_from_sdir): New function.
6883 (try_thread_db_load_from_dir): New function.
6884 (thread_db_load_search): Handle $sdir, ignore $pdir.
6885 Remove trying of system directories if search of
6886 libthread-db-search-path fails, that is now done via $sdir.
6887
d248b706
KY
68882011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6889
6890 * server.c (handle_query): Add EnableDisableTracepoints to the list
6891 of supported features.
43aaf8b6 6892 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 6893 tracepoints.
43aaf8b6
PA
6894 (cmd_qtenable_disable): New.
6895 (cmd_qtstart): Install tracepoints even if disabled.
6896 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6897 receiving a QTEnable or QTDisable packet.
6898 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6899 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6900 tracepoints.
6901 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 6902
84e578fb
DE
69032011-05-10 Doug Evans <dje@google.com>
6904
6905 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6906
71f55dd8
DE
69072011-05-04 Doug Evans <dje@google.com>
6908
6909 * linux-low.c (linux_join): Skip process lookup.
6910 * spu-low.c (spu_join): Ditto.
6911 * server.c (join_inferiors_callback): Delete.
6912 (process_serial_event): For 'D' packet (detach) call join_inferior
6913 directly.
6914
4d393d60
JM
69152011-05-04 Joseph Myers <joseph@codesourcery.com>
6916
6917 * README: Don't mention xscale*-*-linux*.
6918 * configure.srv (xscale*-*-linux*): Don't handle target.
6919
b00ad6ff
NF
69202011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6921
6922 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6923 casting pointers.
6924 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6925 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6926 (i386_emit_void_call_2): Likewise.
6927
af96c192
YQ
69282011-04-26 Yao Qi <yao@codesourcery.com>
6929
43aaf8b6
PA
6930 * linux-low.c: Move common macros to linux-ptrace.h.
6931 Include linux-ptrace.h.
af96c192
YQ
6932 * Makefile.in (linux_ptrace_h): New.
6933 (linux-low.o): Depends on linux-ptrace.h.
6934
03f2bd59
JK
69352011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6936
6937 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6938 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6939 (remote_prepare): New function with most of the TCP code from ...
6940 (remote_open): ... here. Detect PORT here unconditionally. Move also
6941 setting transport_is_reliable.
6942 * server.c (run_once): New variable.
6943 (gdbserver_usage): Document it.
6944 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6945 the first run if RUN_ONCE.
6946 * server.h (run_once, remote_prepare): New declarations.
6947
7a9dd1b2
TT
69482011-04-19 Tom Tromey <tromey@redhat.com>
6949
6950 * win32-low.c (handle_load_dll): Remove duplicate "the".
6951
81239425
PM
69522011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6953
6954 Remove support for old Cygwin 1.5 versions.
6955 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6956 function to avoid warning.
6957 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6958 warning.
6959
9e0627f1
PM
69602011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6961
6962 * gdbserver/server.h (Macro _): Define it if not available.
6963
588eebee
MS
69642011-03-14 Michael Snyder <msnyder@vmware.com>
6965
348af9f7 6966 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 6967
43f70d4c
JB
69682011-03-10 Joel Brobecker <brobecker@adacore.com>
6969
6970 * Makefile.in (maintainer-clean realclean distclean): Remove
6971 "make ... subdir_do" command.
6972
348af9f7
MS
69732011-03-10 Michael Snyder <msnyder@vmware.com>
6974
6975 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6976
6977 * server.c (handle_v_run): Free alloced buffer on early return.
6978
e637a4f5
YQ
69792011-03-09 Yao Qi <yao@codesourcery.com>
6980
6981 Revert:
6982 2011-03-04 Yao Qi <yao@codesourcery.com>
6983
6984 * Makefile.in: Remove GNU make feature --directory.
6985
6986 2011-03-05 Yao Qi <yao@codesourcery.com>
6987
6988 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6989 (subdir_do): New make target. Copied from gdb/Makefile.
6990 (maintainer-clean, realclean, distclean, clean): Call corresponding
6991 make targets in common/Makefile.
6992
6993 2011-02-11 Yao Qi <yao@codesourcery.com>
6994
6995 * configure.ac: Call AC_PROG_RANLIB.
6996 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6997 * configure: Regenerate.
6998
e6edda56
JK
69992011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7000
7001 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7002
e5141119
JB
70032011-03-06 Yao Qi <yao@codesourcery.com>
7004
7005 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7006
64794aa4
JB
70072011-03-05 Yao Qi <yao@codesourcery.com>
7008
7009 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7010 (subdir_do): New make target. Copied from gdb/Makefile.
7011 (maintainer-clean, realclean, distclean, clean): Call corresponding
7012 make targets in common/Makefile.
7013
7a762829
YQ
70142011-03-04 Yao Qi <yao@codesourcery.com>
7015
7016 * Makefile.in: Remove GNU make feature --directory.
7017
348af9f7
MS
70182011-03-04 Michael Snyder <msnyder@vmware.com>
7019
7020 * server.c (queue_stop_reply): Call xmalloc not malloc.
7021
70222011-03-02 Michael Snyder <msnyder@vmware.com>
7023
7024 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7025
9f72fee2
MS
70262011-02-28 Michael Snyder <msnyder@vmware.com>
7027
588eebee
MS
7028 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7029 (cmd_qtframe): Ditto.
7030 (cmd_qtbuffer): Ditto.
7031 (cmd_bigqtbuffer): Ditto.
7032
9f72fee2
MS
7033 * utils.c (decimal2str): Initialize 'width' to nine, then
7034 don't mess with it.
7035
8040bd49
UW
70362011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7037
7038 * hostio.c (require_data): Free *data, not data.
7039
7e52cbd0
JK
70402011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7041
7042 * hostio.c (require_data): Use free, not xfree.
7043
9130f83e
MS
70442011-02-27 Michael Snyder <msnyder@vmware.com>
7045
4b812f4e
MS
7046 * server.c (handle_query): Discard unused value.
7047
9130f83e
MS
7048 * hostio.c (require_data): Free malloc memory before returning
7049 error.
7050
69d37113
MS
70512011-02-26 Michael Snyder <msnyder@vmware.com>
7052
7053 * linux-low.c (list_threads): Call closedir for dirent.
7054
35f5825a
MS
70552011-02-27 Michael Snyder <msnyder@vmware.com>
7056
2a589cef
MS
7057 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7058 a case statement falls through.
7059
0adea5f7
MS
7060 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7061
35f5825a
MS
7062 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7063 in comparison.
7064
238f1c74
MS
70652011-02-26 Michael Snyder <msnyder@vmware.com>
7066
7067 * utils.c (decimal2str): Eliminate dead code and dead param.
7068 (pulongest): Drop dead param from call to decimal2str.
7069 (plongest): Ditto.
7070
633ff500
JB
70712011-02-24 Joel Brobecker <brobecker@adacore.com>
7072
7073 Revert the following patch (not approved yet):
7074 2011-02-21 Hui Zhu <teawater@gmail.com>
7075 * tracepoint.c (tp_printf): New function.
7076 (eval_agent_expr): Handle gdb_agent_op_printf.
7077
f9c6ff72
HZ
70782011-02-21 Hui Zhu <teawater@gmail.com>
7079
7080 * tracepoint.c (tp_printf): New function.
7081 (eval_agent_expr): Handle gdb_agent_op_printf.
7082
94d5e490
TT
70832011-02-18 Tom Tromey <tromey@redhat.com>
7084
7085 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7086 (tracepoint.o): Likewise.
7087 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7088 (gdb_agent_op_names): Likewise.
7089
c7f96d2b
TT
70902011-02-18 Tom Tromey <tromey@redhat.com>
7091
7092 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7093 gdb_agent_op_rot>: New constants.
7094 (gdb_agent_op_names): Add pick and roll.
7095 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7096 cases.
7097
0feedb2c
JK
70982011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7099
7100 * aclocal.m4: Regenerated with aclocal-1.11.1.
7101
b3b9301e
PA
71022011-02-14 Pedro Alves <pedro@codesourcery.com>
7103
7104 * server.c (handle_qxfer_traceframe_info): New.
7105 (qxfer_packets): Register "traceframe-info".
7106 (handle_query): Report support for qXfer:traceframe-info:read+.
7107 * tracepoint.c (match_blocktype): New.
7108 (traceframe_find_block_type): Rename to ...
7109 (traceframe_walk_blocks): ... this. Add callback filter argument,
7110 and use it.
7111 (traceframe_find_block_type): New, reimplemented on top of
7112 traceframe_walk_blocks.
7113 (build_traceframe_info_xml): New.
7114 (traceframe_read_info): New.
7115 * server.h (traceframe_read_info): Declare.
7116
4f3e6fb7
YQ
71172011-02-11 Yao Qi <yao@codesourcery.com>
7118
7119 * configure.ac: Call AC_PROG_RANLIB.
7120 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7121 * configure: Regenerate.
7122
764880b7
PA
71232011-02-07 Pedro Alves <pedro@codesourcery.com>
7124
7125 * server.c (gdb_read_memory): Change return semantics to allow
7126 partial transfers.
7127 (handle_search_memory_1): Adjust.
7128 (process_serial_event) <'m' packet>: Handle partial transfers.
7129 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7130
1c79eb8a
PA
71312011-01-28 Pedro Alves <pedro@codesourcery.com>
7132
7133 * regcache.c (init_register_cache): Initialize
7134 regcache->register_status.
7135 (free_register_cache): Release regcache->register_status.
7136 (regcache_cpy): Copy register_status.
7137 (registers_to_string): Print 'x's for unavailable registers.
7138 (supply_register): Mark the register's status valid or
7139 unavailable, depending on whether a buffer was passed in or not.
7140 (supply_register_zeroed): New.
7141 (supply_regblock): Mark the registers' status valid or
7142 unavailable, depending on whether a buffer was passed in or not.
7143 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7144 (struct regcache): New `register_status' field.
7145 (supply_register_zeroed): Declare.
7146 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7147 supply_register_zeroed, rather than passing a NULL buffer to
7148 supply_register.
7149 * tracepoint.c (fetch_traceframe_registers): Update comment.
7150
85724a0e
PA
71512011-01-28 Pedro Alves <pedro@codesourcery.com>
7152
7153 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7154 buffer explicit.
7155
d08aafef
PA
71562011-01-25 Pedro Alves <pedro@codesourcery.com>
7157
7158 * server.h (decode_xfer_write): Change prototype.
7159 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7160 and don't extract the annex here.
7161 * server.c (decode_xfer_read): Remove `annex' parameter,
7162 and don't extract the annex here.
7163 (decode_xfer): New.
7164 (struct qxfer): New.
7165 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7166 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7167 (handle_qxfer_statictrace): New functions, abstracted out from
7168 handle_query, and made to use the struct qxfer interface.
7169 (handle_threads_qxfer_proper): Rename to ...
7170 (handle_qxfer_threads_proper): ... this.
7171 (handle_threads_qxfer): Rename to ...
7172 (handle_qxfer_threads): ... this. Adjust.
7173 (qxfer_packets): New array.
7174 (handle_qxfer): New function.
7175 (handle_query): Use handle_qxfer.
7176
493e2a69
MS
71772011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7178
7179 * gdbreplay.c: Shorten lines of >= 80 columns.
7180 * linux-low.c: Ditto.
7181 * linux-ppc-low.c: Ditto.
7182 * linux-s390-low.c: Ditto.
7183 * linux-sparc-low.c: Ditto.
7184 * linux-x86-low.c: Ditto.
7185 * linux-xtensa-low.c: Ditto.
7186 * mem-break.c: Ditto.
7187 * nto-low.c: Ditto.
7188 * regcache.h: Ditto.
7189 * remote-utils.c: Ditto.
7190 * server.c: Ditto.
7191 * server.h: Ditto.
7192 * thread-db.c: Ditto.
7193 * tracepoint.c: Ditto.
7194 * utils.c: Ditto.
7195 * win32-low.h: Ditto.
7196
44944448
JB
71972011-01-05 Joel Brobecker <brobecker@adacore.com>
7198
7199 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7200 update.
7201
71ce852c
JB
72022011-01-01 Joel Brobecker <brobecker@adacore.com>
7203
7204 * server.c (gdbserver_version): Update copyright year in version
7205 output.
7206 * gdbreplay.c (gdbreplay_version): Ditto.
7207
eb826dc6
MF
72082010-12-29 Jie Zhang <jie.zhang@analog.com>
7209
7210 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7211 * linux-bfin-low.c: New file.
7212 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7213 PT_DATA_ADDR for BFIN targets.
7214 * Makefile.in (SFILES): Add linux-bfin-low.c.
7215 (clean): Remove reg-bfin.c.
7216 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7217 * README: Mention supported Blackfin targets.
7218
39ab222a
MF
72192010-12-23 Mike Frysinger <vapier@gentoo.org>
7220
7221 * .gitignore: New file.
7222
a1f2ce7d
MF
72232010-11-16 Mike Frysinger <vapier@gentoo.org>
7224
7225 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7226
f474844c
JZ
72272010-10-22 Jie Zhang <jie@codesourcery.com>
7228
7229 * Makefile.in: Add FLAGS_TO_PASS variable.
7230 (install): Remove dependency of install-only and recursively
7231 invoke make for install-only.
7232
f1048712
DE
72332010-10-04 Doug Evans <dje@google.com>
7234
7235 * Makefile.in (uninstall): Use $(DESTDIR).
7236
b53a1623
PA
72372010-09-24 Pedro Alves <pedro@codesourcery.com>
7238
e6ee044d
PA
7239 PR gdb/11842
7240
b53a1623
PA
7241 * linux-x86-low.c (compat_siginfo_from_siginfo)
7242 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7243 si_code is < 0. Check for si_code == SI_TIMER before checking for
7244 si_code < 0.
7245
fa1bd1e4
JB
72462010-09-13 Joel Brobecker <brobecker@adacore.com>
7247
7248 * lynx-i386-low.c: New file.
7249 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7250
47fac8f8
JB
72512010-09-13 Joel Brobecker <brobecker@adacore.com>
7252
7253 * lynx-low.c (ptrace_request_to_str): Remove handling for
7254 request values that have been removed in LynxOS 5.x.
7255
1adfc54d
JB
72562010-09-13 Joel Brobecker <brobecker@adacore.com>
7257
7258 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7259 <ptrace.h>
7260
c2a66c29
NS
72612010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7262
7263 * configure.ac: Add --enable-inprocess-agent option.
7264 * configure: Rebuilt.
7265
32fcada3
YQ
72662010-09-06 Yao Qi <yao@codesourcery.com>
7267
7268 * linux-low.c (linux_kill): Remove unused variable.
7269 (linux_stabilize_threads): Likewise.
7270 * server.c (start_inferior): Likewise.
7271 (queue_stop_reply_callback): Likewise.
7272 * tracepoint.c (do_action_at_tracepoint): Likewise.
7273
0cccb683
YQ
72742010-09-06 Yao Qi <yao@codesourcery.com>
7275
7276 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7277 on return.
7278
423ec54c
JK
72792010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7280
7281 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7282
12ac6819
PA
72832010-09-06 Pedro Alves <pedro@codesourcery.com>
7284
7285 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7286 "$(IPA_DEPFILES)".
7287
8ed54b31
JB
72882010-09-01 Joel Brobecker <brobecker@adacore.com>
7289
7290 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7291 gdbserver/lynx-ppc-low.c: New files.
7292 * Makefile.in (lynx_low_h): New variable.
7293 (lynx-low.o, lynx-ppc-low.o): New rules.
7294 * configure.ac: On LynxOS, link with -lnetinet.
7295 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7296 * configure: regenerate.
7297
bb0116a4
JB
72982010-09-01 Joel Brobecker <brobecker@adacore.com>
7299
7300 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7301 * configure.ac: Add check for vasprintf and vsnprintf.
7302 * configure, config.in: Regenerate.
7303 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7304
a778ab81 73052010-09-01 Joel Brobecker <brobecker@adacore.com>
7306
7307 * gdbreplay.c: Move include of alloca.h up, next to include of
7308 malloc.h.
7309 * server.h: Add include of malloc.h.
7310 * mem-break.c: Remove include of malloc.h.
7311 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7312
8b034a19 73132010-09-01 Joel Brobecker <brobecker@adacore.com>
7314
7315 * Makefile.in (memmem.o): Build with -Wno-error.
7316
73172010-09-01 Joel Brobecker <brobecker@adacore.com>
7318
7319 * utils.c (xsnprintf): Make non-static.
7320 * server.h: Add xsnprintf declaration.
7321 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7322 replace calls to snprintf by calls to xsnprintf throughout.
7323
73242010-09-01 Joel Brobecker <brobecker@adacore.com>
7325
7326 * configure.ac: Add configure check for alloca.
7327 * configure, config.in: Regenerate.
7328 * server.h: Include alloca.h if it exists.
7329 * gdbreplay.c: Include alloca.h if it exists.
7330
1a981360
PA
73312010-08-28 Pedro Alves <pedro@codesourcery.com>
7332
7333 * linux-low.c (__SIGRTMIN): Define if not already defined.
7334 (linux_create_inferior): Check for __ANDROID__ rather than
7335 __SIGRTMIN.
7336 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7337 are already deferred.
7338 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7339 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7340 stopped and already has a pending signal to report.
7341 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7342 a pending signal to report or is moving out of a jump pad.
7343 (linux_init_signals): Check for __ANDROID__ rather than
7344 __SIGRTMIN.
7345
b4d51a55
PA
73462010-08-28 Pedro Alves <pedro@codesourcery.com>
7347
7348 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7349 debug_threads check. Avoid a linear search when not doing debug
7350 output.
7351
ec48365d
PA
73522010-08-27 Pedro Alves <pedro@codesourcery.com>
7353
7354 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7355 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7356 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7357 (process_event): Change local fd's type to gdb_fildes_t.
7358 (create_file_handler): Adjust prototype.
7359 (delete_file_handler): Adjust prototype.
7360 (handle_file_event): Adjust prototype. Use pfildes.
7361 (create_file_event): Adjsut prototype.
7362 * remote-utils.c (remote_desc, listen_desc): Change type to
7363 gdb_fildes_t.
7364 * server.h: New gdb_fildes_t typedef.
7365 [USE_WIN32API]: Include winsock2.h.
7366 (delete_file_handler, add_file_handler): Adjust prototypes.
7367 (pfildes): Declare.
7368 * utils.c (pfildes): New.
7369
854d88f0
PA
73702010-08-27 Pedro Alves <pedro@codesourcery.com>
7371
7372 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7373 * configure: Regenerate.
7374
0146f85b
PA
73752010-08-27 Pedro Alves <pedro@codesourcery.com>
7376
7377 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7378 (linux_done_accessing_memory): ... this.
7379 (linux_target_ops): Adjust.
7380 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7381 * nto-low.c (nto_target_ops): Adjust comment.
7382 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7383 * spu-low.c (spu_target_ops): Adjust comment.
7384 * target.h (target_ops): Rename unprepare_to_access_memory field
7385 to done_accessing_memory.
7386 (unprepare_to_access_memory): Rename to ...
7387 (done_accessing_memory): ... this.
7388
90d74c30
PA
73892010-08-26 Pedro Alves <pedro@codesourcery.com>
7390
7391 * linux-low.c (linux_prepare_to_access_memory): New.
7392 (linux_unprepare_to_access_memory): New.
7393 (linux_target_ops): Install them.
7394 * server.c (read_memory): Rename to ...
7395 (gdb_read_memory): ... this. Use
7396 prepare_to_access_memory/prepare_to_access_memory.
7397 (write_memory): Rename to ...
7398 (gdb_write_memory): ... this. Use
7399 prepare_to_access_memory/prepare_to_access_memory.
7400 (handle_search_memory_1): Adjust.
7401 (process_serial_event): Adjust.
7402 * target.h (struct target_ops): New fields
7403 prepare_to_access_memory and unprepare_to_access_memory.
7404 (prepare_to_access_memory, unprepare_to_access_memory): New.
7405 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7406 prepare_to_access_memory/prepare_to_access_memory.
7407 * nto-low.c (nto_target_ops): Adjust.
7408 * spu-low.c (spu_target_ops): Adjust.
7409 * win32-low.c (win32_target_ops): Adjust.
7410
fd467969
PA
74112010-08-26 Pedro Alves <pedro@codesourcery.com>
7412
7413 * Makefile.in (WARN_CFLAGS): Get it from configure.
7414 (WERROR_CFLAGS): New.
7415 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7416 * configure.ac: Introduce --enable-werror, which adds -Werror to
7417 the compiler command line. Enabled by default. Disable with
7418 --disable-werror. Add -Wdeclaration-after-statement
7419 Wpointer-arith and -Wformat-nonliteral to warning flags.
7420 * configure: Regenerate.
7421
331e2f5f
PA
74222010-08-26 Pedro Alves <pedro@codesourcery.com>
7423
7424 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7425
e581f2b4
PA
74262010-08-26 Pedro Alves <pedro@codesourcery.com>
7427
7428 * gdbreplay.c (remote_error): New.
7429 (gdbchar): New.
7430 (expect): Use gdbchar. Check for error reading from GDB.
7431 Clarify sync error output.
7432 (play): Check for errors writing to GDB.
7433 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7434 * remote-utils.c (getpkt): Check for errors writing to the remote
7435 descriptor.
7436
3c11dd79
PA
74372010-08-25 Pedro Alves <pedro@codesourcery.com>
7438
7439 * linux-low.c (linux_wait_1): Move non-debugging code out of
7440 `debug_threads' control.
7441
d20a8ad9
PA
74422010-08-25 Pedro Alves <pedro@codesourcery.com>
7443
7444 * linux-low.c (linux_wait_1): Don't set last_status here.
7445 * server.c (push_event, queue_stop_reply_callback): Assert we're
7446 not pushing a TARGET_WAITKIND_IGNORE event.
7447 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7448 (myresume, handle_target_event): Set the thread's last_resume_kind
7449 and last_status from the target returned status.
7450
964e4306
PA
74512010-08-25 Pedro Alves <pedro@codesourcery.com>
7452
7453 PR threads/10729
7454
7455 * linux-x86-low.c (update_debug_registers_callback): New.
7456 (i386_dr_low_set_addr): Use it.
7457 (i386_dr_low_get_addr): New.
7458 (i386_dr_low_set_control): Use update_debug_registers_callback.
7459 (i386_dr_low_get_control): New.
7460 (i386_dr_low_get_status): Adjust.
7461 * linux-low.c (linux_stop_lwp): New.
7462 * linux-low.h (linux_stop_lwp): Declare.
7463
7464 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7465 argument instead of a i386_debug_reg_state.
7466 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7467 a i386_debug_reg_state.
7468 (i386_insert_aligned_watchpoint): Adjust.
7469 (i386_remove_aligned_watchpoint): Adjust.
7470 (i386_low_stopped_data_address): Read the debug registers from the
7471 inferior instead of from the mirrors.
7472 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7473 (i386_dr_low_get_addr): Declare.
7474 (i386_dr_low_get_control): Declare.
7475 (i386_dr_low_get_status): Change prototype.
7476
7477 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7478 (i386_dr_low_get_addr): New.
7479 (i386_dr_low_get_control): New.
7480 (i386_dr_low_get_status): Adjust prototype. Return
7481 dr_status_mirror.
7482 (i386_initial_stuff): Clear dr_status_mirror and
7483 dr_control_mirror.
7484 (i386_get_thread_context): Adjust.
7485 (i386_set_thread_context): Adjust.
7486 (i386_thread_added): Adjust.
7487
5f21a75b
PA
74882010-08-24 Pedro Alves <pedro@codesourcery.com>
7489
7490 * linux-low.h (linux_thread_area): Delete declaration.
7491
3e4c1235
TS
74922010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7493
7494 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7495 after its termination.
7496
1971b033
PA
74972010-08-09 Pedro Alves <pedro@codesourcery.com>
7498
7499 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7500 (gdb_wants_all_stopped): Delete.
7501 (linux_wait_1): Don't call them.
7502 * server.c (handle_v_cont): Tag all threads as want-stopped.
7503 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7504 stopped as "client-wants-stopped".
7505
310444ac
PA
75062010-07-31 Pedro Alves <pedro@codesourcery.com>
7507
7508 * Makefile.in (signals_h): New.
7509 (server_h): Depend on it.
7510 (server.o): Don't depend on $(signals_def).
7511 (signals.o): Depend on $(signals_def).
7512
a19cae16
JK
75132010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7514
7515 * Makefile.in (signals_def): New.
7516 (server_h): Append include/gdb/signals.h and signals_def.
7517 (server.o): Append signals_def.
7518
30d50328
JK
75192010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7520
7521 * server.c (handle_target_event): Use target_signal_to_host for
7522 resume_info.sig initialization.
7523 * target.h (struct thread_resume) <sig>: New comment.
7524
5c3216e2
OS
75252010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7526
c6f46ca0
OS
7527 * server.c (handle_query): strcpy() the returned string from paddress()
7528 instead of sprintf().
5c3216e2
OS
7529 * utils.c (paddress): Return phex_nz().
7530
6bd31874
JB
75312010-07-07 Joel Brobecker <brobecker@adacore.com>
7532
7533 * server.c (handle_v_cont): Call mourn_inferior if process
7534 just exited.
7535 (myresume): Likewise.
7536
0fb4aa4b
PA
75372010-07-01 Pedro Alves <pedro@codesourcery.com>
7538
7539 Static tracepoints, and integration with UST.
7540
7541 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7542 * mem-break.c (uninsert_all_breakpoints)
7543 (reinsert_all_breakpoints): New.
7544 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7545 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7546 (gdb_agent_ust_loaded, helper_thread_id)
7547 (gdb_agent_helper_thread_id): New macros.
7548 (struct ipa_sym_addresses): Add addr_ust_loaded,
7549 addr_helper_thread_id, addr_cmd_buf.
7550 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7551 (in_process_agent_loaded_ust): New.
7552 (write_e_ust_not_loaded): New.
7553 (maybe_write_ipa_ust_not_loaded): New.
7554 (struct collect_static_trace_data_action): New.
7555 (enum tracepoint_type) <static_tracepoint>: New.
7556 (struct tracepoint) <handle>: Mention static tracepoints.
7557 (struct static_tracepoint_ctx): New.
7558 (CMD_BUF_SIZE): New.
7559 (add_tracepoint_action): Handle static tracepoint actions.
7560 (unprobe_marker_at): New.
7561 (clear_installed_tracepoints): Handle static tracepoints.
7562 (cmd_qtdp): Handle static tracepoints.
7563 (probe_marker_at): New.
7564 (cmd_qtstart): Handle static tracepoints.
7565 (response_tracepoint): Handle static tracepoints.
7566 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7567 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7568 (get_context_regcache): Handle static tracepoints.
7569 (do_action_at_tracepoint): Handle static tracepoint actions.
7570 (traceframe_find_block_type): Handle static trace data blocks.
7571 (traceframe_read_sdata): New.
7572 (download_tracepoints): Download static tracepoint actions.
7573 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7574 (GDB_PROBE_NAME): New.
7575 (ust_ops): New.
7576 (GET_UST_SYM): New.
7577 (USTF): New.
7578 (dlsym_ust): New.
7579 (ust_marker_to_static_tracepoint): New.
7580 (gdb_probe): New.
7581 (collect_ust_data_at_tracepoint): New.
7582 (gdb_ust_probe): New.
7583 (UNIX_PATH_MAX, SOCK_DIR): New.
7584 (gdb_ust_connect_sync_socket): New.
7585 (resume_thread, stop_thread): New.
7586 (run_inferior_command): New.
7587 (init_named_socket): New.
7588 (gdb_ust_socket_init): New.
7589 (cstr_to_hexstr): New.
7590 (next_st): New.
7591 (first_marker, next_marker): New.
7592 (response_ust_marker): New.
7593 (cmd_qtfstm, cmd_qtsstm): New.
7594 (unprobe_marker_at, probe_marker_at): New.
7595 (cmd_qtstmat, gdb_ust_thread): New.
7596 (gdb_ust_init): New.
7597 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7598 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7599 (ST_REGENTRY): New.
7600 (x86_64_st_collect_regmap): New.
7601 (X86_64_NUM_ST_COLLECT_GREGS): New.
7602 (AMD64_RIP_REGNUM): New.
7603 (supply_static_tracepoint_registers): New.
7604 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7605 (ST_REGENTRY): New.
7606 (i386_st_collect_regmap): New.
7607 (i386_NUM_ST_COLLECT_GREGS): New.
7608 (supply_static_tracepoint_registers): New.
7609 * server.c (handle_query): Handle qXfer:statictrace:read.
7610 <qSupported>: Report support for StaticTracepoints, and
7611 qXfer:statictrace:read features.
7612 * server.h (traceframe_read_sdata)
7613 (supply_static_tracepoint_registers): Declare.
7614 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7615 (unpack_varlen_hex): Include in IPA build.
7616 * Makefile.in (ustlibs, ustinc): New.
7617 (IPA_OBJS): Add remote-utils-ipa.o.
7618 ($(IPA_LIB)): Link -ldl and -lpthread.
7619 (UST_CFLAGS): New.
7620 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7621 * config.in, configure: Regenerate.
7622
9e4344e5
PA
76232010-06-20 Ian Lance Taylor <iant@google.com>
7624 Pedro Alves <pedro@codesourcery.com>
7625
7626 * linux-x86-low.c (always_true): Delete.
7627 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7628 trying to fool the compiler with always_true.
7629
c6beb2cb
PA
76302010-06-20 Pedro Alves <pedro@codesourcery.com>
7631
7632 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7633 conditions in gdbserver.
7634
d2ed6730
UW
76352010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7636
7637 * spu-low.c (spu_read_memory): Wrap around local store limit.
7638 (spu_write_memory): Likewise.
7639
4e29fb54
PA
76402010-06-15 Pedro Alves <pedro@codesourcery.com>
7641
7642 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7643 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7644 LONGEST uses.
7645 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7646 uses.
7647 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7648 uses with LONGEST uses.
7649
6a271cae
PA
76502010-06-14 Stan Shebs <stan@codesourcery.com>
7651 Pedro Alves <pedro@codesourcery.com>
7652
7653 Bytecode compiler.
7654
7655 * linux-x86-low.c: Include limits.h.
7656 (add_insns): New.
7657 (always_true): New.
7658 (EMIT_ASM): New.
7659 (EMIT_ASM32): New.
7660 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7661 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7662 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7663 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7664 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7665 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7666 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7667 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7668 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7669 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7670 (amd64_emit_void_call_2): New.
7671 (amd64_emit_ops): New.
7672 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7673 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7674 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7675 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7676 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7677 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7678 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7679 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7680 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7681 (i386_emit_stack_adjust, i386_emit_int_call_1)
7682 (i386_emit_void_call_2): New.
7683 (i386_emit_ops): New.
7684 (x86_emit_ops): New.
7685 (the_low_target): Install x86_emit_ops.
7686 * server.h (struct emit_ops): New.
7687 (get_raw_reg_func_addr): Declare.
7688 (current_insn_ptr, emit_error): Declare.
7689 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7690 (set_trace_state_variable_value): New defines.
7691 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7692 addr_get_trace_state_variable_value and
7693 addr_set_trace_state_variable_value.
7694 (symbol_list): New fields for get_raw_reg,
7695 get_trace_state_variable_value and set_trace_state_variable_value.
7696 (condfn): New typedef.
7697 (struct tracepoint): New field `compiled_cond'.
7698 (do_action_at_tracepoint): Clear compiled_cond.
7699 (get_trace_state_variable_value, set_trace_state_variable_value):
7700 Export in the IPA.
7701 (condition_true_at_tracepoint): If there's a compiled condition,
7702 run that.
7703 (current_insn_ptr, emit_error): New globals.
7704 (struct bytecode_address): New.
7705 (get_raw_reg_func_addr): New.
7706 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7707 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7708 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7709 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7710 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7711 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7712 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7713 (compile_tracepoint_condition, compile_bytecodes): New.
7714 * target.h (emit_ops): Forward declare.
7715 (struct target_ops): New field emit_ops.
7716 (target_emit_ops): New.
7717 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7718 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7719 * linux-low.c (linux_emit_ops): New.
7720 (linux_target_ops): Install it.
7721 * linux-low.h (struct linux_target_ops): New field emit_ops.
7722
92b72907
UW
77232010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7724
7725 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7726 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7727
fa593d66
PA
77282010-06-01 Pedro Alves <pedro@codesourcery.com>
7729 Stan Shebs <stan@codesourcery.com>
7730
7731 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7732 (all): Depend on $(extra_libraries).
7733 (install-only): Install the IPA.
7734 (IPA_OBJS, IPA_LIB): New.
7735 (clean): Remove the IPA lib.
7736 (IPAGENT_CFLAGS): New.
7737 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7738 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7739 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7740 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7741 * configure.ac: Check for atomic builtins support in the compiler.
7742 (IPA_DEPFILES, extra_libraries): Define.
7743 * configure.srv (ipa_obj): Add description.
7744 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7745 (i[34567]86-*-linux*): Set ipa_obj.
7746 (x86_64-*-linux*): Set ipa_obj.
7747 * linux-low.c (stabilizing_threads): New.
7748 (supports_fast_tracepoints): New.
7749 (linux_detach): Stabilize threads before detaching.
7750 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7751 the lwp is either not stabilizing, or is moving out of a jump pad.
7752 (linux_fast_tracepoint_collecting): New.
7753 (maybe_move_out_of_jump_pad): New.
7754 (enqueue_one_deferred_signal): New.
7755 (dequeue_one_deferred_signal): New.
7756 (linux_wait_for_event_1): If moving out of a jump pad, defer
7757 pending signals to later.
7758 (linux_stabilize_threads): New.
7759 (linux_wait_1): Check if threads need moving out of jump pads, and
7760 do it if so.
7761 (stuck_in_jump_pad_callback): New.
7762 (move_out_of_jump_pad_callback): New.
7763 (lwp_running): New.
7764 (linux_resume_one_lwp): Handle moving out of jump pads.
7765 (linux_set_resume_request): Dequeue deferred signals.
7766 (need_step_over_p): Also step over fast tracepoint jumps.
7767 (start_step_over): Also uninsert fast tracepoint jumps.
7768 (finish_step_over): Also reinsert fast tracepoint jumps.
7769 (linux_install_fast_tracepoint_jump): New.
7770 (linux_target_ops): Install linux_stabilize_threads and
7771 linux_install_fast_tracepoint_jump_pad.
7772 * linux-low.h (linux_target_ops) <get_thread_area,
7773 install_fast_tracepoint_jump_pad>: New fields.
7774 (struct lwp_info) <collecting_fast_tracepoint,
7775 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7776 (linux_get_thread_area): Declare.
7777 * linux-x86-low.c (jump_insn): New.
7778 (x86_get_thread_area): New.
7779 (append_insns): New.
7780 (push_opcode): New.
7781 (amd64_install_fast_tracepoint_jump_pad): New.
7782 (i386_install_fast_tracepoint_jump_pad): New.
7783 (x86_install_fast_tracepoint_jump_pad): New.
7784 (the_low_target): Install x86_get_thread_area and
7785 x86_install_fast_tracepoint_jump_pad.
7786 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7787 (struct fast_tracepoint_jump): New.
7788 (fast_tracepoint_jump_insn): New.
7789 (fast_tracepoint_jump_shadow): New.
7790 (find_fast_tracepoint_jump_at): New.
7791 (fast_tracepoint_jump_here): New.
7792 (delete_fast_tracepoint_jump): New.
7793 (set_fast_tracepoint_jump): New.
7794 (uninsert_fast_tracepoint_jumps_at): New.
7795 (reinsert_fast_tracepoint_jumps_at): New.
7796 (set_breakpoint_at): Use write_inferior_memory.
7797 (uninsert_raw_breakpoint): Use write_inferior_memory.
7798 (check_mem_read): Mask out fast tracepoint jumps.
7799 (check_mem_write): Mask out fast tracepoint jumps.
7800 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7801 (set_fast_tracepoint_jump): Declare.
7802 (delete_fast_tracepoint_jump)
7803 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7804 (reinsert_fast_tracepoint_jumps_at): Declare.
7805 * regcache.c: Don't compile many functions when building the
7806 in-process agent library.
7807 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7808 the register buffer in the heap.
7809 (free_register_cache): If the register buffer isn't owned by the
7810 regcache, don't free it.
7811 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7812 pre-existing register caches.
7813 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7814 type.
7815 (convert_ascii_to_int): : Constify `from' parameter type.
7816 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7817 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7818 the needed buffer in-place.
7819 (relocate_instruction): New.
7820 * server.c (handle_query) <qSymbols>: If the target supports
7821 tracepoints, give it a chance of looking up symbols. Report
7822 support for fast tracepoints.
7823 (handle_status): Stabilize threads.
7824 (process_serial_event): Adjust.
7825 * server.h (struct fast_tracepoint_jump): Forward declare.
7826 (struct process_info) <fast_tracepoint_jumps>: New field.
7827 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7828 (decode_X_packet, decode_M_packet): Adjust.
7829 (relocate_instruction): Declare.
7830 (in_process_agent_loaded): Declare.
7831 (tracepoint_look_up_symbols): Declare.
7832 (struct fast_tpoint_collect_status): Declare.
7833 (fast_tracepoint_collecting): Declare.
7834 (force_unlock_trace_buffer): Declare.
7835 (handle_tracepoint_bkpts): Declare.
7836 (initialize_low_tracepoint)
7837 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7838 * target.h (struct target_ops) <stabilize_threads,
7839 install_fast_tracepoint_jump_pad>: New fields.
7840 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7841 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7842 [HAVE_STDINT_H]: Include stdint.h.
7843 (trace_debug_1): Rename to ...
7844 (trace_vdebug): ... this.
7845 (trace_debug): Rename to ...
7846 (trace_debug_1): ... this. Add `level' parameter.
7847 (trace_debug): New.
7848 (ATTR_USED, ATTR_NOINLINE): New.
7849 (IP_AGENT_EXPORT): New.
7850 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7851 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7852 (about_to_request_buffer_space, trace_buffer_is_full)
7853 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7854 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7855 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7856 (traceframe_write_count, traceframes_created)
7857 (trace_state_variables)
7858 New renaming defines.
7859 (struct ipa_sym_addresses): New.
7860 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7861 (symbol_list): New.
7862 (ipa_sym_addrs): New.
7863 (all_tracepoint_symbols_looked_up): New.
7864 (in_process_agent_loaded): New.
7865 (write_e_ipa_not_loaded): New.
7866 (maybe_write_ipa_not_loaded): New.
7867 (tracepoint_look_up_symbols): New.
7868 (debug_threads) [IN_PROCESS_AGENT]: New.
7869 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7870 (UNKNOWN_SIDE_EFFECTS): New.
7871 (stop_tracing): New.
7872 (flush_trace_buffer): New.
7873 (stop_tracing_bkpt): New.
7874 (flush_trace_buffer_bkpt): New.
7875 (read_inferior_integer): New.
7876 (read_inferior_uinteger): New.
7877 (read_inferior_data_pointer): New.
7878 (write_inferior_data_pointer): New.
7879 (write_inferior_integer): New.
7880 (write_inferior_uinteger): New.
7881 (struct collect_static_trace_data_action): Delete.
7882 (enum tracepoint_type): New.
7883 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
7884 <actions_str, step_actions, step_actions_str>: Only include in
7885 GDBserver.
fa593d66
PA
7886 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7887 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7888 (tracepoints): Use IP_AGENT_EXPORT.
7889 (last_tracepoint): Don't include in the IPA.
7890 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7891 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7892 (alloced_trace_state_variables): New.
7893 (trace_state_variables): Use IP_AGENT_EXPORT.
7894 (traceframe_t): Delete unused variable.
7895 (circular_trace_buffer): Don't include in the IPA.
7896 (trace_buffer_start): Delete.
7897 (struct trace_buffer_control): New.
7898 (trace_buffer_free): Delete.
7899 (struct ipa_trace_buffer_control): New.
7900 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7901 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7902 New.
7903 (trace_buffer_ctrl): New.
7904 (TRACE_BUFFER_CTRL_CURR): New.
7905 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7906 Reimplement as macros.
7907 (trace_buffer_wrap): Delete.
7908 (traceframe_write_count, traceframe_read_count)
7909 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7910 (struct tracepoint_hit_ctx) <type>: New field.
7911 (struct fast_tracepoint_ctx): New.
7912 (memory_barrier): New.
7913 (cmpxchg): New.
7914 (record_tracepoint_error): Update atomically in the IPA.
7915 (clear_inferior_trace_buffer): New.
7916 (about_to_request_buffer_space): New.
7917 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7918 updating the same buffer.
7919 (add_tracepoint): Default the tracepoint's type to trap
7920 tracepoint, and orig_size to -1.
7921 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7922 internal variables.
7923 (create_trace_state_variable): New parameter `gdb'. Handle it.
7924 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7925 (cmd_qtdp): Handle fast tracepoints.
7926 (cmd_qtdv): Adjust.
7927 (max_jump_pad_size): New.
7928 (gdb_jump_pad_head): New.
7929 (get_jump_space_head): New.
7930 (claim_jump_space): New.
7931 (sort_tracepoints): New.
7932 (MAX_JUMP_SIZE): New.
7933 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7934 IPA.
7935 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7936 support. Upload fast traceframes, and delete internal IPA
7937 breakpoints.
7938 (stop_tracing_handler): New.
7939 (flush_trace_buffer_handler): New.
7940 (cmd_qtstop): Upload fast tracepoints.
7941 (response_tracepoint): Handle fast tracepoints.
7942 (tracepoint_finished_step): Upload fast traceframes. Set the
7943 tracepoint hit context's tracepoint type.
7944 (handle_tracepoint_bkpts): New.
7945 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7946 type. Add comment about fast tracepoints.
7947 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7948 non-existing action_str field.
7949 (get_context_regcache): Handle fast tracepoints.
7950 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7951 to the regcache.
7952 (fast_tracepoint_from_jump_pad_address): New.
7953 (fast_tracepoint_from_ipa_tpoint_address): New.
7954 (collecting_t): New.
7955 (force_unlock_trace_buffer): New.
7956 (fast_tracepoint_collecting): New.
7957 (collecting): New.
7958 (gdb_collect): New.
7959 (write_inferior_data_ptr): New.
7960 (target_tp_heap): New.
7961 (target_malloc): New.
7962 (download_agent_expr): New.
7963 (UALIGN): New.
7964 (download_tracepoints): New.
7965 (download_trace_state_variables): New.
7966 (upload_fast_traceframes): New.
7967 (IPA_FIRST_TRACEFRAME): New.
7968 (IPA_NEXT_TRACEFRAME_1): New.
7969 (IPA_NEXT_TRACEFRAME): New.
7970 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7971 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7972 (gdb_jump_pad_buffer_end): New.
7973 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7974 (initialize_tracepoint): Adjust.
7975 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7976 buffer. Initialize the low module.
7977 * utils.c (PREFIX, TOOLNAME): New.
7978 (malloc_failure): Use PREFIX.
7979 (error): In the IPA, an error causes an exit.
7980 (fatal, warning): Use PREFIX.
7981 (internal_error): Use TOOLNAME.
7982 (NUMCELLS): Increase to 10.
7983 * configure, config.in: Regenerate.
7984
d149dd1d
PA
79852010-06-01 Pedro Alves <pedro@codesourcery.com>
7986
7987 * server.c (handle_query) <qSupported>: Do two passes over the
7988 qSupported string to avoid nesting strtok.
7989
f6528abd
JK
79902010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7991
7992 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7993 (CDEPS): New.
7994 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7995 -Wl,--dynamic-list.
7996 * configure: Regenerate.
7997 * proc-service.list: New.
7998
ca2a87a0
JK
79992010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8000
8001 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8002 New comment.
8003
363a6e9f
OS
80042010-05-26 Ozkan Sezer <sezeroz@gmail.com>
8005
8006 * gdbreplay.c (remote_open): Check error return from socket() call by
8007 its equality to -1 not by it being negative.
8008 * remote-utils.c (remote_open): Likewise.
8009
d23b6cb1
PA
80102010-05-23 Pedro Alves <pedro@codesourcery.com>
8011
8012 * config.h: Regenerate.
8013
28d3cf85
MK
80142010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8015
8016 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8017 doesn't provide PTRACE_GET_THREAD_AREA.
8018
fea36a59
MK
80192010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8020
8021 * linux-m68k-low.c: Include <asm/ptrace.h>
8022 (ps_get_thread_area): Implement.
8023
24b066ba
DE
80242010-05-03 Doug Evans <dje@google.com>
8025
8026 * event-loop.c (struct callback_event): New struct.
8027 (callback_list): New global.
8028 (append_callback_event, delete_callback_event): New functions.
8029 (process_callback): New function.
8030 (start_event_loop): Call it.
8031 * remote-utils.c (NOT_SCHEDULED): Define.
8032 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8033 moved out of readchar.
8034 (readchar): Rewrite. Call reschedule before returning.
8035 (reset_readchar): New function.
8036 (remote_close): Call it.
8037 (process_remaining, reschedule): New functions.
8038 * server.h (callback_handler_func): New typedef.
8039 (append_callback_event, delete_callback_event): Declare.
8040
9836d6ea
PA
80412010-05-03 Pedro Alves <pedro@codesourcery.com>
8042
8043 * proc-service.c (ps_pglobal_lookup): Use
8044 thread_db_look_up_one_symbol.
8045 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8046 parameter. Use it instead of all_symbols_looked_up.
8047 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8048 field.
8049 (all_symbols_looked_up): Don't declare.
8050 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8051 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8052 field.
8053 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8054 Set all_symbols_looked_up here.
8055 (thread_db_look_up_one_symbol): New.
8056 (thread_db_get_tls_address): Adjust.
8057 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8058 thread_db object on the heap, and tentatively set it in the
8059 process structure.
8060 (thread_db_init): Don't set all_symbols_looked_up here.
8061 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8062
7984d532
PA
80632010-05-03 Pedro Alves <pedro@codesourcery.com>
8064
8065 * linux-low.c (linux_kill, linux_detach): Adjust.
8066 (status_pending_p_callback): Remove redundant statement. Check
8067 for !TARGET_WAITIKIND_IGNORE, instead of
8068 TARGET_WAITKIND_STOPPED.
8069 (handle_tracepoints): Make sure LWP is locked. Adjust.
8070 (linux_wait_for_event_1): Adjust.
8071 (linux_cancel_breakpoints): New.
8072 (unsuspend_one_lwp): New.
8073 (unsuspend_all_lwps): New.
8074 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8075 (send_sigstop_callback): Change return type to int, add new
8076 `except' parameter and handle it.
8077 (suspend_and_send_sigstop_callback): New.
8078 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8079 pass them down. If SUSPEND, also increment the lwp's suspend
8080 count.
8081 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8082 (need_step_over_p): Don't consider suspended LWPs.
8083 (start_step_over): Adjust.
8084 (proceed_one_lwp): Change return type to int, add new `except'
8085 parameter and handle it.
8086 (unsuspend_and_proceed_one_lwp): New.
8087 (proceed_all_lwps): Use find_inferior instead of
8088 for_each_inferior.
8089 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8090 also decrement the suspend count of LWPs. Pass `except' down,
8091 instead of hacking its suspend count.
8092 (linux_pause_all): Add `freeze' parameter. Adjust.
8093 (linux_unpause_all): New.
8094 (linux_target_ops): Install linux_unpause_all.
8095 * server.c (handle_status): Adjust.
8096 * target.h (struct target_ops): New fields `unpause_all' and
8097 `cancel_breakpoints'. Add new parameter to `pause_all'.
8098 (pause_all): Add new `freeze' parameter.
8099 (unpause_all): New.
8100 (cancel_breakpoints): New.
8101 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8102 cancel breakpoints.
8103 (cmd_qtstart): Pause threads.
8104 (stop_tracing): Pause threads, and cancel breakpoints.
8105 * win32-low.c (win32_target_ops): Adjust.
8106
e471f25b
PA
81072010-05-03 Pedro Alves <pedro@codesourcery.com>
8108
8109 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8110 the inferior right away from here...
8111 (linux_wait_1): ... to here, and adjust to check the thread's
8112 last_resume_kind instead of the lwp's step or stop_expected flags.
8113
1915ef4f
PA
81142010-05-02 Pedro Alves <pedro@codesourcery.com>
8115
8116 * README: Use consistent `GDB' and `GDBserver' spellings.
8117
f9e39928
PA
81182010-05-02 Pedro Alves <pedro@codesourcery.com>
8119
8120 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8121 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8122 (linux_detach_one_lwp): Assume the lwp is stopped.
8123 (any_thread_of): Delete.
8124 (linux_detach): Stop all lwps here. Don't blindly delete all
8125 breakpoints.
8126 (delete_lwp_callback): New.
8127 (linux_mourn): Delete all lwps of the process that is gone.
8128 (linux_wait_1): Don't delete the last lwp of the process here.
8129 * mem-break.h (mark_breakpoints_out): Declare.
8130 * mem-break.c (mark_breakpoints_out): New.
8131 (free_all_breakpoints): Use it.
8132 * server.c (handle_target_event): If the process is gone, mark
8133 breakpoints out.
8134 * thread-db.c (struct thread_db) <create_bp>: New field.
8135 (thread_db_enable_reporting): Fix prototype. Store a thread event
8136 breakpoint reference in the thread_db struct.
8137 (thread_db_load_search): Clear the thread_db object.
8138 (try_thread_db_load_1): Ditto.
8139 (switch_to_process): New.
8140 (disable_thread_event_reporting): Use it.
8141 (remove_thread_event_breakpoints): New.
8142 (thread_db_detach, thread_db_mourn): Use it.
8143
1e7fc18c
PA
81442010-05-01 Pedro Alves <pedro@codesourcery.com>
8145
8146 * linux-low.c (linux_enable_event_reporting): New.
8147 (linux_wait_for_event_1, handle_extended_wait): Use it.
8148
02fc4de7
PA
81492010-04-30 Pedro Alves <pedro@codesourcery.com>
8150
8151 * linux-low.c (linux_kill_one_lwp, linux_kill)
8152 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8153 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8154 SIGSTOP even if the LWP is stopped.
8155 (send_sigstop_callback): New.
8156 (stop_all_lwps): Use send_sigstop_callback instead.
8157 (linux_resume_one_thread): Adjust.
8158 (proceed_one_lwp): Still proceed an LWP that the client has
8159 requested to stop, if we haven't reported it as stopped yet. Make
8160 sure that LWPs the client want stopped, have a pending SIGSTOP.
8161
bc3b5632
DE
81622010-04-26 Doug Evans <dje@google.com>
8163
ae1ada35
DE
8164 * server.c (handle_general_set): Make static.
8165
bc3b5632
DE
8166 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8167 Print received char after testing for error/eof instead of before.
8168 (input_interrupt): Tweak comment.
8169
65730243
DE
81702010-04-23 Doug Evans <dje@google.com>
8171
8172 * server.c (start_inferior): Print inferior argv if --debug.
8173
a8ae7dc0
AR
81742010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8175
8176 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8177 * nto-x86-low.c: Include server.h
8178
1c07cc19
PM
81792010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8180
8181 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8182 be consistent with other sources of this directory.
8183 (init_registers_amd64): Correct name of source file of this function
8184 in the comment.
8185
e0a61e09
PM
81862010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8187
8188 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8189 64-bit executables.
8190
54709339
PM
81912010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8192
8193 * win32-i386-low.c: Add 64-bit support.
8194 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8195 (init_registers_amd64): Declare.
8196 (mappings): Add 64-bit version of array.
8197 (init_windows_x86): New function.
8198 (the_low_target): Change init_arch field to init_windows_x86.
8199
e8f0053d
PM
82002010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8201
8202 * win32-low.c: Adapt to support also 64-bit architecture.
8203 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8204 (get_image_name): Use SIZE_T type for local variable `done'.
8205 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8206 (toolhelp_get_dll_name): Idem.
8207 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8208 Use uintptr_t typecast to avoid warning.
8209 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8210 (handle_exception): Use phex_nz to avoid warning.
8211 (win32_wait): Remove unused local variable `process'.
8212
c481e77e
PM
82132010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8214
8215 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8216 `amd64-avx.o'.
8217
12ea4b69
PM
82182010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8219
8220 * configure.ac: Use `ws2_32' library for srv_mingw.
8221 * configure: Regenerate.
8222 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8223 * remote-utils.c: Likewise.
8224
f6d1620c
L
82252010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8226
8227 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8228 if __x86_64__ is defined.
8229
8e642873
PM
82302010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8231
8232 * configure: Regenerate.
8233
711e434b
PM
82342010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8235
8236 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8237 * target.h (target_ops): New get_tib_address field.
8238 * win32-low.h (win32_thread_info): Add thread_local_base field.
8239 * win32-low.c (child_add_thread): Add tlb argument.
8240 Set thread_local_base field to TLB.
8241 (get_child_debug_event): Adapt to child_add_thread change.
8242 (win32_get_tib_address): New function.
8243 (win32_target_ops): Set get_tib_address field to
8244 win32_get_tib_address.
8245 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8246
505106cd
PA
82472010-04-12 Pedro Alves <pedro@codesourcery.com>
8248
505106cd
PA
8249 * linux-low.c (linux_mourn): Also remove the process.
8250 * server.c (handle_target_event): Don't remove the process here.
8251 * nto-low.c (nto_mourn): New.
8252 (nto_target_ops): Install it.
8253 * spu-low.c (spu_mourn): New.
8254 (spu_target_ops): Install it.
8255 * win32-low.c (win32_mourn): New.
8256 (win32_target_ops): Install it.
8257
e8470a06
PA
82582010-04-12 Pedro Alves <pedro@codesourcery.com>
8259
8260 * server.h (buffer_xml_printf): Remove redundant `;'.
8261
45ba0d02
PA
82622010-04-12 Pedro Alves <pedro@codesourcery.com>
8263
8264 * regcache.c (set_register_cache): Invalidate regcaches before
8265 changing the register cache layout.
8266 (regcache_invalidate_one): Allow a NULL regcache.
8267 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8268 regcaches before changing the register cache layout or the target
8269 regsets.
8270
59e04013
L
82712010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8272
8273 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8274 variable warning on Linux/x86-64.
8275
8336d594
PA
82762010-04-11 Pedro Alves <pedro@codesourcery.com>
8277
8278 GDBserver disconnected tracing support.
8279
8280 * linux-low.c (linux_remove_process): Delete.
8281 (add_lwp): Don't set last_resume_kind here.
8282 (linux_kill): Use `mourn'.
8283 (linux_detach): Use `thread_db_detach', and `mourn'.
8284 (linux_mourn): New.
8285 (linux_attach_lwp_1): Adjust comment.
8286 (linux_attach): last_resume_kind moved the thread_info; adjust.
8287 (status_pending_p_callback): Adjust.
8288 (linux_wait_for_event_1): Adjust.
8289 (count_events_callback, select_singlestep_lwp_callback)
8290 (select_event_lwp_callback, cancel_breakpoints_callback)
8291 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8292 (proceed_one_lwp): Adjust.
8293 (linux_async): Add debug output.
8294 (linux_thread_stopped): New.
8295 (linux_pause_all): New.
8296 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8297 linux_pause_all.
8298 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8299 (thread_db_free): Delete declaration.
8300 (thread_db_detach, thread_db_mourn): Declare.
8301 * thread-db.c (thread_db_init): Use thread_db_mourn.
8302 (thread_db_free): Delete, split in two.
8303 (disable_thread_event_reporting): New.
8304 (thread_db_detach): New.
8305 (thread_db_mourn): New.
8306
8307 * server.h (struct thread_info) <last_resume_kind>: New field.
8308 <attached>: Add comment.
8309 <gdb_detached>: New field.
8310 (handler_func): Change return type to int.
8311 (handle_serial_event, handle_target_event): Ditto.
8312 (gdb_connected): Declare.
8313 (tracing): Delete.
8314 (disconnected_tracing): Declare.
8315 (stop_tracing): Declare.
8316
8317 * server.c (handle_query) <qSupported>: Report support for
8318 disconnected tracing.
8319 (queue_stop_reply_callback): Account for running threads.
8320 (gdb_wants_thread_stopped): New.
8321 (gdb_wants_all_threads_stopped): New.
8322 (gdb_reattached_process): New.
8323 (handle_status): Clear the `gdb_detached' flag of all processes.
8324 In all-stop, stop all threads.
8325 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8326 (process_serial_event): If the remote connection breaks, or if an
8327 exit was forced with "monitor exit", force an event loop exit.
8328 Handle disconnected tracing on detach.
8329 (handle_serial_event): Adjust.
8330 (handle_target_event): If GDB isn't connected, forward events back
8331 to the inferior, unless the last process exited, in which case,
8332 exit gdbserver. Adjust interface.
8333
8334 * remote-utils.c (remote_open): Don't block in accept. Instead
8335 register an event loop source on the listen socket file
8336 descriptor. Refactor bits into ...
8337 (listen_desc): ... this new global.
8338 (gdb_connected): ... this new function.
8339 (enable_async_notification): ... this new function.
8340 (handle_accept_event): ... this new function.
8341 (remote_close): Clear remote_desc.
8342
8343 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8344
8345 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8346 New fields.
8347 (mourn_inferior): Define.
8348 (target_process_qsupported): Avoid the dangling else problem.
8349 (thread_stopped): Define.
8350 (pause_all): Define.
8351 (target_waitstatus_to_string): Declare.
8352 * target.c (target_waitstatus_to_string): New.
8353
8354 * tracepoint.c (tracing): Make extern.
8355 (disconnected_tracing): New.
8356 (stop_tracing): Make extern. Handle tracing stops due to GDB
8357 disconnecting.
8358 (cmd_qtdisconnected): New.
8359 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8360 (handle_tracepoint_general_set): Handle QTDisconnected.
8361
8362 * event-loop.c (event_handler_func): Change return type to int.
8363 (process_event): Bail out if the event handler wants the event
8364 loop to stop.
8365 (handle_file_event): Ditto.
8366 (start_event_loop): Bail out if the event handler wants the event
8367 loop to stop.
8368
8369 * nto-low.c (nto_target_ops): Adjust.
8370 * spu-low.c (spu_wait): Don't remove the process here.
8371 (spu_target_ops): Adjust.
8372 * win32-low.c (win32_wait): Don't remove the process here.
8373 (win32_target_ops): Adjust.
8374
5d267c4c
PA
83752010-04-11 Pedro Alves <pedro@codesourcery.com>
8376
8377 * regcache.c (realloc_register_cache): Invalidate inferior's
8378 regcache before recreating it.
8379
623ccd72
PA
83802010-04-09 Pedro Alves <pedro@codesourcery.com>
8381
8382 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8383
219f2f23
PA
83842010-04-09 Stan Shebs <stan@codesourcery.com>
8385 Pedro Alves <pedro@codesourcery.com>
8386
8387 * server.h (LONGEST): New.
8388 (struct thread_info) <while_stepping>: New field.
8389 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8390 Declare.
8391 (initialize_tracepoint, handle_tracepoint_general_set)
8392 (handle_tracepoint_query, tracepoint_finished_step)
8393 (tracepoint_was_hit, release_while_stepping_state_list):
8394 (current_traceframe): Declare.
8395 * server.c (handle_general_set): Handle tracepoint packets.
8396 (read_memory): New.
8397 (write_memory): New.
8398 (handle_search_memory_1): Use read_memory.
8399 (handle_query): Report support for conditional tracepoints, trace
8400 state variables, and tracepoint sources. Handle tracepoint
8401 queries.
8402 (main): Initialize the tracepoints module.
8403 (process_serial_event): Handle traceframe reads/writes.
8404
8405 * linux-low.c (handle_tracepoints): New.
8406 (linux_wait_1): Call it.
8407 (linux_resume_one_lwp): Handle while-stepping.
8408 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8409 (linux_target_ops): Install them.
8410 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8411 New field.
8412 * linux-x86-low.c (x86_supports_tracepoints): New.
8413 (the_low_target). Install it.
8414
8415 * mem-break.h (delete_breakpoint): Declare.
8416 * mem-break.c (delete_breakpoint): Make external.
8417
8418 * target.h (struct target_ops): Add `supports_tracepoints',
8419 `read_pc', and `write_pc' fields.
8420 (target_supports_tracepoints): Define.
8421 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8422 (phex_nz): New.
8423
8424 * regcache.h (struct regcache) <registers_owned>: New field.
8425 (init_register_cache, regcache_cpy): Declare.
8426 (regcache_read_pc, regcache_write_pc): Declare.
8427 (register_cache_size): Declare.
8428 (supply_regblock): Declare.
8429 * regcache.c (init_register_cache): New.
8430 (new_register_cache): Use it.
8431 (regcache_cpy): New.
8432 (register_cache_size): New.
8433 (supply_regblock): New.
8434 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 8435
219f2f23
PA
8436 * tracepoint.c: New.
8437
8438 * Makefile.in (OBS): Add tracepoint.o.
8439 (tracepoint.o): New rule.
8440
3a13a53b
L
84412010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8442
8443 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8444 (i386-mmx.o): New.
8445 (i386-mmx.c): Likewise.
8446 (i386-mmx-linux.o): Likewise.
8447 (i386-mmx-linux.c): Likewise.
8448
8449 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8450 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8451 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8452 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8453
8454 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8455 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8456 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8457
1570b33e
L
84582010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8459
8460 * Makefile.in (clean): Updated.
8461 (i386-avx.o): New.
8462 (i386-avx.c): Likewise.
8463 (i386-avx-linux.o): Likewise.
8464 (i386-avx-linux.c): Likewise.
8465 (amd64-avx.o): Likewise.
8466 (amd64-avx.c): Likewise.
8467 (amd64-avx-linux.o): Likewise.
8468 (amd64-avx-linux.c): Likewise.
8469
8470 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8471 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8472 (srv_amd64_regobj): Add amd64-avx.o.
8473 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8474 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8475 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8476 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8477 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8478 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8479 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8480
8481 * i387-fp.c: Include "i386-xstate.h".
8482 (i387_xsave): New.
8483 (i387_cache_to_xsave): Likewise.
8484 (i387_xsave_to_cache): Likewise.
8485 (x86_xcr0): Likewise.
8486
8487 * i387-fp.h (i387_cache_to_xsave): Likewise.
8488 (i387_xsave_to_cache): Likewise.
8489 (x86_xcr0): Likewise.
8490
8491 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8492 * linux-crisv32-low.c (target_regsets): Likewise.
8493 * linux-m68k-low.c (target_regsets): Likewise.
8494 * linux-mips-low.c (target_regsets): Likewise.
8495 * linux-ppc-low.c (target_regsets): Likewise.
8496 * linux-s390-low.c (target_regsets): Likewise.
8497 * linux-sh-low.c (target_regsets): Likewise.
8498 * linux-sparc-low.c (target_regsets): Likewise.
8499 * linux-xtensa-low.c (target_regsets): Likewise.
8500
8501 * linux-low.c: Include <sys/uio.h>.
8502 (regsets_fetch_inferior_registers): Support nt_type.
8503 (regsets_store_inferior_registers): Likewise.
8504 (linux_process_qsupported): New.
8505 (linux_target_ops): Add linux_process_qsupported.
8506
8507 * linux-low.h (regset_info): Add nt_type.
8508 (linux_target_ops): Add process_qsupported.
8509
8510 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8511 and <sys/uio.h>.
8512 (init_registers_i386_avx_linux): New.
8513 (init_registers_amd64_avx_linux): Likewise.
8514 (xmltarget_i386_linux_no_xml): Likewise.
8515 (xmltarget_amd64_linux_no_xml): Likewise.
8516 (PTRACE_GETREGSET): Likewise.
8517 (PTRACE_SETREGSET): Likewise.
8518 (x86_fill_xstateregset): Likewise.
8519 (x86_store_xstateregset): Likewise.
8520 (use_xml): Likewise.
8521 (x86_linux_update_xmltarget): Likewise.
8522 (x86_linux_process_qsupported): Likewise.
8523 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8524 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8525 init_registers_i386_linux here. Call
8526 x86_linux_update_xmltarget.
8527 (the_low_target): Add x86_linux_process_qsupported.
8528
8529 * server.c (handle_query): Call target_process_qsupported.
8530
8531 * target.h (target_ops): Add process_qsupported.
8532 (target_process_qsupported): New.
8533
fc7238bb
PA
85342010-04-03 Pedro Alves <pedro@codesourcery.com>
8535
8536 * inferiors.c (add_thread): Set last_status kind to
8537 TARGET_WAITKIND_IGNORE.
8538 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8539 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8540 (linux_wait_1): Move `thread' local definition to block that uses
8541 it. Don't NULL initialize `event_child'.
8542 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8543 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8544 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8545
bdabb078
PA
85462010-04-01 Pedro Alves <pedro@codesourcery.com>
8547
8548 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8549 an extended waitstatus, or by a watchpoint.
8550 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8551 thread was stepping or has been stopped by a watchpoint.
8552
d3bbe7a0
PA
85532010-04-01 Pedro Alves <pedro@codesourcery.com>
8554
8555 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8556 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8557 of another, then delete the previous, and validate all
8558 breakpoints.
8559 (validate_inserted_breakpoint): New.
8560 (delete_disabled_breakpoints): New.
8561 (validate_breakpoints): New.
8562 (check_mem_read): Validate breakpoints before trusting their
8563 shadow. Delete disabled breakpoints.
8564 (check_mem_write): Validate breakpoints before trusting they
8565 should be inserted. Delete disabled breakpoints.
8566 * mem-break.h (validate_breakpoints):
8567 * server.c (handle_query): Validate breakpoints when we see a
8568 qSymbol query.
8569
8b07ae33
PA
85702010-04-01 Pedro Alves <pedro@codesourcery.com>
8571
8572 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8573 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8574 if we could tell there's a GDB breakpoint at stop_pc.
8575 (need_step_over_p): Don't do a step over if we find a GDB
8576 breakpoint at the resume PC.
8577
8578 * mem-break.c (struct raw_breakpoint): New.
8579 (enum bkpt_type): New type `gdb_breakpoint'.
8580 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8581 fields. New field `raw'.
8582 (find_raw_breakpoint_at): New.
8583 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8584 breakpoint instead.
8585 (set_breakpoint_at): Adjust.
8586 (delete_raw_breakpoint): New.
8587 (release_breakpoint): New.
8588 (delete_breakpoint): Rename to...
8589 (delete_breakpoint_1): ... this. Add proc parameter. Use
8590 release_breakpoint. Return ENOENT.
8591 (delete_breakpoint): Reimplement.
8592 (find_breakpoint_at): Delete.
8593 (find_gdb_breakpoint_at): New.
8594 (delete_breakpoint_at): Delete.
8595 (set_gdb_breakpoint_at): New.
8596 (delete_gdb_breakpoint_at): New.
8597 (gdb_breakpoint_here): New.
8598 (set_reinsert_breakpoint): Use release_breakpoint.
8599 (uninsert_breakpoint): Rename to ...
8600 (uninsert_raw_breakpoint): ... this.
8601 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8602 (reinsert_raw_breakpoint): Change parameter type to
8603 raw_breakpoint.
8604 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8605 instead.
8606 (check_breakpoints): Adjust. Use release_breakpoint.
8607 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8608 (breakpoint_inserted_here): Ditto.
8609 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8610 Don't trust the breakpoint's shadow if it is not inserted.
8611 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8612 (delete_all_breakpoints): Adjust.
8613 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8614 use delete_breakpoint_1.
8615
8616 * mem-break.h (breakpoints_supported): Delete declaration.
8617 (set_gdb_breakpoint_at): Declare.
8618 (gdb_breakpoint_here): Declare.
8619 (delete_breakpoint_at): Delete.
8620 (delete_gdb_breakpoint_at): Declare.
8621
8622 * server.h (struct raw_breakpoint): Forward declare.
8623 (struct process_info): New field `raw_breakpoints'.
8624
8625 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8626 breakpoints.
8627
6bf5e0ba
PA
86282010-03-24 Pedro Alves <pedro@codesourcery.com>
8629
8630 * linux-low.c (status_pending_p_callback): Fix comment.
8631 (linux_wait_for_event_1): Move most of the internal breakpoint
8632 handling from here...
8633 (linux_wait_1): ... to here.
8634 (count_events_callback): New.
8635 (select_singlestep_lwp_callback): New.
8636 (select_event_lwp_callback): New.
8637 (cancel_breakpoints_callback): New.
8638 (select_event_lwp): New.
8639 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8640 priority to all LWPs that have had events that should be reported
8641 to the client. Cancel breakpoints when about to reporting the
8642 event to the client, not while stopping lwps. No longer cancel
8643 finished single-steps here.
8644 (cancel_finished_single_step): Delete.
8645 (cancel_finished_single_steps): Delete.
8646
414a389f
PA
86472010-03-24 Pedro Alves <pedro@codesourcery.com>
8648
8649 * mem-break.c (enum bkpt_type): New.
8650 (struct breakpoint): New field `type'.
8651 (set_breakpoint_at): Change return type to struct breakpoint
8652 pointer. Set type to `other_breakpoint' by default.
8653 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8654 in the breakpoint list.
8655 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8656 (reinsert_breakpoint): Rename to ...
8657 (reinsert_raw_breakpoint): ... this.
8658 (reinsert_breakpoints_at): Adjust.
8659 * mem-break.h (struct breakpoint): Declare.
8660 (set_breakpoint_at): Change return type to struct breakpoint
8661 pointer.
8662
2280c721
PA
86632010-03-24 Pedro Alves <pedro@codesourcery.com>
8664
8665 * server.c (handle_query): Assign, not compare.
8666
d50171e4
PA
86672010-03-24 Pedro Alves <pedro@codesourcery.com>
8668
8669 Teach linux gdbserver to step-over-breakpoints.
8670
8671 * linux-low.c (can_hardware_single_step): New.
8672 (supports_breakpoints): New.
8673 (handle_extended_wait): If stopping threads, read the stop pc of
8674 the new cloned LWP.
8675 (get_pc): New.
8676 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8677 low target doesn't support retrieving the PC.
8678 (add_lwp): Set last_resume_kind to resume_continue.
8679 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8680 (linux_attach): Don't clear stop_expected. Set the lwp's
8681 last_resume_kind to resume_stop.
8682 (linux_detach_one_lwp): Don't check for removed breakpoints.
8683 (check_removed_breakpoint): Delete.
8684 (status_pending_p): Rename to ...
8685 (status_pending_p_callback): ... this. Don't check for removed
8686 breakpoints. Don't consider threads that are stopped from GDB's
8687 perspective.
8688 (linux_wait_for_lwp): Always read the stop_pc here.
8689 (cancel_breakpoint): New.
8690 (step_over_bkpt): New global.
8691 (linux_wait_for_event_1): Implement stepping over breakpoints.
8692 (gdb_wants_lwp_stopped): New.
8693 (gdb_wants_all_stopped): New.
8694 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8695 single-step traps here. Store the thread's last reported target
8696 wait status.
8697 (send_sigstop): Don't clear stop_expected. Always set it,
8698 instead.
8699 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8700 (cancel_finished_single_step): New.
8701 (cancel_finished_single_steps): New.
8702 (wait_for_sigstop): Don't cancel finished single-step traps here.
8703 (linux_resume_one_lwp): Don't check for removed breakpoints.
8704 Don't set `step' on non-hardware step archs.
8705 (linux_set_resume_request): Ignore resume_stop requests if already
8706 stopping or stopped. Set the lwp's last_resume_kind.
8707 (resume_status_pending_p): Don't check for removed breakpoints.
8708 (need_step_over_p): New.
8709 (start_step_over): New.
8710 (finish_step_over): New.
8711 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8712 requests. Clear the thread's last reported target waitstatus.
8713 Don't use the `suspended' flag. Don't consider pending breakpoints.
8714 (linux_resume): Start a step-over if necessary.
8715 (proceed_one_lwp): New.
8716 (proceed_all_lwps): New.
8717 (unstop_all_lwps): New.
8718 * linux-low.h (struct lwp_info): Rewrite comment for the
8719 `suspended' flag. Add the `stop_pc' field. Delete the
8720 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8721 Add `'last_resume_kind' and `need_step_over' fields.
8722 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8723 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8724 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8725 (set_raw_breakpoint_at): New.
8726 (set_breakpoint_at): Rewrite to use it.
8727 (reinsert_breakpoint_handler): Delete.
8728 (set_reinsert_breakpoint): New.
8729 (reinsert_breakpoint_by_bp): Delete.
8730 (delete_reinsert_breakpoints): New.
8731 (uninsert_breakpoint): Rewrite.
8732 (uninsert_breakpoints_at): New.
8733 (reinsert_breakpoint): Rewrite.
8734 (reinsert_breakpoints_at): New.
8735 (check_breakpoints): Rewrite.
8736 (breakpoint_here): New.
8737 (breakpoint_inserted_here): New.
8738 (check_mem_read): Adjust.
8739 * mem-break.h (breakpoints_supported, breakpoint_here)
8740 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8741 (reinsert_breakpoint_by_bp): Delete declaration.
8742 (delete_reinsert_breakpoints): Declare.
8743 (reinsert_breakpoint): Delete declaration.
8744 (reinsert_breakpoints_at): Declare.
8745 (uninsert_breakpoint): Delete declaration.
8746 (uninsert_breakpoints_at): Declare.
8747 (check_breakpoints): Adjust prototype.
8748 * server.h: Adjust include order.
8749 (struct thread_info): Declare here. Add a `last_status' field.
8750
30ba68cb
MS
87512010-03-23 Michael Snyder <msnyder@vmware.com>
8752
8753 * server.c (crc32): New function.
8754 (handle_query): Add handling for 'qCRC:' request.
8755
b9a881c2
PA
87562010-03-23 Pedro Alves <pedro@codesourcery.com>
8757
8758 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8759 lwp had been stopped by a watchpoint.
8760
e92d13d5
PA
87612010-03-16 Pedro Alves <pedro@codesourcery.com>
8762
8763 * server.h (internal_error): Declare.
8764 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8765 * utils.c (internal_error): New function.
8766
64daa791
AS
87672010-03-15 Andreas Schwab <schwab@redhat.com>
8768
8769 * configure.srv: Fix typo setting srv_regobj.
8770
f52cd8cd
PA
87712010-03-15 Pedro Alves <pedro@codesourcery.com>
8772
8773 * linux-low.c (fetch_register): Avoid passing a non string literal
8774 format to `error'.
8775 (usr_store_inferior_registers): Ditto.
8776
93ae6fdc
PA
87772010-03-14 Pedro Alves <pedro@codesourcery.com>
8778
8779 * linux-low.c (linux_write_memory): Bail out early if peeking
8780 memory failed.
8781
c3adc08c
PA
87822010-03-14 Pedro Alves <pedro@codesourcery.com>
8783
8784 * linux-low.h (struct lwp_info): New fields
8785 `stopped_by_watchpoint' and `stopped_data_address'.
8786 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8787 here, and cache them in the lwp object.
8788 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8789 directly.
8790 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8791 field.
8792 (linux_stopped_by_watchpoint): Rewrite.
8793 (linux_stopped_data_address): Rewrite.
8794
bce522a2
PA
87952010-03-06 Simo Melenius <simo.melenius@iki.fi>
8796
8797 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8798 switching the current inferior, not before.
8799
90884b2b
L
88002010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8801
8802 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8803 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8804 i386-linux.c and amd64-linux.c.
8805 (reg-i386.o): Removed.
8806 (reg-i386.c): Likewise.
8807 (reg-i386-linux.o): Likewise.
8808 (reg-i386-linux.c): Likewise.
8809 (reg-x86-64.o): Likewise.
8810 (reg-x86-64.c): Likewise.
8811 (reg-x86-64-linux.o): Likewise.
8812 (reg-x86-64-linux.c): Likewise.
8813 (i386.o): New.
8814 (i386.c): Likewise.
8815 (i386-linux.o): Likewise.
8816 (i386-linux.c): Likewise.
8817 (amd64.o): Likewise.
8818 (amd64.c): Likewise.
8819 (amd64-linux.o): Likewise.
8820 (amd64-linux.c): Likewise.
8821
8822 * configure.srv (srv_i386_regobj): New.
8823 (srv_i386_linux_regobj): Likewise.
8824 (srv_amd64_regobj): Likewise.
8825 (srv_amd64_linux_regobj): Likewise.
8826 (srv_i386_32bit_xmlfiles): Likewise.
8827 (srv_i386_64bit_xmlfiles): Likewise.
8828 (srv_i386_xmlfiles): Likewise.
8829 (srv_amd64_xmlfiles): Likewise.
8830 (srv_i386_linux_xmlfiles): Likewise.
8831 (srv_amd64_linux_xmlfiles): Likewise.
8832 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8833 srv_xmlfiles to $srv_i386_xmlfiles.
8834 (i[34567]86-*-mingw32ce*): Likewise.
8835 (i[34567]86-*-mingw*): Likewise.
8836 (i[34567]86-*-nto*): Likewise.
8837 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8838 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8839 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8840 (x86_64-*-linux*): Likewise.
8841
8842 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8843 (init_registers_amd64_linux): New.
8844 (x86_arch_setup): Replace init_registers_x86_64_linux with
8845 init_registers_amd64_linux.
8846
193f13e6
MK
88472010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8848
8849 * configure.ac: Check for libdl. If it is not available link against
8850 static libthread_db.
8851 * configure: Regenerate.
8852
85d721b8
PA
88532010-02-22 Pedro Alves <pedro@codesourcery.com>
8854
8855 PR9605
8856
8857 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8858 handing a read watchpoint.
8859 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8860
6076632b
DE
88612010-02-12 Doug Evans <dje@google.com>
8862
8863 * linux-low.c (linux_supports_tracefork_flag): Document.
8864 (linux_look_up_symbols): Add comment.
8865
3327ccf7
L
88662010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8867
8868 * regcache.c (supply_register): Clear regcache if buf is NULL.
8869
0718675c 88702010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 8871 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
8872
8873 * inferiors.c (find_inferior): Add function documentation.
8874 (unloaded_dll): Handle the case where the unloaded dll has not
8875 been previously registered in the dll list.
8876
177321bd
DJ
88772010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8878
8879 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8880 (thumb2_breakpoint): New.
8881 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8882
2b009048
DJ
88832010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8884
8885 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8886 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8887 breakpoints.
8888
3be029c7
PA
88892010-01-21 Pedro Alves <pedro@codesourcery.com>
8890
8891 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8892
18f5de3b
JK
88932010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8894
8895 * linux-s390-low.c (s390_collect_ptrace_register)
8896 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8897
3743bb4f
DE
88982010-01-21 Doug Evans <dje@google.com>
8899
14ce3065
DE
8900 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8901 (PTRACE_ARG4_TYPE): New macro.
8902 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8903 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8904 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8905 (usr_store_inferior_registers): Ditto.
8906 (linux_read_memory, linux_write_memory): Ditto.
8907 (linux_test_for_tracefork): Ditto.
8908
3743bb4f
DE
8909 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8910 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8911
8b315be5
PA
89122010-01-21 Pedro Alves <pedro@codesourcery.com>
8913
8914 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8915 target.
8916
85492558
PA
89172010-01-21 Pedro Alves <pedro@codesourcery.com>
8918
8919 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8920 prototype to take a regcache. Adjust.
8921
442ea881
PA
89222010-01-20 Pedro Alves <pedro@codesourcery.com>
8923
8924 * regcache.h (struct thread_info): Forward declare.
8925 (struct regcache): New.
8926 (new_register_cache): Adjust prototype.
8927 (get_thread_regcache): Declare.
8928 (free_register_cache): Adjust prototype.
8929 (registers_to_string, registers_from_string): Ditto.
8930 (supply_register, supply_register_by_name, collect_register)
8931 (collect_register_as_string, collect_register_by_name): Ditto.
8932 * regcache.c (struct inferior_regcache_data): Delete.
8933 (get_regcache): Rename to ...
8934 (get_thread_regcache): ... this. Adjust. Switch inferior before
8935 fetching registers.
8936 (regcache_invalidate_one): Adjust.
8937 (regcache_invalidate): Fix prototype.
8938 (new_register_cache): Return the new register cache.
8939 (free_register_cache): Change prototype.
8940 (realloc_register_cache): Adjust.
8941 (registers_to_string): Change prototype to take a regcache. Adjust.
8942 (registers_from_string): Ditto.
8943 (register_data): Ditto.
8944 (supply_register): Ditto.
8945 (supply_register_by_name): Ditto.
8946 (collect_register): Ditto.
8947 (collect_register_as_string): Ditto.
8948 (collect_register_by_name): Ditto.
8949 * server.c (process_serial_event): Adjust.
8950 * linux-low.h (regset_fill_func, regset_store_func): Change
8951 prototype.
8952 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8953 Change prototype.
8954 * linux-low.c (get_stop_pc): Adjust.
8955 (check_removed_breakpoint): Adjust.
8956 (linux_wait_for_event): Adjust.
8957 (linux_resume_one_lwp): Adjust.
8958 (fetch_register): Add regcache parameter. Adjust.
8959 (usr_store_inferior_registers): Ditto.
8960 (regsets_fetch_inferior_registers): Ditto.
8961 (regsets_store_inferior_registers): Ditto.
8962 (linux_fetch_registers, linux_store_registers): Ditto.
8963 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8964 regcache. Adjust.
43aaf8b6
PA
8965 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8966 Ditto.
442ea881
PA
8967 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8968 prototype to take a regcache.
8969 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8970 * remote-utils.c (convert_ascii_to_int, outreg)
8971 (prepare_resume_reply): Change prototype to take a regcache.
8972 Adjust.
8973 * target.h (struct target_ops) <fetch_registers, store_registers>:
8974 Change prototype to take a regcache.
8975 (fetch_inferior_registers, store_inferior_registers): Change
8976 prototype to take a regcache. Adjust.
8977 * proc-service.c (ps_lgetregs): Adjust.
8978 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8979 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8980 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8981 take a regcache. Adjust.
8982 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8983 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8984 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8985 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8986 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8987 (cris_cannot_fetch_register):
8988 (cris_breakpoint_at): Change prototype to take a regcache.
8989 Adjust.
8990 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8991 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8992 to take a regcache. Adjust.
8993 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8994 Adjust.
8995 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8996 take a regcache. Adjust.
8997 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8998 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8999 (m68k_set_pc): Change prototype to take a regcache. Adjust.
9000 * linux-mips-low.c (mips_get_pc):
9001 (mips_set_pc): Change prototype to take a regcache. Adjust.
9002 (mips_reinsert_addr): Adjust.
9003 (mips_collect_register): Change prototype to take a regcache.
9004 Adjust.
9005 (mips_supply_register):
9006 (mips_collect_register_32bit, mips_supply_register_32bit)
9007 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9008 (mips_store_fpregset): Ditto.
43aaf8b6
PA
9009 * linux-ppc-low.c (ppc_supply_ptrace_register)
9010 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
9011 (parse_spufs_run): Adjust.
9012 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9013 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9014 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9015 take a regcache. Adjust.
9016 * linux-s390-low.c (s390_collect_ptrace_register)
9017 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9018 (s390_set_pc): Change prototype to take a regcache. Adjust.
9019 (s390_arch_setup): Adjust.
9020 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9021 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
9022 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9023 (sparc_fill_gregset, sparc_store_gregset_from_stack)
9024 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9025 regcache. Adjust.
9026 (sparc_breakpoint_at): Adjust.
9027 * linux-xtensa-low.c (xtensa_fill_gregset):
9028 (xtensa_store_gregset):
9029 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9030 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
9031 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9032 prototype to take a regcache. Adjust.
9033 * win32-arm-low.c (arm_fetch_inferior_register)
9034 (arm_store_inferior_register): Change prototype to take a
9035 regcache. Adjust.
9036 * win32-i386-low.c (i386_fetch_inferior_register)
9037 (i386_store_inferior_register): Change prototype to take a
9038 regcache. Adjust.
9039 * win32-low.c (child_fetch_inferior_registers)
9040 (child_store_inferior_registers): Change prototype to take a
9041 regcache. Adjust.
9042 (win32_wait): Adjust.
9043 (win32_fetch_inferior_registers): Change prototype to take a
9044 regcache. Adjust.
9045 (win32_store_inferior_registers): Adjust.
9046 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9047 store_inferior_register>: Change prototype to take a regcache.
9048
60c3d7b0
DE
90492010-01-20 Doug Evans <dje@google.com>
9050
9051 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9052 #ifdef.
9053 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 9054 (W_STOPCODE): Provide definition if missing.
60c3d7b0 9055
dc146f7c
VP
90562010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9057
9058 * linux-low.c (linux_core_of_thread): New.
9059 (compare_ints, show_process, list_threads): New.
9060 (linux_qxfer_osdata): Report threads and cores.
9061 (linux_target_op): Register linux_core_of_thread.
9062 * remote-utils.c (prepare_resume_reply): Report the core.
9063 (buffer_xml_printf): Support %d specifier.
9064 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9065 New.
9066 (handle_query): Handle qXfer:threads. Announce availability
9067 thereof.
9068 * target.h (struct target_ops): New field core_of_thread.
9069
7803799a
UW
90702010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9071
9072 * Makefile.in (clean): Remove new generated files.
9073 (reg-s390.o, reg-s390.c): Remove rules.
9074 (reg-s390x.o, reg-s390x.c): Likewise.
9075 (s390-linux32.o, s390-linux32.c): Add rules.
9076 (s390-linux64.o, s390-linux64.c): Likewise.
9077 (s390x-linux64.o, s390x-linux64.c): Likewise.
9078 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9079 * linux-s390-low.c: Include <elf.h>.
9080 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9081 (init_registers_s390): Remove prototype.
9082 (init_registers_s390x): Likewise.
9083 (init_registers_s390_linux32): Add prototype.
9084 (init_registers_s390_linux64): Likewise.
9085 (init_registers_s390x_linux64): Likewise.
9086 (s390_num_regs_3264): New define.
9087 (s390_regmap_3264): New global variable.
9088 (s390_cannot_fetch_register): Remove obsolete check.
9089 (s390_cannot_store_register): Likewise.
9090 (s390_collect_ptrace_register): Handle upper/lower register halves.
9091 (s390_supply_ptrace_register): Likewise.
9092 (s390_fill_gregset): Update to register number changes.
9093 (s390_get_hwcap): New routine.
9094 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9095 Install appropriate regmap and register set.
9096
6e7ffa39
JB
90972010-01-01 Joel Brobecker <brobecker@adacore.com>
9098
9099 * server.c (gdbserver_version): Update copyright year to 2010.
9100 * gdbreplay.c (gdbreplay_version): Likewise.
9101
957f3f49
DE
91022009-12-28 Doug Evans <dje@google.com>
9103
9104 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9105 elf/external.h. Include <elf.h> instead but only if necessary.
9106
ca5c370d
PA
91072009-12-28 Pedro Alves <pedro@codesourcery.com>
9108
9109 * linux-low.c (linux_remove_process): Remove `detaching'
9110 parameter. Don't release/detach from thread_db here.
9111 (linux_kill): Release/detach from thread_db here, ...
9112 (linux_detach): ... and here, before actually detaching.
9113 (linux_wait_1): ... and here, when a process exits.
9114 * thread-db.c (any_thread_of): New.
9115 (thread_db_free): Switch the current inferior to a thread of the
9116 passed in process.
9117
4ee62156
DE
91182009-12-21 Doug Evans <dje@google.com>
9119
d90e6a88
DE
9120 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9121
c5f62d5f
DE
9122 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9123 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9124 warning ifndef __NR_tkill. Move setting of errno there too.
9125 Delete unnecessary resetting of errno after syscall.
9126 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9127
10e86dd7
DE
9128 * configure.ac: Check for dladdr.
9129 * config.in: Regenerate.
9130 * configure: Regenerate.
9131 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9132 (try_thread_db_load): Update.
9133
4ee62156
DE
9134 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9135
00f515da
DE
91362009-12-18 Doug Evans <dje@google.com>
9137
e9464885
DE
9138 * event-loop.c: Include unistd.h if it exists.
9139
07d4f67e
DE
9140 * linux-low.c (my_waitpid): Move definition away from being in
9141 between linux_tracefork_child/linux_test_for_tracefork.
9142
00f515da
DE
9143 * gdb_proc_service.h (psaddr_t): Fix type.
9144 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9145 signature to match glibc.
9146
1de1badb
DE
91472009-12-16 Doug Evans <dje@google.com>
9148
9149 * linux-low.c (linux_read_memory): Fix argument to read.
9150
aeeb81d1
PA
91512009-11-26 Pedro Alves <pedro@codesourcery.com>
9152
9153 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9154 events, don't leave current_inferior pointing at null.
9155
10357975
PA
91562009-11-26 Pedro Alves <pedro@codesourcery.com>
9157
9158 * win32-low.c (LOG): Delete.
9159 (OUTMSG): Output to stderr.
9160 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9161 on compile time LOG macro.
9162 (win32_wait): Fix debug output.
9163
cf6e3471
PA
91642009-11-26 Pedro Alves <pedro@codesourcery.com>
9165
9166 * win32-low.c (win32_add_one_solib): If the dll name is
9167 "ntdll.dll", prepend the system directory to the dll path.
9168
0c85e18e
MK
91692009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9170
9171 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9172
9ac544ce 91732009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 9174 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
9175
9176 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9177 * configure.ac: Check for __mcoldfire__ and set
9178 gdb_cv_m68k_is_coldfire.
9179 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9180 reg-cf.o and reg-m68k.o.
9181 * configure: Regenerated.
9182
fd7dd3e6
PA
91832009-11-16 Pedro Alves <pedro@codesourcery.com>
9184
9185 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9186 Pass it to thread_db_free.
9187 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9188 proper `detaching' argument to linux_remove_process.
9189 * linux-low.h (thread_db_free): Add `detaching' parameter.
9190 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9191 to thread_db_free.
9192 (thread_db_free): Add `detaching' parameter. Only
9193 call td_ta_clear_event if detaching from process.
9194
75aa492e
MK
91952009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9196
9197 * thread-db.c (thread_db_free): Fix typo.
9198
21e1bee4
PP
91992009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9200
9201 PR gdb/10838
9202 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9203
8838b45e
NS
92042009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9205
9206 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9207 with an i686 compiler.
9208 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9209 needed.
9210 * configure: Rebuilt.
9211
8a35fb51
SL
92122009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9213
9214 PR gdb/10783
9215
9216 * server.c (handle_search_memory_1): Correct read_addr initialization
9217 in loop for searching subsequent chunks.
9218
96f15937
PP
92192009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9220
9221 * configure.ac: New --with-libthread-db option.
9222 * thread-db.c: Allow direct dependence on libthread_db.
9223 (thread_db_free): Adjust.
9224 * config.in: Regenerate.
9225 * configure: Likewise.
889bf7c5 9226
5f7d1694
PP
92272009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9228
9229 PR gdb/10757
9230 * thread-db.c (attach_thread): New function.
9231 (maybe_attach_thread): Return success/failure.
9232 (find_new_threads_callback): Adjust.
889bf7c5
PA
9233 (thread_db_find_new_threads): Loop until no new threads.
9234
88e3b899
PA
92352009-10-13 Pedro Alves <pedro@codesourcery.com>
9236
9237 * proc-service.c (ps_lgetregs): Formatting.
9238
cdbfd419
PP
92392009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9240
9241 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9242 * configure.ac: Adjust.
9243 * linux-low.h (struct process_info_private): Move members to struct
9244 thread_db.
9245 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9246 * linux-low.c (linux_remove_process): Adjust.
9247 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9248 * server.c (handle_query): Move code ...
9249 (handle_monitor_command): ... here. New function.
9250 * target.h (struct target_ops): New member.
9251 * thread-db.c (struct thread_db): New.
9252 (libthread_db_search_path): New variable.
9253 (thread_db_create_event, thread_db_enable_reporting)
9254 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9255 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9256 (try_thread_db_load_1, dladdr_to_soname): New functions.
9257 (try_thread_db_load, thread_db_load_search): New functions.
9258 (thread_db_init): Search for libthread_db.
9259 (thread_db_free): New function.
9260 (thread_db_handle_monitor_command): Likewise.
9261 * config.in: Regenerate.
9262 * configure: Regenerate.
889bf7c5 9263
4168d2d6
UW
92642009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9265
9266 * spu-low.c (spu_kill): Wait for inferior to terminate.
9267 Call clear_inferiors.
9268 (spu_detach): Call clear_inferiors.
9269
81ecdfbb
RW
92702009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9271
9272 * aclocal.m4: Regenerate.
9273 * config.in: Likewise.
9274 * configure: Likewise.
9275
0b9ff2c0
UW
92762009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9277
9278 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9279 (parse_spufs_run): New function.
9280 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9281 (ppc_breakpoint_at): Handle SPU breakpoints.
9282
efcbbd14
UW
92832009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9284
9285 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9286 (SPUFS_MAGIC): Define.
9287 (spu_enumerate_spu_ids): New function.
9288 (linux_qxfer_spu): New function.
9289 (linux_target_ops): Install linux_qxfer_spu.
9290
f4d9bade
UW
92912009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9292
9293 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9294 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9295 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9296 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9297 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9298 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9299 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9300 (init_registers_powerpc_cell32l): Add prototype.
9301 (init_registers_powerpc_cell64l): Likewise.
9302 (ppc_arch_setup): Detect Cell/B.E. architecture.
9303
96e946ca
RW
93042009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9305
9306 * Makefile.in (datarootdir): New variable.
9307
58d6951d
DJ
93082009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9309
9310 * linux-low.c (linux_write_memory): Update debugging output.
9311 * Makefile.in (clean): Add new descriptions.
9312 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9313 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9314 * configure.srv: Add new files for arm*-*-linux*.
9315 * linux-arm-low.c: Add new declarations.
9316 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9317 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9318 (HWCAP_VFPv3D16): New.
9319 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9320 instead of __IWMMXT__.
9321 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9322 (arm_arch_setup): New.
9323 (target_regsets): Remove #ifdef. Add VFP regset.
9324 (the_low_target): Use arm_arch_setup.
9325
12b42a12
DJ
93262009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9327
9328 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9329 the main thread again.
9330
ac8c974e
AR
93312009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9332
9333 Adding Neutrino gdbserver.
9334 * configure: Regenerated.
9335 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9336 * configure.srv (i[34567]86-*-nto*): New target.
9337 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9338 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9339 (nto_comctrl) [__QNX__]: New function.
9340 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9341
4424e0c3 93422009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
9343
9344 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9345 srv_tgtobj.
9346
912cf4ba
PA
93472009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9348 Pedro Alves <pedro@codesourcery.com>
9349
9350 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9351 don't support CONTEXT_EXTENDED_REGISTERS.
9352 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9353 (the_low_target): Install them.
9354 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9355 failing with ERROR_PIPE_NOT_CONNECTED.
9356
aa5ca48f
DE
93572009-06-30 Doug Evans <dje@google.com>
9358 Pierre Muller <muller@ics.u-strasbg.fr>
9359
9360 Add h/w watchpoint support to x86-linux, win32-i386.
9361 * Makefile.in (SFILES): Add i386-low.c
9362 (i386_low_h): Define.
9363 (i386-low.o): Add dependencies.
9364 (linux-x86-low.o): Add i386-low.h dependency.
9365 (win32-i386-low.o): Ditto.
9366 * i386-low.c: New file.
9367 * i386-low.h: New file.
9368 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9369 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9370 * linux-low.c (linux_add_process): Initialize arch_private.
9371 (linux_remove_process): Free arch_private.
9372 (add_lwp): Initialize arch_private.
9373 (delete_lwp): Free arch_private.
9374 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9375 provided.
9376 * linux-low.h (process_info_private): New member arch_private.
9377 (lwp_info): New member arch_private.
9378 (linux_target_ops): New members new_process, new_thread,
9379 prepare_to_resume.
9380 (ptid_of): New macro.
9381 * linux-x86-low.c: Include stddef.h, i386-low.h.
9382 (arch_process_info): New struct.
9383 (arch_lwp_info): New struct.
9384 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9385 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9386 (i386_dr_low_get_status): New function.
9387 (x86_insert_point, x86_remove_point): New functions.
9388 (x86_stopped_by_watchpoint): New function.
9389 (x86_stopped_data_address): New function.
9390 (x86_linux_new_process, x86_linux_new_thread): New functions.
9391 (x86_linux_prepare_to_resume): New function.
9392 (the_low_target): Add entries for insert_point, remove_point,
9393 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9394 prepare_to_resume.
9395 * server.c (debug_hw_points): New global.
9396 (monitor_show_help): Document set debug-hw-points.
9397 (handle_query): Process "set debug-hw-points".
9398 * server.h (debug_hw_points): Declare.
9399 (paddress): Declare.
9400 * utils.c (NUMCELLS, CELLSIZE): New macros.
9401 (get_sell, xsnprintf, paddress): New functions.
9402 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9403 remove_point, stopped_by_watchpoint, stopped_data_address.
9404 * win32-i386-low.c: Include i386-low.h.
9405 (debug_reg_state): Replaces dr.
9406 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9407 (i386_dr_low_get_status): New function.
9408 (i386_insert_point, i386_remove_point): New functions.
9409 (i386_stopped_by_watchpoint): New function.
9410 (i386_stopped_data_address): New function.
9411 (i386_initial_stuff): Update.
9412 (get_thread_context,set_thread_context,i386_thread_added): Update.
9413 (the_low_target): Add entries for insert_point,
9414 remove_point, stopped_by_watchpoint, stopped_data_address.
9415 * win32-low.c (win32_insert_watchpoint): New function.
9416 (win32_remove_watchpoint): New function.
9417 (win32_stopped_by_watchpoint): New function.
9418 (win32_stopped_data_address): New function.
9419 (win32_target_ops): Add entries for insert_watchpoint,
9420 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9421 * win32-low.h (win32_target_ops): New members insert_point,
9422 remove_point, stopped_by_watchpoint, stopped_data_address.
9423
d993e290
PA
94242009-06-25 Pedro Alves <pedro@codesourcery.com>
9425
9426 * server.c (process_serial_event): Re-return unsupported, not
9427 error, if the type isn't recognized. Re-allow supporting only
9428 insert or remove packets. Also call require_running for
9429 breakpoints. Add missing break statement to default case. Tidy.
9430 * target.h (struct target_ops): Rename insert_watchpoint to
9431 insert_point, and remove_watchpoint to remove_point.
9432
9433 * linux-low.h (struct linux_target_ops): Likewise.
9434 * linux-low.c (linux_insert_watchpoint): Rename to ...
9435 (linux_insert_point): ... this. Adjust.
9436 (linux_remove_watchpoint): Rename to ...
9437 (linux_remove_point): ... this. Adjust.
9438 (linux_target_ops): Adjust.
9439 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9440 (cris_insert_point): ... this.
9441 (cris_remove_watchpoint): Rename to ...
9442 (cris_remove_point): ... this.
9443 (the_low_target): Adjust.
9444
0f54c268
PM
94452009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9446
9447 * server.c (handle_v_kill): Pass signal_pid to
9448 kill_inferior if multi_process is zero.
9449
c6314022
AR
94502009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9451
9452 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9453 * target.h (target_ops): Comment for *_watchpoint to make it clear
9454 the functions can get types '0' and '1'.
9455
4463ce24
AR
94562009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9457
9458 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9459 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9460 * regcache.c (get_regcache): Likewise.
9461 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9462 * win32-low.c (child_fetch_inferior_registers): Remove check for
9463 regno 0.
9464
cf8fd78b
PA
94652009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9466 Pedro Alves <pedro@codesourcery.com>
9467
9468 * target.h (struct target_ops) <supports_multi_process>: New
9469 callback.
9470 (target_supports_multi_process): New.
9471 * server.c (handle_query): Even if GDB reports support, only
9472 enable multi-process if the target also supports it. Report
9473 multi-process support only if the target backend supports it.
9474 * linux-low.c (linux_supports_multi_process): New function.
9475 (linux_target_ops): Install it as target_supports_multi_process
9476 callback.
9477
47c0c975
DE
94782009-05-24 Doug Evans <dje@google.com>
9479
e09875d4
DE
9480 Global renaming of find_thread_pid to find_thread_ptid.
9481 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9482 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9483 All callers updated.
9484
e27d73f6
DE
9485 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9486 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9487 directly.
9488
47c0c975
DE
9489 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9490 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9491 (linux_resume_one_lwp): Ditto.
9492
2acc282a
DE
94932009-05-23 Doug Evans <dje@google.com>
9494
9495 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9496 from struct inferior_list_entry * to struct lwp_info *.
9497 All callers updated.
9498
9f1036c1
DE
94992009-05-13 Doug Evans <dje@google.com>
9500
9501 * linux-x86-low.c: Don't include assert.h.
9502 (x86_siginfo_fixup): Use fatal, not assert.
9503 (x86_arch_setup): Fix comment.
9504
d0722149
DE
95052009-05-12 Doug Evans <dje@google.com>
9506
9507 Biarch support for i386/amd64 gdbserver.
9508 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9509 Add linux-x86-low.c.
9510 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9511 (linux-x86-low.o): Add.
9512 * linux-x86-64-low.c: Delete.
9513 * linux-i386-low.c: Delete.
9514 * linux-x86-low.c: New file.
9515 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9516 linux-x86-low.o.
9517 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9518 linux-x86-low.o.
9519 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9520 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9521 (linux_child_pid_to_exec_file): New function.
9522 (elf_64_header_p, elf_64_file_p): New functions.
9523 (siginfo_fixup): New function.
9524 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9525 give target a chance to convert layout.
9526 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9527 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9528
fdeb2a12
DE
95292009-05-07 Doug Evans <dje@google.com>
9530
9531 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9532 (regsets_store_inferior_registers): Ditto.
9533
a6dbe5df
PA
95342009-05-06 Pedro Alves <pedro@codesourcery.com>
9535
9536 PR server/10048
9537
9538 * linux-low.c (must_set_ptrace_flags): Delete.
9539 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9540 of the global.
9541 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9542 `lwp->must_set_ptrace_flags' instead.
ba42693b 9543 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
9544 (linux_wait_1): ... not here.
9545
5091eb23
DE
95462009-04-30 Doug Evans <dje@google.com>
9547
9f767825
DE
9548 * inferiors.c (started_inferior_callback): New function.
9549 (attached_inferior_callback): New function.
9550 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9551 * server.c (print_started_pid, print_attached_pid): New functions.
9552 (detach_or_kill_for_exit): New function.
9553 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9554 * server.h (have_started_inferiors_p): Declare.
9555 (have_attached_inferiors_p): Declare.
9556
5091eb23
DE
9557 * inferiors.c (remove_process): Fix memory leak, free process.
9558 * linux-low.c (linux_remove_process): New function.
9559 (linux_kill): Call it instead of remove_process.
9560 (linux_detach, linux_wait_1): Ditto.
9561
155c8968
PA
95622009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9563
9564 * configure.srv: Add x86 Windows CE target.
9565
7fe519cb
UW
95662009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9567
9568 * inferiors.c (get_thread_process): Make global.
9569 * server.h (get_thread_process): Add prototype.
9570 * thread-db.c (find_one_thread): Use get_thread_process
9571 instead of current_process.
9572 (thread_db_get_tls_address): Do not crash if called when
9573 thread layer is not yet initialized.
9574
5472f405
UW
95752009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9576
9577 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9578 * spu-low.c (current_tid): Rename to ...
9579 (current_ptid): ... this.
9580 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9581 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9582 ptid_get_lwp (current_ptid) instead of current_tid.
9583 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9584 instead of current_tid. Use find_process_pid to verify pid
9585 argument is valid. Pass proper argument to remove_process.
9586 (spu_thread_alive): Compare current_ptid instead of current_tid.
9587 (spu_resume): Likewise.
9588
55ac2b99
PA
95892009-04-02 Pedro Alves <pedro@codesourcery.com>
9590
9591 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9592 variable.
9593
95954743
PA
95942009-04-01 Pedro Alves <pedro@codesourcery.com>
9595
9596 Implement the multiprocess extensions, and add linux multiprocess
9597 support.
9598
9599 * server.h (ULONGEST): Declare.
9600 (struct ptid, ptid_t): New.
9601 (minus_one_ptid, null_ptid): Declare.
9602 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9603 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9604 (struct inferior_list_entry): Change `id' type from unsigned from
9605 to ptid_t.
9606 (struct sym_cache, struct breakpoint, struct
9607 process_info_private): Forward declare.
9608 (struct process_info): Declare.
9609 (current_process): Declare.
9610 (all_processes): Declare.
9611 (initialize_inferiors): Declare.
9612 (add_thread): Adjust to use ptid_t.
9613 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9614 (add_process, remove_process, find_thread_pid): Declare.
9615 (find_inferior_id): Adjust to use ptid_t.
9616 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9617 (multi_process): Declare.
9618 (push_event): Adjust to use ptid_t.
9619 (read_ptid, write_ptid): Declare.
9620 (prepare_resume_reply): Adjust to use ptid_t.
9621 (clear_symbol_cache): Declare.
9622 * inferiors.c (all_processes): New.
9623 (null_ptid, minus_one_ptid): New.
9624 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9625 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9626 (add_thread): Change unsigned long to ptid. Remove gdb_id
9627 parameter. Adjust.
9628 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9629 (gdb_id_to_thread): Rename to ...
9630 (find_thread_pid): ... this. Change unsigned long to ptid.
9631 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9632 (loaded_dll, pull_pid_from_list): Adjust.
9633 (add_process, remove_process, find_process_pid)
9634 (get_thread_process, current_process, initialize_inferiors): New.
9635 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9636 (struct target_waitstatus) <related_pid>: Ditto.
9637 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9638 return type to int.
9639 (struct target_ops) <join>: Add `pid' argument.
9640 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9641 (struct target_ops) <wait>: Add `ptid' field. Change return type
9642 to ptid.
9643 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9644 (mywait): Add `ptid' argument. Change return type to ptid_t.
9645 (target_pid_to_str): Declare.
9646 * target.c (set_desired_inferior): Adjust to use ptids.
9647 (mywait): Add new `ptid' argument. Adjust.
9648 (target_pid_to_str): New.
9649 * mem-break.h (free_all_breakpoints): Declare.
9650 * mem-break.c (breakpoints): Delelete.
9651 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9652 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9653 to use per-process breakpoint list.
9654 (free_all_breakpoints): New.
9655 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9656 (symbol_cache, all_symbols_looked_up): Delete.
9657 (hexchars): New.
9658 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9659 read_ptid): New.
9660 (prepare_resume_reply): Change ptid argument's type from unsigned
9661 long to ptid_t. Adjust. Implement W;process and X;process.
9662 (free_sym_cache, clear_symbol_cache): New.
9663 (look_up_one_symbol): Adjust to per-process symbol cache. *
9664 * server.c (cont_thread, general_thread, step_thread): Change type
9665 to ptid_t.
9666 (attached): Delete.
9667 (multi_process): New.
9668 (last_ptid): Change type to ptid_t.
9669 (struct vstop_notif) <ptid>: Change type to ptid_t.
9670 (queue_stop_reply, push_event): Change `ptid' argument's type to
9671 ptid_t.
9672 (discard_queued_stop_replies): Add `pid' argument.
9673 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9674 changes. Don't reference the `attached' global.
9675 (attach_inferior): Adjust to mywait interface changes.
9676 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9677 features. Handle and report "multiprocess+". Handle
9678 "qAttached:PID".
9679 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9680 changes.
9681 (handle_v_kill): New.
9682 (handle_v_stopped): Adjust to use target_pid_to_str.
9683 (handle_v_requests): Allow multiple attaches and runs when
9684 multiprocess extensions are in effect. Handle "vKill".
9685 (myresume): Adjust to use ptids.
9686 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9687 (handle_status): Adjust to discard_queued_stop_replies interface
9688 change.
9689 (first_thread_of, kill_inferior_callback)
9690 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9691 (main): Call initialize_inferiors. Adjust to use ptids, killing
9692 and detaching from all inferiors. Handle multiprocess packet
9693 variants.
9694 * linux-low.h: Include gdb_proc_service.h.
9695 (struct process_info_private): New.
9696 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9697 <lwpid_of>: Use ptid_get_lwp.
9698 (get_lwp_thread): Adjust.
9699 (struct lwp_info): Add `dead' member.
9700 (find_lwp_pid): Declare.
9701 * linux-low.c (thread_db_active): Delete.
9702 (new_inferior): Adjust comment.
9703 (inferior_pid): Delete.
9704 (linux_add_process): New.
9705 (handle_extended_wait): Adjust.
9706 (add_lwp): Change unsigned long to ptid.
9707 (linux_create_inferior): Add process to processes table. Adjust
9708 to use ptids. Don't set new_inferior here.
9709 (linux_attach_lwp): Rename to ...
9710 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9711 it. Adjust to use ptids.
9712 (linux_attach_lwp): New.
9713 (linux_attach): Add process to processes table. Don't set
9714 new_inferior here.
9715 (struct counter): New.
9716 (second_thread_of_pid_p, last_thread_of_process_p): New.
9717 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9718 multiple processes.
9719 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9720 processes. Remove process from process table.
9721 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9722 to multiple processes.
9723 (any_thread_of): New.
9724 (linux_detach): Add `pid' argument, and handle it. Remove process
9725 from processes table.
9726 (linux_join): Add `pid' argument. Handle it.
9727 (linux_thread_alive): Change unsighed long argument to ptid_t.
9728 Consider dead lwps as not being alive.
9729 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9730 threads we're not interested in.
9731 (same_lwp, find_lwp_pid): New.
9732 (linux_wait_for_lwp): Change `pid' argument's type from int to
9733 ptid_t. Adjust.
9734 (linux_wait_for_event): Rename to ...
9735 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9736 from int to ptid_t. Adjust.
9737 (linux_wait_for_event): New.
9738 (linux_wait_1): Add `ptid' argument. Change return type to
9739 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9740 that exit from the process table.
9741 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9742 Adjust.
9743 (mark_lwp_dead): New.
9744 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9745 stopping all threads, mark its main lwp as dead.
9746 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9747 ptids.
9748 (fetch_register, usr_store_inferior_registers)
9749 (regsets_fetch_inferior_registers)
9750 (regsets_store_inferior_registers, linux_read_memory)
9751 (linux_write_memory): Inline `inferior_pid'.
9752 (linux_look_up_symbols): Adjust to use per-process
9753 `thread_db_active'.
9754 (linux_request_interrupt): Adjust to use ptids.
9755 (linux_read_auxv): Inline `inferior_pid'.
9756 (initialize_low): Don't reference thread_db_active.
9757 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9758 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9759 (ps_getpid): Return the pid of the current inferior.
9760 * thread-db.c (proc_handle, thread_agent): Delete.
9761 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9762 per-process data.
9763 (find_one_thread): Change argument type to ptid_t. Adjust to
9764 per-process data.
9765 (maybe_attach_thread): Adjust to per-process data and ptids.
9766 (thread_db_find_new_threads): Ditto.
9767 (thread_db_init): Ditto.
9768 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9769 processes table. Adjust to use ptids.
9770 (spu_kill, spu_detach): Adjust interface. Remove process from
9771 processes table.
9772 (spu_join, spu_thread_alive): Adjust interface.
9773 (spu_wait): Adjust interface. Remove process from processes
9774 table. Adjust to use ptids.
9775 * win32-low.c (current_inferior_tid): Delete.
9776 (current_inferior_ptid): New.
9777 (debug_event_ptid): New.
9778 (thread_rec): Take a ptid. Adjust.
9779 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9780 (child_delete_thread): Ditto.
9781 (do_initial_child_stuff): Add `attached' argument. Add process to
9782 processes table.
9783 (child_fetch_inferior_registers, child_store_inferior_registers):
9784 Adjust.
9785 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9786 (win32_attach): Pass 1 to do_initial_child_stuff.
9787 (win32_kill): Adjust interface. Remove process from processes
9788 table.
9789 (win32_detach): Ditto.
9790 (win32_join): Adjust interface.
9791 (win32_thread_alive): Take a ptid.
9792 (win32_resume): Adjust to use ptids.
9793 (get_child_debug_event): Ditto.
9794 (win32_wait): Adjust interface. Remove exiting process from
9795 processes table.
9796
bd99dc85
PA
97972009-04-01 Pedro Alves <pedro@codesourcery.com>
9798
9799 Non-stop mode support.
9800
9801 * server.h (non_stop): Declare.
9802 (gdb_client_data, handler_func): Declare.
9803 (delete_file_handler, add_file_handler, start_event_loop):
9804 Declare.
9805 (handle_serial_event, handle_target_event, push_event)
9806 (putpkt_notif): Declare.
9807 * target.h (enum resume_kind): New.
9808 (struct thread_resume): Replace `step' field by `kind' field.
9809 (TARGET_WNOHANG): Define.
9810 (struct target_ops) <wait>: Add `options' argument.
9811 <supports_non_stop, async, start_non_stop>: New fields.
9812 (target_supports_non_stop, target_async): New.
9813 (start_non_stop): Declare.
9814 (mywait): Add `options' argument.
9815 * target.c (mywait): Add `options' argument. Print child exit
9816 notifications here.
9817 (start_non_stop): New.
9818 * server.c (non_stop, own_buf, mem_buf): New globals.
9819 (struct vstop_notif): New.
9820 (notif_queue): New global.
9821 (queue_stop_reply, push_event, discard_queued_stop_replies)
9822 (send_next_stop_reply): New.
9823 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9824 interface changes.
9825 (attach_inferior): In non-stop mode, don't wait for the target
9826 here.
9827 (handle_general_set): Handle QNonStop.
9828 (handle_query): When handling qC, return the current general
9829 thread, instead of the first thread of the list.
9830 (handle_query): If the backend supports non-stop mode, include
9831 QNonStop+ in the qSupported query response.
9832 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9833 and non-stop mode.
9834 (handle_v_attach, handle_v_run): Handle non-stop mode.
9835 (handle_v_stopped): New.
9836 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9837 (myresume): Adjust to use resume_kind. Handle non-stop.
9838 (queue_stop_reply_callback): New.
9839 (handle_status): Handle non-stop mode.
9840 (main): Clear non_stop flag on reconnection. Use the event-loop.
9841 Refactor serial protocol handling from here ...
9842 (process_serial_event): ... to this new function. When GDB
9843 selects any thread, select one here. In non-stop mode, wait until
9844 GDB acks all pending events before exiting.
9845 (handle_serial_event, handle_target_event): New.
9846 * remote-utils.c (remote_open): Install remote_desc in the event
9847 loop.
9848 (remote_close): Remove remote_desc from the event loop.
9849 (putpkt_binary): Rename to...
9850 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9851 (putpkt_binary): New as wrapper around putpkt_binary_1.
9852 (putpkt_notif): New.
9853 (prepare_resume_reply): In non-stop mode, don't change the
9854 general_thread.
9855 * event-loop.c: New.
9856 * Makefile.in (OBJ): Add event-loop.o.
9857 (event-loop.o): New rule.
9858
9859 * linux-low.h (pid_of): Moved here.
9860 (lwpid_of): New.
9861 (get_lwp_thread): Use lwpid_of.
9862 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9863 * linux-low.c (pid_of): Delete.
9864 (inferior_pid): Use lwpid_of.
9865 (linux_event_pipe): New.
9866 (target_is_async_p): New.
9867 (delete_lwp): New.
9868 (handle_extended_wait): Use lwpid_of.
9869 (add_lwp): Don't set lwpid field.
9870 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9871 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9872 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9873 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9874 first. Adjust to linux_wait_for_event interface changes. Use
9875 lwpid_of.
9876 (linux_detach): Don't delete the main lwp here.
9877 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9878 (status_pending_p): Don't consider explicitly suspended lwps.
9879 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9880 pointer. Add OPTIONS argument. Change return type to int. Use
9881 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9882 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9883 pointer. Add status pointer argument. Return a pid instead of a
9884 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9885 changes. In non-stop mode, don't switch to a random thread.
9886 (linux_wait): Rename to...
9887 (linux_wait_1): ... this. Add target_options argument, and handle
9888 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9889 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9890 clean exit and signal exit code. Don't stop all threads in
9891 non-stop mode. In all-stop mode, only stop all threads when
9892 reporting a stop to GDB. Handle explicit thread stop requests.
9893 (async_file_flush, async_file_mark): New.
9894 (linux_wait): New.
9895 (send_sigstop): Use lwpid_of.
9896 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9897 interface changes. In non-stop mode, don't switch to a random
9898 thread.
9899 (linux_resume_one_lwp): Use lwpid_of.
9900 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9901 (linux_resume_one_thread): ... this. Handle resume_stop. In
9902 non-stop mode, don't look for pending flag in all threads.
9903 (resume_status_pending_p): Don't consider explicitly suspended
9904 threads.
9905 (my_waitpid): Reimplement. Emulate __WALL.
9906 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9907 Use lwpid_of.
9908 (sigchld_handler, linux_supports_non_stop, linux_async)
9909 (linux_start_non_stop): New.
9910 (linux_target_ops): Register linux_supports_non_stop, linux_async
9911 and linux_start_non_stop.
9912 (initialize_low): Install SIGCHLD handler.
9913 * thread-db.c (thread_db_create_event, find_one_thread)
9914 (thread_db_get_tls_address): Use lwpid_of.
9915 * win32-low.c (win32_detach): Adjust to use resume_kind.
9916 (win32_wait): Add `options' argument.
9917 * spu-low.c (spu_resume): Adjust to use resume_kind.
9918 (spu_wait): Add `options' argument.
9919
5b1c542e
PA
99202009-04-01 Pedro Alves <pedro@codesourcery.com>
9921
9922 Decouple target code from remote protocol.
9923
9924 * target.h (enum target_waitkind): New.
9925 (struct target_waitstatus): New.
9926 (struct target_ops) <wait>: Return an unsigned long. Take a
9927 target_waitstatus pointer instead of a char pointer.
9928 (mywait): Likewise.
9929 * target.c (mywait): Change prototype to return an unsigned long.
9930 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9931 * server.h (thread_from_wait, old_thread_from_wait): Delete
9932 declarations.
9933 (prepare_resume_reply): Change prototype to take a
9934 target_waitstatus.
9935 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9936 (last_status, last_ptid): New.
9937 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9938 pid instead of a signal.
9939 (attach_inferior): Remove "status" and "signal" parameters.
9940 Adjust.
9941 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9942 not as an address.
9943 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9944 (handle_v_requests, myresume): Remove "status" and "signal"
9945 parameters. Adjust.
9946 (handle_status): New.
9947 (main): Delete local `status'. Adjust.
9948 * remote-utils.c: Include target.h.
9949 (prepare_resume_reply): Change prototype to take a
9950 target_waitstatus. Adjust.
9951
9952 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9953 interface.
9954 * spu-low.c (spu_wait): Adjust.
9955 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9956 Delete.
9957 (win32_wait): Adjust.
9958
2bd7c093
PA
99592009-04-01 Pedro Alves <pedro@codesourcery.com>
9960
9961 * target.h (struct thread_resume): Delete leave_stopped member.
9962 (struct target_ops): Add a `n' argument to the `resume' callback.
9963 * server.c (start_inferior): Adjust.
9964 (handle_v_cont, myresume): Adjust.
9965 * linux-low.c (check_removed_breakpoint): Adjust to resume
9966 interface change, and to removed leave_stopped field.
9967 (resume_ptr): Delete.
9968 (struct thread_resume_array): New.
9969 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9970 resume interface change.
9971 (linux_continue_one_thread, linux_queue_one_thread)
9972 (resume_status_pending_p): Check if the resume field is NULL
9973 instead of checking the leave_stopped member.
9974 (linux_resume): Adjust to the target resume interface change.
9975 * spu-low.c (spu_resume): Adjust to the target resume interface
9976 change.
9977 * win32-low.c (win32_detach, win32_resume): Ditto.
9978
c35fafde
PA
99792009-04-01 Pedro Alves <pedro@codesourcery.com>
9980
9981 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9982 flag.
9983 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9984 pending.
9985 (linux_continue_one_thread): Only preserve the stepping flag if
9986 there's a pending breakpoint.
9987
0a59d50b
PA
99882009-03-31 Pedro Alves <pedro@codesourcery.com>
9989
9990 * server.c (main): After the inferior having exited, call
9991 remote_close before exiting gdbserver.
9992
f04c6d38
TJB
99932009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9994
9995 Fix size of FPSCR in Power 7 processors.
9996 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9997 (PPC_FEATURE_HAS_DFP): New #define.
9998 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9999 size of the FPSCR.
10000
78e5cee6
PA
100012009-03-23 Pedro Alves <pedro@codesourcery.com>
10002
10003 * server.c (handle_query) Whitespace and formatting.
10004
1b3f6016
PA
100052009-03-22 Pedro Alves <pedro@codesourcery.com>
10006
10007 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10008 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10009 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10010 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10011 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10012 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10013 Makefile.in, configure.ac: Fix whitespace throughout.
10014 * configure: Regenerate.
10015
a07b2135
PA
100162009-03-22 Pedro Alves <pedro@codesourcery.com>
10017
10018 * inferiors.c (find_inferior): Make it safe for the callback
10019 function to delete the currently iterated inferior.
10020
67cc2626
PA
100212009-03-22 Pedro Alves <pedro@codesourcery.com>
10022
10023 * Makefile.in (linuw_low_h): Move higher.
10024 (thread-db.o): Depend on $(linux_low_h).
10025
54a0b537
PA
100262009-03-17 Pedro Alves <pedro@codesourcery.com>
10027
10028 Rename "process" to "lwp" throughout.
10029
10030 * linux-low.c (all_processes): Rename to...
10031 (all_lwps): ... this.
10032 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10033 (add_process): Rename to ...
10034 (add_lwp): ... this. Adjust.
10035 (linux_create_inferior): Adjust.
10036 (linux_attach_lwp): Adjust.
10037 (linux_attach): Adjust.
10038 (linux_kill_one_process): Rename to ...
10039 (linux_kill_one_lwp): ... this. Adjust.
10040 (linux_kill): Adjust.
10041 (linux_detach_one_process): Rename to ...
10042 (linux_detach_one_lwp): ... this. Adjust.
10043 (linux_detach): Adjust.
10044 (check_removed_breakpoint): Adjust.
10045 (status_pending_p): Adjust.
10046 (linux_wait_for_process): Rename to ...
10047 (linux_wait_for_lwp): ... this. Adjust.
10048 (linux_wait_for_event): Adjust.
10049 (send_sigstop): Adjust.
10050 (wait_for_sigstop): Adjust.
10051 (stop_all_processes): Rename to ...
10052 (stop_all_lwps): ... this.
10053 (linux_resume_one_process): Rename to ...
10054 (linux_resume_one_lwp): ... this. Adjust.
10055 (linux_set_resume_request, linux_continue_one_thread)
10056 (linux_queue_one_thread, resume_status_pending_p)
10057 (usr_store_inferior_registers, regsets_store_inferior_registers)
10058 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10059 Adjust.
10060 * linux-low.h (get_process): Rename to ...
10061 (get_lwp): ... this. Adjust.
10062 (get_thread_process): Rename to ...
10063 (get_thread_lwp): ... this. Adjust.
10064 (get_process_thread): Rename to ...
10065 (get_lwp_thread): ... this. Adjust.
10066 (struct process_info): Rename to ...
10067 (struct lwp_info): ... this.
10068 (all_processes): Rename to ...
10069 (all_lwps): ... this.
10070 * proc-service.c (ps_lgetregs): Adjust.
10071 * thread-db.c (thread_db_create_event, find_one_thread)
10072 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10073
0b16c5cf
PA
100742009-03-14 Pedro Alves <pedro@codesourcery.com>
10075
10076 * server.c (handle_query): Handle "qAttached".
10077
32de4b9d
NS
100782009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10079
10080 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10081 GPLv3, update license URL.
10082
2aecd87f
DE
100832009-03-01 Doug Evans <dje@google.com>
10084
93efd302 10085 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
10086 (server_h): Add gdb_signals.h.
10087 (signals.o): Update.
10088 * server.h (target_signal_from_host,target_signal_to_host_p)
10089 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10090
86b1f9c5
PM
100912009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10092
10093 * remote-utils.c (getpkt): Also generate remote-debug
10094 information if noack_mode is set.
10095
4aa995e1
PA
100962009-02-06 Pedro Alves <pedro@codesourcery.com>
10097
10098 * server.c (handle_query): Report qXfer:siginfo:read and
10099 qXfer:siginfo:write as supported and handle them.
10100 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10101 * linux-low.c (linux_xfer_siginfo): New.
10102 (linux_target_ops): Set it.
10103
62709adf
PA
101042009-01-26 Pedro Alves <pedro@codesourcery.com>
10105
10106 * server.c (gdbserver_usage): Mention --remote-debug.
10107 (main): Accept '--remote-debug' switch.
10108
aef93bd7
DE
101092009-01-18 Doug Evans <dje@google.com>
10110
10111 * regcache.c (new_register_cache): No need to check result of xcalloc.
10112 * server.c (handle_search_memory): Back out calls to xmalloc,
10113 result is checked and error is returned to user upon failure.
10114 (handle_query): Ditto. Add more checks for result of malloc.
10115 (handle_v_cont): Check result of malloc, report error back to
10116 user upon failure.
10117 (handle_v_run): Ditto. Call freeargv.
10118 * server.h (freeargv): Declare.
10119 * utils.c (freeargv): New fn.
10120
54363045
DE
101212009-01-15 Doug Evans <dje@google.com>
10122
f626972c
DE
10123 * gdbreplay.c (perror_with_name): Make arg const char *.
10124 * server.h (target_signal_to_name): Make return type const char *.
0842e787 10125 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 10126 * utils.c (perror_with_name): Make arg const char *.
54363045 10127
18aae699
PA
101282009-01-14 Pedro Alves <pedro@codesourcery.com>
10129
10130 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10131 when handling a EXIT_PROCESS_DEBUG_EVENT.
10132
ff703abe
JB
101332009-01-06 Joel Brobecker <brobecker@adacore.com>
10134
10135 * gdbreplay.c (gdbreplay_version): Update copyright year.
10136 * server.c (gdbserver_version): Likewise.
10137
f21cc1a2 101382009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
10139
10140 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 10141 (handle_extended_wait): Improve comment.
0e21c1ec 10142
bca929d3
DE
101432008-12-13 Doug Evans <dje@google.com>
10144
10145 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10146 * server.h (ATTR_MALLOC): New macro.
10147 (xmalloc,xcalloc,xstrdup): Declare.
10148 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10149 * inferiors.c: Ditto.
10150 * linux-low.c: Ditto.
10151 * mem-break.c: Ditto.
10152 * regcache.c: Ditto.
10153 * remote-utils.c: Ditto.
10154 * server.c: Ditto.
10155 * target.c: Ditto.
10156 * win32-low.c: Ditto.
10157
97438e3f
DE
101582008-12-12 Doug Evans <dje@google.com>
10159
896c7fbb
DE
10160 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10161 in debugging printf.
10162
97438e3f
DE
10163 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10164
e3b886f8
DE
101652008-12-09 Doug Evans <dje@google.com>
10166
10167 * linux-low.h (struct process_info): Delete member tid, unused.
10168 * thread-db.c (find_one_thread): Update.
10169 (maybe_attach_thread): Update.
10170
07e059b5
VP
101712008-12-02 Pedro Alves <pedro@codesourcery.com>
10172
889bf7c5
PA
10173 * target.h (struct target_ops): Add qxfer_osdata member.
10174 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10175 and dirent.h.
10176 (linux_qxfer_osdata): New functions.
10177 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10178 callback.
10179 * server.c (handle_query): Handle "qXfer:osdata:read:".
10180 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10181 (buffer_xml_printf): New functions.
10182 * server.h (struct buffer): New.
10183 (buffer_grow_str, buffer_grow_str0): New macros.
10184 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10185 (buffer_xml_printf): Declare.
07e059b5 10186
4cab47ab
DE
101872008-11-24 Doug Evans <dje@google.com>
10188
10189 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10190
f142445f
DJ
101912008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10192
10193 * server.c (handle_v_run): Always use the supplied argument list.
10194
d0107bb6 101952008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 10196
d0107bb6
BW
10197 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10198 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 10199
2c4ad781
TJB
102002008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10201
10202 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10203 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10204 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10205 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10206 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10207 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10208 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10209 XML target descriptions.
10210 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10211 when inferior is running on an ISA 2.05 or later processor. Add
10212 special case to return offset for full 64-bit slot of FPSCR when
10213 in 32-bits.
10214
dfb64f85
DJ
102152008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10216
10217 * Makefile.in (SFILES, clean): Added sparc64 files.
10218 (reg-sparc64.o, reg-sparc64.c): New.
10219 * configure.srv (sparc*-*-linux*): New configuration.
10220 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10221 syscall arguments for SPARC.
10222 (regsets_store_inferior_registers): Likewise.
10223 * linux-sparc-low.c: New file.
10224
66b6e1dd
DE
102252008-10-21 Doug Evans <dje@google.com>
10226
10227 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10228 (READLINE_DIR,READLINE_DEP): Delete.
10229 (INTERNAL_CFLAGS): Update.
10230 (LINTFLAGS): Update.
10231
9b710a42
PA
102322008-10-10 Pedro Alves <pedro@codesourcery.com>
10233
10234 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10235 whole argv from the last run, not just argv[0].
10236
5822d809
PA
102372008-09-08 Pedro Alves <pedro@codesourcery.com>
10238
10239 * regcache.c (new_register_cache): Return NULL if the register
10240 cache size isn't known yet.
10241 (free_register_cache): Avoid dereferencing a NULL regcache.
10242
74aac56f
DJ
102432008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10244
10245 * configure.srv: Merge MIPS and MIPS64.
10246
400b20f5
MR
102472008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10248
10249 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10250
677c5bb1
LM
102512008-08-18 Luis Machado <luisgpm@br.ibm.com>
10252
10253 * Makefile.in: Add required vsx dependencies.
10254
10255 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10256 Declare init_registers_powerpc_vsx32l.
10257 Declare init_registers_powerpc_vsx64l.
10258 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10259 (ppc_arch_setup): Check for VSX in hwcap.
10260 (ppc_fill_vsxregset): New function.
10261 (ppc_store_vsxregset): New function.
10262 Add new VSX entry in regset_info target_regsets.
10263
10264 * configure.srv: Add new VSX dependencies.
10265
a6f3e723
SL
102662008-08-12 Pedro Alves <pedro@codesourcery.com>
10267
10268 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10269 (remote_open): Set or clear transport_is_reliable.
10270 (putpkt_binary): Don't expect acks in noack mode.
10271 (getpkt): Don't send ack/nac in noack mode.
10272 * server.c (handle_general_set): Handle QStartNoAckMode.
10273 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10274 qSupported.
10275 (main): Reset noack_mode on every connection.
10276 * server.h (noack_mode): Declare.
10277
a417dc56
RW
102782008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10279
10280 * Makefile.in (GDBREPLAY_OBS): New variable.
10281 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10282
3221518c
UW
102832008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10284 Daniel Jacobowitz <dan@codesourcery.com>
10285
10286 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10287 (usr_store_inferior_registers): Likewise.
10288 (regsets_store_inferior_registers): Likewise.
10289
ec56be1b
PA
102902008-07-31 Rolf Jansen <rj@surtec.com>
10291 Pedro Alves <pedro@codesourcery.com>
10292
10293 * configure.ac: Check for memmem declaration.
10294 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10295 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10296 (disable_packet_qfThreadInfo): Unconditionally compile.
10297 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10298 * configure, config.in: Regenerate.
10299
2fe5e3ff
DE
103002008-07-28 Doug Kwan <dougkwan@google.com>
10301
10302 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10303 (linux_write_memory): Remove declaration of errno.
10304
836acd6d
UW
103052008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10306
10307 * linux-low.c (handle_extended_wait): Do not use "status"
10308 variable uninitialized.
10309
aeba519e
PA
103102008-07-07 Pedro Alves <pedro@codesourcery.com>
10311
10312 * server.c (handle_v_attach): Inhibit reporting dll changes.
10313
db42f210
PA
103142008-06-27 Pedro Alves <pedro@codesourcery.com>
10315
10316 * remote-utils.c (prepare_resume_reply): If requested, don't
10317 output "thread:TID" in the T stop reply.
10318
10319 * server.c (disable_packet_vCont, disable_packet_Tthread)
10320 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10321 (handle_query): If requested, disable support for qC, qfThreadInfo
10322 and qsThreadInfo.
10323 (handle_v_requests): If requested, disable support for vCont.
10324 (gdbserver_show_disableable): New.
10325 (main): Handle --disable-packet and --disable-packet=LIST.
10326
10327 * server.h (disable_packet_vCont, disable_packet_Tthread)
10328 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10329
8e4c5421
CD
103302008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10331
10332 * server.c (gdbserver_usage): Mention --version.
10333
6e23a804
DJ
103342008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10335
10336 * Makefile.in (gdbreplay.o): New rule.
10337
90aa6a40
JM
103382008-06-06 Joseph Myers <joseph@codesourcery.com>
10339
10340 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10341 message, not gdbserver.
10342
c16158bc 103432008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
10344 Nathan Sidwell <nathan@codesourcery.com>
10345 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
10346
10347 * acinclude.m4: Include ../../config/acx.m4.
10348 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10349 * configure, config.in: Regenerate.
10350 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10351 * server.c (gdbserver_version): Print PKGVERSION.
10352 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10353 (main): Adjust gdbserver_usage calls.
10354 * gdbreplay.c (version, host_name): Add declarations.
10355 (gdbreplay_version, gdbreplay_usage): New.
10356 (main): Accept --version and --help options.
10357
aeb75bf5
DJ
103582008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10359
10360 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10361 (arm_breakpoint_at): Handle Thumb.
10362 (the_low_target): Add comment.
10363
76b233dd
UW
103642008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10365
10366 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10367
08388c79
DE
103682008-05-09 Doug Evans <dje@google.com>
10369
a3c83fae
DE
10370 * server.h (decode_search_memory_packet): Declare.
10371 * remote-utils.c (decode_search_memory_packet): New fn.
10372 * server.c (handle_search_memory_1): New fn.
08388c79
DE
10373 (handle_search_memory): New fn.
10374 (handle_query): Process qSearch:memory packets.
10375
bb9c3d36
UW
103762008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10377
10378 * regcache.c (registers_length): Remove.
10379 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10380 full register packet.
10381 * regcache.h (registers_length): Remove prototype.
10382 * server.h (PBUFSIZ): Define to 16384.
10383
7284e1be
UW
103842008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10385
10386 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10387 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10388 powerpc-64l.o, and powerpc-altivec64l.o.
10389 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10390 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10391 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10392 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10393 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10394 to srv_xmlfiles.
10395
10396 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10397 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10398 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10399 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10400 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10401 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10402 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10403 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10404 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10405 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10406 (clean): Update.
10407
10408 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10409 (init_registers_powerpc_32l): ... this new prototype.
10410 (init_registers_powerpc_32): Remove, replace by ...
10411 (init_registers_powerpc_altivec32l): ... this new prototype.
10412 (init_registers_powerpc_e500): Remove, replace by ...
10413 (init_registers_powerpc_e500l): ... this new prototype.
10414 (init_registers_ppc64): Remove, replace by ...
10415 (init_registers_powerpc_64l): ... this new prototype.
10416 (init_registers_powerpc_64): Remove, replace by ...
10417 (init_registers_powerpc_altivec64l): ... this new prototype.
10418 (ppc_num_regs): Set to 73.
10419 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10420 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10421 (ppc_cannot_store_register): Handle orig_r3 and trap.
10422 (ppc_arch_setup): Update init_registers_... calls.
10423 (ppc_fill_gregset): Handle orig_r3 and trap.
10424
10425 * inferiors.c (clear_inferiors): Reset current_inferior.
10426
fdc59709
PB
104272008-04-23 Paolo Bonzini <bonzini@gnu.org>
10428
889bf7c5
PA
10429 * acinclude.m4: Add override.m4.
10430 * configure: Regenerate.
fdc59709 10431
c9b2f845
UW
104322008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10433
10434 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10435 initial call to init_register_ppc64.
10436
550512b8
UW
104372008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10438
43aaf8b6
PA
10439 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10440 single powerpc*-*-linux* case.
550512b8
UW
10441 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10442
b6430ec3
UW
104432008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10444
10445 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 10446 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
10447 from reg_xmlfiles.
10448 * linux-ppc-low.c: Include <elf.h>.
10449 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10450 (ppc_hwcap): New global variable.
10451 (ppc_regmap): Remove __SPE__ #ifdef sections.
10452 (ppc_regmap_e500): New global variable.
10453 (ppc_cannot_store_register): Update __SPE__ special case.
10454 (ppc_get_hwcap): New function.
10455 (ppc_arch_setup): Use it to determine whether inferior supports
10456 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10457 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10458 Do not access registers if target does not support AltiVec.
10459 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10460 Do not access registers if target does not support SPE.
10461 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10462
52fa2412
UW
104632008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10464
10465 * linux-low.c (disabled_regsets, num_regsets): New.
10466 (use_regsets_p): Delete.
10467 (linux_wait_for_process): Clear disabled_regsets.
10468 (regsets_fetch_inferior_registers): Check and set it.
10469 (regsets_store_inferior_registers): Likewise.
10470 (linux_fetch_registers, linux_store_registers): Do not use
10471 use_regsets_p.
10472 (initialize_low): Allocate disabled_regsets.
10473
e28b3332
DJ
104742008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10475
10476 * Makefile.in (LIBOBJS): New.
10477 (OBS): Use LIBOBJS.
10478 (memmem.o): New rule.
10479 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10480 * configure: Regenerated.
10481
4536995d
UW
104822008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10483
10484 * server.c (handle_query): Never return "unsupported" for
10485 qXfer:features:read queries.
10486
221c031f
UW
104872008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10488
10489 * server.c (get_features_xml): Fix inverted condition.
10490 (handle_query): Always support qXfer:feature:read.
10491
ccd213ac
DJ
104922008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10493
10494 * server.c (wrapper_argv): New.
10495 (start_inferior): Handle wrapper_argv. If set, expect an extra
10496 trap.
10497 (gdbserver_usage): Document --wrapper.
10498 (main): Parse --wrapper.
10499
6fe305f7
UW
105002008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10501
10502 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10503 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10504 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10505 (ppc_set_pc): Likewise.
10506 (ppc_arch_setup): New function.
10507 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10508 of collect_register.
889bf7c5 10509 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 10510
5b0a002e
UW
105112008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10512
10513 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10514 instead of linux-ppc64-low.o.
10515 * linux-ppc64-low.c: Remove file.
10516 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10517 (linux-ppc64-low.o): Remove rule.
10518
10519 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10520 (init_registers_powerpc_64): Likewise.
10521 (ppc_regmap): Conditionally define depending on __powerpc64__.
10522 (ppc_cannot_store_register): Do not special-case "fpscr" when
10523 compiled on __powerpc64__.
10524 (ppc_collect_ptrace_register): New function.
10525 (ppc_supply_ptrace_register): New function.
10526 (ppc_breakpoint): Change type to "unsigned int".
10527 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10528 (the_low_target): Conditionally provide initializers for the
889bf7c5 10529 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
10530 collect_ptrace_register and supply_ptrace_register members.
10531
9b4b61c8
UW
105322008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10533
10534 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10535 * server.c (gdbserver_xmltarget): Define.
10536 (get_features_xml): Use it to replace "target.xml" and arch_string.
10537
10538 * configure.srv: Remove srv_xmltarget. Add XML files that were
10539 mentioned there to srv_xmlfiles instead. Remove conditional tests
10540 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10541 srv_xmlfiles and srv_regobj to include all possible choices.
10542 * configure.ac (srv_xmltarget): Remove.
10543 (srv_xmlfiles): Do not add "target.xml".
10544 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10545 checks for supplementary target information.
10546 * configure: Regenerate.
10547 * Makefile.in (XML_TARGET): Remove.
10548 (target.xml): Remove rule.
10549 (clean): Do not clean up target.xml.
10550 (.PRECIOUS): Do not mention target.xml.
10551
10552 * target.h (struct target_ops): Remove arch_string member.
10553 * linux-low.c (linux_arch_string): Remove.
10554 (linux_target_ops): Remove arch_string initializer.
10555 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10556 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10557 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10558 * spu-low.c (spu_arch_string): Remove.
10559 (spu_target_ops): Remove arch_string initializer.
10560 * win32-low.c (win32_arch_string): Remove.
10561 (win32_target_ops): Remove arch_string initializer.
10562 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10563 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10564 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10565
ee1a7ae4
UW
105662008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10567
10568 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10569 by collect_ptrace_register and supply_ptrace_register hooks.
10570 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10571 instead of checking for the_low_target.left_pad_xfer.
10572 (usr_store_inferior_registers): Use collect_ptrace_register callback
10573 instead of checking for the_low_target.left_pad_xfer.
10574
10575 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10576 (s390_supply_ptrace_register): Likewise.
10577 (s390_fill_gregset): Call s390_collect_ptrace_register.
10578 (the_low_target): Update.
10579
10580 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10581 (ppc_supply_ptrace_register): Likewise.
10582 (the_low_target): Update.
10583
10584 * linux-i386-low.c (the_low_target): Update.
10585 * linux-x86-64-low.c (the_low_target): Update.
10586
d61ddec4
UW
105872008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10588
10589 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10590 reg-s390.o and reg-s390x.o.
10591
10592 * linux-low.c (new_inferior): New global variable.
10593 (linux_create_inferior, linux_attach): Set it.
10594 (linux_wait_for_process): Call the_low_target.arch_setup after the
10595 target has stopped for the first time.
10596 (initialize_low): Do not call the_low_target.arch_setup.
10597
10598 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10599 (s390_set_pc): Likewise.
10600 (s390_arch_setup): New function.
10601 (the_low_target): Use s390_arch_setup as arch_setup routine.
10602
10603 * regcache.c (realloc_register_cache): New function.
10604 (set_register_cache): Call it for each existing regcache.
10605
d05b4ac3
UW
106062008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10607
10608 * server.h (init_registers): Remove prototype.
10609
10610 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10611 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10612 instead of init_registers ().
10613 * linux-arm-low.c (init_registers_arm): Add prototype.
10614 (init_registers_arm_with_iwmmxt): Likewise.
10615 (the_low_target): Add initializer for arch_setup field.
10616 * linux-cris-low.c (init_registers_cris): Add prototype.
10617 (the_low_target): Add initializer for arch_setup field.
10618 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10619 (the_low_target): Add initializer for arch_setup field.
10620 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10621 (the_low_target): Add initializer for arch_setup field.
10622 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10623 (the_low_target): Add initializer for arch_setup field.
10624 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10625 (the_low_target): Add initializer for arch_setup field.
10626 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10627 (the_low_target): Add initializer for arch_setup field.
10628 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10629 (init_registers_mips64_linux): Likewise.
10630 (the_low_target): Add initializer for arch_setup field.
10631 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10632 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10633 (the_low_target): Add initializer for arch_setup field.
10634 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10635 (init_registers_powerpc_64): Likewise.
10636 (the_low_target): Add initializer for arch_setup field.
10637 * linux-s390-low.c (init_registers_s390): Add prototype.
10638 (init_registers_s390x): Likewise.
10639 (the_low_target): Add initializer for arch_setup field.
10640 * linux-sh-low.c (init_registers_sh): Add prototype.
10641 (the_low_target): Add initializer for arch_setup field.
10642 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10643 (the_low_target): Add initializer for arch_setup field.
10644 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10645 (the_low_target): Add initializer for arch_setup field.
10646
10647 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10648 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10649 instead of init_registers ().
10650 * win32-arm-low.c (init_registers_arm): Add prototype.
10651 (the_low_target): Add initializer for arch_setup field.
10652 * win32-i386-low.c (init_registers_i386): Add prototype.
10653 (the_low_target): Add initializer for arch_setup field.
10654
10655 * spu-low.c (init_registers_spu): Add prototype.
10656 (initialize_low): Call initialie_registers_spu () instead of
10657 initialize_registers ().
10658
fd96d250
PA
106592008-02-19 Pedro Alves <pedro@codesourcery.com>
10660
10661 * server.c (handle_v_requests): When handling the vRun and vAttach
10662 packets, if already debugging a process, don't kill it. Return an
10663 error instead.
10664
d41b6bb4
DJ
106652008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10666
10667 * server.c (handle_query): Correct length check.
10668
5ac588cf
PA
106692008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10670
10671 * win32-low.c (do_initial_child_stuff): Add process handle
10672 parameter. Set current_process_handle and current_process_id from the
10673 parameters. Clear globals.
10674 (win32_create_inferior): Don't set current_process_handle and
10675 current_process_id here. Instead pass them on the call to
10676 do_initial_child_stuff.
10677 (win32_attach): Likewise.
10678 (win32_clear_inferiors): New.
10679 (win32_kill): Don't close the current process handle or the
10680 current thread handle here. Instead call win32_clear_inferiors.
10681 (win32_detach): Don't open a new handle to the process. Call
10682 win32_clear_inferiors.
10683 (win32_join): Don't rely on current_process_handle; open a new
10684 handle using the process id.
10685 (win32_wait): Call win32_clear_inferiors when the inferior process
10686 has exited.
10687
ecd7ecbc
DJ
106882008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10689
10690 * server.c (monitor_show_help): Add "exit".
10691
1525d545
MG
106922008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10693
ecd7ecbc 10694 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
10695 (clean): Add reg-xtensa.c.
10696 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
10697 * configure.srv (xtensa*-*-linux*) New target.
10698 * linux-xtensa-low.c: New.
10699 * xtensa-xtregs.c: New.
1525d545 10700
59a016f0
PA
107012008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10702
10703 * hostio.c: Don't include errno.h.
10704 (errno_to_fileio_errno): Move to hostio-errno.
10705 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10706 error number outputting to the target->hostio_last_error callback.
10707 (hostio_packet_error): Use FILEIO_EINVAL directly.
10708 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10709 calls to hostio_error.
10710 * hostio-errno.c: New.
10711 * server.h (hostio_last_error_from_errno): Declare.
10712 * target.h (target_ops): Add hostio_last_error member.
10713 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10714 as hostio_last_error handler.
889bf7c5 10715 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
10716 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10717 (wince_hostio_last_error): New functions.
10718 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10719 as hostio_last_error handler.
10720 (win32_target_ops) [!_WIN32_WCE]: Register
10721 hostio_last_error_from_errno as hostio_last_error handler.
10722 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10723 (hostio-errno.o): New rule.
10724 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10725 * configure.srv (srv_hostio_err_objs): New variable. Default to
10726 hostio-errno.o.
10727 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10728 * configure: Regenerate.
10729
2d717e4f
DJ
107302008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10731
10732 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10733 (linux_kill, linux_detach): Clean up the process list.
10734 * remote-utils.c (remote_open): Improve port number parsing.
10735 (putpkt_binary, input_interrupt): Only send interrupts if the target
10736 is running.
10737 * server.c (extended_protocol): Make static.
10738 (attached): Define earlier.
10739 (exit_requested, response_needed, program_argv): New variables.
10740 (target_running): New.
10741 (start_inferior): Clear attached here.
10742 (attach_inferior): Set attached here.
10743 (require_running): Define.
10744 (handle_query): Use require_running and target_running. Implement
10745 "monitor exit".
10746 (handle_v_attach, handle_v_run): New.
10747 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10748 (gdbserver_usage): Update.
10749 (main): Redo argument parsing. Handle --debug and --multi. Handle
10750 --attach along with other options or after the port. Save
10751 program_argv. Support no initial program. Resynchronize
10752 communication with GDB after an error. Handle "monitor exit".
10753 Use require_running and target_running. Always allow the extended
10754 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10755 restart in extended mode.
10756 * README: Refer to the GDB manual. Update --attach usage.
10757
7407e2de
AS
107582007-12-20 Andreas Schwab <schwab@suse.de>
10759
10760 * linux-low.c (STACK_SIZE): Define.
10761 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10762 (linux_test_for_tracefork): Likewise.
10763
b65d95c5
DJ
107642007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10765
10766 * linux-low.c (linux_wait_for_event): Update messages. Do not
10767 reinsert auto-delete breakpoints.
10768 * mem-break.c (struct breakpoint): Change return type of handler to
10769 int.
10770 (set_breakpoint_at): Update handler type.
10771 (reinsert_breakpoint_handler): Return 1 instead of calling
10772 delete_breakpoint.
10773 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10774 setting a new one.
10775 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10776 * mem-break.h (set_breakpoint_at): Update handler type.
10777 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10778 * win32-low.c (auto_delete_breakpoint): New.
10779 (get_child_debug_event): Use it.
10780
4e799345
DJ
107812007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10782
10783 * configure.ac: Check for pread and pwrite.
10784 * hostio.c (handle_pread): Fall back to lseek and read.
10785 (handle_pwrite): Fall back to lseek and write.
10786 * config.in, configure: Regenerated.
10787
27524b67
DJ
107882007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10789
10790 * server.c (myresume): Add own_buf argument.
10791 (main): Update calls.
10792
a20d5e98
DJ
107932007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10794
10795 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10796 * remote-utils.c (remote_open): Do not call disable_async_io.
10797 (block_async_io): Delete.
10798 (unblock_async_io): Make static.
10799 (initialize_async_io): New.
10800 * server.c (handle_v_cont): Handle async I/O here.
10801 (myresume): Likewise. Move other common resume tasks here...
10802 (main): ... from here. Call initialize_async_io. Disable async
10803 I/O before the main loop.
10804 * server.h (initialize_async_io): Declare.
10805 (block_async_io, unblock_async_io): Delete prototypes.
10806 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10807
b79d787e
DJ
108082007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10809
10810 * remote-utils.c (readchar): Allow binary data in received messages.
10811
d97903b2
PA
108122007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10813
10814 * win32-low.c (attaching): New global.
10815 (win32_create_inferior): Clear the `attaching' global.
10816 (win32_attach): Set the `attaching' global.
10817 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10818 attaching. Only set a breakpoint at the entry point if not
10819 attaching.
10820
311de423
PA
108212007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10822
10823 * server.c (main): Don't report dll events on the initial
10824 connection on attaches.
10825
6c2d16d2
PA
108262007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10827
10828 * server.c (main): Relax numerical bases supported for the pid of
10829 the --attach command line argument.
10830
5ca906e6
PA
108312007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10832
10833 * win32-low.c (win32_attach): Call OpenProcess before
10834 DebugActiveProcess, not after. Add last error output to error
10835 call.
10836
9c6c8194
PA
108372007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10838
10839 * win32-low.c (win32_get_thread_context)
10840 (win32_set_thread_context): New functions.
10841 (thread_rec): Use win32_get_thread_context.
10842 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10843 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10844 field.
10845
4d5d1aaa
PA
108462007-12-03 Leo Zayas
10847 Pedro Alves <pedro_alves@portugalmail.pt>
10848
10849 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10850 global variables.
10851 (child_add_thread): Minor cleanup.
10852 (child_continue): Resume artificially suspended threads before
10853 calling ContinueDebugEvent.
10854 (suspend_one_thread): New.
10855 (fake_breakpoint_event): New.
10856 (get_child_debug_event): Change return type to int. Check here if
10857 gdb sent an interrupt request. If a soft interrupt was requested,
10858 fake a breakpoint event. Return 0 if there is no event to handle,
10859 and 1 otherwise.
10860 (win32_wait): Don't check here if gdb sent an interrupt request.
10861 Ensure there is a valid event to handle.
10862 (win32_request_interrupt): Add soft interruption method as last
10863 resort.
10864
c436e841
PA
108652007-12-03 Leo Zayas
10866 Pedro Alves <pedro_alves@portugalmail.pt>
10867
10868 * win32-low.h (win32_thread_info): Add descriptions to the
10869 structure members. Replace `suspend_count' counter by a
10870 `suspended' flag.
10871 * win32-low.c (thread_rec): Update condition of when to get the
10872 context from the inferior. Rely on ContextFlags being set if it
10873 has already been retrieved. Only suspend the inferior thread if
10874 we haven't already. Warn if that fails.
10875 (continue_one_thread): s/suspend_count/suspended/. Only call
10876 ResumeThread once. Warn if that fails.
10877
e7b5fa67
PA
108782007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10879
10880 * win32-low.c (win32_wait): Don't read from the inferior when it
10881 has already exited.
10882
a385171d
PA
108832007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10884
10885 * Makefile.in (win32_low_h): New variable.
10886 (win32-low.o): Add dependency on $(win32_low_h).
10887 (win32-arm-low.o, win32-i386-low.o): New rules.
10888
f80c84b3
DJ
108892007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10890
10891 * hostio.c: Correct copyright year.
10892
a6b151f1
DJ
108932007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10894
10895 * Makefile.in (OBS): Add hostio.o.
10896 (hostio.o): New rule.
10897 * server.h (handle_vFile): Declare.
10898 * hostio.c: New file.
10899 * server.c (handle_v_requests): Take packet_len and new_packet_len
10900 for binary packets. Call handle_vFile.
10901 (main): Update call to handle_v_requests.
10902
f9387fc3
DJ
109032007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10904
10905 * linux-low.c: Include <sched.h>.
10906
51c2684e
DJ
109072007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10908
10909 * linux-low.c (linux_tracefork_grandchild): New.
10910 (linux_tracefork_child): Use clone.
10911 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10912
75f83163
JB
109132007-10-31 Joel Brobecker <brobecker@adacore.com>
10914
10915 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10916
da5898ce
DJ
109172007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10918
10919 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10920
24a09b5f
DJ
109212007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10922
10923 * inferiors.c (change_inferior_id): Delete.
10924 (add_pid_to_list, pull_pid_from_list): New.
10925 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10926 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10927 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10928 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10929 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10930 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10931 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10932 (using_threads): Always set to 1.
10933 (handle_extended_wait): New.
10934 (add_process): Do not set TID.
10935 (linux_create_inferior): Set must_set_ptrace_flags.
10936 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10937 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10938 (linux_thread_alive): Rename TID argument to LWPID.
10939 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10940 (linux_wait_for_event): Do not use TID or check using_threads. Update
10941 call to dead_thread_notify. Call handle_extended_wait.
10942 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10943 (send_sigstop): Delete sigstop_sent.
10944 (wait_for_sigstop): Avoid TID.
10945 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10946 (linux_test_for_tracefork): New.
10947 (linux_lookup_signals): Use thread_db_active and
10948 linux_supports_tracefork_flag.
10949 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10950 * linux-low.h (get_process_thread): Avoid TID.
10951 (struct process_ifo): Move thread_known and tid to the end. Remove
10952 sigstop_sent.
10953 (linux_attach_lwp, thread_db_init): Update prototypes.
10954 * server.h (change_inferior_id): Delete prototype.
10955 (add_pid_to_list, pull_pid_from_list): New prototypes.
10956 * thread-db.c (thread_db_use_events): New.
10957 (find_first_thread): Rename to...
10958 (find_one_thread): ...this. Update callers and messages. Do not
10959 call fatal. Check thread_db_use_events. Do not call
10960 change_inferior_id or new_thread_notify.
10961 (maybe_attach_thread): Update. Do not call new_thread_notify.
10962 (thread_db_init): Set thread_db_use_events. Check use_events.
10963 * utils.c (fatal, warning): Correct message prefix.
10964
30ed0a8f
DJ
109652007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10966
10967 * Makefile.in (clean): Remove new files.
10968 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10969 (powerpc-64.o, powerpc-64.c): New rules.
10970 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10971 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10972 with SPE.
10973 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10974 SPE targets.
10975 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10976 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10977 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10978 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10979 (target_regsets): Add AltiVec and SPE register sets.
10980 * configure.ac: Check for AltiVec and SPE.
10981 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10982 (ppc_fill_vrregset, ppc_store_vrregset): New.
10983 (target_regsets): Add AltiVec register set.
10984 * configure: Regenerated.
10985
fd462a61
DJ
109862007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10987
10988 * linux-low.c (O_LARGEFILE): Define.
10989 (linux_read_memory): Use /proc/PID/mem.
10990 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10991 * configure, config.in: Regenerated.
10992
69f223ed
DJ
109932007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10994
10995 * linux-low.c (linux_wait_for_event): Do not pass signals while
10996 single-stepping.
10997
aec18585
PA
109982007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10999
11000 * win32-low.c (create_process): New.
11001 (win32_create_inferior): Use create_process instead of
11002 CreateProcess. If create_process failed retry appending an ".exe"
11003 suffix. Store the GetLastError result immediatelly after
11004 create_process calls and use it on the call to error.
11005
34d86ddd
PA
110062007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11007
11008 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11009
5a0e3bd0
JB
110102007-08-23 Joel Brobecker <brobecker@adacore.com>
11011
11012 * configure.ac: Switch license to GPLv3.
11013
f88c79e6
MS
110142007-08-01 Michael Snyder <msnyder@access-company.com>
11015
11016 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11017
6b3d9b83
PA
110182007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
11019
11020 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11021 typedef.
11022 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11023 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
11024 CloseToolhelp32Snapshot.
11025 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11026 CloseToolhelp32Snapshot.
11027
c588c53c
MS
110282007-07-27 Michael Snyder <michael.snyder@access-company.com>
11029
11030 * server.c (main): Check for inferior exit before main loop.
11031
aa0403d9
PA
110322007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
11033
11034 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11035 instead of on tmp_desc.
11036
255e7678
DJ
110372007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11038 Daniel Jacobowitz <dan@codesourcery.com>
11039
11040 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11041 (add_thread): Minor cleanups.
11042 (clear_inferiors): Move lower in the file. Clear the DLL
11043 list.
11044 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11045 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11046 (xml_escape_text): New.
11047 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11048 for qSupported.
11049 (handle_v_cont): Report errors.
11050 (gdbserver_version): Update.
11051 (main): Correct size of own_buf. Do not report initial DLL events.
11052 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11053 (unloaded_dll, xml_escape_text): New.
11054 * win32-low.c (enum target_waitkind): Update comments.
11055 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11056 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11057 (win32_EnumProcessModules, win32_GetModuleInformation)
11058 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11059 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11060 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11061 (win32_Module32First, win32_Module32Next, load_toolhelp)
11062 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11063 (get_child_debug_event): Handle DLL events.
11064 (win32_wait): Likewise.
11065
0d37add9
DJ
110662007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11067
11068 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11069 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11070
45e2715e
PA
110712007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11072
11073 * win32-low.c (handle_output_debug_string): Ignore event if not
11074 waiting.
11075
c5674cf1
PA
110762007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11077
11078 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11079
2bbe3cc1
DJ
110802007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11081
11082 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11083
ae13219e
DJ
110842007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11085
11086 * inferiors.c (change_inferior_id): Add comment.
11087 * linux-low.c (check_removed_breakpoint): Add an early
11088 prototype. Improve debug output.
11089 (linux_attach): Doc update.
11090 (linux_detach_one_process, linux_detach): Clean up before releasing
11091 each process.
11092 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11093 * linux-low.h (struct process_info): Doc improvement.
11094 * mem-break.c (delete_all_breakpoints): New.
11095 * mem-break.h (delete_all_breakpoints): New prototype.
11096 * thread-db.c (find_first_thread): New.
11097 (thread_db_create_event): Call it instead of
11098 thread_db_find_new_threads. Clean up unused variables.
11099 (maybe_attach_thread): Remove first thread handling.
11100 (thread_db_find_new_threads): Use find_first_thread.
11101 (thread_db_get_tls_address): Likewise.
11102
4105de34
DJ
111032007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11104
11105 * thread-db.c (thread_db_find_new_threads): Add prototype.
11106 (thread_db_create_event): Check for the main thread before adding
11107 a new thread.
11108 (maybe_attach_thread): Only enable event reporting if TID == 0.
11109 (thread_db_get_tls_address): Check for new threads.
11110
2b876972
DJ
111112007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11112
11113 * linux-low.c (linux_create_inferior): Try execv before execvp.
11114 * spu-low.c (spu_create_inferior): Likewise.
11115
7a245884
DJ
111162007-06-13 Mike Frysinger <vapier@gentoo.org>
11117
11118 * linux-low.c (linux_create_inferior): Change execv to execvp.
11119 * spu-low.c (spu_create_inferior): Likewies.
11120
117ce543
DJ
111212007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11122
11123 * Makefile.in (clean): Clean new files instead of deleted ones.
11124 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11125 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11126 rules.
11127 * configure.srv: Specify XML files and new regformats for MIPS and
11128 MIPS64 GNU/Linux.
11129 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11130 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11131 an entry for the restart register.
11132 (mips_cannot_fetch_register, mips_cannot_store_register)
11133 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11134 register names to match the XML descriptions.
11135 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11136 restart register instead of $0.
11137
0e7f50da
UW
111382007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11139 Markus Deuling <deuling@de.ibm.com>
11140
11141 * remote-utils.c (decode_xfer_write): New function.
11142 * server.h (decode_xfer_write): Add prototype.
11143 * server.c (handle_query): Add PACKET_LEN argument. Support
11144 qXfer:spu:read and qXfer:spu:write packets.
11145 (main): Pass packet_len to handle_query.
11146 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11147 * target.h (target_ops): Add qxfer_spu.
11148
374c1d38
UW
111492007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11150
11151 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11152 accessing non-seekable spufs files.
11153
bb63802a
UW
111542007-05-16 Markus Deuling <deuling@de.ibm.com>
11155
889bf7c5 11156 * server.c (handle_query): Add reply for qC packet.
bb63802a 11157
7390519e
PA
111582007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11159 Leo Zayas <lerele@champenstudios@com>
11160
11161 * server.h (check_remote_input_interrupt_request): New function.
11162 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11163 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11164 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11165 (check_remote_input_interrupt_request): New function.
11166 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 11167 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
11168 winapi_GenerateConsoleCtrlEvent): New typedefs.
11169 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11170 to 250 ms.
11171 (win32_wait): Check for remote interrupt request
11172 with check_remote_input_interrupt_request.
11173 (win32_request_interrupt): New function.
11174 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11175
34b34921
PA
111762007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11177
11178 * win32-low.c (debug_registers_changed,
11179 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11180 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11181 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11182 (thread_rec): Get context using the low target.
11183 (child_add_thread): Call thread_added on the low target,
11184 which does the same thing.
11185 (regptr): Delete.
11186 (do_initial_child_stuff): Remove debug registers references.
11187 Set context using the low target. Resume threads after
11188 setting the contexts.
11189 (child_continue): Remove dead variable. Remove debug
11190 registers references.
11191 (child_fetch_inferior_registers): Go through the low target.
11192 (do_child_store_inferior_registers): Remove.
11193 (child_store_inferior_registers): Go through the low target.
11194 (win32_resume): Remove debug registers references.
11195 Set context using the low target.
11196 (handle_exception): Change return type to void. Don't record
11197 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11198 first chance exception.
889bf7c5 11199 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
11200 goto loop. Always return after waiting for debug event.
11201 (win32_wait): Convert to switch statement. Handle spurious
11202 events.
11203
11204 * win32-i386-low.c (debug_registers_changed,
11205 debug_registers_used): New.
11206 (initial_stuff): Rename to ...
11207 (i386_initial_stuff): ... this. Clear debug registers
11208 state variables.
11209 (store_debug_registers): Delete.
11210 (i386_get_thread_context): New.
11211 (load_debug_registers): Delete.
11212 (i386_set_thread_context): New.
11213 (i386_thread_added): New.
11214 (single_step): Rename to ...
11215 (i386_single_step): ... this.
11216 (do_fetch_inferior_registers): Rename to ...
11217 (i386_fetch_inferior_register): ... this.
11218 (i386_store_inferior_register): New.
11219 (the_low_target): Adapt to new interface.
11220
11221 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11222 (arm_get_thread_context): New.
11223 (arm_set_thread_context): New.
11224 (regptr): New.
11225 (do_fetch_inferior_registers): Rename to ...
11226 (arm_fetch_inferior_register): ... this.
11227 (arm_store_inferior_register): New.
11228 (arm_wince_breakpoint): Reimplement as unsigned long.
11229 (arm_wince_breakpoint_len): Define.
11230 (the_low_target): Adapt to new interface.
11231
11232 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11233 load_debug_registers. Add get_thread_context, set_thread_context,
11234 thread_added and store_inferior_register. Rename
11235 fetch_inferior_registers to fetch_inferior_register.
11236 (regptr): Remove declaration.
11237
dd6953e1
PA
112382007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11239
11240 * linux-low.c (linux_detach): Change return type to int. Return 0.
11241 * spu-low.c (spu_detach): Likewise.
11242
444d6139
PA
112432007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11244
11245 * target.h (target_ops): Change return type of detach to int.
11246 Add join.
11247 (join_inferior): New.
11248 * server.c (main): Don't skip detach support on mingw32.
11249 If the inferior doesn't support detaching return error.
11250 Call join_inferior instead of using waitpid.
11251 * linux-low.c (linux_join): New.
11252 (linux_target_op): Add linux_join.
11253 * spu-low.c (spu_join): New.
11254 (spu_target_ops): Add spu_join.
11255 * win32-low.c (win32_detach): Adapt to new interface.
11256 Reopen current_process_handle before detaching. Issue a child
11257 resume before detaching.
11258 (win32_join): New.
11259 (win32_target_op): Add win32_join.
11260
1d5315fe
PA
112612007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11262
11263 * win32-low.c (win32-attach): Fix return value.
11264 * target.h (target_ops): Describe ATTACH return values.
11265
bf914831
PA
112662007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11267
11268 * win32-low.c (GETPROCADDRESS): Define.
11269 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11270 (winapi_DebugSetProcessKillOnExit): Likewise.
11271 (win32_create_inferior): Force usage of ansi CreateProcessA.
11272 (win32_attach): Use GETPROCADDRESS.
11273 (win32_detach): Likewise.
11274
f72f3e60
PA
112752007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11276
11277 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11278
ed50f18f
PA
112792007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11280
11281 * win32-low.c: Commit leftover changes from 2007-03-29.
11282
0c2ead7e
DJ
112832007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11284
11285 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11286 fields short instead of int. Add explicit padding.
11287 (i387_cache_to_fsave): Remove unnecessary casts.
11288 (i387_fsave_to_cache): Doc fix.
11289 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11290
73725ff3
DJ
112912007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11292
11293 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11294 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11295
d99f33d8
PA
112962007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11297
11298 * configure.srv (arm*-*-mingw32ce*): Move near the other
11299 arm targets.
11300
68070c10
PA
113012007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11302
2482afc6 11303 * configure.ac: Add errno checking.
68070c10
PA
11304 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11305 sys/file.h and malloc.h.
11306 (AC_CHECK_DECLS): Add perror.
11307 (srv_mingwce): Handle.
2482afc6 11308 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
11309 win32-i386-low.o to srv_tgtobj.
11310 (i[34567]86-*-mingw*): Likewise.
11311 (arm*-*-mingw32ce*): Add case.
11312 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11313 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11314 [__MINGW32CE__] (strerror): New function.
11315 [__MINGW32CE__] (errno): Define to GetLastError.
11316 [__MINGW32CE__] (COUNTOF): New macro.
11317 (remote_open): Remove extra close call.
11318 * mem-break.c (delete_breakpoint_at): New function.
11319 * mem-break.h (delete_breakpoint_at): Declare.
11320 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11321 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11322 [USE_WIN32API] (read, write): Add char* casts.
11323 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11324 * server.h: Include wincecompat.h on Windows CE.
11325 [HAVE_ERRNO_H]: Check.
11326 (perror): Declare if not declared.
11327 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11328 (perror_with_name): Remove errno declaration.
11329 * wincecompat.h: New.
11330 * wincecompat.c: New.
11331 * win32-low.h: New.
11332 * win32-arm-low.c: New.
11333 * win32-i386-low.c: New.
11334 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11335 (OUTMSG2): Make it safe.
11336 (_T): New macro.
11337 (COUNTOF): New macro.
11338 (NUM_REGS): Get it from the low target.
11339 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11340 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11341 (thread_rec): Let low target handle debug registers.
11342 (child_add_thread): Likewise.
11343 (child_init_thread_list): Likewise.
11344 (continue_one_thread): Likewise.
11345 (regptr): New.
11346 (do_child_fetch_inferior_registers): Move to ...
11347 * win32-i386-low.c: ... here, and rename to ...
11348 (do_fetch_inferior_registers): ... this.
889bf7c5 11349 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
11350 Go through the low target.
11351 (do_child_store_inferior_registers): Use regptr.
11352 (strwinerror): New function.
11353 (win32_create_inferior): Handle Windows CE.
11354 Use strwinerror instead of strerror on Windows error
11355 codes. Add program to the error output.
11356 Don't close the main thread handle on Windows CE.
11357 (win32_attach): Use coredll.dll on Windows CE.
11358 (win32_kill): Close current process and current
11359 thread handles.
11360 (win32_detach): Use coredll.dll on Windows CE.
11361 (win32_resume): Let low target handle debug registers, and
11362 step request.
11363 (handle_exception): Add/Remove initial breakpoint. Avoid
11364 non-existant WSTOPSIG on Windows CE.
11365 (win32_read_inferior_memory): Cast to remove warning.
11366 (win32_arch_string): Go through the low target.
11367 (initialize_low): Call set_breakpoint_data with the low
11368 target's breakpoint.
11369 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11370 FOP_REGNUM, mappings): Move to ...
11371 * win32-i386-low.c: ... here.
11372 * win32-low.c (win32_thread_info): Move to ...
11373 * win32-low.h: ... here.
11374 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11375 win32-arm-low.c and wincecompat.c.
11376 (all:): Add $EXEEXT.
11377 (install-only:): Likewise.
11378 (gdbserver:): Likewise.
11379 (gdbreplay:): Likewise.
11380 * config.in: Regenerate.
11381 * configure: Regenerate.
11382
41093d81
PA
113832007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11384
11385 * win32-low.c: Rename typedef thread_info to
11386 win32_thread_info throughout.
11387
544afa54
PA
113882007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11389
11390 * win32-i386-low.c: Rename to ...
11391 * win32-low.c: ... this.
11392 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11393 * Makefile.in: Likewise.
11394
bce7165d
PA
113952007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11396
11397 * remote-utils.c (monitor_output): Constify msg parameter.
11398 * server.h (monitor_output): Likewise.
11399 * win32-i386-low.c (handle_output_debug_string): New.
11400 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11401 handle_output_debug_string.
11402 (get_child_debug_event): Likewise.
11403
506c7aa0
DJ
114042007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11405
11406 * server.c (main): Correct strtoul check.
11407
42c81e2a
DJ
114082007-03-27 Jon Ringle <jon@ringle.org>
11409
11410 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11411
9453113a
DJ
114122007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11413
11414 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11415
64a69107
DJ
114162007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11417
11418 * terminal.h: Check HAVE_SGTTY_H.
11419
114202007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
11421
11422 * remote-utils.c (remote_open): Print out the assigned port number.
11423
c74d0ad8
DJ
114242007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11425
11426 * remote-utils.c (monitor_output): New function.
11427 * server.c (debug_threads): Define here.
11428 (monitor_show_help): New function.
11429 (handle_query): Handle qRcmd.
11430 (main): Do not handle 'd' packet.
11431 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11432 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11433 of debug_threads.
11434
de7c3b4a
PA
114352007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11436
11437 * Makefile.in (EXEEXT): New.
11438 (clean): Use $(EXEEXT).
11439
ef57601b
PA
114402007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11441
11442 * target.h (target_ops): Rename send_signal to request_interrupt,
11443 and remove enum target_signal parameter.
11444 * linux-low.c (linux_request_interrupt): Rename from
11445 linux_send_signal, and always send SIGINT.
11446 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11447 and always send SIGINT.
11448 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11449 of send_signal.
11450 (input_interrupt): Likewise.
11451
820f2bda
PA
114522007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11453
11454 * server.c (get_features_xml): Check if target implemented
11455 arch_string.
11456 * win32-i386-low.c (win32_arch_string): New.
11457 (win32_target_ops): Add win32_arch_string as arch_string member.
11458
ab39bf24
UW
114592007-02-22 Markus Deuling <deuling@de.ibm.com>
11460
11461 * spu-low.c (spu_arch_string): New.
11462 (spu_target_ops): Add spu_arch_string.
11463
61ff6e04
DJ
114642007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11465
11466 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11467 * configure.ac: Do not check for terminal.h.
11468 * configure, config.in: Regenerated.
11469
fb1e4ffc
DJ
114702007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11471
11472 * Makefile.in (OBS): Add $(XML_BUILTIN).
11473 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11474 (clean): Update.
11475 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11476 (arm-with-iwmmxt.c): New.
11477 * config.in, configure: Regenerate.
11478 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11479 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11480 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11481 (arm*-*-linux*): Add iWMMXt and regset support.
11482 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11483 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11484 (arm_store_wmmxregset, target_regsets): New.
11485 * server.c (get_features_xml): Take annex argument. Check builtin
11486 XML documents.
11487 (handle_query): Handle multiple annexes.
11488
0f48aa01
DJ
114892007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11490
11491 * remote-utils.c [USE_WIN32API] (read, write): Define.
11492 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11493 write.
11494
23181151
DJ
114952007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11496
11497 * linux-i386-low.c (the_low_target): Set arch_string.
11498 * linux-x86-64-low.c (the_low_target): Likewise.
11499 * linux-low.c (linux_arch_string): New.
11500 (linux_target_ops): Add it.
11501 * linux-low.h (struct linux_target_ops): Add arch_string.
11502 * server.c (write_qxfer_response): Use const void * for DATA.
11503 (get_features_xml): New.
11504 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11505 * target.h (struct target_ops): Add arch_string method.
11506
9d606399
DJ
115072007-01-03 Denis Pilat <denis.pilat@st.com>
11508 Daniel Jacobowitz <dan@codesourcery.com>
11509
11510 * linux-low.c (linux_kill): Handle being called with no threads.
11511 * win32-i386-low.c (win32_kill): Likewise.
11512 (get_child_debug_event): Clear current_process_handle.
11513
115142006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
11515 Daniel Jacobowitz <dan@codesourcery.com>
11516
11517 * remote-utils.c (remote_open): Check the type of specified
11518 serial port devices before opening them.
11519 * server.c (main): Kill the inferior if an error occurs during
11520 the first remote_open.
11521
a5e13d24
DJ
115222006-12-05 Markus Deuling <deuling@de.ibm.com>
11523
11524 * README: Update supported targets.
11525
186947f7
DJ
115262006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11527
11528 * Makefile.in (clean): Remove reg-mips64.c.
11529 (reg-mips64.c, reg-mips64.o): New rules.
11530 * configure.srv: Handle mips64. Include regset support for mips.
11531 * linux-mips-low.c (union mips_register): New.
11532 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11533 (mips_breakpoint, mips_breakpoint_at): Use int.
11534 (mips_collect_register, mips_supply_register)
11535 (mips_collect_register_32bit, mips_supply_register_32bit)
11536 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11537 (mips_store_fpregset, target_regsets): New.
11538 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11539
a13e2c95
UW
115402006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11541
11542 * configure.srv: Add target "spu*-*-*".
11543 * Makefile.in (clean): Remove reg-spu.c.
11544 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11545 * spu-low.c: New file.
11546
cb7283db
DJ
115472006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11548
11549 * configure.ac: Correct td_thr_tls_get_addr test.
11550 * configure: Regenerated.
11551
89be2091
DJ
115522006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11553
11554 * linux-low.c (linux_wait_for_event): Reformat. Use the
11555 pass_signals array.
11556 * remote-utils.c (decode_address_to_semicolon): New.
11557 * server.c (pass_signals, handle_general_set): New.
11558 (handle_query): Mention QPassSignals for qSupported.
11559 (main): Call handle_general_set.
11560 * server.h (pass_signals, decode_address_to_semicolon): New.
11561
000ef4f0
DJ
115622006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11563
11564 * server.c (handle_query): Correct error handling for read_auxv.
11565
b7149293
UW
115662005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11567
11568 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11569 and srv_linux_thread_db to yes.
11570 * linux-s390-low.c (s390_fill_gregset): New function.
11571 (target_regsets): Define data structure.
11572
dae5f5cf
DJ
115732006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11574
11575 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11576 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11577 * config.in, configure: Regenerated.
11578 * inferiors.c (gdb_id_to_thread): New function.
11579 (gdb_id_to_thread_id): Use it.
11580 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11581 * linux-low.h (struct process_info): Add th member.
11582 (thread_db_get_tls_address): New prototype.
11583 * remote-utils.c (decode_address): Make non-static.
11584 * server.c (handle_query): Handle qGetTLSAddr.
11585 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11586 * target.h (struct target_ops): Add get_tls_address.
11587 * thread-db.c (maybe_attach_thread): Save the thread handle.
11588 (thread_db_get_tls_address): New.
11589
32ca6d61
DJ
115902006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11591
11592 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11593 (linux_resume_one_process): Take a siginfo_t *. Update all
11594 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11595 (struct pending_signals): Add a siginfo_t.
11596 (linux_wait_for_process): Always set last_status.
11597 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11598 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11599 * linux-low.h (struct process_info): Add last_status.
11600
5ffff7c1
DJ
116012006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11602
11603 * remote-utils.c (try_rle): New function.
11604 (putpkt_binary): Use it.
11605
8695c747
DJ
116062006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11607
11608 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11609 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11610 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11611 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11612 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11613 point registers.
11614
290fadea
RS
116152006-08-08 Richard Sandiford <richard@codesourcery.com>
11616
11617 * server.c (terminal_fd): New variable.
11618 (old_foreground_pgrp): Likewise.
11619 (restore_old_foreground_pgrp): New function.
11620 (start_inferior): Record the terminal file descriptor in terminal_fd
11621 and its original foreground group in old_foreground_pgrp. Register
11622 restore_old_foreground_pgrp with atexit().
11623
9f2e1e63
DJ
116242006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11625
11626 * server.c (handle_query): Correct qPart to qXfer.
11627
b80864fb
DJ
116282006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11629
11630 * configure.ac: Check for more headers which are missing on
11631 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11632 * configure.srv: Add Cygwin and mingw32.
11633 * remote-utils.c: Don't include headers unconditionally which
11634 are missing on mingw32. Include <winsock.h> for mingw32.
11635 (remote_open): Adjust for mingw32 support. Flush
11636 standard error after writing to it.
11637 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11638 (unblock_async_io, enable_async_io, disable_async_io)
11639 (readchar, getpkt): Update for Winsock support.
11640 (prepare_resume_reply): Expect a protocol signal number.
11641 * server.c: Disable <sys/wait.h> on mingw32.
11642 (start_inferior): Adjust for mingw32 support. Flush
11643 standard error after writing to it.
11644 (attach_inferior): Likewise. Use protocol signal
11645 numbers.
11646 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11647 and names.
11648 * win32-i386-low.c: New file.
11649 * Makefile.in (XM_CLIBS): Set.
11650 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11651 (win32-i386-low.o): New dependency rule.
11652 * linux-low.c (linux_wait): Use target signal numbers.
11653 * target.h (struct target_ops): Doc fix.
11654 * server.h (target_signal_to_name): New prototype.
11655 * gdbreplay.c: Don't include headers unconditionally which
11656 are missing on mingw32. Include <winsock.h> for mingw32.
11657 (remote_close, remote_open): Adjust for Winsock support.
11658 * configure, config.in: Regenerated.
11659
0876f84a
DJ
116602006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11661
11662 * server.c (decode_xfer_read, write_qxfer_response): New.
11663 (handle_query): Take a packet length argument. Handle
11664 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11665 the qSupported response.
11666 (main): Update call to handle_query.
11667
01f9e8fa
DJ
116682006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11669
11670 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11671 (putpkt_binary): Renamed from putpkt and adjusted for binary
11672 data.
11673 (putpkt): New wrapper for putpkt_binary.
11674 (readchar): Don't mask off the high bit.
11675 (decode_X_packet): New function.
11676 * server.c (main): Call putpkt_binary if a handler sets the packet
11677 length. Save the length of the incoming packet. Handle 'X'.
11678 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11679
be2a5f71
DJ
116802006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11681
11682 * server.c (handle_query): Handle qSupported.
11683
ea025f5f
DJ
116842006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11685
11686 * remote-utils.c (all_symbols_looked_up): New variable.
11687 (look_up_one_symbol): Check it.
11688 * server.h (look_up_one_symbol): New declaration.
11689 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11690
9308fc88
DJ
116912006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11692
11693 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 11694 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
11695 (PTRACE_GET_THREAD_AREA): Define.
11696 (ps_get_thread_area): New function.
11697
52fb6437
NS
116982006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11699
11700 * configure.srv (m68k*-*-uclinux*): New target.
11701 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11702 (linux_resume_one_process): Remove extraneous cast.
11703 (linux_read_offsets): New.
11704 (linux_target_op): Add linux_read_offsets on mmuless systems.
11705 * server.c (handle_query): Add qOffsets logic.
11706 * target.h (struct target_ops): Add read_offsets.
11707
21b0f40c
DJ
117082006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11709
11710 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11711 (PTRACE_GET_THREAD_AREA): Define.
11712 (ps_get_thread_area): New function.
11713 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11714 (linux-x86-64-low.o): Update.
11715
0050a760
DJ
117162006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11717
11718 * configure.ac: Remove checks for prfpregset_t.
11719 * gdb_proc_service.h: New file.
11720 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11721 new "gdb_proc_service.h".
11722 * proc-service.c: Likewise.
11723 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11724 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11725 * Makefile.in (gdb_proc_service_h): Updated.
11726 * configure, config.in: Regenerated.
11727
b92a518e
DJ
117282006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11729
11730 * remote-utils.c (prepare_resume_reply): Move declaration
11731 of gdb_id_from_wait to the top of the block.
11732
545587ee
DJ
117332006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11734
11735 * linux-low.c (regsets_store_inferior_registers): Read the regset
11736 from the target before filling it.
11737
9db87ebd
DJ
117382006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11739
11740 * server.c (attach_inferior): Return SIGTRAP for a successful
11741 attach.
11742
dd24457d
DJ
117432006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11744
11745 * Makefile.in (OBS): Add version.o.
11746 (STAGESTUFF): Delete.
11747 (version.o): Add dependencies.
11748 (version.c): Replace rule.
11749 (clean): Remove version.c.
11750 * server.c (gdbserver_version): New.
11751 (gdbserver_usage): Use printf.
11752 (main): Handle --version and --help.
11753 * server.h (version, host_name): Add declarations.
11754
6f0f660e
EZ
117552005-12-23 Eli Zaretskii <eliz@gnu.org>
11756
889bf7c5
PA
11757 * linux-arm-low.c:
11758 * linux-arm-low.c:
11759 * inferiors.c:
11760 * i387-fp.h:
11761 * i387-fp.c:
11762 * gdbreplay.c:
11763 * regcache.c:
11764 * proc-service.c:
11765 * mem-break.h:
11766 * mem-break.c:
11767 * linux-x86-64-low.c:
11768 * linux-sh-low.c:
11769 * linux-s390-low.c:
11770 * linux-ppc64-low.c:
11771 * linux-ppc-low.c:
11772 * linux-mips-low.c:
11773 * linux-m68k-low.c:
11774 * linux-m32r-low.c:
11775 * linux-low.h:
11776 * linux-low.c:
11777 * linux-ia64-low.c:
11778 * linux-i386-low.c:
11779 * linux-crisv32-low.c:
11780 * thread-db.c:
11781 * terminal.h:
11782 * target.h:
11783 * target.c:
11784 * server.h:
11785 * server.c:
11786 * remote-utils.c:
11787 * regcache.h:
11788 * utils.c:
11789 * Makefile.in:
11790 * configure.ac:
6f0f660e
EZ
11791 * gdbserver.1: Add (C) after Copyright. Update the FSF
11792 address.
11793
9d1fb177
DJ
117942005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11795
11796 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11797 (arm_breakpoint_at): Recognize both breakpoints.
11798 (the_low_target): Use the correct breakpoint instruction.
11799
011a70c2
DJ
118002005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11801
11802 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11803 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11804 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11805 (the_low_target): Update.
11806
7fb85e41
AS
118072005-10-25 Andreas Schwab <schwab@suse.de>
11808
11809 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11810
11811 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11812 (ia64_num_regs): Reduce to 462.
11813
3db0444b
DJ
118142005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11815
11816 * acinclude.m4: Correct quoting.
11817 * aclocal.m4: Regenerated.
11818
11819 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11820 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11821 (thread_db_init): Call thread_db_err_str.
11822 * configure.ac: Check for TD_VERSION.
11823 * config.in, configure: Regenerated.
11824
bee0189a
DJ
118252005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11826
11827 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11828
e9d25b98
DJ
118292005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11830
11831 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11832 is not available. Define HAVE_PTRACE_GETREGS if it is.
11833 * config.in, configure: Regenerated.
11834 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11835 * linux-i386-low.c, linux-m68k-low.c: Update to use
11836 HAVE_PTRACE_GETREGS.
11837 * linux-low.c (regsets_fetch_inferior_registers)
11838 (regsets_store_inferior_registers): Only return 0 if we processed
11839 GENERAL_REGS.
11840 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11841 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11842
a06660f7
DJ
118432005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11844
11845 * inferiors.c (struct thread_info): Add gdb_id.
11846 (add_thread): Add gdb_id argument.
11847 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11848 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11849 calls to add_thread.
11850 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11851 * server.c (handle_query): Use thread_to_gdb_id.
11852 (handle_v_cont, main): Use gdb_id_to_thread_id.
11853 * server.h (add_thread): Update prototype.
11854 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11855 prototypes.
11856
5a1f5858
DJ
118572005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11858
11859 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11860 left-padded registers.
11861 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11862 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11863
e122f1f5
SE
118642005-07-01 Steve Ellcey <sje@cup.hp.com>
11865
11866 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11867 * configure: Regenerate.
11868 * config.in: Regenerate.
11869 * server.h (NEED_DECLARATION_STRERROR):
11870 Replace with !HAVE_DECL_STRERROR.
11871
d592fa2f
DJ
118722005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11873
11874 * linux-low.c (linux_wait, linux_send_signal): Don't test
11875 an unsigned long variable for > 0 if it could be MAX_ULONG.
11876 * server.c (myresume): Likewise.
11877 * target.c (set_desired_inferior): Likewise.
11878
ccbd4912
MK
118792005-06-13 Mark Kettenis <kettenis@gnu.org>
11880
11881 * configure.ac: Simplify and improve check for socklen_t.
11882 * configure, config.in: Regenerate.
11883
f450004a
DJ
118842005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11885
11886 * acconfig.h: Remove.
11887 * configure.ac: Add a test for socklen_t. Use three-argument
11888 AC_DEFINE throughout.
11889 * config.in: Regenerated using autoheader 2.59.
11890 * configure: Regenerated.
11891
11892 * gdbreplay.c (socklen_t): Provide a default.
11893 (remote_open): Use socklen_t.
11894 * remote-utils.c (socklen_t): Provide a default.
11895 (remote_open): Use socklen_t.
11896 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11897 unsigned char.
11898
11899 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11900 char for buffers.
11901 * linux-low.c (linux_read_memory, linux_write_memory)
11902 (linux_read_auxv): Likewise.
11903 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11904 (check_mem_write): Likewise.
11905 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11906 Likewise.
11907 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11908 (registers_from_string, register_data): Likewise.
11909 * server.c (handle_query, main): Likewise.
11910 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11911 (decode_M_packet): Likewise.
11912 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11913 * target.h (struct target_ops): Update read_memory, write_memory,
11914 and read_auxv.
11915 (read_inferior_memory, write_inferior_memory): Update.
11916 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11917 to unsigned char *.
11918 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11919 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11920 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11921 linux-s390-low.c, linux-sh-low.c: Update for changes in
11922 read_inferior_memory and the_low_target->breakpoint.
11923
eee84df1
DJ
119242005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11925
11926 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11927 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11928 * configure.srv: Add powerpc64-*-linux*.
11929 * linux-ppc64-low.c: New file.
11930
45b134e5
OF
119312005-05-23 Orjan Friberg <orjanf@axis.com>
11932
11933 * linux-cris-low.c: New file with support for CRIS.
11934 * linux-crisv32-low.c: Ditto for CRISv32.
11935 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11936 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 11937 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
11938 reg-crisv32.o, and reg-crisv32.c to make rules.
11939 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11940 recognized targets.
11941
48d93c75
UW
119422005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11943
11944 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11945 of sizeof (PTRACE_XFER_TYPE).
11946 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11947
e013ee27
OF
119482005-05-12 Orjan Friberg <orjanf@axis.com>
11949
889bf7c5 11950 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
11951 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11952 pointers for hardware watchpoint support.
11953 * linux-low.h (struct linux_target_ops): Ditto.
11954 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11955 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11956 to linux_target_ops.
11957 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11958 reply packet.
11959 * server.c (main): Recognize 'Z' and 'z' packets.
11960
b0ded00b
UW
119612005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11962
11963 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11964 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11965 (the_low_target): Add new members.
11966
8643e2ad
DJ
119672005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11968
11969 * proc-service.c (ps_lgetregs): Search all_processes instead of
11970 all_threads.
11971
fc620387
DJ
119722005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11973
11974 * server.c (start_inferior): Change return type to int.
11975 (attach_inferior): Change sigptr to int *.
11976 (handle_v_cont, handle_v_requests): Change signal to int *.
11977 (main): Change signal to int.
11978
119792005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
11980
11981 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11982 * configure.srv: Add m32r*-*-linux*.
11983 * linux-m32r-low.c: New file.
11984
e0e76420
DJ
119852005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11986
11987 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11988
a1928bad
DJ
119892005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11990
11991 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11992 Take unsigned long arguments for PIDs.
11993 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11994 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11995 (wait_for_sigstop, linux_resume_one_process)
11996 (regsets_fetch_inferior_registers, linux_send_signal)
11997 (linux_read_auxv): Likewise. Update the types of variables holding
11998 PIDs. Update format string specifiers.
11999 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12000 * remote-utils.c (prepare_resume_reply): Likewise.
12001 * server.c (cont_thread, general_thread, step_thread)
12002 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12003 unsigned long.
12004 (handle_query): Update format specifiers.
12005 (handle_v_cont, main): Use strtoul for thread IDs.
12006 * server.h (struct inferior_list_entry): Use unsigned long for ID.
12007 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12008 (general_thread, step_thread, thread_from_wait)
12009 (old_thread_from_wait): Update.
12010 * target.h (struct thread_resume): Use unsigned long for THREAD.
12011 (struct target_ops): Use unsigned long for arguments to attach and
12012 thread_alive.
12013
dcdb98d2
DJ
120142005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
12015
12016 * acinclude.m4: Include bfd/bfd.m4 directly.
12017 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
12018 <agriffis@toolchain.org>.
12019 * aclocal.m4, configure: Regenerated.
12020
bec39cab
AC
120212005-01-07 Andrew Cagney <cagney@gnu.org>
12022
12023 * configure.ac: Rename configure.in, require autoconf 2.59.
12024 * configure: Re-generate.
12025
434c4c77
DJ
120262004-12-08 Daniel Jacobowitz <dan@debian.org>
12027
12028 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
12029 LIBS when finished.
12030 * aclocal.m4: Regenerated.
12031 * configure: Regenerated.
12032
db1d3e1b
AS
120332004-11-21 Andreas Schwab <schwab@suse.de>
12034
12035 * linux-m68k-low.c (m68k_num_gregs): Define.
12036 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12037 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12038 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12039 (m68k_breakpoint_at): New. Add to the_low_target.
12040
12041 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12042 srv_linux_thread_db to yes.
12043
43360365
JB
120442004-10-20 Joel Brobecker <brobecker@gnat.com>
12045
12046 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12047 (ARCH_SET_FS): Likewise.
12048 (ARCH_GET_FS): Likewise.
12049 (ARCH_GET_GS): Likewise.
12050
fd500816
DJ
120512004-10-16 Daniel Jacobowitz <dan@debian.org>
12052
12053 * linux-i386-low.c (ps_get_thread_area): New.
12054 * linux-x86-64-low.c (ps_get_thread_area): New.
12055 * linux-low.c: Include <sys/syscall.h>.
12056 (linux_kill_one_process): Don't kill the first thread here.
12057 (linux_kill): Kill the first thread here.
12058 (kill_lwp): New function.
12059 (send_sigstop, linux_send_signal): Use it.
12060 * proc-service.c: Clean up #ifdefs.
12061 (fpregset_info): Delete.
12062 (ps_lgetregs): Update and enable implementation.
12063 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12064 implementations.
12065 * remote-utils.c (struct sym_cache, symbol_cache): New.
12066 (input_interrupt): Print a clearer message.
12067 (async_io_enabled): New variable.
12068 (enable_async_io, disable_async_io): Use it. Update comments.
12069 (look_up_one_symbol): Use the symbol cache.
12070 * thread-db.c (thread_db_look_up_symbols): New function.
12071 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12072
f6de3c42
DJ
120732004-10-16 Daniel Jacobowitz <dan@debian.org>
12074
12075 * configure.in: Test for -rdynamic.
12076 * configure: Regenerated.
12077 * Makefile (INTERNAL_LDFLAGS): New.
12078 (gdbserver, gdbreplay): Use it.
12079
2c0fc042
AC
120802004-09-02 Andrew Cagney <cagney@gnu.org>
12081
12082 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12083
075b3282
DJ
120842004-03-23 Daniel Jacobowitz <drow@mvista.com>
12085
12086 * linux-low.c (linux_wait): Clear all_processes list also.
12087
fa6a77dc
DJ
120882004-03-12 Daniel Jacobowitz <drow@mvista.com>
12089
12090 * linux-low.c: Include <errno.h>. Remove extern declaration of
12091 errno.
12092
6d782a97
DJ
120932004-03-12 Daniel Jacobowitz <drow@mvista.com>
12094
12095 * gdbreplay.c, server.h, utils.c: Update copyright years.
12096
3a7fb99b
DJ
120972004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12098
12099 * server.c (main): Print child status or termination signal from
12100 variable 'signal', not 'sig'.
12101
c3e735a6
DJ
121022004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12103
12104 * linux-low.c (linux_read_memory): Change return type to
12105 int. Check for and return error from ptrace().
12106 * target.c (read_inferior_memory): Change return type to int. Pass
12107 back return status from the_target->read_memory().
12108 * target.h (struct target_ops): Adapt *read_memory() prototype.
12109 Update comment.
12110 (read_inferior_memory): Adapt prototype.
12111 * server.c (main): Return an error packet if
12112 read_inferior_memory() returns an error.
12113
a59d1c82
DJ
121142004-03-04 Daniel Jacobowitz <drow@mvista.com>
12115
12116 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12117 Unify with other clean targets.
12118
dc3f8883
DJ
121192004-02-29 Daniel Jacobowitz <drow@mvista.com>
12120
12121 * server.c (handle_v_cont): Call set_desired_inferior.
12122
89a208da
DJ
121232004-02-29 Daniel Jacobowitz <drow@mvista.com>
12124
12125 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12126
62ea82f5
DJ
121272004-02-29 Daniel Jacobowitz <drow@mvista.com>
12128
12129 * linux-low.c (linux_wait): Unblock async I/O.
12130 (linux_resume): Block and enable async I/O.
12131 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12132 * server.h (block_async_io, unblock_async_io): Add prototypes.
12133
6910d122
DJ
121342004-02-29 Daniel Jacobowitz <drow@mvista.com>
12135
12136 * remote-utils.c (remote_open): Print a status notice after
12137 opening a TCP port.
12138 * server.c (attach_inferior): Print a status notice after
12139 attaching.
12140
121412004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
12142
12143 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12144
c89dc5d4
DJ
121452004-02-26 Daniel Jacobowitz <drow@mvista.com>
12146
12147 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12148 error packet.
12149 * server.c, target.h: Update copyright years.
12150
4b8dad4a
RM
121512004-02-25 Roland McGrath <roland@redhat.com>
12152
12153 * target.h (struct target_ops): New member `read_auxv'.
12154 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12155 * linux-low.c (linux_read_auxv): New function.
12156 (linux_target_ops): Initialize `read_auxv' member to that.
12157
d7446758
JB
121582004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12159
12160 Committed by Jim Blandy <jimb@redhat.com>.
12161
12162 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 12163 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
12164 instead of GPR_SIZE to distiguish s390 and s390x targets.
12165
5544ad89
DJ
121662004-01-31 Daniel Jacobowitz <drow@mvista.com>
12167
12168 * linux-low.c: Update copyright year.
12169 (check_removed_breakpoint): Clear pending_is_breakpoint.
12170 (linux_set_resume_request, linux_queue_one_thread)
12171 (resume_status_pending_p): New functions.
12172 (linux_continue_one_thread): Use process->resume.
12173 (linux_resume): Only resume threads if there are no pending events.
12174 * linux-low.h (struct process_info): Add resume request
12175 pointer.
12176
2a68b70e
DJ
121772004-01-30 Daniel Jacobowitz <drow@mvista.com>
12178
12179 * regcache.c (new_register_cache): Clear the allocated register
12180 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12181
64386c31
DJ
121822003-10-13 Daniel Jacobowitz <drow@mvista.com>
12183
12184 * linux-low.c (linux_resume): Take a struct thread_resume *
12185 argument.
12186 (linux_wait): Update call.
12187 (resume_ptr): New static variable.
12188 (linux_continue_one_thread): Renamed from
12189 linux_continue_one_process. Use resume_ptr.
12190 (linux_resume): Use linux_continue_one_thread.
12191 * server.c (handle_v_cont, handle_v_requests): New functions.
12192 (myresume): New function.
12193 (main): Handle 'v' case.
12194 * target.h (struct thread_resume): New type.
12195 (struct target_ops): Change argument of "resume" to struct
12196 thread_resume *.
12197 (myresume): Delete macro.
12198
c938e9b0
L
121992003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12200
12201 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12202 (uninstall): Support DESTDIR.
12203
7f313d07
BC
12204Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12205
12206 * configure.srv: Add xscale*linux copy of arm*linux entry.
12207
3b2fc2ea
DJ
122082003-07-24 Daniel Jacobowitz <drow@mvista.com>
12209
12210 * linux-arm-low.c (arm_reinsert_addr): New function.
12211 (the_low_target): Add arm_reinsert_addr.
12212
1c0a559e
MK
122132003-07-08 Mark Kettenis <kettenis@gnu.org>
12214
12215 * mem-break.c: Remove whitespace at end of file.
12216
43d5792c
DJ
122172003-06-28 Daniel Jacobowitz <drow@mvista.com>
12218
12219 * configure.in: Check whether we need to prototype strerror.
12220 * server.h: Optionally prototype strerror.
12221 * gdbreplay.c (perror_with_name): Use strerror.
12222 * linux-low.c (linux_attach_lwp): Use strerror.
12223 * utils.c (perror_with_name): Use strerror.
12224 * config.in, configure: Regenerated.
12225
c8a86edf
DJ
122262003-06-28 Daniel Jacobowitz <drow@mvista.com>
12227
12228 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12229 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12230
73d37363
DJ
122312003-06-20 Daniel Jacobowitz <drow@mvista.com>
12232
12233 * Makefile.in (SFILES): Update.
12234 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12235 low-sun3.c: Remove files.
12236
6ad8ae5c
DJ
122372003-06-17 Daniel Jacobowitz <drow@mvista.com>
12238
12239 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12240 (linux_detach_one_process, linux_detach): New functions.
12241 (linux_target_ops): Add linux_detach.
12242 * server.c (main): Handle 'D' packet.
12243 * target.h (struct target_ops): Add "detach" member.
12244 (detach_inferior): Define.
12245
1581182a
MK
122462003-06-13 Mark Kettenis <kettenis@gnu.org>
12247
12248 From Kelley Cook <kelleycook@wideopenwest.com>:
12249 * configure.srv: Accept i[34567]86 variants.
12250
e5379b03
DJ
122512003-06-05 Daniel Jacobowitz <drow@mvista.com>
12252
12253 * linux-low.c (linux_wait_for_event): Correct comment typos.
12254 (linux_resume_one_process): Call check_removed_breakpoint.
12255 (linux_send_signal): New function.
12256 (linux_target_ops): Add linux_send_signal.
12257 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12258 of kill.
12259 * target.h (struct target_ops): Add send_signal.
12260
2ff29de4
JB
122612003-05-29 Jim Blandy <jimb@redhat.com>
12262
12263 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12264 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12265 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12266 away part of the register's value.
12267
254787d4
DJ
122682003-03-26 Daniel Jacobowitz <drow@mvista.com>
12269
12270 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12271 (linux_wait_for_event, linux_init_signals): Likewise.
12272
94e10508
DJ
122732003-03-17 Daniel Jacobowitz <drow@mvista.com>
12274
12275 * configure.in: Check for stdlib.h.
12276 * configure: Regenerated.
12277 * config.in: Regenerated.
12278
4c0711e0
DJ
122792003-01-04 Andreas Schwab <schwab@suse.de>
12280
12281 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12282
ef66e766
AC
122832003-01-02 Andrew Cagney <ac131313@redhat.com>
12284
12285 * Makefile.in: Remove obsolete code.
12286
a1358604
DJ
122872002-11-20 Daniel Jacobowitz <drow@mvista.com>
12288
12289 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12290 defined(PT_FPR0_HI).
12291
23ce3b1c
DJ
122922002-11-17 Stuart Hughes <seh@zee2.com>
12293
12294 * linux-arm-low.c (arm_num_regs): Increase.
12295 (arm_regmap): Include status register.
12296
122972002-11-17 Daniel Jacobowitz <drow@mvista.com>
12298
12299 * linux-low.c (register_addr): Remove incorrect -1 check.
12300
a9fa9f7d
DJ
123012002-08-29 Daniel Jacobowitz <drow@mvista.com>
12302
12303 * linux-low.c (linux_create_inferior): Call setpgid. Return
12304 the new PID.
12305 (unstopped_p, linux_signal_pid): Remove.
12306 (linux_target_ops): Remove linux_signal_pid.
12307 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12308 global instead of target method.
12309 * target.h (struct target_ops): Remove signal_pid. Update comment
12310 for create_inferior.
12311 * server.c (signal_pid): New variable.
12312 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 12313 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
12314 (attach_inferior): Set signal_pid.
12315
17574093
DJ
123162002-08-23 Daniel Jacobowitz <drow@mvista.com>
12317
12318 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12319
123202002-08-20 Jim Blandy <jimb@redhat.com>
12321
12322 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12323 default for this.
12324
123252002-08-01 Andrew Cagney <cagney@redhat.com>
12326
12327 * Makefile.in: Make chill references obsolete.
12328
123292002-07-24 Kevin Buettner <kevinb@redhat.com>
12330
12331 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12332 * configure: Regenerate.
12333 * config.in: Regenerate.
12334
123352002-07-09 David O'Brien <obrien@FreeBSD.org>
12336
12337 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12338 (perror_with_name, remote_close, remote_open, expect, play): Static.
12339
123402002-07-04 Michal Ludvig <mludvig@suse.cz>
12341
4b8dad4a 12342 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
12343 byte offsets instead of an array of indexes.
12344 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12345
123462002-06-13 Daniel Jacobowitz <drow@mvista.com>
12347
12348 * regcache.c: Add comment.
12349
123502002-06-11 Daniel Jacobowitz <drow@mvista.com>
12351
12352 * thread-db.c: New file.
12353 * proc-service.c: New file.
12354 * acinclude.m4: New file.
12355 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12356 proc-service.o, and thread-db.o.
12357 (linux-low.o): Add USE_THREAD_DB.
12358 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12359 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12360 * aclocal.m4: Regenerated.
12361 * config.in: Regenerated.
12362 * configure: Regenerated.
12363 * configure.in: Check for proc_service.h, sys/procfs.h,
12364 thread_db.h, and linux/elf.h headrs.
12365 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12366 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12367 Check for -lthread_db and thread support.
12368 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12369 PowerPC, and SuperH.
12370 * i387-fp.c: Constify arguments.
12371 * i387-fp.h: Likewise.
12372 * inferiors.c: (struct thread_info): Renamed from
12373 `struct inferior_info'. Remove PID member. Use generic inferior
12374 list header. All uses updated.
12375 (inferiors, signal_pid): Removed.
12376 (all_threads): New variable.
12377 (get_thread): Define.
12378 (add_inferior_to_list): New function.
12379 (for_each_inferior): New function.
12380 (change_inferior_id): New function.
12381 (add_inferior): Removed.
12382 (remove_inferior): New function.
12383 (add_thread): New function.
12384 (free_one_thread): New function.
12385 (remove_thread): New function.
12386 (clear_inferiors): Use for_each_inferior and free_one_thread.
12387 (find_inferior): New function.
12388 (find_inferior_id): New function.
12389 (inferior_target_data): Update argument type.
12390 (set_inferior_target_data): Likewise.
12391 (inferior_regcache_data): Likewise.
12392 (set_inferior_regcache_data): Likewise.
12393 * linux-low.c (linux_bp_reinsert): Remove.
12394 (all_processes, stopping_threads, using_thrads)
12395 (struct pending_signals, debug_threads, pid_of): New.
12396 (inferior_pid): Replace with macro.
12397 (struct inferior_linux_data): Remove.
12398 (get_stop_pc, add_process): New functions.
12399 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12400 Use add_process and add_thread.
12401 (linux_attach_lwp): New function, based on old linux_attach. Use
12402 add_process and add_thread. Set stop_expected for new threads.
12403 (linux_attach): New function.
12404 (linux_kill_one_process): New function.
12405 (linux_kill): Kill all LWPs.
12406 (linux_thread_alive): Use find_inferior_id.
12407 (check_removed_breakpoints, status_pending_p): New functions.
12408 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12409 Update. Use WNOHANG. Wait for cloned processes also. Update process
12410 struct for the found process.
12411 (linux_wait_for_event): New function.
12412 (linux_wait): Use it. Support LWPs.
12413 (send_sigstop, wait_for_sigstop, stop_all_processes)
12414 (linux_resume_one_process, linux_continue_one_process): New functions.
12415 (linux_resume): Support LWPs.
12416 (REGISTER_RAW_SIZE): Remove.
12417 (fetch_register): Use register_size instead. Call supply_register.
12418 (usr_store_inferior_registers): Likewise. Call collect_register.
12419 Fix recursive case.
12420 (regsets_fetch_inferior_registers): Improve error message.
12421 (regsets_store_inferior_registers): Add debugging.
12422 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12423 (unstopped_p, linux_signal_pid): New functions.
12424 (linux_target_ops): Add linux_signal_pid.
12425 (linux_init_signals): New function.
12426 (initialize_low): Call it. Initialize using_threads.
12427 * regcache.c (inferior_regcache_data): Add valid
12428 flag.
12429 (get_regcache): Fetch registers lazily. Add fetch argument
12430 and update all callers.
12431 (regcache_invalidate_one, regcache_invalidate): New
12432 functions.
12433 (new_register_cache): Renamed from create_register_cache.
12434 Return the new regcache.
12435 (free_register_cache): Change argument to a void *.
12436 (registers_to_string, registers_from_string): Call get_regcache
12437 with fetch flag set.
12438 (register_data): Make static. Pass fetch flag to get_regcache.
12439 (supply_register): Call get_regcache with fetch flag clear.
12440 (collect_register): Call get_regcache with fetch flag set.
12441 (collect_register_as_string): New function.
12442 * regcache.h: Update.
12443 * remote-utils.c (putpkt): Flush after debug output and use
12444 stderr.
12445 Handle input interrupts while waiting for an ACK.
12446 (input_interrupt): Use signal_pid method.
12447 (getpkt): Flush after debug output and use stderr.
12448 (outreg): Use collect_register_as_string.
12449 (new_thread_notify, dead_thread_notify): New functions.
12450 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12451 and general_thread.
12452 (look_up_one_symbol): Flush after debug output.
12453 * server.c (step_thread, server_waiting): New variables.
12454 (start_inferior): Don't use signal_pid. Update call to mywait.
12455 (attach_inferior): Update call to mywait.
12456 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12457 (main): Don't fetch/store registers explicitly. Use
12458 set_desired_inferior. Support proposed ``Hs'' packet. Update
12459 calls to mywait.
12460 * server.h: Update.
12461 (struct inferior_list, struct_inferior_list_entry): New.
12462 * target.c (set_desired_inferior): New.
12463 (write_inferior_memory): Constify.
12464 (mywait): New function.
12465 * target.h: Update.
12466 (struct target_ops): New signal_pid method.
12467 (mywait): Removed macro, added prototype.
12468
12469 * linux-low.h (regset_func): Removed.
12470 (regset_fill_func, regset_store_func): New.
12471 (enum regset_type): New.
12472 (struct regset_info): Add type field. Use new operation types.
12473 (struct linux_target_ops): stop_pc renamed to get_pc.
12474 Add decr_pc_after_break and breakpoint_at.
12475 (get_process, get_thread_proess, get_process_thread)
12476 (strut process_info, all_processes, linux_attach_lwp)
12477 (thread_db_init): New.
12478
12479 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12480 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12481 (the_low_target): Add new members.
12482 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12483 (i386_store_fpxregset): Constify.
12484 (target_regsets): Add new kind identifier.
12485 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12486 (i386_set_pc): Add debugging.
12487 (i386_breakpoint_at): New function.
12488 (the_low_target): Add new members.
12489 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12490 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12491 (mips_breakpoint_at): New.
12492 (the_low_target): Add new members.
12493 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12494 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12495 (the_low_target): Add new members.
12496 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12497 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12498 (the_low_target): Add new members.
12499 * linux-x86-64-low.c (target_regsets): Add new kind
12500 identifier.
12501
125022002-05-15 Daniel Jacobowitz <drow@mvista.com>
12503
12504 From Martin Pool <mbp@samba.org>:
12505 * server.c (gdbserver_usage): New function.
12506 (main): Call it.
12507
125082002-05-14 Daniel Jacobowitz <drow@mvista.com>
12509
12510 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12511 stop_at -> stop_pc.
12512
125132002-05-04 Andrew Cagney <ac131313@redhat.com>
12514
12515 * Makefile.in: Remove obsolete code.
12516
125172002-04-24 Michal Ludvig <mludvig@suse.cz>
12518
12519 * linux-low.c (regsets_fetch_inferior_registers),
12520 (regsets_store_inferior_registers): Removed cast to int from
12521 ptrace() calls.
12522 * regcache.h: Added declaration of struct inferior_info.
12523
125242002-04-20 Daniel Jacobowitz <drow@mvista.com>
12525
12526 * inferiors.c (struct inferior_info): Add regcache_data.
12527 (add_inferior): Call create_register_cache.
12528 (clear_inferiors): Call free_register_cache.
12529 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12530 * regcache.c (struct inferior_regcache_data): New.
12531 (registers): Remove.
12532 (get_regcache): New function.
12533 (create_register_cache, free_register_cache): New functions.
12534 (set_register_cache): Don't initialize the register cache here.
12535 (registers_to_string, registers_from_string, register_data): Call
12536 get_regcache.
12537 * regcache.h: Add prototypes.
12538 * server.h: Likewise.
12539
125402002-04-20 Daniel Jacobowitz <drow@mvista.com>
12541
12542 * mem-break.c: New file.
12543 * mem-break.h: New file.
12544 * Makefile.in: Add mem-break.o rule; update server.h
12545 dependencies.
12546 * inferiors.c (struct inferior_info): Add target_data
12547 member.
12548 (clear_inferiors): Free target_data member if set.
12549 (inferior_target_data, set_inferior_target_data): New functions.
12550 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12551 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12552 * linux-low.c (linux_bp_reinsert): New variable.
12553 (struct inferior_linux_data): New.
12554 (linux_create_inferior): Use set_inferior_target_data.
12555 (linux_attach): Likewise. Call add_inferior.
12556 (linux_wait_for_one_inferior): New function.
12557 (linux_wait): Call it.
12558 (linux_write_memory): Add const.
12559 (initialize_low): Call set_breakpoint_data.
12560 * linux-low.h (struct linux_target_ops): Add breakpoint
12561 handling members.
12562 * server.c (attach_inferior): Remove extra add_inferior
12563 call.
12564 * server.h: Include mem-break.h. Update inferior.c
12565 prototypes.
12566 * target.c (read_inferior_memory)
12567 (write_inferior_memory): New functions.
12568 * target.h (read_inferior_memory)
12569 (write_inferior_memory): Change macros to prototypes.
12570 (struct target_ops): Update comments. Add const to write_memory
12571 definition.
12572
125732002-04-11 Daniel Jacobowitz <drow@mvista.com>
12574
12575 * linux-low.c (usr_store_inferior_registers): Support
12576 registers which are allowed to fail to store.
12577 * linux-low.h (linux_target_ops): Likewise.
12578 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12579 (ppc_cannot_store_register): FPSCR may not be storable.
12580
125812002-04-09 Daniel Jacobowitz <drow@mvista.com>
12582
12583 * server.h: Include <string.h> if HAVE_STRING_H.
12584 * ChangeLog: Correct paths in last ChangeLog entry.
12585
125862002-04-09 Daniel Jacobowitz <drow@mvista.com>
12587
12588 * linux-low.h: Remove obsolete prototypes.
12589 (struct linux_target_ops): New.
12590 (extern the_low_target): New.
12591 * linux-low.c (num_regs, regmap): Remove declarations.
12592 (register_addr): Use the_low_target explicitly.
12593 (fetch_register): Likewise.
12594 (usr_fetch_inferior_registers): Likewise.
12595 (usr_store_inferior_registers): Likewise.
12596 * linux-arm-low.c (num_regs): Remove.
12597 (arm_num_regs): Define.
12598 (arm_regmap): Renamed from regmap, made static.
12599 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12600 made static.
12601 (arm_cannot_store_register): Renamed from cannot_store_register,
12602 made static.
12603 (the_low_target): New.
12604 * linux-i386-low.c (num_regs): Remove.
12605 (i386_num_regs): Define.
12606 (i386_regmap): Renamed from regmap, made static.
12607 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12608 made static.
12609 (i386_cannot_store_register): Renamed from cannot_store_register,
12610 made static.
12611 (the_low_target): New.
12612 * linux-ia64-low.c (num_regs): Remove.
12613 (ia64_num_regs): Define.
12614 (ia64_regmap): Renamed from regmap, made static.
12615 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12616 made static.
12617 (ia64_cannot_store_register): Renamed from cannot_store_register,
12618 made static.
12619 (the_low_target): New.
12620 * linux-m68k-low.c (num_regs): Remove.
12621 (m68k_num_regs): Define.
12622 (m68k_regmap): Renamed from regmap, made static.
12623 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12624 made static.
12625 (m68k_cannot_store_register): Renamed from cannot_store_register,
12626 made static.
12627 (the_low_target): New.
12628 * linux-mips-low.c (num_regs): Remove.
12629 (mips_num_regs): Define.
12630 (mips_regmap): Renamed from regmap, made static.
12631 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12632 made static.
12633 (mips_cannot_store_register): Renamed from cannot_store_register,
12634 made static.
12635 (the_low_target): New.
12636 * linux-ppc-low.c (num_regs): Remove.
12637 (ppc_num_regs): Define.
12638 (ppc_regmap): Renamed from regmap, made static.
12639 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12640 made static.
12641 (ppc_cannot_store_register): Renamed from cannot_store_register,
12642 made static.
12643 (the_low_target): New.
12644 * linux-s390-low.c (num_regs): Remove.
12645 (s390_num_regs): Define.
12646 (s390_regmap): Renamed from regmap, made static.
12647 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12648 made static.
12649 (s390_cannot_store_register): Renamed from cannot_store_register,
12650 made static.
12651 (the_low_target): New.
12652 * linux-sh-low.c (num_regs): Remove.
12653 (sh_num_regs): Define.
12654 (sh_regmap): Renamed from regmap, made static.
12655 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12656 made static.
12657 (sh_cannot_store_register): Renamed from cannot_store_register,
12658 made static.
12659 (the_low_target): New.
12660 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12661 (the_low_target): New.
12662
126632002-04-09 Daniel Jacobowitz <drow@mvista.com>
12664
12665 * Makefile.in: Add stamp-h target.
12666 * configure.in: Create stamp-h.
12667 * configure: Regenerated.
12668
126692002-04-09 Daniel Jacobowitz <drow@mvista.com>
12670
12671 * inferiors.c: New file.
12672 * target.c: New file.
12673 * target.h: New file.
12674 * Makefile.in: Add target.o and inferiors.o. Update
12675 dependencies.
12676 * linux-low.c (inferior_pid): New static variable,
12677 moved from server.c.
12678 (linux_create_inferior): Renamed from create_inferior.
12679 Call add_inferior. Return 0 on success instead of a PID.
12680 (linux_attach): Renamed from myattach.
12681 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12682 (linux_thread_alive): Renamed from mythread_alive.
12683 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12684 child dies.
12685 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12686 (regsets_store_inferior_registers): Correct error message.
12687 Add missing ``return 0''.
12688 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12689 (linux_store_registers): Renamed from store_inferior_registers.
12690 (linux_read_memory): Renamed from read_inferior_memory.
12691 (linux_write_memory): Renamed from write_inferior_memory.
12692 (linux_target_ops): New structure.
12693 (initialize_low): Call set_target_ops ().
12694 * remote-utils.c (unhexify): New function.
12695 (hexify): New function.
12696 (input_interrupt): Send signals to ``signal_pid''.
12697 * server.c (inferior_pid): Remove.
12698 (start_inferior): Update create_inferior call.
12699 (attach_inferior): Call add_inferior.
12700 (handle_query): New function.
12701 (main): Call handle_query for `q' packets.
12702 * server.h: Include "target.h". Remove obsolete prototypes.
12703 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12704
127052002-04-09 Daniel Jacobowitz <drow@mvista.com>
12706
12707 * Makefile.in: Add WARN_CFLAGS. Update configury
12708 dependencies.
12709 * configure.in: Check for <string.h>
12710 * configure: Regenerate.
12711 * config.in: Regenerate.
12712 * gdbreplay.c: Include needed system headers.
12713 (remote_open): Remove strchr prototype.
12714 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12715 * regcache.c (supply_register): Change buf argument to const void *.
12716 (supply_register_by_name): Likewise.
12717 (collect_register): Change buf argument to void *.
12718 (collect_register_by_name): Likewise.
12719 * regcache.h: Add missing prototypes.
12720 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12721 * server.c (handle_query): New function.
12722 (attached): New static variable, moved out of main.
12723 (main): Quiet longjmp clobber warnings.
12724 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12725 * utils.c (error): Remove NORETURN.
12726 (fatal): Likewise.