Define enum out of the scope of struct
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
6c1c9a8b
YQ
12015-11-19 Yao Qi <yao.qi@linaro.org>
2
3 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4 (struct aarch64_operand): Move enum out.
5
9caa3311
YQ
62015-11-19 Yao Qi <yao.qi@linaro.org>
7
8 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
9 struct user_fpsimd_state *.
10 (aarch64_store_fpregset): Likewise.
11
6a69a054
YQ
122015-11-19 Yao Qi <yao.qi@linaro.org>
13
14 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
15 struct user_pt_regs *.
16 (aarch64_store_gregset): Likewise.
17
1798301e
PA
182015-11-18 Pedro Alves <palves@redhat.com>
19
20 * Makefile.in (all_object_files): Add $IPA_OBJS.
21
ce7715e2
PA
222015-11-17 Pedro Alves <palves@redhat.com>
23
24 * win32-low.c (win32_resume): Use gdb_signal_from_host,
25 GDB_SIGNAL_0 and gdb_signal_to_string.
26
c0879059
PA
272015-11-17 Pedro Alves <palves@redhat.com>
28
29 * win32-low.c (handle_output_debug_string): Remove parameter.
30 (win32_kill): Remove our_status local and adjust call to
31 handle_output_debug_string.
32 (get_child_debug_event): Adjust call to
33 handle_output_debug_string.
34
1996e237
SM
352015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
36
37 * linux-mips-low.c (mips_fill_gregset): Add cast.
38 (mips_store_gregset): Likewise.
39 (mips_fill_fpregset): Likewise.
40 (mips_store_fpregset): Likewise.
41
cbec665b
SM
422015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
43
44 * linux-mips-low.c (mips_add_watchpoint): Rename private to
45 priv.
46
eb3e3c67
SM
472015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
48
49 * linux-mips-low.c (mips_linux_new_thread): Change type of
50 watch_type to enum target_hw_bp_type.
51
171de4b8
SM
522015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
53
54 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
55 Change return type to arm_hwbp_type.
56
04248ead
SM
572015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
58
59 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
60 (arm_store_gregset): Likewise.
61 * linux-arm-low.c (arm_get_hwcap): Likewise.
62 (arm_read_description): Likewise.
63
04b3479c
SM
642015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
65
66 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
67
2bc84e8a
SM
682015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
69
70 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
71 (ppc_fill_vsxregset): Likewise.
72 (ppc_store_vsxregset): Likewise.
73 (ppc_fill_vrregset): Likewise.
74 (ppc_store_vrregset): Likewise.
75 (ppc_fill_evrregset): Likewise.
76 (ppc_store_evrregset): Likewise.
77
e6c5bb05
SM
782015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
79
80 * linux-ppc-low.c (ppc_usrregs_info): Remove
81 forward-declaration.
82 (ppc_arch_setup): Move lower in file.
83
7ea45d72
SM
842015-10-30 Simon Marchi <simon.marchi@ericsson.com>
85
86 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
87 (ps_pdwrite): Likewise.
88
69291610
HW
892015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
90
91 * linux-arm-low.c (arm_new_thread): Move pointer dereference
92 to after assert checks.
93
b42945fd
SM
942015-10-29 Simon Marchi <simon.marchi@ericsson.com>
95
96 * proc-service.c (ps_pdread): Add/adjust casts.
97 (ps_pdwrite): Add/adjust casts.
98
d6f85c84
SM
992015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
100
101 * server.c (handle_search_memory_1): Cast return value of
102 memmem.
103
f98cd059
SM
1042015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
105
106 * server.c (write_qxfer_response): Change type of data to
107 gdb_byte *.
108
d2412fa5
PA
1092015-10-29 Pedro Alves <palves@redhat.com>
110
111 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
112
c17414a2
PA
1132015-10-29 Pedro Alves <palves@redhat.com>
114
115 * tracepoint.c (clear_installed_tracepoints): Add casts.
116
e053fbc4
PA
1172015-10-29 Pedro Alves <palves@redhat.com>
118
119 * server.c (handle_v_cont, process_serial_event): Add enum
120 gdb_signal casts to signal parsing code.
121
add67df8
PA
1222015-10-29 Pedro Alves <palves@redhat.com>
123
124 * linux-low.h (NULL_REGSET): Define.
125 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
126 * linux-arm-low.c (arm_regsets): Likewise.
127 * linux-crisv32-low.c (cris_regsets): Likewise.
128 * linux-m68k-low.c (m68k_regsets): Likewise.
129 * linux-mips-low.c (mips_regsets): Likewise.
130 * linux-nios2-low.c (nios2_regsets): Likewise.
131 * linux-ppc-low.c (ppc_regsets): Likewise.
132 * linux-s390-low.c (s390_regsets): Likewise.
133 * linux-sh-low.c (sh_regsets): Likewise.
134 * linux-sparc-low.c (sparc_regsets): Likewise.
135 * linux-tic6x-low.c (tic6x_regsets): Likewise.
136 * linux-tile-low.c (tile_regsets): Likewise.
137 * linux-x86-low.c (x86_regsets): Likewise.
138 * linux-xtensa-low.c (xtensa_regsets): Likewise.
139
50bc912a
PA
1402015-10-29 Pedro Alves <palves@redhat.com>
141
142 * linux-low.h (NULL_REGSET): Define.
143 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
144 * linux-arm-low.c (arm_regsets): Likewise.
145 * linux-crisv32-low.c (cris_regsets): Likewise.
146 * linux-m68k-low.c (m68k_regsets): Likewise.
147 * linux-mips-low.c (mips_regsets): Likewise.
148 * linux-nios2-low.c (nios2_regsets): Likewise.
149 * linux-ppc-low.c (ppc_regsets): Likewise.
150 * linux-s390-low.c (s390_regsets): Likewise.
151 * linux-sh-low.c (sh_regsets): Likewise.
152 * linux-sparc-low.c (sparc_regsets): Likewise.
153 * linux-tic6x-low.c (tic6x_regsets): Likewise.
154 * linux-tile-low.c (tile_regsets): Likewise.
155 * linux-x86-low.c (x86_regsets): Likewise.
156 * linux-xtensa-low.c (xtensa_regsets): Likewise.
157
682b2546
DE
1582015-10-26 Doug Evans <dje@google.com>
159
160 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
161
963843d4
DE
1622015-10-26 Doug Evans <dje@google.com>
163
164 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
165
d41401ac
DE
1662015-10-26 Doug Evans <dje@google.com>
167
168 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
169 for debug_printf.
170 (attach_thread, find_new_threads_callback): Ditto.
171
3db28855
AT
1722015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
173
174 * mem-break.h (set_breakpoint_data): Remove.
175
fb78e89c
AT
1762015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
177
178 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
179 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
180 (initialize_low): Remove set_breakpoint_data call.
181 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
182 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
183 (initialize_low): Remove set_breakpoint_data call.
184 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
185 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
186 (initialize_low): Remove set_breakpoint_data call.
187
2e6ee069
AT
1882015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
189
190 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
191 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
192 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
193 * target.h (target_breakpoint_kind_from_pc): New macro.
194
1652a986
AT
1952015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
196
197 * linux-low.c (default_breakpoint_kind_from_pc): New function.
198 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
199 the default breakpoint kind.
200
abeead09
AT
2012015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
202
203 * linux-arm-low.c (arm_supports_z_point_type): Add software
204 breakpoint support.
205
b0b4b501
AT
2062015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
207
208 * linux-arm-low.c: Refactor breakpoint definitions.
209 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
210 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
211
8689682c
AT
2122015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
213
214 * Makefile.in: Add arm.c/o.
215 * configure.srv: Likewise.
216 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
217 (arm_breakpoint_kind_from_pc): New function.
218 (arm_sw_breakpoint_from_kind): Return proper kind.
219 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
220
27165294
AT
2212015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
222
223 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
224 removal.
225 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
226 (struct raw_breakpoint) <size>: Remove.
227 (struct raw_breakpoint) <kind>: Add.
228 (bp_size): New function.
229 (bp_opcode): Likewise.
230 (find_raw_breakpoint_at): Adjust for kind.
231 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
232 (remove_memory_breakpoint): Adjust for kind call bp_size.
233 (set_raw_breakpoint_at): Adjust for kind.
234 (set_breakpoint): Likewise.
235 (set_breakpoint_at): Call breakpoint_kind_from_pc.
236 (delete_raw_breakpoint): Adjust for kind.
237 (delete_breakpoint): Likewise.
238 (find_gdb_breakpoint): Likewise.
239 (set_gdb_breakpoint_1): Likewise.
240 (set_gdb_breakpoint): Likewise.
241 (delete_gdb_breakpoint_1): Likewise.
242 (delete_gdb_breakpoint): Likewise.
243 (uninsert_raw_breakpoint): Likewise.
244 (reinsert_raw_breakpoint): Likewise.
245 (set_breakpoint_data): Remove.
246 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
247 (check_mem_read): Adjust for kind call bp_size.
248 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
249 (clone_one_breakpoint): Adjust for kind.
250 * mem-break.h (set_gdb_breakpoint): Likewise.
251 (delete_gdb_breakpoint): Likewise.
252 * server.c (process_serial_event): Likewise.
253
dd373349
AT
2542015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
255
256 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
257 (struct linux_target_ops) <breakpoint>: Remove.
258 (struct linux_target_ops) <breakpoint_len>: Remove.
259 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
260 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
261 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
262 (arm_sw_breakpoint_from_kind): New function.
263 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
264 (struct linux_target_ops) <breakpoint>: Remove.
265 (struct linux_target_ops) <breakpoint_len>: Remove.
266 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
267 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
268 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
269 (struct linux_target_ops) <breakpoint>: Remove.
270 (struct linux_target_ops) <breakpoint_len>: Remove.
271 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
272 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
273 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
274 (struct linux_target_ops) <breakpoint>: Remove.
275 (struct linux_target_ops) <breakpoint_len>: Remove.
276 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
277 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
278 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
279 and sw_breakpoint_from_kind to increment the pc.
280 (linux_breakpoint_kind_from_pc): New function.
281 (linux_sw_breakpoint_from_kind): New function.
282 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
283 (initialize_low): Call breakpoint_kind_from_pc and
284 sw_breakpoint_from_kind to replace breakpoint_data/len.
285 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
286 New field.
287 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
288 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
289 (struct linux_target_ops) <breakpoint>: Remove.
290 (struct linux_target_ops) <breakpoint_len>: Remove.
291 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
292 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
293 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
294 (struct linux_target_ops) <breakpoint>: Remove.
295 (struct linux_target_ops) <breakpoint_len>: Remove.
296 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
297 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
298 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
299 (struct linux_target_ops) <breakpoint>: Remove.
300 (struct linux_target_ops) <breakpoint_len>: Remove.
301 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
302 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
303 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
304 (struct linux_target_ops) <breakpoint>: Remove.
305 (struct linux_target_ops) <breakpoint_len>: Remove.
306 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
307 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
308 * linux-ppc-low.c (ppc_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-s390-low.c (s390_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 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
319 (struct linux_target_ops) <breakpoint>: Remove.
320 (struct linux_target_ops) <breakpoint_len>: Remove.
321 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
322 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
323 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
324 (struct linux_target_ops) <breakpoint>: Remove.
325 (struct linux_target_ops) <breakpoint_len>: Remove.
326 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
327 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
328 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
329 (struct linux_target_ops) <breakpoint>: Remove.
330 (struct linux_target_ops) <breakpoint_len>: Remove.
331 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
332 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
333 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
334 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
335 (struct linux_target_ops) <breakpoint>: Remove.
336 (struct linux_target_ops) <breakpoint_len>: Remove.
337 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
338 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
339 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
340 (struct linux_target_ops) <breakpoint>: Remove.
341 (struct linux_target_ops) <breakpoint_len>: Remove.
342 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
343 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
344
4cd98a19
AT
3452015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
346
347 * linux-cris-low.c (cris_get_pc): Remove void arg.
348
774ee6d2
AR
3492015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
350
351 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
352 variable name.
353
833dcd29
AR
3542015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
355
356 * inferiors.c (thread_pid_matches_callback): New function.
357 (find_thread_process): New function.
358 (remove_thread): Reset current_thread.
359 (remove_process): Assert threads have been removed first.
360
8d689ee5
YQ
3612015-10-15 Yao Qi <yao.qi@linaro.org>
362
363 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
364 if it is 3.
365 (aarch64_remove_point): Likewise.
366 * regcache.c (regcache_register_size): New function.
367
1c2e1515
YQ
3682015-10-12 Yao Qi <yao.qi@linaro.org>
369
370 * linux-aarch64-low.c: Update all callers as emit_load_store
371 is renamed to aarch64_emit_load_store.
372
e1c587c3
YQ
3732015-10-12 Yao Qi <yao.qi@linaro.org>
374
375 * linux-aarch64-low.c: Update all callers of function renaming
376 from emit_insn to aarch64_emit_insn.
377
b6542f81
YQ
3782015-10-12 Yao Qi <yao.qi@linaro.org>
379
380 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
381 arch/aarch64-insn.h.
382 (struct aarch64_memory_operand): Likewise.
383 (ENCODE): Likewise.
384 (emit_insn): Move to arch/aarch64-insn.c.
385 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
386 (emit_load_store): Move to arch/aarch64-insn.c.
387 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
388 (can_encode_int32): Remove.
389
246994ce
YQ
3902015-10-12 Yao Qi <yao.qi@linaro.org>
391
392 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
393 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
394 (aarch64_relocate_instruction): Likewise.
395 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
396 (struct aarch64_insn_visitor): Likewise.
397
0badd99f
YQ
3982015-10-12 Yao Qi <yao.qi@linaro.org>
399
400 * linux-aarch64-low.c (struct aarch64_insn_data): New.
401 (struct aarch64_insn_visitor): New.
402 (struct aarch64_insn_relocation_data): New.
403 (aarch64_ftrace_insn_reloc_b): New function.
404 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
405 (aarch64_ftrace_insn_reloc_cb): Likewise.
406 (aarch64_ftrace_insn_reloc_tb): Likewise.
407 (aarch64_ftrace_insn_reloc_adr): Likewise.
408 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
409 (aarch64_ftrace_insn_reloc_others): Likewise.
410 (visitor): New.
411 (aarch64_relocate_instruction): Use visitor.
412
dfaffe9d
YQ
4132015-10-12 Yao Qi <yao.qi@linaro.org>
414
415 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
416 int. Add argument buf.
417 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
418 aarch64_relocate_instruction.
419
70b439f0
YQ
4202015-10-12 Yao Qi <yao.qi@linaro.org>
421
422 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
423 argument insn. Remove local variable insn. Don't call
424 target_read_uint32.
425 (aarch64_install_fast_tracepoint_jump_pad): Call
426 target_read_uint32.
427
7781c06f
YQ
4282015-09-30 Yao Qi <yao.qi@linaro.org>
429
430 * linux-aarch64-low.c (emit_movk): Shorten a long line.
431 (emit_load_store_pair): Likewise.
432
9a3c8263
SM
4332015-09-25 Simon Marchi <simon.marchi@ericsson.com>
434
435 * dll.c (match_dll): Add cast(s).
436 (unloaded_dll): Likewise.
437 * linux-low.c (second_thread_of_pid_p): Likewise.
438 (delete_lwp_callback): Likewise.
439 (count_events_callback): Likewise.
440 (select_event_lwp_callback): Likewise.
441 (linux_set_resume_request): Likewise.
442 * server.c (accumulate_file_name_length): Likewise.
443 (emit_dll_description): Likewise.
444 (handle_qxfer_threads_worker): Likewise.
445 (visit_actioned_threads): Likewise.
446 * thread-db.c (any_thread_of): Likewise.
447 * tracepoint.c (same_process_p): Likewise.
448 (match_blocktype): Likewise.
449 (build_traceframe_info_xml): Likewise.
450
224c3ddb
SM
4512015-09-25 Simon Marchi <simon.marchi@ericsson.com>
452
453 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
454 assignment.
455 (gdb_unparse_agent_expr): Likewise.
456 * hostio.c (require_data): Likewise.
457 (handle_pread): Likewise.
458 * linux-low.c (disable_regset): Likewise.
459 (fetch_register): Likewise.
460 (store_register): Likewise.
461 (get_dynamic): Likewise.
462 (linux_qxfer_libraries_svr4): Likewise.
463 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
464 (set_fast_tracepoint_jump): Likewise.
465 (uninsert_fast_tracepoint_jumps_at): Likewise.
466 (reinsert_fast_tracepoint_jumps_at): Likewise.
467 (validate_inserted_breakpoint): Likewise.
468 (clone_agent_expr): Likewise.
469 * regcache.c (init_register_cache): Likewise.
470 * remote-utils.c (putpkt_binary_1): Likewise.
471 (decode_M_packet): Likewise.
472 (decode_X_packet): Likewise.
473 (look_up_one_symbol): Likewise.
474 (relocate_instruction): Likewise.
475 (monitor_output): Likewise.
476 * server.c (handle_search_memory): Likewise.
477 (handle_qxfer_exec_file): Likewise.
478 (handle_qxfer_libraries): Likewise.
479 (handle_qxfer): Likewise.
480 (handle_query): Likewise.
481 (handle_v_cont): Likewise.
482 (handle_v_run): Likewise.
483 (captured_main): Likewise.
484 * target.c (write_inferior_memory): Likewise.
485 * thread-db.c (try_thread_db_load_from_dir): Likewise.
486 * tracepoint.c (init_trace_buffer): Likewise.
487 (add_tracepoint_action): Likewise.
488 (add_traceframe): Likewise.
489 (add_traceframe_block): Likewise.
490 (cmd_qtdpsrc): Likewise.
491 (cmd_qtdv): Likewise.
492 (cmd_qtstatus): Likewise.
493 (response_source): Likewise.
494 (response_tsv): Likewise.
495 (cmd_qtnotes): Likewise.
496 (gdb_collect): Likewise.
497 (initialize_tracepoint): Likewise.
498
afbe19f8
PL
4992015-09-21 Pierre Langlois <pierre.langlois@arm.com>
500
501 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
502 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
503 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
504 <NOP>: New.
505 (enum aarch64_condition_codes): New enum.
506 (w0): New static global.
507 (fp): Likewise.
508 (lr): Likewise.
509 (struct aarch64_memory_operand) <type>: New
510 MEMORY_OPERAND_POSTINDEX type.
511 (postindex_memory_operand): New helper function.
512 (emit_ret): New function.
513 (emit_load_store_pair): New function, factored out of emit_stp
514 with support for MEMORY_OPERAND_POSTINDEX.
515 (emit_stp): Rewrite using emit_load_store_pair.
516 (emit_ldp): New function.
517 (emit_load_store): Likewise.
518 (emit_ldr): Mention post-index instruction in comment.
519 (emit_ldrh): New function.
520 (emit_ldrb): New function.
521 (emit_ldrsw): Mention post-index instruction in comment.
522 (emit_str): Likewise.
523 (emit_subs): New function.
524 (emit_cmp): Likewise.
525 (emit_and): Likewise.
526 (emit_orr): Likewise.
527 (emit_orn): Likewise.
528 (emit_eor): Likewise.
529 (emit_mvn): Likewise.
530 (emit_lslv): Likewise.
531 (emit_lsrv): Likewise.
532 (emit_asrv): Likewise.
533 (emit_mul): Likewise.
534 (emit_sbfm): Likewise.
535 (emit_sbfx): Likewise.
536 (emit_ubfm): Likewise.
537 (emit_ubfx): Likewise.
538 (emit_csinc): Likewise.
539 (emit_cset): Likewise.
540 (emit_nop): Likewise.
541 (emit_ops_insns): New helper function.
542 (emit_pop): Likewise.
543 (emit_push): Likewise.
544 (aarch64_emit_prologue): New function.
545 (aarch64_emit_epilogue): Likewise.
546 (aarch64_emit_add): Likewise.
547 (aarch64_emit_sub): Likewise.
548 (aarch64_emit_mul): Likewise.
549 (aarch64_emit_lsh): Likewise.
550 (aarch64_emit_rsh_signed): Likewise.
551 (aarch64_emit_rsh_unsigned): Likewise.
552 (aarch64_emit_ext): Likewise.
553 (aarch64_emit_log_not): Likewise.
554 (aarch64_emit_bit_and): Likewise.
555 (aarch64_emit_bit_or): Likewise.
556 (aarch64_emit_bit_xor): Likewise.
557 (aarch64_emit_bit_not): Likewise.
558 (aarch64_emit_equal): Likewise.
559 (aarch64_emit_less_signed): Likewise.
560 (aarch64_emit_less_unsigned): Likewise.
561 (aarch64_emit_ref): Likewise.
562 (aarch64_emit_if_goto): Likewise.
563 (aarch64_emit_goto): Likewise.
564 (aarch64_write_goto_address): Likewise.
565 (aarch64_emit_const): Likewise.
566 (aarch64_emit_call): Likewise.
567 (aarch64_emit_reg): Likewise.
568 (aarch64_emit_pop): Likewise.
569 (aarch64_emit_stack_flush): Likewise.
570 (aarch64_emit_zero_ext): Likewise.
571 (aarch64_emit_swap): Likewise.
572 (aarch64_emit_stack_adjust): Likewise.
573 (aarch64_emit_int_call_1): Likewise.
574 (aarch64_emit_void_call_2): Likewise.
575 (aarch64_emit_eq_goto): Likewise.
576 (aarch64_emit_ne_goto): Likewise.
577 (aarch64_emit_lt_goto): Likewise.
578 (aarch64_emit_le_goto): Likewise.
579 (aarch64_emit_gt_goto): Likewise.
580 (aarch64_emit_ge_got): Likewise.
581 (aarch64_emit_ops_impl): New static global variable.
582 (aarch64_emit_ops): New target function, return
583 &aarch64_emit_ops_impl.
584 (struct linux_target_ops): Install it.
585
bb903df0
PL
5862015-09-21 Pierre Langlois <pierre.langlois@arm.com>
587
588 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
589 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
590 aarch64-ipa.o.
591 * linux-aarch64-ipa.c: New file.
592 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
593 and endian.h.
594 (aarch64_get_thread_area): New target method.
595 (extract_signed_bitfield): New helper function.
596 (aarch64_decode_ldr_literal): New function.
597 (enum aarch64_opcodes): New enum.
598 (struct aarch64_register): New struct.
599 (struct aarch64_operand): New struct.
600 (x0): New static global.
601 (x1): Likewise.
602 (x2): Likewise.
603 (x3): Likewise.
604 (x4): Likewise.
605 (w2): Likewise.
606 (ip0): Likewise.
607 (sp): Likewise.
608 (xzr): Likewise.
609 (aarch64_register): New helper function.
610 (register_operand): Likewise.
611 (immediate_operand): Likewise.
612 (struct aarch64_memory_operand): New struct.
613 (offset_memory_operand): New helper function.
614 (preindex_memory_operand): Likewise.
615 (enum aarch64_system_control_registers): New enum.
616 (ENCODE): New macro.
617 (emit_insn): New helper function.
618 (emit_b): New function.
619 (emit_bcond): Likewise.
620 (emit_cb): Likewise.
621 (emit_tb): Likewise.
622 (emit_blr): Likewise.
623 (emit_stp): Likewise.
624 (emit_ldp_q_offset): Likewise.
625 (emit_stp_q_offset): Likewise.
626 (emit_load_store): Likewise.
627 (emit_ldr): Likewise.
628 (emit_ldrsw): Likewise.
629 (emit_str): Likewise.
630 (emit_ldaxr): Likewise.
631 (emit_stxr): Likewise.
632 (emit_stlr): Likewise.
633 (emit_data_processing_reg): Likewise.
634 (emit_data_processing): Likewise.
635 (emit_add): Likewise.
636 (emit_sub): Likewise.
637 (emit_mov): Likewise.
638 (emit_movk): Likewise.
639 (emit_mov_addr): Likewise.
640 (emit_mrs): Likewise.
641 (emit_msr): Likewise.
642 (emit_sevl): Likewise.
643 (emit_wfe): Likewise.
644 (append_insns): Likewise.
645 (can_encode_int32_in): New helper function.
646 (aarch64_relocate_instruction): New function.
647 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
648 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
649 (struct linux_target_ops): Install aarch64_get_thread_area,
650 aarch64_install_fast_tracepoint_jump_pad and
651 aarch64_get_min_fast_tracepoint_insn_len.
652
787749ea
PL
6532015-09-21 Pierre Langlois <pierre.langlois@arm.com>
654
655 * Makefile.in (aarch64-insn.o): New rule.
656 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
657
9812b2e6
YQ
6582015-09-21 Yao Qi <yao.qi@linaro.org>
659
660 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
661
18fe412b
YQ
6622015-09-21 Yao Qi <yao.qi@linaro.org>
663
664 * tracepoint.c (max_jump_pad_size): Remove.
665
a0cc84cd
YQ
6662015-09-18 Yao Qi <yao.qi@linaro.org>
667
668 * linux-aarch64-low.c: Don't include sys/uio.h.
669 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
670
d78908cf
WW
6712015-09-16 Wei-cheng Wang <cole945@gmail.com>
672
673 * tracepoint.c (eval_result_type): Change prototype.
674 (condition_true_at_tracepoint): Fix argument to compiled_cond.
675
d57e0d50
PA
6762015-09-15 Pedro Alves <palves@redhat.com>
677
678 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
679 Check whether to report exec events instead of checking whether
680 multiprocess is enabled.
681
5a676acc
PA
6822015-09-15 Pedro Alves <palves@redhat.com>
683
684 PR remote/18965
685 * remote-utils.c (prepare_resume_reply): Merge
686 TARGET_WAITKIND_VFORK_DONE switch case with the
687 TARGET_WAITKIND_FORKED case.
688
7c5d0fad
YQ
6892015-09-15 Yao Qi <yao.qi@linaro.org>
690
691 * server.c (handle_query): Check string comparison using
692 "else if" instead of "if".
693
750ce8d1
YQ
6942015-09-15 Yao Qi <yao.qi@linaro.org>
695
696 * server.c (vCont_supported): New global variable.
697 (handle_query): Set vCont_supported to 1 if "vContSupported+"
698 matches. Append ";vContSupported+" to own_buf.
699 (handle_v_requests): Append ";s;S" to own_buf if target supports
700 hardware single step or vCont_supported is false.
701 (capture_main): Set vCont_supported to zero.
702
70b90b91
YQ
7032015-09-15 Yao Qi <yao.qi@linaro.org>
704
705 * linux-low.c (linux_supports_conditional_breakpoints): Rename
706 it to ...
707 (linux_supports_hardware_single_step): ... New function.
708 (linux_target_ops): Update.
709 * lynx-low.c (lynx_target_ops): Set field
710 supports_hardware_single_step to target_can_do_hardware_single_step.
711 * nto-low.c (nto_target_ops): Likewise.
712 * spu-low.c (spu_target_ops): Likewise.
713 * win32-low.c (win32_target_ops): Likewise.
714 * target.c (target_can_do_hardware_single_step): New function.
715 * target.h (struct target_ops) <supports_conditional_breakpoints>:
716 Remove. <supports_hardware_single_step>: New field.
717 (target_supports_conditional_breakpoints): Remove.
718 (target_supports_hardware_single_step): New macro.
719 (target_can_do_hardware_single_step): Declare.
720 * server.c (handle_query): Use target_supports_hardware_single_step
721 instead of target_supports_conditional_breakpoints.
722
ade90bde
YQ
7232015-09-15 Yao Qi <yao.qi@linaro.org>
724
725 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
726 function.
727 (struct linux_target_ops the_low_target): Install
728 aarch64_linux_siginfo_fixup.
729
94585166
DB
7302015-09-11 Don Breazeal <donb@codesourcery.com>
731 Luis Machado <lgustavo@codesourcery.com>
732
733 * linux-low.c (linux_mourn): Static declaration.
734 (linux_arch_setup): Move in front of
735 handle_extended_wait.
736 (linux_arch_setup_thread): New function.
737 (handle_extended_wait): Handle exec events. Call
738 linux_arch_setup_thread. Make event_lwp argument a
739 pointer-to-a-pointer.
740 (check_zombie_leaders): Do not check stopped threads.
741 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
742 (linux_low_filter_event): Add lwp and thread for exec'ing
743 non-leader thread if leader thread has been deleted.
744 Refactor code into linux_arch_setup_thread and call it.
745 Pass child lwp pointer by reference to handle_extended_wait.
746 (linux_wait_for_event_filtered): Update comment.
747 (linux_wait_1): Prevent clobbering exec event status.
748 (linux_supports_exec_events): New function.
749 (linux_target_ops) <supports_exec_events>: Initialize new member.
750 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
751 new member.
752 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
753 * server.c (report_exec_events): New global variable.
754 (handle_query): Handle qSupported query for exec-events feature.
755 (captured_main): Initialize report_exec_events.
756 * server.h (report_exec_events): Declare new global variable.
757 * target.h (struct target_ops) <supports_exec_events>: New
758 member.
759 (target_supports_exec_events): New macro.
760 * win32-low.c (win32_target_ops) <supports_exec_events>:
761 Initialize new member.
762
0568462b
MM
7632015-09-09 Markus Metzger <markus.t.metzger@intel.com>
764
765 * linux-low.c (linux_low_enable_btrace): Remove.
766 (linux_target_ops): Replace linux_low_enable_btrace with
767 linux_enable_btrace.
768
39edd165
YQ
7692015-09-03 Yao Qi <yao.qi@linaro.org>
770
771 * linux-aarch64-low.c (aarch64_insert_point): Call
772 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
773 returns true.
774
1db33b5a
UW
7752015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
776
777 * linux-low.c (check_stopped_by_breakpoint): Use
778 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
779
ab290430
PA
7802015-08-27 Pedro Alves <palves@redhat.com>
781
782 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
783
8d749320
SM
7842015-08-26 Simon Marchi <simon.marchi@ericsson.com>
785
6711b7f8
SM
786 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
787 the XNEW-family equivalent.
8d749320
SM
788 (compile_bytecodes): Likewise.
789 * dll.c (loaded_dll): Likewise.
790 * event-loop.c (append_callback_event): Likewise.
791 (create_file_handler): Likewise.
792 (create_file_event): Likewise.
793 * hostio.c (handle_open): Likewise.
794 * inferiors.c (add_thread): Likewise.
795 (add_process): Likewise.
796 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
797 * linux-arm-low.c (arm_new_process): Likewise.
798 (arm_new_thread): Likewise.
799 * linux-low.c (add_to_pid_list): Likewise.
800 (linux_add_process): Likewise.
801 (handle_extended_wait): Likewise.
802 (add_lwp): Likewise.
803 (enqueue_one_deferred_signal): Likewise.
804 (enqueue_pending_signal): Likewise.
805 (linux_resume_one_lwp_throw): Likewise.
806 (linux_resume_one_thread): Likewise.
807 (linux_read_memory): Likewise.
808 (linux_write_memory): Likewise.
809 * linux-mips-low.c (mips_linux_new_process): Likewise.
810 (mips_linux_new_thread): Likewise.
811 (mips_add_watchpoint): Likewise.
812 * linux-x86-low.c (initialize_low_arch): Likewise.
813 * lynx-low.c (lynx_add_process): Likewise.
814 * mem-break.c (set_raw_breakpoint_at): Likewise.
815 (set_breakpoint): Likewise.
816 (add_condition_to_breakpoint): Likewise.
817 (add_commands_to_breakpoint): Likewise.
818 (clone_agent_expr): Likewise.
819 (clone_one_breakpoint): Likewise.
820 * regcache.c (new_register_cache): Likewise.
821 * remote-utils.c (look_up_one_symbol): Likewise.
822 * server.c (queue_stop_reply): Likewise.
823 (start_inferior): Likewise.
824 (queue_stop_reply_callback): Likewise.
825 (handle_target_event): Likewise.
826 * spu-low.c (fetch_ppc_memory): Likewise.
827 (store_ppc_memory): Likewise.
828 * target.c (set_target_ops): Likewise.
829 * thread-db.c (thread_db_load_search): Likewise.
830 (try_thread_db_load_1): Likewise.
831 * tracepoint.c (add_tracepoint): Likewise.
832 (add_tracepoint_action): Likewise.
833 (create_trace_state_variable): Likewise.
834 (cmd_qtdpsrc): Likewise.
835 (cmd_qtro): Likewise.
836 (add_while_stepping_state): Likewise.
837 * win32-low.c (child_add_thread): Likewise.
838 (get_image_name): Likewise.
839
ed8b7b42
YQ
8402015-08-25 Yao Qi <yao.qi@linaro.org>
841
842 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
843
db3cb7cb
YQ
8442015-08-25 Yao Qi <yao.qi@linaro.org>
845
846 * Makefile.in (aarch64-linux.o): New rule.
847 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
848 srv_tgtobj.
849 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
850 (aarch64_init_debug_reg_state): Make it extern.
851 (aarch64_linux_prepare_to_resume): Remove.
852
f6011a1c
YQ
8532015-08-25 Yao Qi <yao.qi@linaro.org>
854
855 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
856 lwp_arch_private_info and ptid_of_lwp.
857
88e2cf7e
YQ
8582015-08-25 Yao Qi <yao.qi@linaro.org>
859
860 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
861 Find proc_info by find_process_pid. All callers updated.
862
5e35436e
YQ
8632015-08-25 Yao Qi <yao.qi@linaro.org>
864
865 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
866 Remove.
867 (debug_reg_change_callback): Remove.
868 (aarch64_notify_debug_reg_change): Remove.
869
4a8a7965
YQ
8702015-08-25 Yao Qi <yao.qi@linaro.org>
871
872 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
873 Call current_lwp_ptid.
874
32a271ee
YQ
8752015-08-25 Yao Qi <yao.qi@linaro.org>
876
877 * linux-aarch64-low.c (debug_reg_change_callback): Use
878 debug_printf.
879
0d51c8d7
YQ
8802015-08-25 Yao Qi <yao.qi@linaro.org>
881
882 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
883
31a43dd5
YQ
8842015-08-25 Yao Qi <yao.qi@linaro.org>
885
886 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
887
8ee52567
YQ
8882015-08-25 Yao Qi <yao.qi@linaro.org>
889
890 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
891 the code.
892
ff3f0f45
YQ
8932015-08-25 Yao Qi <yao.qi@linaro.org>
894
895 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
896 Remove.
897 (debug_reg_change_callback): Remove argument entry and add argument
898 lwp. Remove local variable thread. Don't print thread id in the
899 debugging output. Don't check whether pid of thread equals to pid.
900 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
901 iterate_over_lwps instead find_inferior.
902
3d40fbb5
PA
9032015-08-24 Pedro Alves <palves@redhat.com>
904
905 * inferiors.c (get_first_process): New function.
906 * inferiors.h (get_first_process): New declaration.
907 * remote-utils.c (read_ptid): Default to the first process in the
908 list, instead of to the current thread's process.
909
438e1e42
PA
9102015-08-24 Pedro Alves <palves@redhat.com>
911
912 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
913 * event-loop.c: Likewise.
914 * remote-utils.c: Likewise.
915 * tracepoint.c: Likewise.
916
a8c6d4fc
PA
9172015-08-24 Pedro Alves <palves@redhat.com>
918
919 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
920 ptid_get_lwp.
921
99b0bb12
PA
9222015-08-21 Pedro Alves <palves@redhat.com>
923
924 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
925 instead of literal 1.
926
f8904751
PA
9272015-08-21 Pedro Alves <palves@redhat.com>
928
929 * tdesc.c (default_description): Explicitly zero-initialize.
930
465a859e
PA
9312015-08-21 Pedro Alves <palves@redhat.com>
932
933 PR gdb/18749
934 * inferiors.c (remove_thread): Discard any pending stop reply for
935 this thread.
936 * server.c (remove_all_on_match_pid): Rename to ...
937 (remove_all_on_match_ptid): ... this. Work with a filter ptid
938 instead of a pid.
939 (discard_queued_stop_replies): Change parameter to a ptid. Now
940 extern.
941 (handle_v_kill, kill_inferior_callback, captured_main)
942 (process_serial_event): Adjust.
943 * server.h (discard_queued_stop_replies): Declare.
944
f0db101d
PA
9452015-08-21 Pedro Alves <palves@redhat.com>
946
947 * linux-low.c (wait_for_sigstop): Always switch to no thread
948 selected if the previously current thread dies.
949 * lynx-low.c (lynx_request_interrupt): Use the first thread's
950 process instead of the current thread's.
951 * remote-utils.c (input_interrupt): Don't check if there's no
952 current thread.
953 * server.c (gdb_read_memory, gdb_write_memory): If setting the
954 current thread to the general thread fails, error out.
955 (handle_qxfer_auxv, handle_qxfer_libraries)
956 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
957 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
958 (handle_query): Check if there's a thread selected instead of
959 checking whether there's any thread in the thread list.
960 (handle_qxfer_threads, handle_qxfer_btrace)
961 (handle_qxfer_btrace_conf): Don't error out early if there's no
962 thread in the thread list.
963 (handle_v_cont, myresume): Don't set the current thread to the
964 continue thread.
965 (process_serial_event) <Hg handling>: Also set thread_id if the
966 previous general thread is still alive.
967 (process_serial_event) <g/G handling>: If setting the current
968 thread to the general thread fails, error out.
969 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
970 thread's lwp instead of the current thread's.
971 * target.c (set_desired_thread): If the desired thread was not
972 found, leave the current thread pointing to NULL. Return an int
973 (boolean) indicating success.
974 * target.h (set_desired_thread): Change return type to int.
975
40045d91
MF
9762015-08-20 Max Filippov <jcmvbkbc@gmail.com>
977
978 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
979 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
980 #includes.
981 (ps_get_thread_area): New function.
982
45face3b
GB
9832015-08-19 Gary Benson <gbenson@redhat.com>
984
985 * hostio.c (handle_pread): Do not attempt to read more data
986 than hostio_reply_with_data can fit in a packet.
987
16d5f642
JB
9882015-08-18 Joel Brobecker <brobecker@adacore.com>
989
990 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
991
a738da3a
MF
9922015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
993
994 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
995
33ebda9d
PA
9962015-08-06 Pedro Alves <palves@redhat.com>
997
998 * tracepoint.c (expr_eval_result): Now an int.
999
a44892be
PA
10002015-08-06 Pedro Alves <palves@redhat.com>
1001
1002 * gdbthread.h (struct regcache): Forward declare.
1003 (struct thread_info) <regcache_data>: Now a struct regcache
1004 pointer.
1005 * inferiors.c (inferior_regcache_data)
1006 (set_inferior_regcache_data): Now work with struct regcache
1007 pointers.
1008 * inferiors.h (struct regcache): Forward declare.
1009 (inferior_regcache_data, set_inferior_regcache_data): Now work
1010 with struct regcache pointers.
1011 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1012 (free_register_cache_thread): Remove struct regcache pointer
1013 casts.
1014
608a1e46
PA
10152015-08-06 Pedro Alves <palves@redhat.com>
1016
1017 * server.c (captured_main): On error, print the exception message
1018 to stderr, and if run_once is set, throw a quit.
1019
f0ce0d3a
PA
10202015-08-06 Pedro Alves <palves@redhat.com>
1021
1022 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1023 the current thread.
1024
bf47e248
PA
10252015-08-06 Pedro Alves <palves@redhat.com>
1026
1027 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1028 reading beyond the passed in buffer length.
1029
b6b9ffcc
PL
10302015-08-06 Pierre Langlois <pierre.langlois@arm.com>
1031
1032 * tracepoint.c (symbol_list) <required>: Remove.
1033
863d01bd
PA
10342015-08-06 Pedro Alves <palves@redhat.com>
1035
1036 * linux-low.c (handle_extended_wait): Set the fork child's suspend
1037 count if stopping and suspending threads.
1038 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1039 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1040 (linux_detach): Complete an ongoing step-over.
1041 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
1042 throughout.
1043 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1044 (linux_wait_1): If passing a signal to the inferior after
1045 finishing a step-over, unsuspend and re-resume all lwps. If we
1046 see a single-step event but the thread should be continuing, don't
1047 pass the trap to gdb.
1048 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1049 internal_error instead of gdb_assert.
1050 (enqueue_pending_signal): New function.
1051 (check_ptrace_stopped_lwp_gone): Add debug output.
1052 (start_step_over): Use internal_error instead of gdb_assert.
1053 (complete_ongoing_step_over): New function.
1054 (linux_resume_one_thread): Don't resume a suspended thread.
1055 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1056 it stepping.
1057
00db26fa
PA
10582015-08-06 Pedro Alves <palves@redhat.com>
1059
1060 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1061 (linux_thread_alive): Use lwp_is_marked_dead.
1062 (extended_event_reported): Delete.
1063 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1064 instead of extended_event_reported.
1065 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1066 as well.
1067 (lwp_is_marked_dead): New function.
1068 (lwp_running): Use lwp_is_marked_dead.
1069 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1070 comment.
1071
ad071a30
PA
10722015-08-06 Pedro Alves <palves@redhat.com>
1073
1074 * linux-low.c (linux_wait_1): Move fork event output out of the
1075 !report_to_gdb check. Pass event_child->waitstatus to
1076 target_waitstatus_to_string instead of ourstatus.
1077
524b57e6
YQ
10782015-08-04 Yao Qi <yao.qi@linaro.org>
1079
1080 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1081 if current_thread is 32 bit.
1082
6085d6f6
YQ
10832015-08-04 Yao Qi <yao.qi@linaro.org>
1084
1085 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1086 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1087 * server.c (extended_protocol): Remove "static".
1088 * server.h (extended_protocol): Declare it.
1089
8a7e4587
YQ
10902015-08-04 Yao Qi <yao.qi@linaro.org>
1091
1092 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1093 both aarch64 and aarch32.
1094 (aarch64_set_pc): Likewise.
1095
3b53ae99
YQ
10962015-08-04 Yao Qi <yao.qi@linaro.org>
1097
1098 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1099 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1100 arm-with-neon.xml to srv_xmlfiles.
1101 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1102 (is_64bit_tdesc): New function.
1103 (aarch64_linux_read_description): New function.
1104 (aarch64_arch_setup): Call aarch64_linux_read_description.
1105 (regs_info): Rename to regs_info_aarch64.
1106 (aarch64_regs_info): Return right regs_info.
1107 (initialize_low_arch): Call initialize_low_arch_aarch32.
1108
bd9e6534
YQ
11092015-08-04 Yao Qi <yao.qi@linaro.org>
1110
1111 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1112 * linux-aarch32-low.c: New file.
1113 * linux-aarch32-low.h: New file.
1114 * linux-arm-low.c (arm_fill_gregset): Move it to
1115 linux-aarch32-low.c.
1116 (arm_store_gregset): Likewise.
1117 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1118 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1119 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1120 (regs_info): Rename to regs_info_arm.
1121 (arm_regs_info): Return regs_info_aarch32 if
1122 have_ptrace_getregset is 1 and target description is
1123 arm_with_neon or arm_with_vfpv3.
1124 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1125 Call initialize_low_arch_aarch32 instead.
1126
ded48a5e
YQ
11272015-08-04 Yao Qi <yao.qi@linaro.org>
1128
1129 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1130 * linux-low.c: ... here.
1131 * linux-low.h (have_ptrace_getregset): Declare it.
1132
96e9210f
PA
11332015-08-04 Pedro Alves <palves@redhat.com>
1134
1135 * thread-db.c (struct thread_db): Use new typedefs.
1136 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1137 CHK calls.
1138 (disable_thread_event_reporting): Cast result of dlsym to
1139 destination function pointer type.
1140 (thread_db_mourn): Use td_ta_delete_ftype.
1141
af60a1ef
SL
11422015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1143
1144 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1145 arch variant.
1146 (CDX_BREAKPOINT): Define for R2.
1147 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1148 (the_low_target): Add comments.
1149
e8b41681
YQ
11502015-07-30 Yao Qi <yao.qi@linaro.org>
1151
1152 * linux-arm-low.c (arm_hwcap): Remove it.
1153 (arm_read_description): New local variable arm_hwcap. Don't
1154 set arm_hwcap to zero.
1155
89abb039
YQ
11562015-07-30 Yao Qi <yao.qi@linaro.org>
1157
1158 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1159 Use regcache->tdesc instead.
1160 (arm_store_wmmxregset): Likewise.
1161 (arm_fill_vfpregset): Likewise.
1162 (arm_store_vfpregset): Likewise.
1163
deca266c
YQ
11642015-07-30 Yao Qi <yao.qi@linaro.org>
1165
1166 * linux-arm-low.c: Include arch/arm.h.
1167 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1168 (arm_store_gregset): Likewise.
1169
aa58a496
SM
11702015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1171
1172 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1173 ptrace's 4th parameter.
1174
50904b25
YQ
11752015-07-27 Yao Qi <yao.qi@linaro.org>
1176
1177 * configure.srv (case aarch64*-*-linux*): Don't set
1178 srv_linux_usrregs.
1179
5826e159
PA
11802015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1181
1182 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1183 sys/ptrace.h.
1184 * linux-arm-low.c: Likewise.
1185 * linux-cris-low.c: Likewise.
1186 * linux-crisv32-low.c: Likewise.
1187 * linux-low.c: Likewise.
1188 * linux-m68k-low.c: Likewise.
1189 * linux-mips-low.c: Likewise.
1190 * linux-nios2-low.c: Likewise.
1191 * linux-s390-low.c: Likewise.
1192 * linux-sparc-low.c: Likewise.
1193 * linux-tic6x-low.c: Likewise.
1194 * linux-tile-low.c: Likewise.
1195 * linux-x86-low.c: Likewise.
1196
54019719
PA
11972015-07-24 Pedro Alves <palves@redhat.com>
1198
1199 * config.in: Regenerate.
1200 * configure: Regenerate.
1201
eb7aa561
PA
12022015-07-24 Pedro Alves <palves@redhat.com>
1203
1204 * acinclude.m4: Include ../ptrace.m4.
1205 * configure.ac: Call GDB_AC_PTRACE.
1206 * config.in, configure: Regenerate.
1207
55d7b841
YQ
12082015-07-24 Yao Qi <yao.qi@linaro.org>
1209
1210 * linux-low.c (linux_create_inferior): Remove setting to
1211 proc->priv->new_inferior.
1212 (linux_attach): Likewise.
1213 (linux_low_filter_event): Likewise.
1214 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1215
c06cbd92
YQ
12162015-07-24 Yao Qi <yao.qi@linaro.org>
1217
1218 * linux-low.c (linux_arch_setup): New function.
1219 (linux_low_filter_event): If proc->tdesc is NULL and
1220 proc->attached is true, call the_low_target.arch_setup.
1221 Otherwise, keep status pending, and return.
1222 (linux_resume_one_lwp_throw): Don't call get_pc if
1223 thread->while_stepping isn't NULL. Don't call
1224 get_thread_regcache if proc->tdesc is NULL.
1225 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1226 (linux_target_ops): Install arch_setup.
1227 * server.c (start_inferior): Call the_target->arch_setup.
1228 * target.h (struct target_ops) <arch_setup>: New field.
1229 (target_arch_setup): New marco.
1230 * lynx-low.c (lynx_target_ops): Update.
1231 * nto-low.c (nto_target_ops): Update.
1232 * spu-low.c (spu_target_ops): Update.
1233 * win32-low.c (win32_target_ops): Update.
1234
5ae3ebba
YQ
12352015-07-24 Yao Qi <yao.qi@linaro.org>
1236
1237 * linux-low.c (linux_add_process): Don't set
1238 proc->priv->new_inferior.
1239 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1240 (linux_attach): Likewise.
1241
eb97750b
YQ
12422015-07-24 Yao Qi <yao.qi@linaro.org>
1243
1244 * server.c (start_inferior): Code refactor.
1245
51aee833
YQ
12462015-07-24 Yao Qi <yao.qi@linaro.org>
1247
1248 * server.c (process_serial_event): Set general_thread.
1249
af1b22f3
YQ
12502015-07-21 Yao Qi <yao.qi@linaro.org>
1251
1252 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1253 aarch64_linux_get_debug_reg_capacity.
1254
554717a3
YQ
12552015-07-17 Yao Qi <yao.qi@linaro.org>
1256
1257 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1258 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1259 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1260 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1261 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1262 (AARCH64_HWP_ALIGNMENT): Likewise.
1263 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1264 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1265 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1266 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1267 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1268 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1269 (struct aarch64_debug_reg_state): Likewise.
1270 (struct arch_lwp_info): Likewise.
1271 (aarch64_align_watchpoint): Likewise.
1272 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1273 (aarch64_watchpoint_length): Likewise.
1274 (aarch64_point_encode_ctrl_reg): Likewise
1275 (aarch64_point_is_aligned): Likewise.
1276 (aarch64_align_watchpoint): Likewise.
1277 (aarch64_linux_set_debug_regs):
1278 (aarch64_dr_state_insert_one_point): Likewise.
1279 (aarch64_dr_state_remove_one_point): Likewise.
1280 (aarch64_handle_breakpoint): Likewise.
1281 (aarch64_handle_aligned_watchpoint): Likewise.
1282 (aarch64_handle_unaligned_watchpoint): Likewise.
1283 (aarch64_handle_watchpoint): Likewise.
1284
c67ca4de
YQ
12852015-07-17 Yao Qi <yao.qi@linaro.org>
1286
1287 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1288 and don't aarch64_get_debug_reg_state. All callers update.
1289 (aarch64_handle_aligned_watchpoint): Likewise.
1290 (aarch64_handle_unaligned_watchpoint): Likewise.
1291 (aarch64_handle_watchpoint): Likewise.
1292 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1293 (aarch64_remove_point): Likewise.
1294
25abf979
YQ
12952015-07-17 Yao Qi <yao.qi@linaro.org>
1296
1297 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1298 debug_printf.
1299 (aarch64_handle_unaligned_watchpoint): Likewise.
1300
db1ff28b
JK
13012015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1302
1303 Revert the previous 3 commits:
1304 Move gdb_regex* to common/
1305 Move linux_find_memory_regions_full & co.
1306 gdbserver build-id attribute generator
1307
700ca40f
JK
13082015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1309 Jan Kratochvil <jan.kratochvil@redhat.com>
1310
1311 gdbserver build-id attribute generator.
1312 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1313 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1314 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1315 (find_phdr): New.
1316 (get_dynamic): Use find_pdhr to traverse program headers.
1317 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1318 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1319 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1320 (get_hex_build_id): New.
1321 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1322 to reply XML document.
1323
9904185c
JK
13242015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1325 Jan Kratochvil <jan.kratochvil@redhat.com>
1326
1327 * target.c: Include target/target-utils.h and fcntl.h.
1328 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1329 (target_fileio_read_stralloc): New functions.
1330
6e5b4429
JK
13312015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1332
1333 * Makefile.in (OBS): Add gdb_regex.o.
1334 (gdb_regex.o): New.
1335 * config.in: Rebuilt.
1336 * configure: Rebuilt.
1337
ddc98fbf
JK
13382015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1339 Jan Kratochvil <jan.kratochvil@redhat.com>
1340
1341 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1342 * Makefile.in (OBS): Add target-utils.o.
1343 (linux-maps.o, target-utils.o): New.
1344 * configure.srv (srv_linux_obj): Add linux-maps.o.
1345
e57bb7a0
PL
13462015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1347
1348 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1349 function, return 1.
1350 (the_low_target): Install it.
1351
586b02a9
PA
13522015-07-14 Pedro Alves <palves@redhat.com>
1353
1354 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1355 Instead, ignore ECHILD, and throw an error for other errnos.
1356
58c1b36c
PA
13572015-07-10 Pedro Alves <palves@redhat.com>
1358
1359 * event-loop.c (struct callback_event) <data>: Change type to
1360 gdb_client_data instance instead of gdb_client_data pointer.
1361 (append_callback_event): Adjust.
1362
421530db
PL
13632015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1364
1365 * linux-aarch64-low.c: Add comments for each linux_target_ops
1366 method. Remove comments already covered in target_ops and
1367 linux_target_ops definitions.
1368 (the_low_target): Add comments for each unimplemented method.
1369
c2d65f38
YQ
13702015-07-09 Yao Qi <yao.qi@linaro.org>
1371
1372 * linux-aarch64-low.c (aarch64_regmap): Remove.
1373 (aarch64_usrregs_info): Remove.
1374 (regs_info): Set field usrregs to NULL.
1375
b20a6524
MM
13762015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1377
1378 * linux-low.c: Include "rsp-low.h"
1379 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1380 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1381 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1382 (handle_btrace_enable_pt): New.
1383 (handle_btrace_general_set): Support "pt".
1384 (handle_btrace_conf_general_set): Support "pt:size".
1385
96c97461
PL
13862015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1387
1388 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1389 Z_PACKET_SW_BP.
1390
37d66942
PL
13912015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1392
1393 * linux-aarch64-low.c: Remove comment about endianness.
1394 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1395 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1396 memcmp.
1397
dc06243f
GB
13982015-06-24 Gary Benson <gbenson@redhat.com>
1399
1400 * linux-i386-ipa.c (stdint.h): Do not include.
1401 * lynx-i386-low.c (stdint.h): Likewise.
1402 * lynx-ppc-low.c (stdint.h): Likewise.
1403 * mem-break.c (stdint.h): Likewise.
1404 * thread-db.c (stdint.h): Likewise.
1405 * tracepoint.c (stdint.h): Likewise.
1406 * win32-low.c (stdint.h): Likewise.
1407
124e13d9
SM
14082015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1409
1410 * server.c (write_qxfer_response): Update call to
1411 remote_escape_output.
1412
909c2cda
JK
14132015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1414 Jan Kratochvil <jan.kratochvil@redhat.com>
1415
1416 Merge multiple hex conversions.
1417 * gdbreplay.c (tohex): Rename to 'fromhex'.
1418 (logchar): Use fromhex.
1419
24c05f46
JK
14202015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1421
1422 * server.c (handle_qxfer_libraries): Set `version' attribute for
1423 <library-list>.
1424
14d2069a
GB
14252015-06-10 Gary Benson <gbenson@redhat.com>
1426
1427 * target.h (struct target_ops) <multifs_open>: New field.
1428 <multifs_unlink>: Likewise.
1429 <multifs_readlink>: Likewise.
1430 * linux-low.c (nat/linux-namespaces.h): New include.
1431 (linux_target_ops): Initialize the_target->multifs_open,
1432 the_target->multifs_unlink and the_target->multifs_readlink.
1433 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1434 * hostio.c (hostio_fs_pid): New static variable.
1435 (hostio_handle_new_gdb_connection): New function.
1436 (handle_setfs): Likewise.
1437 (handle_open): Use the_target->multifs_open as appropriate.
1438 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1439 (handle_readlink): Use the_target->multifs_readlink as
1440 appropriate.
1441 (handle_vFile): Handle vFile:setfs packets.
1442 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1443 after target_handle_new_gdb_connection.
1444
4b8b5e72
GB
14452015-06-10 Gary Benson <gbenson@redhat.com>
1446
1447 * configure.ac (AC_CHECK_FUNCS): Add setns.
1448 * config.in: Regenerate.
1449 * configure: Likewise.
1450 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1451 (linux-namespaces.o): New rule.
1452 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1453
3ac2e371
GB
14542015-06-09 Gary Benson <gbenson@redhat.com>
1455
1456 * hostio.c (handle_open): Process mode argument with
1457 fileio_to_host_mode.
1458
ca9b78ce
YQ
14592015-06-01 Yao Qi <yao.qi@linaro.org>
1460
1461 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1462 * linux-x86-low.c: Likewise.
1463
bfacd19d
DB
14642015-05-28 Don Breazeal <donb@codesourcery.com>
1465
1466 * linux-low.c (handle_extended_wait): Initialize
1467 thread_info.last_resume_kind for new fork children.
1468
452003ef
PA
14692015-05-15 Pedro Alves <palves@redhat.com>
1470
1471 * target.h (target_handle_new_gdb_connection): Rewrite using if
1472 wrapped in do/while.
1473
1041a03c
JB
14742015-05-14 Joel Brobecker <brobecker@adacore.com>
1475
1476 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1477 * configure, config.in: Regenerate.
1478 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1479 Declare typedef.
1480
c269dbdb
DB
14812015-05-12 Don Breazeal <donb@codesourcery.com>
1482
1483 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1484 PTRACE_EVENT_VFORK_DONE.
1485 (linux_low_ptrace_options, extended_event_reported): Add vfork
1486 events.
1487 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1488 and "vforkdone" for RSP 'T' Stop Reply Packet.
1489 * server.h (report_vfork_events): Declare
1490 global variable.
1491
3a8a0396
DB
14922015-05-12 Don Breazeal <donb@codesourcery.com>
1493
1494 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1495 (the_low_target) <new_fork>: Initialize new member.
1496 * linux-arm-low.c (arm_new_fork): New function.
1497 (the_low_target) <new_fork>: Initialize new member.
1498 * linux-low.c (handle_extended_wait): Call new target function
1499 new_fork.
1500 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1501 * linux-mips-low.c (mips_add_watchpoint): New function
1502 extracted from mips_insert_point.
1503 (the_low_target) <new_fork>: Initialize new member.
1504 (mips_linux_new_fork): New function.
1505 (mips_insert_point): Call mips_add_watchpoint.
1506 * linux-x86-low.c (x86_linux_new_fork): New function.
1507 (the_low_target) <new_fork>: Initialize new member.
1508
de0d863e
DB
15092015-05-12 Don Breazeal <donb@codesourcery.com>
1510
1511 * linux-low.c (handle_extended_wait): Implement return value,
1512 rename argument 'event_child' to 'event_lwp', handle
1513 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1514 (linux_low_ptrace_options): New function.
1515 (linux_low_filter_event): Call linux_low_ptrace_options,
1516 use different argument fo linux_enable_event_reporting,
1517 use return value from handle_extended_wait.
1518 (extended_event_reported): New function.
1519 (linux_wait_1): Call extended_event_reported and set
1520 status to report fork events.
1521 (linux_write_memory): Add pid to debug message.
1522 (reset_lwp_ptrace_options_callback): New function.
1523 (linux_handle_new_gdb_connection): New function.
1524 (linux_target_ops): Initialize new structure member.
1525 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1526 * lynx-low.c: Initialize new structure member.
1527 * remote-utils.c (prepare_resume_reply): Implement stop reason
1528 "fork" for "T" stop message.
1529 * server.c (handle_query): Call handle_new_gdb_connection.
1530 * server.h (report_fork_events): Declare global flag.
1531 * target.h (struct target_ops) <handle_new_gdb_connection>:
1532 New member.
1533 (target_handle_new_gdb_connection): New macro.
1534 * win32-low.c: Initialize new structure member.
1535
ddcbc397
DB
15362015-05-12 Don Breazeal <donb@codesourcery.com>
1537
1538 * mem-break.c (APPEND_TO_LIST): Define macro.
1539 (clone_agent_expr): New function.
1540 (clone_one_breakpoint): New function.
1541 (clone_all_breakpoints): New function.
1542 * mem-break.h: Declare new functions.
1543
89245bc0
DB
15442015-05-12 Don Breazeal <donb@codesourcery.com>
1545
1546 * linux-low.c (linux_supports_fork_events): New function.
1547 (linux_supports_vfork_events): New function.
1548 (linux_target_ops): Initialize new structure members.
1549 (initialize_low): Call linux_check_ptrace_features.
1550 * lynx-low.c (lynx_target_ops): Initialize new structure
1551 members.
1552 * server.c (report_fork_events, report_vfork_events):
1553 New global flags.
1554 (handle_query): Add new features to qSupported packet and
1555 response.
1556 (captured_main): Initialize new global variables.
1557 * target.h (struct target_ops) <supports_fork_events>:
1558 New member.
1559 <supports_vfork_events>: New member.
1560 (target_supports_fork_events): New macro.
1561 (target_supports_vfork_events): New macro.
1562 * win32-low.c (win32_target_ops): Initialize new structure
1563 members.
1564
835205d0
GB
15652015-05-12 Gary Benson <gbenson@redhat.com>
1566
1567 * server.c (handle_qxfer_exec_file): Use current process
1568 if annex is empty.
1569
21e94bd9
SL
15702015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1571
1572 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1573 Remove HAVE_PTRACE_GETREGS conditionals.
1574 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1575 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1576
45614f15
YQ
15772015-05-08 Yao Qi <yao.qi@linaro.org>
1578
1579 * linux-low.c (linux_supports_conditional_breakpoints): New
1580 function.
1581 (linux_target_ops): Install new target method.
1582 * lynx-low.c (lynx_target_ops): Install NULL hook for
1583 supports_conditional_breakpoints.
1584 * nto-low.c (nto_target_ops): Likewise.
1585 * spu-low.c (spu_target_ops): Likewise.
1586 * win32-low.c (win32_target_ops): Likewise.
1587 * server.c (handle_query): Check
1588 target_supports_conditional_breakpoints.
1589 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1590 New field.
1591 (target_supports_conditional_breakpoints): New macro.
1592
80ad801e
PA
15932015-05-06 Pedro Alves <palves@redhat.com>
1594
1595 PR server/18081
1596 * server.c (start_inferior): If the process exits, mourn it.
1597
819843c7
GB
15982015-04-21 Gary Benson <gbenson@redhat.com>
1599
1600 * hostio.c (fileio_open_flags_to_host): Factored out to
1601 fileio_to_host_openflags in common/fileio.c. Single use
1602 updated.
1603
a2d5a9d7
MF
16042015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1605
1606 * linux-xtensa-low.c (xtensa_fill_gregset)
1607 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1608 XCHAL_HAVE_LOOP.
1609
deb44829
MF
16102015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1611
1612 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1613 (regs_info): Replace usrregs pointer with NULL.
1614
e57f1de3
GB
16152015-04-17 Gary Benson <gbenson@redhat.com>
1616
1617 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1618 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1619 * server.c (handle_qxfer_exec_file): New function.
1620 (qxfer_packets): Add exec-file entry.
1621 (handle_query): Report qXfer:exec-file:read as supported packet.
1622
62828379
RN
16232015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1624
1625 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1626
b88bb450
GB
16272015-04-09 Gary Benson <gbenson@redhat.com>
1628
1629 * hostio-errno.c (errno_to_fileio_error): Remove function.
1630 Update caller to use remote_fileio_to_fio_error.
1631
c8f4bfdd
YQ
16322015-04-09 Yao Qi <yao.qi@linaro.org>
1633
1634 * linux-low.c (linux_insert_point): Call
1635 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1636 (linux_remove_point): Call remove_memory_breakpoint if type is
1637 raw_bkpt_type_sw.
1638 * linux-x86-low.c (x86_insert_point): Don't call
1639 insert_memory_breakpoint.
1640 (x86_remove_point): Don't call remove_memory_breakpoint.
1641
41f98f02
PA
16422015-04-01 Pedro Alves <palves@redhat.com>
1643 Cleber Rosa <crosa@redhat.com>
1644
1645 * server.c (gdbserver_usage): Reorganize and extend the usage
1646 message.
1647
2bf6fb9d
PA
16482015-03-24 Pedro Alves <palves@redhat.com>
1649
1650 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1651 output. Also dump TRAP_TRACE.
1652 (linux_low_filter_event): In debug output, distinguish a
1653 resume_stop SIGSTOP from a delayed SIGSTOP.
1654
369f6daa
GB
16552015-03-24 Gary Benson <gbenson@redhat.com>
1656
1657 * linux-x86-low.c (x86_linux_new_thread): Moved to
1658 nat/x86-linux.c.
1659 (x86_linux_prepare_to_resume): Likewise.
1660
8e5d4070
GB
16612015-03-24 Gary Benson <gbenson@redhat.com>
1662
1663 * Makefile.in (x86-linux-dregs.o): New rule.
1664 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1665 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1666 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1667 (x86_linux_dr_get): Likewise.
1668 (x86_linux_dr_set): Likewise.
1669 (update_debug_registers_callback): Likewise.
1670 (x86_linux_dr_set_addr): Likewise.
1671 (x86_linux_dr_get_addr): Likewise.
1672 (x86_linux_dr_set_control): Likewise.
1673 (x86_linux_dr_get_control): Likewise.
1674 (x86_linux_dr_get_status): Likewise.
1675 (x86_linux_update_debug_registers): Likewise.
1676
2b95d440
GB
16772015-03-24 Gary Benson <gbenson@redhat.com>
1678
1679 * linux-x86-low.c (x86_linux_update_debug_registers):
1680 New function, factored out from...
1681 (x86_linux_prepare_to_resume): ...this.
1682
14b0bc68
GB
16832015-03-24 Gary Benson <gbenson@redhat.com>
1684
1685 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1686 (x86_linux_dr_set): Likewise.
1687 (update_debug_registers_callback): Likewise.
1688 (x86_linux_dr_set_addr): Likewise.
1689 (x86_linux_dr_get_addr): Likewise.
1690 (x86_linux_dr_set_control): Likewise.
1691 (x86_linux_dr_get_control): Likewise.
1692 (x86_linux_dr_get_status): Likewise.
1693 (x86_linux_prepare_to_resume): Likewise.
1694
5dfe6ca8
GB
16952015-03-24 Gary Benson <gbenson@redhat.com>
1696
1697 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1698 Use perror_with_name. Pass string through gettext.
1699 (x86_linux_dr_set): Likewise.
1700
d33472ad
GB
17012015-03-24 Gary Benson <gbenson@redhat.com>
1702
1703 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1704 (x86_linux_dr_set_addr): ...this.
1705 (x86_dr_low_get_addr): Rename to...
1706 (x86_linux_dr_get_addr): ...this.
1707 (x86_dr_low_set_control): Rename to...
1708 (x86_linux_dr_set_control): ...this.
1709 (x86_dr_low_get_control): Rename to...
1710 (x86_linux_dr_get_control): ...this.
1711 (x86_dr_low_get_status): Rename to...
1712 (x86_linux_dr_get_status): ...this.
1713 (x86_dr_low): Update with new function names.
1714
4b134ca1
GB
17152015-03-24 Gary Benson <gbenson@redhat.com>
1716
1717 * Makefile.in (x86-linux.o): New rule.
1718 * configure.srv: Add x86-linux.o to relevant targets.
1719 * linux-low.c (lwp_set_arch_private_info): New function.
1720 (lwp_arch_private_info): Likewise.
1721 * linux-x86-low.c: Include nat/x86-linux.h.
1722 (arch_lwp_info): Removed structure.
1723 (update_debug_registers_callback):
1724 Use lwp_set_debug_registers_changed.
1725 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1726 and lwp_set_debug_registers_changed.
1727 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1728
34c703da
GB
17292015-03-24 Gary Benson <gbenson@redhat.com>
1730
1731 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1732 * linux-arm-low.c (arm_new_thread): Likewise.
1733 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1734 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1735 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1736 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1737
cff068da
GB
17382015-03-24 Gary Benson <gbenson@redhat.com>
1739
1740 * linux-low.c (ptid_of_lwp): New function.
1741 (lwp_is_stopped): Likewise.
1742 (lwp_stop_reason): Likewise.
1743 * linux-x86-low.c (update_debug_registers_callback):
1744 Use lwp_is_stopped.
1745 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1746 lwp_stop_reason.
1747
b2f7c7e8
GB
17482015-03-24 Gary Benson <gbenson@redhat.com>
1749
1750 * linux-low.h (linux_stop_lwp): Remove declaration.
1751
6d4ee8c6
GB
17522015-03-24 Gary Benson <gbenson@redhat.com>
1753
1754 * linux-low.h: Include nat/linux-nat.h.
1755 * linux-low.c (iterate_over_lwps_args): New structure.
1756 (iterate_over_lwps_filter): New function.
1757 (iterate_over_lwps): Likewise.
1758 * linux-x86-low.c (update_debug_registers_callback):
1759 Update signature to what iterate_over_lwps expects.
1760 Remove PID check that iterate_over_lwps now performs.
1761 (x86_dr_low_set_addr): Use iterate_over_lwps.
1762 (x86_dr_low_set_control): Likewise.
1763
70a0bb6b
GB
17642015-03-24 Gary Benson <gbenson@redhat.com>
1765
1766 * linux-x86-low.c (x86_debug_reg_state): New function.
1767 (x86_linux_prepare_to_resume): Use the above.
1768
7b669087
GB
17692015-03-24 Gary Benson <gbenson@redhat.com>
1770
1771 * linux-low.c (current_lwp_ptid): New function.
1772 * linux-x86-low.c: Include nat/linux-nat.h.
1773 (x86_dr_low_get_addr): Use current_lwp_ptid.
1774 (x86_dr_low_get_control): Likewise.
1775 (x86_dr_low_get_status): Likewise.
1776
eef49a3d
PA
17772015-03-20 Pedro Alves <palves@redhat.com>
1778
1779 * tracepoint.c (cmd_qtstatus): Make "str" const.
1780
b2333d22
PA
17812015-03-20 Pedro Alves <palves@redhat.com>
1782
1783 * server.c (handle_general_set): Make "req_str" const.
1784
23f238d3
PA
17852015-03-19 Pedro Alves <palves@redhat.com>
1786
1787 * linux-low.c (linux_resume_one_lwp): Rename to ...
1788 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1789 instead call perror_with_name.
1790 (check_ptrace_stopped_lwp_gone): New function.
1791 (linux_resume_one_lwp): Reimplement as wrapper around
1792 linux_resume_one_lwp_throw that swallows errors if the LWP is
1793 gone.
1794
91baf43f
PA
17952015-03-19 Pedro Alves <palves@redhat.com>
1796
1797 * linux-low.c (count_events_callback, select_event_lwp_callback):
1798 No longer check whether the thread has resume_stop as last resume
1799 kind.
1800
8bf3b159
PA
18012015-03-19 Pedro Alves <palves@redhat.com>
1802
1803 * linux-low.c (count_events_callback, select_event_lwp_callback):
1804 Use the lwp's status_pending_p field, not the thread's.
1805
b90fc188
PA
18062015-03-19 Pedro Alves <palves@redhat.com>
1807
1808 * linux-low.c (select_event_lwp_callback): Update comments to
1809 no longer mention SIGTRAP.
1810
464b0089
GB
18112015-03-18 Gary Benson <gbenson@redhat.com>
1812
1813 * server.c (handle_query): Do not report vFile:fstat as supported.
1814
aa9e327f
GB
18152015-03-11 Gary Benson <gbenson@redhat.com>
1816
1817 * hostio.c (sys/types.h): New include.
1818 (sys/stat.h): Likewise.
1819 (common-remote-fileio.h): Likewise.
1820 (handle_fstat): New function.
1821 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 1822
791c0056
GB
18232015-03-11 Gary Benson <gbenson@redhat.com>
1824
1825 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1826 struct stat.st_blocks and struct stat.st_blksize.
1827 * configure: Regenerate.
1828 * config.in: Likewise.
1829 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1830 (OBS): Add common-remote-fileio.o.
1831 (common-remote-fileio.o): New rule.
1832
9a9df970
PA
18332015-03-09 Pedro Alves <palves@redhat.com>
1834
1835 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1836 'struct sockaddr' pointer in 'accept' call.
1837
9eb1356e
PA
18382015-03-09 Pedro Alves <palves@redhat.com>
1839
1840 Revert:
1841 2015-03-07 Pedro Alves <palves@redhat.com>
1842 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1843 or <winsock2.h> here. Instead include "gdb_socket.h".
1844 (remote_open): Use union gdb_sockaddr_u.
1845 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1846 or <winsock2.h> here. Instead include "gdb_socket.h".
1847 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1848 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1849 or <sys/un.h>.
1850 (init_named_socket, gdb_agent_helper_thread): Use union
1851 gdb_sockaddr_u.
1852
aac331e4
PA
18532015-03-07 Pedro Alves <palves@redhat.com>
1854
1855 * configure.ac (build_warnings): Move
1856 -Wdeclaration-after-statement to the C-specific set.
1857 * configure: Regenerate.
1858
366c75fc
PA
18592015-03-07 Pedro Alves <palves@redhat.com>
1860
1861 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1862 or <winsock2.h> here. Instead include "gdb_socket.h".
1863 (remote_open): Use union gdb_sockaddr_u.
1864 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1865 or <winsock2.h> here. Instead include "gdb_socket.h".
1866 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1867 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1868 or <sys/un.h>.
1869 (init_named_socket, gdb_agent_helper_thread): Use union
1870 gdb_sockaddr_u.
1871
492d29ea
PA
18722015-03-07 Pedro Alves <palves@redhat.com>
1873
1874 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1875 instead.
1876
60a191ed
YQ
18772015-03-06 Yao Qi <yao.qi@linaro.org>
1878
1879 * linux-aarch64-low.c (aarch64_insert_point): Use
1880 show_debug_regs as a boolean.
1881 (aarch64_remove_point): Likewise.
1882
f5771b1d
PA
18832015-03-05 Pedro Alves <palves@redhat.com>
1884
1885 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1886 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1887 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1888 * nto-low.c (nto_target_ops): Likewise.
1889 * spu-low.c (spu_target_ops): Likewise.
1890 * win32-low.c (win32_target_ops): Likewise.
1891
3e572f71
PA
18922015-03-04 Pedro Alves <palves@redhat.com>
1893
72f4393d 1894 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
1895 Decide whether a breakpoint triggered based on the SIGTRAP's
1896 siginfo.si_code.
72f4393d
L
1897 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1898 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
1899 (linux_low_filter_event): Check for breakpoints before checking
1900 watchpoints.
1901 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1902 siginfo.si_code.
72f4393d
L
1903 (linux_stopped_by_sw_breakpoint)
1904 (linux_supports_stopped_by_sw_breakpoint)
1905 (linux_stopped_by_hw_breakpoint)
1906 (linux_supports_stopped_by_hw_breakpoint): New functions.
1907 (linux_target_ops): Install new target methods.
3e572f71 1908
1ec68e26
PA
19092015-03-04 Pedro Alves <palves@redhat.com>
1910
1911 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1912 * server.c (swbreak_feature, hwbreak_feature): New globals.
1913 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1914 (captured_main): Clear swbreak_feature and hwbreak_feature.
1915 * server.h (swbreak_feature, hwbreak_feature): Declare.
1916 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1917 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1918 supports_stopped_by_hw_breakpoint>: New fields.
1919 (target_supports_stopped_by_sw_breakpoint)
1920 (target_stopped_by_sw_breakpoint)
1921 (target_supports_stopped_by_hw_breakpoint)
1922 (target_stopped_by_hw_breakpoint): Declare.
1923
15c66dd6
PA
19242015-03-04 Pedro Alves <palves@redhat.com>
1925
1926 enum lwp_stop_reason -> enum target_stop_reason
1927 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1928 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1929 (linux_wait_1, stuck_in_jump_pad_callback)
1930 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1931 (linux_stopped_by_watchpoint):
1932 * linux-low.h (enum lwp_stop_reason): Delete.
1933 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1934 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1935
98fc70d6
YQ
19362015-03-04 Yao Qi <yao.qi@linaro.org>
1937
1938 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1939
dd2ac174
GB
19402015-03-03 Gary Benson <gbenson@redhat.com>
1941
1942 * hostio.c (handle_vFile): Fix prefix lengths.
1943
d68e53f4
MM
19442015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1945
1946 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1947 ptr_bits.
1948
bf2d68ab
AA
19492015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1950
1951 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1952 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1953 (clean): Add "rm -f" for above C files.
1954 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1955 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1956 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1957 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1958 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1959 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1960 (init_registers_s390x_vx_linux64)
1961 (init_registers_s390x_tevx_linux64)
1962 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1963 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1964 declarations.
1965 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1966 (s390_store_vxrs_high): New functions.
1967 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1968 NT_S390_VXRS_HIGH.
1969 (s390_arch_setup): Add logic for selecting one of the new target
1970 descriptions. Activate the new vector regsets if applicable.
1971 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1972 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1973 and init_registers_s390x_tevx_linux64.
1974
c966a859
PA
19752015-03-01 Pedro Alves <palves@redhat.com>
1976
1977 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1978 parameter.
1979
4180215b
PA
19802015-02-27 Pedro Alves <palves@redhat.com>
1981
1982 * linux-x86-low.c (u_debugreg_offset): New function.
1983 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1984
749bab01
PA
19852015-02-27 Pedro Alves <palves@redhat.com>
1986
1987 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1988 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1989 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1990 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1991 (ps_lsetfpregs, ps_getpid)
1992 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1993 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1994 (ps_lsetxregs, ps_plog): Declare.
1995
3c14e5a3
PA
19962015-02-27 Pedro Alves <palves@redhat.com>
1997
1998 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1999 IP_AGENT_EXPORT_FUNC.
2000 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2001 IP_AGENT_EXPORT_FUNC.
2002 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2003 (IP_AGENT_EXPORT): Delete.
2004 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2005 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2006 (gdb_trampoline_buffer_error, collecting, gdb_collect)
2007 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2008 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2009 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2010 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2011 (traceframe_read_count, traceframe_write_count)
2012 (traceframes_created, trace_state_variables, get_raw_reg)
2013 (get_trace_state_variable_value, set_trace_state_variable_value)
2014 (ust_loaded, helper_thread_id, cmd_buf): Use
2015 IPA_SYM_EXPORTED_NAME.
2016 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2017 (tracepoints) Use IP_AGENT_EXPORT_VAR.
2018 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2019 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2020 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2021 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2022 EXTERN_C_PUSH/EXTERN_C_POP.
2023 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2024 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2025 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2026 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2027 (traceframe_write_count, traceframe_read_count)
2028 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2029 (about_to_request_buffer_space, get_trace_state_variable_value)
2030 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2031 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2032 EXTERN_C_PUSH/EXTERN_C_POP.
2033 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2034 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2035 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2036 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2037 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2038 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2039 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2040 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2041 Define.
2042 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2043 (IP_AGENT_EXPORT_VAR_DECL): Define.
2044 (tracing): Declare.
2045 (gdb_agent_get_raw_reg): Declare.
2046
fe978cb0
PA
20472015-02-27 Tom Tromey <tromey@redhat.com>
2048 Pedro Alves <palves@redhat.com>
2049
2050 Rename symbols whose names are reserved C++ keywords throughout.
2051
3bc3d82a
PA
20522015-02-27 Pedro Alves <palves@redhat.com>
2053
2054 * Makefile.in (COMPILER): New, get it from autoconf.
2055 (CXX): Get from autoconf instead.
2056 (COMPILE.pre): Use COMPILER.
2057 (CC-LD): Rename to ...
2058 (CC_LD): ... this. Use COMPILER.
2059 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2060 (CXX_FOR_TARGET): Default to g++ instead of gcc.
2061 * acinclude.m4: Include build-with-cxx.m4.
2062 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2063 Disable -Werror by default if building in C++ mode.
2064 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2065 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2066 the C++ compiler. Save/restore CXXFLAGS too.
2067 * configure: Regenerate.
2068
07697489
PA
20692015-02-27 Pedro Alves <palves@redhat.com>
2070
2071 * acinclude.m4: Include libiberty.m4.
2072 * configure.ac: Call libiberty_INIT.
2073 * config.in, configure: Regenerate.
2074
9beb7c4e
PA
20752015-02-26 Pedro Alves <palves@redhat.com>
2076
2077 * linux-low.c (linux_wait_1): When incrementing the PC past a
2078 program breakpoint always use the_low_target.breakpoint_len as
2079 increment, rather than the maximum between that and
2080 the_low_target.decr_pc_after_break.
2081
8090aef2
PA
20822015-02-23 Pedro Alves <palves@redhat.com>
2083
2084 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2085 thread was doing a step-over; always adjust the PC if
2086 we stepped over a permanent breakpoint.
2087 (linux_wait_1): If we stepped over breakpoint that was on top of a
2088 permanent breakpoint, manually advance the PC past it.
2089
bc9540e8
PA
20902015-02-23 Pedro Alves <palves@redhat.com>
2091
2092 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2093 modes.
2094 (x86_fill_gregset, x86_store_gregset): Use it when handling
2095 $orig_eax.
2096
2db9a427
PA
20972015-02-20 Pedro Alves <palves@redhat.com>
2098
2099 * thread-db.c: Include "nat/linux-procfs.h".
2100 (thread_db_init): Skip listing new threads if the kernel supports
2101 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2102
afa8d396
PA
21032015-02-20 Pedro Alves <palves@redhat.com>
2104
2105 * linux-low.c (status_pending_p_callback): Use ptid_match.
2106
c9587f88
AT
21072015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2108
2109 PR breakpoints/16812
2110 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2111 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2112 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2113
b05ec7a5
AT
21142015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2115
2116 PR breakpoints/15956
2117 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2118
d33501a5
MM
21192015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2120
2121 * linux-low.c (linux_low_btrace_conf): Print size.
2122 * server.c (handle_btrace_conf_general_set): New.
2123 (hanle_general_set): Call handle_btrace_conf_general_set.
2124 (handle_query): Report Qbtrace-conf:bts:size as supported.
2125
f4abbc16
MM
21262015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2127
2128 * linux-low.c (linux_low_enable_btrace): Update parameters.
2129 (linux_low_btrace_conf): New.
2130 (linux_target_ops)<to_btrace_conf>: Initialize.
2131 * server.c (current_btrace_conf): New.
2132 (handle_btrace_enable): Rename to ...
2133 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
2134 to target_enable_btrace. Update comment. Update users.
2135 (handle_qxfer_btrace_conf): New.
2136 (qxfer_packets): Add btrace-conf entry.
2137 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2138 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2139 (target_ops)<read_btrace_conf>: New.
2140 (target_enable_btrace): Update parameters.
2141 (target_read_btrace_conf): New.
2142
043c3577
MM
21432015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2144
2145 * server.c (handle_btrace_general_set): Remove call to
2146 target_supports_btrace.
2147 (supported_btrace_packets): New.
2148 (handle_query): Call supported_btrace_packets.
2149 * target.h: include btrace-common.h.
2150 (btrace_target_info): Removed.
2151 (supports_btrace, target_supports_btrace): Update parameters.
2152
734b0e4b
MM
21532015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2154
2155 * Makefile.in (SFILES): Add common/btrace-common.c.
2156 (OBS): Add common/btrace-common.o.
2157 (btrace-common.o): Add build rules.
2158 * linux-low: Include btrace-common.h.
2159 (linux_low_read_btrace): Use struct btrace_data. Call
2160 btrace_data_init and btrace_data_fini.
2161
d6c146e9
PA
21622015-02-06 Pedro Alves <palves@redhat.com>
2163
2164 * thread-db.c (find_new_threads_callback): Add debug output.
2165
20ba1ce6
PA
21662015-02-04 Pedro Alves <palves@redhat.com>
2167
2168 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2169 (resume_stopped_resumed_lwps): New function.
2170 (linux_wait_for_event_filtered): Use it.
2171
8cc73a39
SDJ
21722015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2173
2174 * Makefile.in (SFILES): Add linux-personality.c.
2175 (linux-personality.o): New rule.
2176 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2177 list of objects to be built.
2178 * linux-low.c: Include nat/linux-personality.h.
2179 (linux_create_inferior): Remove code to disable address space
2180 randomization (moved to ../nat/linux-personality.c). Create
2181 cleanup to disable address space randomization.
2182
fb23d554
SDJ
21832015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2184
2185 * Makefile.in (posix-strerror.o): New rule.
2186 (mingw-strerror.o): Likewise.
2187 * configure: Regenerated.
2188 * configure.ac: Source file ../common/common.host. Initialize new
2189 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2190
cdf43629
YQ
21912015-01-14 Yao Qi <yao@codesourcery.com>
2192
2193 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2194 (ppc-linux.o): New rule.
2195 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2196 * configure.ac: AC_CHECK_FUNCS(getauxval).
2197 * config.in: Re-generated.
2198 * configure: Re-generated.
2199 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2200 ppc64_64bit_inferior_p
2201
514c5338
YQ
22022015-01-14 Yao Qi <yao@codesourcery.com>
2203
2204 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2205 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2206 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2207 (PT_ORIG_R3, PT_TRAP): Likewise.
2208 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2209 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2210 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2211
3368c1e5
JB
22122015-01-10 Joel Brobecker <brobecker@adacore.com>
2213
2214 * i387-fp.c (i387_cache_to_xsave): In look over
2215 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2216 zmmh_low_space field by use of zmmh_high_space.
2217
582511be
PA
22182015-01-09 Pedro Alves <palves@redhat.com>
2219
2220 * linux-low.c (step_over_bkpt): Move higher up in the file.
2221 (handle_extended_wait): Don't store the stop_pc here.
2222 (get_stop_pc): Adjust comments and rename to ...
2223 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2224 stopped for a software breakpoint or hardware breakpoint.
2225 (thread_still_has_status_pending_p): New function.
2226 (status_pending_p_callback): Use
2227 thread_still_has_status_pending_p. If the event is no longer
2228 interesting, resume the LWP.
2229 (handle_tracepoints): Add assert.
2230 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2231 (wstatus_maybe_breakpoint): New function.
2232 (cancel_breakpoint): Delete function.
2233 (check_stopped_by_watchpoint): New function, factored out from
2234 linux_low_filter_event.
2235 (lp_status_maybe_breakpoint): Delete function.
2236 (linux_low_filter_event): Remove filter_ptid argument.
2237 Leave thread group exits pending here. Store the LWP's stop PC.
2238 Always leave events pending.
2239 (linux_wait_for_event_filtered): Pull all events out of the
2240 kernel, and leave them all pending.
2241 (count_events_callback, select_event_lwp_callback): Consider all
2242 events.
2243 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2244 (select_event_lwp): Only give preference to the stepping LWP in
2245 all-stop mode. Adjust comments.
2246 (ignore_event): New function.
2247 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2248 references to cancel_breakpoints. Adjust to renames. Also give
2249 equal priority to all LWPs that have had events in non-stop mode.
2250 If reporting a software breakpoint event, unadjust the LWP's PC.
2251 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2252 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2253 Adjust.
2254 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2255 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2256 (linux_stopped_by_watchpoint): Adjust.
2257 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2258 * linux-low.h (enum lwp_stop_reason): New.
2259 (struct lwp_info) <stop_pc>: Adjust comment.
2260 <stopped_by_watchpoint>: Delete field.
2261 <stop_reason>: New field.
2262 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2263 * mem-break.c (software_breakpoint_inserted_here)
2264 (hardware_breakpoint_inserted_here): New function.
2265 * mem-break.h (software_breakpoint_inserted_here)
2266 (hardware_breakpoint_inserted_here): Declare.
2267 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2268 (cancel_breakpoints): Delete.
2269 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2270 (upload_fast_traceframes): Remove references to
2271 cancel_breakpoints.
2272
a33e3959
PA
22732015-01-09 Pedro Alves <palves@redhat.com>
2274
2275 * thread-db.c (find_new_threads_callback): Ignore thread if the
2276 kernel thread ID is -1.
2277
8784d563
PA
22782015-01-09 Pedro Alves <palves@redhat.com>
2279
2280 * linux-low.c (linux_attach_fail_reason_string): Move to
2281 nat/linux-ptrace.c, and rename.
2282 (linux_attach_lwp): Update comment.
2283 (attach_proc_task_lwp_callback): New function.
2284 (linux_attach): Adjust to rename and use
2285 linux_proc_attach_tgid_threads.
2286 (linux_attach_fail_reason_string): Delete declaration.
2287
76f2b779
JB
22882015-01-01 Joel Brobecker <brobecker@adacore.com>
2289
2290 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2291 * server.c (gdbserver_version): Likewise.
2292
fafcc06a
SDJ
22932014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2294
2295 * remote-utils.c: Include ctype.h.
2296 (input_interrupt): Explicitly handle the case when the char
2297 received is the NUL byte. Improve the printing of non-ASCII
2298 characters.
2299
beed38b8
JB
23002014-12-16 Joel Brobecker <brobecker@adacore.com>
2301
2302 * linux-low.c (linux_low_filter_event): Update call to
2303 linux_enable_event_reporting following the addition of
2304 a new parameter to that function.
2305
bf330350
CU
23062014-12-16 Catalin Udma <catalin.udma@freescale.com>
2307
2308 PR server/17457
2309 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2310 (AARCH64_FPCR_REGNO): Likewise.
2311 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2312 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2313 (aarch64_store_fpregset): Likewise.
2314
5227d625
JB
23152014-12-15 Joel Brobecker <brobecker@adacore.com>
2316
2317 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2318 Remove FIXME comment about assumption about N.
2319
f93b65a0
JB
23202014-12-13 Joel Brobecker <brobecker@adacore.com>
2321
2322 * configure.ac: If large-file support is disabled in GDBserver,
2323 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2324 * configure: Regenerate.
2325
e5a9158d
AA
23262014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2327
2328 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2329 warning upon ENODATA from ptrace.
2330 * linux-s390-low.c (s390_store_tdb): New.
2331 (s390_regsets): Add regset for NT_S390_TDB.
2332
feea5f36
AA
23332014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2334
2335 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2336 without a fill_function.
2337 * linux-s390-low.c (s390_fill_last_break): Remove.
2338 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2339 (s390_arch_setup): Use regset's size instead of fill_function for
2340 loop end condition.
2341
098dbe61
AA
23422014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2343
2344 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2345 the regset's store function when ptrace returned an error.
2346 * regcache.c (get_thread_regcache): Invalidate register cache
2347 before fetching inferior's registers.
2348
28eef672
AA
23492014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2350
2351 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2352 while-loop as for-loop.
2353 (regsets_store_inferior_registers): Likewise.
2354
bdca27a2
YQ
23552014-11-28 Yao Qi <yao@codesourcery.com>
2356
2357 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2358 * config.in, configure: Re-generate.
2359 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2360 is defined.
2361
9c232dda
YQ
23622014-11-21 Yao Qi <yao@codesourcery.com>
2363
2364 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2365 (AC_CHECK_HEADERS): Remove malloc.h.
2366 * configure: Re-generated.
2367 * config.in: Re-generated.
2368 * server.h: Don't include alloca.h and malloc.h.
2369 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2370 Don't include malloc.h.
2371
43968415
JB
23722014-11-17 Joel Brobecker <brobecker@adacore.com>
2373
2374 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2375 corresponding ERRNO check in same block.
2376
40e91bc7
PA
23772014-11-12 Pedro Alves <palves@redhat.com>
2378
2379 * server.c (cont_thread): Update comment.
2380 (start_inferior, attach_inferior): No longer clear cont_thread.
2381 (handle_v_cont): No longer set cont_thread.
2382 (captured_main): Clear cont_thread each time a GDB connects.
2383
c2c118cf
PA
23842014-11-12 Pedro Alves <palves@redhat.com>
2385
2386 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2387 thread, and don't resume all threads if the Hc thread has exited.
2388
78708b7c
PA
23892014-11-12 Pedro Alves <palves@redhat.com>
2390
2391 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2392 the process group instead of to a specific LWP.
2393
a2abc7de
PA
23942014-10-15 Pedro Alves <palves@redhat.com>
2395
2396 PR server/17487
2397 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2398 parameter.
2399 (arm_set_thread_context): Delete.
2400 (the_low_target): Adjust.
2401 * win32-i386-low.c (debug_registers_changed)
2402 (debug_registers_used): Delete.
2403 (update_debug_registers_callback): New function.
2404 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2405 needing to update their debug registers.
2406 (win32_get_current_dr): New function.
2407 (x86_dr_low_get_addr, x86_dr_low_get_control)
2408 (x86_dr_low_get_status): Fetch the debug register from the thread
2409 record's context.
2410 (i386_initial_stuff): Adjust.
2411 (i386_get_thread_context): Remove current_event parameter. Don't
2412 clear debug_registers_changed nor copy DR values to
2413 debug_reg_state.
2414 (i386_set_thread_context): Delete.
2415 (i386_prepare_to_resume): New function.
2416 (i386_thread_added): Mark the thread as needing to update irs
2417 debug registers.
2418 (the_low_target): Remove i386_set_thread_context and install
2419 i386_prepare_to_resume.
2420 * win32-low.c (win32_get_thread_context): Adjust.
2421 (win32_set_thread_context): Use SetThreadContext
2422 directly.
2423 (win32_prepare_to_resume): New function.
2424 (win32_require_context): New function, factored out from ...
2425 (thread_rec): ... this.
2426 (continue_one_thread): Call win32_prepare_to_resume on each thread
2427 we're about to continue.
2428 (win32_resume): Call win32_prepare_to_resume on the event thread.
2429 * win32-low.h (struct win32_thread_info)
2430 <debug_registers_changed>: New field.
2431 (struct win32_target_ops): Change prototype of set_thread_context,
2432 delete set_thread_context and add prepare_to_resume.
2433 (win32_require_context): New declaration.
2434
a442d071
GB
24352014-10-08 Gary Benson <gbenson@redhat.com>
2436
2437 * server.h: Do not include common-exceptions.h.
2438
6f1947e8
GB
24392014-10-08 Gary Benson <gbenson@redhat.com>
2440
2441 * server.h: Do not include cleanups.h.
2442
63b434a4
JH
24432014-09-30 James Hogan <james.hogan@imgtec.com>
2444
2445 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2446 mips64-dsp-linux.c.
2447
c4d9ceb6
YQ
24482014-09-23 Yao Qi <yao@codesourcery.com>
2449
2450 * linux-low.c (lp_status_maybe_breakpoint): New function.
2451 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2452 (count_events_callback): Likewise.
2453 (select_event_lwp_callback): Likewise.
2454 (cancel_breakpoints_callback): Likewise.
2455
89a5711c
DB
24562014-09-19 Don Breazeal <donb@codesourcery.com>
2457
2458 * linux-low.c (handle_extended_wait): Call
2459 linux_ptrace_get_extended_event.
2460 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2461 linux_is_extended_waitstatus.
2462
bffc0964
JB
24632014-09-16 Joel Brobecker <brobecker@adacore.com>
2464
2465 * Makefile.in (CPPFLAGS): Define.
2466 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2467 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2468
0bfdf32f
GB
24692014-09-16 Gary Benson <gbenson@redhat.com>
2470
2471 * inferiors.h (current_inferior): Renamed as...
2472 (current_thread): New variable. All uses updated.
2473 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2474 (maybe_move_out_of_jump_pad): Likewise.
2475 (cancel_breakpoint): Likewise.
2476 (linux_low_filter_event): Likewise.
2477 (wait_for_sigstop): Likewise.
2478 (linux_resume_one_lwp): Likewise.
2479 (need_step_over_p): Likewise.
2480 (start_step_over): Likewise.
2481 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2482 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2483 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2484 and save_inferior as saved_thread.
2485 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2486 saved_thread.
2487 (regcache_invalidate_thread): Likewise.
2488 * remote-utils.c (prepare_resume_reply): Likewise.
2489 * thread-db.c (thread_db_get_tls_address): Likewise.
2490 (disable_thread_event_reporting): Likewise.
2491 (remove_thread_event_breakpoints): Likewise.
2492 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2493 as saved_thread.
2494 * target.h (set_desired_inferior): Renamed as...
2495 (set_desired_thread): New declaration. All uses updated.
2496 * server.c (myresume): Updated comment to reference thread instead
2497 of inferior.
2498 (handle_serial_event): Likewise.
2499 (handle_target_event): Likewise.
2500
361c8ade
GB
25012014-09-12 Tom Tromey <tromey@redhat.com>
2502 Gary Benson <gbenson@redhat.com>
2503
2504 * regcache.h: Include common-regcache.h.
2505 (regcache_read_pc): Don't declare.
2506 * regcache.c (get_thread_regcache_for_ptid): New function.
2507
bd9269f7
GB
25082014-09-11 Tom Tromey <tromey@redhat.com>
2509 Gary Benson <gbenson@redhat.com>
2510
2511 * symbol.c: New file.
2512 * Makefile.in (SFILES): Add symbol.c.
2513 (OBS): Add symbol.o.
2514
f8c1d06b
GB
25152014-09-11 Gary Benson <gbenson@redhat.com>
2516
2517 * target.c (target_stop_ptid, target_continue_ptid): New
2518 functions.
2519
721ec300
GB
25202014-09-11 Tom Tromey <tromey@redhat.com>
2521 Gary Benson <gbenson@redhat.com>
2522
2523 * target.h: Include target/target.h.
2524 * target.c (target_read_memory, target_read_uint32)
2525 (target_write_memory): New functions.
2526
c5e92cca
GB
25272014-09-11 Gary Benson <gbenson@redhat.com>
2528
2529 * server.h (debug_hw_points): Don't declare.
2530 * server.c (debug_hw_points): Don't define. Replace all uses
2531 with show_debug_regs.
2532 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2533 all uses with show_debug_regs.
2534
2e4bb98a
EBM
25352014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2536
2537 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2538 endianness into account.
2539 (ppc_supply_ptrace_register): Likewise.
2540
ac740bc7
JH
25412014-09-03 James Hogan <james.hogan@imgtec.com>
2542
2543 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2544 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2545
97ea6506
GB
25462014-09-03 Gary Benson <gbenson@redhat.com>
2547
2548 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2549 ALL_DEBUG_ADDRESS_REGISTERS.
2550
df7e5265
GB
25512014-09-02 Gary Benson <gbenson@redhat.com>
2552
2553 * i386-low.h: Renamed as...
2554 * x86-low.h: New file. All type, function and variable name
2555 prefixes changed from "i386_" to "x86_". All references updated.
2556 * i386-low.c: Renamed as...
2557 * x86-low.c: New file. All type, function and variable name
2558 prefixes changed from "i386_" to "x86_". All references updated.
2559
ed859da7
GB
25602014-09-02 Gary Benson <gbenson@redhat.com>
2561
2562 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2563 (x86_linux_new_thread): Likewise.
2564
860789c7
GB
25652014-08-29 Gary Benson <gbenson@redhat.com>
2566
2567 * server.h (setjmp.h): Do not include.
2568 (toplevel): Do not declare.
2569 (common-exceptions.h): Include.
2570 (cleanups.h): Likewise.
2571 * server.c (toplevel): Do not define.
2572 (exit_code): New static global.
2573 (detach_or_kill_for_exit_cleanup): New function.
2574 (main): New function. Original main renamed to...
2575 (captured_main): New function.
2576 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2577
ff55e1b5
GB
25782014-08-29 Gary Benson <gbenson@redhat.com>
2579
2580 * Makefile.in (SFILES): Add common/common-exceptions.c.
2581 (OBS): Add common-exceptions.o.
2582 (common-exceptions.o): New rule.
2583 * utils.c (prepare_to_throw_exception): New function.
2584
e9bcb658
GB
25852014-08-29 Gary Benson <gbenson@redhat.com>
2586
2587 * config.in: Regenerate.
2588 * configure: Likewise.
2589
e3180625
GB
25902014-08-29 Gary Benson <gbenson@redhat.com>
2591
2592 * Makefile.in (SFILES): Add common/cleanups.c.
2593 (OBS): cleanups.o.
2594 (cleanups.o): New rule.
2595
e3d6ba5d
GB
25962014-08-29 Gary Benson <gbenson@redhat.com>
2597
2598 * utils.c (internal_vwarning): New function.
2599
7096e886
GB
26002014-08-28 Gary Benson <gbenson@redhat.com>
2601
2602 * utils.h (fatal): Remove declaration.
2603 * utils.c (fatal): Remove function.
2604
14ce3192
GB
26052014-08-28 Gary Benson <gbenson@redhat.com>
2606
2607 * tracepoint.c (gdb_agent_init): Replace fatal with
2608 perror_with_name.
2609 (initialize_tracepoint): Likewise.
2610
50278d59
GB
26112014-08-28 Gary Benson <gbenson@redhat.com>
2612
2613 * remote-utils.c (remote_prepare): Replace fatal with error.
2614
aa96c426
GB
26152014-08-28 Gary Benson <gbenson@redhat.com>
2616
2617 * linux-low.c (linux_async): Replace fatal with warning.
2618 Tidy up and return.
2619 (linux_start_non_stop): Return -1 if linux_async failed.
2620
f7160e97
GB
26212014-08-28 Gary Benson <gbenson@redhat.com>
2622
2623 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2624 gdb_assert.
2625 (i386_dr_low_get_addr): Remove vague comment.
2626 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2627 gdb_assert.
2628
38e08fca
GB
26292014-08-28 Gary Benson <gbenson@redhat.com>
2630
2631 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2632 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2633 internal_error.
2634 (linux_resume_one_lwp): Likewise.
2635 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2636 gdb_assert.
2637 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2638 with internal_error.
2639 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2640 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2641 (find_register_by_name): Replace fatal with internal_error.
2642 (find_regno): Likewise.
2643 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2644 * thread-db.c (thread_db_create_event): Likewise.
2645 (thread_db_load_search): Likewise.
2646 (try_thread_db_load_1): Likewise.
2647 * tracepoint.c (get_jump_space_head): Replace fatal with
2648 internal_error.
2649 (claim_trampoline_space): Likewise.
2650 (have_fast_tracepoint_trampoline_buffer): Likewise.
2651 (cmd_qtstart): Likewise.
2652 (stop_tracing): Likewise.
2653 (fast_tracepoint_collecting): Likewise.
2654 (target_malloc): Likewise.
2655 (download_tracepoint): Likewise.
2656 (download_trace_state_variables): Replace check with gdb_assert.
2657 (upload_fast_traceframes): Replace fatal with internal_error.
2658
34abf635
GB
26592014-08-19 Tom Tromey <tromey@redhat.com>
2660 Gary Benson <gbenson@redhat.com>
2661
2662 * Makefile.in (SFILES): Add common/common-debug.c.
2663 (OBS): Add common-debug.o.
2664 (common-debug.o): New rule.
2665 * debug.h (debug_printf): Don't declare.
2666 * debug.c (debug_printf): Renamed and rewritten as...
2667 (debug_vprintf): New function.
2668
f6e94d78
GB
26692014-08-19 Gary Benson <gbenson@redhat.com>
2670
2671 * utils.h: Do not include print-utils.h.
2672
9239eeab
GB
26732014-08-19 Tom Tromey <tromey@redhat.com>
2674 Gary Benson <gbenson@redhat.com>
2675
2676 * server.h: Add static assertion.
2677 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2678
ef87c8bb
GB
26792014-08-19 Tom Tromey <tromey@redhat.com>
2680 Gary Benson <gbenson@redhat.com>
2681
2682 * Makefile.in (SFILES): Add common/errors.c.
2683 (OBS): Add errors.o.
2684 (IPA_OBS): Add errors-ipa.o.
2685 (errors.o): New rule.
2686 (errors-ipa.o): Likewise.
2687 * utils.h (perror_with_name, error, warning): Don't declare.
2688 * utils.c (warning): Renamed and rewritten as...
2689 (vwarning): New function.
2690 (error): Renamed and rewritten as...
2691 (verror): New function.
2692 (internal_error): Renamed and rewritten as...
2693 (internal_verror): New function.
2694
bb974a24
GB
26952014-08-07 Gary Benson <gbenson@redhat.com>
2696
2697 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2698 * configure: Regenerate.
2699 * config.in: Likewise.
2700 * server.h: Do not include errno.h.
2701 * event-loop.c: Likewise.
2702 * hostio-errno.c: Likewise.
2703 * linux-low.c: Likewise.
2704 * remote-utils.c: Likewise.
2705 * spu-low.c: Likewise.
2706 * utils.c: Likewise.
2707 * gdbreplay.c: Unconditionally include errno.h.
2708
6d3d12eb
GB
27092014-08-07 Gary Benson <gbenson@redhat.com>
2710
2711 * server.h: Do not include string.h.
2712 * event-loop.c: Likewise.
2713 * linux-low.c: Likewise.
2714 * regcache.c: Likewise.
2715 * remote-utils.c: Likewise.
2716 * spu-low.c: Likewise.
2717 * utils.c: Likewise.
2718
dccbb609
GB
27192014-08-07 Gary Benson <gbenson@redhat.com>
2720
2721 * server.h: Do not include gdb_assert.h.
2722
e76df0d0
GB
27232014-08-07 Gary Benson <gbenson@redhat.com>
2724
2725 * server.h: Do not include common-utils.h.
2726
4cb9c816
GB
27272014-08-07 Gary Benson <gbenson@redhat.com>
2728
2729 * server.h: Do not include ptid.h.
2730 * notif.h: Likewise.
2731
3995eeee
GB
27322014-08-07 Gary Benson <gbenson@redhat.com>
2733
2734 * server.h: Do not include gdb_locale.h.
2735
cb9f1a9b
GB
27362014-08-07 Gary Benson <gbenson@redhat.com>
2737
2738 * server.h: Do not include gdb/signals.h.
2739 * win32-low.c: Likewise.
2740
a5fceff8
GB
27412014-08-07 Gary Benson <gbenson@redhat.com>
2742
2743 * server.h: Do not include pathmax.h.
2744
b9391142
GB
27452014-08-07 Gary Benson <gbenson@redhat.com>
2746
2747 * server.h: Do not include libiberty.h.
2748 * linux-bfin-low.c: Likewise.
2749
0e443c87
GB
27502014-08-07 Gary Benson <gbenson@redhat.com>
2751
2752 * server.h: Do not include ansidecl.h.
2753
8ebb3f56
GB
27542014-08-07 Gary Benson <gbenson@redhat.com>
2755
2756 * linux-x86-low.c: Do not include stddef.h.
2757 * lynx-ppc-low.c: Likewise.
2758 * tracepoint.c: Likewise.
2759
8980bdf6
GB
27602014-08-07 Gary Benson <gbenson@redhat.com>
2761
2762 * server.h: Do not include stdarg.h.
2763 * nto-low.c: Likewise.
2764
d7096f71
GB
27652014-08-07 Gary Benson <gbenson@redhat.com>
2766
2767 * server.h: Do not include stdlib.h.
2768 * inferiors.c: Likewise.
2769 * linux-low.c: Likewise.
2770 * regcache.c: Likewise.
2771 * spu-low.c: Likewise.
2772 * tracepoint.c: Likewise.
2773 * utils.c: Likewise.
2774
d02f550d
GB
27752014-08-07 Gary Benson <gbenson@redhat.com>
2776
2777 * server.h: Do not include stdio.h.
2778 * linux-low.c: Likewise.
2779 * remote-utils.c: Likewise.
2780 * spu-low.c: Likewise.
2781 * utils.c: Likewise.
2782 * wincecompat.c: Likewise.
2783
87f6c4e3
GB
27842014-08-06 Gary Benson <gbenson@redhat.com>
2785
2786 * regcache.c (init_register_cache): Move conditionals inside if.
2787
7089dca4
GB
27882014-08-06 Gary Benson <gbenson@redhat.com>
2789
2790 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2791
462f517e
GB
27922014-07-31 Gary Benson <gbenson@redhat.com>
2793
2794 * ax.h: Do not include server.h.
2795 * gdbthread.h: Likewise.
2796 * lynx-low.h: Likewise.
2797 * notif.h: Likewise.
2798
976411d6
GB
27992014-07-30 Gary Benson <gbenson@redhat.com>
2800
2801 * server.h: Include common-defs.h.
2802 Do not include config.h or build-gnulib-gdbserver/config.h.
2803
d41f6d8e
GB
28042014-07-30 Gary Benson <gbenson@redhat.com>
2805
2806 * hostio-errno.c: Move server.h to top of includes list.
2807 * inferiors.c: Likewise.
2808 * linux-x86-low.c: Likewise.
2809 * notif.c: Include server.h.
2810
314c6a35
TT
28112014-07-24 Tom Tromey <tromey@redhat.com>
2812 Gary Benson <gbenson@redhat.com>
2813
2814 * server.h (CORE_ADDR): Now unsigned.
2815
69ff6be5
PA
28162014-07-16 Pedro Alves <palves@redhat.com>
2817
2818 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2819
ce9e3fe7
PA
28202014-07-15 Pedro Alves <palves@redhat.com>
2821
2822 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2823 copy.
2824
e76126e8
PA
28252014-07-11 Pedro Alves <palves@redhat.com>
2826
2827 * linux-low.c (kill_wait_lwp): New function, based on
2828 kill_one_lwp_callback, but use my_waitpid directly.
2829 (kill_one_lwp_callback, linux_kill): Use it.
2830
8e9db26e
PA
28312014-06-23 Pedro Alves <palves@redhat.com>
2832
2833 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2834 before setting DR0..DR3.
2835
698b3e08
GB
28362014-06-20 Gary Benson <gbenson@redhat.com>
2837
2838 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2839 * configure: Regenerated.
2840 * config.in: Likewise.
2841
125f8a3d
GB
28422014-06-20 Gary Benson <gbenson@redhat.com>
2843
2844 * Makefile.in (SFILES): Update locations for files moved
2845 from common to nat.
2846 (object file files): Reordered.
2847
42995dbd
GB
28482014-06-20 Gary Benson <gbenson@redhat.com>
2849
2850 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2851 (i386_dr_low_set_addr): Likewise.
2852 (i386_dr_low_get_addr): Likewise.
2853 (i386_dr_low_can_set_control): Likewise.
2854 (i386_dr_low_set_control): Likewise.
2855 (i386_dr_low_get_control): Likewise.
2856 (i386_dr_low_get_status): Likewise.
2857 (i386_get_debug_register_length): Likewise.
2858 * linux-x86-low.c (i386_dr_low_set_addr):
2859 Changed signature. Made static.
2860 (i386_dr_low_get_addr): Likewise.
2861 (i386_dr_low_set_control): Likewise.
2862 (i386_dr_low_get_control): Likewise.
2863 (i386_dr_low_get_status): Likewise.
2864 (i386_dr_low): New global variable.
2865 * win32-i386-low.c (i386_dr_low_set_addr):
2866 Changed signature. Made static.
2867 (i386_dr_low_get_addr): Likewise.
2868 (i386_dr_low_set_control): Likewise.
2869 (i386_dr_low_get_control): Likewise.
2870 (i386_dr_low_get_status): Likewise.
2871 (i386_dr_low): New global variable.
2872
e1d2394b
MS
28732014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2874
2875 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2876 * Makefile.in (AR, AR_FLAGS): Define.
2877 * configure: Regenerate.
2878
3a8ee006
GB
28792014-06-19 Gary Benson <gbenson@redhat.com>
2880
2881 * Makefile.in (i386-dregs.o): New rule.
2882 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2883 * i386-low.c (target.h): Remove include.
2884 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2885 (DR_CONTROL_SHIFT): Likewise.
2886 (DR_CONTROL_SIZE): Likewise.
2887 (DR_RW_EXECUTE): Likewise.
2888 (DR_RW_WRITE): Likewise.
2889 (DR_RW_READ): Likewise.
2890 (DR_RW_IORW): Likewise.
2891 (DR_LEN_1): Likewise.
2892 (DR_LEN_2): Likewise.
2893 (DR_LEN_4): Likewise.
2894 (DR_LEN_8): Likewise.
2895 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2896 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2897 (DR_ENABLE_SIZE): Likewise.
2898 (DR_LOCAL_SLOWDOWN): Likewise.
2899 (DR_GLOBAL_SLOWDOWN): Likewise.
2900 (DR_CONTROL_RESERVED): Likewise.
2901 (I386_DR_CONTROL_MASK): Likewise.
2902 (I386_DR_VACANT): Likewise.
2903 (I386_DR_LOCAL_ENABLE): Likewise.
2904 (I386_DR_GLOBAL_ENABLE): Likewise.
2905 (I386_DR_DISABLE): Likewise.
2906 (I386_DR_SET_RW_LEN): Likewise.
2907 (I386_DR_GET_RW_LEN): Likewise.
2908 (I386_DR_WATCH_HIT): Likewise.
2909 (i386_wp_op_t): Likewise.
2910 (i386_show_dr): Likewise.
2911 (i386_length_and_rw_bits): Likewise.
2912 (i386_insert_aligned_watchpoint): Likewise.
2913 (i386_remove_aligned_watchpoint): Likewise.
2914 (i386_handle_nonaligned_watchpoint): Likewise.
2915 i386_update_inferior_debug_regs(): Likewise.
2916 (i386_dr_insert_watchpoint): Likewise.
2917 (i386_dr_remove_watchpoint): Likewise.
2918 (i386_dr_region_ok_for_watchpoint): Likewise.
2919 (i386_dr_stopped_data_address): Likewise.
2920 (i386_dr_stopped_by_watchpoint): Likewise.
2921
8f26655c
GB
29222014-06-19 Gary Benson <gbenson@redhat.com>
2923
2924 * i386-low.c (i386_dr_show): Renamed to
2925 i386_show_dr and made static. All uses updated.
2926 (i386_dr_length_and_rw_bits): Renamed to
2927 i386_length_and_rw_bits and made static.
2928 All uses updated.
2929 (i386_dr_insert_aligned_watchpoint): Renamed to
2930 i386_insert_aligned_watchpoint and made static.
2931 All uses updated.
2932 (i386_dr_remove_aligned_watchpoint): Renamed to
2933 i386_remove_aligned_watchpoint and made static.
2934 All uses updated.
2935 (i386_dr_update_inferior_debug_regs): Renamed to
2936 i386_update_inferior_debug_regs and made static.
2937 All uses updated.
2938
b9228891
GB
29392014-06-18 Gary Benson <gbenson@redhat.com>
2940
5171def3
GB
2941 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2942 (i386_dr_low_can_set_control): Likewise.
2943 (i386_get_debug_register_length): Likewise.
2944 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2945 (i386_dr_low_can_set_control): Likewise.
2946 (i386_get_debug_register_length): Likewise.
2947
29482014-06-17 Gary Benson <gbenson@redhat.com>
2949
b9228891
GB
2950 * i386-low.h (i386-dregs.h): New include.
2951 (DR_FIRSTADDR): Now in i386-dregs.h.
2952 (DR_LASTADDR): Likewise.
2953 (DR_NADDR): Likewise.
2954 (DR_STATUS): Likewise.
2955 (DR_CONTROL): Likewise.
2956 (i386_debug_reg_state): Likewise.
2957 (i386_dr_insert_watchpoint): Likewise.
2958 (i386_dr_remove_watchpoint): Likewise.
2959 (i386_dr_region_ok_for_watchpoint): Likewise.
2960 (i386_dr_stopped_data_address): Likewise.
2961 (i386_dr_stopped_by_watchpoint): Likewise.
2962 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2963
4be83cc2
GB
29642014-06-18 Gary Benson <gbenson@redhat.com>
2965
2966 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2967 i386_dr_insert_watchpoint.
2968 (i386_low_remove_watchpoint): Renamed to
2969 i386_dr_remove_watchpoint.
2970 (i386_low_region_ok_for_watchpoint): Renamed to
2971 i386_dr_region_ok_for_watchpoint.
2972 (i386_low_stopped_data_address): Renamed to
2973 i386_dr_stopped_data_address.
2974 (i386_low_stopped_by_watchpoint): Renamed to
2975 i386_dr_stopped_by_watchpoint.
2976 * i386-low.c (i386_show_dr): Renamed to
2977 i386_dr_show and made nonstatic. All uses updated.
2978 (i386_length_and_rw_bits): Renamed to
2979 i386_dr_length_and_rw_bits and made nonstatic.
2980 All uses updated.
2981 (i386_insert_aligned_watchpoint): Renamed to
2982 i386_dr_insert_aligned_watchpoint and made nonstatic.
2983 All uses updated.
2984 (i386_remove_aligned_watchpoint): Renamed to
2985 i386_dr_remove_aligned_watchpoint and made nonstatic.
2986 All uses updated.
2987 (i386_update_inferior_debug_regs): Renamed to
2988 i386_dr_update_inferior_debug_regs and made nonstatic.
2989 All uses updated.
2990 (i386_low_insert_watchpoint): Renamed to
2991 i386_dr_insert_watchpoint. All uses updated.
2992 (i386_low_remove_watchpoint): Renamed to
2993 i386_dr_remove_watchpoint. All uses updated.
2994 (i386_low_region_ok_for_watchpoint): Renamed to
2995 i386_dr_region_ok_for_watchpoint. All uses updated.
2996 (i386_low_stopped_data_address): Renamed to
2997 i386_dr_stopped_data_address. All uses updated.
2998 (i386_low_stopped_by_watchpoint): Renamed to
2999 i386_dr_stopped_by_watchpoint. All uses updated.
3000
131aa0d4
GB
30012014-06-18 Gary Benson <gbenson@redhat.com>
3002
3003 * i386-low.c (i386_dr_low_can_set_addr): New macro.
3004 (i386_dr_low_can_set_control): Likewise.
3005 (i386_insert_aligned_watchpoint): New check.
3006
d9305f7f
GB
30072014-06-18 Gary Benson <gbenson@redhat.com>
3008
3009 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3010 Renamed to state.
3011
e927c9fc
GB
30122014-06-18 Gary Benson <gbenson@redhat.com>
3013
3014 * i386-low.c (i386_length_and_rw_bits): Use internal_error
3015 instead of fatal and error.
3016 (i386_handle_nonaligned_watchpoint): Likewise.
3017
1b6d4134
GB
30182014-06-18 Gary Benson <gbenson@redhat.com>
3019
3020 * i386-low.c (i386_get_debug_register_length): New macro.
3021 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
3022 (i386_show_dr): Use debug_printf instead of fprintf. Use
3023 phex to format values.
3024
6e62758f
GB
30252014-06-18 Gary Benson <gbenson@redhat.com>
3026
3027 * i386-low.h: Comment changes.
3028 * i386-low.c: Likewise.
3029
fc6e2f03
GB
30302014-06-18 Gary Benson <gbenson@redhat.com>
3031
3032 * i386-low.c: Whitespace changes.
3033
f9d1eeed
TT
30342014-06-12 Tom Tromey <tromey@redhat.com>
3035
3036 * utils.c (freeargv): Remove.
3037
0b04e523
TT
30382014-06-12 Tom Tromey <tromey@redhat.com>
3039
3040 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3041 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3042 (parse_debug_format_options): Likewise.
3043 (gdbserver_usage): Likewise.
3044 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3045 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3046 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3047 against libiberty.
3048 ($(LIBGNU)): Depend on libiberty.
3049 (all-lib): Recurse into all subdirs.
3050 (install-only): Invoke "install" target in subdirs.
3051 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3052 targets.
3053 * configure: Rebuild.
3054 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
3055 for vasprintf, vsnprintf, or gettimeofday.
3056 * configure.srv: Don't add safe-ctype.o or lbasename.o to
3057 srv_tgtobj.
3058
270c9937
JB
30592014-06-05 Joel Brobecker <brobecker@adacore.com>
3060
3061 * development.sh: Delete.
3062 * Makefile.in (config.status): Adjust dependency on development.sh.
3063 * configure.ac: Adjust development.sh source call.
3064 * configure: Regenerate.
3065
0a261ed8
PA
30662014-06-02 Pedro Alves <palves@redhat.com>
3067
3068 * ax.c (gdb_free_agent_expr): New function.
3069 * ax.h (gdb_free_agent_expr): New declaration.
3070 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3071 list.
3072 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3073 static.
3074 (clear_breakpoint_conditions_and_commands): New function.
3075 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3076 (clear_breakpoint_conditions_and_commands): New declaration.
3077
e9dae05e
RR
30782014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3079
3080 * linux-aarch64-low.c (asm/ptrace.h): Include.
3081
5876f503
JK
30822014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3083
3084 Fix TLS access for -static -pthread.
3085 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3086 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3087 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3088
802e8e6d
PA
30892014-05-20 Pedro Alves <palves@redhat.com>
3090
3091 * linux-aarch64-low.c (aarch64_insert_point)
3092 (aarch64_remove_point): No longer check whether the type is
3093 supported here. Adjust to new interface.
3094 (the_low_target): Install aarch64_supports_z_point_type as
3095 supports_z_point_type method.
3096 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3097 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3098 instead of a Z packet char. Adjust.
3099 (arm_supports_z_point_type): New function.
3100 (arm_insert_point, arm_remove_point): Adjust to new interface.
3101 (the_low_target): Install arm_supports_z_point_type.
3102 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3103 (cris_insert_point, cris_remove_point): Adjust to new interface.
3104 Don't check whether the type is supported here.
3105 (the_low_target): Install cris_supports_z_point_type.
3106 * linux-low.c (linux_supports_z_point_type): New function.
3107 (linux_insert_point, linux_remove_point): Adjust to new interface.
3108 * linux-low.h (struct linux_target_ops) <insert_point,
3109 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3110 raw_breakpoint pointer parameter.
3111 <supports_z_point_type>: New method.
3112 * linux-mips-low.c (mips_supports_z_point_type): New function.
3113 (mips_insert_point, mips_remove_point): Adjust to new interface.
3114 Use mips_supports_z_point_type.
3115 (the_low_target): Install mips_supports_z_point_type.
3116 * linux-ppc-low.c (the_low_target): Install NULL as
3117 supports_z_point_type method.
3118 * linux-s390-low.c (the_low_target): Install NULL as
3119 supports_z_point_type method.
3120 * linux-sparc-low.c (the_low_target): Install NULL as
3121 supports_z_point_type method.
3122 * linux-x86-low.c (x86_supports_z_point_type): New function.
3123 (x86_insert_point): Adjust to new insert_point interface. Use
3124 insert_memory_breakpoint. Adjust to new
3125 i386_low_insert_watchpoint interface.
3126 (x86_remove_point): Adjust to remove_point interface. Use
3127 remove_memory_breakpoint. Adjust to new
3128 i386_low_remove_watchpoint interface.
3129 (the_low_target): Install x86_supports_z_point_type.
3130 * lynx-low.c (lynx_target_ops): Install NULL as
3131 supports_z_point_type callback.
3132 * nto-low.c (nto_supports_z_point_type): New.
3133 (nto_insert_point, nto_remove_point): Adjust to new interface.
3134 (nto_target_ops): Install nto_supports_z_point_type.
3135 * mem-break.c: Adjust intro comment.
3136 (struct raw_breakpoint) <raw_type, size>: New fields.
3137 <inserted>: Update comment.
3138 <shlib_disabled>: Delete field.
3139 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3140 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3141 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3142 (raw_bkpt_type_to_target_hw_bp_type): New function.
3143 (find_enabled_raw_code_breakpoint_at): New function.
3144 (find_raw_breakpoint_at): New type and size parameters. Use them.
3145 (insert_memory_breakpoint): New function, based off
3146 set_raw_breakpoint_at.
3147 (remove_memory_breakpoint): New function.
3148 (set_raw_breakpoint_at): Reimplement.
3149 (set_breakpoint): New, based on set_breakpoint_at.
3150 (set_breakpoint_at): Reimplement.
3151 (delete_raw_breakpoint): Go through the_target->remove_point
3152 instead of assuming memory breakpoints.
3153 (find_gdb_breakpoint_at): Delete.
3154 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3155 (find_gdb_breakpoint): New function.
3156 (set_gdb_breakpoint_at): Delete.
3157 (z_type_supported): New function.
3158 (set_gdb_breakpoint_1): New function, loosely based off
3159 set_gdb_breakpoint_at.
3160 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3161 (delete_gdb_breakpoint_at): Delete.
3162 (delete_gdb_breakpoint_1): New function, loosely based off
3163 delete_gdb_breakpoint_at.
3164 (delete_gdb_breakpoint): New function.
3165 (clear_gdb_breakpoint_conditions): Rename to ...
3166 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3167 breakpoint.
3168 (add_condition_to_breakpoint): Make static.
3169 (add_breakpoint_condition): Take a struct breakpoint pointer
3170 instead of an address. Adjust.
3171 (gdb_condition_true_at_breakpoint): Rename to ...
3172 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3173 z_type parameter.
3174 (gdb_condition_true_at_breakpoint): Reimplement.
3175 (add_breakpoint_commands): Take a struct breakpoint pointer
3176 instead of an address. Adjust.
3177 (gdb_no_commands_at_breakpoint): Rename to ...
3178 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3179 parameter. Return true if no breakpoint was found. Change debug
3180 output.
3181 (gdb_no_commands_at_breakpoint): Reimplement.
3182 (run_breakpoint_commands): Rename to ...
3183 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3184 and change return type to boolean.
3185 (run_breakpoint_commands): New function.
3186 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3187 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3188 breakpoint. Go through the_target->remove_point instead of
3189 assuming memory breakpoint.
3190 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3191 software and hardware breakpoints.
3192 (reinsert_raw_breakpoint): Go through the_target->insert_point
3193 instead of assuming memory breakpoint.
3194 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3195 software and hardware breakpoints.
3196 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3197 Check both software and hardware breakpoints.
3198 (validate_inserted_breakpoint): Assert the breakpoint is a
3199 software breakpoint. Set the inserted flag to -1 instead of
3200 setting shlib_disabled.
3201 (delete_disabled_breakpoints): Adjust.
3202 (validate_breakpoints): Only validate software breakpoints.
3203 Adjust to inserted flag change.
3204 (check_mem_read, check_mem_write): Skip breakpoint types other
3205 than software breakpoints. Adjust to inserted flag change.
3206 * mem-break.h (enum raw_bkpt_type): New enum.
3207 (raw_breakpoint, struct process_info): Forward declare.
3208 (Z_packet_to_target_hw_bp_type): Delete declaration.
3209 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3210 (set_gdb_breakpoint, delete_gdb_breakpoint)
3211 (clear_breakpoint_conditions): New declarations.
3212 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3213 (breakpoint_inserted_here): Update comment.
3214 (add_breakpoint_condition, add_breakpoint_commands): Replace
3215 address parameter with a breakpoint pointer parameter.
3216 (gdb_breakpoint_here): Update comment.
3217 (delete_gdb_breakpoint_at): Delete.
3218 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3219 * server.c (process_point_options): Take a struct breakpoint
3220 pointer instead of an address. Adjust.
3221 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3222 delete_gdb_breakpoint.
3223 * spu-low.c (spu_target_ops): Install NULL as
3224 supports_z_point_type method.
3225 * target.h: Include mem-break.h.
3226 (struct target_ops) <prepare_to_access_memory>: Update comment.
3227 <supports_z_point_type>: New field.
3228 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3229 instead of a char. Also take a raw breakpoint pointer.
3230 * win32-arm-low.c (the_low_target): Install NULL as
3231 supports_z_point_type.
3232 * win32-i386-low.c (i386_supports_z_point_type): New function.
3233 (i386_insert_point, i386_remove_point): Adjust to new interface.
3234 (the_low_target): Install i386_supports_z_point_type.
3235 * win32-low.c (win32_supports_z_point_type): New function.
3236 (win32_insert_point, win32_remove_point): Adjust to new interface.
3237 (win32_target_ops): Install win32_supports_z_point_type.
3238 * win32-low.h (struct win32_target_ops):
3239 <supports_z_point_type>: New method.
3240 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3241 instead of a char. Also take a raw breakpoint pointer.
3242
932539e3
PA
32432014-05-20 Pedro Alves <palves@redhat.com>
3244
3245 * mem-break.h: Include break-common.h.
3246 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3247 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3248 (Z_packet_to_target_hw_bp_type): New declaration.
3249 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3250 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3251 (Z_PACKET_ACCESS_WP): Delete macros.
3252 (Z_packet_to_hw_type): Delete function.
3253 * i386-low.h: Don't include break-common.h here.
3254 (Z_packet_to_hw_type): Delete declaration.
3255 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3256 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3257 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3258 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3259 * linux-aarch64-low.c: Don't include break-common.h here.
3260 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3261 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3262 (Z_packet_to_target_hw_bp_type): Delete function.
3263 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3264 function.
3265 (mips_insert_point, mips_remove_point): Use
3266 Z_packet_to_target_hw_bp_type.
3267
4ff0d3d8
PA
32682014-05-20 Pedro Alves <palves@redhat.com>
3269
3270 * linux-aarch64-low.c: Include break-common.h.
3271 (enum target_point_type): Delete.
3272 (Z_packet_to_point_type): Rename to ...
3273 (Z_packet_to_target_hw_bp_type): ... this, and return a
3274 target_hw_bp_type instead.
3275 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3276 instead of an enum target_point_type.
3277 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3278 breakpoint type.
3279 (aarch64_dr_state_insert_one_point)
3280 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3281 (aarch64_handle_aligned_watchpoint)
3282 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3283 Take an enum target_hw_bp_type instead of an enum
3284 target_point_type.
3285 (aarch64_supports_z_point_type): New function.
3286 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3287 use Z_packet_to_target_hw_bp_type.
3288
786dc519
JB
32892014-05-20 Joel Brobecker <brobecker@adacore.com>
3290
3291 * configure.ac: Only use -Werror by default when DEVELOPMENT
3292 is true.
3293 * configure: Regenerate.
3294
9e0aa64f
JK
32952014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3296
3297 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3298 * linux-x86-low.c (X86_64_USER_REGS): New.
3299 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3300
2b577b92
YQ
33012014-04-28 Yao Qi <yao@codesourcery.com>
3302
3303 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3304 name.
3305
94611da2
PA
33062014-04-25 Pedro Alves <palves@redhat.com>
3307
3308 PR server/16255
3309 * linux-low.c (linux_attach_fail_reason_string): New function.
3310 (linux_attach_lwp): Delete.
3311 (linux_attach_lwp_1): Rename to ...
3312 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3313 argument. Remove "initial" parameter. Return int instead of
3314 void. Don't error or warn here.
3315 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3316 failure to attach to the tgid. Call warning when failing to
3317 attach to an lwp.
3318 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3319 argument. Remove "initial" parameter. Return int instead of
3320 void. Don't error or warn here.
3321 (linux_attach_fail_reason_string): New declaration.
3322 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3323 interface change. Use linux_attach_fail_reason_string.
3324
01f9f808
MS
33252014-04-24 Michael Sturm <michael.sturm@mintel.com>
3326 Walfred Tedeschi <walfred.tedeschi@intel.com>
3327
3328 * Makefile.in: Added rules to handle new files
3329 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3330 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3331 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3332 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3333 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3334 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3335 x32-avx512-linux.o.
3336 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3337 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3338 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3339 i386/x32-avx512.xml.
3340 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3341 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3342 i386/x32-avx512-linux.xml.
3343 * i387-fp.c (num_avx512_k_registers): New constant for number
3344 of K registers.
3345 (num_avx512_zmmh_low_registers): New constant for number of
3346 lower ZMM registers (0-15).
3347 (num_avx512_zmmh_high_registers): New constant for number of
3348 higher ZMM registers (16-31).
3349 (num_avx512_ymmh_registers): New contant for number of higher
3350 YMM registers (ymm16-31 added by avx521 on x86_64).
3351 (num_avx512_xmm_registers): New constant for number of higher
3352 XMM registers (xmm16-31 added by AVX512 on x86_64).
3353 (struct i387_xsave): Add space for AVX512 registers.
3354 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3355 Add code to handle AVX512 registers.
3356 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3357 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3358 prototypei from generated file.
3359 (tdesc_amd64_avx512_linux): Likewise.
3360 (init_registers_x32_avx512_linux): Likewise.
3361 (tdesc_x32_avx512_linux): Likewise.
3362 (init_registers_i386_avx512_linux): Likewise.
3363 (tdesc_i386_avx512_linux): Likewise.
3364 (x86_64_regmap): Add AVX512 registers.
3365 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3366 mask.
3367 (initialize_low_arch): Add code to initialize AVX512 registers.
3368
51aa91f9
PA
33692014-04-23 Pedro Alves <palves@redhat.com>
3370
3371 * mem-break.c (find_gdb_breakpoint_at): Make static.
3372 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3373
a4165e94
PA
33742014-04-23 Pedro Alves <palves@redhat.com>
3375
3376 * i386-low.c: Don't include break-common.h here.
3377 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3378 prototype to take target_hw_bp_type as argument instead of a Z
3379 packet char.
3380 * i386-low.h: Include break-common.h here.
3381 (Z_packet_to_hw_type): Declare.
3382 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3383 prototypes.
3384 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3385 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3386 (x86_remove_point): Convert the packet number to a
3387 target_hw_bp_type before calling i386_low_remove_watchpoint.
3388 * win32-i386-low.c (i386_insert_point): Convert the packet number
3389 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3390 (i386_remove_point): Convert the packet number to a
3391 target_hw_bp_type before calling i386_low_remove_watchpoint.
3392
b8acf843
PA
33932014-04-23 Pedro Alves <palves@redhat.com>
3394
3395 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3396
d708bcd1
PA
33972014-04-10 Pedro Alves <palves@redhat.com>
3398
3399 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3400 Check if the condition or command is NULL before checking if the
3401 breakpoint is known. On success, return true.
3402 * mem-break.h (add_breakpoint_condition): Document return.
3403 (add_breakpoint_commands): Add describing comment.
3404 * server.c (skip_to_semicolon): New function.
3405 (process_point_options): Use it.
3406
2eec7d5b
PA
34072014-04-09 Pedro Alves <palves@redhat.com>
3408
3409 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3410 to lwpid_of.
3411
fa96cb38
PA
34122014-02-27 Pedro Alves <palves@redhat.com>
3413
3414 PR 12702
3415 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3416 macros.
3417 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3418 output.
3419 (last_thread_of_process_p): Take a PID argument instead of a
3420 thread pointer.
3421 (linux_wait_for_lwp): Delete.
3422 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3423 functions.
3424 (linux_low_filter_event): New function, party factored out from
3425 linux_wait_for_event.
3426 (linux_wait_for_event): Rename to ...
3427 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3428 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3429 sigsuspend. Check for zombie leaders.
3430 (linux_wait_for_event): Reimplement as wrapper around
3431 linux_wait_for_event_filtered.
3432 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3433 a normal or signal exit is seen, it's the whole process exiting.
3434 (wait_for_sigstop): No longer a for_each_inferior callback.
3435 Rewrite on top of linux_wait_for_event_filtered.
3436 (stop_all_lwps): Call wait_for_sigstop directly.
3437 * server.c (resume, handle_target_event): Handle
3438 TARGET_WAITKIND_NO_RESUMED.
3439
d763de10
JB
34402014-02-26 Joel Brobecker <brobecker@adacore.com>
3441
3442 * win32-low.c (psapi_get_dll_name,
3443 * win32_CreateToolhelp32Snapshot): Delete.
3444 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3445 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3446 Delete.
3447 (handle_load_dll): Add function description.
3448 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3449
850a0f76
JB
34502014-02-26 Joel Brobecker <brobecker@adacore.com>
3451
3452 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3453 Add comment.
3454 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3455 base address when calling win32_add_one_solib.
3456 (handle_load_dll): Delete local variable load_addr.
3457 Remove 0x1000 offset applied to DLL base address when calling
3458 win32_add_one_solib.
3459 (handle_unload_dll): Add comment.
3460
f25b3fc3
JB
34612014-02-26 Joel Brobecker <brobecker@adacore.com>
3462
3463 * win32-low.c (win32_add_all_dlls): Renames
3464 win32_ensure_ntdll_loaded. Rewrite function documentation.
3465 Adjust implementation to always load all DLLs.
3466 Add 0x1000 offset to DLL base address when calling
3467 win32_add_one_solib.
3468 (child_initialization_done): New static global.
3469 (do_initial_child_stuff): Set child_initialization_done to
3470 zero during child initialization, and 1 after. Replace call
3471 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3472 Add comment.
3473 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3474 (handle_unload_dll): Add function documentation.
3475 (get_child_debug_event): Ignore load and unload DLL events
3476 during child initialization.
3477
d86d4aaf
DE
34782014-02-20 Doug Evans <dje@google.com>
3479
3bc32da3 3480 Remove global all_lwps.
d86d4aaf
DE
3481 * inferiors.h (ptid_of): Move here from linux-low.h.
3482 (pid_of, lwpid_of): Ditto.
3483 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3484 parameter is a struct thread_info * now.
3485 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3486 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3487 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3488 directly.
3489 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3490 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3491 * linux-arm-low.c (update_registers_callback): Update, "entry"
3492 parameter is a struct thread_info * now.
3493 Fetch lwpid from current_inferior directly.
3494 (arm_insert_point): Pass &all_threads to find_inferior instead of
3495 &all_lwps.
3496 (arm_remove_point): Ditto.
3497 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3498 (arm_prepare_to_resume): Fetch pid from thread.
3499 (arm_read_description): Fetch lwpid from current_inferior directly.
3500 * linux-low.c (all_lwps): Delete.
3501 (delete_lwp): Delete call to remove_inferior.
3502 (handle_extended_wait): Fetch lwpid from thread.
3503 (add_lwp): Don't set lwp->entry.id. Remove call to
3504 add_inferior_to_list.
3505 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3506 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3507 (kill_one_lwp_callback): Ditto.
3508 (linux_kill): Don't dereference NULL pointer.
3509 Fetch ptid,lwpid from thread.
3510 (get_detach_signal): Fetch ptid from thread.
3511 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3512 Simplify call to regcache_invalidate_thread.
3513 (delete_lwp_callback): Update, "entry" parameter is a
3514 struct thread_info * now. Fetch pid from thread.
3515 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3516 (status_pending_p_callback): Update, "entry" parameter is a
3517 struct thread_info * now. Fetch ptid from thread.
3518 (find_lwp_pid): Update, "entry" parameter is a
3519 struct thread_info * now.
3520 (linux_wait_for_lwp): Fetch pid from thread.
3521 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3522 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3523 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3524 (dequeue_one_deferred_signal): Ditto.
3525 (cancel_breakpoint): Fetch ptid from current_inferior.
3526 (linux_wait_for_event): Pass &all_threads to find_inferior,
3527 not &all_lwps. Fetch ptid, lwpid from thread.
3528 (count_events_callback): Update, "entry" parameter is a
3529 struct thread_info * now.
3530 (select_singlestep_lwp_callback): Ditto.
3531 (select_event_lwp_callback): Ditto.
3532 (cancel_breakpoints_callback): Ditto.
3533 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3534 not &all_lwps.
3535 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3536 (unsuspend_one_lwp): Update, "entry" parameter is a
3537 struct thread_info * now.
3538 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3539 not &all_lwps.
3540 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3541 Fetch lwpid from thread, not lwp.
3542 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3543 Pass &all_threads to find_inferior, not &all_lwps.
3544 (send_sigstop): Fetch lwpid from thread, not lwp.
3545 (send_sigstop_callback): Update, "entry" parameter is a
3546 struct thread_info * now.
3547 (suspend_and_send_sigstop_callback): Ditto.
3548 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3549 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3550 struct thread_info * now.
3551 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3552 from thread, lwp.
3553 (lwp_running): Update, "entry" parameter is a
3554 struct thread_info * now.
3555 (stop_all_lwps): Fetch ptid from thread.
3556 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3557 (linux_resume_one_lwp): Fetch lwpid from thread.
3558 (linux_set_resume_request): Update, "entry" parameter is a
3559 struct thread_info * now. Fetch pid, lwpid from thread.
3560 (resume_status_pending_p): Update, "entry" parameter is a
3561 struct thread_info * now.
3562 (need_step_over_p): Ditto. Fetch lwpid from thread.
3563 (start_step_over): Fetch lwpid from thread.
3564 (linux_resume_one_thread): Update, "entry" parameter is a
3565 struct thread_info * now. Fetch lwpid from thread.
3566 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3567 (proceed_one_lwp): Update, "entry" parameter is a
3568 struct thread_info * now. Fetch lwpid from thread.
3569 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3570 struct thread_info * now.
3571 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3572 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3573 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3574 directly.
3575 (regsets_store_inferior_registers): Ditto.
3576 (fetch_register, store_register): Ditto.
3577 (linux_read_memory, linux_write_memory): Ditto.
3578 (linux_request_interrupt): Ditto.
3579 (linux_read_auxv): Ditto.
3580 (linux_xfer_siginfo): Ditto.
3581 (linux_qxfer_spu): Ditto.
3582 (linux_qxfer_libraries_svr4): Ditto.
3583 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3584 moved to inferiors.h.
3585 (get_lwp): Delete.
3586 (get_thread_lwp): Update.
3587 (struct lwp_info): Delete member "entry". Simplify comment for
3588 member "thread".
3589 (all_lwps): Delete.
3590 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3591 current_inferior directly.
3592 (update_watch_registers_callback): Update, "entry" parameter is a
3593 struct thread_info * now. Fetch pid from thread.
3594 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3595 (mips_insert_point): Fetch lwpid from current_inferior.
3596 Pass &all_threads to find_inferior, not &all_lwps.
3597 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3598 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3599 directly.
3600 (mips_stopped_data_address): Ditto.
3601 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3602 directly.
3603 * linux-tile-low.c (tile_arch_setup): Ditto.
3604 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3605 (update_debug_registers_callback): Update, "entry" parameter is a
3606 struct thread_info * now. Fetch pid from thread.
3607 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3608 Pass &all_threads to find_inferior, not &all_lwps.
3609 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3610 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3611 Pass &all_threads to find_inferior, not &all_lwps.
3612 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3613 (i386_dr_low_get_status): Ditto.
3614 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3615 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3616 (x86_linux_read_description): Ditto.
3617 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3618
3b8361aa
DE
36192014-02-20 Doug Evans <dje@google.com>
3620
3621 * inferiors.c (get_first_inferior): Fix buglet.
3622
f7667f0d
DE
36232014-02-19 Doug Evans <dje@google.com>
3624
3625 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3626 * inferiors.c (add_thread): Change result type to struct thread_info *.
3627 All callers updated.
3628 (add_lwp): Call add_thread here instead of in callers.
3629 All callers updated.
3630 * linux-low.h (get_lwp_thread): Rewrite.
3631 (struct lwp_info): New member "thread".
3632
b3312d80
DE
36332014-02-19 Doug Evans <dje@google.com>
3634
3635 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3636 All callers updated.
3637
ecc6f45c
DE
36382014-02-19 Doug Evans <dje@google.com>
3639
3640 * inferiors.c (add_thread): Fix whitespace.
3641
649ebbca
DE
36422014-02-19 Doug Evans <dje@google.com>
3643
3644 * dll.c (clear_dlls): Replace accessing list implemention details
3645 with API function.
3646 * gdbthread.h (get_first_thread): Declare.
3647 * inferiors.c (for_each_inferior_with_data): New function.
3648 (get_first_thread): New function.
3649 (find_thread_ptid): Simplify.
3650 (get_first_inferior): New function.
3651 (clear_list): Delete.
3652 (one_inferior_p): New function.
3653 (clear_inferior_list): New function.
3654 (clear_inferiors): Update.
3655 * inferiors.h (for_each_inferior_with_data): Declare.
3656 (clear_inferior_list): Declare.
3657 (one_inferior_p): Declare.
3658 (get_first_inferior): Declare.
3659 * linux-low.c (linux_wait_for_event): Replace accessing list
3660 implemention details with API function.
3661 * server.c (target_running): Ditto.
3662 (accumulate_file_name_length): New function.
3663 (emit_dll_description): New function.
3664 (handle_qxfer_libraries): Replace accessing list implemention
3665 details with API function.
3666 (handle_qxfer_threads_worker): New function.
3667 (handle_qxfer_threads_proper): Replace accessing list implemention
3668 details with API function.
3669 (handle_query): Ditto.
3670 (visit_actioned_threads_callback_ftype): New typedef.
3671 (visit_actioned_threads_data): New struct.
3672 (visit_actioned_threads): Rewrite to be find_inferior callback.
3673 (resume): Call find_inferior.
3674 (handle_status): Replace accessing list implemention
3675 details with API function.
3676 (process_serial_event): Replace accessing list implemention details
3677 with API function.
3678 * target.c (set_desired_inferior): Replace accessing list implemention
3679 details with API function.
3680 * tracepoint.c (same_process_p): New function.
3681 (gdb_agent_about_to_close): Replace accessing list implemention
3682 details with API function.
3683 * win32-low.c (child_delete_thread): Replace accessing list
3684 implemention details with API function.
3685 (match_dll_by_basename): New function.
3686 (dll_is_loaded_by_basename): New function.
3687 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3688 details call to dll_is_loaded_by_basename.
3689
80894984
DE
36902014-02-19 Doug Evans <dje@google.com>
3691
3692 * dll.h (struct dll_info): Add comment.
3693 * gdbthread.h (struct thread_info): Add comment.
3694 (current_ptid): Simplify.
3695 * inferiors.c (add_process): Update.
3696 (remove_process): Update.
3697 * inferiors.h (struct process_info): Rename member "head" to "entry".
3698 * linux-low.c (delete_lwp): Update.
3699 (add_lwp): Update.
3700 (last_thread_of_process_p): Update.
3701 (kill_one_lwp_callback, linux_kill): Update.
3702 (status_pending_p_callback): Update.
3703 (wait_for_sigstop): Update. Simplify read of ptid.
3704 (start_step_over): Update.
3705 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3706 (get_lwp_thread): Update.
3707 (struct lwp_info): Rename member "head" to "entry".
3708 * regcache.h (inferior_list_entry): Delete.
3709 * server.c (kill_inferior_callback): Update.
3710 (detach_or_kill_inferior_callback): Update.
3711 (print_started_pid): Update.
3712 (print_attached_pid): Update.
3713 (process_serial_event): Simplify read of ptid.
3714 * thread-db.c (thread_db_create_event): Update.
3715 (thread_db_get_tls_address): Update.
3716 * win32-low.c (current_inferior_ptid): Simplify.
3717
46917d26
TT
37182014-02-19 Tom Tromey <tromey@redhat.com>
3719
3720 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3721 argument.
3722 (target_supports_btrace): Update.
3723
0759a81e
YQ
37242014-02-14 Yao Qi <yao@codesourcery.com>
3725
3726 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3727 (rsp-low-ipa.o): New target.
3728
a7191e8b
TT
37292014-02-12 Tom Tromey <tromey@redhat.com>
3730
3731 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3732 convert_ascii_to_int.
3733 * regcache.c (registers_to_string): Likewise.
3734 * remote-utils.c (decode_M_packet): Likewise.
3735 * server.c (process_serial_event): Likewise.
3736
ff0e980e
TT
37372014-02-12 Tom Tromey <tromey@redhat.com>
3738
3739 * server.c (handle_query, handle_v_run): Use hex2bin, not
3740 unhexify.
3741 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3742
e9371aff
TT
37432014-02-12 Tom Tromey <tromey@redhat.com>
3744
3745 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3746 convert_int_to_ascii.
3747 * regcache.c (registers_to_string, collect_register_as_string):
3748 Likewise.
3749 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3750 Likewise.
3751 * server.c (process_serial_event): Likewise.
3752 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3753 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3754
971dc0b8
TT
37552014-02-12 Tom Tromey <tromey@redhat.com>
3756
3757 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3758 bin2hex, not hexify.
3759 * tracepoint.c (cmd_qtstatus): Likewise.
3760
0a822afb
TT
37612014-02-12 Tom Tromey <tromey@redhat.com>
3762
3763 * remote-utils.c (monitor_output): Pass explicit length to
3764 hexify.
3765
9c3d6531
TT
37662014-02-12 Tom Tromey <tromey@redhat.com>
3767
3768 * tracepoint.c: Include rsp-low.h.
3769 * server.c: Include rsp-low.h.
3770 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3771 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3772 declare.
3773 * remote-utils.c: Include rsp-low.h.
3774 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3775 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3776 (convert_int_to_ascii, convert_ascii_to_int): Move to
3777 common/rsp-low.c.
3778 * regcache.c: Include rsp-low.h.
3779 * ax.c: Include rsp-low.h.
3780 * Makefile.in (SFILES): Add common/rsp-low.c.
3781 (OBS): Add rsp-low.o.
3782 (rsp-low.o): New target.
3783
01fd3ea5
TT
37842014-02-12 Tom Tromey <tromey@redhat.com>
3785
3786 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3787 Include print-utils.h.
3788 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3789 (plongest, thirty_two, phex_nz): Remove.
3790 * Makefile.in (SFILES): Add common/print-utils.c.
3791 (OBS): Add print-utils.o.
3792 (print-utils-ipa.o): New target.
3793 (print-utils.o): New target.
3794 (IPA_OBJS): Add print-utils-ipa.o.
3795
e99dc820
TT
37962014-02-06 Tom Tromey <tromey@redhat.com>
3797
3798 * Makefile.in (SFILES): Fix indentation.
3799
ee1e2d4f
DE
38002014-02-05 Doug Evans <dje@google.com>
3801
3802 * linux-low.c (linux_wait_for_event): Improve comment.
3803 (linux_wait_1): Keep current_inferior in sync with event_child.
3804
f5a02773
DE
38052014-01-22 Doug Evans <dje@google.com>
3806
3807 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3808
87ce2a04
DE
38092014-01-22 Doug Evans <dje@google.com>
3810
3811 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3812 * configure: Regenerate.
3813 * config.in: Regenerate.
3814 * Makefile.in (SFILES): Add debug.c.
3815 (OBS): Add debug.o.
3816 * debug.c: New file.
3817 * debug.h: New file.
3818 * linux-aarch64-low.c (*): Update all debugging printfs to use
3819 debug_printf instead of fprintf.
3820 * linux-arm-low.c (*): Ditto.
3821 * linux-cris-low.c (*): Ditto.
3822 * linux-crisv32-low.c (*): Ditto.
3823 * linux-m32r-low.c (*): Ditto.
3824 * linux-sparc-low.c (*): Ditto.
3825 * linux-x86.c (*): Ditto.
3826 * linux-low.c (*): Ditto.
3827 (linux_wait_1): Add calls to debug_enter, debug_exit.
3828 (linux_wait): Remove redundant debugging printf.
3829 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3830 (linux_resume, unstop_all_lwps): Ditto.
3831 * mem-break.c (*): Update all debugging printfs to use
3832 debug_printf instead of fprintf.
3833 * remote-utils.c (*): Ditto.
3834 * thread-db.c (*): Ditto.
3835 * server.c #include <ctype.h>, "gdb_vecs.h".
3836 (debug_threads): Moved to debug.c.
3837 (*): Update all debugging printfs to use debug_printf instead of
3838 fprintf.
3839 (start_inferior): Replace call to fflush with call to debug_flush.
3840 (monitor_show_help): Mention set debug-format.
3841 (parse_debug_format_options): New function.
3842 (handle_monitor_command): Handle "monitor set debug-format".
3843 (gdbserver_usage): Mention --debug-format.
3844 (main): Parse --debug-format.
3845 * server.h (debug_threads): Declaration moved to debug.h.
3846 #include "debug.h".
3847 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3848 trace_debug_1 that uses debug_printf.
3849 (tracepoint_look_up_symbols): Update all debugging printfs to use
3850 debug_printf instead of fprintf.
3851
e671835b
BS
38522014-01-20 Baruch Siach <baruch@tkos.co.il>
3853
3854 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3855 sys/ptrace.h.
3856
b5737fa9
PA
38572014-01-17 Pedro Alves <palves@redhat.com>
3858
ea38d2a9 3859 PR build/16445
c7faa97a
PA
3860 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3861 defined after including gdb_proc_service.h.
b5737fa9 3862
40ed484e
DE
38632014-01-16 Doug Evans <dje@google.com>
3864
3865 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3866 (match_dll): Use it.
3867
969c39fb
MM
38682014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3869
3870 * target.h (target_ops) <read_btrace>: Change parameters and
3871 return type to allow error reporting.
3872 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3873 trace reading errors on.
3874 * linux-low.c (linux_low_read_btrace): Pass trace reading
3875 errors on.
3876 (linux_low_disable_btrace): New.
3877
ab7f45ba
DE
38782014-01-15 Doug Evans <dje@google.com>
3879
3880 * inferiors.c (thread_id_to_gdb_id): Delete.
3881 * inferiors.h (thread_id_to_gdb_id): Delete.
3882
66af0f44
EZ
38832014-01-13 Eli Zaretskii <eliz@gnu.org>
3884
3885 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3886 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3887 versions.
3888
9939e131
PA
38892014-01-08 Pedro Alves <palves@redhat.com>
3890
3891 * server.c (handle_status): Don't discard previous queued stop
3892 replies or thread's pending status here.
3893 (main) <disconnection>: Do it here instead.
3894
b7ea362b
PA
38952014-01-08 Pedro Alves <palves@redhat.com>
3896
3897 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3898 * server.c (visit_actioned_threads, handle_pending_status): New
3899 function.
3900 (handle_v_cont): Factor out parts to ...
3901 (resume): ... this new function. If in all-stop, and a thread
3902 being resumed has a pending status, report it without actually
3903 resuming.
3904 (myresume): Adjust to use the new 'resume' function.
3905 (clear_pending_status_callback, set_pending_status_callback)
3906 (find_status_pending_thread_callback): New functions.
3907 (handle_status): Handle the case of multiple threads having
3908 interesting statuses to report. Report threads' real last signal
3909 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3910 with an interesting thread to report the status for, instead of
3911 always reporting the status of the first thread.
3912
28498c42
JB
39132014-01-01 Joel Brobecker <brobecker@adacore.com>
3914
3915 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3916 * gdbreplay.c (gdbreplay_version): Likewise.
3917
f45c82da
YZ
39182013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3919
3920 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3921 iov.iov_len with the real length in use.
3922
379a5e2d
JB
39232013-12-13 Joel Brobecker <brobecker@adacore.com>
3924
3925 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3926 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3927 for all targets that use win32-low.c.
3928 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3929 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3930
4210d83e
PA
39312013-12-13 Pedro Alves <palves@redhat.com>
3932
3933 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3934 if equal to TARGET_WAITKIND_LOADED.
3935 * win32-low.c (cached_status): New static global.
3936 (win32_wait): Add declaration.
3937 (do_initial_child_stuff): Flush all initial pending debug events
3938 up to the initial breakpoint.
3939 (win32_wait): If CACHED_STATUS was set, return that instead
3940 of doing a real wait. Remove the code resuming the execution
3941 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3942 during the initial phase. Also remove the code changing
3943 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3944 TARGET_WAITKIND_STOPPED.
3945
e7f0d979
YQ
39462013-12-11 Yao Qi <yao@codesourcery.com>
3947
3948 * notif.c (handle_notif_ack): Return 0 if no notification
3949 matches.
3950
ebcf782c
DE
39512013-11-20 Doug Evans <dje@google.com>
3952
3953 * linux-low.c (linux_set_resume_request): Fix comment.
3954
20ad9378
DE
39552013-11-20 Doug Evans <dje@google.com>
3956
3957 * linux-low.c (resume_status_pending_p): Tweak comment.
3958
a196ebeb
WT
39592013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3960
3961 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3962 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3963 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3964 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3965 (srv_amd64_regobj): Add amd64-mpx.o.
3966 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3967 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3968 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3969 * i387-fp.c (num_pl_bnd_register) Added constant.
3970 (num_pl_bnd_cfg_registers) Added constant.
3971 (struct i387_xsave) Added reserved area and MPX fields.
3972 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3973 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3974 function.
3975 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3976 (init_registers_amd64_mpx_linux): Declare new function.
3977 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3978 (x86_64_regmap): Add MPX registers.
3979 (x86_linux_read_description): Add MPX case.
3980 (initialize_low_arch): Initialize MPX targets.
3981
0080a2f6
TT
39822013-11-18 Tom Tromey <tromey@redhat.com>
3983
3984 * configure: Rebuild.
3985 * configure.ac: Don't check for stdlib.h.
3986 * gdbreplay.c: Unconditionally include stdlib.h.
3987
2978b111
TT
39882013-11-18 Tom Tromey <tromey@redhat.com>
3989
3990 * config.in: Rebuild.
3991 * configure: Rebuild.
3992 * configure.ac: Don't use AC_HEADER_DIRENT.
3993
a3d08894
TT
39942013-11-18 Tom Tromey <tromey@redhat.com>
3995
3996 * server.h: Don't check HAVE_STRING_H.
3997 * gdbreplay.c: Don't check HAVE_STRING_H.
3998 * configure: Rebuild.
3999
0a5dd17d
TT
40002013-11-18 Tom Tromey <tromey@redhat.com>
4001
4002 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4003 LIBGNU.
4004
1bd2f0ba
TT
40052013-11-08 Tom Tromey <tromey@redhat.com>
4006
4007 * configure, config.in: Rebuild.
4008 * configure.ac: Remove unused configury.
4009
3266f10b
TT
40102013-11-08 Tom Tromey <tromey@redhat.com>
4011
4012 * acinclude.m4: Include common.m4, codeset.m4.
4013 * configure, config.in: Rebuild.
4014 * configure.ac: Use GDB_AC_COMMON.
4015
6682d959
AA
40162013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
4017
4018 * linux-s390-low.c (HWCAP_S390_TE): New define.
4019 (s390_arch_setup): Consider the TE field in the HWCAP for
4020 determining 'have_regset_tdb'.
4021
fd0a4d76
SDJ
40222013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
4023
4024 PR gdb/16014
4025 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4026 call to sizeof.
4027
1a3d890b
PA
40282013-10-02 Pedro Alves <palves@redhat.com>
4029
4030 * server.c (process_serial_event): Don't output "GDBserver
4031 exiting" if GDB is connected through stdio.
4032 * target.c (mywait): Likewise, be silent if GDB is connected
4033 through stdio.
4034
97ad4581
JB
40352013-10-01 Joel Brobecker <brobecker@adacore.com>
4036
4037 * lynx-low.c (lynx_add_threads_after_attach): New function.
4038 (lynx_attach): Remove call to add_thread. Add call to
4039 lynx_add_threads_after_attach instead.
4040
5b4e221c
MF
40412013-09-28 Mike Frysinger <vapier@gentoo.org>
4042
4043 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4044 * config.in, configure: Regenerated.
4045
ee47b2f8
YQ
40462013-09-18 Yao Qi <yao@codesourcery.com>
4047
4048 PR server/15959
4049 * server.c (start_inferior): Clear 'resume_info'.
4050
d6707650 40512013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 4052
d6707650
JW
4053 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4054 for each register.
4055
9243dd0e 40562013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 4057
9243dd0e
JW
4058 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4059 linux-tile-low.o to srv_tgtobj.
4060
c623a6ef
WN
40612013-09-16 Will Newton <will.newton@linaro.org>
4062
4063 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4064 out regs.
4065
fb71d39e
PA
40662013-09-06 Pedro Alves <palves@redhat.com>
4067
4068 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4069 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4070 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4071 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4072 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4073 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4074
8e7e9910
PA
40752013-09-06 Pedro Alves <palves@redhat.com>
4076
4077 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4078 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4079
7c3a12ca
PA
40802013-09-06 Pedro Alves <palves@redhat.com>
4081
4082 * linux-amd64-ipa.c: Include tracepoint.h.
4083 * linux-i386-ipa.c: Include tracepoint.h.
4084
8eb3d7b6
RW
40852013-09-06 Ricard Wanderlof <ricardw@axis.com>
4086
4087 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4088 (ps_get_thread_area): New function.
4089
eddddb9d
RW
40902013-09-06 Ricard Wanderlof <ricardw@axis.com>
4091
4092 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4093 (initialize_low_arch): Call init_registers_crisv32 rather than
4094 init_register_crisv32.
4095
533b0600
PA
40962013-09-05 Pedro Alves <palves@redhat.com>
4097
4098 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4099 to ...
4100 * hostio.h: ... this new file.
4101 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4102 win32-low.c: Include hostio.h.
4103
0ce3d3b5
PA
41042013-09-05 Pedro Alves <palves@redhat.com>
4105
4106 * server.h (gdb_client_data, handler_func, callback_handler_func)
4107 (delete_file_handler, add_file_handler, append_callback_event)
4108 (delete_callback_event, start_event_loop, initialize_event_loop):
4109 Move to event-loop.h and include it.
4110 * event-loop.h: New file.
4111
799cdc37
PA
41122013-09-05 Pedro Alves <palves@redhat.com>
4113
4114 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4115 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4116 (loaded_dll, unloaded_dll): Move to ...
4117 * dll.h: ... this new file.
4118 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4119
6a6bbd9d
PA
41202013-09-05 Pedro Alves <palves@redhat.com>
4121
4122 * server.h (current_process, get_thread_process, all_processes)
4123 (add_inferior_to_list, for_each_inferior, current_inferior)
4124 (remove_inferior, add_process, remove_process, find_process_pid)
4125 (have_started_inferiors_p, have_attached_inferiors_p)
4126 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4127 (clear_inferiors, find_inferior, find_inferior_id)
4128 (inferior_target_data, set_inferior_target_data)
4129 (inferior_regcache_data, set_inferior_regcache_data): Move to
4130 inferiors.h, and include it.
4131 * inferiors.h: New file.
4132
f699aaba
PA
41332013-09-05 Pedro Alves <palves@redhat.com>
4134
4135 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4136 Move ...
72f4393d 4137 * ax.h: ... here.
f699aaba 4138
c144c7a0
PA
41392013-09-05 Pedro Alves <palves@redhat.com>
4140
4141 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4142 tracepoint.h.
4143 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4144 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4145 (handle_tracepoint_general_set, handle_tracepoint_query)
4146 (tracepoint_finished_step, tracepoint_was_hit)
4147 (release_while_stepping_state_list, current_traceframe)
4148 (in_readonly_region, traceframe_read_mem)
4149 (fetch_traceframe_registers, traceframe_read_sdata)
4150 (traceframe_read_info, struct fast_tpoint_collect_status)
4151 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4152 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4153 (supply_fast_tracepoint_registers)
4154 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4155 (ipa_tdesc, claim_trampoline_space)
4156 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4157 (agent_mem_read, agent_get_trace_state_variable_value)
4158 (agent_set_trace_state_variable_value, agent_tsv_read)
4159 (agent_mem_read_string, get_raw_reg_func_addr)
4160 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4161 * tracepoint.h: ... this new file.
4162
ff42e6ab
PA
41632013-09-05 Pedro Alves <palves@redhat.com>
4164
4165 * server.h (perror_with_name, error, fatal, warning, paddress)
4166 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4167 include it.
4168 * utils.h: New file.
4169
541af0f4
PA
41702013-09-05 Pedro Alves <palves@redhat.com>
4171
4172 * server.h (remote_debug, noack_mode, transport_is_reliable)
4173 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4174 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4175 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4176 (write_enn, initialize_async_io, enable_async_io)
4177 (disable_async_io, check_remote_input_interrupt_request)
4178 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4179 (dead_thread_notify, prepare_resume_reply)
4180 (decode_address_to_semicolon, decode_address, decode_m_packet)
4181 (decode_M_packet, decode_X_packet, decode_xfer_write)
4182 (decode_search_memory_packet, unhexify, hexify)
4183 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4184 (look_up_one_symbol, relocate_instruction)
4185 (monitor_output): Move to remote-utils.h, and include it.
4186 * remote-utils.h: New file.
4187
eebdf26b
PA
41882013-09-05 Pedro Alves <palves@redhat.com>
4189
4190 * server.h (_): Delete.
4191
3aafd2ff
PA
41922013-09-02 Pedro Alves <palves@redhat.com>
4193
4194 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4195 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4196 allocated.
4197 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4198
cee83bcb
PM
41992013-09-02 Pierre Muller <muller@sourceware.org>
4200
4201 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4202 or WriteProcessMemory complete successfully and handle
4203 ERROR_PARTIAL_COPY error.
4204
9a13b2fa
PA
42052013-09-02 Pedro Alves <palves@redhat.com>
4206
4207 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4208 error instead of EIO.
4209
602e3198
JK
42102013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4211
4212 PR server/15604
4213 * linux-low.c: Include filestuff.h.
4214 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4215 * lynx-low.c: Include filestuff.h.
4216 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4217 * server.c: Include filestuff.h.
4218 (main): Call notice_open_fds.
4219 * spu-low.c: Include filestuff.h.
4220 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4221
96d7229d
LM
42222013-08-22 Luis Machado <lgustavo@codesourcery.com>
4223
4224 * Makefile.in: Explain why ../target and ../nat are not
4225 listed as include file search paths.
4226 (linux-waitpid.o): New object file rule.
4227 * configure.srv (srv_native_linux_obj): New variable.
4228 Replace all occurrences of linux native object files with
4229 $srv_native_linux_obj.
4230 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4231 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4232 (linux_enable_event_reporting): Remove declaration.
4233 (my_waitpid): Moved to common/linux-waitpid.c.
4234 (linux_wait_for_event): Pass ptid when calling
4235 linux_enable_event_reporting.
4236 (linux_supports_tracefork_flag): Remove.
4237 (linux_enable_event_reporting): Likewise.
4238 (linux_tracefork_grandchild): Remove.
4239 (STACK_SIZE): Moved to common/linux-ptrace.c.
4240 (linux_tracefork_child): Remove.
4241 (linux_test_for_tracefork): Remove.
4242 (linux_look_up_symbols): Call linux_supports_traceclone.
4243 (initialize_low): Remove call to linux_test_for_tracefork.
4244 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4245 common/linux-ptrace.h.
4246 (PTRACE_TYPE_ARG4): Likewise.
4247 Include linux-ptrace.h.
4248
32940073
PA
42492013-08-21 Pedro Alves <palves@redhat.com>
4250
4251 * config.in: Renegerate.
4252
33b60d58 42532013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 4254
33b60d58
LM
4255 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4256 (SFILES): Remove $(srcdir)/common/target-common.c and
4257 add $(srcdir)/target/waitstatus.c.
4258 (OBS): Remove target-common.o and add waitstatus.o.
4259 (server_h): Remove $(srcdir)/../common/target-common.h and
4260 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4261 and $(srcdir)/../target/waitstatus.h.
4262 (target-common.o): Remove.
4263 (waitstatus.o): New target object file.
4264 * target.h: Do not include target-common.h and
4265 include target/resume.h, target/wait.h and
4266 target/waitstatus.h.
4267
b8e1b30e
LM
42682013-08-13 Luis Machado <lgustavo@codesourcery.com>
4269
4270 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4271 to PTRACE_TYPE_ARG3.
4272 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4273 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4274 PTRACE_TYPE_ARG4.
4275 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4276 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4277
7a60ad40
YQ
42782013-07-27 Jie Zhang <jie@codesourcery.com>
4279 Daniel Jacobowitz <dan@codesourcery.com>
4280 Yao Qi <yao@codesourcery.com>
4281
4282 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4283 (mips-linux-watch.o): New rule.
4284 (mips_linux_watch_h): New variable.
4285 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4286 srv_tgtobj.
4287 * linux-mips-low.c: Include mips-linux-watch.h.
4288 (struct arch_process_info, struct arch_lwp_info): New.
4289 (update_watch_registers_callback): New function.
4290 (mips_linux_new_process, mips_linux_new_thread) New functions.
4291 (mips_linux_prepare_to_resume, mips_insert_point): New
4292 functions.
4293 (mips_remove_point, mips_stopped_by_watchpoint): New
4294 functions.
4295 (rsp_bp_type_to_target_hw_bp_type): New function.
4296 (mips_stopped_data_address): New function.
4297 (the_low_target): Add watchpoint support functions.
4298
de6f69ad
YQ
42992013-07-27 Yao Qi <yao@codesourcery.com>
4300
4301 * i386-low.c: Include break-common.h.
4302 (enum target_hw_bp_type): Remove.
4303
3360c0bf
LM
43042013-07-24 Luis Machado <lgustavo@codesourcery.com>
4305
4306 * Makefile.in (SFILES): /common/target-common.c.
4307 (OBS): Add target-common.o.
4308 (server_h): Add $(srcdir)/../common/target-common.h.
4309 (target-common.o): New target.
4310 * server.c (queue_stop_reply_callback): Free
4311 status string after use.
4312 * target.c (target_waitstatus_to_string): Remove.
4313 * target.h: Include target-common.h.
4314 (resume_kind): Likewise.
4315 (target_waitkind): Likewise.
4316 (target_waitstatus): Likewise.
4317 (TARGET_WNOHANG): Likewise.
4318
bd885420
YQ
43192013-07-04 Yao Qi <yao@codesourcery.com>
4320
4321 * Makefile.in (host_alias): Use @host_noncanonical@.
4322 (target_alias): Use @target_noncanonical@.
4323 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4324 ACX_NONCANONICAL_HOST.
4325 * configure: Regenerated.
4326
4327 Revert:
4328 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4329
4330 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4331 * configure: Rebuild.
4332 * Makefile.in (version_host, version_target): Get from configure.
4333 (version.c): Use $(version_host) and $(version_target).
4334
17ef446e
PA
43352013-07-03 Pedro Alves <palves@redhat.com>
4336
4337 * Makefile.in (config.status): Depend on development.sh.
4338 * acinclude.m4: Include libmcheck.m4.
4339 * configure: Regenerate.
4340
7a9a7487
MG
43412013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4342
4343 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4344 attribute inside the parentheses.
4345 (winapi_DebugSetProcessKillOnExit): Ditto.
4346 (winapi_DebugBreakProcess): Ditto.
4347 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 4348
49b64de6
MG
43492013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4350
4351 * notif.h (notif_event): Add a dummy member to avoid compiler
4352 errors.
4353
d5749ee7
PA
43542013-07-01 Pedro Alves <palves@redhat.com>
4355
4356 * hostio.c (HOSTIO_PATH_MAX): Define.
4357 (require_filename, handle_open, handle_unlink, handle_readlink):
4358 Use it.
4359
d8d2a3ee
PA
43602013-07-01 Pedro Alves <palves@redhat.com>
4361
4362 * server.h: Include "pathmax.h".
4363 * linux-low.c: Don't include sys/param.h.
4364 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4365 MAXPATHLEN.
4366 * win32-low.c: Don't include sys/param.h.
4367 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4368
bc7dea8d
PA
43692013-07-01 Pedro Alves <palves@redhat.com>
4370
4371 * event-loop.c: Don't check HAVE_UNISTD_H before including
4372 <unistd.h>.
4373 * gdbreplay.c: Likewise.
4374 * remote-utils.c: Likewise.
4375 * server.c: Likewise.
4376 * configure.ac: Don't check for unistd.h.
4377 * configure: Regenerate.
4378
d6c2da54
TT
43792013-06-28 Tom Tromey <tromey@redhat.com>
4380
4381 * Makefile.in (version.c): Use version.in, not
4382 common/version.in.
4383
257b6bec
MG
43842013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4385
4386 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4387 * configure: Rebuild.
4388 * Makefile.in (version_host, version_target): Get from configure.
4389 (version.c): Use $(version_host) and $(version_target).
4390
86ebe149
DK
43912013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4392
4393 Fix trace-status to output user name without trailing colon.
4394 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4395
f30aa5af
DK
43962013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4397
4398 Fix trace-status to output proper start-time and stop-time.
4399 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4400 output start time and stop time in hex as gdb expects.
4401
28a93511
YQ
44022013-06-26 Pedro Alves <pedro@codesourcery.com>
4403
4404 * tracepoint.c (build_traceframe_info_xml): Output trace state
4405 variables present in the trace buffer.
4406
01208463
TT
44072013-06-24 Tom Tromey <tromey@redhat.com>
4408
4409 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4410 create-version.sh.
4411 (version.o): Remove.
4412 * gdbreplay.c: Include version.h.
4413 (version, host_name): Don't declare.
4414 * server.h: Include version.h.
4415 (version, host_name): Don't declare.
4416
760256f9
PA
44172013-06-12 Pedro Alves <palves@redhat.com>
4418
4419 * linux-x86-low.c (linux_is_elf64): Delete global.
4420 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4421 with local linux_pid_exe_is_elf_64_file use.
4422
030031ee
PA
44232013-06-11 Pedro Alves <palves@redhat.com>
4424
4425 * linux-low.c (regset_disabled, disable_regset): New functions.
4426 (regsets_fetch_inferior_registers)
4427 (regsets_store_inferior_registers): Use them.
4428 (initialize_regsets_info); Don't allocate the disabled_regsets
4429 array here.
4430 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4431 comment.
4432
5da6eb0a
PA
44332013-06-11 Pedro Alves <palves@redhat.com>
4434
4435 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4436 xmalloc.
4437
7e5aaa09
PA
44382013-06-11 Pedro Alves <palves@redhat.com>
4439
4440 * linux-x86-low.c (initialize_low_arch): Call
4441 init_registers_x32_avx_linux.
4442
d878444c
JK
44432013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4444
4445 Fix compatibility with Android Bionic.
4446 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4447 it is not empty.
4448
3aee8918
PA
44492013-06-07 Pedro Alves <palves@redhat.com>
4450
5f2b57b5 4451 PR server/14823
3aee8918
PA
4452 * Makefile.in (OBS): Add tdesc.o.
4453 (IPA_OBJS): Add tdesc-ipa.o.
4454 (tdesc-ipa.o): New rule.
4455 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4456 interface.
4457 * linux-low.c (new_inferior): Delete.
4458 (disabled_regsets, num_regsets): Delete.
4459 (linux_add_process): Adjust to set the new per-process
4460 new_inferior flag.
4461 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4462 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4463 was a stop. When calling arch_setup, switch the current inferior
4464 to the thread that got an event.
4465 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4466 (regsets_fetch_inferior_registers)
4467 (regsets_store_inferior_registers): New regsets_info parameter.
4468 Adjust to use it.
4469 (linux_register_in_regsets): New regs_info parameter. Adjust to
4470 use it.
4471 (register_addr, fetch_register, store_register): New usrregs_info
4472 parameter. Adjust to use it.
4473 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4474 parameter regs_info. Adjust to use it.
4475 (linux_fetch_registers): Get the current inferior's regs_info, and
4476 adjust to use it.
4477 (linux_store_registers): Ditto.
4478 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4479 (initialize_low): Don't initialize the target_regsets here. Call
4480 initialize_low_arch.
4481 * linux-low.h (target_regsets): Delete declaration.
4482 (struct regsets_info): New.
4483 (struct usrregs_info): New.
4484 (struct regs_info): New.
4485 (struct process_info_private) <new_inferior>: New field.
4486 (struct linux_target_ops): Delete the num_regs, regmap, and
4487 regset_bitmap fields. New field regs_info.
4488 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4489 * i387-fp.c (num_xmm_registers): Delete.
4490 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4491 calls to new interface.
4492 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4493 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4494 Infer the number of xmm registers from the regcache's target
4495 description.
4496 * i387-fp.h (num_xmm_registers): Delete.
4497 * inferiors.c (add_thread): Don't install the thread's regcache
4498 here.
4499 * proc-service.c (gregset_info): Fetch the current inferior's
4500 regs_info. Adjust to use it.
4501 * regcache.c: Include tdesc.h.
4502 (register_bytes, reg_defs, num_registers)
4503 (gdbserver_expedite_regs): Delete.
4504 (get_thread_regcache): If the thread doesn't have a regcache yet,
4505 create one, instead of aborting gdbserver.
4506 (regcache_invalidate_one): Rename to ...
4507 (regcache_invalidate_thread): ... this.
4508 (regcache_invalidate_one): New.
4509 (regcache_invalidate): Only invalidate registers of the current
4510 process.
4511 (init_register_cache): Add target_desc parameter, and use it.
4512 (new_register_cache): Ditto. Assert the target description has a
4513 non zero registers_size.
4514 (regcache_cpy): Add assertions. Adjust.
4515 (realloc_register_cache, set_register_cache): Delete.
4516 (registers_to_string, registers_from_string): Adjust.
4517 (find_register_by_name, find_regno, find_register_by_number)
4518 (register_cache_size): Add target_desc parameter, and use it.
4519 (free_register_cache_thread, free_register_cache_thread_one)
4520 (regcache_release, register_cache_size): New.
4521 (register_size): Add target_desc parameter, and use it.
4522 (register_data, supply_register, supply_register_zeroed)
4523 (supply_regblock, supply_register_by_name, collect_register)
4524 (collect_register_as_string, collect_register_by_name): Adjust.
4525 * regcache.h (struct target_desc): Forward declare.
4526 (struct regcache) <tdesc>: New field.
4527 (init_register_cache, new_register_cache): Add target_desc
4528 parameter.
4529 (regcache_invalidate_thread): Declare.
4530 (regcache_invalidate_one): Delete declaration.
4531 (regcache_release): Declare.
4532 (find_register_by_number, register_cache_size, register_size)
4533 (find_regno): Add target_desc parameter.
4534 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4535 declarations.
4536 * remote-utils.c: Include tdesc.h.
4537 (outreg, prepare_resume_reply): Adjust.
4538 * server.c: Include tdesc.h.
4539 (gdbserver_xmltarget): Delete declaration.
4540 (get_features_xml, process_serial_event): Adjust.
4541 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4542 declare.
4543 (struct process_info) <tdesc>: New field.
4544 (ipa_tdesc): Declare.
4545 * tdesc.c: New file.
4546 * tdesc.h: New file.
4547 * tracepoint.c: Include tdesc.h.
4548 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4549 (get_context_regcache): Adjust to pass ipa_tdesc down.
4550 (do_action_at_tracepoint): Adjust to get the register cache size
4551 from the context regcache's description.
4552 (traceframe_walk_blocks): Adjust to get the register cache size
4553 from the current trace frame's description.
4554 (traceframe_get_pc): Adjust to get current trace frame's
4555 description and pass it down.
4556 (gdb_collect): Adjust to get the register cache size from the
4557 IPA's description.
4558 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4559 (gdbserver_xmltarget): Delete.
4560 (initialize_low_tracepoint): Set the ipa's target description.
4561 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4562 (initialize_low_tracepoint): Set the ipa's target description.
4563 * linux-x86-low.c: Include tdesc.h.
4564 [__x86_64__] (is_64bit_tdesc): New.
4565 (ps_get_thread_area, x86_get_thread_area): Use it.
4566 (i386_cannot_store_register): Rename to ...
4567 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4568 (i386_cannot_fetch_register): Rename to ...
4569 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4570 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4571 to new interface.
4572 (target_regsets): Rename to ...
4573 (x86_regsets): ... this.
4574 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4575 interface.
4576 (x86_siginfo_fixup): Use is_64bit_tdesc.
4577 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4578 (tdesc_x32_avx_linux, tdesc_x32_linux)
4579 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4580 Declare.
4581 (x86_linux_update_xmltarget): Delete.
4582 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4583 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4584 (AMD64_LINUX_USER64_CS): New.
4585 (x86_linux_read_description): New, based on
4586 x86_linux_update_xmltarget.
4587 (same_process_callback): New.
4588 (x86_arch_setup_process_callback): New.
4589 (x86_linux_update_xmltarget): New.
4590 (x86_regsets_info): New.
4591 (amd64_linux_regs_info): New.
4592 (i386_linux_usrregs_info): New.
4593 (i386_linux_regs_info): New.
4594 (x86_linux_regs_info): New.
4595 (x86_arch_setup): Reimplement.
4596 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4597 (x86_emit_ops): Ditto.
4598 (the_low_target): Adjust. Install x86_linux_regs_info,
4599 x86_cannot_fetch_register, and x86_cannot_store_register.
4600 (initialize_low_arch): New.
4601 * linux-ia64-low.c (tdesc_ia64): Declare.
4602 (ia64_fetch_register): Adjust.
4603 (ia64_usrregs_info, regs_info): New globals.
4604 (ia64_regs_info): New function.
4605 (the_low_target): Adjust.
4606 (initialize_low_arch): New function.
4607 * linux-sparc-low.c (tdesc_sparc64): Declare.
4608 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4609 Adjust.
4610 (sparc_arch_setup): New function.
4611 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4612 (the_low_target): Adjust.
4613 (initialize_low_arch): New function.
4614 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4615 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4616 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4617 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4618 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4619 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4620 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4621 (tdesc_powerpc_isa205_vsx64l): Declare.
4622 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4623 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4624 (ppc_set_pc, ppc_get_hwcap): Adjust.
4625 (ppc_usrregs_info): Forward declare.
4626 (!__powerpc64__) ppc_regmap_adjusted: New global.
4627 (ppc_arch_setup): Adjust to the current process'es target
4628 description.
4629 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4630 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4631 (ppc_store_evrregset): Adjust.
4632 (target_regsets): Rename to ...
4633 (ppc_regsets): ... this, and make static.
4634 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4635 (ppc_regs_info): New function.
4636 (the_low_target): Adjust.
4637 (initialize_low_arch): New function.
4638 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4639 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4640 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4641 (tdesc_s390x_linux64v2): Declare.
4642 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4643 (s390_fill_gregset, s390_store_last_break): Adjust.
4644 (target_regsets): Rename to ...
4645 (s390_regsets): ... this, and make static.
4646 (s390_get_pc, s390_set_pc): Adjust.
4647 (s390_get_hwcap): New target_desc parameter, and use it.
4648 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4649 (s390_arch_setup): Adjust to set the current process'es target
4650 description. Don't adjust the regmap.
4651 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4652 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4653 (regs_info_3264): New globals.
4654 (s390_regs_info): New function.
4655 (the_low_target): Adjust.
4656 (initialize_low_arch): New function.
4657 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4658 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4659 [__mips64] (init_registers_mips_linux)
4660 (init_registers_mips_dsp_linux): Delete defines.
4661 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4662 (have_dsp): New global.
4663 (mips_read_description): New, based on mips_arch_setup.
4664 (mips_arch_setup): Reimplement.
4665 (get_usrregs_info): New function.
4666 (mips_cannot_fetch_register, mips_cannot_store_register)
4667 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4668 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4669 (target_regsets): Rename to ...
4670 (mips_regsets): ... this, and make static.
4671 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4672 (dsp_regs_info, regs_info): New globals.
4673 (mips_regs_info): New function.
4674 (the_low_target): Adjust.
4675 (initialize_low_arch): New function.
4676 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4677 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4678 Declare.
4679 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4680 (arm_read_description): New, with bits factored from
4681 arm_arch_setup.
4682 (arm_arch_setup): Reimplement.
4683 (target_regsets): Rename to ...
4684 (arm_regsets): ... this, and make static.
4685 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4686 (arm_regs_info): New function.
4687 (the_low_target): Adjust.
4688 (initialize_low_arch): New function.
4689 * linux-m68k-low.c (tdesc_m68k): Declare.
4690 (target_regsets): Rename to ...
4691 (m68k_regsets): ... this, and make static.
4692 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4693 (m68k_regs_info): New function.
4694 (m68k_arch_setup): New function.
4695 (the_low_target): Adjust.
4696 (initialize_low_arch): New function.
4697 * linux-sh-low.c (tdesc_sharch): Declare.
4698 (target_regsets): Rename to ...
4699 (sh_regsets): ... this, and make static.
4700 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4701 (sh_regs_info, sh_arch_setup): New functions.
4702 (the_low_target): Adjust.
4703 (initialize_low_arch): New function.
4704 * linux-bfin-low.c (tdesc_bfin): Declare.
4705 (bfin_arch_setup): New function.
4706 (bfin_usrregs_info, regs_info): New globals.
4707 (bfin_regs_info): New function.
4708 (the_low_target): Adjust.
4709 (initialize_low_arch): New function.
4710 * linux-cris-low.c (tdesc_cris): Declare.
4711 (cris_arch_setup): New function.
4712 (cris_usrregs_info, regs_info): New globals.
4713 (cris_regs_info): New function.
4714 (the_low_target): Adjust.
4715 (initialize_low_arch): New function.
4716 * linux-cris-low.c (tdesc_crisv32): Declare.
4717 (cris_arch_setup): New function.
4718 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4719 (cris_regs_info): New function.
4720 (the_low_target): Adjust.
4721 (initialize_low_arch): New function.
4722 * linux-m32r-low.c (tdesc_m32r): Declare.
4723 (m32r_arch_setup): New function.
4724 (m32r_usrregs_info, regs_info): New globals.
4725 (m32r_regs_info): Adjust.
4726 (initialize_low_arch): New function.
4727 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4728 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4729 (tic6x_usrregs_info): Forward declare.
4730 (tic6x_read_description): New function, based on ...
4731 (tic6x_arch_setup): ... this. Reimplement.
4732 (target_regsets): Rename to ...
4733 (tic6x_regsets): ... this, and make static.
4734 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4735 (tic6x_regs_info): New function.
4736 (the_low_target): Adjust.
4737 (initialize_low_arch): New function.
4738 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4739 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4740 (target_regsets): Rename to ...
4741 (xtensa_regsets): ... this, and make static.
4742 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4743 globals.
4744 (xtensa_arch_setup, xtensa_regs_info): New functions.
4745 (the_low_target): Adjust.
4746 (initialize_low_arch): New function.
4747 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4748 (nios2_arch_setup): Set the current process'es tdesc.
4749 (target_regsets): Rename to ...
4750 (nios2_regsets): ... this.
4751 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4752 (nios2_regs_info): New function.
4753 (the_low_target): Adjust.
4754 (initialize_low_arch): New function.
a261b8f5
PA
4755 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4756 (aarch64_arch_setup): Set the current process'es tdesc.
4757 (target_regsets): Rename to ...
4758 (aarch64_regsets): ... this.
4759 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4760 (aarch64_regs_info): New function.
4761 (the_low_target): Adjust.
4762 (initialize_low_arch): New function.
3aee8918
PA
4763 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4764 globals.
4765 (target_regsets): Rename to ...
4766 (tile_regsets): ... this.
4767 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4768 (tile_regs_info): New function.
4769 (tile_arch_setup): Set the current process'es tdesc.
4770 (the_low_target): Adjust.
4771 (initialize_low_arch): New function.
4772 * spu-low.c (tdesc_spu): Declare.
4773 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4774 * win32-arm-low.c (tdesc_arm): Declare.
4775 (arm_arch_setup): New function.
4776 (the_low_target): Install arm_arch_setup instead of
4777 init_registers_arm.
4778 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4779 (init_windows_x86): Rename to ...
4780 (i386_arch_setup): ... this. Set `win32_tdesc'.
4781 (the_low_target): Adjust.
4782 * win32-low.c (win32_tdesc): New global.
4783 (child_add_thread): Don't create the thread cache here.
4784 (do_initial_child_stuff): Set the new process'es tdesc.
4785 * win32-low.h (struct target_desc): Forward declare.
4786 (win32_tdesc): Declare.
4787 * lynx-i386-low.c (tdesc_i386): Declare global.
4788 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4789 * lynx-low.c (lynx_tdesc): New global.
4790 (lynx_add_process): Set the new process'es tdesc.
4791 * lynx-low.h (struct target_desc): Forward declare.
4792 (lynx_tdesc): Declare global.
4793 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4794 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4795 * nto-low.c (nto_tdesc): New global.
4796 (do_attach): Set the new process'es tdesc.
4797 * nto-low.h (struct target_desc): Forward declare.
4798 (nto_tdesc): Declare.
4799 * nto-x86-low.c (tdesc_i386): Declare.
4800 (nto_x86_arch_setup): Set `nto_tdesc'.
4801
b1fbec62
GB
48022013-06-04 Gary Benson <gbenson@redhat.com>
4803
4804 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4805 to qSupported response when appropriate.
4806 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4807 with nonzero-length annex.
4808 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4809 arguments supplied in annex.
4810
d1ec4ce7
DE
48112013-05-31 Doug Evans <dje@google.com>
4812
ac44adcb 4813 PR server/15594
d1ec4ce7
DE
4814 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4815 64 bits in 64-cross-32 environment.
4816
9b25f2d3
PA
48172013-05-28 Pedro Alves <palves@redhat.com>
4818
4819 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4820 (aarch64-without-fpu.c): Delete rule.
4821 * configure.srv (aarch64*-*-linux*): Remove references to
4822 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4823 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4824 declaration.
4825
6740dc9c
PA
48262013-05-24 Pedro Alves <palves@redhat.com>
4827
4828 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4829 instead of strchr/decode_address. Error if the range isn't split
4830 with a ','. Don't assume there's be a ':' in the action.
4831
c2d6af84
PA
48322013-05-23 Yao Qi <yao@codesourcery.com>
4833 Pedro Alves <palves@redhat.com>
4834
4835 * linux-low.c (lwp_in_step_range): New function.
4836 (linux_wait_1): If the thread was range stepping and stopped
4837 outside the stepping range, report the stop to GDB. Otherwise,
4838 continue stepping. Add range stepping debug output.
4839 (linux_set_resume_request): Copy the step range from the resume
4840 request to the lwp.
4841 (linux_supports_range_stepping): New.
4842 (linux_target_ops) <supports_range_stepping>: Set to
4843 linux_supports_range_stepping.
4844 * linux-low.h (struct linux_target_ops)
4845 <supports_range_stepping>: New field.
4846 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4847 * linux-x86-low.c (x86_supports_range_stepping): New.
4848 (the_low_target) <supports_range_stepping>: Set to
4849 x86_supports_range_stepping.
4850 * server.c (handle_v_cont): Handle 'r' action.
4851 (handle_v_requests): Append ";r" if the target supports range
4852 stepping.
4853 * target.h (struct thread_resume) <step_range_start,
4854 step_range_end>: New fields.
4855 (struct target_ops) <supports_range_stepping>:
4856 New field.
4857 (target_supports_range_stepping): New macro.
4858
58794e1a
JB
48592013-05-17 Joel Brobecker <brobecker@adacore.com>
4860
4861 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4862 confusion in comment.
4863
d631c5a7
JB
48642013-05-17 Joel Brobecker <brobecker@adacore.com>
4865
4866 * lynx-low.c (struct process_info_private): New type.
4867 (lynx_add_process): New function.
4868 (lynx_create_inferior, lynx_attach): Replace calls to
4869 add_process by calls to lynx_add_process.
4870 (lynx_resume): If PTID is null, then try using
4871 current_process()->private->last_wait_event_ptid.
4872 Add comments.
4873 (lynx_clear_inferiors): Delete. The contents of that function
4874 has been inlined in lynx_mourn;
4875 (lynx_wait_1): Save the ptid in the process's private data.
4876 (lynx_mourn): Free the process' private data. Replace call
4877 to lynx_clear_inferiors by call to clear_inferiors.
4878
96f7a20f
YQ
48792013-05-17 Yao Qi <yao@codesourcery.com>
4880
4881 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4882 the right place.
4883
db0dfaa0
LM
48842013-05-16 Luis Machado <lgustavo@codesourcery.com>
4885
4886 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4887 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4888 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4889 PT_TEXT_END_ADDR guards. Update comments.
4890 (linux_target_op) <read_offsets>: Conditionally define to
4891 linux_read_offsets if the target is UCLIBC and if it defines
4892 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4893
68f5f838
SL
48942013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4895 Andrew Jenner <andrew@codesourcery.com>
4896
4897 * Makefile.in (SFILES): Add linux-nios2-low.c.
4898 (clean): Add action to delete nios2-linux.c.
4899 (nios2-linux.c): New rule.
4900 * configure.srv: Add nios2*-*-linux*.
4901 * linux-nios2-low.c: New.
4902
1ebff1fd
HAQ
49032013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4904
4905 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4906
f6150862
HZ
49072013-04-25 Hui Zhu <hui@codesourcery.com>
4908
4909 PR gdb/15186
f6150862
HZ
4910 * ax.c (ax_printf): Add fflush.
4911
614c279d
TT
49122013-04-22 Tom Tromey <tromey@redhat.com>
4913
4914 * Makefile.in (SFILES): Add filestuff.c.
4915 (OBS): Add filestuff.o.
4916 (filestuff.o): New target.
4917 * config.in, configure: Rebuild.
4918 * configure.ac: Check for fdwalk, pipe2.
4919
7d4e5717
PA
49202013-04-17 Pedro Alves <palves@redhat.com>
4921
4922 * configure.ac (USE_THREAD_DB): Delete variable.
4923 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4924 Don't AC_SUBST USE_THREAD_DB.
4925 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4926 * config.in, configure: Regenerate.
4927
d5c93e41
PA
49282013-04-16 Pedro Alves <palves@redhat.com>
4929
4930 * linux-low.h (struct lwp_info) <thread_known>: Move under
4931 the USE_THREAD_DB #ifdef.
4932
04f5fe89
PA
49332013-04-16 Pedro Alves <palves@redhat.com>
4934
4935 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4936 (linux-low.o): Delete rule.
4937 * linux-low.h: Always include "gdb_thread_db.h" instead of
4938 conditionally including thread_db.h.
4939 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4940 HAVE_THREAD_DB_H.
4941
480b27bf
JK
49422013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4943
4944 * Makefile.in (install-only): Fix make install regression.
4945
43662968
JK
49462013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4947
4948 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4949 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4950 installation.
4951 * gdbserver.1: Remove.
4952
3e74e146
PA
49532013-03-22 Pedro Alves <palves@redhat.com>
4954
4955 * linux-low.c (handle_extended_wait): Don't call
4956 linux_enable_event_reporting.
4957
a8347a2a
TT
49582013-03-15 Tony Theodore <tonyt@logyst.com>
4959
4960 PR build/9098:
4961 * Makefile.in (SHELL): Use @SHELL@.
4962
eeb56fa7
SDJ
49632013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4964
4965 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4966 compiler warning.
4967
4fa7e2ff
JB
49682013-03-13 Joel Brobecker <brobecker@adacore.com>
4969
4970 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4971 Remove extraneous NULL element.
4972
8ddb1965
YQ
49732013-03-13 Yao Qi <yao@codesourcery.com>
4974
4975 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4976 'V' block in trace frame.
4977
9accd112
MM
49782013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4979
4980 * target.h (struct target_ops): Add btrace ops.
4981 (target_supports_btrace): New macro.
4982 (target_enable_btrace): New macro.
4983 (target_disable_btrace): New macro.
4984 (target_read_btrace): New macro.
4985 * gdbthread.h (struct thread_info): Add btrace field.
4986 * server.c: Include btrace-common.h.
4987 (handle_btrace_general_set): New function.
4988 (handle_btrace_enable): New function.
4989 (handle_btrace_disable): New function.
4990 (handle_general_set): Call handle_btrace_general_set.
4991 (handle_qxfer_btrace): New function.
4992 (struct qxfer qxfer_packets[]): Add btrace entry.
4993 * inferiors.c (remove_thread): Disable btrace.
4994 * linux-low: Include linux-btrace.h.
4995 (linux_low_enable_btrace): New function.
4996 (linux_low_read_btrace): New function.
4997 (linux_target_ops): Add btrace ops.
4998 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4999 Add srv_linux_btrace=yes.
5000 (x86_64-*-linux*): Add linux-btrace.o.
5001 Add srv_linux_btrace=yes.
5002 * configure.ac: Define HAVE_LINUX_BTRACE.
5003 * config.in: Regenerated.
5004 * configure: Regenerated.
5005
5cc22e4c
MM
50062013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5007
5008 * server.c (handle_qxfer): Preserve error message if -3 is
5009 returned.
5010 (qxfer): Document the -3 return value.
5011
7c97f91e
MM
50122013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5013
5014 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5015 (linux_btrace_h): New variable.
5016 (linux-btrace.o): New rule.
5017
be9a119c 50182013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
5019 Hafiz Abid Qadeer <abidh@codesourcery.com>
5020
5021 * tracepoint.c (trace_buffer_size): New global.
5022 (DEFAULT_TRACE_BUFFER_SIZE): New define.
5023 (init_trace_buffer): Change to one-argument function. Allocate
5024 trace buffer memory.
5025 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5026 handle QTBuffer:size packet.
5027 (cmd_bigqtbuffer_size): New function.
5028 (initialize_tracepoint): Call init_trace_buffer with
5029 DEFAULT_TRACE_BUFFER_SIZE.
5030 * server.c (handle_query): Add QTBuffer:size in the
5031 supported packets.
5032
e64f7499
YQ
50332013-03-07 Yao Qi <yao@codesourcery.com>
5034
5035 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5036 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5037 of -1.
5038 (cmd_qtsp): Adjust condition. Do post increment.
5039 Set cur_action and cur_step_action back to 0.
5040
f0ae6fc3
PA
50412013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
5042
5043 PR server/15236
5044 * linux-low.c (linux_write_memory): Return early success if LEN is
5045 zero.
5046
b5b0b0af
CV
50472013-03-05 Corinna Vinschen <vinschen@redhat.de>
5048
334ad4a8 5049 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 5050
589bc927
TT
50512013-02-28 Tom Tromey <tromey@redhat.com>
5052
5053 * configure.ac: Invoke AC_SYS_LARGEFILE.
5054 * configure, config.in: Rebuild.
5055
dfe07582
CV
50562013-02-28 Corinna Vinschen <vinschen@redhat.com>
5057
5058 * win32-low.c: Throughout, fix format strings and casts of
5059 printf-like functions to avoid type related warnings on all
5060 platforms.
5061 (get_child_debug_event): Print dwDebugEventCode as hex since
5062 that's how it's usually documented.
5063
736cd585
YQ
50642013-02-28 Yao Qi <yao@codesourcery.com>
5065
5066 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5067 pulongest.
5068
e1f58301
JW
50692013-02-27 Jiong Wang <jiwang@tilera.com>
5070
5071 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5072 (reg-tilegx32.c): New rule.
5073 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5074 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5075 different register info initializer according to elf class.
5076 (init_registers_tilgx32): New function. The tilegx32 register info
5077 initializer.
5078 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5079 (tile_store_gregset): Likewise.
5080
d171ca78
YQ
50812013-02-27 Yao Qi <yao@codesourcery.com>
5082
5083 * server.c (process_point_options): Print debug message when
5084 debug_threads is true.
5085
282bbdf3
YQ
50862013-02-26 Yao Qi <yao@codesourcery.com>
5087
5088 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5089
aca22551
PA
50902013-02-19 Pedro Alves <palves@redhat.com>
5091 Kai Tietz <ktietz@redhat.com>
5092
5093 PR gdb/15161
5094
5095 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5096 instead of strtoul to extract address from packet.
5097 (process_serial_event) <'z'>: Likewise.
5098
4f3cee1c
YQ
50992013-02-18 Yao Qi <yao@codesourcery.com>
5100
5101 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5102
8e1d55a3
PA
51032013-02-14 Pedro Alves <palves@redhat.com>
5104
5105 Plug memory leak.
5106
5107 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5108 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5109
458820da
PA
51102013-02-14 Pedro Alves <palves@redhat.com>
5111
5112 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5113
baea0dae
PA
51142013-02-14 Pedro Alves <palves@redhat.com>
5115
5116 * tracepoint.c (save_string): Delete.
5117 (add_tracepoint_action): Use savestring instead of save_string.
5118
0b1afbb3
PA
51192013-02-12 Pedro Alves <palves@redhat.com>
5120
5121 * linux-xtensa-low.c: Ditto.
5122 * xtensa-xtregs.c: Ditto.
5123
8a4ac37e
PA
51242013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5125
5126 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5127 thread_db.
5128
148de6bb
MS
51292013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5130
5131 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5132 aarch64_num_wp_regs and aarch64_num_bp_regs to
5133 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5134
55fac6e0
MS
51352013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5136
5137 * linux-aarch64-low.c (ps_get_thread_area): Replace
5138 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5139
176eb98c
MS
51402013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5141 Marcus Shawcroft <marcus.shawcroft@arm.com>
5142 Nigel Stephens <nigel.stephens@arm.com>
5143 Yufeng Zhang <yufeng.zhang@arm.com>
5144
5145 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5146 (aarch64.c, aarch64-without-fpu.c): New targets.
5147 * configure.srv (aarch64*-*-linux*): New.
5148 * linux-aarch64-low.c: New file.
5149
56f7af9c
MS
51502013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5151
43aaf8b6 5152 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
5153 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5154 (dequeue_one_deferred_signal, linux_resume_one_thread)
5155 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5156 (linux_tracefork_grandchild, linux_test_for_tracefork)
5157 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5158 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5159 where the argument is 0.
5160
60f662b0
YQ
51612013-01-25 Yao Qi <yao@codesourcery.com>
5162
5163 * event-loop.c: Include "queue.h".
5164 (gdb_event_p): New typedef.
5165 (struct gdb_event) <next_event>: Remove.
5166 (event_queue): Change to QUEUE(gdb_event_p).
5167 (async_queue_event): Remove.
5168 (gdb_event_xfree): New.
5169 (initialize_event_loop): New.
5170 (process_event): Use API from QUEUE.
5171 (wait_for_event): Likewise.
5172 * server.c (main): Call initialize_event_loop.
5173 * server.h (initialize_event_loop): Declare.
5174
5ae4861a
YQ
51752013-01-18 Yao Qi <yao@codesourcery.com>
5176
5177 * ax.h (struct eval_agent_expr_context): New.
5178 (gdb_eval_agent_expr): Update declaration.
5179 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5180 TFRAME. Add new argument CTX.
5181 * server.h (struct eval_agent_expr_context): Declare.
5182 (agent_mem_read, agent_tsv_read): Update declaration.
5183 (agent_mem_read_string): Likewise.
5184 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5185 (add_traceframe_block): Add new argument TPOINT.
5186 Increase TPOINT->traceframe_usage.
5187 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5188 eval_tracepoint_agent_expr.
5189 (condition_true_at_tracepoint): Likewise.
5190 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5191 (agent_mem_read_string, agent_tsv_read): Likewise.
5192
85e00e85
YQ
51932013-01-16 Yao Qi <yao@codesourcery.com>
5194
5195 * linux-low.c (linux_resume_one_lwp): Don't check
5196 'lwp->bp_reinsert != 0'.
5197
4039cf45
JB
51982013-01-07 Joel Brobecker <brobecker@adacore.com>
5199 Pedro Alves <palves@redhat.com>
5200
5201 * lynx-low.c (ptrace_request_to_str): Define a temporary
5202 macro and use it to simplify this function's implementation.
5203
9044dee2
JB
52042013-01-07 Joel Brobecker <brobecker@adacore.com>
5205
5206 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5207 sets errno.
5208
e6352c8f
JB
52092013-01-07 Joel Brobecker <brobecker@adacore.com>
5210
5211 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5212
50681a27
JB
52132013-01-07 Joel Brobecker <brobecker@adacore.com>
5214
5215 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5216
3f6e77ef
JB
52172013-01-07 Joel Brobecker <brobecker@adacore.com>
5218
5219 * lynx-low.c (lynx_resume): Use the resume_info parameter
5220 to determine the ptid for the lynx_ptrace call, unless
5221 it is equal to minus_one_ptid, in which case we use the
5222 ptid of the current_inferior.
5223 (lynx_wait_1): After having received a thread create/exit
5224 event, resume the inferior's execution using the signaling
5225 thread's ptid, rather than the old ptid.
5226
7fda33ae
JB
52272013-01-07 Joel Brobecker <brobecker@adacore.com>
5228
5229 * lynx-low.c (lynx_resume): Delete variable ret.
5230
b9786c74
JB
52312013-01-01 Joel Brobecker <brobecker@adacore.com>
5232
5233 * gdbreplay.c (gdbreplay_version): Update copyright year.
5234 * server.c (gdbserver_version): Likewise.
5235
8b93d60f
JB
52362012-12-17 Joel Brobecker <brobecker@adacore.com>
5237
5238 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5239 new thread.
5240
037335a7
JB
52412012-12-17 Joel Brobecker <brobecker@adacore.com>
5242
5243 * lynx-low.c (ptrace_request_to_str): Add handling for
5244 PTRACE_GETTRACESIG.
5245
52d4cbd8
JB
52462012-12-17 Joel Brobecker <brobecker@adacore.com>
5247
5248 * lynx-low.c (lynx_attach): Delete variable new_process.
5249
ab8f6ca9
JB
52502012-12-17 Joel Brobecker <brobecker@adacore.com>
5251
5252 * lynx-low.c (lynx_create_inferior): Delete variable
5253 new_process.
5254
78cbc024
JB
52552012-12-17 Joel Brobecker <brobecker@adacore.com>
5256
5257 * lynx-low.c (ptrace_request_to_str): Do not handle
5258 PTRACE_GETTHREADLIST if this macro does not exist.
5259
14a00470
YQ
52602012-12-15 Yao Qi <yao@codesourcery.com>
5261
5262 * Makefile.in (OBS): Add notif.o.
5263 * notif.c, notif.h: New.
5264 * server.c: Include "notif.h".
5265 (struct vstop_notif) <next>: Remove.
5266 <base>: New field.
5267 (queue_stop_reply): Update.
5268 (push_event, send_next_stop_reply): Remove.
5269 (discard_queued_stop_replies): Update.
5270 (notif_stop): New variable.
5271 (handle_v_stopped): Remove.
5272 (handle_v_requests): Don't call handle_v_stopped. Call
5273 handle_ack_notif instead.
5274 (queue_stop_reply_callback): Call notif_event_enque instead
5275 of queue_stop_reply.
5276 (handle_status): Don't call send_next_stop_reply, call
5277 notif_write_event instead.
5278 (kill_inferior_callback): Likewise.
5279 (detach_or_kill_inferior_callback): Likewise.
5280 (main): Call initialize_notif.
5281 (process_serial_event): Call QUEUE_is_empty.
5282 (handle_target_event): Call notif_push instead of push event.
5283 * server.h (push_event): Remove declaration.
5284
61c125b9
TT
52852012-12-10 Tom Tromey <tromey@redhat.com>
5286
5287 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5288 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5289 macros.
5290 (.c.o): Rewrite.
5291 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5292 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5293 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5294 (amd64-linux-ipa.o, ax.o): Rewrite.
5295 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5296 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5297 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5298 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5299 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5300 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5301 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5302 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5303 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5304 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5305 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5306 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5307 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5308 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5309 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5310 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5311 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5312 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5313 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5314 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5315 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5316 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5317 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5318 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5319 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5320 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5321 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5322 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5323 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5324 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5325 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5326 (reg-tilegx.o): Remove.
5327 (all_object_files): New macro.
5328 Include .deps files.
5329 * aclocal.m4, configure: Rebuild.
5330 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5331 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5332 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5333
e90e9ad9
TT
53342012-12-05 Tom Tromey <tromey@redhat.com>
5335
5336 PR gdb/14917:
5337 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5338
02d403bf 53392012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
5340
5341 * configure.ac: Check for linux/perf_event.h.
5342 * config.in: Regenerated.
5343 * configure: Regenerated.
5344
0270a750
PA
53452012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5346
5347 * hostio.c (handle_readlink): Decrease buffer size
5348 parameter passed to readlink by one byte.
5349
8c29b58e
YQ
53502012-11-26 Yao Qi <yao@codesourcery.com>
5351
5352 * configure.ac (build_warnings): Append '-Wempty-body'.
5353 * configure: Regenerated.
5354 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5355 body.
5356
8bdce1ff
PM
53572012-11-15 Pierre Muller <muller@sourceware.org>
5358
5359 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5360 * config.in: Regenerate.
5361 * configure: Regenerate.
5362 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5363 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5364 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5365 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5366 header.
5367 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5368 instead of <sys/wait.h> header.
5369 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5370
02d403bf 53712012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
5372
5373 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5374 (various make rules): Remove -DGDBSERVER
5375
fbd5db48
YQ
53762012-11-09 Yao Qi <yao@codesourcery.com>
5377
5378 * spu-low.c (current_ptid): Move it to ..
5379 * gdbthread.h: ... here. New.
5380 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5381 * server.c (myresume, process_serial_event): Likewise.
5382 * thread-db.c (thread_db_find_new_threads): Likewise.
5383 * tracepoint.c (run_inferior_command): Likewise.
5384
b3dc46ff
AB
53852012-10-01 Andrew Burgess <aburgess@broadcom.com>
5386
5387 * server.c (handle_search_memory_1): Include access length in
5388 warning message.
5389
07c04788
HPN
53902012-09-05 Michael Brandt <michael.brandt@axis.com>
5391
5392 * linux-crisv32-low.c: Fix compile errors.
5393
918d227b
YQ
53942012-09-04 Yao Qi <yao@codesourcery.com>
5395
5396 * tracepoint.c (cmd_qtsv): Adjust debug message.
5397 Don't check CUR_TPOINT.
5398
18c1b81a
YQ
53992012-08-28 Yao Qi <yao@codesourcery.com>
5400
5401 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5402 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5403 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5404 Remove declarations of xmalloc, xreallloc, xstrdup and
5405 freeargv.
5406 * Makefile.in (libiberty_h): New.
5407 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5408 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5409
dc82f37b
YQ
54102012-08-23 Yao Qi <yao@codesourcery.com>
5411
5412 * server.h: Remove declaration of 'xsnprintf'.
5413
406b1477
KS
54142012-08-22 Keith Seitz <keiths@redhat.com>
5415
5416 * server.h: Include build-gnulib-gbserver/config.h.
5417 * gdbreplay.c: Likewise.
5418
e6712ff1
DE
54192012-08-08 Doug Evans <dje@google.com>
5420
5421 * Makefile.in (SFILES): Add gdb_vecs.c.
5422 (OBS): Add gdb_vecs.o.
5423 (gdb_vecs_h, host_defs_h): New variables.
5424 (thread-db.o): Add $(gdb_vecs_h) dependency.
5425 (gdb_vecs.o): New rule.
5426 * thread-db.c: #include "gdb_vecs.h".
5427 (thread_db_load_search): Use a vector to iterate over path elements.
5428 Handle text appearing after "$pdir".
5429
5430 * configure.ac: Add check for strstr.
5431 * config.in: Regenerate.
5432 * configure: Regenerate.
5433
7c3270ae
UW
54342012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5435
5436 * hostio.c (handle_pread): If pread fails, fall back to attempting
5437 lseek/read.
5438 (handle_pwrite): Likewise for pwrite.
5439
b62e2b27
UW
54402012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5441
5442 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5443 between unsupported TYPE and unimplementable ADDR/LEN combination.
5444 (arm_insert_point): Act on new return value.
5445
78a99e91
PA
54462012-07-31 Pedro Alves <palves@redhat.com>
5447
5448 * server.c (process_point_options): Only skip tokens if we find
5449 one that is unrecognized. Don't treat 'X' specially while
5450 skipping unrecognized tokens.
5451
fcf303ab
UW
54522012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5453
5454 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5455 to 4-byte-align HW breakpoint addresses for Thumb.
5456
7255706c
YQ
54572012-07-27 Yao Qi <yao@codesourcery.com>
5458
5459 PR remote/14161.
5460
5461 * server.h: Declare gdb_agent_about_to_close.
5462 * target.c (kill_inferior): Include "agent.h".
5463 New. Send command 'kill'.
5464 * target.h (kill_inferior): Removed macro.
5465 * tracepoint.c (gdb_agent_about_to_close): New.
5466 (gdb_agent_helper_thread): Handle command 'close'.
5467 Wait endlessly until the inferior stops.
5468 Install gdb_agent_remove_socket to atexit hook.
5469 (agent_socket_name): New static variable.
5470 (gdb_agent_socket_init): Replace local variable 'name' with
5471 'agent_socket_name'.
5472 (gdb_agent_remove_socket): New.
5473
5a3f286f
YQ
54742012-07-27 Yao Qi <yao@codesourcery.com>
5475
5476 * server.c (process_point_options): Stop at 'X' when parsing.
5477
961bd387
ME
54782012-07-19 Michael Eager <eager@eagercon.com>
5479
a261b8f5 5480 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
5481 to hw_execute.
5482 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5483 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5484 hardware breakpoint.
5485
aa7c7447
JK
54862012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5487
5488 * gdbserver/linux-low.c (initialize_low): Call
5489 linux_ptrace_init_warnings.
5490
7f216e7c
DE
54912012-07-02 Doug Evans <dje@google.com>
5492
5493 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5494 pointer to int.
5495
d3ce09f5
SS
54962012-07-02 Stan Shebs <stan@codesourcery.com>
5497
5498 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5499 (ax.o): Add it to build rule.
5500 (ax-ipa.o): Ditto.
5501 (OBS): Add format.o.
5502 (IPA_OBS): Add format.o.
5503 * server.c (handle_query): Claim support for breakpoint commands.
5504 (process_point_options): Add command case.
5505 (process_serial_event): Leave running if there are printfs in
5506 effect.
5507 * mem-break.h (any_persistent_commands): Declare.
5508 (add_breakpoint_commands): Declare.
5509 (gdb_no_commands_at_breakpoint): Declare.
5510 (run_breakpoint_commands): Declare.
5511 * mem-break.c (struct point_command_list): New struct.
5512 (struct breakpoint): New field command_list.
5513 (any_persistent_commands): New function.
5514 (add_commands_to_breakpoint): New function.
5515 (add_breakpoint_commands): New function.
5516 (gdb_no_commands_at_breakpoint): New function.
5517 (run_breakpoint_commands): New function.
5518 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5519 locally.
5520 * ax.c: Include format.h.
5521 (ax_printf): New function.
5522 (gdb_eval_agent_expr): Add printf opcode.
5523
2f8f6aed
YQ
55242012-06-13 Yao Qi <yao@codesourcery.com>
5525
5526 * server.c (start_inferior): Remove duplicated writes to fields
5527 'last_resume_kind' and 'last_status' of 'current_inferior'.
5528
0c9070b3
YQ
55292012-06-12 Yao Qi <yao@codesourcery.com>
5530 Pedro Alves <palves@redhat.com>
5531
5532 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5533 comment.
5534 * server.c (handle_v_cont): Extend comment.
5535
c52daf70
YQ
55362012-06-11 Yao Qi <yao@codesourcery.com>
5537
5538 * linux-low.c (linux_attach): Add 'static'.
5539
d38bbb0a
YQ
55402012-06-06 Yao Qi <yao@codesourcery.com>
5541
5542 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5543
89dc0afd
JK
55442012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5545
5546 Fix gcc -flto compilation warning.
5547 * server.c (main): Make variable multi_mode and attach volatile.
5548
75f62ce7
TJB
55492012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5550
5551 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5552 if the platform doesn't know about it.
5553
65f479b6
PA
55542012-05-30 Jeff Kenton <jkenton@tilera.com>
5555
5556 * Makefile.in (SFILES): Add linux-tile-low.c.
5557 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5558 * configure.srv: Handle tilegx-*-linux*.
5559 * linux-tile-low.c: New file.
5560
0c5bf5a9
JK
55612012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5562
5563 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5564
a493e3e2
PA
55652012-05-24 Pedro Alves <palves@redhat.com>
5566
5567 PR gdb/7205
5568
43aaf8b6 5569 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 5570
2ea28649
PA
55712012-05-24 Pedro Alves <palves@redhat.com>
5572
5573 PR gdb/7205
5574
5575 Replace target_signal with gdb_signal throughout.
5576
8d409d16
MR
55772012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5578
5579 * linux-low.c (linux_store_registers): Avoid the copying sequence
5580 when no data has been retrieved by ptrace.
5581
23512c01
MGD
55822012-05-22 Will Deacon <will.deacon@arm.com>
5583
5584 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5585 Include asm/ptrace.h.
5586 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5587 already defined.
5588
4934b29e
MR
55892012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5590
5591 * linux-low.c (linux_store_registers): Don't re-retrieve data
5592 with ptrace that has already been obtained from /proc. Always
5593 copy any data retrieved with ptrace to the buffer supplied.
5594
bde24c0a
PA
55952012-05-11 Yao Qi <yao@codesourcery.com>
5596 Pedro Alves <palves@redhat.com>
5597
5598 * linux-low.c (enum stopping_threads_kind): New.
5599 (stopping_threads): Change type to `enum stopping_threads_kind'.
5600 (handle_extended_wait): If stopping and suspending threads, leave
5601 the new_lwp suspended too.
5602 (linux_wait_for_event): Adjust.
5603 (stop_all_lwps): Set `stopping_threads' to
5604 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5605 whether we're suspending threads or just stopping them. Assert no
5606 recursion happens.
5607
623b6bdf
YQ
56082012-04-29 Yao Qi <yao@codesourcery.com>
5609
5610 * server.h: Move some code to ...
5611 * gdbthread.h: ... here. New.
5612 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5613 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5614 (nto-low.o, win32-low.o): Likewise.
5615 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5616 * regcache.c, remote-utils.c, server.c: Likewise.
5617 * target.c, tracepoint.c, win32-low.c: Likewise.
5618
f15f9948
TJB
56192012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5620
5621 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5622 (PTRACE_ARG4_TYPE): Likewise.
5623 (PTRACE_XFER_TYPE): Likewise.
5624 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5625 ptrace to PTRACE_ARG3_TYPE.
5626 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5627 (PTRACE_ARG4_TYPE): Likewise.
5628 (PTRACE_XFER_TYPE): Likewise.
5629 (linux_detach_one_lwp): Cast fourth argument of
5630 ptrace to long then PTRACE_ARG4_TYPE.
5631 (regsets_fetch_inferior_registers): Cast third argument of
5632 ptrace to long then PTRACE_ARG3_TYPE.
5633 (regsets_store_inferior_registers): Likewise.
5634
38ea300a
PA
56352012-04-20 Pedro Alves <palves@redhat.com>
5636
5637 * configure: Regenerate.
5638
c971b7fa
PA
56392012-04-19 Pedro Alves <palves@redhat.com>
5640
43aaf8b6 5641 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 5642 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
5643 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5644 (all, install-only, uninstall, clean-info, all-lib, clean): No
5645 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5646 (maintainer-clean realclean distclean): Use subdir_do.
5647 (subdir_do): New.
5648 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 5649 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
5650 * acinclude.m4: Include acx_configure_dir.m4.
5651 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5652 calls. Call AC_PROG_RANLIB. Configure gnulib using
5653 ACX_CONFIGURE_DIR.
5654 (GNULIB): New.
5655 (GNULIB_STDINT_H): Adjust.
5656 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5657 * gdbreplay.c: Include build-gnulib/config.h.
5658 * server.h: Likewise.
5659 * aclocal.m4: Regenerate.
5660 * config.in: Regenerate.
5661 * configure: Regenerate.
c971b7fa 5662
809277f8
PA
56632012-04-19 Pedro Alves <palves@redhat.com>
5664
5665 * Makefile.in (LIBGNU, INCGNU): Adjust.
5666 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5667 (all, install-only, uninstall, clean-info, all-lib, clean)
5668 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5669 * configure.ac: Adjust AC_OUTPUT output.
5670 * aclocal.m4: Regenerate.
5671 * configure: Regenerate.
5672
fd9bb8b8
PA
56732012-04-19 Pedro Alves <palves@redhat.com>
5674
5675 * Makefile.in (generated_files): New.
5676 (server_h): Remove the explicit dependency on config.h, and depend
5677 on $generated_files.
5678
1c298c66
PA
56792012-04-19 Pedro Alves <palves@redhat.com>
5680
5681 * Makefile.in (INCGNU): Add -Ignulib.
5682
57c4b50b
PA
56832012-04-19 Pedro Alves <palves@redhat.com>
5684
5685 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5686 (INCGNU): ... this, and spell out -I here.
5687 (GNULIB_LIB): Rename to ...
5688 (LIBGNU): ... this.
5689 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5690
1030e047
PA
56912012-04-19 Pedro Alves <palves@redhat.com>
5692
5693 * config.in: Regenerate.
5694
447d4319
PA
56952012-04-19 Pedro Alves <palves@redhat.com>
5696
5697 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5698 * server.h (memmem): Remove declaration.
5699 * config.in: Regenerate.
5700 * configure: Regenerate.
5701
aad9eab9
YQ
57022012-04-19 Yao Qi <yao@codesourcery.com>
5703
5704 * Makefile.in (SFILES): Add common/vec.c.
5705 (OBS): Add vec.o.
5706 (vec.o): New rule.
5707
3e10640f
YQ
57082012-04-19 Yao Qi <yao@codesourcery.com>
5709
5710 * remote-utils.c (prepare_resume_reply): Replace with macro
5711 target_core_of_thread.
5712 * server.c (handle_qxfer_threads_proper): Likewise.
5713 * target.h (traget_core_of_thread): New macro.
5714
71622373
PA
57152012-04-18 Pedro Alves <palves@redhat.com>
5716
5717 * aclocal.m4: Regenerate.
5718 * configure: Regenerate.
5719
80d26939
YQ
57202012-04-16 Yao Qi <yao@codesourcery.com>
5721
5722 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5723 duplicated on address.
5724
42476b70
YQ
57252012-04-16 Yao Qi <yao@codesourcery.com>
5726
5727 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5728 (struct tracepoint_action_ops) <send>: New field.
5729 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5730 (agent_expr_send, x_tracepoint_action_send): New.
5731 (l_tracepoint_action_send): New.
5732 (cmd_qtdp): Download and install tracepoint
5733 according to `use_agent'.
5734 (run_inferior_command): Add one more parameter `len'.
5735 Update callers.
5736 (tracepoint_send_agent): New.
5737 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5738
7bc83639
YQ
57392012-04-16 Yao Qi <yao@codesourcery.com>
5740
5741 * tracepoint.c (download_tracepoints): Moved to ...
5742 (cmd_qtstart): ... here.
5743
5f18041e
YQ
57442012-04-14 Yao Qi <yao@codesourcery.com>
5745
5746 * tracepoint.c: Include inttypes.h.
5747 (struct collect_memory_action): Use sized types.
5748 (struct tracepoint): Likewise.
5749 (cmd_qtdp, stop_tracing): Update print specifiers.
5750 (cmd_qtp, response_tracepoint): Likewise.
5751 (collect_data_at_tracepoint): Likewise.
5752 (collect_data_at_step): Likewise.
5753
55a8c076
YQ
57542012-04-14 Yao Qi <yao@codesourcery.com>
5755
5756 Import gnulib module inttypes.
5757 * aclocal.m4, config.in, configure: Regenerated.
5758
dc750257
YQ
57592012-04-14 Yao Qi <yao@codesourcery.com>
5760
5761 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5762 Makefile and config.status at last.
5763
0ab5faf9
YQ
57642012-04-13 Yao Qi <yao@codesourcery.com>
5765
5766 * tracepoint.c: Include stdint.h unconditionally.
5767
18f5fd81
TJB
57682012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5769
5770 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5771 on BFD_HAVE_SYS_PROCFS_TYPE.
5772 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5773 * configure: Regenerate.
5774 * config.in: Likewise.
5775
4d47af5c
L
57762012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5777
5778 * Makefile.in (clean): Also remove x32.c x32-linux.c
5779 x32-avx.c x32-avx-linux.c.
5780 (x32.o): New target.
5781 (x32.c): Likewise.
5782 (x32-linux.o): Likewise.
5783 (x32-linux.c): Likewise.
5784 (x32-avx.o): Likewise.
5785 (x32-avx.c): Likewise.
5786 (x32-avx-linux.o): Likewise.
5787 (x32-avx-linux.c): Likewise.
5788
5789 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5790 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5791 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5792 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5793 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5794 i386/x32-avx-linux.xml.
5795
5796 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5797 (init_registers_x32_avx_linux): Likwise.
5798 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5799 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5800
ecedbe58
PA
58012012-04-13 Pedro Alves <palves@redhat.com>
5802
5803 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5804 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5805 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5806 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5807 the sub-make.
5808
c92b5177
L
58092012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5810
5811 * linux-x86-low.c (compat_x32_clock_t): New.
5812 (compat_x32_siginfo_t): Likewise.
5813 (compat_x32_siginfo_from_siginfo): Likewise.
5814 (siginfo_from_compat_x32_siginfo): Likewise.
5815 (linux_is_elf64): Likewise.
5816 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5817 and siginfo_from_compat_x32_siginfo for x32.
5818 (x86_arch_setup): Set linux_is_elf64.
5819
214d508e
L
58202012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5821
5822 PR gdb/13969
5823 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5824 e_machine field.
5825 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5826 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5827 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5828 compatible with process.
5829
c9a1864a
YQ
58302012-04-12 Yao Qi <yao@codesourcery.com>
5831
5832 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5833 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5834 (install-only, install-info, clean): Handle sub dir gnulib.
5835 (all-lib, am--refresh): New targets.
5836 (memmem.o): Remove target.
5837 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5838 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5839 (AC_REPLACE_FUNCS): Remove memmem.
5840 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5841 (AC_OUTPUT): Generate Makefile in gnulib/.
5842 * aclocal.m4, config.in, configure: Regenerated.
5843
367ba2c2
MR
58442012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5845
5846 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5847
9d236627
PA
58482012-04-05 Pedro Alves <palves@redhat.com>
5849
5850 -Werror=strict-aliasing
5851
5852 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5853 pointer.
5854
111217b3
PA
58552012-04-04 Pedro Alves <palves@redhat.com>
5856
5857 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5858 (sparc_store_gregset_from_stack, sparc_store_gregset)
5859 (sparc_breakpoint_at): Fix formatting.
5860
8365dcf5
TJB
58612012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5862
5863 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5864 are available.
5865 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5866 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5867 * config.in: Regenerate.
5868 * configure: Likewise.
5869
689cc2ae
PA
58702012-03-29 Pedro Alves <palves@redhat.com>
5871
5872 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5873 Correct ptrace arguments.
5874
c14dfd32
PA
58752012-03-28 Pedro Alves <palves@redhat.com>
5876
5877 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5878 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5879 (IA64_FR1_REGNUM): New defines.
5880 (ia64_fetch_register): New.
5881 (the_low_target): Install it.
5882 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5883 field.
5884 * linux-low.c (linux_fetch_registers): Try the
5885 the_low_target.fetch_register hook first.
5886
5887 * linux-arm-low.c (the_low_target): Adjust.
5888 * linux-bfin-low.c (the_low_target): Adjust.
5889 * linux-cris-low.c (the_low_target): Adjust.
5890 * linux-crisv32-low.c (the_low_target): Adjust.
5891 * linux-m32r-low.c (the_low_target): Adjust.
5892 * linux-m68k-low.c (the_low_target): Adjust.
5893 * linux-mips-low.c (the_low_target): Adjust.
5894 * linux-ppc-low.c (the_low_target): Adjust.
5895 * linux-s390-low.c (the_low_target): Adjust.
5896 * linux-sh-low.c (the_low_target): Adjust.
5897 * linux-sparc-low.c (the_low_target): Adjust.
5898 * linux-tic6x-low.c (the_low_target): Adjust.
5899 * linux-x86-low.c (the_low_target): Adjust.
5900 * linux-xtensa-low.c (the_low_target): Adjust.
5901
63c88e13
PA
59022012-03-26 Pedro Alves <palves@redhat.com>
5903
5904 * server.c (handle_qxfer_libraries): Don't bail early if
5905 the_target->qxfer_libraries_svr4 is not NULL.
5906
fb723180
PA
59072012-03-26 Pedro Alves <palves@redhat.com>
5908
5909 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5910
0afae3cf
PA
59112012-03-23 Pedro Alves <palves@redhat.com>
5912
5913 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5914 "library-list-svr4" element's start tag when the the DSO list is
5915 empty.
5916
485f1ee4
PA
59172012-03-23 Pedro Alves <palves@redhat.com>
5918
5919 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5920 a variable whose type size is the same as the inferior's pointer
5921 size.
5922
a5362b9a
TS
59232012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5924
5925 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5926 struct siginfo.
5927 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5928 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5929 * linux-low.h: Include <signal.h>.
5930 (struct siginfo): Remove forward declaration.
5931 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5932 struct siginfo.
5933
d226c142
MF
59342012-03-21 Mike Frysinger <vapier@gentoo.org>
5935
5936 * .gitignore: Ignore more files.
5937
122f36ef
PA
59382012-03-19 Pedro Alves <palves@redhat.com>
5939 Jan Kratochvil <jan.kratochvil@redhat.com>
5940
5941 * server.c (cont_thread, general_thread): Add describing comments.
5942 (start_inferior): Clear `cont_thread'.
5943 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5944 of a process.
5945
fc3e5175
YQ
59462012-03-15 Yao Qi <yao@codesourcery.com>
5947
5948 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5949 handling to ...
5950 (cmd_qtdp): ... here.
5951
8d0d92cd
YQ
59522012-03-15 Yao Qi <yao@codesourcery.com>
5953
5954 * tracepoint.c (struct tracepoint_action_ops): New.
5955 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5956 (m_tracepoint_action_download): New.
5957 (r_tracepoint_action_download): New.
5958 (x_tracepoint_action_download): New.
5959 (l_tracepoint_action_download): New.
5960 (add_tracepoint_action): Install `action->ops' according type.
5961 (download_tracepoint_1): Move code `download' function pointer
5962 of various tracepoint_action_ops.
5963
87b0bb13
JK
59642012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5965
5966 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5967 linux_ptrace_attach_warnings.
5968
5f572dec
JK
59692012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5970
5971 * Makefile.in (linux-ptrace.o): New.
5972 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5973 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5974 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5975 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5976 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5977 of these targets.
5978 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5979
f4647387
YQ
59802012-03-08 Yao Qi <yao@codesourcery.com>
5981 Pedro Alves <palves@redhat.com>
5982
5983 Fix PR server/13392.
5984 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5985 offset of JMP insn.
5986 * tracepoint.c (remove_tracepoint): New.
5987 (cmd_qtdp): Call remove_tracepoint when failed to install.
5988
9b224c5e
PA
59892012-03-07 Pedro Alves <palves@redhat.com>
5990
5991 * linux-low.c (get_detach_signal): New.
5992 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5993 Pass on pending signals to PTRACE_DETACH. Check the result of the
5994 ptrace call.
5995 * server.c (program_signals, program_signals_p): New.
5996 (handle_general_set): Handle QProgramSignals.
5997 * server.h (program_signals, program_signals_p): Declare.
5998
e237a7e2
JK
59992012-03-05 Pedro Alves <palves@redhat.com>
6000 Jan Kratochvil <jan.kratochvil@redhat.com>
6001
6002 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6003 New comment why.
6004
5808517f
YQ
60052012-03-03 Yao Qi <yao@codesourcery.com>
6006
6007 * tracepoint.c (tracepoint_look_up_symbols): Update call to
6008 agent_look_up_symbols.
6009
58b4daa5
YQ
60102012-03-03 Yao Qi <yao@codesourcery.com>
6011
6012 * Makefile.in (linux-low.o): Keep dependence on agent.h.
6013 (linux-x86-low.o): Likewise.
6014 * server.h: Remove in_process_agent_loaded.
6015 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
6016 common/agent.c.
6017 Update callers.
6018
8ffcbaaf
YQ
60192012-03-03 Yao Qi <yao@codesourcery.com>
6020
6021 * tracepoint.c (gdb_agent_capability): New global.
6022 (in_process_agent_loaded_ust): Renamed to
6023 `in_process_agent_supports_ust'.
6024 Update callers.
6025 (in_process_agent_supports_ust): Call agent_capability_check.
6026 (clear_installed_tracepoints): Assert that agent supports
6027 agent.
6028
d1feda86
YQ
60292012-03-03 Yao Qi <yao@codesourcery.com>
6030
6031 * linux-low.c (linux_supports_agent): New.
6032 (linux_target_ops): Initialize field `supports_agent' with
6033 linux_supports_agent.
6034 * target.h (struct target_ops) <supports_agent>: New.
6035 (target_supports_agent): New macro.
6036 * server.c (handle_general_set): Handle packet 'QAgent'.
6037 (handle_query): Send `QAgent+'.
6038 * Makefile.in (server.o): Depends on agent.h.
6039
2fa291ac
YQ
60402012-03-03 Yao Qi <yao@codesourcery.com>
6041
6042 * Makefile.in (OBS): Add agent.o.
6043 Add new rule for agent.o.
6044 Track dependence of tracepoint.c on agent.h.
6045 * tracepoint.c (run_inferior_command_1):
6046 (run_inferior_command): Call agent_run_command.
6047 (gdb_ust_connect_sync_socket): Deleted. Move it to
6048 common/agent.c.
6049 (resume_thread, stop_thread): Likewise.
6050 (gdb_ust_socket_init): Renamed to ...
6051 (gdb_agent_socket_init): ... New.
6052 (gdb_ust_thread): Renamed to ...
6053 (gdb_agent_helper_thread): ... New.
6054 (gdb_ust_init): Move some code to ...
6055 (gdb_agent_init): ... here. New.
6056 [HAVE_UST]: Call gdb_ust_init.
6057 (initialize_tracepoint_ftlib): Call gdb_agent_init.
6058 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6059 * config.in, configure: Regenerated.
6060
05044653
PA
60612012-03-02 Pedro Alves <palves@redhat.com>
6062
6063 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6064 * linux-low.c (struct simple_pid_list): New.
6065 (stopped_pids): New a struct simple_pid_list pointer.
6066 (add_to_pid_list, pull_pid_from_list): New.
6067 (handle_extended_wait): Don't assume the first signal new children
6068 report is SIGSTOP. Adjust call to pull_pid_from_list.
6069 (linux_wait_for_lwp): Adjust.
6070
8d00225b
YQ
60712012-03-02 Yao Qi <yao@codesourcery.com>
6072
6073 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6074 debug log.
6075
19560ba5
YQ
60762012-03-02 Yao Qi <yao@codesourcery.com>
6077
6078 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6079 `stop_pc' and `tpoint'. Update caller.
6080
1faeff08
MR
60812012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6082
6083 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6084 * linux-low.c (use_linux_regsets): New macro.
6085 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6086 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6087 (linux_register_in_regsets): New function.
6088 (usr_fetch_inferior_registers): Skip registers covered by
6089 regsets.
6090 (usr_store_inferior_registers): Likewise.
6091 (usr_fetch_inferior_registers): New macro.
6092 (usr_store_inferior_registers): Likewise.
6093 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6094 (linux_store_registers): Likewise.
6095 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6096 prototype.
6097 (init_registers_mips64_dsp_linux): Likewise.
6098 (init_registers_mips_linux): New macro.
6099 (init_registers_mips_dsp_linux): Likewise.
6100 (mips_dsp_num_regs): Likewise.
6101 (DSP_BASE, DSP_CONTROL): New fallback macros.
6102 (mips_base_regs): New macro.
6103 (mips_regmap): Use it. Fix the size.
6104 (mips_dsp_regmap): New variable.
6105 (mips_dsp_regset_bitmap): Likewise.
6106 (mips_arch_setup): New function.
6107 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6108 than mips_regmap.
6109 (mips_cannot_store_register): Likewise.
6110 (the_low_target): Update .arch_setup, .num_regs and .regmap
6111 initializers. Add .regset_bitmap initializer.
6112 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6113 initializer.
6114 * linux-bfin-low.c (the_low_target): Likewise.
6115 * linux-cris-low.c (the_low_target): Likewise.
6116 * linux-crisv32-low.c (the_low_target): Likewise.
6117 * linux-ia64-low.c (the_low_target): Likewise.
6118 * linux-m32r-low.c (the_low_target): Likewise.
6119 * linux-m68k-low.c (the_low_target): Likewise.
6120 * linux-ppc-low.c (the_low_target): Likewise.
6121 * linux-s390-low.c (the_low_target): Likewise.
6122 * linux-sh-low.c (the_low_target): Likewise.
6123 * linux-sparc-low.c (the_low_target): Likewise.
6124 * linux-tic6x-low.c (the_low_target): Likewise.
6125 * linux-x86-low.c (the_low_target): Likewise.
6126 * linux-xtensa-low.c (the_low_target): Likewise.
6127 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6128 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6129 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6130 srv_xmlfiles.
6131 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6132 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6133
c03e6ccc
YQ
61342012-02-29 Yao Qi <yao@codesourcery.com>
6135 Pedro Alves <palves@redhat.com>
6136
6137 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6138 `step_over_finished' is true.
6139
644cebc9
PA
61402012-02-27 Pedro Alves <palves@redhat.com>
6141
6142 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6143 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6144
c14d7ab2
PA
61452012-02-27 Pedro Alves <palves@redhat.com>
6146
6147 PR server/9684
6148 * linux-low.c (pid_is_stopped): New.
6149 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6150
412c89dd
LM
61512012-02-25 Luis Machado <lgustavo@codesourcery.com>
6152
6153 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6154 of conditions.
6155
b745defe
MR
61562012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6157
6158 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6159
9f3a5c85
LM
61602012-02-24 Luis Machado <lgustavo@codesourcery>
6161
6162 * server.c (handle_query): Advertise support for target-side
6163 breakpoint condition evaluation.
6164 (process_point_options): New function.
6165 (process_serial_event): When inserting a breakpoint, check for
6166 a target-side condition that should be evaluated.
6167
6168 * mem-break.c: Include regcache.h and ax.h.
6169 (point_cond_list_t): New data structure.
6170 (breakpoint) <cond_list>: New field.
6171 (find_gdb_breakpoint_at): Make non-static.
6172 (delete_gdb_breakpoint_at): Clear any target-side
6173 conditions.
6174 (clear_gdb_breakpoint_conditions): New function.
6175 (add_condition_to_breakpoint): Likewise.
6176 (add_breakpoint_condition): Likewise.
6177 (gdb_condition_true_at_breakpoint): Likewise.
6178 (gdb_breakpoint_here): Return result directly instead
6179 of going through a local variable.
6180
6181 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6182 (clear_gdb_breakpoint_conditions): Likewise.
6183 (add_breakpoint_condition): Likewise.
6184 (gdb_condition_true_at_breakpoint): Likewise.
6185
6186 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6187 (need_step_over_p): Take target-side breakpoint condition into
6188 consideration.
6189
5e1dc496
LM
61902012-02-24 Luis Machado <lgustavo@codesourcery>
6191
6192 * server.h: Include tracepoint.h.
6193 (agent_mem_read, agent_get_trace_state_variable_value,
6194 agent_set_trace_state_variable_value,
6195 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6196 get_set_tsv_func_addr): New prototypes.
6197
6198 * ax.h: New include file.
6199 * ax.c: New source file.
6200
6201 * tracepoint.c: Include ax.h.
6202 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6203 agent_expr, eval_result_type): Move to ax.h.
6204 (parse_agent_expr): Rename to ...
6205 (gdb_parse_agent_expr): ... this, make it non-static and move
6206 to ax.h.
6207 (unparse_agent_expr) Rename to ...
6208 (gdb_unparse_agent_expr): ... this, make it non-static and move
6209 to ax.h.
6210 (eval_agent_expr): Rename to ...
6211 (eval_tracepoint_agent_expr): ... this.
6212 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6213 forward declarations.
6214 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6215 (agent_get_trace_state_variable_value): New function.
6216 (agent_set_trace_state_variable_value): New function.
6217 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6218 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6219 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6220 (condition_true_at_tracepoint): Likewise.
6221 (parse_agent_expr): Rename to ...
6222 (gdb_parse_agent_expr): ... this and move to ax.c.
6223 (unparse_agent_expr): Rename to ...
6224 (gdb_unparse_agent_expr): ... this and move to ax.c.
6225 (gdb_agent_op_name): Move to ax.c.
6226 (eval_agent_expr): Rename to ...
6227 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6228 and move to ax.c.
6229 (eval_tracepoint_agent_expr): New function.
6230 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 6231 non-static.
5e1dc496
LM
6232 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6233 ax.c.
6234 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6235 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6236 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6237 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6238 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6239 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6240 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6241 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6242 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6243 (compile_bytecodes): Remove forward declaration.
6244 (is_goto_target): Move to ax.c.
6245 (compile_bytecodes): Move to ax.c and call
6246 agent_get_trace_state_variable_value (...) and
6247 agent_set_trace_state_variable_value (...).
6248
6249 * Makefile.in: Update ax.c and IPA dependencies.
6250
277e4e52
PA
62512012-02-24 Pedro Alves <palves@redhat.com>
6252
6253 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6254 (cmd_bigqtbuffer_circular): ... this. Only handle
6255 'QTBuffer:circular:'.
6256 (handle_tracepoint_general_set): Adjust.
6257
bf4c19f7
YQ
62582012-02-16 Yao Qi <yao@codesourcery.com>
6259
6260 * inferiors.c: Move code to ...
6261 * dll.c: .... here. New.
6262 * server.h: Declare clear_dlls.
6263 * Makefile.in (SFILES): Add dll.c.
6264 (OBS): Add dll.o
6265 (dll.o): New rule.
6266
d73f2619
YQ
62672012-02-11 Yao Qi <yao@codesourcery.com>
6268
6269 * server.c: (handle_monitor_command): Add a new parameter
6270 `own_buf'.
6271 (handle_query): Update caller.
6272
f8255c2a
JB
62732012-02-09 Joel Brobecker <brobecker@adacore.com>
6274
6275 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6276 * configure, config.in: Regenerate.
6277 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6278 is not defined.
6279
da84f473
PA
62802012-02-02 Pedro Alves <palves@redhat.com>
6281
6282 Try SIGKILL first, then PTRACE_KILL.
6283 * linux-low.c (linux_kill_one_lwp): New.
6284 (linux_kill_one_lwp): Rename to ...
6285 (kill_one_lwp_callback): ... this. Use the new
6286 linux_kill_one_lwp.
6287
e886a173
PA
62882012-02-02 Pedro Alves <palves@redhat.com>
6289
6290 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6291 inferior.
6292
be07f1a2
PA
62932012-01-27 Pedro Alves <palves@redhat.com>
6294
6295 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6296 (elf_64_file_p): Make static.
6297 (linux_pid_exe_is_elf_64_file): New.
6298 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6299 Delete declarations.
6300 (linux_pid_exe_is_elf_64_file): Declare.
6301 * linux-x86-low.c (x86_arch_setup): Use
6302 linux_pid_exe_is_elf_64_file.
6303
d8301ad1
JK
63042012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6305
6306 * linux-low.c (linux_wait_for_event_1): Rename to ...
6307 (linux_wait_for_event): ... here and merge it with former
6308 linux_wait_for_event - new variable wait_ptid, use it.
6309 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6310
01b17894
PA
63112012-01-23 Pedro Alves <palves@redhat.com>
6312
6313 * server.c (main): Avoid yet another case of infinite loop while
6314 detaching/killing after a longjmp.
6315
e825046f
JK
63162012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6317
6318 Code cleanup.
6319 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6320
b9e7b9c3
UW
63212012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6322
6323 * hostio.c (handle_readlink): New function.
6324 (handle_vFile): Call it to handle "vFile:readlink" packets.
6325
901f9912
UW
63262012-01-20 Pedro Alves <palves@redhat.com>
6327 Ulrich Weigand <ulrich.weigand@linaro.org>
6328
6329 * server.c (handle_v_requests): Only support vAttach and vRun to
6330 start multiple processes when in extended protocol mode.
6331
fc1ab1a0
PA
63322012-01-17 Pedro Alves <palves@redhat.com>
6333
6334 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6335 memalign plus mprotect to allocate the scratch buffer.
6336
7d5d4e98
PA
63372012-01-13 Pedro Alves <palves@redhat.com>
6338
6339 * server.c (attach_inferior): Clear `cont_thread'.
6340
f128d5e9
PA
63412012-01-13 Pedro Alves <palves@redhat.com>
6342
6343 * server.c (main): Avoid infinite loop while detaching/killing
6344 after a longjmp.
6345
06db92f0
DE
63462012-01-09 Doug Evans <dje@google.com>
6347
6348 * server.c (start_inferior): Set last_ptid in --wrapper case.
6349
32d92999
YQ
63502012-01-06 Yao Qi <yao@codesourcery.com>
6351
6352 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6353 defined.
6354 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6355
5e0a92a9
YQ
63562012-01-04 Yao Qi <yao@codesourcery.com>
6357
6358 * tracepoint.c (cmd_qtdp): Print debug message
6359 for static tracepoint.
6360
ae639e8c
YQ
63612012-01-04 Yao Qi <yao@codesourcery.com>
6362
6363 * tracepoint.c (trace_vdebug): Differentiate debug message
6364 between gdbserver and IPA.
6365
f72429c5
YQ
63662012-01-03 Yao Qi <yao@codesourcery.com>
6367
6368 * tracepoint.c (tracepoint_was_hit): Don't collect for
6369 static tracepoint.
6370
12c3e59c
JB
63712012-01-02 Joel Brobecker <brobecker@adacore.com>
6372
6373 * terminal.h: Reformat copyright header.
6374
67827812
JB
63752012-01-02 Joel Brobecker <brobecker@adacore.com>
6376
6377 * server.c (gdbserver_version): Update copyright year.
6378 * gdbreplay.c (gdbreplay_version): Likewise.
6379
3e52c33d
JK
63802011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6381
6382 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6383
6384 Revert:
6385 2011-12-18 Hui Zhu <teawater@gmail.com>
6386 * linux-low.c (linux_create_inferior): Save return value to ret.
6387
66f1260e
HZ
63882011-12-18 Hui Zhu <teawater@gmail.com>
6389
6390 * linux-low.c (linux_create_inferior): Save return value to ret.
6391
e77616d7
DE
63922011-12-16 Doug Evans <dje@google.com>
6393
e7b06c57
DE
6394 * linux-low.c (linux_create_inferior): If stdio connection,
6395 redirect stdin from /dev/null, stdout to stderr.
6396 * remote-utils.c (remote_is_stdio): New static global.
6397 (remote_connection_is_stdio): New function.
6398 (remote_prepare): Handle stdio connection.
6399 (remote_open): Ditto.
6400 (remote_close): Don't close stdin for stdio connections.
6401 (read_prim,write_prim): New functions. Replace all calls to
6402 read/write to these.
6403 * server.c (main): Watch for "-" argument. Move call to
6404 remote_prepare before start_inferior.
6405 * server.h (STDIO_CONNECTION_NAME): New macro.
6406 (remote_connection_is_stdio): Declare.
6407
e77616d7
DE
6408 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6409 in debugging output.
6410
82067193
YQ
64112011-12-15 Yao Qi <yao@codesourcery.com>
6412
6413 * tracepoint.c: Include sys/syscall.h.
6414 (gdb_ust_thread): Remove preprocessor conditional.
6415
82bfbe7e
PA
64162011-12-14 Pedro Alves <pedro@codesourcery.com>
6417
6418 * linux-low.c (linux_detach_one_lwp): Call
6419 the_low_target.prepare_to_resume before detaching.
6420
712c6575
YQ
64212011-12-14 Yao Qi <yao@codesourcery.com>
6422
6423 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6424 of write.
6425
d54d1edf
YQ
64262011-12-14 Yao Qi <yao@codesourcery.com>
6427
6428 * i386-low.c (i386_low_stopped_data_address): Initialize local
6429 variable `control'.
6430
6210a125
PA
64312011-12-13 Pedro Alves <pedro@codesourcery.com>
6432
6433 PR remote/13492
6434
6435 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6436 DR_CONTROL unless necessary. Extend comments.
6437 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6438 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6439
2ece8244
YQ
64402011-12-13 Yao Qi <yao@codesourcery.com>
6441
6442 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6443 macros.
6444 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6445
784867a5
JK
64462011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6447
6448 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6449 Print new debug message for such case.
6450
6bf36717
JK
64512011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6452
6453 Fix overlapping memcpy.
6454 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6455 the read_inferior_memory transfer.
6456 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6457 write_inferior_memory transfer.
6458 (set_fast_tracepoint_jump): New variable buf. Use it for the
6459 read_inferior_memory and write_inferior_memory transfers.
6460 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6461 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6462 Use it for the write_inferior_memory transfer.
6463 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6464 buffers.
6465
50275556
MR
64662011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6467
6468 * linux-low.c (fetch_register, store_register): Make code
6469 consistent, fix formatting.
6470
7325beb4
MR
64712011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6472
6473 * linux-low.c (usr_store_inferior_registers): Factor out code
6474 to handle individual registers into...
6475 (store_register): ... this new function.
6476
c642a434
UW
64772011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6478
6479 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6480 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6481 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6482 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6483 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6484 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6485 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6486 (srv_xmlfiles): Add new XML files.
6487
6488 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6489 and <sys/uio.h>.
6490 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6491 (init_registers_s390_linux32v1): Add prototype.
6492 (init_registers_s390_linux32v2): Likewise.
6493 (init_registers_s390_linux64v1): Likewise.
6494 (init_registers_s390_linux64v2): Likewise.
6495 (init_registers_s390x_linux64v1): Likewise.
6496 (init_registers_s390x_linux64v2): Likewise.
6497 (s390_num_regs): Increment to 52.
6498 (s390_regmap): Add orig_r2 register.
6499 (s390_num_regs_3264): Increment to 68.
6500 (s390_regmap_3264): Add orig_r2 register.
6501 (s390_collect_ptrace_register): Handle orig_r2 register.
6502 (s390_supply_ptrace_register): Likewise.
6503 (s390_fill_last_break): New function.
6504 (s390_store_last_break): Likewise.
6505 (s390_fill_system_call): New function.
6506 (s390_store_system_call): Likewise.
6507 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6508 register sets.
6509 (s390_check_regset): New function.
6510 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6511 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6512 Update target_regsets for available register sets.
6513
2268b414
JK
65142011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6515 Jan Kratochvil <jan.kratochvil@redhat.com>
6516
6517 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6518 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6519 New.
6520 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6521 * linux-low.h (struct process_info_private): New member r_debug.
6522 * server.c (handle_qxfer_libraries): Call
6523 the_target->qxfer_libraries_svr4.
6524 (handle_qxfer_libraries_svr4): New function.
6525 (qxfer_packets): New entry "libraries-svr4".
6526 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6527 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6528 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6529 PACKET_qXfer_libraries_svr4.
6530
d6db1fab
UW
65312011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6532
6533 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6534 PSW address/mask between 8-byte and 16-byte formats.
6535 (s390_supply_ptrace_register): Likewise.
6536 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6537 basic addressing mode bit.
6538
242f5f1c
SS
65392011-11-24 Stan Shebs <stan@codesourcery.com>
6540
6541 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6542
f196051f
SS
65432011-11-17 Stan Shebs <stan@codesourcery.com>
6544
6545 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6546 (tracing_start_time): New global.
6547 (tracing_stop_time): New global.
6548 (tracing_user_name): New global.
6549 (tracing_notes): New global.
6550 (tracing_stop_note): New global.
6551 (cmd_qtstart): Set traceframe_usage, start_time.
6552 (stop_tracing): Set stop_time.
6553 (cmd_qtstatus): Report additional status.
6554 (cmd_qtp): New function.
6555 (handle_tracepoint_query): Call it.
6556 (cmd_qtnotes): New function.
6557 (handle_tracepoint_general_set): Call it.
6558 (get_timestamp): Rename from tsv_get_timestamp.
6559
405f8e94
SS
65602011-11-14 Stan Shebs <stan@codesourcery.com>
6561 Kwok Cheung Yeung <kcy@codesourcery.com>
6562
6563 * linux-x86-low.c (small_jump_insn): New.
6564 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6565 trampoline and error message, build a trampoline and issue a small
6566 jump instruction to it.
6567 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6568 trampoline and error message.
6569 (x86_get_min_fast_tracepoint_insn_len): New.
6570 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6571 * linux-low.h (struct linux_target_ops): Add arguments to
6572 install_fast_tracepoint_jump_pad operation, add new operation.
6573 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6574 arguments.
6575 (linux_get_min_fast_tracepoint_insn_len): New function.
6576 (linux_target_op): Add new operation.
6577 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6578 (gdb_trampoline_buffer_end): Ditto.
6579 (gdb_trampoline_buffer_error): Ditto.
6580 (struct ipa_sym_addresses): Add fields for new IPA variables.
6581 (symbol_list): Add entries for new IPA variables.
6582 (struct tracepoint): Add fields to hold the address range of the
6583 trampoline used by the tracepoint.
6584 (trampoline_buffer_head): New static variable.
6585 (trampoline_buffer_tail): Ditto.
6586 (claim_trampoline_space): New function.
6587 (have_fast_tracepoint_trampoline_buffer): New function.
6588 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6589 structure.
6590 (install_fast_tracepoint): Ditto, also add error buffer argument.
6591 (cmd_qtminftpilen): New function.
6592 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6593 (fast_tracepoint_from_trampoline_address): New function.
6594 (fast_tracepoint_collecting): Handle trampoline as part of jump
6595 pad space.
6596 (set_trampoline_buffer_space): New function.
6597 (initialize_tracepoint): Initialize new IPA variables.
6598 * target.h (struct target_ops): Add arguments to
6599 install_fast_tracepoint_jump_pad operation, add new
6600 get_min_fast_tracepoint_insn_len operation.
6601 (target_get_min_fast_tracepoint_insn_len): New.
6602 (install_fast_tracepoint_jump_pad): Add arguments.
6603 * server.h (IPA_BUFSIZ): Define.
6604 * linux-i386-ipa.c: Include extra header files.
6605 (initialize_fast_tracepoint_trampoline_buffer): New function.
6606 (initialize_low_tracepoint): Call it.
6607 * server.h (set_trampoline_buffer_space): Declare.
6608 (claim_trampoline_space): Ditto.
6609 (have_fast_tracepoint_trampoline_buffer): Ditto.
6610
1e4d1764
YQ
66112011-11-14 Yao Qi <yao@codesourcery.com>
6612
6613 * server.c (handle_query): Handle InstallInTrace for qSupported.
6614 * tracepoint.c (add_tracepoint): Sort list.
6615 (install_tracepoint, download_tracepoint): New.
6616 (cmd_qtdp): Call them to install and download tracepoints.
6617 (sort_tracepoints): Removed.
6618 (cmd_qtstart): Update.
6619
5c73ff4e
YQ
66202011-11-14 Yao Qi <yao@codesourcery.com>
6621
6622 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6623 * mem-break.h: Declare.
6624 * tracepoint.c (cmd_qtstart): Move some code to ...
6625 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6626 New.
6627 (download_tracepoints): Move some code to ...
6628 (download_tracepoint_1): ... here. New.
6629
86a30030
YQ
66302011-11-08 Yao Qi <yao@codesourcery.com>
6631
6632 * remote-utils.c (relocate_instruction): A comment fix.
6633
8d26e50c
JB
66342011-11-07 Joel Brobecker <brobecker@adacore.com>
6635
6636 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6637 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6638 dr_status_mirror and dr_control_mirror from debug_reg_state.
6639 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6640 (i386_initial_stuff): Remove use of deleted globals.
6641 (i386_get_thread_context, i386_set_thread_context,
6642 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6643 from debug_reg_state.
6644
a59306a3
YQ
66452011-11-05 Yao Qi <yao@codesourcery.com>
6646
6647 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6648 address as TPOINT's.
6649
3065dfb6
SS
66502011-11-02 Stan Shebs <stan@codesourcery.com>
6651
6652 * tracepoint.c (agent_mem_read_string): New function.
6653 (eval_agent_expr): Call it for tracenz.
6654 * server.c (handle_query): Report support for tracenz.
6655
fd0d8c7c
YQ
66562011-11-02 Yao Qi <yao@codesourcery.com>
6657
6658 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6659
609086b1
YQ
66602011-11-02 Yao Qi <yao@codesourcery.com>
6661
6662 * target.h: Fix a typo in comment.
6663
b9fd1791
PA
66642011-10-31 Pedro Alves <pedro@codesourcery.com>
6665
6666 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6667 clobber the breakpoints' shadows with fast tracepoint jumps.
6668 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6669 * target.c (write_inferior_memory): Also pass MYADDR down to
6670 check_mem_write.
6671
03583c20
UW
66722011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6673
6674 * configure.ac: Check support for personality routine.
6675 * configure: Regenerate.
6676 * config.in: Likewise.
6677 * linux-low.c: Include <sys/personality.h>.
6678 Define ADDR_NO_RANDOMIZE if necessary.
6679 (linux_create_inferior): Disable address space randomization when
6680 forking inferior, if requested.
6681 (linux_supports_disable_randomization): New function.
6682 (linux_target_ops): Install it.
6683 * server.h (disable_randomization): Declare.
6684 * server.c (disable_randomization): New global variable.
6685 (handle_general_set): Handle QDisableRandomization.
6686 (handle_query): Likewise for qSupported.
6687 (main): Support --disable-randomization and --no-disable-randomization
6688 command line arguments.
6689 * target.h (struct target_ops): Add supports_disable_randomization.
6690 (target_supports_disable_randomization): New macro.
6691
723b724b
MF
66922011-09-29 Mike Frysinger <vapier@gentoo.org>
6693
6694 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6695 ifdef check.
6696 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6697 [!PT_GETDSBT] (target_loadmap): New definition.
6698 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6699 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6700 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6701 and PT_GETDSBT to LINUX_LOADMAP.
6702 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6703 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6704
55329a5c 67052011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
6706
6707 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6708 (arm_linux_hwbp_cap): New static variable.
6709 (arm_linux_get_hwbp_cap): Replace by ...
6710 (arm_linux_init_hwbp_cap): ... this new function.
6711 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6712 (arm_linux_get_hw_watchpoint_count): Likewise.
6713 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6714 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6715 (arm_prepare_to_resume): Use perror_with_name instead of error.
6716
55329a5c 67172011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
6718
6719 * linux-arm-low.c: Include <signal.h>.
6720 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6721 (struct arm_linux_hwbp_cap): New data type.
6722 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6723 (struct arm_linux_hw_breakpoint): New data type.
6724 (MAX_BPTS, MAX_WPTS): Define.
6725 (struct arch_process_info, struct arch_lwp_info): New data types.
6726 (arm_linux_get_hwbp_cap): New function.
6727 (arm_linux_get_hw_breakpoint_count): Likewise.
6728 (arm_linux_get_hw_watchpoint_count): Likewise.
6729 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6730 (arm_hwbp_control_initialize): Likewise.
6731 (arm_hwbp_control_is_enabled): Likewise.
6732 (arm_hwbp_control_is_initialized): Likewise.
6733 (arm_hwbp_control_disable): Likewise.
6734 (arm_linux_hw_breakpoint_equal): Likewise.
6735 (arm_linux_hw_point_initialize): Likewise.
6736 (struct update_registers_data): New data structure.
6737 (update_registers_callback: New function.
6738 (arm_insert_point): Likewise.
6739 (arm_remove_point): Likewise.
6740 (arm_stopped_by_watchpoint): Likewise.
6741 (arm_stopped_data_address): Likewise.
6742 (arm_new_process): Likewise.
6743 (arm_new_thread): Likewise.
6744 (arm_prepare_to_resume): Likewise.
6745 (the_low_target): Register arm_insert_point, arm_remove_point,
6746 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6747 arm_new_thread, and arm_prepare_to_resume.
6748
6b9801d4
SS
67492011-09-15 Stan Shebs <stan@codesourcery.com>
6750
6751 * server.h (struct emit_ops): Add compare-goto fields.
6752 * tracepoint.c (gdb_agent_op_sizes): New table.
6753 (emit_eq_goto): New function.
6754 (emit_ne_goto): New function.
6755 (emit_lt_goto): New function.
6756 (emit_le_goto): New function.
6757 (emit_gt_goto): New function.
6758 (emit_ge_goto): New function.
6759 (is_goto_target): New function.
6760 (compile_bytecodes): Recognize special cases of compare-goto
6761 combinations and call specialized emitters for them.
6762 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6763 (amd64_emit_ne_goto): New function.
6764 (amd64_emit_lt_goto): New function.
6765 (amd64_emit_le_goto): New function.
6766 (amd64_emit_gt_goto): New function.
6767 (amd64_emit_ge_goto): New function.
6768 (amd64_emit_ops): Add the new functions.
6769 (i386_emit_eq_goto): New function.
6770 (i386_emit_ne_goto): New function.
6771 (i386_emit_lt_goto): New function.
6772 (i386_emit_le_goto): New function.
6773 (i386_emit_gt_goto): New function.
6774 (i386_emit_ge_goto): New function.
6775 (i386_emit_ops): Add the new functions.
6776
bf15cbda
SS
67772011-09-08 Stan Shebs <stan@codesourcery.com>
6778
6779 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6780 (i386_emit_epilogue): Restore %ebx.
6781
943ca1dd
JZ
67822011-08-31 Jie Zhang <jzhang918@gmail.com>
6783
6784 * server.c (step_thread): Remove definition.
6785 (process_serial_event): Don't handle Hs.
6786 * server.h (step_thread): Remove declaration.
6787 * target.c (set_desired_inferior): Remove use of step_thread.
6788
e3deef73
LM
67892011-08-24 Luis Machado <lgustavo@codesourcery.com>
6790
6791 * linux-low.c: Include linux-procfs.h.
6792 (linux_attach_lwp_1): Update comments.
6793 (linux_attach): Scan for existing threads when attaching to a
6794 process that is the tgid.
6795 * Makefile.in: Update dependencies.
6796
13da1c97
LM
67972011-08-24 Luis Machado <lgustavo@codesourcery.com>
6798
6799 * configure.srv: Add linux-procfs.o dependencies.
6800
881127c9
YQ
68012011-08-14 Yao Qi <yao@codesourcery.com>
6802
6803 * target.h (struct target_ops): Fix indent.
6804 * win32-low.c (win32_target_ops): Fix comment.
6805
58dbd541
YQ
68062011-08-14 Andrew Jenner <andrew@codesourcery.com>
6807 Yao Qi <yao@codesourcery.com>
6808
6809 * Makefile.in (clean): Remove tic6x-*.c files.
6810 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6811 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6812 (tic6x-c64xp-linux.c): Likewise.
6813 * configure.srv: Add support for tic6x-*-uclinux.
6814 * linux-tic6x-low.c: New.
6815 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6816
78d85199
YQ
68172011-08-14 Andrew Stubbs <ams@codesourcery.com>
6818 Yao Qi <yao@codesourcery.com>
6819
6820 * target.h (struct target_ops): Add read_loadmap.
6821 * linux-low.c (struct target_loadseg): New type.
6822 (struct target_loadmap): New type.
6823 (linux_read_loadmap): New function.
6824 (linux_target_ops): Add linux_read_loadmap.
6825 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
6826 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6827 to NULL.
78d85199 6828
a959a88d
EZ
68292011-08-05 Eli Zaretskii <eliz@gnu.org>
6830
6831 * win32-low.c: Include <stdint.h>.
6832
1ced966e
PA
68332011-07-22 Pedro Alves <pedro@codesourcery.com>
6834
6835 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6836 to the inferior here.
6837 (i386_remove_aligned_watchpoint): Ditto.
6838 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6839 fit part of the watchpoint in the debug registers.
6840 (i386_update_inferior_debug_regs): New.
6841 (i386_low_insert_watchpoint): Work on a local mirror of the debug
6842 registers, and only update the inferior on success.
6843 (i386_low_remove_watchpoint): Ditto.
6844
d26e3629
KY
68452011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6846
6847 * linux-low.c (compare_ints, unique, list_threads, show_process,
6848 linux_core_of_thread): Delete.
6849 (linux_target_ops): Change linux_core_of_thread to
6850 linux_common_core_of_thread.
6851 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6852 * utils.c (malloc_failure): Change type of argument.
6853 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6854 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6855 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6856 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6857 (IPA_OBJS): Add common-utils-ipa.o.
6858 (ptid_h, linux_osdata_h): New macros.
6859 (server_h): Add common/common-utils.h, common/xml-utils.h,
6860 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6861 common/ptid.h.
6862 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6863 ptid.o, buffer.o): New rules.
6864 (linux-low.o): Add common/linux-osdata.h as a dependency.
6865 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6866 * configure.ac: Add AC_HEADER_DIRENT check.
6867 * config.in: Regenerate.
6868 * configure: Regenerate.
6869 * remote-utils.c (xml_escape_text): Delete.
6870 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6871 buffer_xml_printf): Move to common/buffer.c.
6872 * server.c (main): Remove call to initialize_inferiors.
6873 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6874 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6875 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6876 internal_error, gdb_assert, gdb_assert_fail): Delete.
6877 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6878 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6879 common/buffer.h.
6880 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6881 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6882 initialize_inferiors): Delete.
6883
2275a1a7
PA
68842011-07-20 Pedro Alves <pedro@codesourcery.com>
6885
6886 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6887 symbol error.
6888
0a5b1e09
PA
68892011-05-31 Pedro Alves <pedro@codesourcery.com>
6890
6891 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6892 assertion.
6893 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6894
6938fd34
YQ
68952011-05-26 Yao Qi <yao@codesourcery.com>
6896
6897 * Makefile.in (thread-db.o): Track dependence to
6898 common/gdb_thread_db.h.
6899 * thread-db.c: include gdb_thread_db.h from right place.
6900
b481f9e0
TT
69012011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6902
6903 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6904 __FILE__ and __LINE__ to internal_error.
6905
98a5dd13
DE
69062011-05-13 Doug Evans <dje@google.com>
6907
6908 * thread-db.c (try_thread_db_load_from_sdir): New function.
6909 (try_thread_db_load_from_dir): New function.
6910 (thread_db_load_search): Handle $sdir, ignore $pdir.
6911 Remove trying of system directories if search of
6912 libthread-db-search-path fails, that is now done via $sdir.
6913
d248b706
KY
69142011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6915
6916 * server.c (handle_query): Add EnableDisableTracepoints to the list
6917 of supported features.
43aaf8b6 6918 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 6919 tracepoints.
43aaf8b6
PA
6920 (cmd_qtenable_disable): New.
6921 (cmd_qtstart): Install tracepoints even if disabled.
6922 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6923 receiving a QTEnable or QTDisable packet.
6924 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6925 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6926 tracepoints.
6927 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 6928
84e578fb
DE
69292011-05-10 Doug Evans <dje@google.com>
6930
6931 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6932
71f55dd8
DE
69332011-05-04 Doug Evans <dje@google.com>
6934
6935 * linux-low.c (linux_join): Skip process lookup.
6936 * spu-low.c (spu_join): Ditto.
6937 * server.c (join_inferiors_callback): Delete.
6938 (process_serial_event): For 'D' packet (detach) call join_inferior
6939 directly.
6940
4d393d60
JM
69412011-05-04 Joseph Myers <joseph@codesourcery.com>
6942
6943 * README: Don't mention xscale*-*-linux*.
6944 * configure.srv (xscale*-*-linux*): Don't handle target.
6945
b00ad6ff
NF
69462011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6947
6948 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6949 casting pointers.
6950 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6951 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6952 (i386_emit_void_call_2): Likewise.
6953
af96c192
YQ
69542011-04-26 Yao Qi <yao@codesourcery.com>
6955
43aaf8b6
PA
6956 * linux-low.c: Move common macros to linux-ptrace.h.
6957 Include linux-ptrace.h.
af96c192
YQ
6958 * Makefile.in (linux_ptrace_h): New.
6959 (linux-low.o): Depends on linux-ptrace.h.
6960
03f2bd59
JK
69612011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6962
6963 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6964 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6965 (remote_prepare): New function with most of the TCP code from ...
6966 (remote_open): ... here. Detect PORT here unconditionally. Move also
6967 setting transport_is_reliable.
6968 * server.c (run_once): New variable.
6969 (gdbserver_usage): Document it.
6970 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6971 the first run if RUN_ONCE.
6972 * server.h (run_once, remote_prepare): New declarations.
6973
7a9dd1b2
TT
69742011-04-19 Tom Tromey <tromey@redhat.com>
6975
6976 * win32-low.c (handle_load_dll): Remove duplicate "the".
6977
81239425
PM
69782011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6979
6980 Remove support for old Cygwin 1.5 versions.
6981 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6982 function to avoid warning.
6983 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6984 warning.
6985
9e0627f1
PM
69862011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6987
6988 * gdbserver/server.h (Macro _): Define it if not available.
6989
588eebee
MS
69902011-03-14 Michael Snyder <msnyder@vmware.com>
6991
348af9f7 6992 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 6993
43f70d4c
JB
69942011-03-10 Joel Brobecker <brobecker@adacore.com>
6995
6996 * Makefile.in (maintainer-clean realclean distclean): Remove
6997 "make ... subdir_do" command.
6998
348af9f7
MS
69992011-03-10 Michael Snyder <msnyder@vmware.com>
7000
7001 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7002
7003 * server.c (handle_v_run): Free alloced buffer on early return.
7004
e637a4f5
YQ
70052011-03-09 Yao Qi <yao@codesourcery.com>
7006
7007 Revert:
7008 2011-03-04 Yao Qi <yao@codesourcery.com>
7009
7010 * Makefile.in: Remove GNU make feature --directory.
7011
7012 2011-03-05 Yao Qi <yao@codesourcery.com>
7013
7014 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7015 (subdir_do): New make target. Copied from gdb/Makefile.
7016 (maintainer-clean, realclean, distclean, clean): Call corresponding
7017 make targets in common/Makefile.
7018
7019 2011-02-11 Yao Qi <yao@codesourcery.com>
7020
7021 * configure.ac: Call AC_PROG_RANLIB.
7022 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7023 * configure: Regenerate.
7024
e6edda56
JK
70252011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7026
7027 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7028
e5141119
JB
70292011-03-06 Yao Qi <yao@codesourcery.com>
7030
7031 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7032
64794aa4
JB
70332011-03-05 Yao Qi <yao@codesourcery.com>
7034
7035 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7036 (subdir_do): New make target. Copied from gdb/Makefile.
7037 (maintainer-clean, realclean, distclean, clean): Call corresponding
7038 make targets in common/Makefile.
7039
7a762829
YQ
70402011-03-04 Yao Qi <yao@codesourcery.com>
7041
7042 * Makefile.in: Remove GNU make feature --directory.
7043
348af9f7
MS
70442011-03-04 Michael Snyder <msnyder@vmware.com>
7045
7046 * server.c (queue_stop_reply): Call xmalloc not malloc.
7047
70482011-03-02 Michael Snyder <msnyder@vmware.com>
7049
7050 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7051
9f72fee2
MS
70522011-02-28 Michael Snyder <msnyder@vmware.com>
7053
588eebee
MS
7054 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7055 (cmd_qtframe): Ditto.
7056 (cmd_qtbuffer): Ditto.
7057 (cmd_bigqtbuffer): Ditto.
7058
9f72fee2
MS
7059 * utils.c (decimal2str): Initialize 'width' to nine, then
7060 don't mess with it.
7061
8040bd49
UW
70622011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7063
7064 * hostio.c (require_data): Free *data, not data.
7065
7e52cbd0
JK
70662011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7067
7068 * hostio.c (require_data): Use free, not xfree.
7069
9130f83e
MS
70702011-02-27 Michael Snyder <msnyder@vmware.com>
7071
4b812f4e
MS
7072 * server.c (handle_query): Discard unused value.
7073
9130f83e
MS
7074 * hostio.c (require_data): Free malloc memory before returning
7075 error.
7076
69d37113
MS
70772011-02-26 Michael Snyder <msnyder@vmware.com>
7078
7079 * linux-low.c (list_threads): Call closedir for dirent.
7080
35f5825a
MS
70812011-02-27 Michael Snyder <msnyder@vmware.com>
7082
2a589cef
MS
7083 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7084 a case statement falls through.
7085
0adea5f7
MS
7086 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7087
35f5825a
MS
7088 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7089 in comparison.
7090
238f1c74
MS
70912011-02-26 Michael Snyder <msnyder@vmware.com>
7092
7093 * utils.c (decimal2str): Eliminate dead code and dead param.
7094 (pulongest): Drop dead param from call to decimal2str.
7095 (plongest): Ditto.
7096
633ff500
JB
70972011-02-24 Joel Brobecker <brobecker@adacore.com>
7098
7099 Revert the following patch (not approved yet):
7100 2011-02-21 Hui Zhu <teawater@gmail.com>
7101 * tracepoint.c (tp_printf): New function.
7102 (eval_agent_expr): Handle gdb_agent_op_printf.
7103
f9c6ff72
HZ
71042011-02-21 Hui Zhu <teawater@gmail.com>
7105
7106 * tracepoint.c (tp_printf): New function.
7107 (eval_agent_expr): Handle gdb_agent_op_printf.
7108
94d5e490
TT
71092011-02-18 Tom Tromey <tromey@redhat.com>
7110
7111 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7112 (tracepoint.o): Likewise.
7113 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7114 (gdb_agent_op_names): Likewise.
7115
c7f96d2b
TT
71162011-02-18 Tom Tromey <tromey@redhat.com>
7117
7118 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7119 gdb_agent_op_rot>: New constants.
7120 (gdb_agent_op_names): Add pick and roll.
7121 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7122 cases.
7123
0feedb2c
JK
71242011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7125
7126 * aclocal.m4: Regenerated with aclocal-1.11.1.
7127
b3b9301e
PA
71282011-02-14 Pedro Alves <pedro@codesourcery.com>
7129
7130 * server.c (handle_qxfer_traceframe_info): New.
7131 (qxfer_packets): Register "traceframe-info".
7132 (handle_query): Report support for qXfer:traceframe-info:read+.
7133 * tracepoint.c (match_blocktype): New.
7134 (traceframe_find_block_type): Rename to ...
7135 (traceframe_walk_blocks): ... this. Add callback filter argument,
7136 and use it.
7137 (traceframe_find_block_type): New, reimplemented on top of
7138 traceframe_walk_blocks.
7139 (build_traceframe_info_xml): New.
7140 (traceframe_read_info): New.
7141 * server.h (traceframe_read_info): Declare.
7142
4f3e6fb7
YQ
71432011-02-11 Yao Qi <yao@codesourcery.com>
7144
7145 * configure.ac: Call AC_PROG_RANLIB.
7146 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7147 * configure: Regenerate.
7148
764880b7
PA
71492011-02-07 Pedro Alves <pedro@codesourcery.com>
7150
7151 * server.c (gdb_read_memory): Change return semantics to allow
7152 partial transfers.
7153 (handle_search_memory_1): Adjust.
7154 (process_serial_event) <'m' packet>: Handle partial transfers.
7155 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7156
1c79eb8a
PA
71572011-01-28 Pedro Alves <pedro@codesourcery.com>
7158
7159 * regcache.c (init_register_cache): Initialize
7160 regcache->register_status.
7161 (free_register_cache): Release regcache->register_status.
7162 (regcache_cpy): Copy register_status.
7163 (registers_to_string): Print 'x's for unavailable registers.
7164 (supply_register): Mark the register's status valid or
7165 unavailable, depending on whether a buffer was passed in or not.
7166 (supply_register_zeroed): New.
7167 (supply_regblock): Mark the registers' status valid or
7168 unavailable, depending on whether a buffer was passed in or not.
7169 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7170 (struct regcache): New `register_status' field.
7171 (supply_register_zeroed): Declare.
7172 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7173 supply_register_zeroed, rather than passing a NULL buffer to
7174 supply_register.
7175 * tracepoint.c (fetch_traceframe_registers): Update comment.
7176
85724a0e
PA
71772011-01-28 Pedro Alves <pedro@codesourcery.com>
7178
7179 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7180 buffer explicit.
7181
d08aafef
PA
71822011-01-25 Pedro Alves <pedro@codesourcery.com>
7183
7184 * server.h (decode_xfer_write): Change prototype.
7185 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7186 and don't extract the annex here.
7187 * server.c (decode_xfer_read): Remove `annex' parameter,
7188 and don't extract the annex here.
7189 (decode_xfer): New.
7190 (struct qxfer): New.
7191 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7192 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7193 (handle_qxfer_statictrace): New functions, abstracted out from
7194 handle_query, and made to use the struct qxfer interface.
7195 (handle_threads_qxfer_proper): Rename to ...
7196 (handle_qxfer_threads_proper): ... this.
7197 (handle_threads_qxfer): Rename to ...
7198 (handle_qxfer_threads): ... this. Adjust.
7199 (qxfer_packets): New array.
7200 (handle_qxfer): New function.
7201 (handle_query): Use handle_qxfer.
7202
493e2a69
MS
72032011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7204
7205 * gdbreplay.c: Shorten lines of >= 80 columns.
7206 * linux-low.c: Ditto.
7207 * linux-ppc-low.c: Ditto.
7208 * linux-s390-low.c: Ditto.
7209 * linux-sparc-low.c: Ditto.
7210 * linux-x86-low.c: Ditto.
7211 * linux-xtensa-low.c: Ditto.
7212 * mem-break.c: Ditto.
7213 * nto-low.c: Ditto.
7214 * regcache.h: Ditto.
7215 * remote-utils.c: Ditto.
7216 * server.c: Ditto.
7217 * server.h: Ditto.
7218 * thread-db.c: Ditto.
7219 * tracepoint.c: Ditto.
7220 * utils.c: Ditto.
7221 * win32-low.h: Ditto.
7222
44944448
JB
72232011-01-05 Joel Brobecker <brobecker@adacore.com>
7224
7225 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7226 update.
7227
71ce852c
JB
72282011-01-01 Joel Brobecker <brobecker@adacore.com>
7229
7230 * server.c (gdbserver_version): Update copyright year in version
7231 output.
7232 * gdbreplay.c (gdbreplay_version): Ditto.
7233
eb826dc6
MF
72342010-12-29 Jie Zhang <jie.zhang@analog.com>
7235
7236 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7237 * linux-bfin-low.c: New file.
7238 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7239 PT_DATA_ADDR for BFIN targets.
7240 * Makefile.in (SFILES): Add linux-bfin-low.c.
7241 (clean): Remove reg-bfin.c.
7242 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7243 * README: Mention supported Blackfin targets.
7244
39ab222a
MF
72452010-12-23 Mike Frysinger <vapier@gentoo.org>
7246
7247 * .gitignore: New file.
7248
a1f2ce7d
MF
72492010-11-16 Mike Frysinger <vapier@gentoo.org>
7250
7251 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7252
f474844c
JZ
72532010-10-22 Jie Zhang <jie@codesourcery.com>
7254
7255 * Makefile.in: Add FLAGS_TO_PASS variable.
7256 (install): Remove dependency of install-only and recursively
7257 invoke make for install-only.
7258
f1048712
DE
72592010-10-04 Doug Evans <dje@google.com>
7260
7261 * Makefile.in (uninstall): Use $(DESTDIR).
7262
b53a1623
PA
72632010-09-24 Pedro Alves <pedro@codesourcery.com>
7264
e6ee044d
PA
7265 PR gdb/11842
7266
b53a1623
PA
7267 * linux-x86-low.c (compat_siginfo_from_siginfo)
7268 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7269 si_code is < 0. Check for si_code == SI_TIMER before checking for
7270 si_code < 0.
7271
fa1bd1e4
JB
72722010-09-13 Joel Brobecker <brobecker@adacore.com>
7273
7274 * lynx-i386-low.c: New file.
7275 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7276
47fac8f8
JB
72772010-09-13 Joel Brobecker <brobecker@adacore.com>
7278
7279 * lynx-low.c (ptrace_request_to_str): Remove handling for
7280 request values that have been removed in LynxOS 5.x.
7281
1adfc54d
JB
72822010-09-13 Joel Brobecker <brobecker@adacore.com>
7283
7284 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7285 <ptrace.h>
7286
c2a66c29
NS
72872010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7288
7289 * configure.ac: Add --enable-inprocess-agent option.
7290 * configure: Rebuilt.
7291
32fcada3
YQ
72922010-09-06 Yao Qi <yao@codesourcery.com>
7293
7294 * linux-low.c (linux_kill): Remove unused variable.
7295 (linux_stabilize_threads): Likewise.
7296 * server.c (start_inferior): Likewise.
7297 (queue_stop_reply_callback): Likewise.
7298 * tracepoint.c (do_action_at_tracepoint): Likewise.
7299
0cccb683
YQ
73002010-09-06 Yao Qi <yao@codesourcery.com>
7301
7302 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7303 on return.
7304
423ec54c
JK
73052010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7306
7307 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7308
12ac6819
PA
73092010-09-06 Pedro Alves <pedro@codesourcery.com>
7310
7311 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7312 "$(IPA_DEPFILES)".
7313
8ed54b31
JB
73142010-09-01 Joel Brobecker <brobecker@adacore.com>
7315
7316 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7317 gdbserver/lynx-ppc-low.c: New files.
7318 * Makefile.in (lynx_low_h): New variable.
7319 (lynx-low.o, lynx-ppc-low.o): New rules.
7320 * configure.ac: On LynxOS, link with -lnetinet.
7321 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7322 * configure: regenerate.
7323
bb0116a4
JB
73242010-09-01 Joel Brobecker <brobecker@adacore.com>
7325
7326 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7327 * configure.ac: Add check for vasprintf and vsnprintf.
7328 * configure, config.in: Regenerate.
7329 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7330
a778ab81 73312010-09-01 Joel Brobecker <brobecker@adacore.com>
7332
7333 * gdbreplay.c: Move include of alloca.h up, next to include of
7334 malloc.h.
7335 * server.h: Add include of malloc.h.
7336 * mem-break.c: Remove include of malloc.h.
7337 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7338
8b034a19 73392010-09-01 Joel Brobecker <brobecker@adacore.com>
7340
7341 * Makefile.in (memmem.o): Build with -Wno-error.
7342
73432010-09-01 Joel Brobecker <brobecker@adacore.com>
7344
7345 * utils.c (xsnprintf): Make non-static.
7346 * server.h: Add xsnprintf declaration.
7347 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7348 replace calls to snprintf by calls to xsnprintf throughout.
7349
73502010-09-01 Joel Brobecker <brobecker@adacore.com>
7351
7352 * configure.ac: Add configure check for alloca.
7353 * configure, config.in: Regenerate.
7354 * server.h: Include alloca.h if it exists.
7355 * gdbreplay.c: Include alloca.h if it exists.
7356
1a981360
PA
73572010-08-28 Pedro Alves <pedro@codesourcery.com>
7358
7359 * linux-low.c (__SIGRTMIN): Define if not already defined.
7360 (linux_create_inferior): Check for __ANDROID__ rather than
7361 __SIGRTMIN.
7362 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7363 are already deferred.
7364 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7365 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7366 stopped and already has a pending signal to report.
7367 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7368 a pending signal to report or is moving out of a jump pad.
7369 (linux_init_signals): Check for __ANDROID__ rather than
7370 __SIGRTMIN.
7371
b4d51a55
PA
73722010-08-28 Pedro Alves <pedro@codesourcery.com>
7373
7374 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7375 debug_threads check. Avoid a linear search when not doing debug
7376 output.
7377
ec48365d
PA
73782010-08-27 Pedro Alves <pedro@codesourcery.com>
7379
7380 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7381 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7382 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7383 (process_event): Change local fd's type to gdb_fildes_t.
7384 (create_file_handler): Adjust prototype.
7385 (delete_file_handler): Adjust prototype.
7386 (handle_file_event): Adjust prototype. Use pfildes.
7387 (create_file_event): Adjsut prototype.
7388 * remote-utils.c (remote_desc, listen_desc): Change type to
7389 gdb_fildes_t.
7390 * server.h: New gdb_fildes_t typedef.
7391 [USE_WIN32API]: Include winsock2.h.
7392 (delete_file_handler, add_file_handler): Adjust prototypes.
7393 (pfildes): Declare.
7394 * utils.c (pfildes): New.
7395
854d88f0
PA
73962010-08-27 Pedro Alves <pedro@codesourcery.com>
7397
7398 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7399 * configure: Regenerate.
7400
0146f85b
PA
74012010-08-27 Pedro Alves <pedro@codesourcery.com>
7402
7403 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7404 (linux_done_accessing_memory): ... this.
7405 (linux_target_ops): Adjust.
7406 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7407 * nto-low.c (nto_target_ops): Adjust comment.
7408 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7409 * spu-low.c (spu_target_ops): Adjust comment.
7410 * target.h (target_ops): Rename unprepare_to_access_memory field
7411 to done_accessing_memory.
7412 (unprepare_to_access_memory): Rename to ...
7413 (done_accessing_memory): ... this.
7414
90d74c30
PA
74152010-08-26 Pedro Alves <pedro@codesourcery.com>
7416
7417 * linux-low.c (linux_prepare_to_access_memory): New.
7418 (linux_unprepare_to_access_memory): New.
7419 (linux_target_ops): Install them.
7420 * server.c (read_memory): Rename to ...
7421 (gdb_read_memory): ... this. Use
7422 prepare_to_access_memory/prepare_to_access_memory.
7423 (write_memory): Rename to ...
7424 (gdb_write_memory): ... this. Use
7425 prepare_to_access_memory/prepare_to_access_memory.
7426 (handle_search_memory_1): Adjust.
7427 (process_serial_event): Adjust.
7428 * target.h (struct target_ops): New fields
7429 prepare_to_access_memory and unprepare_to_access_memory.
7430 (prepare_to_access_memory, unprepare_to_access_memory): New.
7431 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7432 prepare_to_access_memory/prepare_to_access_memory.
7433 * nto-low.c (nto_target_ops): Adjust.
7434 * spu-low.c (spu_target_ops): Adjust.
7435 * win32-low.c (win32_target_ops): Adjust.
7436
fd467969
PA
74372010-08-26 Pedro Alves <pedro@codesourcery.com>
7438
7439 * Makefile.in (WARN_CFLAGS): Get it from configure.
7440 (WERROR_CFLAGS): New.
7441 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7442 * configure.ac: Introduce --enable-werror, which adds -Werror to
7443 the compiler command line. Enabled by default. Disable with
7444 --disable-werror. Add -Wdeclaration-after-statement
7445 Wpointer-arith and -Wformat-nonliteral to warning flags.
7446 * configure: Regenerate.
7447
331e2f5f
PA
74482010-08-26 Pedro Alves <pedro@codesourcery.com>
7449
7450 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7451
e581f2b4
PA
74522010-08-26 Pedro Alves <pedro@codesourcery.com>
7453
7454 * gdbreplay.c (remote_error): New.
7455 (gdbchar): New.
7456 (expect): Use gdbchar. Check for error reading from GDB.
7457 Clarify sync error output.
7458 (play): Check for errors writing to GDB.
7459 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7460 * remote-utils.c (getpkt): Check for errors writing to the remote
7461 descriptor.
7462
3c11dd79
PA
74632010-08-25 Pedro Alves <pedro@codesourcery.com>
7464
7465 * linux-low.c (linux_wait_1): Move non-debugging code out of
7466 `debug_threads' control.
7467
d20a8ad9
PA
74682010-08-25 Pedro Alves <pedro@codesourcery.com>
7469
7470 * linux-low.c (linux_wait_1): Don't set last_status here.
7471 * server.c (push_event, queue_stop_reply_callback): Assert we're
7472 not pushing a TARGET_WAITKIND_IGNORE event.
7473 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7474 (myresume, handle_target_event): Set the thread's last_resume_kind
7475 and last_status from the target returned status.
7476
964e4306
PA
74772010-08-25 Pedro Alves <pedro@codesourcery.com>
7478
7479 PR threads/10729
7480
7481 * linux-x86-low.c (update_debug_registers_callback): New.
7482 (i386_dr_low_set_addr): Use it.
7483 (i386_dr_low_get_addr): New.
7484 (i386_dr_low_set_control): Use update_debug_registers_callback.
7485 (i386_dr_low_get_control): New.
7486 (i386_dr_low_get_status): Adjust.
7487 * linux-low.c (linux_stop_lwp): New.
7488 * linux-low.h (linux_stop_lwp): Declare.
7489
7490 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7491 argument instead of a i386_debug_reg_state.
7492 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7493 a i386_debug_reg_state.
7494 (i386_insert_aligned_watchpoint): Adjust.
7495 (i386_remove_aligned_watchpoint): Adjust.
7496 (i386_low_stopped_data_address): Read the debug registers from the
7497 inferior instead of from the mirrors.
7498 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7499 (i386_dr_low_get_addr): Declare.
7500 (i386_dr_low_get_control): Declare.
7501 (i386_dr_low_get_status): Change prototype.
7502
7503 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7504 (i386_dr_low_get_addr): New.
7505 (i386_dr_low_get_control): New.
7506 (i386_dr_low_get_status): Adjust prototype. Return
7507 dr_status_mirror.
7508 (i386_initial_stuff): Clear dr_status_mirror and
7509 dr_control_mirror.
7510 (i386_get_thread_context): Adjust.
7511 (i386_set_thread_context): Adjust.
7512 (i386_thread_added): Adjust.
7513
5f21a75b
PA
75142010-08-24 Pedro Alves <pedro@codesourcery.com>
7515
7516 * linux-low.h (linux_thread_area): Delete declaration.
7517
3e4c1235
TS
75182010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7519
7520 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7521 after its termination.
7522
1971b033
PA
75232010-08-09 Pedro Alves <pedro@codesourcery.com>
7524
7525 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7526 (gdb_wants_all_stopped): Delete.
7527 (linux_wait_1): Don't call them.
7528 * server.c (handle_v_cont): Tag all threads as want-stopped.
7529 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7530 stopped as "client-wants-stopped".
7531
310444ac
PA
75322010-07-31 Pedro Alves <pedro@codesourcery.com>
7533
7534 * Makefile.in (signals_h): New.
7535 (server_h): Depend on it.
7536 (server.o): Don't depend on $(signals_def).
7537 (signals.o): Depend on $(signals_def).
7538
a19cae16
JK
75392010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7540
7541 * Makefile.in (signals_def): New.
7542 (server_h): Append include/gdb/signals.h and signals_def.
7543 (server.o): Append signals_def.
7544
30d50328
JK
75452010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7546
7547 * server.c (handle_target_event): Use target_signal_to_host for
7548 resume_info.sig initialization.
7549 * target.h (struct thread_resume) <sig>: New comment.
7550
5c3216e2
OS
75512010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7552
c6f46ca0
OS
7553 * server.c (handle_query): strcpy() the returned string from paddress()
7554 instead of sprintf().
5c3216e2
OS
7555 * utils.c (paddress): Return phex_nz().
7556
6bd31874
JB
75572010-07-07 Joel Brobecker <brobecker@adacore.com>
7558
7559 * server.c (handle_v_cont): Call mourn_inferior if process
7560 just exited.
7561 (myresume): Likewise.
7562
0fb4aa4b
PA
75632010-07-01 Pedro Alves <pedro@codesourcery.com>
7564
7565 Static tracepoints, and integration with UST.
7566
7567 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7568 * mem-break.c (uninsert_all_breakpoints)
7569 (reinsert_all_breakpoints): New.
7570 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7571 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7572 (gdb_agent_ust_loaded, helper_thread_id)
7573 (gdb_agent_helper_thread_id): New macros.
7574 (struct ipa_sym_addresses): Add addr_ust_loaded,
7575 addr_helper_thread_id, addr_cmd_buf.
7576 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7577 (in_process_agent_loaded_ust): New.
7578 (write_e_ust_not_loaded): New.
7579 (maybe_write_ipa_ust_not_loaded): New.
7580 (struct collect_static_trace_data_action): New.
7581 (enum tracepoint_type) <static_tracepoint>: New.
7582 (struct tracepoint) <handle>: Mention static tracepoints.
7583 (struct static_tracepoint_ctx): New.
7584 (CMD_BUF_SIZE): New.
7585 (add_tracepoint_action): Handle static tracepoint actions.
7586 (unprobe_marker_at): New.
7587 (clear_installed_tracepoints): Handle static tracepoints.
7588 (cmd_qtdp): Handle static tracepoints.
7589 (probe_marker_at): New.
7590 (cmd_qtstart): Handle static tracepoints.
7591 (response_tracepoint): Handle static tracepoints.
7592 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7593 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7594 (get_context_regcache): Handle static tracepoints.
7595 (do_action_at_tracepoint): Handle static tracepoint actions.
7596 (traceframe_find_block_type): Handle static trace data blocks.
7597 (traceframe_read_sdata): New.
7598 (download_tracepoints): Download static tracepoint actions.
7599 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7600 (GDB_PROBE_NAME): New.
7601 (ust_ops): New.
7602 (GET_UST_SYM): New.
7603 (USTF): New.
7604 (dlsym_ust): New.
7605 (ust_marker_to_static_tracepoint): New.
7606 (gdb_probe): New.
7607 (collect_ust_data_at_tracepoint): New.
7608 (gdb_ust_probe): New.
7609 (UNIX_PATH_MAX, SOCK_DIR): New.
7610 (gdb_ust_connect_sync_socket): New.
7611 (resume_thread, stop_thread): New.
7612 (run_inferior_command): New.
7613 (init_named_socket): New.
7614 (gdb_ust_socket_init): New.
7615 (cstr_to_hexstr): New.
7616 (next_st): New.
7617 (first_marker, next_marker): New.
7618 (response_ust_marker): New.
7619 (cmd_qtfstm, cmd_qtsstm): New.
7620 (unprobe_marker_at, probe_marker_at): New.
7621 (cmd_qtstmat, gdb_ust_thread): New.
7622 (gdb_ust_init): New.
7623 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7624 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7625 (ST_REGENTRY): New.
7626 (x86_64_st_collect_regmap): New.
7627 (X86_64_NUM_ST_COLLECT_GREGS): New.
7628 (AMD64_RIP_REGNUM): New.
7629 (supply_static_tracepoint_registers): New.
7630 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7631 (ST_REGENTRY): New.
7632 (i386_st_collect_regmap): New.
7633 (i386_NUM_ST_COLLECT_GREGS): New.
7634 (supply_static_tracepoint_registers): New.
7635 * server.c (handle_query): Handle qXfer:statictrace:read.
7636 <qSupported>: Report support for StaticTracepoints, and
7637 qXfer:statictrace:read features.
7638 * server.h (traceframe_read_sdata)
7639 (supply_static_tracepoint_registers): Declare.
7640 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7641 (unpack_varlen_hex): Include in IPA build.
7642 * Makefile.in (ustlibs, ustinc): New.
7643 (IPA_OBJS): Add remote-utils-ipa.o.
7644 ($(IPA_LIB)): Link -ldl and -lpthread.
7645 (UST_CFLAGS): New.
7646 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7647 * config.in, configure: Regenerate.
7648
9e4344e5
PA
76492010-06-20 Ian Lance Taylor <iant@google.com>
7650 Pedro Alves <pedro@codesourcery.com>
7651
7652 * linux-x86-low.c (always_true): Delete.
7653 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7654 trying to fool the compiler with always_true.
7655
c6beb2cb
PA
76562010-06-20 Pedro Alves <pedro@codesourcery.com>
7657
7658 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7659 conditions in gdbserver.
7660
d2ed6730
UW
76612010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7662
7663 * spu-low.c (spu_read_memory): Wrap around local store limit.
7664 (spu_write_memory): Likewise.
7665
4e29fb54
PA
76662010-06-15 Pedro Alves <pedro@codesourcery.com>
7667
7668 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7669 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7670 LONGEST uses.
7671 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7672 uses.
7673 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7674 uses with LONGEST uses.
7675
6a271cae
PA
76762010-06-14 Stan Shebs <stan@codesourcery.com>
7677 Pedro Alves <pedro@codesourcery.com>
7678
7679 Bytecode compiler.
7680
7681 * linux-x86-low.c: Include limits.h.
7682 (add_insns): New.
7683 (always_true): New.
7684 (EMIT_ASM): New.
7685 (EMIT_ASM32): New.
7686 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7687 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7688 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7689 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7690 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7691 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7692 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7693 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7694 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7695 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7696 (amd64_emit_void_call_2): New.
7697 (amd64_emit_ops): New.
7698 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7699 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7700 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7701 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7702 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7703 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7704 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7705 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7706 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7707 (i386_emit_stack_adjust, i386_emit_int_call_1)
7708 (i386_emit_void_call_2): New.
7709 (i386_emit_ops): New.
7710 (x86_emit_ops): New.
7711 (the_low_target): Install x86_emit_ops.
7712 * server.h (struct emit_ops): New.
7713 (get_raw_reg_func_addr): Declare.
7714 (current_insn_ptr, emit_error): Declare.
7715 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7716 (set_trace_state_variable_value): New defines.
7717 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7718 addr_get_trace_state_variable_value and
7719 addr_set_trace_state_variable_value.
7720 (symbol_list): New fields for get_raw_reg,
7721 get_trace_state_variable_value and set_trace_state_variable_value.
7722 (condfn): New typedef.
7723 (struct tracepoint): New field `compiled_cond'.
7724 (do_action_at_tracepoint): Clear compiled_cond.
7725 (get_trace_state_variable_value, set_trace_state_variable_value):
7726 Export in the IPA.
7727 (condition_true_at_tracepoint): If there's a compiled condition,
7728 run that.
7729 (current_insn_ptr, emit_error): New globals.
7730 (struct bytecode_address): New.
7731 (get_raw_reg_func_addr): New.
7732 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7733 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7734 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7735 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7736 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7737 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7738 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7739 (compile_tracepoint_condition, compile_bytecodes): New.
7740 * target.h (emit_ops): Forward declare.
7741 (struct target_ops): New field emit_ops.
7742 (target_emit_ops): New.
7743 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7744 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7745 * linux-low.c (linux_emit_ops): New.
7746 (linux_target_ops): Install it.
7747 * linux-low.h (struct linux_target_ops): New field emit_ops.
7748
92b72907
UW
77492010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7750
7751 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7752 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7753
fa593d66
PA
77542010-06-01 Pedro Alves <pedro@codesourcery.com>
7755 Stan Shebs <stan@codesourcery.com>
7756
7757 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7758 (all): Depend on $(extra_libraries).
7759 (install-only): Install the IPA.
7760 (IPA_OBJS, IPA_LIB): New.
7761 (clean): Remove the IPA lib.
7762 (IPAGENT_CFLAGS): New.
7763 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7764 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7765 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7766 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7767 * configure.ac: Check for atomic builtins support in the compiler.
7768 (IPA_DEPFILES, extra_libraries): Define.
7769 * configure.srv (ipa_obj): Add description.
7770 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7771 (i[34567]86-*-linux*): Set ipa_obj.
7772 (x86_64-*-linux*): Set ipa_obj.
7773 * linux-low.c (stabilizing_threads): New.
7774 (supports_fast_tracepoints): New.
7775 (linux_detach): Stabilize threads before detaching.
7776 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7777 the lwp is either not stabilizing, or is moving out of a jump pad.
7778 (linux_fast_tracepoint_collecting): New.
7779 (maybe_move_out_of_jump_pad): New.
7780 (enqueue_one_deferred_signal): New.
7781 (dequeue_one_deferred_signal): New.
7782 (linux_wait_for_event_1): If moving out of a jump pad, defer
7783 pending signals to later.
7784 (linux_stabilize_threads): New.
7785 (linux_wait_1): Check if threads need moving out of jump pads, and
7786 do it if so.
7787 (stuck_in_jump_pad_callback): New.
7788 (move_out_of_jump_pad_callback): New.
7789 (lwp_running): New.
7790 (linux_resume_one_lwp): Handle moving out of jump pads.
7791 (linux_set_resume_request): Dequeue deferred signals.
7792 (need_step_over_p): Also step over fast tracepoint jumps.
7793 (start_step_over): Also uninsert fast tracepoint jumps.
7794 (finish_step_over): Also reinsert fast tracepoint jumps.
7795 (linux_install_fast_tracepoint_jump): New.
7796 (linux_target_ops): Install linux_stabilize_threads and
7797 linux_install_fast_tracepoint_jump_pad.
7798 * linux-low.h (linux_target_ops) <get_thread_area,
7799 install_fast_tracepoint_jump_pad>: New fields.
7800 (struct lwp_info) <collecting_fast_tracepoint,
7801 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7802 (linux_get_thread_area): Declare.
7803 * linux-x86-low.c (jump_insn): New.
7804 (x86_get_thread_area): New.
7805 (append_insns): New.
7806 (push_opcode): New.
7807 (amd64_install_fast_tracepoint_jump_pad): New.
7808 (i386_install_fast_tracepoint_jump_pad): New.
7809 (x86_install_fast_tracepoint_jump_pad): New.
7810 (the_low_target): Install x86_get_thread_area and
7811 x86_install_fast_tracepoint_jump_pad.
7812 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7813 (struct fast_tracepoint_jump): New.
7814 (fast_tracepoint_jump_insn): New.
7815 (fast_tracepoint_jump_shadow): New.
7816 (find_fast_tracepoint_jump_at): New.
7817 (fast_tracepoint_jump_here): New.
7818 (delete_fast_tracepoint_jump): New.
7819 (set_fast_tracepoint_jump): New.
7820 (uninsert_fast_tracepoint_jumps_at): New.
7821 (reinsert_fast_tracepoint_jumps_at): New.
7822 (set_breakpoint_at): Use write_inferior_memory.
7823 (uninsert_raw_breakpoint): Use write_inferior_memory.
7824 (check_mem_read): Mask out fast tracepoint jumps.
7825 (check_mem_write): Mask out fast tracepoint jumps.
7826 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7827 (set_fast_tracepoint_jump): Declare.
7828 (delete_fast_tracepoint_jump)
7829 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7830 (reinsert_fast_tracepoint_jumps_at): Declare.
7831 * regcache.c: Don't compile many functions when building the
7832 in-process agent library.
7833 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7834 the register buffer in the heap.
7835 (free_register_cache): If the register buffer isn't owned by the
7836 regcache, don't free it.
7837 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7838 pre-existing register caches.
7839 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7840 type.
7841 (convert_ascii_to_int): : Constify `from' parameter type.
7842 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7843 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7844 the needed buffer in-place.
7845 (relocate_instruction): New.
7846 * server.c (handle_query) <qSymbols>: If the target supports
7847 tracepoints, give it a chance of looking up symbols. Report
7848 support for fast tracepoints.
7849 (handle_status): Stabilize threads.
7850 (process_serial_event): Adjust.
7851 * server.h (struct fast_tracepoint_jump): Forward declare.
7852 (struct process_info) <fast_tracepoint_jumps>: New field.
7853 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7854 (decode_X_packet, decode_M_packet): Adjust.
7855 (relocate_instruction): Declare.
7856 (in_process_agent_loaded): Declare.
7857 (tracepoint_look_up_symbols): Declare.
7858 (struct fast_tpoint_collect_status): Declare.
7859 (fast_tracepoint_collecting): Declare.
7860 (force_unlock_trace_buffer): Declare.
7861 (handle_tracepoint_bkpts): Declare.
7862 (initialize_low_tracepoint)
7863 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7864 * target.h (struct target_ops) <stabilize_threads,
7865 install_fast_tracepoint_jump_pad>: New fields.
7866 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7867 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7868 [HAVE_STDINT_H]: Include stdint.h.
7869 (trace_debug_1): Rename to ...
7870 (trace_vdebug): ... this.
7871 (trace_debug): Rename to ...
7872 (trace_debug_1): ... this. Add `level' parameter.
7873 (trace_debug): New.
7874 (ATTR_USED, ATTR_NOINLINE): New.
7875 (IP_AGENT_EXPORT): New.
7876 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7877 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7878 (about_to_request_buffer_space, trace_buffer_is_full)
7879 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7880 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7881 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7882 (traceframe_write_count, traceframes_created)
7883 (trace_state_variables)
7884 New renaming defines.
7885 (struct ipa_sym_addresses): New.
7886 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7887 (symbol_list): New.
7888 (ipa_sym_addrs): New.
7889 (all_tracepoint_symbols_looked_up): New.
7890 (in_process_agent_loaded): New.
7891 (write_e_ipa_not_loaded): New.
7892 (maybe_write_ipa_not_loaded): New.
7893 (tracepoint_look_up_symbols): New.
7894 (debug_threads) [IN_PROCESS_AGENT]: New.
7895 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7896 (UNKNOWN_SIDE_EFFECTS): New.
7897 (stop_tracing): New.
7898 (flush_trace_buffer): New.
7899 (stop_tracing_bkpt): New.
7900 (flush_trace_buffer_bkpt): New.
7901 (read_inferior_integer): New.
7902 (read_inferior_uinteger): New.
7903 (read_inferior_data_pointer): New.
7904 (write_inferior_data_pointer): New.
7905 (write_inferior_integer): New.
7906 (write_inferior_uinteger): New.
7907 (struct collect_static_trace_data_action): Delete.
7908 (enum tracepoint_type): New.
7909 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
7910 <actions_str, step_actions, step_actions_str>: Only include in
7911 GDBserver.
fa593d66
PA
7912 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7913 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7914 (tracepoints): Use IP_AGENT_EXPORT.
7915 (last_tracepoint): Don't include in the IPA.
7916 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7917 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7918 (alloced_trace_state_variables): New.
7919 (trace_state_variables): Use IP_AGENT_EXPORT.
7920 (traceframe_t): Delete unused variable.
7921 (circular_trace_buffer): Don't include in the IPA.
7922 (trace_buffer_start): Delete.
7923 (struct trace_buffer_control): New.
7924 (trace_buffer_free): Delete.
7925 (struct ipa_trace_buffer_control): New.
7926 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7927 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7928 New.
7929 (trace_buffer_ctrl): New.
7930 (TRACE_BUFFER_CTRL_CURR): New.
7931 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7932 Reimplement as macros.
7933 (trace_buffer_wrap): Delete.
7934 (traceframe_write_count, traceframe_read_count)
7935 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7936 (struct tracepoint_hit_ctx) <type>: New field.
7937 (struct fast_tracepoint_ctx): New.
7938 (memory_barrier): New.
7939 (cmpxchg): New.
7940 (record_tracepoint_error): Update atomically in the IPA.
7941 (clear_inferior_trace_buffer): New.
7942 (about_to_request_buffer_space): New.
7943 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7944 updating the same buffer.
7945 (add_tracepoint): Default the tracepoint's type to trap
7946 tracepoint, and orig_size to -1.
7947 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7948 internal variables.
7949 (create_trace_state_variable): New parameter `gdb'. Handle it.
7950 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7951 (cmd_qtdp): Handle fast tracepoints.
7952 (cmd_qtdv): Adjust.
7953 (max_jump_pad_size): New.
7954 (gdb_jump_pad_head): New.
7955 (get_jump_space_head): New.
7956 (claim_jump_space): New.
7957 (sort_tracepoints): New.
7958 (MAX_JUMP_SIZE): New.
7959 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7960 IPA.
7961 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7962 support. Upload fast traceframes, and delete internal IPA
7963 breakpoints.
7964 (stop_tracing_handler): New.
7965 (flush_trace_buffer_handler): New.
7966 (cmd_qtstop): Upload fast tracepoints.
7967 (response_tracepoint): Handle fast tracepoints.
7968 (tracepoint_finished_step): Upload fast traceframes. Set the
7969 tracepoint hit context's tracepoint type.
7970 (handle_tracepoint_bkpts): New.
7971 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7972 type. Add comment about fast tracepoints.
7973 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7974 non-existing action_str field.
7975 (get_context_regcache): Handle fast tracepoints.
7976 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7977 to the regcache.
7978 (fast_tracepoint_from_jump_pad_address): New.
7979 (fast_tracepoint_from_ipa_tpoint_address): New.
7980 (collecting_t): New.
7981 (force_unlock_trace_buffer): New.
7982 (fast_tracepoint_collecting): New.
7983 (collecting): New.
7984 (gdb_collect): New.
7985 (write_inferior_data_ptr): New.
7986 (target_tp_heap): New.
7987 (target_malloc): New.
7988 (download_agent_expr): New.
7989 (UALIGN): New.
7990 (download_tracepoints): New.
7991 (download_trace_state_variables): New.
7992 (upload_fast_traceframes): New.
7993 (IPA_FIRST_TRACEFRAME): New.
7994 (IPA_NEXT_TRACEFRAME_1): New.
7995 (IPA_NEXT_TRACEFRAME): New.
7996 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7997 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7998 (gdb_jump_pad_buffer_end): New.
7999 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8000 (initialize_tracepoint): Adjust.
8001 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8002 buffer. Initialize the low module.
8003 * utils.c (PREFIX, TOOLNAME): New.
8004 (malloc_failure): Use PREFIX.
8005 (error): In the IPA, an error causes an exit.
8006 (fatal, warning): Use PREFIX.
8007 (internal_error): Use TOOLNAME.
8008 (NUMCELLS): Increase to 10.
8009 * configure, config.in: Regenerate.
8010
d149dd1d
PA
80112010-06-01 Pedro Alves <pedro@codesourcery.com>
8012
8013 * server.c (handle_query) <qSupported>: Do two passes over the
8014 qSupported string to avoid nesting strtok.
8015
f6528abd
JK
80162010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8017
8018 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8019 (CDEPS): New.
8020 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
8021 -Wl,--dynamic-list.
8022 * configure: Regenerate.
8023 * proc-service.list: New.
8024
ca2a87a0
JK
80252010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8026
8027 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8028 New comment.
8029
363a6e9f
OS
80302010-05-26 Ozkan Sezer <sezeroz@gmail.com>
8031
8032 * gdbreplay.c (remote_open): Check error return from socket() call by
8033 its equality to -1 not by it being negative.
8034 * remote-utils.c (remote_open): Likewise.
8035
d23b6cb1
PA
80362010-05-23 Pedro Alves <pedro@codesourcery.com>
8037
8038 * config.h: Regenerate.
8039
28d3cf85
MK
80402010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8041
8042 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8043 doesn't provide PTRACE_GET_THREAD_AREA.
8044
fea36a59
MK
80452010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8046
8047 * linux-m68k-low.c: Include <asm/ptrace.h>
8048 (ps_get_thread_area): Implement.
8049
24b066ba
DE
80502010-05-03 Doug Evans <dje@google.com>
8051
8052 * event-loop.c (struct callback_event): New struct.
8053 (callback_list): New global.
8054 (append_callback_event, delete_callback_event): New functions.
8055 (process_callback): New function.
8056 (start_event_loop): Call it.
8057 * remote-utils.c (NOT_SCHEDULED): Define.
8058 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8059 moved out of readchar.
8060 (readchar): Rewrite. Call reschedule before returning.
8061 (reset_readchar): New function.
8062 (remote_close): Call it.
8063 (process_remaining, reschedule): New functions.
8064 * server.h (callback_handler_func): New typedef.
8065 (append_callback_event, delete_callback_event): Declare.
8066
9836d6ea
PA
80672010-05-03 Pedro Alves <pedro@codesourcery.com>
8068
8069 * proc-service.c (ps_pglobal_lookup): Use
8070 thread_db_look_up_one_symbol.
8071 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8072 parameter. Use it instead of all_symbols_looked_up.
8073 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8074 field.
8075 (all_symbols_looked_up): Don't declare.
8076 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8077 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8078 field.
8079 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8080 Set all_symbols_looked_up here.
8081 (thread_db_look_up_one_symbol): New.
8082 (thread_db_get_tls_address): Adjust.
8083 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8084 thread_db object on the heap, and tentatively set it in the
8085 process structure.
8086 (thread_db_init): Don't set all_symbols_looked_up here.
8087 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8088
7984d532
PA
80892010-05-03 Pedro Alves <pedro@codesourcery.com>
8090
8091 * linux-low.c (linux_kill, linux_detach): Adjust.
8092 (status_pending_p_callback): Remove redundant statement. Check
8093 for !TARGET_WAITIKIND_IGNORE, instead of
8094 TARGET_WAITKIND_STOPPED.
8095 (handle_tracepoints): Make sure LWP is locked. Adjust.
8096 (linux_wait_for_event_1): Adjust.
8097 (linux_cancel_breakpoints): New.
8098 (unsuspend_one_lwp): New.
8099 (unsuspend_all_lwps): New.
8100 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8101 (send_sigstop_callback): Change return type to int, add new
8102 `except' parameter and handle it.
8103 (suspend_and_send_sigstop_callback): New.
8104 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8105 pass them down. If SUSPEND, also increment the lwp's suspend
8106 count.
8107 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8108 (need_step_over_p): Don't consider suspended LWPs.
8109 (start_step_over): Adjust.
8110 (proceed_one_lwp): Change return type to int, add new `except'
8111 parameter and handle it.
8112 (unsuspend_and_proceed_one_lwp): New.
8113 (proceed_all_lwps): Use find_inferior instead of
8114 for_each_inferior.
8115 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8116 also decrement the suspend count of LWPs. Pass `except' down,
8117 instead of hacking its suspend count.
8118 (linux_pause_all): Add `freeze' parameter. Adjust.
8119 (linux_unpause_all): New.
8120 (linux_target_ops): Install linux_unpause_all.
8121 * server.c (handle_status): Adjust.
8122 * target.h (struct target_ops): New fields `unpause_all' and
8123 `cancel_breakpoints'. Add new parameter to `pause_all'.
8124 (pause_all): Add new `freeze' parameter.
8125 (unpause_all): New.
8126 (cancel_breakpoints): New.
8127 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8128 cancel breakpoints.
8129 (cmd_qtstart): Pause threads.
8130 (stop_tracing): Pause threads, and cancel breakpoints.
8131 * win32-low.c (win32_target_ops): Adjust.
8132
e471f25b
PA
81332010-05-03 Pedro Alves <pedro@codesourcery.com>
8134
8135 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8136 the inferior right away from here...
8137 (linux_wait_1): ... to here, and adjust to check the thread's
8138 last_resume_kind instead of the lwp's step or stop_expected flags.
8139
1915ef4f
PA
81402010-05-02 Pedro Alves <pedro@codesourcery.com>
8141
8142 * README: Use consistent `GDB' and `GDBserver' spellings.
8143
f9e39928
PA
81442010-05-02 Pedro Alves <pedro@codesourcery.com>
8145
8146 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8147 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8148 (linux_detach_one_lwp): Assume the lwp is stopped.
8149 (any_thread_of): Delete.
8150 (linux_detach): Stop all lwps here. Don't blindly delete all
8151 breakpoints.
8152 (delete_lwp_callback): New.
8153 (linux_mourn): Delete all lwps of the process that is gone.
8154 (linux_wait_1): Don't delete the last lwp of the process here.
8155 * mem-break.h (mark_breakpoints_out): Declare.
8156 * mem-break.c (mark_breakpoints_out): New.
8157 (free_all_breakpoints): Use it.
8158 * server.c (handle_target_event): If the process is gone, mark
8159 breakpoints out.
8160 * thread-db.c (struct thread_db) <create_bp>: New field.
8161 (thread_db_enable_reporting): Fix prototype. Store a thread event
8162 breakpoint reference in the thread_db struct.
8163 (thread_db_load_search): Clear the thread_db object.
8164 (try_thread_db_load_1): Ditto.
8165 (switch_to_process): New.
8166 (disable_thread_event_reporting): Use it.
8167 (remove_thread_event_breakpoints): New.
8168 (thread_db_detach, thread_db_mourn): Use it.
8169
1e7fc18c
PA
81702010-05-01 Pedro Alves <pedro@codesourcery.com>
8171
8172 * linux-low.c (linux_enable_event_reporting): New.
8173 (linux_wait_for_event_1, handle_extended_wait): Use it.
8174
02fc4de7
PA
81752010-04-30 Pedro Alves <pedro@codesourcery.com>
8176
8177 * linux-low.c (linux_kill_one_lwp, linux_kill)
8178 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8179 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8180 SIGSTOP even if the LWP is stopped.
8181 (send_sigstop_callback): New.
8182 (stop_all_lwps): Use send_sigstop_callback instead.
8183 (linux_resume_one_thread): Adjust.
8184 (proceed_one_lwp): Still proceed an LWP that the client has
8185 requested to stop, if we haven't reported it as stopped yet. Make
8186 sure that LWPs the client want stopped, have a pending SIGSTOP.
8187
bc3b5632
DE
81882010-04-26 Doug Evans <dje@google.com>
8189
ae1ada35
DE
8190 * server.c (handle_general_set): Make static.
8191
bc3b5632
DE
8192 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8193 Print received char after testing for error/eof instead of before.
8194 (input_interrupt): Tweak comment.
8195
65730243
DE
81962010-04-23 Doug Evans <dje@google.com>
8197
8198 * server.c (start_inferior): Print inferior argv if --debug.
8199
a8ae7dc0
AR
82002010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8201
8202 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8203 * nto-x86-low.c: Include server.h
8204
1c07cc19
PM
82052010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8206
8207 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8208 be consistent with other sources of this directory.
8209 (init_registers_amd64): Correct name of source file of this function
8210 in the comment.
8211
e0a61e09
PM
82122010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8213
8214 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8215 64-bit executables.
8216
54709339
PM
82172010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8218
8219 * win32-i386-low.c: Add 64-bit support.
8220 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8221 (init_registers_amd64): Declare.
8222 (mappings): Add 64-bit version of array.
8223 (init_windows_x86): New function.
8224 (the_low_target): Change init_arch field to init_windows_x86.
8225
e8f0053d
PM
82262010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8227
8228 * win32-low.c: Adapt to support also 64-bit architecture.
8229 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8230 (get_image_name): Use SIZE_T type for local variable `done'.
8231 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8232 (toolhelp_get_dll_name): Idem.
8233 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8234 Use uintptr_t typecast to avoid warning.
8235 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8236 (handle_exception): Use phex_nz to avoid warning.
8237 (win32_wait): Remove unused local variable `process'.
8238
c481e77e
PM
82392010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8240
8241 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8242 `amd64-avx.o'.
8243
12ea4b69
PM
82442010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8245
8246 * configure.ac: Use `ws2_32' library for srv_mingw.
8247 * configure: Regenerate.
8248 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8249 * remote-utils.c: Likewise.
8250
f6d1620c
L
82512010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8252
8253 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8254 if __x86_64__ is defined.
8255
8e642873
PM
82562010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8257
8258 * configure: Regenerate.
8259
711e434b
PM
82602010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8261
8262 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8263 * target.h (target_ops): New get_tib_address field.
8264 * win32-low.h (win32_thread_info): Add thread_local_base field.
8265 * win32-low.c (child_add_thread): Add tlb argument.
8266 Set thread_local_base field to TLB.
8267 (get_child_debug_event): Adapt to child_add_thread change.
8268 (win32_get_tib_address): New function.
8269 (win32_target_ops): Set get_tib_address field to
8270 win32_get_tib_address.
8271 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8272
505106cd
PA
82732010-04-12 Pedro Alves <pedro@codesourcery.com>
8274
505106cd
PA
8275 * linux-low.c (linux_mourn): Also remove the process.
8276 * server.c (handle_target_event): Don't remove the process here.
8277 * nto-low.c (nto_mourn): New.
8278 (nto_target_ops): Install it.
8279 * spu-low.c (spu_mourn): New.
8280 (spu_target_ops): Install it.
8281 * win32-low.c (win32_mourn): New.
8282 (win32_target_ops): Install it.
8283
e8470a06
PA
82842010-04-12 Pedro Alves <pedro@codesourcery.com>
8285
8286 * server.h (buffer_xml_printf): Remove redundant `;'.
8287
45ba0d02
PA
82882010-04-12 Pedro Alves <pedro@codesourcery.com>
8289
8290 * regcache.c (set_register_cache): Invalidate regcaches before
8291 changing the register cache layout.
8292 (regcache_invalidate_one): Allow a NULL regcache.
8293 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8294 regcaches before changing the register cache layout or the target
8295 regsets.
8296
59e04013
L
82972010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8298
8299 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8300 variable warning on Linux/x86-64.
8301
8336d594
PA
83022010-04-11 Pedro Alves <pedro@codesourcery.com>
8303
8304 GDBserver disconnected tracing support.
8305
8306 * linux-low.c (linux_remove_process): Delete.
8307 (add_lwp): Don't set last_resume_kind here.
8308 (linux_kill): Use `mourn'.
8309 (linux_detach): Use `thread_db_detach', and `mourn'.
8310 (linux_mourn): New.
8311 (linux_attach_lwp_1): Adjust comment.
8312 (linux_attach): last_resume_kind moved the thread_info; adjust.
8313 (status_pending_p_callback): Adjust.
8314 (linux_wait_for_event_1): Adjust.
8315 (count_events_callback, select_singlestep_lwp_callback)
8316 (select_event_lwp_callback, cancel_breakpoints_callback)
8317 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8318 (proceed_one_lwp): Adjust.
8319 (linux_async): Add debug output.
8320 (linux_thread_stopped): New.
8321 (linux_pause_all): New.
8322 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8323 linux_pause_all.
8324 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8325 (thread_db_free): Delete declaration.
8326 (thread_db_detach, thread_db_mourn): Declare.
8327 * thread-db.c (thread_db_init): Use thread_db_mourn.
8328 (thread_db_free): Delete, split in two.
8329 (disable_thread_event_reporting): New.
8330 (thread_db_detach): New.
8331 (thread_db_mourn): New.
8332
8333 * server.h (struct thread_info) <last_resume_kind>: New field.
8334 <attached>: Add comment.
8335 <gdb_detached>: New field.
8336 (handler_func): Change return type to int.
8337 (handle_serial_event, handle_target_event): Ditto.
8338 (gdb_connected): Declare.
8339 (tracing): Delete.
8340 (disconnected_tracing): Declare.
8341 (stop_tracing): Declare.
8342
8343 * server.c (handle_query) <qSupported>: Report support for
8344 disconnected tracing.
8345 (queue_stop_reply_callback): Account for running threads.
8346 (gdb_wants_thread_stopped): New.
8347 (gdb_wants_all_threads_stopped): New.
8348 (gdb_reattached_process): New.
8349 (handle_status): Clear the `gdb_detached' flag of all processes.
8350 In all-stop, stop all threads.
8351 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8352 (process_serial_event): If the remote connection breaks, or if an
8353 exit was forced with "monitor exit", force an event loop exit.
8354 Handle disconnected tracing on detach.
8355 (handle_serial_event): Adjust.
8356 (handle_target_event): If GDB isn't connected, forward events back
8357 to the inferior, unless the last process exited, in which case,
8358 exit gdbserver. Adjust interface.
8359
8360 * remote-utils.c (remote_open): Don't block in accept. Instead
8361 register an event loop source on the listen socket file
8362 descriptor. Refactor bits into ...
8363 (listen_desc): ... this new global.
8364 (gdb_connected): ... this new function.
8365 (enable_async_notification): ... this new function.
8366 (handle_accept_event): ... this new function.
8367 (remote_close): Clear remote_desc.
8368
8369 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8370
8371 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8372 New fields.
8373 (mourn_inferior): Define.
8374 (target_process_qsupported): Avoid the dangling else problem.
8375 (thread_stopped): Define.
8376 (pause_all): Define.
8377 (target_waitstatus_to_string): Declare.
8378 * target.c (target_waitstatus_to_string): New.
8379
8380 * tracepoint.c (tracing): Make extern.
8381 (disconnected_tracing): New.
8382 (stop_tracing): Make extern. Handle tracing stops due to GDB
8383 disconnecting.
8384 (cmd_qtdisconnected): New.
8385 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8386 (handle_tracepoint_general_set): Handle QTDisconnected.
8387
8388 * event-loop.c (event_handler_func): Change return type to int.
8389 (process_event): Bail out if the event handler wants the event
8390 loop to stop.
8391 (handle_file_event): Ditto.
8392 (start_event_loop): Bail out if the event handler wants the event
8393 loop to stop.
8394
8395 * nto-low.c (nto_target_ops): Adjust.
8396 * spu-low.c (spu_wait): Don't remove the process here.
8397 (spu_target_ops): Adjust.
8398 * win32-low.c (win32_wait): Don't remove the process here.
8399 (win32_target_ops): Adjust.
8400
5d267c4c
PA
84012010-04-11 Pedro Alves <pedro@codesourcery.com>
8402
8403 * regcache.c (realloc_register_cache): Invalidate inferior's
8404 regcache before recreating it.
8405
623ccd72
PA
84062010-04-09 Pedro Alves <pedro@codesourcery.com>
8407
8408 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8409
219f2f23
PA
84102010-04-09 Stan Shebs <stan@codesourcery.com>
8411 Pedro Alves <pedro@codesourcery.com>
8412
8413 * server.h (LONGEST): New.
8414 (struct thread_info) <while_stepping>: New field.
8415 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8416 Declare.
8417 (initialize_tracepoint, handle_tracepoint_general_set)
8418 (handle_tracepoint_query, tracepoint_finished_step)
8419 (tracepoint_was_hit, release_while_stepping_state_list):
8420 (current_traceframe): Declare.
8421 * server.c (handle_general_set): Handle tracepoint packets.
8422 (read_memory): New.
8423 (write_memory): New.
8424 (handle_search_memory_1): Use read_memory.
8425 (handle_query): Report support for conditional tracepoints, trace
8426 state variables, and tracepoint sources. Handle tracepoint
8427 queries.
8428 (main): Initialize the tracepoints module.
8429 (process_serial_event): Handle traceframe reads/writes.
8430
8431 * linux-low.c (handle_tracepoints): New.
8432 (linux_wait_1): Call it.
8433 (linux_resume_one_lwp): Handle while-stepping.
8434 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8435 (linux_target_ops): Install them.
8436 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8437 New field.
8438 * linux-x86-low.c (x86_supports_tracepoints): New.
8439 (the_low_target). Install it.
8440
8441 * mem-break.h (delete_breakpoint): Declare.
8442 * mem-break.c (delete_breakpoint): Make external.
8443
8444 * target.h (struct target_ops): Add `supports_tracepoints',
8445 `read_pc', and `write_pc' fields.
8446 (target_supports_tracepoints): Define.
8447 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8448 (phex_nz): New.
8449
8450 * regcache.h (struct regcache) <registers_owned>: New field.
8451 (init_register_cache, regcache_cpy): Declare.
8452 (regcache_read_pc, regcache_write_pc): Declare.
8453 (register_cache_size): Declare.
8454 (supply_regblock): Declare.
8455 * regcache.c (init_register_cache): New.
8456 (new_register_cache): Use it.
8457 (regcache_cpy): New.
8458 (register_cache_size): New.
8459 (supply_regblock): New.
8460 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 8461
219f2f23
PA
8462 * tracepoint.c: New.
8463
8464 * Makefile.in (OBS): Add tracepoint.o.
8465 (tracepoint.o): New rule.
8466
3a13a53b
L
84672010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8468
8469 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8470 (i386-mmx.o): New.
8471 (i386-mmx.c): Likewise.
8472 (i386-mmx-linux.o): Likewise.
8473 (i386-mmx-linux.c): Likewise.
8474
8475 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8476 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8477 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8478 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8479
8480 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8481 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8482 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8483
1570b33e
L
84842010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8485
8486 * Makefile.in (clean): Updated.
8487 (i386-avx.o): New.
8488 (i386-avx.c): Likewise.
8489 (i386-avx-linux.o): Likewise.
8490 (i386-avx-linux.c): Likewise.
8491 (amd64-avx.o): Likewise.
8492 (amd64-avx.c): Likewise.
8493 (amd64-avx-linux.o): Likewise.
8494 (amd64-avx-linux.c): Likewise.
8495
8496 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8497 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8498 (srv_amd64_regobj): Add amd64-avx.o.
8499 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8500 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8501 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8502 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8503 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8504 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8505 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8506
8507 * i387-fp.c: Include "i386-xstate.h".
8508 (i387_xsave): New.
8509 (i387_cache_to_xsave): Likewise.
8510 (i387_xsave_to_cache): Likewise.
8511 (x86_xcr0): Likewise.
8512
8513 * i387-fp.h (i387_cache_to_xsave): Likewise.
8514 (i387_xsave_to_cache): Likewise.
8515 (x86_xcr0): Likewise.
8516
8517 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8518 * linux-crisv32-low.c (target_regsets): Likewise.
8519 * linux-m68k-low.c (target_regsets): Likewise.
8520 * linux-mips-low.c (target_regsets): Likewise.
8521 * linux-ppc-low.c (target_regsets): Likewise.
8522 * linux-s390-low.c (target_regsets): Likewise.
8523 * linux-sh-low.c (target_regsets): Likewise.
8524 * linux-sparc-low.c (target_regsets): Likewise.
8525 * linux-xtensa-low.c (target_regsets): Likewise.
8526
8527 * linux-low.c: Include <sys/uio.h>.
8528 (regsets_fetch_inferior_registers): Support nt_type.
8529 (regsets_store_inferior_registers): Likewise.
8530 (linux_process_qsupported): New.
8531 (linux_target_ops): Add linux_process_qsupported.
8532
8533 * linux-low.h (regset_info): Add nt_type.
8534 (linux_target_ops): Add process_qsupported.
8535
8536 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8537 and <sys/uio.h>.
8538 (init_registers_i386_avx_linux): New.
8539 (init_registers_amd64_avx_linux): Likewise.
8540 (xmltarget_i386_linux_no_xml): Likewise.
8541 (xmltarget_amd64_linux_no_xml): Likewise.
8542 (PTRACE_GETREGSET): Likewise.
8543 (PTRACE_SETREGSET): Likewise.
8544 (x86_fill_xstateregset): Likewise.
8545 (x86_store_xstateregset): Likewise.
8546 (use_xml): Likewise.
8547 (x86_linux_update_xmltarget): Likewise.
8548 (x86_linux_process_qsupported): Likewise.
8549 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8550 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8551 init_registers_i386_linux here. Call
8552 x86_linux_update_xmltarget.
8553 (the_low_target): Add x86_linux_process_qsupported.
8554
8555 * server.c (handle_query): Call target_process_qsupported.
8556
8557 * target.h (target_ops): Add process_qsupported.
8558 (target_process_qsupported): New.
8559
fc7238bb
PA
85602010-04-03 Pedro Alves <pedro@codesourcery.com>
8561
8562 * inferiors.c (add_thread): Set last_status kind to
8563 TARGET_WAITKIND_IGNORE.
8564 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8565 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8566 (linux_wait_1): Move `thread' local definition to block that uses
8567 it. Don't NULL initialize `event_child'.
8568 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8569 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8570 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8571
bdabb078
PA
85722010-04-01 Pedro Alves <pedro@codesourcery.com>
8573
8574 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8575 an extended waitstatus, or by a watchpoint.
8576 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8577 thread was stepping or has been stopped by a watchpoint.
8578
d3bbe7a0
PA
85792010-04-01 Pedro Alves <pedro@codesourcery.com>
8580
8581 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8582 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8583 of another, then delete the previous, and validate all
8584 breakpoints.
8585 (validate_inserted_breakpoint): New.
8586 (delete_disabled_breakpoints): New.
8587 (validate_breakpoints): New.
8588 (check_mem_read): Validate breakpoints before trusting their
8589 shadow. Delete disabled breakpoints.
8590 (check_mem_write): Validate breakpoints before trusting they
8591 should be inserted. Delete disabled breakpoints.
8592 * mem-break.h (validate_breakpoints):
8593 * server.c (handle_query): Validate breakpoints when we see a
8594 qSymbol query.
8595
8b07ae33
PA
85962010-04-01 Pedro Alves <pedro@codesourcery.com>
8597
8598 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8599 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8600 if we could tell there's a GDB breakpoint at stop_pc.
8601 (need_step_over_p): Don't do a step over if we find a GDB
8602 breakpoint at the resume PC.
8603
8604 * mem-break.c (struct raw_breakpoint): New.
8605 (enum bkpt_type): New type `gdb_breakpoint'.
8606 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8607 fields. New field `raw'.
8608 (find_raw_breakpoint_at): New.
8609 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8610 breakpoint instead.
8611 (set_breakpoint_at): Adjust.
8612 (delete_raw_breakpoint): New.
8613 (release_breakpoint): New.
8614 (delete_breakpoint): Rename to...
8615 (delete_breakpoint_1): ... this. Add proc parameter. Use
8616 release_breakpoint. Return ENOENT.
8617 (delete_breakpoint): Reimplement.
8618 (find_breakpoint_at): Delete.
8619 (find_gdb_breakpoint_at): New.
8620 (delete_breakpoint_at): Delete.
8621 (set_gdb_breakpoint_at): New.
8622 (delete_gdb_breakpoint_at): New.
8623 (gdb_breakpoint_here): New.
8624 (set_reinsert_breakpoint): Use release_breakpoint.
8625 (uninsert_breakpoint): Rename to ...
8626 (uninsert_raw_breakpoint): ... this.
8627 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8628 (reinsert_raw_breakpoint): Change parameter type to
8629 raw_breakpoint.
8630 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8631 instead.
8632 (check_breakpoints): Adjust. Use release_breakpoint.
8633 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8634 (breakpoint_inserted_here): Ditto.
8635 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8636 Don't trust the breakpoint's shadow if it is not inserted.
8637 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8638 (delete_all_breakpoints): Adjust.
8639 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8640 use delete_breakpoint_1.
8641
8642 * mem-break.h (breakpoints_supported): Delete declaration.
8643 (set_gdb_breakpoint_at): Declare.
8644 (gdb_breakpoint_here): Declare.
8645 (delete_breakpoint_at): Delete.
8646 (delete_gdb_breakpoint_at): Declare.
8647
8648 * server.h (struct raw_breakpoint): Forward declare.
8649 (struct process_info): New field `raw_breakpoints'.
8650
8651 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8652 breakpoints.
8653
6bf5e0ba
PA
86542010-03-24 Pedro Alves <pedro@codesourcery.com>
8655
8656 * linux-low.c (status_pending_p_callback): Fix comment.
8657 (linux_wait_for_event_1): Move most of the internal breakpoint
8658 handling from here...
8659 (linux_wait_1): ... to here.
8660 (count_events_callback): New.
8661 (select_singlestep_lwp_callback): New.
8662 (select_event_lwp_callback): New.
8663 (cancel_breakpoints_callback): New.
8664 (select_event_lwp): New.
8665 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8666 priority to all LWPs that have had events that should be reported
8667 to the client. Cancel breakpoints when about to reporting the
8668 event to the client, not while stopping lwps. No longer cancel
8669 finished single-steps here.
8670 (cancel_finished_single_step): Delete.
8671 (cancel_finished_single_steps): Delete.
8672
414a389f
PA
86732010-03-24 Pedro Alves <pedro@codesourcery.com>
8674
8675 * mem-break.c (enum bkpt_type): New.
8676 (struct breakpoint): New field `type'.
8677 (set_breakpoint_at): Change return type to struct breakpoint
8678 pointer. Set type to `other_breakpoint' by default.
8679 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8680 in the breakpoint list.
8681 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8682 (reinsert_breakpoint): Rename to ...
8683 (reinsert_raw_breakpoint): ... this.
8684 (reinsert_breakpoints_at): Adjust.
8685 * mem-break.h (struct breakpoint): Declare.
8686 (set_breakpoint_at): Change return type to struct breakpoint
8687 pointer.
8688
2280c721
PA
86892010-03-24 Pedro Alves <pedro@codesourcery.com>
8690
8691 * server.c (handle_query): Assign, not compare.
8692
d50171e4
PA
86932010-03-24 Pedro Alves <pedro@codesourcery.com>
8694
8695 Teach linux gdbserver to step-over-breakpoints.
8696
8697 * linux-low.c (can_hardware_single_step): New.
8698 (supports_breakpoints): New.
8699 (handle_extended_wait): If stopping threads, read the stop pc of
8700 the new cloned LWP.
8701 (get_pc): New.
8702 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8703 low target doesn't support retrieving the PC.
8704 (add_lwp): Set last_resume_kind to resume_continue.
8705 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8706 (linux_attach): Don't clear stop_expected. Set the lwp's
8707 last_resume_kind to resume_stop.
8708 (linux_detach_one_lwp): Don't check for removed breakpoints.
8709 (check_removed_breakpoint): Delete.
8710 (status_pending_p): Rename to ...
8711 (status_pending_p_callback): ... this. Don't check for removed
8712 breakpoints. Don't consider threads that are stopped from GDB's
8713 perspective.
8714 (linux_wait_for_lwp): Always read the stop_pc here.
8715 (cancel_breakpoint): New.
8716 (step_over_bkpt): New global.
8717 (linux_wait_for_event_1): Implement stepping over breakpoints.
8718 (gdb_wants_lwp_stopped): New.
8719 (gdb_wants_all_stopped): New.
8720 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8721 single-step traps here. Store the thread's last reported target
8722 wait status.
8723 (send_sigstop): Don't clear stop_expected. Always set it,
8724 instead.
8725 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8726 (cancel_finished_single_step): New.
8727 (cancel_finished_single_steps): New.
8728 (wait_for_sigstop): Don't cancel finished single-step traps here.
8729 (linux_resume_one_lwp): Don't check for removed breakpoints.
8730 Don't set `step' on non-hardware step archs.
8731 (linux_set_resume_request): Ignore resume_stop requests if already
8732 stopping or stopped. Set the lwp's last_resume_kind.
8733 (resume_status_pending_p): Don't check for removed breakpoints.
8734 (need_step_over_p): New.
8735 (start_step_over): New.
8736 (finish_step_over): New.
8737 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8738 requests. Clear the thread's last reported target waitstatus.
8739 Don't use the `suspended' flag. Don't consider pending breakpoints.
8740 (linux_resume): Start a step-over if necessary.
8741 (proceed_one_lwp): New.
8742 (proceed_all_lwps): New.
8743 (unstop_all_lwps): New.
8744 * linux-low.h (struct lwp_info): Rewrite comment for the
8745 `suspended' flag. Add the `stop_pc' field. Delete the
8746 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8747 Add `'last_resume_kind' and `need_step_over' fields.
8748 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8749 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8750 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8751 (set_raw_breakpoint_at): New.
8752 (set_breakpoint_at): Rewrite to use it.
8753 (reinsert_breakpoint_handler): Delete.
8754 (set_reinsert_breakpoint): New.
8755 (reinsert_breakpoint_by_bp): Delete.
8756 (delete_reinsert_breakpoints): New.
8757 (uninsert_breakpoint): Rewrite.
8758 (uninsert_breakpoints_at): New.
8759 (reinsert_breakpoint): Rewrite.
8760 (reinsert_breakpoints_at): New.
8761 (check_breakpoints): Rewrite.
8762 (breakpoint_here): New.
8763 (breakpoint_inserted_here): New.
8764 (check_mem_read): Adjust.
8765 * mem-break.h (breakpoints_supported, breakpoint_here)
8766 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8767 (reinsert_breakpoint_by_bp): Delete declaration.
8768 (delete_reinsert_breakpoints): Declare.
8769 (reinsert_breakpoint): Delete declaration.
8770 (reinsert_breakpoints_at): Declare.
8771 (uninsert_breakpoint): Delete declaration.
8772 (uninsert_breakpoints_at): Declare.
8773 (check_breakpoints): Adjust prototype.
8774 * server.h: Adjust include order.
8775 (struct thread_info): Declare here. Add a `last_status' field.
8776
30ba68cb
MS
87772010-03-23 Michael Snyder <msnyder@vmware.com>
8778
8779 * server.c (crc32): New function.
8780 (handle_query): Add handling for 'qCRC:' request.
8781
b9a881c2
PA
87822010-03-23 Pedro Alves <pedro@codesourcery.com>
8783
8784 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8785 lwp had been stopped by a watchpoint.
8786
e92d13d5
PA
87872010-03-16 Pedro Alves <pedro@codesourcery.com>
8788
8789 * server.h (internal_error): Declare.
8790 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8791 * utils.c (internal_error): New function.
8792
64daa791
AS
87932010-03-15 Andreas Schwab <schwab@redhat.com>
8794
8795 * configure.srv: Fix typo setting srv_regobj.
8796
f52cd8cd
PA
87972010-03-15 Pedro Alves <pedro@codesourcery.com>
8798
8799 * linux-low.c (fetch_register): Avoid passing a non string literal
8800 format to `error'.
8801 (usr_store_inferior_registers): Ditto.
8802
93ae6fdc
PA
88032010-03-14 Pedro Alves <pedro@codesourcery.com>
8804
8805 * linux-low.c (linux_write_memory): Bail out early if peeking
8806 memory failed.
8807
c3adc08c
PA
88082010-03-14 Pedro Alves <pedro@codesourcery.com>
8809
8810 * linux-low.h (struct lwp_info): New fields
8811 `stopped_by_watchpoint' and `stopped_data_address'.
8812 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8813 here, and cache them in the lwp object.
8814 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8815 directly.
8816 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8817 field.
8818 (linux_stopped_by_watchpoint): Rewrite.
8819 (linux_stopped_data_address): Rewrite.
8820
bce522a2
PA
88212010-03-06 Simo Melenius <simo.melenius@iki.fi>
8822
8823 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8824 switching the current inferior, not before.
8825
90884b2b
L
88262010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8827
8828 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8829 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8830 i386-linux.c and amd64-linux.c.
8831 (reg-i386.o): Removed.
8832 (reg-i386.c): Likewise.
8833 (reg-i386-linux.o): Likewise.
8834 (reg-i386-linux.c): Likewise.
8835 (reg-x86-64.o): Likewise.
8836 (reg-x86-64.c): Likewise.
8837 (reg-x86-64-linux.o): Likewise.
8838 (reg-x86-64-linux.c): Likewise.
8839 (i386.o): New.
8840 (i386.c): Likewise.
8841 (i386-linux.o): Likewise.
8842 (i386-linux.c): Likewise.
8843 (amd64.o): Likewise.
8844 (amd64.c): Likewise.
8845 (amd64-linux.o): Likewise.
8846 (amd64-linux.c): Likewise.
8847
8848 * configure.srv (srv_i386_regobj): New.
8849 (srv_i386_linux_regobj): Likewise.
8850 (srv_amd64_regobj): Likewise.
8851 (srv_amd64_linux_regobj): Likewise.
8852 (srv_i386_32bit_xmlfiles): Likewise.
8853 (srv_i386_64bit_xmlfiles): Likewise.
8854 (srv_i386_xmlfiles): Likewise.
8855 (srv_amd64_xmlfiles): Likewise.
8856 (srv_i386_linux_xmlfiles): Likewise.
8857 (srv_amd64_linux_xmlfiles): Likewise.
8858 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8859 srv_xmlfiles to $srv_i386_xmlfiles.
8860 (i[34567]86-*-mingw32ce*): Likewise.
8861 (i[34567]86-*-mingw*): Likewise.
8862 (i[34567]86-*-nto*): Likewise.
8863 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8864 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8865 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8866 (x86_64-*-linux*): Likewise.
8867
8868 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8869 (init_registers_amd64_linux): New.
8870 (x86_arch_setup): Replace init_registers_x86_64_linux with
8871 init_registers_amd64_linux.
8872
193f13e6
MK
88732010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8874
8875 * configure.ac: Check for libdl. If it is not available link against
8876 static libthread_db.
8877 * configure: Regenerate.
8878
85d721b8
PA
88792010-02-22 Pedro Alves <pedro@codesourcery.com>
8880
8881 PR9605
8882
8883 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8884 handing a read watchpoint.
8885 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8886
6076632b
DE
88872010-02-12 Doug Evans <dje@google.com>
8888
8889 * linux-low.c (linux_supports_tracefork_flag): Document.
8890 (linux_look_up_symbols): Add comment.
8891
3327ccf7
L
88922010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8893
8894 * regcache.c (supply_register): Clear regcache if buf is NULL.
8895
0718675c 88962010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 8897 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
8898
8899 * inferiors.c (find_inferior): Add function documentation.
8900 (unloaded_dll): Handle the case where the unloaded dll has not
8901 been previously registered in the dll list.
8902
177321bd
DJ
89032010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8904
8905 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8906 (thumb2_breakpoint): New.
8907 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8908
2b009048
DJ
89092010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8910
8911 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8912 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8913 breakpoints.
8914
3be029c7
PA
89152010-01-21 Pedro Alves <pedro@codesourcery.com>
8916
8917 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8918
18f5de3b
JK
89192010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8920
8921 * linux-s390-low.c (s390_collect_ptrace_register)
8922 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8923
3743bb4f
DE
89242010-01-21 Doug Evans <dje@google.com>
8925
14ce3065
DE
8926 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8927 (PTRACE_ARG4_TYPE): New macro.
8928 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8929 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8930 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8931 (usr_store_inferior_registers): Ditto.
8932 (linux_read_memory, linux_write_memory): Ditto.
8933 (linux_test_for_tracefork): Ditto.
8934
3743bb4f
DE
8935 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8936 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8937
8b315be5
PA
89382010-01-21 Pedro Alves <pedro@codesourcery.com>
8939
8940 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8941 target.
8942
85492558
PA
89432010-01-21 Pedro Alves <pedro@codesourcery.com>
8944
8945 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8946 prototype to take a regcache. Adjust.
8947
442ea881
PA
89482010-01-20 Pedro Alves <pedro@codesourcery.com>
8949
8950 * regcache.h (struct thread_info): Forward declare.
8951 (struct regcache): New.
8952 (new_register_cache): Adjust prototype.
8953 (get_thread_regcache): Declare.
8954 (free_register_cache): Adjust prototype.
8955 (registers_to_string, registers_from_string): Ditto.
8956 (supply_register, supply_register_by_name, collect_register)
8957 (collect_register_as_string, collect_register_by_name): Ditto.
8958 * regcache.c (struct inferior_regcache_data): Delete.
8959 (get_regcache): Rename to ...
8960 (get_thread_regcache): ... this. Adjust. Switch inferior before
8961 fetching registers.
8962 (regcache_invalidate_one): Adjust.
8963 (regcache_invalidate): Fix prototype.
8964 (new_register_cache): Return the new register cache.
8965 (free_register_cache): Change prototype.
8966 (realloc_register_cache): Adjust.
8967 (registers_to_string): Change prototype to take a regcache. Adjust.
8968 (registers_from_string): Ditto.
8969 (register_data): Ditto.
8970 (supply_register): Ditto.
8971 (supply_register_by_name): Ditto.
8972 (collect_register): Ditto.
8973 (collect_register_as_string): Ditto.
8974 (collect_register_by_name): Ditto.
8975 * server.c (process_serial_event): Adjust.
8976 * linux-low.h (regset_fill_func, regset_store_func): Change
8977 prototype.
8978 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8979 Change prototype.
8980 * linux-low.c (get_stop_pc): Adjust.
8981 (check_removed_breakpoint): Adjust.
8982 (linux_wait_for_event): Adjust.
8983 (linux_resume_one_lwp): Adjust.
8984 (fetch_register): Add regcache parameter. Adjust.
8985 (usr_store_inferior_registers): Ditto.
8986 (regsets_fetch_inferior_registers): Ditto.
8987 (regsets_store_inferior_registers): Ditto.
8988 (linux_fetch_registers, linux_store_registers): Ditto.
8989 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8990 regcache. Adjust.
43aaf8b6
PA
8991 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8992 Ditto.
442ea881
PA
8993 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8994 prototype to take a regcache.
8995 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8996 * remote-utils.c (convert_ascii_to_int, outreg)
8997 (prepare_resume_reply): Change prototype to take a regcache.
8998 Adjust.
8999 * target.h (struct target_ops) <fetch_registers, store_registers>:
9000 Change prototype to take a regcache.
9001 (fetch_inferior_registers, store_inferior_registers): Change
9002 prototype to take a regcache. Adjust.
9003 * proc-service.c (ps_lgetregs): Adjust.
9004 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9005 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9006 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9007 take a regcache. Adjust.
9008 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9009 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9010 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9011 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
9012 * linux-cris-low.c (cris_get_pc, cris_set_pc)
9013 (cris_cannot_fetch_register):
9014 (cris_breakpoint_at): Change prototype to take a regcache.
9015 Adjust.
9016 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9017 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9018 to take a regcache. Adjust.
9019 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9020 Adjust.
9021 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9022 take a regcache. Adjust.
9023 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9024 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9025 (m68k_set_pc): Change prototype to take a regcache. Adjust.
9026 * linux-mips-low.c (mips_get_pc):
9027 (mips_set_pc): Change prototype to take a regcache. Adjust.
9028 (mips_reinsert_addr): Adjust.
9029 (mips_collect_register): Change prototype to take a regcache.
9030 Adjust.
9031 (mips_supply_register):
9032 (mips_collect_register_32bit, mips_supply_register_32bit)
9033 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9034 (mips_store_fpregset): Ditto.
43aaf8b6
PA
9035 * linux-ppc-low.c (ppc_supply_ptrace_register)
9036 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
9037 (parse_spufs_run): Adjust.
9038 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9039 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9040 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9041 take a regcache. Adjust.
9042 * linux-s390-low.c (s390_collect_ptrace_register)
9043 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9044 (s390_set_pc): Change prototype to take a regcache. Adjust.
9045 (s390_arch_setup): Adjust.
9046 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9047 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
9048 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9049 (sparc_fill_gregset, sparc_store_gregset_from_stack)
9050 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9051 regcache. Adjust.
9052 (sparc_breakpoint_at): Adjust.
9053 * linux-xtensa-low.c (xtensa_fill_gregset):
9054 (xtensa_store_gregset):
9055 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9056 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
9057 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9058 prototype to take a regcache. Adjust.
9059 * win32-arm-low.c (arm_fetch_inferior_register)
9060 (arm_store_inferior_register): Change prototype to take a
9061 regcache. Adjust.
9062 * win32-i386-low.c (i386_fetch_inferior_register)
9063 (i386_store_inferior_register): Change prototype to take a
9064 regcache. Adjust.
9065 * win32-low.c (child_fetch_inferior_registers)
9066 (child_store_inferior_registers): Change prototype to take a
9067 regcache. Adjust.
9068 (win32_wait): Adjust.
9069 (win32_fetch_inferior_registers): Change prototype to take a
9070 regcache. Adjust.
9071 (win32_store_inferior_registers): Adjust.
9072 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9073 store_inferior_register>: Change prototype to take a regcache.
9074
60c3d7b0
DE
90752010-01-20 Doug Evans <dje@google.com>
9076
9077 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9078 #ifdef.
9079 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 9080 (W_STOPCODE): Provide definition if missing.
60c3d7b0 9081
dc146f7c
VP
90822010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9083
9084 * linux-low.c (linux_core_of_thread): New.
9085 (compare_ints, show_process, list_threads): New.
9086 (linux_qxfer_osdata): Report threads and cores.
9087 (linux_target_op): Register linux_core_of_thread.
9088 * remote-utils.c (prepare_resume_reply): Report the core.
9089 (buffer_xml_printf): Support %d specifier.
9090 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9091 New.
9092 (handle_query): Handle qXfer:threads. Announce availability
9093 thereof.
9094 * target.h (struct target_ops): New field core_of_thread.
9095
7803799a
UW
90962010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9097
9098 * Makefile.in (clean): Remove new generated files.
9099 (reg-s390.o, reg-s390.c): Remove rules.
9100 (reg-s390x.o, reg-s390x.c): Likewise.
9101 (s390-linux32.o, s390-linux32.c): Add rules.
9102 (s390-linux64.o, s390-linux64.c): Likewise.
9103 (s390x-linux64.o, s390x-linux64.c): Likewise.
9104 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9105 * linux-s390-low.c: Include <elf.h>.
9106 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9107 (init_registers_s390): Remove prototype.
9108 (init_registers_s390x): Likewise.
9109 (init_registers_s390_linux32): Add prototype.
9110 (init_registers_s390_linux64): Likewise.
9111 (init_registers_s390x_linux64): Likewise.
9112 (s390_num_regs_3264): New define.
9113 (s390_regmap_3264): New global variable.
9114 (s390_cannot_fetch_register): Remove obsolete check.
9115 (s390_cannot_store_register): Likewise.
9116 (s390_collect_ptrace_register): Handle upper/lower register halves.
9117 (s390_supply_ptrace_register): Likewise.
9118 (s390_fill_gregset): Update to register number changes.
9119 (s390_get_hwcap): New routine.
9120 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9121 Install appropriate regmap and register set.
9122
6e7ffa39
JB
91232010-01-01 Joel Brobecker <brobecker@adacore.com>
9124
9125 * server.c (gdbserver_version): Update copyright year to 2010.
9126 * gdbreplay.c (gdbreplay_version): Likewise.
9127
957f3f49
DE
91282009-12-28 Doug Evans <dje@google.com>
9129
9130 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9131 elf/external.h. Include <elf.h> instead but only if necessary.
9132
ca5c370d
PA
91332009-12-28 Pedro Alves <pedro@codesourcery.com>
9134
9135 * linux-low.c (linux_remove_process): Remove `detaching'
9136 parameter. Don't release/detach from thread_db here.
9137 (linux_kill): Release/detach from thread_db here, ...
9138 (linux_detach): ... and here, before actually detaching.
9139 (linux_wait_1): ... and here, when a process exits.
9140 * thread-db.c (any_thread_of): New.
9141 (thread_db_free): Switch the current inferior to a thread of the
9142 passed in process.
9143
4ee62156
DE
91442009-12-21 Doug Evans <dje@google.com>
9145
d90e6a88
DE
9146 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9147
c5f62d5f
DE
9148 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9149 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9150 warning ifndef __NR_tkill. Move setting of errno there too.
9151 Delete unnecessary resetting of errno after syscall.
9152 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9153
10e86dd7
DE
9154 * configure.ac: Check for dladdr.
9155 * config.in: Regenerate.
9156 * configure: Regenerate.
9157 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9158 (try_thread_db_load): Update.
9159
4ee62156
DE
9160 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9161
00f515da
DE
91622009-12-18 Doug Evans <dje@google.com>
9163
e9464885
DE
9164 * event-loop.c: Include unistd.h if it exists.
9165
07d4f67e
DE
9166 * linux-low.c (my_waitpid): Move definition away from being in
9167 between linux_tracefork_child/linux_test_for_tracefork.
9168
00f515da
DE
9169 * gdb_proc_service.h (psaddr_t): Fix type.
9170 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9171 signature to match glibc.
9172
1de1badb
DE
91732009-12-16 Doug Evans <dje@google.com>
9174
9175 * linux-low.c (linux_read_memory): Fix argument to read.
9176
aeeb81d1
PA
91772009-11-26 Pedro Alves <pedro@codesourcery.com>
9178
9179 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9180 events, don't leave current_inferior pointing at null.
9181
10357975
PA
91822009-11-26 Pedro Alves <pedro@codesourcery.com>
9183
9184 * win32-low.c (LOG): Delete.
9185 (OUTMSG): Output to stderr.
9186 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9187 on compile time LOG macro.
9188 (win32_wait): Fix debug output.
9189
cf6e3471
PA
91902009-11-26 Pedro Alves <pedro@codesourcery.com>
9191
9192 * win32-low.c (win32_add_one_solib): If the dll name is
9193 "ntdll.dll", prepend the system directory to the dll path.
9194
0c85e18e
MK
91952009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9196
9197 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9198
9ac544ce 91992009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 9200 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
9201
9202 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9203 * configure.ac: Check for __mcoldfire__ and set
9204 gdb_cv_m68k_is_coldfire.
9205 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9206 reg-cf.o and reg-m68k.o.
9207 * configure: Regenerated.
9208
fd7dd3e6
PA
92092009-11-16 Pedro Alves <pedro@codesourcery.com>
9210
9211 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9212 Pass it to thread_db_free.
9213 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9214 proper `detaching' argument to linux_remove_process.
9215 * linux-low.h (thread_db_free): Add `detaching' parameter.
9216 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9217 to thread_db_free.
9218 (thread_db_free): Add `detaching' parameter. Only
9219 call td_ta_clear_event if detaching from process.
9220
75aa492e
MK
92212009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9222
9223 * thread-db.c (thread_db_free): Fix typo.
9224
21e1bee4
PP
92252009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9226
9227 PR gdb/10838
9228 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9229
8838b45e
NS
92302009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9231
9232 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9233 with an i686 compiler.
9234 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9235 needed.
9236 * configure: Rebuilt.
9237
8a35fb51
SL
92382009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9239
9240 PR gdb/10783
9241
9242 * server.c (handle_search_memory_1): Correct read_addr initialization
9243 in loop for searching subsequent chunks.
9244
96f15937
PP
92452009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9246
9247 * configure.ac: New --with-libthread-db option.
9248 * thread-db.c: Allow direct dependence on libthread_db.
9249 (thread_db_free): Adjust.
9250 * config.in: Regenerate.
9251 * configure: Likewise.
889bf7c5 9252
5f7d1694
PP
92532009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9254
9255 PR gdb/10757
9256 * thread-db.c (attach_thread): New function.
9257 (maybe_attach_thread): Return success/failure.
9258 (find_new_threads_callback): Adjust.
889bf7c5
PA
9259 (thread_db_find_new_threads): Loop until no new threads.
9260
88e3b899
PA
92612009-10-13 Pedro Alves <pedro@codesourcery.com>
9262
9263 * proc-service.c (ps_lgetregs): Formatting.
9264
cdbfd419
PP
92652009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9266
9267 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9268 * configure.ac: Adjust.
9269 * linux-low.h (struct process_info_private): Move members to struct
9270 thread_db.
9271 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9272 * linux-low.c (linux_remove_process): Adjust.
9273 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9274 * server.c (handle_query): Move code ...
9275 (handle_monitor_command): ... here. New function.
9276 * target.h (struct target_ops): New member.
9277 * thread-db.c (struct thread_db): New.
9278 (libthread_db_search_path): New variable.
9279 (thread_db_create_event, thread_db_enable_reporting)
9280 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9281 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9282 (try_thread_db_load_1, dladdr_to_soname): New functions.
9283 (try_thread_db_load, thread_db_load_search): New functions.
9284 (thread_db_init): Search for libthread_db.
9285 (thread_db_free): New function.
9286 (thread_db_handle_monitor_command): Likewise.
9287 * config.in: Regenerate.
9288 * configure: Regenerate.
889bf7c5 9289
4168d2d6
UW
92902009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9291
9292 * spu-low.c (spu_kill): Wait for inferior to terminate.
9293 Call clear_inferiors.
9294 (spu_detach): Call clear_inferiors.
9295
81ecdfbb
RW
92962009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9297
9298 * aclocal.m4: Regenerate.
9299 * config.in: Likewise.
9300 * configure: Likewise.
9301
0b9ff2c0
UW
93022009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9303
9304 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9305 (parse_spufs_run): New function.
9306 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9307 (ppc_breakpoint_at): Handle SPU breakpoints.
9308
efcbbd14
UW
93092009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9310
9311 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9312 (SPUFS_MAGIC): Define.
9313 (spu_enumerate_spu_ids): New function.
9314 (linux_qxfer_spu): New function.
9315 (linux_target_ops): Install linux_qxfer_spu.
9316
f4d9bade
UW
93172009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9318
9319 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9320 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9321 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9322 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9323 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9324 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9325 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9326 (init_registers_powerpc_cell32l): Add prototype.
9327 (init_registers_powerpc_cell64l): Likewise.
9328 (ppc_arch_setup): Detect Cell/B.E. architecture.
9329
96e946ca
RW
93302009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9331
9332 * Makefile.in (datarootdir): New variable.
9333
58d6951d
DJ
93342009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9335
9336 * linux-low.c (linux_write_memory): Update debugging output.
9337 * Makefile.in (clean): Add new descriptions.
9338 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9339 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9340 * configure.srv: Add new files for arm*-*-linux*.
9341 * linux-arm-low.c: Add new declarations.
9342 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9343 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9344 (HWCAP_VFPv3D16): New.
9345 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9346 instead of __IWMMXT__.
9347 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9348 (arm_arch_setup): New.
9349 (target_regsets): Remove #ifdef. Add VFP regset.
9350 (the_low_target): Use arm_arch_setup.
9351
12b42a12
DJ
93522009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9353
9354 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9355 the main thread again.
9356
ac8c974e
AR
93572009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9358
9359 Adding Neutrino gdbserver.
9360 * configure: Regenerated.
9361 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9362 * configure.srv (i[34567]86-*-nto*): New target.
9363 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9364 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9365 (nto_comctrl) [__QNX__]: New function.
9366 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9367
4424e0c3 93682009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
9369
9370 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9371 srv_tgtobj.
9372
912cf4ba
PA
93732009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9374 Pedro Alves <pedro@codesourcery.com>
9375
9376 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9377 don't support CONTEXT_EXTENDED_REGISTERS.
9378 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9379 (the_low_target): Install them.
9380 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9381 failing with ERROR_PIPE_NOT_CONNECTED.
9382
aa5ca48f
DE
93832009-06-30 Doug Evans <dje@google.com>
9384 Pierre Muller <muller@ics.u-strasbg.fr>
9385
9386 Add h/w watchpoint support to x86-linux, win32-i386.
9387 * Makefile.in (SFILES): Add i386-low.c
9388 (i386_low_h): Define.
9389 (i386-low.o): Add dependencies.
9390 (linux-x86-low.o): Add i386-low.h dependency.
9391 (win32-i386-low.o): Ditto.
9392 * i386-low.c: New file.
9393 * i386-low.h: New file.
9394 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9395 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9396 * linux-low.c (linux_add_process): Initialize arch_private.
9397 (linux_remove_process): Free arch_private.
9398 (add_lwp): Initialize arch_private.
9399 (delete_lwp): Free arch_private.
9400 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9401 provided.
9402 * linux-low.h (process_info_private): New member arch_private.
9403 (lwp_info): New member arch_private.
9404 (linux_target_ops): New members new_process, new_thread,
9405 prepare_to_resume.
9406 (ptid_of): New macro.
9407 * linux-x86-low.c: Include stddef.h, i386-low.h.
9408 (arch_process_info): New struct.
9409 (arch_lwp_info): New struct.
9410 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9411 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9412 (i386_dr_low_get_status): New function.
9413 (x86_insert_point, x86_remove_point): New functions.
9414 (x86_stopped_by_watchpoint): New function.
9415 (x86_stopped_data_address): New function.
9416 (x86_linux_new_process, x86_linux_new_thread): New functions.
9417 (x86_linux_prepare_to_resume): New function.
9418 (the_low_target): Add entries for insert_point, remove_point,
9419 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9420 prepare_to_resume.
9421 * server.c (debug_hw_points): New global.
9422 (monitor_show_help): Document set debug-hw-points.
9423 (handle_query): Process "set debug-hw-points".
9424 * server.h (debug_hw_points): Declare.
9425 (paddress): Declare.
9426 * utils.c (NUMCELLS, CELLSIZE): New macros.
9427 (get_sell, xsnprintf, paddress): New functions.
9428 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9429 remove_point, stopped_by_watchpoint, stopped_data_address.
9430 * win32-i386-low.c: Include i386-low.h.
9431 (debug_reg_state): Replaces dr.
9432 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9433 (i386_dr_low_get_status): New function.
9434 (i386_insert_point, i386_remove_point): New functions.
9435 (i386_stopped_by_watchpoint): New function.
9436 (i386_stopped_data_address): New function.
9437 (i386_initial_stuff): Update.
9438 (get_thread_context,set_thread_context,i386_thread_added): Update.
9439 (the_low_target): Add entries for insert_point,
9440 remove_point, stopped_by_watchpoint, stopped_data_address.
9441 * win32-low.c (win32_insert_watchpoint): New function.
9442 (win32_remove_watchpoint): New function.
9443 (win32_stopped_by_watchpoint): New function.
9444 (win32_stopped_data_address): New function.
9445 (win32_target_ops): Add entries for insert_watchpoint,
9446 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9447 * win32-low.h (win32_target_ops): New members insert_point,
9448 remove_point, stopped_by_watchpoint, stopped_data_address.
9449
d993e290
PA
94502009-06-25 Pedro Alves <pedro@codesourcery.com>
9451
9452 * server.c (process_serial_event): Re-return unsupported, not
9453 error, if the type isn't recognized. Re-allow supporting only
9454 insert or remove packets. Also call require_running for
9455 breakpoints. Add missing break statement to default case. Tidy.
9456 * target.h (struct target_ops): Rename insert_watchpoint to
9457 insert_point, and remove_watchpoint to remove_point.
9458
9459 * linux-low.h (struct linux_target_ops): Likewise.
9460 * linux-low.c (linux_insert_watchpoint): Rename to ...
9461 (linux_insert_point): ... this. Adjust.
9462 (linux_remove_watchpoint): Rename to ...
9463 (linux_remove_point): ... this. Adjust.
9464 (linux_target_ops): Adjust.
9465 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9466 (cris_insert_point): ... this.
9467 (cris_remove_watchpoint): Rename to ...
9468 (cris_remove_point): ... this.
9469 (the_low_target): Adjust.
9470
0f54c268
PM
94712009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9472
9473 * server.c (handle_v_kill): Pass signal_pid to
9474 kill_inferior if multi_process is zero.
9475
c6314022
AR
94762009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9477
9478 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9479 * target.h (target_ops): Comment for *_watchpoint to make it clear
9480 the functions can get types '0' and '1'.
9481
4463ce24
AR
94822009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9483
9484 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9485 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9486 * regcache.c (get_regcache): Likewise.
9487 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9488 * win32-low.c (child_fetch_inferior_registers): Remove check for
9489 regno 0.
9490
cf8fd78b
PA
94912009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9492 Pedro Alves <pedro@codesourcery.com>
9493
9494 * target.h (struct target_ops) <supports_multi_process>: New
9495 callback.
9496 (target_supports_multi_process): New.
9497 * server.c (handle_query): Even if GDB reports support, only
9498 enable multi-process if the target also supports it. Report
9499 multi-process support only if the target backend supports it.
9500 * linux-low.c (linux_supports_multi_process): New function.
9501 (linux_target_ops): Install it as target_supports_multi_process
9502 callback.
9503
47c0c975
DE
95042009-05-24 Doug Evans <dje@google.com>
9505
e09875d4
DE
9506 Global renaming of find_thread_pid to find_thread_ptid.
9507 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9508 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9509 All callers updated.
9510
e27d73f6
DE
9511 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9512 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9513 directly.
9514
47c0c975
DE
9515 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9516 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9517 (linux_resume_one_lwp): Ditto.
9518
2acc282a
DE
95192009-05-23 Doug Evans <dje@google.com>
9520
9521 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9522 from struct inferior_list_entry * to struct lwp_info *.
9523 All callers updated.
9524
9f1036c1
DE
95252009-05-13 Doug Evans <dje@google.com>
9526
9527 * linux-x86-low.c: Don't include assert.h.
9528 (x86_siginfo_fixup): Use fatal, not assert.
9529 (x86_arch_setup): Fix comment.
9530
d0722149
DE
95312009-05-12 Doug Evans <dje@google.com>
9532
9533 Biarch support for i386/amd64 gdbserver.
9534 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9535 Add linux-x86-low.c.
9536 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9537 (linux-x86-low.o): Add.
9538 * linux-x86-64-low.c: Delete.
9539 * linux-i386-low.c: Delete.
9540 * linux-x86-low.c: New file.
9541 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9542 linux-x86-low.o.
9543 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9544 linux-x86-low.o.
9545 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9546 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9547 (linux_child_pid_to_exec_file): New function.
9548 (elf_64_header_p, elf_64_file_p): New functions.
9549 (siginfo_fixup): New function.
9550 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9551 give target a chance to convert layout.
9552 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9553 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9554
fdeb2a12
DE
95552009-05-07 Doug Evans <dje@google.com>
9556
9557 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9558 (regsets_store_inferior_registers): Ditto.
9559
a6dbe5df
PA
95602009-05-06 Pedro Alves <pedro@codesourcery.com>
9561
9562 PR server/10048
9563
9564 * linux-low.c (must_set_ptrace_flags): Delete.
9565 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9566 of the global.
9567 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9568 `lwp->must_set_ptrace_flags' instead.
ba42693b 9569 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
9570 (linux_wait_1): ... not here.
9571
5091eb23
DE
95722009-04-30 Doug Evans <dje@google.com>
9573
9f767825
DE
9574 * inferiors.c (started_inferior_callback): New function.
9575 (attached_inferior_callback): New function.
9576 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9577 * server.c (print_started_pid, print_attached_pid): New functions.
9578 (detach_or_kill_for_exit): New function.
9579 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9580 * server.h (have_started_inferiors_p): Declare.
9581 (have_attached_inferiors_p): Declare.
9582
5091eb23
DE
9583 * inferiors.c (remove_process): Fix memory leak, free process.
9584 * linux-low.c (linux_remove_process): New function.
9585 (linux_kill): Call it instead of remove_process.
9586 (linux_detach, linux_wait_1): Ditto.
9587
155c8968
PA
95882009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9589
9590 * configure.srv: Add x86 Windows CE target.
9591
7fe519cb
UW
95922009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9593
9594 * inferiors.c (get_thread_process): Make global.
9595 * server.h (get_thread_process): Add prototype.
9596 * thread-db.c (find_one_thread): Use get_thread_process
9597 instead of current_process.
9598 (thread_db_get_tls_address): Do not crash if called when
9599 thread layer is not yet initialized.
9600
5472f405
UW
96012009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9602
9603 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9604 * spu-low.c (current_tid): Rename to ...
9605 (current_ptid): ... this.
9606 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9607 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9608 ptid_get_lwp (current_ptid) instead of current_tid.
9609 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9610 instead of current_tid. Use find_process_pid to verify pid
9611 argument is valid. Pass proper argument to remove_process.
9612 (spu_thread_alive): Compare current_ptid instead of current_tid.
9613 (spu_resume): Likewise.
9614
55ac2b99
PA
96152009-04-02 Pedro Alves <pedro@codesourcery.com>
9616
9617 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9618 variable.
9619
95954743
PA
96202009-04-01 Pedro Alves <pedro@codesourcery.com>
9621
9622 Implement the multiprocess extensions, and add linux multiprocess
9623 support.
9624
9625 * server.h (ULONGEST): Declare.
9626 (struct ptid, ptid_t): New.
9627 (minus_one_ptid, null_ptid): Declare.
9628 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9629 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9630 (struct inferior_list_entry): Change `id' type from unsigned from
9631 to ptid_t.
9632 (struct sym_cache, struct breakpoint, struct
9633 process_info_private): Forward declare.
9634 (struct process_info): Declare.
9635 (current_process): Declare.
9636 (all_processes): Declare.
9637 (initialize_inferiors): Declare.
9638 (add_thread): Adjust to use ptid_t.
9639 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9640 (add_process, remove_process, find_thread_pid): Declare.
9641 (find_inferior_id): Adjust to use ptid_t.
9642 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9643 (multi_process): Declare.
9644 (push_event): Adjust to use ptid_t.
9645 (read_ptid, write_ptid): Declare.
9646 (prepare_resume_reply): Adjust to use ptid_t.
9647 (clear_symbol_cache): Declare.
9648 * inferiors.c (all_processes): New.
9649 (null_ptid, minus_one_ptid): New.
9650 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9651 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9652 (add_thread): Change unsigned long to ptid. Remove gdb_id
9653 parameter. Adjust.
9654 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9655 (gdb_id_to_thread): Rename to ...
9656 (find_thread_pid): ... this. Change unsigned long to ptid.
9657 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9658 (loaded_dll, pull_pid_from_list): Adjust.
9659 (add_process, remove_process, find_process_pid)
9660 (get_thread_process, current_process, initialize_inferiors): New.
9661 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9662 (struct target_waitstatus) <related_pid>: Ditto.
9663 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9664 return type to int.
9665 (struct target_ops) <join>: Add `pid' argument.
9666 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9667 (struct target_ops) <wait>: Add `ptid' field. Change return type
9668 to ptid.
9669 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9670 (mywait): Add `ptid' argument. Change return type to ptid_t.
9671 (target_pid_to_str): Declare.
9672 * target.c (set_desired_inferior): Adjust to use ptids.
9673 (mywait): Add new `ptid' argument. Adjust.
9674 (target_pid_to_str): New.
9675 * mem-break.h (free_all_breakpoints): Declare.
9676 * mem-break.c (breakpoints): Delelete.
9677 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9678 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9679 to use per-process breakpoint list.
9680 (free_all_breakpoints): New.
9681 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9682 (symbol_cache, all_symbols_looked_up): Delete.
9683 (hexchars): New.
9684 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9685 read_ptid): New.
9686 (prepare_resume_reply): Change ptid argument's type from unsigned
9687 long to ptid_t. Adjust. Implement W;process and X;process.
9688 (free_sym_cache, clear_symbol_cache): New.
9689 (look_up_one_symbol): Adjust to per-process symbol cache. *
9690 * server.c (cont_thread, general_thread, step_thread): Change type
9691 to ptid_t.
9692 (attached): Delete.
9693 (multi_process): New.
9694 (last_ptid): Change type to ptid_t.
9695 (struct vstop_notif) <ptid>: Change type to ptid_t.
9696 (queue_stop_reply, push_event): Change `ptid' argument's type to
9697 ptid_t.
9698 (discard_queued_stop_replies): Add `pid' argument.
9699 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9700 changes. Don't reference the `attached' global.
9701 (attach_inferior): Adjust to mywait interface changes.
9702 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9703 features. Handle and report "multiprocess+". Handle
9704 "qAttached:PID".
9705 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9706 changes.
9707 (handle_v_kill): New.
9708 (handle_v_stopped): Adjust to use target_pid_to_str.
9709 (handle_v_requests): Allow multiple attaches and runs when
9710 multiprocess extensions are in effect. Handle "vKill".
9711 (myresume): Adjust to use ptids.
9712 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9713 (handle_status): Adjust to discard_queued_stop_replies interface
9714 change.
9715 (first_thread_of, kill_inferior_callback)
9716 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9717 (main): Call initialize_inferiors. Adjust to use ptids, killing
9718 and detaching from all inferiors. Handle multiprocess packet
9719 variants.
9720 * linux-low.h: Include gdb_proc_service.h.
9721 (struct process_info_private): New.
9722 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9723 <lwpid_of>: Use ptid_get_lwp.
9724 (get_lwp_thread): Adjust.
9725 (struct lwp_info): Add `dead' member.
9726 (find_lwp_pid): Declare.
9727 * linux-low.c (thread_db_active): Delete.
9728 (new_inferior): Adjust comment.
9729 (inferior_pid): Delete.
9730 (linux_add_process): New.
9731 (handle_extended_wait): Adjust.
9732 (add_lwp): Change unsigned long to ptid.
9733 (linux_create_inferior): Add process to processes table. Adjust
9734 to use ptids. Don't set new_inferior here.
9735 (linux_attach_lwp): Rename to ...
9736 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9737 it. Adjust to use ptids.
9738 (linux_attach_lwp): New.
9739 (linux_attach): Add process to processes table. Don't set
9740 new_inferior here.
9741 (struct counter): New.
9742 (second_thread_of_pid_p, last_thread_of_process_p): New.
9743 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9744 multiple processes.
9745 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9746 processes. Remove process from process table.
9747 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9748 to multiple processes.
9749 (any_thread_of): New.
9750 (linux_detach): Add `pid' argument, and handle it. Remove process
9751 from processes table.
9752 (linux_join): Add `pid' argument. Handle it.
9753 (linux_thread_alive): Change unsighed long argument to ptid_t.
9754 Consider dead lwps as not being alive.
9755 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9756 threads we're not interested in.
9757 (same_lwp, find_lwp_pid): New.
9758 (linux_wait_for_lwp): Change `pid' argument's type from int to
9759 ptid_t. Adjust.
9760 (linux_wait_for_event): Rename to ...
9761 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9762 from int to ptid_t. Adjust.
9763 (linux_wait_for_event): New.
9764 (linux_wait_1): Add `ptid' argument. Change return type to
9765 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9766 that exit from the process table.
9767 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9768 Adjust.
9769 (mark_lwp_dead): New.
9770 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9771 stopping all threads, mark its main lwp as dead.
9772 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9773 ptids.
9774 (fetch_register, usr_store_inferior_registers)
9775 (regsets_fetch_inferior_registers)
9776 (regsets_store_inferior_registers, linux_read_memory)
9777 (linux_write_memory): Inline `inferior_pid'.
9778 (linux_look_up_symbols): Adjust to use per-process
9779 `thread_db_active'.
9780 (linux_request_interrupt): Adjust to use ptids.
9781 (linux_read_auxv): Inline `inferior_pid'.
9782 (initialize_low): Don't reference thread_db_active.
9783 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9784 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9785 (ps_getpid): Return the pid of the current inferior.
9786 * thread-db.c (proc_handle, thread_agent): Delete.
9787 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9788 per-process data.
9789 (find_one_thread): Change argument type to ptid_t. Adjust to
9790 per-process data.
9791 (maybe_attach_thread): Adjust to per-process data and ptids.
9792 (thread_db_find_new_threads): Ditto.
9793 (thread_db_init): Ditto.
9794 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9795 processes table. Adjust to use ptids.
9796 (spu_kill, spu_detach): Adjust interface. Remove process from
9797 processes table.
9798 (spu_join, spu_thread_alive): Adjust interface.
9799 (spu_wait): Adjust interface. Remove process from processes
9800 table. Adjust to use ptids.
9801 * win32-low.c (current_inferior_tid): Delete.
9802 (current_inferior_ptid): New.
9803 (debug_event_ptid): New.
9804 (thread_rec): Take a ptid. Adjust.
9805 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9806 (child_delete_thread): Ditto.
9807 (do_initial_child_stuff): Add `attached' argument. Add process to
9808 processes table.
9809 (child_fetch_inferior_registers, child_store_inferior_registers):
9810 Adjust.
9811 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9812 (win32_attach): Pass 1 to do_initial_child_stuff.
9813 (win32_kill): Adjust interface. Remove process from processes
9814 table.
9815 (win32_detach): Ditto.
9816 (win32_join): Adjust interface.
9817 (win32_thread_alive): Take a ptid.
9818 (win32_resume): Adjust to use ptids.
9819 (get_child_debug_event): Ditto.
9820 (win32_wait): Adjust interface. Remove exiting process from
9821 processes table.
9822
bd99dc85
PA
98232009-04-01 Pedro Alves <pedro@codesourcery.com>
9824
9825 Non-stop mode support.
9826
9827 * server.h (non_stop): Declare.
9828 (gdb_client_data, handler_func): Declare.
9829 (delete_file_handler, add_file_handler, start_event_loop):
9830 Declare.
9831 (handle_serial_event, handle_target_event, push_event)
9832 (putpkt_notif): Declare.
9833 * target.h (enum resume_kind): New.
9834 (struct thread_resume): Replace `step' field by `kind' field.
9835 (TARGET_WNOHANG): Define.
9836 (struct target_ops) <wait>: Add `options' argument.
9837 <supports_non_stop, async, start_non_stop>: New fields.
9838 (target_supports_non_stop, target_async): New.
9839 (start_non_stop): Declare.
9840 (mywait): Add `options' argument.
9841 * target.c (mywait): Add `options' argument. Print child exit
9842 notifications here.
9843 (start_non_stop): New.
9844 * server.c (non_stop, own_buf, mem_buf): New globals.
9845 (struct vstop_notif): New.
9846 (notif_queue): New global.
9847 (queue_stop_reply, push_event, discard_queued_stop_replies)
9848 (send_next_stop_reply): New.
9849 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9850 interface changes.
9851 (attach_inferior): In non-stop mode, don't wait for the target
9852 here.
9853 (handle_general_set): Handle QNonStop.
9854 (handle_query): When handling qC, return the current general
9855 thread, instead of the first thread of the list.
9856 (handle_query): If the backend supports non-stop mode, include
9857 QNonStop+ in the qSupported query response.
9858 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9859 and non-stop mode.
9860 (handle_v_attach, handle_v_run): Handle non-stop mode.
9861 (handle_v_stopped): New.
9862 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9863 (myresume): Adjust to use resume_kind. Handle non-stop.
9864 (queue_stop_reply_callback): New.
9865 (handle_status): Handle non-stop mode.
9866 (main): Clear non_stop flag on reconnection. Use the event-loop.
9867 Refactor serial protocol handling from here ...
9868 (process_serial_event): ... to this new function. When GDB
9869 selects any thread, select one here. In non-stop mode, wait until
9870 GDB acks all pending events before exiting.
9871 (handle_serial_event, handle_target_event): New.
9872 * remote-utils.c (remote_open): Install remote_desc in the event
9873 loop.
9874 (remote_close): Remove remote_desc from the event loop.
9875 (putpkt_binary): Rename to...
9876 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9877 (putpkt_binary): New as wrapper around putpkt_binary_1.
9878 (putpkt_notif): New.
9879 (prepare_resume_reply): In non-stop mode, don't change the
9880 general_thread.
9881 * event-loop.c: New.
9882 * Makefile.in (OBJ): Add event-loop.o.
9883 (event-loop.o): New rule.
9884
9885 * linux-low.h (pid_of): Moved here.
9886 (lwpid_of): New.
9887 (get_lwp_thread): Use lwpid_of.
9888 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9889 * linux-low.c (pid_of): Delete.
9890 (inferior_pid): Use lwpid_of.
9891 (linux_event_pipe): New.
9892 (target_is_async_p): New.
9893 (delete_lwp): New.
9894 (handle_extended_wait): Use lwpid_of.
9895 (add_lwp): Don't set lwpid field.
9896 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9897 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9898 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9899 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9900 first. Adjust to linux_wait_for_event interface changes. Use
9901 lwpid_of.
9902 (linux_detach): Don't delete the main lwp here.
9903 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9904 (status_pending_p): Don't consider explicitly suspended lwps.
9905 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9906 pointer. Add OPTIONS argument. Change return type to int. Use
9907 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9908 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9909 pointer. Add status pointer argument. Return a pid instead of a
9910 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9911 changes. In non-stop mode, don't switch to a random thread.
9912 (linux_wait): Rename to...
9913 (linux_wait_1): ... this. Add target_options argument, and handle
9914 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9915 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9916 clean exit and signal exit code. Don't stop all threads in
9917 non-stop mode. In all-stop mode, only stop all threads when
9918 reporting a stop to GDB. Handle explicit thread stop requests.
9919 (async_file_flush, async_file_mark): New.
9920 (linux_wait): New.
9921 (send_sigstop): Use lwpid_of.
9922 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9923 interface changes. In non-stop mode, don't switch to a random
9924 thread.
9925 (linux_resume_one_lwp): Use lwpid_of.
9926 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9927 (linux_resume_one_thread): ... this. Handle resume_stop. In
9928 non-stop mode, don't look for pending flag in all threads.
9929 (resume_status_pending_p): Don't consider explicitly suspended
9930 threads.
9931 (my_waitpid): Reimplement. Emulate __WALL.
9932 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9933 Use lwpid_of.
9934 (sigchld_handler, linux_supports_non_stop, linux_async)
9935 (linux_start_non_stop): New.
9936 (linux_target_ops): Register linux_supports_non_stop, linux_async
9937 and linux_start_non_stop.
9938 (initialize_low): Install SIGCHLD handler.
9939 * thread-db.c (thread_db_create_event, find_one_thread)
9940 (thread_db_get_tls_address): Use lwpid_of.
9941 * win32-low.c (win32_detach): Adjust to use resume_kind.
9942 (win32_wait): Add `options' argument.
9943 * spu-low.c (spu_resume): Adjust to use resume_kind.
9944 (spu_wait): Add `options' argument.
9945
5b1c542e
PA
99462009-04-01 Pedro Alves <pedro@codesourcery.com>
9947
9948 Decouple target code from remote protocol.
9949
9950 * target.h (enum target_waitkind): New.
9951 (struct target_waitstatus): New.
9952 (struct target_ops) <wait>: Return an unsigned long. Take a
9953 target_waitstatus pointer instead of a char pointer.
9954 (mywait): Likewise.
9955 * target.c (mywait): Change prototype to return an unsigned long.
9956 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9957 * server.h (thread_from_wait, old_thread_from_wait): Delete
9958 declarations.
9959 (prepare_resume_reply): Change prototype to take a
9960 target_waitstatus.
9961 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9962 (last_status, last_ptid): New.
9963 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9964 pid instead of a signal.
9965 (attach_inferior): Remove "status" and "signal" parameters.
9966 Adjust.
9967 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9968 not as an address.
9969 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9970 (handle_v_requests, myresume): Remove "status" and "signal"
9971 parameters. Adjust.
9972 (handle_status): New.
9973 (main): Delete local `status'. Adjust.
9974 * remote-utils.c: Include target.h.
9975 (prepare_resume_reply): Change prototype to take a
9976 target_waitstatus. Adjust.
9977
9978 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9979 interface.
9980 * spu-low.c (spu_wait): Adjust.
9981 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9982 Delete.
9983 (win32_wait): Adjust.
9984
2bd7c093
PA
99852009-04-01 Pedro Alves <pedro@codesourcery.com>
9986
9987 * target.h (struct thread_resume): Delete leave_stopped member.
9988 (struct target_ops): Add a `n' argument to the `resume' callback.
9989 * server.c (start_inferior): Adjust.
9990 (handle_v_cont, myresume): Adjust.
9991 * linux-low.c (check_removed_breakpoint): Adjust to resume
9992 interface change, and to removed leave_stopped field.
9993 (resume_ptr): Delete.
9994 (struct thread_resume_array): New.
9995 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9996 resume interface change.
9997 (linux_continue_one_thread, linux_queue_one_thread)
9998 (resume_status_pending_p): Check if the resume field is NULL
9999 instead of checking the leave_stopped member.
10000 (linux_resume): Adjust to the target resume interface change.
10001 * spu-low.c (spu_resume): Adjust to the target resume interface
10002 change.
10003 * win32-low.c (win32_detach, win32_resume): Ditto.
10004
c35fafde
PA
100052009-04-01 Pedro Alves <pedro@codesourcery.com>
10006
10007 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10008 flag.
10009 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10010 pending.
10011 (linux_continue_one_thread): Only preserve the stepping flag if
10012 there's a pending breakpoint.
10013
0a59d50b
PA
100142009-03-31 Pedro Alves <pedro@codesourcery.com>
10015
10016 * server.c (main): After the inferior having exited, call
10017 remote_close before exiting gdbserver.
10018
f04c6d38
TJB
100192009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
10020
10021 Fix size of FPSCR in Power 7 processors.
10022 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10023 (PPC_FEATURE_HAS_DFP): New #define.
10024 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10025 size of the FPSCR.
10026
78e5cee6
PA
100272009-03-23 Pedro Alves <pedro@codesourcery.com>
10028
10029 * server.c (handle_query) Whitespace and formatting.
10030
1b3f6016
PA
100312009-03-22 Pedro Alves <pedro@codesourcery.com>
10032
10033 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10034 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10035 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10036 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10037 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10038 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10039 Makefile.in, configure.ac: Fix whitespace throughout.
10040 * configure: Regenerate.
10041
a07b2135
PA
100422009-03-22 Pedro Alves <pedro@codesourcery.com>
10043
10044 * inferiors.c (find_inferior): Make it safe for the callback
10045 function to delete the currently iterated inferior.
10046
67cc2626
PA
100472009-03-22 Pedro Alves <pedro@codesourcery.com>
10048
10049 * Makefile.in (linuw_low_h): Move higher.
10050 (thread-db.o): Depend on $(linux_low_h).
10051
54a0b537
PA
100522009-03-17 Pedro Alves <pedro@codesourcery.com>
10053
10054 Rename "process" to "lwp" throughout.
10055
10056 * linux-low.c (all_processes): Rename to...
10057 (all_lwps): ... this.
10058 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10059 (add_process): Rename to ...
10060 (add_lwp): ... this. Adjust.
10061 (linux_create_inferior): Adjust.
10062 (linux_attach_lwp): Adjust.
10063 (linux_attach): Adjust.
10064 (linux_kill_one_process): Rename to ...
10065 (linux_kill_one_lwp): ... this. Adjust.
10066 (linux_kill): Adjust.
10067 (linux_detach_one_process): Rename to ...
10068 (linux_detach_one_lwp): ... this. Adjust.
10069 (linux_detach): Adjust.
10070 (check_removed_breakpoint): Adjust.
10071 (status_pending_p): Adjust.
10072 (linux_wait_for_process): Rename to ...
10073 (linux_wait_for_lwp): ... this. Adjust.
10074 (linux_wait_for_event): Adjust.
10075 (send_sigstop): Adjust.
10076 (wait_for_sigstop): Adjust.
10077 (stop_all_processes): Rename to ...
10078 (stop_all_lwps): ... this.
10079 (linux_resume_one_process): Rename to ...
10080 (linux_resume_one_lwp): ... this. Adjust.
10081 (linux_set_resume_request, linux_continue_one_thread)
10082 (linux_queue_one_thread, resume_status_pending_p)
10083 (usr_store_inferior_registers, regsets_store_inferior_registers)
10084 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10085 Adjust.
10086 * linux-low.h (get_process): Rename to ...
10087 (get_lwp): ... this. Adjust.
10088 (get_thread_process): Rename to ...
10089 (get_thread_lwp): ... this. Adjust.
10090 (get_process_thread): Rename to ...
10091 (get_lwp_thread): ... this. Adjust.
10092 (struct process_info): Rename to ...
10093 (struct lwp_info): ... this.
10094 (all_processes): Rename to ...
10095 (all_lwps): ... this.
10096 * proc-service.c (ps_lgetregs): Adjust.
10097 * thread-db.c (thread_db_create_event, find_one_thread)
10098 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10099
0b16c5cf
PA
101002009-03-14 Pedro Alves <pedro@codesourcery.com>
10101
10102 * server.c (handle_query): Handle "qAttached".
10103
32de4b9d
NS
101042009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10105
10106 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10107 GPLv3, update license URL.
10108
2aecd87f
DE
101092009-03-01 Doug Evans <dje@google.com>
10110
93efd302 10111 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
10112 (server_h): Add gdb_signals.h.
10113 (signals.o): Update.
10114 * server.h (target_signal_from_host,target_signal_to_host_p)
10115 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10116
86b1f9c5
PM
101172009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10118
10119 * remote-utils.c (getpkt): Also generate remote-debug
10120 information if noack_mode is set.
10121
4aa995e1
PA
101222009-02-06 Pedro Alves <pedro@codesourcery.com>
10123
10124 * server.c (handle_query): Report qXfer:siginfo:read and
10125 qXfer:siginfo:write as supported and handle them.
10126 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10127 * linux-low.c (linux_xfer_siginfo): New.
10128 (linux_target_ops): Set it.
10129
62709adf
PA
101302009-01-26 Pedro Alves <pedro@codesourcery.com>
10131
10132 * server.c (gdbserver_usage): Mention --remote-debug.
10133 (main): Accept '--remote-debug' switch.
10134
aef93bd7
DE
101352009-01-18 Doug Evans <dje@google.com>
10136
10137 * regcache.c (new_register_cache): No need to check result of xcalloc.
10138 * server.c (handle_search_memory): Back out calls to xmalloc,
10139 result is checked and error is returned to user upon failure.
10140 (handle_query): Ditto. Add more checks for result of malloc.
10141 (handle_v_cont): Check result of malloc, report error back to
10142 user upon failure.
10143 (handle_v_run): Ditto. Call freeargv.
10144 * server.h (freeargv): Declare.
10145 * utils.c (freeargv): New fn.
10146
54363045
DE
101472009-01-15 Doug Evans <dje@google.com>
10148
f626972c
DE
10149 * gdbreplay.c (perror_with_name): Make arg const char *.
10150 * server.h (target_signal_to_name): Make return type const char *.
0842e787 10151 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 10152 * utils.c (perror_with_name): Make arg const char *.
54363045 10153
18aae699
PA
101542009-01-14 Pedro Alves <pedro@codesourcery.com>
10155
10156 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10157 when handling a EXIT_PROCESS_DEBUG_EVENT.
10158
ff703abe
JB
101592009-01-06 Joel Brobecker <brobecker@adacore.com>
10160
10161 * gdbreplay.c (gdbreplay_version): Update copyright year.
10162 * server.c (gdbserver_version): Likewise.
10163
f21cc1a2 101642009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
10165
10166 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 10167 (handle_extended_wait): Improve comment.
0e21c1ec 10168
bca929d3
DE
101692008-12-13 Doug Evans <dje@google.com>
10170
10171 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10172 * server.h (ATTR_MALLOC): New macro.
10173 (xmalloc,xcalloc,xstrdup): Declare.
10174 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10175 * inferiors.c: Ditto.
10176 * linux-low.c: Ditto.
10177 * mem-break.c: Ditto.
10178 * regcache.c: Ditto.
10179 * remote-utils.c: Ditto.
10180 * server.c: Ditto.
10181 * target.c: Ditto.
10182 * win32-low.c: Ditto.
10183
97438e3f
DE
101842008-12-12 Doug Evans <dje@google.com>
10185
896c7fbb
DE
10186 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10187 in debugging printf.
10188
97438e3f
DE
10189 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10190
e3b886f8
DE
101912008-12-09 Doug Evans <dje@google.com>
10192
10193 * linux-low.h (struct process_info): Delete member tid, unused.
10194 * thread-db.c (find_one_thread): Update.
10195 (maybe_attach_thread): Update.
10196
07e059b5
VP
101972008-12-02 Pedro Alves <pedro@codesourcery.com>
10198
889bf7c5
PA
10199 * target.h (struct target_ops): Add qxfer_osdata member.
10200 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10201 and dirent.h.
10202 (linux_qxfer_osdata): New functions.
10203 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10204 callback.
10205 * server.c (handle_query): Handle "qXfer:osdata:read:".
10206 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10207 (buffer_xml_printf): New functions.
10208 * server.h (struct buffer): New.
10209 (buffer_grow_str, buffer_grow_str0): New macros.
10210 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10211 (buffer_xml_printf): Declare.
07e059b5 10212
4cab47ab
DE
102132008-11-24 Doug Evans <dje@google.com>
10214
10215 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10216
f142445f
DJ
102172008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10218
10219 * server.c (handle_v_run): Always use the supplied argument list.
10220
d0107bb6 102212008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 10222
d0107bb6
BW
10223 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10224 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 10225
2c4ad781
TJB
102262008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10227
10228 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10229 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10230 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10231 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10232 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10233 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10234 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10235 XML target descriptions.
10236 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10237 when inferior is running on an ISA 2.05 or later processor. Add
10238 special case to return offset for full 64-bit slot of FPSCR when
10239 in 32-bits.
10240
dfb64f85
DJ
102412008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10242
10243 * Makefile.in (SFILES, clean): Added sparc64 files.
10244 (reg-sparc64.o, reg-sparc64.c): New.
10245 * configure.srv (sparc*-*-linux*): New configuration.
10246 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10247 syscall arguments for SPARC.
10248 (regsets_store_inferior_registers): Likewise.
10249 * linux-sparc-low.c: New file.
10250
66b6e1dd
DE
102512008-10-21 Doug Evans <dje@google.com>
10252
10253 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10254 (READLINE_DIR,READLINE_DEP): Delete.
10255 (INTERNAL_CFLAGS): Update.
10256 (LINTFLAGS): Update.
10257
9b710a42
PA
102582008-10-10 Pedro Alves <pedro@codesourcery.com>
10259
10260 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10261 whole argv from the last run, not just argv[0].
10262
5822d809
PA
102632008-09-08 Pedro Alves <pedro@codesourcery.com>
10264
10265 * regcache.c (new_register_cache): Return NULL if the register
10266 cache size isn't known yet.
10267 (free_register_cache): Avoid dereferencing a NULL regcache.
10268
74aac56f
DJ
102692008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10270
10271 * configure.srv: Merge MIPS and MIPS64.
10272
400b20f5
MR
102732008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10274
10275 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10276
677c5bb1
LM
102772008-08-18 Luis Machado <luisgpm@br.ibm.com>
10278
10279 * Makefile.in: Add required vsx dependencies.
10280
10281 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10282 Declare init_registers_powerpc_vsx32l.
10283 Declare init_registers_powerpc_vsx64l.
10284 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10285 (ppc_arch_setup): Check for VSX in hwcap.
10286 (ppc_fill_vsxregset): New function.
10287 (ppc_store_vsxregset): New function.
10288 Add new VSX entry in regset_info target_regsets.
10289
10290 * configure.srv: Add new VSX dependencies.
10291
a6f3e723
SL
102922008-08-12 Pedro Alves <pedro@codesourcery.com>
10293
10294 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10295 (remote_open): Set or clear transport_is_reliable.
10296 (putpkt_binary): Don't expect acks in noack mode.
10297 (getpkt): Don't send ack/nac in noack mode.
10298 * server.c (handle_general_set): Handle QStartNoAckMode.
10299 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10300 qSupported.
10301 (main): Reset noack_mode on every connection.
10302 * server.h (noack_mode): Declare.
10303
a417dc56
RW
103042008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10305
10306 * Makefile.in (GDBREPLAY_OBS): New variable.
10307 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10308
3221518c
UW
103092008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10310 Daniel Jacobowitz <dan@codesourcery.com>
10311
10312 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10313 (usr_store_inferior_registers): Likewise.
10314 (regsets_store_inferior_registers): Likewise.
10315
ec56be1b
PA
103162008-07-31 Rolf Jansen <rj@surtec.com>
10317 Pedro Alves <pedro@codesourcery.com>
10318
10319 * configure.ac: Check for memmem declaration.
10320 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10321 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10322 (disable_packet_qfThreadInfo): Unconditionally compile.
10323 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10324 * configure, config.in: Regenerate.
10325
2fe5e3ff
DE
103262008-07-28 Doug Kwan <dougkwan@google.com>
10327
10328 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10329 (linux_write_memory): Remove declaration of errno.
10330
836acd6d
UW
103312008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10332
10333 * linux-low.c (handle_extended_wait): Do not use "status"
10334 variable uninitialized.
10335
aeba519e
PA
103362008-07-07 Pedro Alves <pedro@codesourcery.com>
10337
10338 * server.c (handle_v_attach): Inhibit reporting dll changes.
10339
db42f210
PA
103402008-06-27 Pedro Alves <pedro@codesourcery.com>
10341
10342 * remote-utils.c (prepare_resume_reply): If requested, don't
10343 output "thread:TID" in the T stop reply.
10344
10345 * server.c (disable_packet_vCont, disable_packet_Tthread)
10346 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10347 (handle_query): If requested, disable support for qC, qfThreadInfo
10348 and qsThreadInfo.
10349 (handle_v_requests): If requested, disable support for vCont.
10350 (gdbserver_show_disableable): New.
10351 (main): Handle --disable-packet and --disable-packet=LIST.
10352
10353 * server.h (disable_packet_vCont, disable_packet_Tthread)
10354 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10355
8e4c5421
CD
103562008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10357
10358 * server.c (gdbserver_usage): Mention --version.
10359
6e23a804
DJ
103602008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10361
10362 * Makefile.in (gdbreplay.o): New rule.
10363
90aa6a40
JM
103642008-06-06 Joseph Myers <joseph@codesourcery.com>
10365
10366 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10367 message, not gdbserver.
10368
c16158bc 103692008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
10370 Nathan Sidwell <nathan@codesourcery.com>
10371 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
10372
10373 * acinclude.m4: Include ../../config/acx.m4.
10374 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10375 * configure, config.in: Regenerate.
10376 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10377 * server.c (gdbserver_version): Print PKGVERSION.
10378 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10379 (main): Adjust gdbserver_usage calls.
10380 * gdbreplay.c (version, host_name): Add declarations.
10381 (gdbreplay_version, gdbreplay_usage): New.
10382 (main): Accept --version and --help options.
10383
aeb75bf5
DJ
103842008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10385
10386 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10387 (arm_breakpoint_at): Handle Thumb.
10388 (the_low_target): Add comment.
10389
76b233dd
UW
103902008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10391
10392 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10393
08388c79
DE
103942008-05-09 Doug Evans <dje@google.com>
10395
a3c83fae
DE
10396 * server.h (decode_search_memory_packet): Declare.
10397 * remote-utils.c (decode_search_memory_packet): New fn.
10398 * server.c (handle_search_memory_1): New fn.
08388c79
DE
10399 (handle_search_memory): New fn.
10400 (handle_query): Process qSearch:memory packets.
10401
bb9c3d36
UW
104022008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10403
10404 * regcache.c (registers_length): Remove.
10405 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10406 full register packet.
10407 * regcache.h (registers_length): Remove prototype.
10408 * server.h (PBUFSIZ): Define to 16384.
10409
7284e1be
UW
104102008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10411
10412 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10413 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10414 powerpc-64l.o, and powerpc-altivec64l.o.
10415 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10416 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10417 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10418 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10419 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10420 to srv_xmlfiles.
10421
10422 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10423 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10424 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10425 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10426 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10427 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10428 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10429 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10430 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10431 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10432 (clean): Update.
10433
10434 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10435 (init_registers_powerpc_32l): ... this new prototype.
10436 (init_registers_powerpc_32): Remove, replace by ...
10437 (init_registers_powerpc_altivec32l): ... this new prototype.
10438 (init_registers_powerpc_e500): Remove, replace by ...
10439 (init_registers_powerpc_e500l): ... this new prototype.
10440 (init_registers_ppc64): Remove, replace by ...
10441 (init_registers_powerpc_64l): ... this new prototype.
10442 (init_registers_powerpc_64): Remove, replace by ...
10443 (init_registers_powerpc_altivec64l): ... this new prototype.
10444 (ppc_num_regs): Set to 73.
10445 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10446 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10447 (ppc_cannot_store_register): Handle orig_r3 and trap.
10448 (ppc_arch_setup): Update init_registers_... calls.
10449 (ppc_fill_gregset): Handle orig_r3 and trap.
10450
10451 * inferiors.c (clear_inferiors): Reset current_inferior.
10452
fdc59709
PB
104532008-04-23 Paolo Bonzini <bonzini@gnu.org>
10454
889bf7c5
PA
10455 * acinclude.m4: Add override.m4.
10456 * configure: Regenerate.
fdc59709 10457
c9b2f845
UW
104582008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10459
10460 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10461 initial call to init_register_ppc64.
10462
550512b8
UW
104632008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10464
43aaf8b6
PA
10465 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10466 single powerpc*-*-linux* case.
550512b8
UW
10467 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10468
b6430ec3
UW
104692008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10470
10471 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 10472 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
10473 from reg_xmlfiles.
10474 * linux-ppc-low.c: Include <elf.h>.
10475 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10476 (ppc_hwcap): New global variable.
10477 (ppc_regmap): Remove __SPE__ #ifdef sections.
10478 (ppc_regmap_e500): New global variable.
10479 (ppc_cannot_store_register): Update __SPE__ special case.
10480 (ppc_get_hwcap): New function.
10481 (ppc_arch_setup): Use it to determine whether inferior supports
10482 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10483 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10484 Do not access registers if target does not support AltiVec.
10485 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10486 Do not access registers if target does not support SPE.
10487 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10488
52fa2412
UW
104892008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10490
10491 * linux-low.c (disabled_regsets, num_regsets): New.
10492 (use_regsets_p): Delete.
10493 (linux_wait_for_process): Clear disabled_regsets.
10494 (regsets_fetch_inferior_registers): Check and set it.
10495 (regsets_store_inferior_registers): Likewise.
10496 (linux_fetch_registers, linux_store_registers): Do not use
10497 use_regsets_p.
10498 (initialize_low): Allocate disabled_regsets.
10499
e28b3332
DJ
105002008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10501
10502 * Makefile.in (LIBOBJS): New.
10503 (OBS): Use LIBOBJS.
10504 (memmem.o): New rule.
10505 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10506 * configure: Regenerated.
10507
4536995d
UW
105082008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10509
10510 * server.c (handle_query): Never return "unsupported" for
10511 qXfer:features:read queries.
10512
221c031f
UW
105132008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10514
10515 * server.c (get_features_xml): Fix inverted condition.
10516 (handle_query): Always support qXfer:feature:read.
10517
ccd213ac
DJ
105182008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10519
10520 * server.c (wrapper_argv): New.
10521 (start_inferior): Handle wrapper_argv. If set, expect an extra
10522 trap.
10523 (gdbserver_usage): Document --wrapper.
10524 (main): Parse --wrapper.
10525
6fe305f7
UW
105262008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10527
10528 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10529 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10530 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10531 (ppc_set_pc): Likewise.
10532 (ppc_arch_setup): New function.
10533 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10534 of collect_register.
889bf7c5 10535 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 10536
5b0a002e
UW
105372008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10538
10539 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10540 instead of linux-ppc64-low.o.
10541 * linux-ppc64-low.c: Remove file.
10542 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10543 (linux-ppc64-low.o): Remove rule.
10544
10545 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10546 (init_registers_powerpc_64): Likewise.
10547 (ppc_regmap): Conditionally define depending on __powerpc64__.
10548 (ppc_cannot_store_register): Do not special-case "fpscr" when
10549 compiled on __powerpc64__.
10550 (ppc_collect_ptrace_register): New function.
10551 (ppc_supply_ptrace_register): New function.
10552 (ppc_breakpoint): Change type to "unsigned int".
10553 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10554 (the_low_target): Conditionally provide initializers for the
889bf7c5 10555 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
10556 collect_ptrace_register and supply_ptrace_register members.
10557
9b4b61c8
UW
105582008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10559
10560 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10561 * server.c (gdbserver_xmltarget): Define.
10562 (get_features_xml): Use it to replace "target.xml" and arch_string.
10563
10564 * configure.srv: Remove srv_xmltarget. Add XML files that were
10565 mentioned there to srv_xmlfiles instead. Remove conditional tests
10566 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10567 srv_xmlfiles and srv_regobj to include all possible choices.
10568 * configure.ac (srv_xmltarget): Remove.
10569 (srv_xmlfiles): Do not add "target.xml".
10570 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10571 checks for supplementary target information.
10572 * configure: Regenerate.
10573 * Makefile.in (XML_TARGET): Remove.
10574 (target.xml): Remove rule.
10575 (clean): Do not clean up target.xml.
10576 (.PRECIOUS): Do not mention target.xml.
10577
10578 * target.h (struct target_ops): Remove arch_string member.
10579 * linux-low.c (linux_arch_string): Remove.
10580 (linux_target_ops): Remove arch_string initializer.
10581 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10582 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10583 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10584 * spu-low.c (spu_arch_string): Remove.
10585 (spu_target_ops): Remove arch_string initializer.
10586 * win32-low.c (win32_arch_string): Remove.
10587 (win32_target_ops): Remove arch_string initializer.
10588 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10589 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10590 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10591
ee1a7ae4
UW
105922008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10593
10594 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10595 by collect_ptrace_register and supply_ptrace_register hooks.
10596 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10597 instead of checking for the_low_target.left_pad_xfer.
10598 (usr_store_inferior_registers): Use collect_ptrace_register callback
10599 instead of checking for the_low_target.left_pad_xfer.
10600
10601 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10602 (s390_supply_ptrace_register): Likewise.
10603 (s390_fill_gregset): Call s390_collect_ptrace_register.
10604 (the_low_target): Update.
10605
10606 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10607 (ppc_supply_ptrace_register): Likewise.
10608 (the_low_target): Update.
10609
10610 * linux-i386-low.c (the_low_target): Update.
10611 * linux-x86-64-low.c (the_low_target): Update.
10612
d61ddec4
UW
106132008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10614
10615 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10616 reg-s390.o and reg-s390x.o.
10617
10618 * linux-low.c (new_inferior): New global variable.
10619 (linux_create_inferior, linux_attach): Set it.
10620 (linux_wait_for_process): Call the_low_target.arch_setup after the
10621 target has stopped for the first time.
10622 (initialize_low): Do not call the_low_target.arch_setup.
10623
10624 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10625 (s390_set_pc): Likewise.
10626 (s390_arch_setup): New function.
10627 (the_low_target): Use s390_arch_setup as arch_setup routine.
10628
10629 * regcache.c (realloc_register_cache): New function.
10630 (set_register_cache): Call it for each existing regcache.
10631
d05b4ac3
UW
106322008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10633
10634 * server.h (init_registers): Remove prototype.
10635
10636 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10637 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10638 instead of init_registers ().
10639 * linux-arm-low.c (init_registers_arm): Add prototype.
10640 (init_registers_arm_with_iwmmxt): Likewise.
10641 (the_low_target): Add initializer for arch_setup field.
10642 * linux-cris-low.c (init_registers_cris): Add prototype.
10643 (the_low_target): Add initializer for arch_setup field.
10644 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10645 (the_low_target): Add initializer for arch_setup field.
10646 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10647 (the_low_target): Add initializer for arch_setup field.
10648 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10649 (the_low_target): Add initializer for arch_setup field.
10650 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10651 (the_low_target): Add initializer for arch_setup field.
10652 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10653 (the_low_target): Add initializer for arch_setup field.
10654 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10655 (init_registers_mips64_linux): Likewise.
10656 (the_low_target): Add initializer for arch_setup field.
10657 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10658 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10659 (the_low_target): Add initializer for arch_setup field.
10660 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10661 (init_registers_powerpc_64): Likewise.
10662 (the_low_target): Add initializer for arch_setup field.
10663 * linux-s390-low.c (init_registers_s390): Add prototype.
10664 (init_registers_s390x): Likewise.
10665 (the_low_target): Add initializer for arch_setup field.
10666 * linux-sh-low.c (init_registers_sh): Add prototype.
10667 (the_low_target): Add initializer for arch_setup field.
10668 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10669 (the_low_target): Add initializer for arch_setup field.
10670 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10671 (the_low_target): Add initializer for arch_setup field.
10672
10673 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10674 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10675 instead of init_registers ().
10676 * win32-arm-low.c (init_registers_arm): Add prototype.
10677 (the_low_target): Add initializer for arch_setup field.
10678 * win32-i386-low.c (init_registers_i386): Add prototype.
10679 (the_low_target): Add initializer for arch_setup field.
10680
10681 * spu-low.c (init_registers_spu): Add prototype.
10682 (initialize_low): Call initialie_registers_spu () instead of
10683 initialize_registers ().
10684
fd96d250
PA
106852008-02-19 Pedro Alves <pedro@codesourcery.com>
10686
10687 * server.c (handle_v_requests): When handling the vRun and vAttach
10688 packets, if already debugging a process, don't kill it. Return an
10689 error instead.
10690
d41b6bb4
DJ
106912008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10692
10693 * server.c (handle_query): Correct length check.
10694
5ac588cf
PA
106952008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10696
10697 * win32-low.c (do_initial_child_stuff): Add process handle
10698 parameter. Set current_process_handle and current_process_id from the
10699 parameters. Clear globals.
10700 (win32_create_inferior): Don't set current_process_handle and
10701 current_process_id here. Instead pass them on the call to
10702 do_initial_child_stuff.
10703 (win32_attach): Likewise.
10704 (win32_clear_inferiors): New.
10705 (win32_kill): Don't close the current process handle or the
10706 current thread handle here. Instead call win32_clear_inferiors.
10707 (win32_detach): Don't open a new handle to the process. Call
10708 win32_clear_inferiors.
10709 (win32_join): Don't rely on current_process_handle; open a new
10710 handle using the process id.
10711 (win32_wait): Call win32_clear_inferiors when the inferior process
10712 has exited.
10713
ecd7ecbc
DJ
107142008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10715
10716 * server.c (monitor_show_help): Add "exit".
10717
1525d545
MG
107182008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10719
ecd7ecbc 10720 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
10721 (clean): Add reg-xtensa.c.
10722 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
10723 * configure.srv (xtensa*-*-linux*) New target.
10724 * linux-xtensa-low.c: New.
10725 * xtensa-xtregs.c: New.
1525d545 10726
59a016f0
PA
107272008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10728
10729 * hostio.c: Don't include errno.h.
10730 (errno_to_fileio_errno): Move to hostio-errno.
10731 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10732 error number outputting to the target->hostio_last_error callback.
10733 (hostio_packet_error): Use FILEIO_EINVAL directly.
10734 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10735 calls to hostio_error.
10736 * hostio-errno.c: New.
10737 * server.h (hostio_last_error_from_errno): Declare.
10738 * target.h (target_ops): Add hostio_last_error member.
10739 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10740 as hostio_last_error handler.
889bf7c5 10741 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
10742 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10743 (wince_hostio_last_error): New functions.
10744 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10745 as hostio_last_error handler.
10746 (win32_target_ops) [!_WIN32_WCE]: Register
10747 hostio_last_error_from_errno as hostio_last_error handler.
10748 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10749 (hostio-errno.o): New rule.
10750 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10751 * configure.srv (srv_hostio_err_objs): New variable. Default to
10752 hostio-errno.o.
10753 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10754 * configure: Regenerate.
10755
2d717e4f
DJ
107562008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10757
10758 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10759 (linux_kill, linux_detach): Clean up the process list.
10760 * remote-utils.c (remote_open): Improve port number parsing.
10761 (putpkt_binary, input_interrupt): Only send interrupts if the target
10762 is running.
10763 * server.c (extended_protocol): Make static.
10764 (attached): Define earlier.
10765 (exit_requested, response_needed, program_argv): New variables.
10766 (target_running): New.
10767 (start_inferior): Clear attached here.
10768 (attach_inferior): Set attached here.
10769 (require_running): Define.
10770 (handle_query): Use require_running and target_running. Implement
10771 "monitor exit".
10772 (handle_v_attach, handle_v_run): New.
10773 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10774 (gdbserver_usage): Update.
10775 (main): Redo argument parsing. Handle --debug and --multi. Handle
10776 --attach along with other options or after the port. Save
10777 program_argv. Support no initial program. Resynchronize
10778 communication with GDB after an error. Handle "monitor exit".
10779 Use require_running and target_running. Always allow the extended
10780 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10781 restart in extended mode.
10782 * README: Refer to the GDB manual. Update --attach usage.
10783
7407e2de
AS
107842007-12-20 Andreas Schwab <schwab@suse.de>
10785
10786 * linux-low.c (STACK_SIZE): Define.
10787 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10788 (linux_test_for_tracefork): Likewise.
10789
b65d95c5
DJ
107902007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10791
10792 * linux-low.c (linux_wait_for_event): Update messages. Do not
10793 reinsert auto-delete breakpoints.
10794 * mem-break.c (struct breakpoint): Change return type of handler to
10795 int.
10796 (set_breakpoint_at): Update handler type.
10797 (reinsert_breakpoint_handler): Return 1 instead of calling
10798 delete_breakpoint.
10799 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10800 setting a new one.
10801 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10802 * mem-break.h (set_breakpoint_at): Update handler type.
10803 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10804 * win32-low.c (auto_delete_breakpoint): New.
10805 (get_child_debug_event): Use it.
10806
4e799345
DJ
108072007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10808
10809 * configure.ac: Check for pread and pwrite.
10810 * hostio.c (handle_pread): Fall back to lseek and read.
10811 (handle_pwrite): Fall back to lseek and write.
10812 * config.in, configure: Regenerated.
10813
27524b67
DJ
108142007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10815
10816 * server.c (myresume): Add own_buf argument.
10817 (main): Update calls.
10818
a20d5e98
DJ
108192007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10820
10821 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10822 * remote-utils.c (remote_open): Do not call disable_async_io.
10823 (block_async_io): Delete.
10824 (unblock_async_io): Make static.
10825 (initialize_async_io): New.
10826 * server.c (handle_v_cont): Handle async I/O here.
10827 (myresume): Likewise. Move other common resume tasks here...
10828 (main): ... from here. Call initialize_async_io. Disable async
10829 I/O before the main loop.
10830 * server.h (initialize_async_io): Declare.
10831 (block_async_io, unblock_async_io): Delete prototypes.
10832 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10833
b79d787e
DJ
108342007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10835
10836 * remote-utils.c (readchar): Allow binary data in received messages.
10837
d97903b2
PA
108382007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10839
10840 * win32-low.c (attaching): New global.
10841 (win32_create_inferior): Clear the `attaching' global.
10842 (win32_attach): Set the `attaching' global.
10843 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10844 attaching. Only set a breakpoint at the entry point if not
10845 attaching.
10846
311de423
PA
108472007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10848
10849 * server.c (main): Don't report dll events on the initial
10850 connection on attaches.
10851
6c2d16d2
PA
108522007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10853
10854 * server.c (main): Relax numerical bases supported for the pid of
10855 the --attach command line argument.
10856
5ca906e6
PA
108572007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10858
10859 * win32-low.c (win32_attach): Call OpenProcess before
10860 DebugActiveProcess, not after. Add last error output to error
10861 call.
10862
9c6c8194
PA
108632007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10864
10865 * win32-low.c (win32_get_thread_context)
10866 (win32_set_thread_context): New functions.
10867 (thread_rec): Use win32_get_thread_context.
10868 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10869 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10870 field.
10871
4d5d1aaa
PA
108722007-12-03 Leo Zayas
10873 Pedro Alves <pedro_alves@portugalmail.pt>
10874
10875 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10876 global variables.
10877 (child_add_thread): Minor cleanup.
10878 (child_continue): Resume artificially suspended threads before
10879 calling ContinueDebugEvent.
10880 (suspend_one_thread): New.
10881 (fake_breakpoint_event): New.
10882 (get_child_debug_event): Change return type to int. Check here if
10883 gdb sent an interrupt request. If a soft interrupt was requested,
10884 fake a breakpoint event. Return 0 if there is no event to handle,
10885 and 1 otherwise.
10886 (win32_wait): Don't check here if gdb sent an interrupt request.
10887 Ensure there is a valid event to handle.
10888 (win32_request_interrupt): Add soft interruption method as last
10889 resort.
10890
c436e841
PA
108912007-12-03 Leo Zayas
10892 Pedro Alves <pedro_alves@portugalmail.pt>
10893
10894 * win32-low.h (win32_thread_info): Add descriptions to the
10895 structure members. Replace `suspend_count' counter by a
10896 `suspended' flag.
10897 * win32-low.c (thread_rec): Update condition of when to get the
10898 context from the inferior. Rely on ContextFlags being set if it
10899 has already been retrieved. Only suspend the inferior thread if
10900 we haven't already. Warn if that fails.
10901 (continue_one_thread): s/suspend_count/suspended/. Only call
10902 ResumeThread once. Warn if that fails.
10903
e7b5fa67
PA
109042007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10905
10906 * win32-low.c (win32_wait): Don't read from the inferior when it
10907 has already exited.
10908
a385171d
PA
109092007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10910
10911 * Makefile.in (win32_low_h): New variable.
10912 (win32-low.o): Add dependency on $(win32_low_h).
10913 (win32-arm-low.o, win32-i386-low.o): New rules.
10914
f80c84b3
DJ
109152007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10916
10917 * hostio.c: Correct copyright year.
10918
a6b151f1
DJ
109192007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10920
10921 * Makefile.in (OBS): Add hostio.o.
10922 (hostio.o): New rule.
10923 * server.h (handle_vFile): Declare.
10924 * hostio.c: New file.
10925 * server.c (handle_v_requests): Take packet_len and new_packet_len
10926 for binary packets. Call handle_vFile.
10927 (main): Update call to handle_v_requests.
10928
f9387fc3
DJ
109292007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10930
10931 * linux-low.c: Include <sched.h>.
10932
51c2684e
DJ
109332007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10934
10935 * linux-low.c (linux_tracefork_grandchild): New.
10936 (linux_tracefork_child): Use clone.
10937 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10938
75f83163
JB
109392007-10-31 Joel Brobecker <brobecker@adacore.com>
10940
10941 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10942
da5898ce
DJ
109432007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10944
10945 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10946
24a09b5f
DJ
109472007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10948
10949 * inferiors.c (change_inferior_id): Delete.
10950 (add_pid_to_list, pull_pid_from_list): New.
10951 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10952 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10953 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10954 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10955 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10956 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10957 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10958 (using_threads): Always set to 1.
10959 (handle_extended_wait): New.
10960 (add_process): Do not set TID.
10961 (linux_create_inferior): Set must_set_ptrace_flags.
10962 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10963 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10964 (linux_thread_alive): Rename TID argument to LWPID.
10965 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10966 (linux_wait_for_event): Do not use TID or check using_threads. Update
10967 call to dead_thread_notify. Call handle_extended_wait.
10968 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10969 (send_sigstop): Delete sigstop_sent.
10970 (wait_for_sigstop): Avoid TID.
10971 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10972 (linux_test_for_tracefork): New.
10973 (linux_lookup_signals): Use thread_db_active and
10974 linux_supports_tracefork_flag.
10975 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10976 * linux-low.h (get_process_thread): Avoid TID.
10977 (struct process_ifo): Move thread_known and tid to the end. Remove
10978 sigstop_sent.
10979 (linux_attach_lwp, thread_db_init): Update prototypes.
10980 * server.h (change_inferior_id): Delete prototype.
10981 (add_pid_to_list, pull_pid_from_list): New prototypes.
10982 * thread-db.c (thread_db_use_events): New.
10983 (find_first_thread): Rename to...
10984 (find_one_thread): ...this. Update callers and messages. Do not
10985 call fatal. Check thread_db_use_events. Do not call
10986 change_inferior_id or new_thread_notify.
10987 (maybe_attach_thread): Update. Do not call new_thread_notify.
10988 (thread_db_init): Set thread_db_use_events. Check use_events.
10989 * utils.c (fatal, warning): Correct message prefix.
10990
30ed0a8f
DJ
109912007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10992
10993 * Makefile.in (clean): Remove new files.
10994 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10995 (powerpc-64.o, powerpc-64.c): New rules.
10996 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10997 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10998 with SPE.
10999 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11000 SPE targets.
11001 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11002 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11003 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11004 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11005 (target_regsets): Add AltiVec and SPE register sets.
11006 * configure.ac: Check for AltiVec and SPE.
11007 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11008 (ppc_fill_vrregset, ppc_store_vrregset): New.
11009 (target_regsets): Add AltiVec register set.
11010 * configure: Regenerated.
11011
fd462a61
DJ
110122007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
11013
11014 * linux-low.c (O_LARGEFILE): Define.
11015 (linux_read_memory): Use /proc/PID/mem.
11016 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
11017 * configure, config.in: Regenerated.
11018
69f223ed
DJ
110192007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11020
11021 * linux-low.c (linux_wait_for_event): Do not pass signals while
11022 single-stepping.
11023
aec18585
PA
110242007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11025
11026 * win32-low.c (create_process): New.
11027 (win32_create_inferior): Use create_process instead of
11028 CreateProcess. If create_process failed retry appending an ".exe"
11029 suffix. Store the GetLastError result immediatelly after
11030 create_process calls and use it on the call to error.
11031
34d86ddd
PA
110322007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11033
11034 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11035
5a0e3bd0
JB
110362007-08-23 Joel Brobecker <brobecker@adacore.com>
11037
11038 * configure.ac: Switch license to GPLv3.
11039
f88c79e6
MS
110402007-08-01 Michael Snyder <msnyder@access-company.com>
11041
11042 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11043
6b3d9b83
PA
110442007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
11045
11046 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11047 typedef.
11048 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11049 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
11050 CloseToolhelp32Snapshot.
11051 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11052 CloseToolhelp32Snapshot.
11053
c588c53c
MS
110542007-07-27 Michael Snyder <michael.snyder@access-company.com>
11055
11056 * server.c (main): Check for inferior exit before main loop.
11057
aa0403d9
PA
110582007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
11059
11060 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11061 instead of on tmp_desc.
11062
255e7678
DJ
110632007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11064 Daniel Jacobowitz <dan@codesourcery.com>
11065
11066 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11067 (add_thread): Minor cleanups.
11068 (clear_inferiors): Move lower in the file. Clear the DLL
11069 list.
11070 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11071 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11072 (xml_escape_text): New.
11073 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11074 for qSupported.
11075 (handle_v_cont): Report errors.
11076 (gdbserver_version): Update.
11077 (main): Correct size of own_buf. Do not report initial DLL events.
11078 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11079 (unloaded_dll, xml_escape_text): New.
11080 * win32-low.c (enum target_waitkind): Update comments.
11081 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11082 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11083 (win32_EnumProcessModules, win32_GetModuleInformation)
11084 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11085 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11086 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11087 (win32_Module32First, win32_Module32Next, load_toolhelp)
11088 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11089 (get_child_debug_event): Handle DLL events.
11090 (win32_wait): Likewise.
11091
0d37add9
DJ
110922007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11093
11094 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11095 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11096
45e2715e
PA
110972007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11098
11099 * win32-low.c (handle_output_debug_string): Ignore event if not
11100 waiting.
11101
c5674cf1
PA
111022007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11103
11104 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11105
2bbe3cc1
DJ
111062007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11107
11108 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11109
ae13219e
DJ
111102007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11111
11112 * inferiors.c (change_inferior_id): Add comment.
11113 * linux-low.c (check_removed_breakpoint): Add an early
11114 prototype. Improve debug output.
11115 (linux_attach): Doc update.
11116 (linux_detach_one_process, linux_detach): Clean up before releasing
11117 each process.
11118 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11119 * linux-low.h (struct process_info): Doc improvement.
11120 * mem-break.c (delete_all_breakpoints): New.
11121 * mem-break.h (delete_all_breakpoints): New prototype.
11122 * thread-db.c (find_first_thread): New.
11123 (thread_db_create_event): Call it instead of
11124 thread_db_find_new_threads. Clean up unused variables.
11125 (maybe_attach_thread): Remove first thread handling.
11126 (thread_db_find_new_threads): Use find_first_thread.
11127 (thread_db_get_tls_address): Likewise.
11128
4105de34
DJ
111292007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11130
11131 * thread-db.c (thread_db_find_new_threads): Add prototype.
11132 (thread_db_create_event): Check for the main thread before adding
11133 a new thread.
11134 (maybe_attach_thread): Only enable event reporting if TID == 0.
11135 (thread_db_get_tls_address): Check for new threads.
11136
2b876972
DJ
111372007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11138
11139 * linux-low.c (linux_create_inferior): Try execv before execvp.
11140 * spu-low.c (spu_create_inferior): Likewise.
11141
7a245884
DJ
111422007-06-13 Mike Frysinger <vapier@gentoo.org>
11143
11144 * linux-low.c (linux_create_inferior): Change execv to execvp.
11145 * spu-low.c (spu_create_inferior): Likewies.
11146
117ce543
DJ
111472007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11148
11149 * Makefile.in (clean): Clean new files instead of deleted ones.
11150 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11151 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11152 rules.
11153 * configure.srv: Specify XML files and new regformats for MIPS and
11154 MIPS64 GNU/Linux.
11155 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11156 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11157 an entry for the restart register.
11158 (mips_cannot_fetch_register, mips_cannot_store_register)
11159 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11160 register names to match the XML descriptions.
11161 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11162 restart register instead of $0.
11163
0e7f50da
UW
111642007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11165 Markus Deuling <deuling@de.ibm.com>
11166
11167 * remote-utils.c (decode_xfer_write): New function.
11168 * server.h (decode_xfer_write): Add prototype.
11169 * server.c (handle_query): Add PACKET_LEN argument. Support
11170 qXfer:spu:read and qXfer:spu:write packets.
11171 (main): Pass packet_len to handle_query.
11172 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11173 * target.h (target_ops): Add qxfer_spu.
11174
374c1d38
UW
111752007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11176
11177 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11178 accessing non-seekable spufs files.
11179
bb63802a
UW
111802007-05-16 Markus Deuling <deuling@de.ibm.com>
11181
889bf7c5 11182 * server.c (handle_query): Add reply for qC packet.
bb63802a 11183
7390519e
PA
111842007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11185 Leo Zayas <lerele@champenstudios@com>
11186
11187 * server.h (check_remote_input_interrupt_request): New function.
11188 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11189 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11190 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11191 (check_remote_input_interrupt_request): New function.
11192 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 11193 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
11194 winapi_GenerateConsoleCtrlEvent): New typedefs.
11195 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11196 to 250 ms.
11197 (win32_wait): Check for remote interrupt request
11198 with check_remote_input_interrupt_request.
11199 (win32_request_interrupt): New function.
11200 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11201
34b34921
PA
112022007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11203
11204 * win32-low.c (debug_registers_changed,
11205 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11206 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11207 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11208 (thread_rec): Get context using the low target.
11209 (child_add_thread): Call thread_added on the low target,
11210 which does the same thing.
11211 (regptr): Delete.
11212 (do_initial_child_stuff): Remove debug registers references.
11213 Set context using the low target. Resume threads after
11214 setting the contexts.
11215 (child_continue): Remove dead variable. Remove debug
11216 registers references.
11217 (child_fetch_inferior_registers): Go through the low target.
11218 (do_child_store_inferior_registers): Remove.
11219 (child_store_inferior_registers): Go through the low target.
11220 (win32_resume): Remove debug registers references.
11221 Set context using the low target.
11222 (handle_exception): Change return type to void. Don't record
11223 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11224 first chance exception.
889bf7c5 11225 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
11226 goto loop. Always return after waiting for debug event.
11227 (win32_wait): Convert to switch statement. Handle spurious
11228 events.
11229
11230 * win32-i386-low.c (debug_registers_changed,
11231 debug_registers_used): New.
11232 (initial_stuff): Rename to ...
11233 (i386_initial_stuff): ... this. Clear debug registers
11234 state variables.
11235 (store_debug_registers): Delete.
11236 (i386_get_thread_context): New.
11237 (load_debug_registers): Delete.
11238 (i386_set_thread_context): New.
11239 (i386_thread_added): New.
11240 (single_step): Rename to ...
11241 (i386_single_step): ... this.
11242 (do_fetch_inferior_registers): Rename to ...
11243 (i386_fetch_inferior_register): ... this.
11244 (i386_store_inferior_register): New.
11245 (the_low_target): Adapt to new interface.
11246
11247 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11248 (arm_get_thread_context): New.
11249 (arm_set_thread_context): New.
11250 (regptr): New.
11251 (do_fetch_inferior_registers): Rename to ...
11252 (arm_fetch_inferior_register): ... this.
11253 (arm_store_inferior_register): New.
11254 (arm_wince_breakpoint): Reimplement as unsigned long.
11255 (arm_wince_breakpoint_len): Define.
11256 (the_low_target): Adapt to new interface.
11257
11258 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11259 load_debug_registers. Add get_thread_context, set_thread_context,
11260 thread_added and store_inferior_register. Rename
11261 fetch_inferior_registers to fetch_inferior_register.
11262 (regptr): Remove declaration.
11263
dd6953e1
PA
112642007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11265
11266 * linux-low.c (linux_detach): Change return type to int. Return 0.
11267 * spu-low.c (spu_detach): Likewise.
11268
444d6139
PA
112692007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11270
11271 * target.h (target_ops): Change return type of detach to int.
11272 Add join.
11273 (join_inferior): New.
11274 * server.c (main): Don't skip detach support on mingw32.
11275 If the inferior doesn't support detaching return error.
11276 Call join_inferior instead of using waitpid.
11277 * linux-low.c (linux_join): New.
11278 (linux_target_op): Add linux_join.
11279 * spu-low.c (spu_join): New.
11280 (spu_target_ops): Add spu_join.
11281 * win32-low.c (win32_detach): Adapt to new interface.
11282 Reopen current_process_handle before detaching. Issue a child
11283 resume before detaching.
11284 (win32_join): New.
11285 (win32_target_op): Add win32_join.
11286
1d5315fe
PA
112872007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11288
11289 * win32-low.c (win32-attach): Fix return value.
11290 * target.h (target_ops): Describe ATTACH return values.
11291
bf914831
PA
112922007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11293
11294 * win32-low.c (GETPROCADDRESS): Define.
11295 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11296 (winapi_DebugSetProcessKillOnExit): Likewise.
11297 (win32_create_inferior): Force usage of ansi CreateProcessA.
11298 (win32_attach): Use GETPROCADDRESS.
11299 (win32_detach): Likewise.
11300
f72f3e60
PA
113012007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11302
11303 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11304
ed50f18f
PA
113052007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11306
11307 * win32-low.c: Commit leftover changes from 2007-03-29.
11308
0c2ead7e
DJ
113092007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11310
11311 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11312 fields short instead of int. Add explicit padding.
11313 (i387_cache_to_fsave): Remove unnecessary casts.
11314 (i387_fsave_to_cache): Doc fix.
11315 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11316
73725ff3
DJ
113172007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11318
11319 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11320 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11321
d99f33d8
PA
113222007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11323
11324 * configure.srv (arm*-*-mingw32ce*): Move near the other
11325 arm targets.
11326
68070c10
PA
113272007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11328
2482afc6 11329 * configure.ac: Add errno checking.
68070c10
PA
11330 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11331 sys/file.h and malloc.h.
11332 (AC_CHECK_DECLS): Add perror.
11333 (srv_mingwce): Handle.
2482afc6 11334 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
11335 win32-i386-low.o to srv_tgtobj.
11336 (i[34567]86-*-mingw*): Likewise.
11337 (arm*-*-mingw32ce*): Add case.
11338 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11339 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11340 [__MINGW32CE__] (strerror): New function.
11341 [__MINGW32CE__] (errno): Define to GetLastError.
11342 [__MINGW32CE__] (COUNTOF): New macro.
11343 (remote_open): Remove extra close call.
11344 * mem-break.c (delete_breakpoint_at): New function.
11345 * mem-break.h (delete_breakpoint_at): Declare.
11346 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11347 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11348 [USE_WIN32API] (read, write): Add char* casts.
11349 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11350 * server.h: Include wincecompat.h on Windows CE.
11351 [HAVE_ERRNO_H]: Check.
11352 (perror): Declare if not declared.
11353 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11354 (perror_with_name): Remove errno declaration.
11355 * wincecompat.h: New.
11356 * wincecompat.c: New.
11357 * win32-low.h: New.
11358 * win32-arm-low.c: New.
11359 * win32-i386-low.c: New.
11360 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11361 (OUTMSG2): Make it safe.
11362 (_T): New macro.
11363 (COUNTOF): New macro.
11364 (NUM_REGS): Get it from the low target.
11365 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11366 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11367 (thread_rec): Let low target handle debug registers.
11368 (child_add_thread): Likewise.
11369 (child_init_thread_list): Likewise.
11370 (continue_one_thread): Likewise.
11371 (regptr): New.
11372 (do_child_fetch_inferior_registers): Move to ...
11373 * win32-i386-low.c: ... here, and rename to ...
11374 (do_fetch_inferior_registers): ... this.
889bf7c5 11375 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
11376 Go through the low target.
11377 (do_child_store_inferior_registers): Use regptr.
11378 (strwinerror): New function.
11379 (win32_create_inferior): Handle Windows CE.
11380 Use strwinerror instead of strerror on Windows error
11381 codes. Add program to the error output.
11382 Don't close the main thread handle on Windows CE.
11383 (win32_attach): Use coredll.dll on Windows CE.
11384 (win32_kill): Close current process and current
11385 thread handles.
11386 (win32_detach): Use coredll.dll on Windows CE.
11387 (win32_resume): Let low target handle debug registers, and
11388 step request.
11389 (handle_exception): Add/Remove initial breakpoint. Avoid
11390 non-existant WSTOPSIG on Windows CE.
11391 (win32_read_inferior_memory): Cast to remove warning.
11392 (win32_arch_string): Go through the low target.
11393 (initialize_low): Call set_breakpoint_data with the low
11394 target's breakpoint.
11395 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11396 FOP_REGNUM, mappings): Move to ...
11397 * win32-i386-low.c: ... here.
11398 * win32-low.c (win32_thread_info): Move to ...
11399 * win32-low.h: ... here.
11400 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11401 win32-arm-low.c and wincecompat.c.
11402 (all:): Add $EXEEXT.
11403 (install-only:): Likewise.
11404 (gdbserver:): Likewise.
11405 (gdbreplay:): Likewise.
11406 * config.in: Regenerate.
11407 * configure: Regenerate.
11408
41093d81
PA
114092007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11410
11411 * win32-low.c: Rename typedef thread_info to
11412 win32_thread_info throughout.
11413
544afa54
PA
114142007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11415
11416 * win32-i386-low.c: Rename to ...
11417 * win32-low.c: ... this.
11418 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11419 * Makefile.in: Likewise.
11420
bce7165d
PA
114212007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11422
11423 * remote-utils.c (monitor_output): Constify msg parameter.
11424 * server.h (monitor_output): Likewise.
11425 * win32-i386-low.c (handle_output_debug_string): New.
11426 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11427 handle_output_debug_string.
11428 (get_child_debug_event): Likewise.
11429
506c7aa0
DJ
114302007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11431
11432 * server.c (main): Correct strtoul check.
11433
42c81e2a
DJ
114342007-03-27 Jon Ringle <jon@ringle.org>
11435
11436 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11437
9453113a
DJ
114382007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11439
11440 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11441
64a69107
DJ
114422007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11443
11444 * terminal.h: Check HAVE_SGTTY_H.
11445
114462007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
11447
11448 * remote-utils.c (remote_open): Print out the assigned port number.
11449
c74d0ad8
DJ
114502007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11451
11452 * remote-utils.c (monitor_output): New function.
11453 * server.c (debug_threads): Define here.
11454 (monitor_show_help): New function.
11455 (handle_query): Handle qRcmd.
11456 (main): Do not handle 'd' packet.
11457 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11458 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11459 of debug_threads.
11460
de7c3b4a
PA
114612007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11462
11463 * Makefile.in (EXEEXT): New.
11464 (clean): Use $(EXEEXT).
11465
ef57601b
PA
114662007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11467
11468 * target.h (target_ops): Rename send_signal to request_interrupt,
11469 and remove enum target_signal parameter.
11470 * linux-low.c (linux_request_interrupt): Rename from
11471 linux_send_signal, and always send SIGINT.
11472 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11473 and always send SIGINT.
11474 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11475 of send_signal.
11476 (input_interrupt): Likewise.
11477
820f2bda
PA
114782007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11479
11480 * server.c (get_features_xml): Check if target implemented
11481 arch_string.
11482 * win32-i386-low.c (win32_arch_string): New.
11483 (win32_target_ops): Add win32_arch_string as arch_string member.
11484
ab39bf24
UW
114852007-02-22 Markus Deuling <deuling@de.ibm.com>
11486
11487 * spu-low.c (spu_arch_string): New.
11488 (spu_target_ops): Add spu_arch_string.
11489
61ff6e04
DJ
114902007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11491
11492 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11493 * configure.ac: Do not check for terminal.h.
11494 * configure, config.in: Regenerated.
11495
fb1e4ffc
DJ
114962007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11497
11498 * Makefile.in (OBS): Add $(XML_BUILTIN).
11499 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11500 (clean): Update.
11501 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11502 (arm-with-iwmmxt.c): New.
11503 * config.in, configure: Regenerate.
11504 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11505 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11506 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11507 (arm*-*-linux*): Add iWMMXt and regset support.
11508 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11509 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11510 (arm_store_wmmxregset, target_regsets): New.
11511 * server.c (get_features_xml): Take annex argument. Check builtin
11512 XML documents.
11513 (handle_query): Handle multiple annexes.
11514
0f48aa01
DJ
115152007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11516
11517 * remote-utils.c [USE_WIN32API] (read, write): Define.
11518 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11519 write.
11520
23181151
DJ
115212007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11522
11523 * linux-i386-low.c (the_low_target): Set arch_string.
11524 * linux-x86-64-low.c (the_low_target): Likewise.
11525 * linux-low.c (linux_arch_string): New.
11526 (linux_target_ops): Add it.
11527 * linux-low.h (struct linux_target_ops): Add arch_string.
11528 * server.c (write_qxfer_response): Use const void * for DATA.
11529 (get_features_xml): New.
11530 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11531 * target.h (struct target_ops): Add arch_string method.
11532
9d606399
DJ
115332007-01-03 Denis Pilat <denis.pilat@st.com>
11534 Daniel Jacobowitz <dan@codesourcery.com>
11535
11536 * linux-low.c (linux_kill): Handle being called with no threads.
11537 * win32-i386-low.c (win32_kill): Likewise.
11538 (get_child_debug_event): Clear current_process_handle.
11539
115402006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
11541 Daniel Jacobowitz <dan@codesourcery.com>
11542
11543 * remote-utils.c (remote_open): Check the type of specified
11544 serial port devices before opening them.
11545 * server.c (main): Kill the inferior if an error occurs during
11546 the first remote_open.
11547
a5e13d24
DJ
115482006-12-05 Markus Deuling <deuling@de.ibm.com>
11549
11550 * README: Update supported targets.
11551
186947f7
DJ
115522006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11553
11554 * Makefile.in (clean): Remove reg-mips64.c.
11555 (reg-mips64.c, reg-mips64.o): New rules.
11556 * configure.srv: Handle mips64. Include regset support for mips.
11557 * linux-mips-low.c (union mips_register): New.
11558 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11559 (mips_breakpoint, mips_breakpoint_at): Use int.
11560 (mips_collect_register, mips_supply_register)
11561 (mips_collect_register_32bit, mips_supply_register_32bit)
11562 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11563 (mips_store_fpregset, target_regsets): New.
11564 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11565
a13e2c95
UW
115662006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11567
11568 * configure.srv: Add target "spu*-*-*".
11569 * Makefile.in (clean): Remove reg-spu.c.
11570 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11571 * spu-low.c: New file.
11572
cb7283db
DJ
115732006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11574
11575 * configure.ac: Correct td_thr_tls_get_addr test.
11576 * configure: Regenerated.
11577
89be2091
DJ
115782006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11579
11580 * linux-low.c (linux_wait_for_event): Reformat. Use the
11581 pass_signals array.
11582 * remote-utils.c (decode_address_to_semicolon): New.
11583 * server.c (pass_signals, handle_general_set): New.
11584 (handle_query): Mention QPassSignals for qSupported.
11585 (main): Call handle_general_set.
11586 * server.h (pass_signals, decode_address_to_semicolon): New.
11587
000ef4f0
DJ
115882006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11589
11590 * server.c (handle_query): Correct error handling for read_auxv.
11591
b7149293
UW
115922005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11593
11594 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11595 and srv_linux_thread_db to yes.
11596 * linux-s390-low.c (s390_fill_gregset): New function.
11597 (target_regsets): Define data structure.
11598
dae5f5cf
DJ
115992006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11600
11601 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11602 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11603 * config.in, configure: Regenerated.
11604 * inferiors.c (gdb_id_to_thread): New function.
11605 (gdb_id_to_thread_id): Use it.
11606 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11607 * linux-low.h (struct process_info): Add th member.
11608 (thread_db_get_tls_address): New prototype.
11609 * remote-utils.c (decode_address): Make non-static.
11610 * server.c (handle_query): Handle qGetTLSAddr.
11611 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11612 * target.h (struct target_ops): Add get_tls_address.
11613 * thread-db.c (maybe_attach_thread): Save the thread handle.
11614 (thread_db_get_tls_address): New.
11615
32ca6d61
DJ
116162006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11617
11618 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11619 (linux_resume_one_process): Take a siginfo_t *. Update all
11620 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11621 (struct pending_signals): Add a siginfo_t.
11622 (linux_wait_for_process): Always set last_status.
11623 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11624 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11625 * linux-low.h (struct process_info): Add last_status.
11626
5ffff7c1
DJ
116272006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11628
11629 * remote-utils.c (try_rle): New function.
11630 (putpkt_binary): Use it.
11631
8695c747
DJ
116322006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11633
11634 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11635 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11636 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11637 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11638 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11639 point registers.
11640
290fadea
RS
116412006-08-08 Richard Sandiford <richard@codesourcery.com>
11642
11643 * server.c (terminal_fd): New variable.
11644 (old_foreground_pgrp): Likewise.
11645 (restore_old_foreground_pgrp): New function.
11646 (start_inferior): Record the terminal file descriptor in terminal_fd
11647 and its original foreground group in old_foreground_pgrp. Register
11648 restore_old_foreground_pgrp with atexit().
11649
9f2e1e63
DJ
116502006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11651
11652 * server.c (handle_query): Correct qPart to qXfer.
11653
b80864fb
DJ
116542006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11655
11656 * configure.ac: Check for more headers which are missing on
11657 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11658 * configure.srv: Add Cygwin and mingw32.
11659 * remote-utils.c: Don't include headers unconditionally which
11660 are missing on mingw32. Include <winsock.h> for mingw32.
11661 (remote_open): Adjust for mingw32 support. Flush
11662 standard error after writing to it.
11663 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11664 (unblock_async_io, enable_async_io, disable_async_io)
11665 (readchar, getpkt): Update for Winsock support.
11666 (prepare_resume_reply): Expect a protocol signal number.
11667 * server.c: Disable <sys/wait.h> on mingw32.
11668 (start_inferior): Adjust for mingw32 support. Flush
11669 standard error after writing to it.
11670 (attach_inferior): Likewise. Use protocol signal
11671 numbers.
11672 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11673 and names.
11674 * win32-i386-low.c: New file.
11675 * Makefile.in (XM_CLIBS): Set.
11676 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11677 (win32-i386-low.o): New dependency rule.
11678 * linux-low.c (linux_wait): Use target signal numbers.
11679 * target.h (struct target_ops): Doc fix.
11680 * server.h (target_signal_to_name): New prototype.
11681 * gdbreplay.c: Don't include headers unconditionally which
11682 are missing on mingw32. Include <winsock.h> for mingw32.
11683 (remote_close, remote_open): Adjust for Winsock support.
11684 * configure, config.in: Regenerated.
11685
0876f84a
DJ
116862006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11687
11688 * server.c (decode_xfer_read, write_qxfer_response): New.
11689 (handle_query): Take a packet length argument. Handle
11690 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11691 the qSupported response.
11692 (main): Update call to handle_query.
11693
01f9e8fa
DJ
116942006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11695
11696 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11697 (putpkt_binary): Renamed from putpkt and adjusted for binary
11698 data.
11699 (putpkt): New wrapper for putpkt_binary.
11700 (readchar): Don't mask off the high bit.
11701 (decode_X_packet): New function.
11702 * server.c (main): Call putpkt_binary if a handler sets the packet
11703 length. Save the length of the incoming packet. Handle 'X'.
11704 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11705
be2a5f71
DJ
117062006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11707
11708 * server.c (handle_query): Handle qSupported.
11709
ea025f5f
DJ
117102006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11711
11712 * remote-utils.c (all_symbols_looked_up): New variable.
11713 (look_up_one_symbol): Check it.
11714 * server.h (look_up_one_symbol): New declaration.
11715 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11716
9308fc88
DJ
117172006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11718
11719 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 11720 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
11721 (PTRACE_GET_THREAD_AREA): Define.
11722 (ps_get_thread_area): New function.
11723
52fb6437
NS
117242006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11725
11726 * configure.srv (m68k*-*-uclinux*): New target.
11727 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11728 (linux_resume_one_process): Remove extraneous cast.
11729 (linux_read_offsets): New.
11730 (linux_target_op): Add linux_read_offsets on mmuless systems.
11731 * server.c (handle_query): Add qOffsets logic.
11732 * target.h (struct target_ops): Add read_offsets.
11733
21b0f40c
DJ
117342006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11735
11736 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11737 (PTRACE_GET_THREAD_AREA): Define.
11738 (ps_get_thread_area): New function.
11739 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11740 (linux-x86-64-low.o): Update.
11741
0050a760
DJ
117422006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11743
11744 * configure.ac: Remove checks for prfpregset_t.
11745 * gdb_proc_service.h: New file.
11746 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11747 new "gdb_proc_service.h".
11748 * proc-service.c: Likewise.
11749 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11750 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11751 * Makefile.in (gdb_proc_service_h): Updated.
11752 * configure, config.in: Regenerated.
11753
b92a518e
DJ
117542006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11755
11756 * remote-utils.c (prepare_resume_reply): Move declaration
11757 of gdb_id_from_wait to the top of the block.
11758
545587ee
DJ
117592006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11760
11761 * linux-low.c (regsets_store_inferior_registers): Read the regset
11762 from the target before filling it.
11763
9db87ebd
DJ
117642006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11765
11766 * server.c (attach_inferior): Return SIGTRAP for a successful
11767 attach.
11768
dd24457d
DJ
117692006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11770
11771 * Makefile.in (OBS): Add version.o.
11772 (STAGESTUFF): Delete.
11773 (version.o): Add dependencies.
11774 (version.c): Replace rule.
11775 (clean): Remove version.c.
11776 * server.c (gdbserver_version): New.
11777 (gdbserver_usage): Use printf.
11778 (main): Handle --version and --help.
11779 * server.h (version, host_name): Add declarations.
11780
6f0f660e
EZ
117812005-12-23 Eli Zaretskii <eliz@gnu.org>
11782
889bf7c5
PA
11783 * linux-arm-low.c:
11784 * linux-arm-low.c:
11785 * inferiors.c:
11786 * i387-fp.h:
11787 * i387-fp.c:
11788 * gdbreplay.c:
11789 * regcache.c:
11790 * proc-service.c:
11791 * mem-break.h:
11792 * mem-break.c:
11793 * linux-x86-64-low.c:
11794 * linux-sh-low.c:
11795 * linux-s390-low.c:
11796 * linux-ppc64-low.c:
11797 * linux-ppc-low.c:
11798 * linux-mips-low.c:
11799 * linux-m68k-low.c:
11800 * linux-m32r-low.c:
11801 * linux-low.h:
11802 * linux-low.c:
11803 * linux-ia64-low.c:
11804 * linux-i386-low.c:
11805 * linux-crisv32-low.c:
11806 * thread-db.c:
11807 * terminal.h:
11808 * target.h:
11809 * target.c:
11810 * server.h:
11811 * server.c:
11812 * remote-utils.c:
11813 * regcache.h:
11814 * utils.c:
11815 * Makefile.in:
11816 * configure.ac:
6f0f660e
EZ
11817 * gdbserver.1: Add (C) after Copyright. Update the FSF
11818 address.
11819
9d1fb177
DJ
118202005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11821
11822 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11823 (arm_breakpoint_at): Recognize both breakpoints.
11824 (the_low_target): Use the correct breakpoint instruction.
11825
011a70c2
DJ
118262005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11827
11828 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11829 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11830 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11831 (the_low_target): Update.
11832
7fb85e41
AS
118332005-10-25 Andreas Schwab <schwab@suse.de>
11834
11835 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11836
11837 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11838 (ia64_num_regs): Reduce to 462.
11839
3db0444b
DJ
118402005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11841
11842 * acinclude.m4: Correct quoting.
11843 * aclocal.m4: Regenerated.
11844
11845 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11846 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11847 (thread_db_init): Call thread_db_err_str.
11848 * configure.ac: Check for TD_VERSION.
11849 * config.in, configure: Regenerated.
11850
bee0189a
DJ
118512005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11852
11853 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11854
e9d25b98
DJ
118552005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11856
11857 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11858 is not available. Define HAVE_PTRACE_GETREGS if it is.
11859 * config.in, configure: Regenerated.
11860 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11861 * linux-i386-low.c, linux-m68k-low.c: Update to use
11862 HAVE_PTRACE_GETREGS.
11863 * linux-low.c (regsets_fetch_inferior_registers)
11864 (regsets_store_inferior_registers): Only return 0 if we processed
11865 GENERAL_REGS.
11866 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11867 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11868
a06660f7
DJ
118692005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11870
11871 * inferiors.c (struct thread_info): Add gdb_id.
11872 (add_thread): Add gdb_id argument.
11873 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11874 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11875 calls to add_thread.
11876 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11877 * server.c (handle_query): Use thread_to_gdb_id.
11878 (handle_v_cont, main): Use gdb_id_to_thread_id.
11879 * server.h (add_thread): Update prototype.
11880 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11881 prototypes.
11882
5a1f5858
DJ
118832005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11884
11885 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11886 left-padded registers.
11887 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11888 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11889
e122f1f5
SE
118902005-07-01 Steve Ellcey <sje@cup.hp.com>
11891
11892 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11893 * configure: Regenerate.
11894 * config.in: Regenerate.
11895 * server.h (NEED_DECLARATION_STRERROR):
11896 Replace with !HAVE_DECL_STRERROR.
11897
d592fa2f
DJ
118982005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11899
11900 * linux-low.c (linux_wait, linux_send_signal): Don't test
11901 an unsigned long variable for > 0 if it could be MAX_ULONG.
11902 * server.c (myresume): Likewise.
11903 * target.c (set_desired_inferior): Likewise.
11904
ccbd4912
MK
119052005-06-13 Mark Kettenis <kettenis@gnu.org>
11906
11907 * configure.ac: Simplify and improve check for socklen_t.
11908 * configure, config.in: Regenerate.
11909
f450004a
DJ
119102005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11911
11912 * acconfig.h: Remove.
11913 * configure.ac: Add a test for socklen_t. Use three-argument
11914 AC_DEFINE throughout.
11915 * config.in: Regenerated using autoheader 2.59.
11916 * configure: Regenerated.
11917
11918 * gdbreplay.c (socklen_t): Provide a default.
11919 (remote_open): Use socklen_t.
11920 * remote-utils.c (socklen_t): Provide a default.
11921 (remote_open): Use socklen_t.
11922 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11923 unsigned char.
11924
11925 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11926 char for buffers.
11927 * linux-low.c (linux_read_memory, linux_write_memory)
11928 (linux_read_auxv): Likewise.
11929 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11930 (check_mem_write): Likewise.
11931 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11932 Likewise.
11933 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11934 (registers_from_string, register_data): Likewise.
11935 * server.c (handle_query, main): Likewise.
11936 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11937 (decode_M_packet): Likewise.
11938 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11939 * target.h (struct target_ops): Update read_memory, write_memory,
11940 and read_auxv.
11941 (read_inferior_memory, write_inferior_memory): Update.
11942 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11943 to unsigned char *.
11944 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11945 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11946 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11947 linux-s390-low.c, linux-sh-low.c: Update for changes in
11948 read_inferior_memory and the_low_target->breakpoint.
11949
eee84df1
DJ
119502005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11951
11952 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11953 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11954 * configure.srv: Add powerpc64-*-linux*.
11955 * linux-ppc64-low.c: New file.
11956
45b134e5
OF
119572005-05-23 Orjan Friberg <orjanf@axis.com>
11958
11959 * linux-cris-low.c: New file with support for CRIS.
11960 * linux-crisv32-low.c: Ditto for CRISv32.
11961 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11962 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 11963 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
11964 reg-crisv32.o, and reg-crisv32.c to make rules.
11965 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11966 recognized targets.
11967
48d93c75
UW
119682005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11969
11970 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11971 of sizeof (PTRACE_XFER_TYPE).
11972 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11973
e013ee27
OF
119742005-05-12 Orjan Friberg <orjanf@axis.com>
11975
889bf7c5 11976 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
11977 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11978 pointers for hardware watchpoint support.
11979 * linux-low.h (struct linux_target_ops): Ditto.
11980 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11981 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11982 to linux_target_ops.
11983 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11984 reply packet.
11985 * server.c (main): Recognize 'Z' and 'z' packets.
11986
b0ded00b
UW
119872005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11988
11989 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11990 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11991 (the_low_target): Add new members.
11992
8643e2ad
DJ
119932005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11994
11995 * proc-service.c (ps_lgetregs): Search all_processes instead of
11996 all_threads.
11997
fc620387
DJ
119982005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11999
12000 * server.c (start_inferior): Change return type to int.
12001 (attach_inferior): Change sigptr to int *.
12002 (handle_v_cont, handle_v_requests): Change signal to int *.
12003 (main): Change signal to int.
12004
120052005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
12006
12007 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12008 * configure.srv: Add m32r*-*-linux*.
12009 * linux-m32r-low.c: New file.
12010
e0e76420
DJ
120112005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
12012
12013 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12014
a1928bad
DJ
120152005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12016
12017 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12018 Take unsigned long arguments for PIDs.
12019 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12020 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12021 (wait_for_sigstop, linux_resume_one_process)
12022 (regsets_fetch_inferior_registers, linux_send_signal)
12023 (linux_read_auxv): Likewise. Update the types of variables holding
12024 PIDs. Update format string specifiers.
12025 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12026 * remote-utils.c (prepare_resume_reply): Likewise.
12027 * server.c (cont_thread, general_thread, step_thread)
12028 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12029 unsigned long.
12030 (handle_query): Update format specifiers.
12031 (handle_v_cont, main): Use strtoul for thread IDs.
12032 * server.h (struct inferior_list_entry): Use unsigned long for ID.
12033 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12034 (general_thread, step_thread, thread_from_wait)
12035 (old_thread_from_wait): Update.
12036 * target.h (struct thread_resume): Use unsigned long for THREAD.
12037 (struct target_ops): Use unsigned long for arguments to attach and
12038 thread_alive.
12039
dcdb98d2
DJ
120402005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
12041
12042 * acinclude.m4: Include bfd/bfd.m4 directly.
12043 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
12044 <agriffis@toolchain.org>.
12045 * aclocal.m4, configure: Regenerated.
12046
bec39cab
AC
120472005-01-07 Andrew Cagney <cagney@gnu.org>
12048
12049 * configure.ac: Rename configure.in, require autoconf 2.59.
12050 * configure: Re-generate.
12051
434c4c77
DJ
120522004-12-08 Daniel Jacobowitz <dan@debian.org>
12053
12054 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
12055 LIBS when finished.
12056 * aclocal.m4: Regenerated.
12057 * configure: Regenerated.
12058
db1d3e1b
AS
120592004-11-21 Andreas Schwab <schwab@suse.de>
12060
12061 * linux-m68k-low.c (m68k_num_gregs): Define.
12062 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12063 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12064 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12065 (m68k_breakpoint_at): New. Add to the_low_target.
12066
12067 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12068 srv_linux_thread_db to yes.
12069
43360365
JB
120702004-10-20 Joel Brobecker <brobecker@gnat.com>
12071
12072 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12073 (ARCH_SET_FS): Likewise.
12074 (ARCH_GET_FS): Likewise.
12075 (ARCH_GET_GS): Likewise.
12076
fd500816
DJ
120772004-10-16 Daniel Jacobowitz <dan@debian.org>
12078
12079 * linux-i386-low.c (ps_get_thread_area): New.
12080 * linux-x86-64-low.c (ps_get_thread_area): New.
12081 * linux-low.c: Include <sys/syscall.h>.
12082 (linux_kill_one_process): Don't kill the first thread here.
12083 (linux_kill): Kill the first thread here.
12084 (kill_lwp): New function.
12085 (send_sigstop, linux_send_signal): Use it.
12086 * proc-service.c: Clean up #ifdefs.
12087 (fpregset_info): Delete.
12088 (ps_lgetregs): Update and enable implementation.
12089 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12090 implementations.
12091 * remote-utils.c (struct sym_cache, symbol_cache): New.
12092 (input_interrupt): Print a clearer message.
12093 (async_io_enabled): New variable.
12094 (enable_async_io, disable_async_io): Use it. Update comments.
12095 (look_up_one_symbol): Use the symbol cache.
12096 * thread-db.c (thread_db_look_up_symbols): New function.
12097 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12098
f6de3c42
DJ
120992004-10-16 Daniel Jacobowitz <dan@debian.org>
12100
12101 * configure.in: Test for -rdynamic.
12102 * configure: Regenerated.
12103 * Makefile (INTERNAL_LDFLAGS): New.
12104 (gdbserver, gdbreplay): Use it.
12105
2c0fc042
AC
121062004-09-02 Andrew Cagney <cagney@gnu.org>
12107
12108 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12109
075b3282
DJ
121102004-03-23 Daniel Jacobowitz <drow@mvista.com>
12111
12112 * linux-low.c (linux_wait): Clear all_processes list also.
12113
fa6a77dc
DJ
121142004-03-12 Daniel Jacobowitz <drow@mvista.com>
12115
12116 * linux-low.c: Include <errno.h>. Remove extern declaration of
12117 errno.
12118
6d782a97
DJ
121192004-03-12 Daniel Jacobowitz <drow@mvista.com>
12120
12121 * gdbreplay.c, server.h, utils.c: Update copyright years.
12122
3a7fb99b
DJ
121232004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12124
12125 * server.c (main): Print child status or termination signal from
12126 variable 'signal', not 'sig'.
12127
c3e735a6
DJ
121282004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12129
12130 * linux-low.c (linux_read_memory): Change return type to
12131 int. Check for and return error from ptrace().
12132 * target.c (read_inferior_memory): Change return type to int. Pass
12133 back return status from the_target->read_memory().
12134 * target.h (struct target_ops): Adapt *read_memory() prototype.
12135 Update comment.
12136 (read_inferior_memory): Adapt prototype.
12137 * server.c (main): Return an error packet if
12138 read_inferior_memory() returns an error.
12139
a59d1c82
DJ
121402004-03-04 Daniel Jacobowitz <drow@mvista.com>
12141
12142 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12143 Unify with other clean targets.
12144
dc3f8883
DJ
121452004-02-29 Daniel Jacobowitz <drow@mvista.com>
12146
12147 * server.c (handle_v_cont): Call set_desired_inferior.
12148
89a208da
DJ
121492004-02-29 Daniel Jacobowitz <drow@mvista.com>
12150
12151 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12152
62ea82f5
DJ
121532004-02-29 Daniel Jacobowitz <drow@mvista.com>
12154
12155 * linux-low.c (linux_wait): Unblock async I/O.
12156 (linux_resume): Block and enable async I/O.
12157 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12158 * server.h (block_async_io, unblock_async_io): Add prototypes.
12159
6910d122
DJ
121602004-02-29 Daniel Jacobowitz <drow@mvista.com>
12161
12162 * remote-utils.c (remote_open): Print a status notice after
12163 opening a TCP port.
12164 * server.c (attach_inferior): Print a status notice after
12165 attaching.
12166
121672004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
12168
12169 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12170
c89dc5d4
DJ
121712004-02-26 Daniel Jacobowitz <drow@mvista.com>
12172
12173 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12174 error packet.
12175 * server.c, target.h: Update copyright years.
12176
4b8dad4a
RM
121772004-02-25 Roland McGrath <roland@redhat.com>
12178
12179 * target.h (struct target_ops): New member `read_auxv'.
12180 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12181 * linux-low.c (linux_read_auxv): New function.
12182 (linux_target_ops): Initialize `read_auxv' member to that.
12183
d7446758
JB
121842004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12185
12186 Committed by Jim Blandy <jimb@redhat.com>.
12187
12188 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 12189 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
12190 instead of GPR_SIZE to distiguish s390 and s390x targets.
12191
5544ad89
DJ
121922004-01-31 Daniel Jacobowitz <drow@mvista.com>
12193
12194 * linux-low.c: Update copyright year.
12195 (check_removed_breakpoint): Clear pending_is_breakpoint.
12196 (linux_set_resume_request, linux_queue_one_thread)
12197 (resume_status_pending_p): New functions.
12198 (linux_continue_one_thread): Use process->resume.
12199 (linux_resume): Only resume threads if there are no pending events.
12200 * linux-low.h (struct process_info): Add resume request
12201 pointer.
12202
2a68b70e
DJ
122032004-01-30 Daniel Jacobowitz <drow@mvista.com>
12204
12205 * regcache.c (new_register_cache): Clear the allocated register
12206 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12207
64386c31
DJ
122082003-10-13 Daniel Jacobowitz <drow@mvista.com>
12209
12210 * linux-low.c (linux_resume): Take a struct thread_resume *
12211 argument.
12212 (linux_wait): Update call.
12213 (resume_ptr): New static variable.
12214 (linux_continue_one_thread): Renamed from
12215 linux_continue_one_process. Use resume_ptr.
12216 (linux_resume): Use linux_continue_one_thread.
12217 * server.c (handle_v_cont, handle_v_requests): New functions.
12218 (myresume): New function.
12219 (main): Handle 'v' case.
12220 * target.h (struct thread_resume): New type.
12221 (struct target_ops): Change argument of "resume" to struct
12222 thread_resume *.
12223 (myresume): Delete macro.
12224
c938e9b0
L
122252003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12226
12227 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12228 (uninstall): Support DESTDIR.
12229
7f313d07
BC
12230Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12231
12232 * configure.srv: Add xscale*linux copy of arm*linux entry.
12233
3b2fc2ea
DJ
122342003-07-24 Daniel Jacobowitz <drow@mvista.com>
12235
12236 * linux-arm-low.c (arm_reinsert_addr): New function.
12237 (the_low_target): Add arm_reinsert_addr.
12238
1c0a559e
MK
122392003-07-08 Mark Kettenis <kettenis@gnu.org>
12240
12241 * mem-break.c: Remove whitespace at end of file.
12242
43d5792c
DJ
122432003-06-28 Daniel Jacobowitz <drow@mvista.com>
12244
12245 * configure.in: Check whether we need to prototype strerror.
12246 * server.h: Optionally prototype strerror.
12247 * gdbreplay.c (perror_with_name): Use strerror.
12248 * linux-low.c (linux_attach_lwp): Use strerror.
12249 * utils.c (perror_with_name): Use strerror.
12250 * config.in, configure: Regenerated.
12251
c8a86edf
DJ
122522003-06-28 Daniel Jacobowitz <drow@mvista.com>
12253
12254 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12255 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12256
73d37363
DJ
122572003-06-20 Daniel Jacobowitz <drow@mvista.com>
12258
12259 * Makefile.in (SFILES): Update.
12260 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12261 low-sun3.c: Remove files.
12262
6ad8ae5c
DJ
122632003-06-17 Daniel Jacobowitz <drow@mvista.com>
12264
12265 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12266 (linux_detach_one_process, linux_detach): New functions.
12267 (linux_target_ops): Add linux_detach.
12268 * server.c (main): Handle 'D' packet.
12269 * target.h (struct target_ops): Add "detach" member.
12270 (detach_inferior): Define.
12271
1581182a
MK
122722003-06-13 Mark Kettenis <kettenis@gnu.org>
12273
12274 From Kelley Cook <kelleycook@wideopenwest.com>:
12275 * configure.srv: Accept i[34567]86 variants.
12276
e5379b03
DJ
122772003-06-05 Daniel Jacobowitz <drow@mvista.com>
12278
12279 * linux-low.c (linux_wait_for_event): Correct comment typos.
12280 (linux_resume_one_process): Call check_removed_breakpoint.
12281 (linux_send_signal): New function.
12282 (linux_target_ops): Add linux_send_signal.
12283 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12284 of kill.
12285 * target.h (struct target_ops): Add send_signal.
12286
2ff29de4
JB
122872003-05-29 Jim Blandy <jimb@redhat.com>
12288
12289 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12290 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12291 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12292 away part of the register's value.
12293
254787d4
DJ
122942003-03-26 Daniel Jacobowitz <drow@mvista.com>
12295
12296 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12297 (linux_wait_for_event, linux_init_signals): Likewise.
12298
94e10508
DJ
122992003-03-17 Daniel Jacobowitz <drow@mvista.com>
12300
12301 * configure.in: Check for stdlib.h.
12302 * configure: Regenerated.
12303 * config.in: Regenerated.
12304
4c0711e0
DJ
123052003-01-04 Andreas Schwab <schwab@suse.de>
12306
12307 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12308
ef66e766
AC
123092003-01-02 Andrew Cagney <ac131313@redhat.com>
12310
12311 * Makefile.in: Remove obsolete code.
12312
a1358604
DJ
123132002-11-20 Daniel Jacobowitz <drow@mvista.com>
12314
12315 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12316 defined(PT_FPR0_HI).
12317
23ce3b1c
DJ
123182002-11-17 Stuart Hughes <seh@zee2.com>
12319
12320 * linux-arm-low.c (arm_num_regs): Increase.
12321 (arm_regmap): Include status register.
12322
123232002-11-17 Daniel Jacobowitz <drow@mvista.com>
12324
12325 * linux-low.c (register_addr): Remove incorrect -1 check.
12326
a9fa9f7d
DJ
123272002-08-29 Daniel Jacobowitz <drow@mvista.com>
12328
12329 * linux-low.c (linux_create_inferior): Call setpgid. Return
12330 the new PID.
12331 (unstopped_p, linux_signal_pid): Remove.
12332 (linux_target_ops): Remove linux_signal_pid.
12333 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12334 global instead of target method.
12335 * target.h (struct target_ops): Remove signal_pid. Update comment
12336 for create_inferior.
12337 * server.c (signal_pid): New variable.
12338 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 12339 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
12340 (attach_inferior): Set signal_pid.
12341
17574093
DJ
123422002-08-23 Daniel Jacobowitz <drow@mvista.com>
12343
12344 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12345
123462002-08-20 Jim Blandy <jimb@redhat.com>
12347
12348 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12349 default for this.
12350
123512002-08-01 Andrew Cagney <cagney@redhat.com>
12352
12353 * Makefile.in: Make chill references obsolete.
12354
123552002-07-24 Kevin Buettner <kevinb@redhat.com>
12356
12357 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12358 * configure: Regenerate.
12359 * config.in: Regenerate.
12360
123612002-07-09 David O'Brien <obrien@FreeBSD.org>
12362
12363 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12364 (perror_with_name, remote_close, remote_open, expect, play): Static.
12365
123662002-07-04 Michal Ludvig <mludvig@suse.cz>
12367
4b8dad4a 12368 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
12369 byte offsets instead of an array of indexes.
12370 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12371
123722002-06-13 Daniel Jacobowitz <drow@mvista.com>
12373
12374 * regcache.c: Add comment.
12375
123762002-06-11 Daniel Jacobowitz <drow@mvista.com>
12377
12378 * thread-db.c: New file.
12379 * proc-service.c: New file.
12380 * acinclude.m4: New file.
12381 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12382 proc-service.o, and thread-db.o.
12383 (linux-low.o): Add USE_THREAD_DB.
12384 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12385 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12386 * aclocal.m4: Regenerated.
12387 * config.in: Regenerated.
12388 * configure: Regenerated.
12389 * configure.in: Check for proc_service.h, sys/procfs.h,
12390 thread_db.h, and linux/elf.h headrs.
12391 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12392 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12393 Check for -lthread_db and thread support.
12394 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12395 PowerPC, and SuperH.
12396 * i387-fp.c: Constify arguments.
12397 * i387-fp.h: Likewise.
12398 * inferiors.c: (struct thread_info): Renamed from
12399 `struct inferior_info'. Remove PID member. Use generic inferior
12400 list header. All uses updated.
12401 (inferiors, signal_pid): Removed.
12402 (all_threads): New variable.
12403 (get_thread): Define.
12404 (add_inferior_to_list): New function.
12405 (for_each_inferior): New function.
12406 (change_inferior_id): New function.
12407 (add_inferior): Removed.
12408 (remove_inferior): New function.
12409 (add_thread): New function.
12410 (free_one_thread): New function.
12411 (remove_thread): New function.
12412 (clear_inferiors): Use for_each_inferior and free_one_thread.
12413 (find_inferior): New function.
12414 (find_inferior_id): New function.
12415 (inferior_target_data): Update argument type.
12416 (set_inferior_target_data): Likewise.
12417 (inferior_regcache_data): Likewise.
12418 (set_inferior_regcache_data): Likewise.
12419 * linux-low.c (linux_bp_reinsert): Remove.
12420 (all_processes, stopping_threads, using_thrads)
12421 (struct pending_signals, debug_threads, pid_of): New.
12422 (inferior_pid): Replace with macro.
12423 (struct inferior_linux_data): Remove.
12424 (get_stop_pc, add_process): New functions.
12425 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12426 Use add_process and add_thread.
12427 (linux_attach_lwp): New function, based on old linux_attach. Use
12428 add_process and add_thread. Set stop_expected for new threads.
12429 (linux_attach): New function.
12430 (linux_kill_one_process): New function.
12431 (linux_kill): Kill all LWPs.
12432 (linux_thread_alive): Use find_inferior_id.
12433 (check_removed_breakpoints, status_pending_p): New functions.
12434 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12435 Update. Use WNOHANG. Wait for cloned processes also. Update process
12436 struct for the found process.
12437 (linux_wait_for_event): New function.
12438 (linux_wait): Use it. Support LWPs.
12439 (send_sigstop, wait_for_sigstop, stop_all_processes)
12440 (linux_resume_one_process, linux_continue_one_process): New functions.
12441 (linux_resume): Support LWPs.
12442 (REGISTER_RAW_SIZE): Remove.
12443 (fetch_register): Use register_size instead. Call supply_register.
12444 (usr_store_inferior_registers): Likewise. Call collect_register.
12445 Fix recursive case.
12446 (regsets_fetch_inferior_registers): Improve error message.
12447 (regsets_store_inferior_registers): Add debugging.
12448 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12449 (unstopped_p, linux_signal_pid): New functions.
12450 (linux_target_ops): Add linux_signal_pid.
12451 (linux_init_signals): New function.
12452 (initialize_low): Call it. Initialize using_threads.
12453 * regcache.c (inferior_regcache_data): Add valid
12454 flag.
12455 (get_regcache): Fetch registers lazily. Add fetch argument
12456 and update all callers.
12457 (regcache_invalidate_one, regcache_invalidate): New
12458 functions.
12459 (new_register_cache): Renamed from create_register_cache.
12460 Return the new regcache.
12461 (free_register_cache): Change argument to a void *.
12462 (registers_to_string, registers_from_string): Call get_regcache
12463 with fetch flag set.
12464 (register_data): Make static. Pass fetch flag to get_regcache.
12465 (supply_register): Call get_regcache with fetch flag clear.
12466 (collect_register): Call get_regcache with fetch flag set.
12467 (collect_register_as_string): New function.
12468 * regcache.h: Update.
12469 * remote-utils.c (putpkt): Flush after debug output and use
12470 stderr.
12471 Handle input interrupts while waiting for an ACK.
12472 (input_interrupt): Use signal_pid method.
12473 (getpkt): Flush after debug output and use stderr.
12474 (outreg): Use collect_register_as_string.
12475 (new_thread_notify, dead_thread_notify): New functions.
12476 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12477 and general_thread.
12478 (look_up_one_symbol): Flush after debug output.
12479 * server.c (step_thread, server_waiting): New variables.
12480 (start_inferior): Don't use signal_pid. Update call to mywait.
12481 (attach_inferior): Update call to mywait.
12482 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12483 (main): Don't fetch/store registers explicitly. Use
12484 set_desired_inferior. Support proposed ``Hs'' packet. Update
12485 calls to mywait.
12486 * server.h: Update.
12487 (struct inferior_list, struct_inferior_list_entry): New.
12488 * target.c (set_desired_inferior): New.
12489 (write_inferior_memory): Constify.
12490 (mywait): New function.
12491 * target.h: Update.
12492 (struct target_ops): New signal_pid method.
12493 (mywait): Removed macro, added prototype.
12494
12495 * linux-low.h (regset_func): Removed.
12496 (regset_fill_func, regset_store_func): New.
12497 (enum regset_type): New.
12498 (struct regset_info): Add type field. Use new operation types.
12499 (struct linux_target_ops): stop_pc renamed to get_pc.
12500 Add decr_pc_after_break and breakpoint_at.
12501 (get_process, get_thread_proess, get_process_thread)
12502 (strut process_info, all_processes, linux_attach_lwp)
12503 (thread_db_init): New.
12504
12505 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12506 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12507 (the_low_target): Add new members.
12508 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12509 (i386_store_fpxregset): Constify.
12510 (target_regsets): Add new kind identifier.
12511 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12512 (i386_set_pc): Add debugging.
12513 (i386_breakpoint_at): New function.
12514 (the_low_target): Add new members.
12515 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12516 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12517 (mips_breakpoint_at): New.
12518 (the_low_target): Add new members.
12519 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12520 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12521 (the_low_target): Add new members.
12522 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12523 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12524 (the_low_target): Add new members.
12525 * linux-x86-64-low.c (target_regsets): Add new kind
12526 identifier.
12527
125282002-05-15 Daniel Jacobowitz <drow@mvista.com>
12529
12530 From Martin Pool <mbp@samba.org>:
12531 * server.c (gdbserver_usage): New function.
12532 (main): Call it.
12533
125342002-05-14 Daniel Jacobowitz <drow@mvista.com>
12535
12536 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12537 stop_at -> stop_pc.
12538
125392002-05-04 Andrew Cagney <ac131313@redhat.com>
12540
12541 * Makefile.in: Remove obsolete code.
12542
125432002-04-24 Michal Ludvig <mludvig@suse.cz>
12544
12545 * linux-low.c (regsets_fetch_inferior_registers),
12546 (regsets_store_inferior_registers): Removed cast to int from
12547 ptrace() calls.
12548 * regcache.h: Added declaration of struct inferior_info.
12549
125502002-04-20 Daniel Jacobowitz <drow@mvista.com>
12551
12552 * inferiors.c (struct inferior_info): Add regcache_data.
12553 (add_inferior): Call create_register_cache.
12554 (clear_inferiors): Call free_register_cache.
12555 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12556 * regcache.c (struct inferior_regcache_data): New.
12557 (registers): Remove.
12558 (get_regcache): New function.
12559 (create_register_cache, free_register_cache): New functions.
12560 (set_register_cache): Don't initialize the register cache here.
12561 (registers_to_string, registers_from_string, register_data): Call
12562 get_regcache.
12563 * regcache.h: Add prototypes.
12564 * server.h: Likewise.
12565
125662002-04-20 Daniel Jacobowitz <drow@mvista.com>
12567
12568 * mem-break.c: New file.
12569 * mem-break.h: New file.
12570 * Makefile.in: Add mem-break.o rule; update server.h
12571 dependencies.
12572 * inferiors.c (struct inferior_info): Add target_data
12573 member.
12574 (clear_inferiors): Free target_data member if set.
12575 (inferior_target_data, set_inferior_target_data): New functions.
12576 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12577 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12578 * linux-low.c (linux_bp_reinsert): New variable.
12579 (struct inferior_linux_data): New.
12580 (linux_create_inferior): Use set_inferior_target_data.
12581 (linux_attach): Likewise. Call add_inferior.
12582 (linux_wait_for_one_inferior): New function.
12583 (linux_wait): Call it.
12584 (linux_write_memory): Add const.
12585 (initialize_low): Call set_breakpoint_data.
12586 * linux-low.h (struct linux_target_ops): Add breakpoint
12587 handling members.
12588 * server.c (attach_inferior): Remove extra add_inferior
12589 call.
12590 * server.h: Include mem-break.h. Update inferior.c
12591 prototypes.
12592 * target.c (read_inferior_memory)
12593 (write_inferior_memory): New functions.
12594 * target.h (read_inferior_memory)
12595 (write_inferior_memory): Change macros to prototypes.
12596 (struct target_ops): Update comments. Add const to write_memory
12597 definition.
12598
125992002-04-11 Daniel Jacobowitz <drow@mvista.com>
12600
12601 * linux-low.c (usr_store_inferior_registers): Support
12602 registers which are allowed to fail to store.
12603 * linux-low.h (linux_target_ops): Likewise.
12604 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12605 (ppc_cannot_store_register): FPSCR may not be storable.
12606
126072002-04-09 Daniel Jacobowitz <drow@mvista.com>
12608
12609 * server.h: Include <string.h> if HAVE_STRING_H.
12610 * ChangeLog: Correct paths in last ChangeLog entry.
12611
126122002-04-09 Daniel Jacobowitz <drow@mvista.com>
12613
12614 * linux-low.h: Remove obsolete prototypes.
12615 (struct linux_target_ops): New.
12616 (extern the_low_target): New.
12617 * linux-low.c (num_regs, regmap): Remove declarations.
12618 (register_addr): Use the_low_target explicitly.
12619 (fetch_register): Likewise.
12620 (usr_fetch_inferior_registers): Likewise.
12621 (usr_store_inferior_registers): Likewise.
12622 * linux-arm-low.c (num_regs): Remove.
12623 (arm_num_regs): Define.
12624 (arm_regmap): Renamed from regmap, made static.
12625 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12626 made static.
12627 (arm_cannot_store_register): Renamed from cannot_store_register,
12628 made static.
12629 (the_low_target): New.
12630 * linux-i386-low.c (num_regs): Remove.
12631 (i386_num_regs): Define.
12632 (i386_regmap): Renamed from regmap, made static.
12633 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12634 made static.
12635 (i386_cannot_store_register): Renamed from cannot_store_register,
12636 made static.
12637 (the_low_target): New.
12638 * linux-ia64-low.c (num_regs): Remove.
12639 (ia64_num_regs): Define.
12640 (ia64_regmap): Renamed from regmap, made static.
12641 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12642 made static.
12643 (ia64_cannot_store_register): Renamed from cannot_store_register,
12644 made static.
12645 (the_low_target): New.
12646 * linux-m68k-low.c (num_regs): Remove.
12647 (m68k_num_regs): Define.
12648 (m68k_regmap): Renamed from regmap, made static.
12649 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12650 made static.
12651 (m68k_cannot_store_register): Renamed from cannot_store_register,
12652 made static.
12653 (the_low_target): New.
12654 * linux-mips-low.c (num_regs): Remove.
12655 (mips_num_regs): Define.
12656 (mips_regmap): Renamed from regmap, made static.
12657 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12658 made static.
12659 (mips_cannot_store_register): Renamed from cannot_store_register,
12660 made static.
12661 (the_low_target): New.
12662 * linux-ppc-low.c (num_regs): Remove.
12663 (ppc_num_regs): Define.
12664 (ppc_regmap): Renamed from regmap, made static.
12665 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12666 made static.
12667 (ppc_cannot_store_register): Renamed from cannot_store_register,
12668 made static.
12669 (the_low_target): New.
12670 * linux-s390-low.c (num_regs): Remove.
12671 (s390_num_regs): Define.
12672 (s390_regmap): Renamed from regmap, made static.
12673 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12674 made static.
12675 (s390_cannot_store_register): Renamed from cannot_store_register,
12676 made static.
12677 (the_low_target): New.
12678 * linux-sh-low.c (num_regs): Remove.
12679 (sh_num_regs): Define.
12680 (sh_regmap): Renamed from regmap, made static.
12681 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12682 made static.
12683 (sh_cannot_store_register): Renamed from cannot_store_register,
12684 made static.
12685 (the_low_target): New.
12686 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12687 (the_low_target): New.
12688
126892002-04-09 Daniel Jacobowitz <drow@mvista.com>
12690
12691 * Makefile.in: Add stamp-h target.
12692 * configure.in: Create stamp-h.
12693 * configure: Regenerated.
12694
126952002-04-09 Daniel Jacobowitz <drow@mvista.com>
12696
12697 * inferiors.c: New file.
12698 * target.c: New file.
12699 * target.h: New file.
12700 * Makefile.in: Add target.o and inferiors.o. Update
12701 dependencies.
12702 * linux-low.c (inferior_pid): New static variable,
12703 moved from server.c.
12704 (linux_create_inferior): Renamed from create_inferior.
12705 Call add_inferior. Return 0 on success instead of a PID.
12706 (linux_attach): Renamed from myattach.
12707 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12708 (linux_thread_alive): Renamed from mythread_alive.
12709 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12710 child dies.
12711 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12712 (regsets_store_inferior_registers): Correct error message.
12713 Add missing ``return 0''.
12714 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12715 (linux_store_registers): Renamed from store_inferior_registers.
12716 (linux_read_memory): Renamed from read_inferior_memory.
12717 (linux_write_memory): Renamed from write_inferior_memory.
12718 (linux_target_ops): New structure.
12719 (initialize_low): Call set_target_ops ().
12720 * remote-utils.c (unhexify): New function.
12721 (hexify): New function.
12722 (input_interrupt): Send signals to ``signal_pid''.
12723 * server.c (inferior_pid): Remove.
12724 (start_inferior): Update create_inferior call.
12725 (attach_inferior): Call add_inferior.
12726 (handle_query): New function.
12727 (main): Call handle_query for `q' packets.
12728 * server.h: Include "target.h". Remove obsolete prototypes.
12729 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12730
127312002-04-09 Daniel Jacobowitz <drow@mvista.com>
12732
12733 * Makefile.in: Add WARN_CFLAGS. Update configury
12734 dependencies.
12735 * configure.in: Check for <string.h>
12736 * configure: Regenerate.
12737 * config.in: Regenerate.
12738 * gdbreplay.c: Include needed system headers.
12739 (remote_open): Remove strchr prototype.
12740 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12741 * regcache.c (supply_register): Change buf argument to const void *.
12742 (supply_register_by_name): Likewise.
12743 (collect_register): Change buf argument to void *.
12744 (collect_register_by_name): Likewise.
12745 * regcache.h: Add missing prototypes.
12746 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12747 * server.c (handle_query): New function.
12748 (attached): New static variable, moved out of main.
12749 (main): Quiet longjmp clobber warnings.
12750 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12751 * utils.c (error): Remove NORETURN.
12752 (fatal): Likewise.
This page took 1.650472 seconds and 4 git commands to generate.