]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
[S/390] Add null ptr check + port GOTOFF handling from 32 bit over to 64 bit
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
1798301e
PA
12015-11-18 Pedro Alves <palves@redhat.com>
2
3 * Makefile.in (all_object_files): Add $IPA_OBJS.
4
ce7715e2
PA
52015-11-17 Pedro Alves <palves@redhat.com>
6
7 * win32-low.c (win32_resume): Use gdb_signal_from_host,
8 GDB_SIGNAL_0 and gdb_signal_to_string.
9
c0879059
PA
102015-11-17 Pedro Alves <palves@redhat.com>
11
12 * win32-low.c (handle_output_debug_string): Remove parameter.
13 (win32_kill): Remove our_status local and adjust call to
14 handle_output_debug_string.
15 (get_child_debug_event): Adjust call to
16 handle_output_debug_string.
17
1996e237
SM
182015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
19
20 * linux-mips-low.c (mips_fill_gregset): Add cast.
21 (mips_store_gregset): Likewise.
22 (mips_fill_fpregset): Likewise.
23 (mips_store_fpregset): Likewise.
24
cbec665b
SM
252015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
26
27 * linux-mips-low.c (mips_add_watchpoint): Rename private to
28 priv.
29
eb3e3c67
SM
302015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
31
32 * linux-mips-low.c (mips_linux_new_thread): Change type of
33 watch_type to enum target_hw_bp_type.
34
171de4b8
SM
352015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
36
37 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
38 Change return type to arm_hwbp_type.
39
04248ead
SM
402015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
41
42 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
43 (arm_store_gregset): Likewise.
44 * linux-arm-low.c (arm_get_hwcap): Likewise.
45 (arm_read_description): Likewise.
46
04b3479c
SM
472015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
48
49 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
50
2bc84e8a
SM
512015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
52
53 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
54 (ppc_fill_vsxregset): Likewise.
55 (ppc_store_vsxregset): Likewise.
56 (ppc_fill_vrregset): Likewise.
57 (ppc_store_vrregset): Likewise.
58 (ppc_fill_evrregset): Likewise.
59 (ppc_store_evrregset): Likewise.
60
e6c5bb05
SM
612015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
62
63 * linux-ppc-low.c (ppc_usrregs_info): Remove
64 forward-declaration.
65 (ppc_arch_setup): Move lower in file.
66
7ea45d72
SM
672015-10-30 Simon Marchi <simon.marchi@ericsson.com>
68
69 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
70 (ps_pdwrite): Likewise.
71
69291610
HW
722015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
73
74 * linux-arm-low.c (arm_new_thread): Move pointer dereference
75 to after assert checks.
76
b42945fd
SM
772015-10-29 Simon Marchi <simon.marchi@ericsson.com>
78
79 * proc-service.c (ps_pdread): Add/adjust casts.
80 (ps_pdwrite): Add/adjust casts.
81
d6f85c84
SM
822015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
83
84 * server.c (handle_search_memory_1): Cast return value of
85 memmem.
86
f98cd059
SM
872015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
88
89 * server.c (write_qxfer_response): Change type of data to
90 gdb_byte *.
91
d2412fa5
PA
922015-10-29 Pedro Alves <palves@redhat.com>
93
94 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
95
c17414a2
PA
962015-10-29 Pedro Alves <palves@redhat.com>
97
98 * tracepoint.c (clear_installed_tracepoints): Add casts.
99
e053fbc4
PA
1002015-10-29 Pedro Alves <palves@redhat.com>
101
102 * server.c (handle_v_cont, process_serial_event): Add enum
103 gdb_signal casts to signal parsing code.
104
add67df8
PA
1052015-10-29 Pedro Alves <palves@redhat.com>
106
107 * linux-low.h (NULL_REGSET): Define.
108 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
109 * linux-arm-low.c (arm_regsets): Likewise.
110 * linux-crisv32-low.c (cris_regsets): Likewise.
111 * linux-m68k-low.c (m68k_regsets): Likewise.
112 * linux-mips-low.c (mips_regsets): Likewise.
113 * linux-nios2-low.c (nios2_regsets): Likewise.
114 * linux-ppc-low.c (ppc_regsets): Likewise.
115 * linux-s390-low.c (s390_regsets): Likewise.
116 * linux-sh-low.c (sh_regsets): Likewise.
117 * linux-sparc-low.c (sparc_regsets): Likewise.
118 * linux-tic6x-low.c (tic6x_regsets): Likewise.
119 * linux-tile-low.c (tile_regsets): Likewise.
120 * linux-x86-low.c (x86_regsets): Likewise.
121 * linux-xtensa-low.c (xtensa_regsets): Likewise.
122
50bc912a
PA
1232015-10-29 Pedro Alves <palves@redhat.com>
124
125 * linux-low.h (NULL_REGSET): Define.
126 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
127 * linux-arm-low.c (arm_regsets): Likewise.
128 * linux-crisv32-low.c (cris_regsets): Likewise.
129 * linux-m68k-low.c (m68k_regsets): Likewise.
130 * linux-mips-low.c (mips_regsets): Likewise.
131 * linux-nios2-low.c (nios2_regsets): Likewise.
132 * linux-ppc-low.c (ppc_regsets): Likewise.
133 * linux-s390-low.c (s390_regsets): Likewise.
134 * linux-sh-low.c (sh_regsets): Likewise.
135 * linux-sparc-low.c (sparc_regsets): Likewise.
136 * linux-tic6x-low.c (tic6x_regsets): Likewise.
137 * linux-tile-low.c (tile_regsets): Likewise.
138 * linux-x86-low.c (x86_regsets): Likewise.
139 * linux-xtensa-low.c (xtensa_regsets): Likewise.
140
682b2546
DE
1412015-10-26 Doug Evans <dje@google.com>
142
143 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
144
963843d4
DE
1452015-10-26 Doug Evans <dje@google.com>
146
147 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
148
d41401ac
DE
1492015-10-26 Doug Evans <dje@google.com>
150
151 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
152 for debug_printf.
153 (attach_thread, find_new_threads_callback): Ditto.
154
3db28855
AT
1552015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
156
157 * mem-break.h (set_breakpoint_data): Remove.
158
fb78e89c
AT
1592015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
160
161 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
162 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
163 (initialize_low): Remove set_breakpoint_data call.
164 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
165 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
166 (initialize_low): Remove set_breakpoint_data call.
167 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
168 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
169 (initialize_low): Remove set_breakpoint_data call.
170
2e6ee069
AT
1712015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
172
173 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
174 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
175 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
176 * target.h (target_breakpoint_kind_from_pc): New macro.
177
1652a986
AT
1782015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
179
180 * linux-low.c (default_breakpoint_kind_from_pc): New function.
181 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
182 the default breakpoint kind.
183
abeead09
AT
1842015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
185
186 * linux-arm-low.c (arm_supports_z_point_type): Add software
187 breakpoint support.
188
b0b4b501
AT
1892015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
190
191 * linux-arm-low.c: Refactor breakpoint definitions.
192 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
193 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
194
8689682c
AT
1952015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
196
197 * Makefile.in: Add arm.c/o.
198 * configure.srv: Likewise.
199 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
200 (arm_breakpoint_kind_from_pc): New function.
201 (arm_sw_breakpoint_from_kind): Return proper kind.
202 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
203
27165294
AT
2042015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
205
206 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
207 removal.
208 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
209 (struct raw_breakpoint) <size>: Remove.
210 (struct raw_breakpoint) <kind>: Add.
211 (bp_size): New function.
212 (bp_opcode): Likewise.
213 (find_raw_breakpoint_at): Adjust for kind.
214 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
215 (remove_memory_breakpoint): Adjust for kind call bp_size.
216 (set_raw_breakpoint_at): Adjust for kind.
217 (set_breakpoint): Likewise.
218 (set_breakpoint_at): Call breakpoint_kind_from_pc.
219 (delete_raw_breakpoint): Adjust for kind.
220 (delete_breakpoint): Likewise.
221 (find_gdb_breakpoint): Likewise.
222 (set_gdb_breakpoint_1): Likewise.
223 (set_gdb_breakpoint): Likewise.
224 (delete_gdb_breakpoint_1): Likewise.
225 (delete_gdb_breakpoint): Likewise.
226 (uninsert_raw_breakpoint): Likewise.
227 (reinsert_raw_breakpoint): Likewise.
228 (set_breakpoint_data): Remove.
229 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
230 (check_mem_read): Adjust for kind call bp_size.
231 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
232 (clone_one_breakpoint): Adjust for kind.
233 * mem-break.h (set_gdb_breakpoint): Likewise.
234 (delete_gdb_breakpoint): Likewise.
235 * server.c (process_serial_event): Likewise.
236
dd373349
AT
2372015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
238
239 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
240 (struct linux_target_ops) <breakpoint>: Remove.
241 (struct linux_target_ops) <breakpoint_len>: Remove.
242 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
243 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
244 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
245 (arm_sw_breakpoint_from_kind): New function.
246 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
247 (struct linux_target_ops) <breakpoint>: Remove.
248 (struct linux_target_ops) <breakpoint_len>: Remove.
249 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
250 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
251 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
252 (struct linux_target_ops) <breakpoint>: Remove.
253 (struct linux_target_ops) <breakpoint_len>: Remove.
254 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
255 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
256 * linux-crisv32-low.c (cris_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-low.c (linux_wait_1): Call breakpoint_kind_from_pc
262 and sw_breakpoint_from_kind to increment the pc.
263 (linux_breakpoint_kind_from_pc): New function.
264 (linux_sw_breakpoint_from_kind): New function.
265 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
266 (initialize_low): Call breakpoint_kind_from_pc and
267 sw_breakpoint_from_kind to replace breakpoint_data/len.
268 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
269 New field.
270 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
271 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
272 (struct linux_target_ops) <breakpoint>: Remove.
273 (struct linux_target_ops) <breakpoint_len>: Remove.
274 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
275 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
276 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
277 (struct linux_target_ops) <breakpoint>: Remove.
278 (struct linux_target_ops) <breakpoint_len>: Remove.
279 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
280 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
281 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
282 (struct linux_target_ops) <breakpoint>: Remove.
283 (struct linux_target_ops) <breakpoint_len>: Remove.
284 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
285 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
286 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
287 (struct linux_target_ops) <breakpoint>: Remove.
288 (struct linux_target_ops) <breakpoint_len>: Remove.
289 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
290 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
291 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
292 (struct linux_target_ops) <breakpoint>: Remove.
293 (struct linux_target_ops) <breakpoint_len>: Remove.
294 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
295 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
296 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
297 (struct linux_target_ops) <breakpoint>: Remove.
298 (struct linux_target_ops) <breakpoint_len>: Remove.
299 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
300 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
301 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
302 (struct linux_target_ops) <breakpoint>: Remove.
303 (struct linux_target_ops) <breakpoint_len>: Remove.
304 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
305 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
306 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
307 (struct linux_target_ops) <breakpoint>: Remove.
308 (struct linux_target_ops) <breakpoint_len>: Remove.
309 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
310 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
311 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
312 (struct linux_target_ops) <breakpoint>: Remove.
313 (struct linux_target_ops) <breakpoint_len>: Remove.
314 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
315 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
316 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
317 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
318 (struct linux_target_ops) <breakpoint>: Remove.
319 (struct linux_target_ops) <breakpoint_len>: Remove.
320 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
321 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
322 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
323 (struct linux_target_ops) <breakpoint>: Remove.
324 (struct linux_target_ops) <breakpoint_len>: Remove.
325 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
326 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
327
4cd98a19
AT
3282015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
329
330 * linux-cris-low.c (cris_get_pc): Remove void arg.
331
774ee6d2
AR
3322015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
333
334 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
335 variable name.
336
833dcd29
AR
3372015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
338
339 * inferiors.c (thread_pid_matches_callback): New function.
340 (find_thread_process): New function.
341 (remove_thread): Reset current_thread.
342 (remove_process): Assert threads have been removed first.
343
8d689ee5
YQ
3442015-10-15 Yao Qi <yao.qi@linaro.org>
345
346 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
347 if it is 3.
348 (aarch64_remove_point): Likewise.
349 * regcache.c (regcache_register_size): New function.
350
1c2e1515
YQ
3512015-10-12 Yao Qi <yao.qi@linaro.org>
352
353 * linux-aarch64-low.c: Update all callers as emit_load_store
354 is renamed to aarch64_emit_load_store.
355
e1c587c3
YQ
3562015-10-12 Yao Qi <yao.qi@linaro.org>
357
358 * linux-aarch64-low.c: Update all callers of function renaming
359 from emit_insn to aarch64_emit_insn.
360
b6542f81
YQ
3612015-10-12 Yao Qi <yao.qi@linaro.org>
362
363 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
364 arch/aarch64-insn.h.
365 (struct aarch64_memory_operand): Likewise.
366 (ENCODE): Likewise.
367 (emit_insn): Move to arch/aarch64-insn.c.
368 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
369 (emit_load_store): Move to arch/aarch64-insn.c.
370 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
371 (can_encode_int32): Remove.
372
246994ce
YQ
3732015-10-12 Yao Qi <yao.qi@linaro.org>
374
375 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
376 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
377 (aarch64_relocate_instruction): Likewise.
378 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
379 (struct aarch64_insn_visitor): Likewise.
380
0badd99f
YQ
3812015-10-12 Yao Qi <yao.qi@linaro.org>
382
383 * linux-aarch64-low.c (struct aarch64_insn_data): New.
384 (struct aarch64_insn_visitor): New.
385 (struct aarch64_insn_relocation_data): New.
386 (aarch64_ftrace_insn_reloc_b): New function.
387 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
388 (aarch64_ftrace_insn_reloc_cb): Likewise.
389 (aarch64_ftrace_insn_reloc_tb): Likewise.
390 (aarch64_ftrace_insn_reloc_adr): Likewise.
391 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
392 (aarch64_ftrace_insn_reloc_others): Likewise.
393 (visitor): New.
394 (aarch64_relocate_instruction): Use visitor.
395
dfaffe9d
YQ
3962015-10-12 Yao Qi <yao.qi@linaro.org>
397
398 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
399 int. Add argument buf.
400 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
401 aarch64_relocate_instruction.
402
70b439f0
YQ
4032015-10-12 Yao Qi <yao.qi@linaro.org>
404
405 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
406 argument insn. Remove local variable insn. Don't call
407 target_read_uint32.
408 (aarch64_install_fast_tracepoint_jump_pad): Call
409 target_read_uint32.
410
7781c06f
YQ
4112015-09-30 Yao Qi <yao.qi@linaro.org>
412
413 * linux-aarch64-low.c (emit_movk): Shorten a long line.
414 (emit_load_store_pair): Likewise.
415
9a3c8263
SM
4162015-09-25 Simon Marchi <simon.marchi@ericsson.com>
417
418 * dll.c (match_dll): Add cast(s).
419 (unloaded_dll): Likewise.
420 * linux-low.c (second_thread_of_pid_p): Likewise.
421 (delete_lwp_callback): Likewise.
422 (count_events_callback): Likewise.
423 (select_event_lwp_callback): Likewise.
424 (linux_set_resume_request): Likewise.
425 * server.c (accumulate_file_name_length): Likewise.
426 (emit_dll_description): Likewise.
427 (handle_qxfer_threads_worker): Likewise.
428 (visit_actioned_threads): Likewise.
429 * thread-db.c (any_thread_of): Likewise.
430 * tracepoint.c (same_process_p): Likewise.
431 (match_blocktype): Likewise.
432 (build_traceframe_info_xml): Likewise.
433
224c3ddb
SM
4342015-09-25 Simon Marchi <simon.marchi@ericsson.com>
435
436 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
437 assignment.
438 (gdb_unparse_agent_expr): Likewise.
439 * hostio.c (require_data): Likewise.
440 (handle_pread): Likewise.
441 * linux-low.c (disable_regset): Likewise.
442 (fetch_register): Likewise.
443 (store_register): Likewise.
444 (get_dynamic): Likewise.
445 (linux_qxfer_libraries_svr4): Likewise.
446 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
447 (set_fast_tracepoint_jump): Likewise.
448 (uninsert_fast_tracepoint_jumps_at): Likewise.
449 (reinsert_fast_tracepoint_jumps_at): Likewise.
450 (validate_inserted_breakpoint): Likewise.
451 (clone_agent_expr): Likewise.
452 * regcache.c (init_register_cache): Likewise.
453 * remote-utils.c (putpkt_binary_1): Likewise.
454 (decode_M_packet): Likewise.
455 (decode_X_packet): Likewise.
456 (look_up_one_symbol): Likewise.
457 (relocate_instruction): Likewise.
458 (monitor_output): Likewise.
459 * server.c (handle_search_memory): Likewise.
460 (handle_qxfer_exec_file): Likewise.
461 (handle_qxfer_libraries): Likewise.
462 (handle_qxfer): Likewise.
463 (handle_query): Likewise.
464 (handle_v_cont): Likewise.
465 (handle_v_run): Likewise.
466 (captured_main): Likewise.
467 * target.c (write_inferior_memory): Likewise.
468 * thread-db.c (try_thread_db_load_from_dir): Likewise.
469 * tracepoint.c (init_trace_buffer): Likewise.
470 (add_tracepoint_action): Likewise.
471 (add_traceframe): Likewise.
472 (add_traceframe_block): Likewise.
473 (cmd_qtdpsrc): Likewise.
474 (cmd_qtdv): Likewise.
475 (cmd_qtstatus): Likewise.
476 (response_source): Likewise.
477 (response_tsv): Likewise.
478 (cmd_qtnotes): Likewise.
479 (gdb_collect): Likewise.
480 (initialize_tracepoint): Likewise.
481
afbe19f8
PL
4822015-09-21 Pierre Langlois <pierre.langlois@arm.com>
483
484 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
485 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
486 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
487 <NOP>: New.
488 (enum aarch64_condition_codes): New enum.
489 (w0): New static global.
490 (fp): Likewise.
491 (lr): Likewise.
492 (struct aarch64_memory_operand) <type>: New
493 MEMORY_OPERAND_POSTINDEX type.
494 (postindex_memory_operand): New helper function.
495 (emit_ret): New function.
496 (emit_load_store_pair): New function, factored out of emit_stp
497 with support for MEMORY_OPERAND_POSTINDEX.
498 (emit_stp): Rewrite using emit_load_store_pair.
499 (emit_ldp): New function.
500 (emit_load_store): Likewise.
501 (emit_ldr): Mention post-index instruction in comment.
502 (emit_ldrh): New function.
503 (emit_ldrb): New function.
504 (emit_ldrsw): Mention post-index instruction in comment.
505 (emit_str): Likewise.
506 (emit_subs): New function.
507 (emit_cmp): Likewise.
508 (emit_and): Likewise.
509 (emit_orr): Likewise.
510 (emit_orn): Likewise.
511 (emit_eor): Likewise.
512 (emit_mvn): Likewise.
513 (emit_lslv): Likewise.
514 (emit_lsrv): Likewise.
515 (emit_asrv): Likewise.
516 (emit_mul): Likewise.
517 (emit_sbfm): Likewise.
518 (emit_sbfx): Likewise.
519 (emit_ubfm): Likewise.
520 (emit_ubfx): Likewise.
521 (emit_csinc): Likewise.
522 (emit_cset): Likewise.
523 (emit_nop): Likewise.
524 (emit_ops_insns): New helper function.
525 (emit_pop): Likewise.
526 (emit_push): Likewise.
527 (aarch64_emit_prologue): New function.
528 (aarch64_emit_epilogue): Likewise.
529 (aarch64_emit_add): Likewise.
530 (aarch64_emit_sub): Likewise.
531 (aarch64_emit_mul): Likewise.
532 (aarch64_emit_lsh): Likewise.
533 (aarch64_emit_rsh_signed): Likewise.
534 (aarch64_emit_rsh_unsigned): Likewise.
535 (aarch64_emit_ext): Likewise.
536 (aarch64_emit_log_not): Likewise.
537 (aarch64_emit_bit_and): Likewise.
538 (aarch64_emit_bit_or): Likewise.
539 (aarch64_emit_bit_xor): Likewise.
540 (aarch64_emit_bit_not): Likewise.
541 (aarch64_emit_equal): Likewise.
542 (aarch64_emit_less_signed): Likewise.
543 (aarch64_emit_less_unsigned): Likewise.
544 (aarch64_emit_ref): Likewise.
545 (aarch64_emit_if_goto): Likewise.
546 (aarch64_emit_goto): Likewise.
547 (aarch64_write_goto_address): Likewise.
548 (aarch64_emit_const): Likewise.
549 (aarch64_emit_call): Likewise.
550 (aarch64_emit_reg): Likewise.
551 (aarch64_emit_pop): Likewise.
552 (aarch64_emit_stack_flush): Likewise.
553 (aarch64_emit_zero_ext): Likewise.
554 (aarch64_emit_swap): Likewise.
555 (aarch64_emit_stack_adjust): Likewise.
556 (aarch64_emit_int_call_1): Likewise.
557 (aarch64_emit_void_call_2): Likewise.
558 (aarch64_emit_eq_goto): Likewise.
559 (aarch64_emit_ne_goto): Likewise.
560 (aarch64_emit_lt_goto): Likewise.
561 (aarch64_emit_le_goto): Likewise.
562 (aarch64_emit_gt_goto): Likewise.
563 (aarch64_emit_ge_got): Likewise.
564 (aarch64_emit_ops_impl): New static global variable.
565 (aarch64_emit_ops): New target function, return
566 &aarch64_emit_ops_impl.
567 (struct linux_target_ops): Install it.
568
bb903df0
PL
5692015-09-21 Pierre Langlois <pierre.langlois@arm.com>
570
571 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
572 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
573 aarch64-ipa.o.
574 * linux-aarch64-ipa.c: New file.
575 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
576 and endian.h.
577 (aarch64_get_thread_area): New target method.
578 (extract_signed_bitfield): New helper function.
579 (aarch64_decode_ldr_literal): New function.
580 (enum aarch64_opcodes): New enum.
581 (struct aarch64_register): New struct.
582 (struct aarch64_operand): New struct.
583 (x0): New static global.
584 (x1): Likewise.
585 (x2): Likewise.
586 (x3): Likewise.
587 (x4): Likewise.
588 (w2): Likewise.
589 (ip0): Likewise.
590 (sp): Likewise.
591 (xzr): Likewise.
592 (aarch64_register): New helper function.
593 (register_operand): Likewise.
594 (immediate_operand): Likewise.
595 (struct aarch64_memory_operand): New struct.
596 (offset_memory_operand): New helper function.
597 (preindex_memory_operand): Likewise.
598 (enum aarch64_system_control_registers): New enum.
599 (ENCODE): New macro.
600 (emit_insn): New helper function.
601 (emit_b): New function.
602 (emit_bcond): Likewise.
603 (emit_cb): Likewise.
604 (emit_tb): Likewise.
605 (emit_blr): Likewise.
606 (emit_stp): Likewise.
607 (emit_ldp_q_offset): Likewise.
608 (emit_stp_q_offset): Likewise.
609 (emit_load_store): Likewise.
610 (emit_ldr): Likewise.
611 (emit_ldrsw): Likewise.
612 (emit_str): Likewise.
613 (emit_ldaxr): Likewise.
614 (emit_stxr): Likewise.
615 (emit_stlr): Likewise.
616 (emit_data_processing_reg): Likewise.
617 (emit_data_processing): Likewise.
618 (emit_add): Likewise.
619 (emit_sub): Likewise.
620 (emit_mov): Likewise.
621 (emit_movk): Likewise.
622 (emit_mov_addr): Likewise.
623 (emit_mrs): Likewise.
624 (emit_msr): Likewise.
625 (emit_sevl): Likewise.
626 (emit_wfe): Likewise.
627 (append_insns): Likewise.
628 (can_encode_int32_in): New helper function.
629 (aarch64_relocate_instruction): New function.
630 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
631 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
632 (struct linux_target_ops): Install aarch64_get_thread_area,
633 aarch64_install_fast_tracepoint_jump_pad and
634 aarch64_get_min_fast_tracepoint_insn_len.
635
787749ea
PL
6362015-09-21 Pierre Langlois <pierre.langlois@arm.com>
637
638 * Makefile.in (aarch64-insn.o): New rule.
639 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
640
9812b2e6
YQ
6412015-09-21 Yao Qi <yao.qi@linaro.org>
642
643 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
644
18fe412b
YQ
6452015-09-21 Yao Qi <yao.qi@linaro.org>
646
647 * tracepoint.c (max_jump_pad_size): Remove.
648
a0cc84cd
YQ
6492015-09-18 Yao Qi <yao.qi@linaro.org>
650
651 * linux-aarch64-low.c: Don't include sys/uio.h.
652 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
653
d78908cf
WW
6542015-09-16 Wei-cheng Wang <cole945@gmail.com>
655
656 * tracepoint.c (eval_result_type): Change prototype.
657 (condition_true_at_tracepoint): Fix argument to compiled_cond.
658
d57e0d50
PA
6592015-09-15 Pedro Alves <palves@redhat.com>
660
661 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
662 Check whether to report exec events instead of checking whether
663 multiprocess is enabled.
664
5a676acc
PA
6652015-09-15 Pedro Alves <palves@redhat.com>
666
667 PR remote/18965
668 * remote-utils.c (prepare_resume_reply): Merge
669 TARGET_WAITKIND_VFORK_DONE switch case with the
670 TARGET_WAITKIND_FORKED case.
671
7c5d0fad
YQ
6722015-09-15 Yao Qi <yao.qi@linaro.org>
673
674 * server.c (handle_query): Check string comparison using
675 "else if" instead of "if".
676
750ce8d1
YQ
6772015-09-15 Yao Qi <yao.qi@linaro.org>
678
679 * server.c (vCont_supported): New global variable.
680 (handle_query): Set vCont_supported to 1 if "vContSupported+"
681 matches. Append ";vContSupported+" to own_buf.
682 (handle_v_requests): Append ";s;S" to own_buf if target supports
683 hardware single step or vCont_supported is false.
684 (capture_main): Set vCont_supported to zero.
685
70b90b91
YQ
6862015-09-15 Yao Qi <yao.qi@linaro.org>
687
688 * linux-low.c (linux_supports_conditional_breakpoints): Rename
689 it to ...
690 (linux_supports_hardware_single_step): ... New function.
691 (linux_target_ops): Update.
692 * lynx-low.c (lynx_target_ops): Set field
693 supports_hardware_single_step to target_can_do_hardware_single_step.
694 * nto-low.c (nto_target_ops): Likewise.
695 * spu-low.c (spu_target_ops): Likewise.
696 * win32-low.c (win32_target_ops): Likewise.
697 * target.c (target_can_do_hardware_single_step): New function.
698 * target.h (struct target_ops) <supports_conditional_breakpoints>:
699 Remove. <supports_hardware_single_step>: New field.
700 (target_supports_conditional_breakpoints): Remove.
701 (target_supports_hardware_single_step): New macro.
702 (target_can_do_hardware_single_step): Declare.
703 * server.c (handle_query): Use target_supports_hardware_single_step
704 instead of target_supports_conditional_breakpoints.
705
ade90bde
YQ
7062015-09-15 Yao Qi <yao.qi@linaro.org>
707
708 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
709 function.
710 (struct linux_target_ops the_low_target): Install
711 aarch64_linux_siginfo_fixup.
712
94585166
DB
7132015-09-11 Don Breazeal <donb@codesourcery.com>
714 Luis Machado <lgustavo@codesourcery.com>
715
716 * linux-low.c (linux_mourn): Static declaration.
717 (linux_arch_setup): Move in front of
718 handle_extended_wait.
719 (linux_arch_setup_thread): New function.
720 (handle_extended_wait): Handle exec events. Call
721 linux_arch_setup_thread. Make event_lwp argument a
722 pointer-to-a-pointer.
723 (check_zombie_leaders): Do not check stopped threads.
724 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
725 (linux_low_filter_event): Add lwp and thread for exec'ing
726 non-leader thread if leader thread has been deleted.
727 Refactor code into linux_arch_setup_thread and call it.
728 Pass child lwp pointer by reference to handle_extended_wait.
729 (linux_wait_for_event_filtered): Update comment.
730 (linux_wait_1): Prevent clobbering exec event status.
731 (linux_supports_exec_events): New function.
732 (linux_target_ops) <supports_exec_events>: Initialize new member.
733 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
734 new member.
735 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
736 * server.c (report_exec_events): New global variable.
737 (handle_query): Handle qSupported query for exec-events feature.
738 (captured_main): Initialize report_exec_events.
739 * server.h (report_exec_events): Declare new global variable.
740 * target.h (struct target_ops) <supports_exec_events>: New
741 member.
742 (target_supports_exec_events): New macro.
743 * win32-low.c (win32_target_ops) <supports_exec_events>:
744 Initialize new member.
745
0568462b
MM
7462015-09-09 Markus Metzger <markus.t.metzger@intel.com>
747
748 * linux-low.c (linux_low_enable_btrace): Remove.
749 (linux_target_ops): Replace linux_low_enable_btrace with
750 linux_enable_btrace.
751
39edd165
YQ
7522015-09-03 Yao Qi <yao.qi@linaro.org>
753
754 * linux-aarch64-low.c (aarch64_insert_point): Call
755 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
756 returns true.
757
1db33b5a
UW
7582015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
759
760 * linux-low.c (check_stopped_by_breakpoint): Use
761 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
762
ab290430
PA
7632015-08-27 Pedro Alves <palves@redhat.com>
764
765 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
766
8d749320
SM
7672015-08-26 Simon Marchi <simon.marchi@ericsson.com>
768
6711b7f8
SM
769 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
770 the XNEW-family equivalent.
8d749320
SM
771 (compile_bytecodes): Likewise.
772 * dll.c (loaded_dll): Likewise.
773 * event-loop.c (append_callback_event): Likewise.
774 (create_file_handler): Likewise.
775 (create_file_event): Likewise.
776 * hostio.c (handle_open): Likewise.
777 * inferiors.c (add_thread): Likewise.
778 (add_process): Likewise.
779 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
780 * linux-arm-low.c (arm_new_process): Likewise.
781 (arm_new_thread): Likewise.
782 * linux-low.c (add_to_pid_list): Likewise.
783 (linux_add_process): Likewise.
784 (handle_extended_wait): Likewise.
785 (add_lwp): Likewise.
786 (enqueue_one_deferred_signal): Likewise.
787 (enqueue_pending_signal): Likewise.
788 (linux_resume_one_lwp_throw): Likewise.
789 (linux_resume_one_thread): Likewise.
790 (linux_read_memory): Likewise.
791 (linux_write_memory): Likewise.
792 * linux-mips-low.c (mips_linux_new_process): Likewise.
793 (mips_linux_new_thread): Likewise.
794 (mips_add_watchpoint): Likewise.
795 * linux-x86-low.c (initialize_low_arch): Likewise.
796 * lynx-low.c (lynx_add_process): Likewise.
797 * mem-break.c (set_raw_breakpoint_at): Likewise.
798 (set_breakpoint): Likewise.
799 (add_condition_to_breakpoint): Likewise.
800 (add_commands_to_breakpoint): Likewise.
801 (clone_agent_expr): Likewise.
802 (clone_one_breakpoint): Likewise.
803 * regcache.c (new_register_cache): Likewise.
804 * remote-utils.c (look_up_one_symbol): Likewise.
805 * server.c (queue_stop_reply): Likewise.
806 (start_inferior): Likewise.
807 (queue_stop_reply_callback): Likewise.
808 (handle_target_event): Likewise.
809 * spu-low.c (fetch_ppc_memory): Likewise.
810 (store_ppc_memory): Likewise.
811 * target.c (set_target_ops): Likewise.
812 * thread-db.c (thread_db_load_search): Likewise.
813 (try_thread_db_load_1): Likewise.
814 * tracepoint.c (add_tracepoint): Likewise.
815 (add_tracepoint_action): Likewise.
816 (create_trace_state_variable): Likewise.
817 (cmd_qtdpsrc): Likewise.
818 (cmd_qtro): Likewise.
819 (add_while_stepping_state): Likewise.
820 * win32-low.c (child_add_thread): Likewise.
821 (get_image_name): Likewise.
822
ed8b7b42
YQ
8232015-08-25 Yao Qi <yao.qi@linaro.org>
824
825 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
826
db3cb7cb
YQ
8272015-08-25 Yao Qi <yao.qi@linaro.org>
828
829 * Makefile.in (aarch64-linux.o): New rule.
830 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
831 srv_tgtobj.
832 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
833 (aarch64_init_debug_reg_state): Make it extern.
834 (aarch64_linux_prepare_to_resume): Remove.
835
f6011a1c
YQ
8362015-08-25 Yao Qi <yao.qi@linaro.org>
837
838 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
839 lwp_arch_private_info and ptid_of_lwp.
840
88e2cf7e
YQ
8412015-08-25 Yao Qi <yao.qi@linaro.org>
842
843 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
844 Find proc_info by find_process_pid. All callers updated.
845
5e35436e
YQ
8462015-08-25 Yao Qi <yao.qi@linaro.org>
847
848 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
849 Remove.
850 (debug_reg_change_callback): Remove.
851 (aarch64_notify_debug_reg_change): Remove.
852
4a8a7965
YQ
8532015-08-25 Yao Qi <yao.qi@linaro.org>
854
855 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
856 Call current_lwp_ptid.
857
32a271ee
YQ
8582015-08-25 Yao Qi <yao.qi@linaro.org>
859
860 * linux-aarch64-low.c (debug_reg_change_callback): Use
861 debug_printf.
862
0d51c8d7
YQ
8632015-08-25 Yao Qi <yao.qi@linaro.org>
864
865 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
866
31a43dd5
YQ
8672015-08-25 Yao Qi <yao.qi@linaro.org>
868
869 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
870
8ee52567
YQ
8712015-08-25 Yao Qi <yao.qi@linaro.org>
872
873 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
874 the code.
875
ff3f0f45
YQ
8762015-08-25 Yao Qi <yao.qi@linaro.org>
877
878 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
879 Remove.
880 (debug_reg_change_callback): Remove argument entry and add argument
881 lwp. Remove local variable thread. Don't print thread id in the
882 debugging output. Don't check whether pid of thread equals to pid.
883 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
884 iterate_over_lwps instead find_inferior.
885
3d40fbb5
PA
8862015-08-24 Pedro Alves <palves@redhat.com>
887
888 * inferiors.c (get_first_process): New function.
889 * inferiors.h (get_first_process): New declaration.
890 * remote-utils.c (read_ptid): Default to the first process in the
891 list, instead of to the current thread's process.
892
438e1e42
PA
8932015-08-24 Pedro Alves <palves@redhat.com>
894
895 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
896 * event-loop.c: Likewise.
897 * remote-utils.c: Likewise.
898 * tracepoint.c: Likewise.
899
a8c6d4fc
PA
9002015-08-24 Pedro Alves <palves@redhat.com>
901
902 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
903 ptid_get_lwp.
904
99b0bb12
PA
9052015-08-21 Pedro Alves <palves@redhat.com>
906
907 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
908 instead of literal 1.
909
f8904751
PA
9102015-08-21 Pedro Alves <palves@redhat.com>
911
912 * tdesc.c (default_description): Explicitly zero-initialize.
913
465a859e
PA
9142015-08-21 Pedro Alves <palves@redhat.com>
915
916 PR gdb/18749
917 * inferiors.c (remove_thread): Discard any pending stop reply for
918 this thread.
919 * server.c (remove_all_on_match_pid): Rename to ...
920 (remove_all_on_match_ptid): ... this. Work with a filter ptid
921 instead of a pid.
922 (discard_queued_stop_replies): Change parameter to a ptid. Now
923 extern.
924 (handle_v_kill, kill_inferior_callback, captured_main)
925 (process_serial_event): Adjust.
926 * server.h (discard_queued_stop_replies): Declare.
927
f0db101d
PA
9282015-08-21 Pedro Alves <palves@redhat.com>
929
930 * linux-low.c (wait_for_sigstop): Always switch to no thread
931 selected if the previously current thread dies.
932 * lynx-low.c (lynx_request_interrupt): Use the first thread's
933 process instead of the current thread's.
934 * remote-utils.c (input_interrupt): Don't check if there's no
935 current thread.
936 * server.c (gdb_read_memory, gdb_write_memory): If setting the
937 current thread to the general thread fails, error out.
938 (handle_qxfer_auxv, handle_qxfer_libraries)
939 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
940 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
941 (handle_query): Check if there's a thread selected instead of
942 checking whether there's any thread in the thread list.
943 (handle_qxfer_threads, handle_qxfer_btrace)
944 (handle_qxfer_btrace_conf): Don't error out early if there's no
945 thread in the thread list.
946 (handle_v_cont, myresume): Don't set the current thread to the
947 continue thread.
948 (process_serial_event) <Hg handling>: Also set thread_id if the
949 previous general thread is still alive.
950 (process_serial_event) <g/G handling>: If setting the current
951 thread to the general thread fails, error out.
952 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
953 thread's lwp instead of the current thread's.
954 * target.c (set_desired_thread): If the desired thread was not
955 found, leave the current thread pointing to NULL. Return an int
956 (boolean) indicating success.
957 * target.h (set_desired_thread): Change return type to int.
958
40045d91
MF
9592015-08-20 Max Filippov <jcmvbkbc@gmail.com>
960
961 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
962 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
963 #includes.
964 (ps_get_thread_area): New function.
965
45face3b
GB
9662015-08-19 Gary Benson <gbenson@redhat.com>
967
968 * hostio.c (handle_pread): Do not attempt to read more data
969 than hostio_reply_with_data can fit in a packet.
970
16d5f642
JB
9712015-08-18 Joel Brobecker <brobecker@adacore.com>
972
973 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
974
a738da3a
MF
9752015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
976
977 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
978
33ebda9d
PA
9792015-08-06 Pedro Alves <palves@redhat.com>
980
981 * tracepoint.c (expr_eval_result): Now an int.
982
a44892be
PA
9832015-08-06 Pedro Alves <palves@redhat.com>
984
985 * gdbthread.h (struct regcache): Forward declare.
986 (struct thread_info) <regcache_data>: Now a struct regcache
987 pointer.
988 * inferiors.c (inferior_regcache_data)
989 (set_inferior_regcache_data): Now work with struct regcache
990 pointers.
991 * inferiors.h (struct regcache): Forward declare.
992 (inferior_regcache_data, set_inferior_regcache_data): Now work
993 with struct regcache pointers.
994 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
995 (free_register_cache_thread): Remove struct regcache pointer
996 casts.
997
608a1e46
PA
9982015-08-06 Pedro Alves <palves@redhat.com>
999
1000 * server.c (captured_main): On error, print the exception message
1001 to stderr, and if run_once is set, throw a quit.
1002
f0ce0d3a
PA
10032015-08-06 Pedro Alves <palves@redhat.com>
1004
1005 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1006 the current thread.
1007
bf47e248
PA
10082015-08-06 Pedro Alves <palves@redhat.com>
1009
1010 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1011 reading beyond the passed in buffer length.
1012
b6b9ffcc
PL
10132015-08-06 Pierre Langlois <pierre.langlois@arm.com>
1014
1015 * tracepoint.c (symbol_list) <required>: Remove.
1016
863d01bd
PA
10172015-08-06 Pedro Alves <palves@redhat.com>
1018
1019 * linux-low.c (handle_extended_wait): Set the fork child's suspend
1020 count if stopping and suspending threads.
1021 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1022 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1023 (linux_detach): Complete an ongoing step-over.
1024 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
1025 throughout.
1026 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1027 (linux_wait_1): If passing a signal to the inferior after
1028 finishing a step-over, unsuspend and re-resume all lwps. If we
1029 see a single-step event but the thread should be continuing, don't
1030 pass the trap to gdb.
1031 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1032 internal_error instead of gdb_assert.
1033 (enqueue_pending_signal): New function.
1034 (check_ptrace_stopped_lwp_gone): Add debug output.
1035 (start_step_over): Use internal_error instead of gdb_assert.
1036 (complete_ongoing_step_over): New function.
1037 (linux_resume_one_thread): Don't resume a suspended thread.
1038 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1039 it stepping.
1040
00db26fa
PA
10412015-08-06 Pedro Alves <palves@redhat.com>
1042
1043 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1044 (linux_thread_alive): Use lwp_is_marked_dead.
1045 (extended_event_reported): Delete.
1046 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1047 instead of extended_event_reported.
1048 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1049 as well.
1050 (lwp_is_marked_dead): New function.
1051 (lwp_running): Use lwp_is_marked_dead.
1052 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1053 comment.
1054
ad071a30
PA
10552015-08-06 Pedro Alves <palves@redhat.com>
1056
1057 * linux-low.c (linux_wait_1): Move fork event output out of the
1058 !report_to_gdb check. Pass event_child->waitstatus to
1059 target_waitstatus_to_string instead of ourstatus.
1060
524b57e6
YQ
10612015-08-04 Yao Qi <yao.qi@linaro.org>
1062
1063 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1064 if current_thread is 32 bit.
1065
6085d6f6
YQ
10662015-08-04 Yao Qi <yao.qi@linaro.org>
1067
1068 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1069 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1070 * server.c (extended_protocol): Remove "static".
1071 * server.h (extended_protocol): Declare it.
1072
8a7e4587
YQ
10732015-08-04 Yao Qi <yao.qi@linaro.org>
1074
1075 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1076 both aarch64 and aarch32.
1077 (aarch64_set_pc): Likewise.
1078
3b53ae99
YQ
10792015-08-04 Yao Qi <yao.qi@linaro.org>
1080
1081 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1082 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1083 arm-with-neon.xml to srv_xmlfiles.
1084 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1085 (is_64bit_tdesc): New function.
1086 (aarch64_linux_read_description): New function.
1087 (aarch64_arch_setup): Call aarch64_linux_read_description.
1088 (regs_info): Rename to regs_info_aarch64.
1089 (aarch64_regs_info): Return right regs_info.
1090 (initialize_low_arch): Call initialize_low_arch_aarch32.
1091
bd9e6534
YQ
10922015-08-04 Yao Qi <yao.qi@linaro.org>
1093
1094 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1095 * linux-aarch32-low.c: New file.
1096 * linux-aarch32-low.h: New file.
1097 * linux-arm-low.c (arm_fill_gregset): Move it to
1098 linux-aarch32-low.c.
1099 (arm_store_gregset): Likewise.
1100 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1101 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1102 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1103 (regs_info): Rename to regs_info_arm.
1104 (arm_regs_info): Return regs_info_aarch32 if
1105 have_ptrace_getregset is 1 and target description is
1106 arm_with_neon or arm_with_vfpv3.
1107 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1108 Call initialize_low_arch_aarch32 instead.
1109
ded48a5e
YQ
11102015-08-04 Yao Qi <yao.qi@linaro.org>
1111
1112 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1113 * linux-low.c: ... here.
1114 * linux-low.h (have_ptrace_getregset): Declare it.
1115
96e9210f
PA
11162015-08-04 Pedro Alves <palves@redhat.com>
1117
1118 * thread-db.c (struct thread_db): Use new typedefs.
1119 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1120 CHK calls.
1121 (disable_thread_event_reporting): Cast result of dlsym to
1122 destination function pointer type.
1123 (thread_db_mourn): Use td_ta_delete_ftype.
1124
af60a1ef
SL
11252015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1126
1127 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1128 arch variant.
1129 (CDX_BREAKPOINT): Define for R2.
1130 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1131 (the_low_target): Add comments.
1132
e8b41681
YQ
11332015-07-30 Yao Qi <yao.qi@linaro.org>
1134
1135 * linux-arm-low.c (arm_hwcap): Remove it.
1136 (arm_read_description): New local variable arm_hwcap. Don't
1137 set arm_hwcap to zero.
1138
89abb039
YQ
11392015-07-30 Yao Qi <yao.qi@linaro.org>
1140
1141 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1142 Use regcache->tdesc instead.
1143 (arm_store_wmmxregset): Likewise.
1144 (arm_fill_vfpregset): Likewise.
1145 (arm_store_vfpregset): Likewise.
1146
deca266c
YQ
11472015-07-30 Yao Qi <yao.qi@linaro.org>
1148
1149 * linux-arm-low.c: Include arch/arm.h.
1150 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1151 (arm_store_gregset): Likewise.
1152
aa58a496
SM
11532015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1154
1155 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1156 ptrace's 4th parameter.
1157
50904b25
YQ
11582015-07-27 Yao Qi <yao.qi@linaro.org>
1159
1160 * configure.srv (case aarch64*-*-linux*): Don't set
1161 srv_linux_usrregs.
1162
5826e159
PA
11632015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1164
1165 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1166 sys/ptrace.h.
1167 * linux-arm-low.c: Likewise.
1168 * linux-cris-low.c: Likewise.
1169 * linux-crisv32-low.c: Likewise.
1170 * linux-low.c: Likewise.
1171 * linux-m68k-low.c: Likewise.
1172 * linux-mips-low.c: Likewise.
1173 * linux-nios2-low.c: Likewise.
1174 * linux-s390-low.c: Likewise.
1175 * linux-sparc-low.c: Likewise.
1176 * linux-tic6x-low.c: Likewise.
1177 * linux-tile-low.c: Likewise.
1178 * linux-x86-low.c: Likewise.
1179
54019719
PA
11802015-07-24 Pedro Alves <palves@redhat.com>
1181
1182 * config.in: Regenerate.
1183 * configure: Regenerate.
1184
eb7aa561
PA
11852015-07-24 Pedro Alves <palves@redhat.com>
1186
1187 * acinclude.m4: Include ../ptrace.m4.
1188 * configure.ac: Call GDB_AC_PTRACE.
1189 * config.in, configure: Regenerate.
1190
55d7b841
YQ
11912015-07-24 Yao Qi <yao.qi@linaro.org>
1192
1193 * linux-low.c (linux_create_inferior): Remove setting to
1194 proc->priv->new_inferior.
1195 (linux_attach): Likewise.
1196 (linux_low_filter_event): Likewise.
1197 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1198
c06cbd92
YQ
11992015-07-24 Yao Qi <yao.qi@linaro.org>
1200
1201 * linux-low.c (linux_arch_setup): New function.
1202 (linux_low_filter_event): If proc->tdesc is NULL and
1203 proc->attached is true, call the_low_target.arch_setup.
1204 Otherwise, keep status pending, and return.
1205 (linux_resume_one_lwp_throw): Don't call get_pc if
1206 thread->while_stepping isn't NULL. Don't call
1207 get_thread_regcache if proc->tdesc is NULL.
1208 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1209 (linux_target_ops): Install arch_setup.
1210 * server.c (start_inferior): Call the_target->arch_setup.
1211 * target.h (struct target_ops) <arch_setup>: New field.
1212 (target_arch_setup): New marco.
1213 * lynx-low.c (lynx_target_ops): Update.
1214 * nto-low.c (nto_target_ops): Update.
1215 * spu-low.c (spu_target_ops): Update.
1216 * win32-low.c (win32_target_ops): Update.
1217
5ae3ebba
YQ
12182015-07-24 Yao Qi <yao.qi@linaro.org>
1219
1220 * linux-low.c (linux_add_process): Don't set
1221 proc->priv->new_inferior.
1222 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1223 (linux_attach): Likewise.
1224
eb97750b
YQ
12252015-07-24 Yao Qi <yao.qi@linaro.org>
1226
1227 * server.c (start_inferior): Code refactor.
1228
51aee833
YQ
12292015-07-24 Yao Qi <yao.qi@linaro.org>
1230
1231 * server.c (process_serial_event): Set general_thread.
1232
af1b22f3
YQ
12332015-07-21 Yao Qi <yao.qi@linaro.org>
1234
1235 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1236 aarch64_linux_get_debug_reg_capacity.
1237
554717a3
YQ
12382015-07-17 Yao Qi <yao.qi@linaro.org>
1239
1240 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1241 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1242 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1243 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1244 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1245 (AARCH64_HWP_ALIGNMENT): Likewise.
1246 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1247 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1248 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1249 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1250 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1251 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1252 (struct aarch64_debug_reg_state): Likewise.
1253 (struct arch_lwp_info): Likewise.
1254 (aarch64_align_watchpoint): Likewise.
1255 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1256 (aarch64_watchpoint_length): Likewise.
1257 (aarch64_point_encode_ctrl_reg): Likewise
1258 (aarch64_point_is_aligned): Likewise.
1259 (aarch64_align_watchpoint): Likewise.
1260 (aarch64_linux_set_debug_regs):
1261 (aarch64_dr_state_insert_one_point): Likewise.
1262 (aarch64_dr_state_remove_one_point): Likewise.
1263 (aarch64_handle_breakpoint): Likewise.
1264 (aarch64_handle_aligned_watchpoint): Likewise.
1265 (aarch64_handle_unaligned_watchpoint): Likewise.
1266 (aarch64_handle_watchpoint): Likewise.
1267
c67ca4de
YQ
12682015-07-17 Yao Qi <yao.qi@linaro.org>
1269
1270 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1271 and don't aarch64_get_debug_reg_state. All callers update.
1272 (aarch64_handle_aligned_watchpoint): Likewise.
1273 (aarch64_handle_unaligned_watchpoint): Likewise.
1274 (aarch64_handle_watchpoint): Likewise.
1275 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1276 (aarch64_remove_point): Likewise.
1277
25abf979
YQ
12782015-07-17 Yao Qi <yao.qi@linaro.org>
1279
1280 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1281 debug_printf.
1282 (aarch64_handle_unaligned_watchpoint): Likewise.
1283
db1ff28b
JK
12842015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1285
1286 Revert the previous 3 commits:
1287 Move gdb_regex* to common/
1288 Move linux_find_memory_regions_full & co.
1289 gdbserver build-id attribute generator
1290
700ca40f
JK
12912015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1292 Jan Kratochvil <jan.kratochvil@redhat.com>
1293
1294 gdbserver build-id attribute generator.
1295 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1296 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1297 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1298 (find_phdr): New.
1299 (get_dynamic): Use find_pdhr to traverse program headers.
1300 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1301 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1302 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1303 (get_hex_build_id): New.
1304 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1305 to reply XML document.
1306
9904185c
JK
13072015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1308 Jan Kratochvil <jan.kratochvil@redhat.com>
1309
1310 * target.c: Include target/target-utils.h and fcntl.h.
1311 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1312 (target_fileio_read_stralloc): New functions.
1313
6e5b4429
JK
13142015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1315
1316 * Makefile.in (OBS): Add gdb_regex.o.
1317 (gdb_regex.o): New.
1318 * config.in: Rebuilt.
1319 * configure: Rebuilt.
1320
ddc98fbf
JK
13212015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1322 Jan Kratochvil <jan.kratochvil@redhat.com>
1323
1324 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1325 * Makefile.in (OBS): Add target-utils.o.
1326 (linux-maps.o, target-utils.o): New.
1327 * configure.srv (srv_linux_obj): Add linux-maps.o.
1328
e57bb7a0
PL
13292015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1330
1331 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1332 function, return 1.
1333 (the_low_target): Install it.
1334
586b02a9
PA
13352015-07-14 Pedro Alves <palves@redhat.com>
1336
1337 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1338 Instead, ignore ECHILD, and throw an error for other errnos.
1339
58c1b36c
PA
13402015-07-10 Pedro Alves <palves@redhat.com>
1341
1342 * event-loop.c (struct callback_event) <data>: Change type to
1343 gdb_client_data instance instead of gdb_client_data pointer.
1344 (append_callback_event): Adjust.
1345
421530db
PL
13462015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1347
1348 * linux-aarch64-low.c: Add comments for each linux_target_ops
1349 method. Remove comments already covered in target_ops and
1350 linux_target_ops definitions.
1351 (the_low_target): Add comments for each unimplemented method.
1352
c2d65f38
YQ
13532015-07-09 Yao Qi <yao.qi@linaro.org>
1354
1355 * linux-aarch64-low.c (aarch64_regmap): Remove.
1356 (aarch64_usrregs_info): Remove.
1357 (regs_info): Set field usrregs to NULL.
1358
b20a6524
MM
13592015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1360
1361 * linux-low.c: Include "rsp-low.h"
1362 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1363 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1364 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1365 (handle_btrace_enable_pt): New.
1366 (handle_btrace_general_set): Support "pt".
1367 (handle_btrace_conf_general_set): Support "pt:size".
1368
96c97461
PL
13692015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1370
1371 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1372 Z_PACKET_SW_BP.
1373
37d66942
PL
13742015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1375
1376 * linux-aarch64-low.c: Remove comment about endianness.
1377 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1378 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1379 memcmp.
1380
dc06243f
GB
13812015-06-24 Gary Benson <gbenson@redhat.com>
1382
1383 * linux-i386-ipa.c (stdint.h): Do not include.
1384 * lynx-i386-low.c (stdint.h): Likewise.
1385 * lynx-ppc-low.c (stdint.h): Likewise.
1386 * mem-break.c (stdint.h): Likewise.
1387 * thread-db.c (stdint.h): Likewise.
1388 * tracepoint.c (stdint.h): Likewise.
1389 * win32-low.c (stdint.h): Likewise.
1390
124e13d9
SM
13912015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1392
1393 * server.c (write_qxfer_response): Update call to
1394 remote_escape_output.
1395
909c2cda
JK
13962015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1397 Jan Kratochvil <jan.kratochvil@redhat.com>
1398
1399 Merge multiple hex conversions.
1400 * gdbreplay.c (tohex): Rename to 'fromhex'.
1401 (logchar): Use fromhex.
1402
24c05f46
JK
14032015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1404
1405 * server.c (handle_qxfer_libraries): Set `version' attribute for
1406 <library-list>.
1407
14d2069a
GB
14082015-06-10 Gary Benson <gbenson@redhat.com>
1409
1410 * target.h (struct target_ops) <multifs_open>: New field.
1411 <multifs_unlink>: Likewise.
1412 <multifs_readlink>: Likewise.
1413 * linux-low.c (nat/linux-namespaces.h): New include.
1414 (linux_target_ops): Initialize the_target->multifs_open,
1415 the_target->multifs_unlink and the_target->multifs_readlink.
1416 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1417 * hostio.c (hostio_fs_pid): New static variable.
1418 (hostio_handle_new_gdb_connection): New function.
1419 (handle_setfs): Likewise.
1420 (handle_open): Use the_target->multifs_open as appropriate.
1421 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1422 (handle_readlink): Use the_target->multifs_readlink as
1423 appropriate.
1424 (handle_vFile): Handle vFile:setfs packets.
1425 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1426 after target_handle_new_gdb_connection.
1427
4b8b5e72
GB
14282015-06-10 Gary Benson <gbenson@redhat.com>
1429
1430 * configure.ac (AC_CHECK_FUNCS): Add setns.
1431 * config.in: Regenerate.
1432 * configure: Likewise.
1433 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1434 (linux-namespaces.o): New rule.
1435 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1436
3ac2e371
GB
14372015-06-09 Gary Benson <gbenson@redhat.com>
1438
1439 * hostio.c (handle_open): Process mode argument with
1440 fileio_to_host_mode.
1441
ca9b78ce
YQ
14422015-06-01 Yao Qi <yao.qi@linaro.org>
1443
1444 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1445 * linux-x86-low.c: Likewise.
1446
bfacd19d
DB
14472015-05-28 Don Breazeal <donb@codesourcery.com>
1448
1449 * linux-low.c (handle_extended_wait): Initialize
1450 thread_info.last_resume_kind for new fork children.
1451
452003ef
PA
14522015-05-15 Pedro Alves <palves@redhat.com>
1453
1454 * target.h (target_handle_new_gdb_connection): Rewrite using if
1455 wrapped in do/while.
1456
1041a03c
JB
14572015-05-14 Joel Brobecker <brobecker@adacore.com>
1458
1459 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1460 * configure, config.in: Regenerate.
1461 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1462 Declare typedef.
1463
c269dbdb
DB
14642015-05-12 Don Breazeal <donb@codesourcery.com>
1465
1466 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1467 PTRACE_EVENT_VFORK_DONE.
1468 (linux_low_ptrace_options, extended_event_reported): Add vfork
1469 events.
1470 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1471 and "vforkdone" for RSP 'T' Stop Reply Packet.
1472 * server.h (report_vfork_events): Declare
1473 global variable.
1474
3a8a0396
DB
14752015-05-12 Don Breazeal <donb@codesourcery.com>
1476
1477 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1478 (the_low_target) <new_fork>: Initialize new member.
1479 * linux-arm-low.c (arm_new_fork): New function.
1480 (the_low_target) <new_fork>: Initialize new member.
1481 * linux-low.c (handle_extended_wait): Call new target function
1482 new_fork.
1483 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1484 * linux-mips-low.c (mips_add_watchpoint): New function
1485 extracted from mips_insert_point.
1486 (the_low_target) <new_fork>: Initialize new member.
1487 (mips_linux_new_fork): New function.
1488 (mips_insert_point): Call mips_add_watchpoint.
1489 * linux-x86-low.c (x86_linux_new_fork): New function.
1490 (the_low_target) <new_fork>: Initialize new member.
1491
de0d863e
DB
14922015-05-12 Don Breazeal <donb@codesourcery.com>
1493
1494 * linux-low.c (handle_extended_wait): Implement return value,
1495 rename argument 'event_child' to 'event_lwp', handle
1496 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1497 (linux_low_ptrace_options): New function.
1498 (linux_low_filter_event): Call linux_low_ptrace_options,
1499 use different argument fo linux_enable_event_reporting,
1500 use return value from handle_extended_wait.
1501 (extended_event_reported): New function.
1502 (linux_wait_1): Call extended_event_reported and set
1503 status to report fork events.
1504 (linux_write_memory): Add pid to debug message.
1505 (reset_lwp_ptrace_options_callback): New function.
1506 (linux_handle_new_gdb_connection): New function.
1507 (linux_target_ops): Initialize new structure member.
1508 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1509 * lynx-low.c: Initialize new structure member.
1510 * remote-utils.c (prepare_resume_reply): Implement stop reason
1511 "fork" for "T" stop message.
1512 * server.c (handle_query): Call handle_new_gdb_connection.
1513 * server.h (report_fork_events): Declare global flag.
1514 * target.h (struct target_ops) <handle_new_gdb_connection>:
1515 New member.
1516 (target_handle_new_gdb_connection): New macro.
1517 * win32-low.c: Initialize new structure member.
1518
ddcbc397
DB
15192015-05-12 Don Breazeal <donb@codesourcery.com>
1520
1521 * mem-break.c (APPEND_TO_LIST): Define macro.
1522 (clone_agent_expr): New function.
1523 (clone_one_breakpoint): New function.
1524 (clone_all_breakpoints): New function.
1525 * mem-break.h: Declare new functions.
1526
89245bc0
DB
15272015-05-12 Don Breazeal <donb@codesourcery.com>
1528
1529 * linux-low.c (linux_supports_fork_events): New function.
1530 (linux_supports_vfork_events): New function.
1531 (linux_target_ops): Initialize new structure members.
1532 (initialize_low): Call linux_check_ptrace_features.
1533 * lynx-low.c (lynx_target_ops): Initialize new structure
1534 members.
1535 * server.c (report_fork_events, report_vfork_events):
1536 New global flags.
1537 (handle_query): Add new features to qSupported packet and
1538 response.
1539 (captured_main): Initialize new global variables.
1540 * target.h (struct target_ops) <supports_fork_events>:
1541 New member.
1542 <supports_vfork_events>: New member.
1543 (target_supports_fork_events): New macro.
1544 (target_supports_vfork_events): New macro.
1545 * win32-low.c (win32_target_ops): Initialize new structure
1546 members.
1547
835205d0
GB
15482015-05-12 Gary Benson <gbenson@redhat.com>
1549
1550 * server.c (handle_qxfer_exec_file): Use current process
1551 if annex is empty.
1552
21e94bd9
SL
15532015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1554
1555 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1556 Remove HAVE_PTRACE_GETREGS conditionals.
1557 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1558 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1559
45614f15
YQ
15602015-05-08 Yao Qi <yao.qi@linaro.org>
1561
1562 * linux-low.c (linux_supports_conditional_breakpoints): New
1563 function.
1564 (linux_target_ops): Install new target method.
1565 * lynx-low.c (lynx_target_ops): Install NULL hook for
1566 supports_conditional_breakpoints.
1567 * nto-low.c (nto_target_ops): Likewise.
1568 * spu-low.c (spu_target_ops): Likewise.
1569 * win32-low.c (win32_target_ops): Likewise.
1570 * server.c (handle_query): Check
1571 target_supports_conditional_breakpoints.
1572 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1573 New field.
1574 (target_supports_conditional_breakpoints): New macro.
1575
80ad801e
PA
15762015-05-06 Pedro Alves <palves@redhat.com>
1577
1578 PR server/18081
1579 * server.c (start_inferior): If the process exits, mourn it.
1580
819843c7
GB
15812015-04-21 Gary Benson <gbenson@redhat.com>
1582
1583 * hostio.c (fileio_open_flags_to_host): Factored out to
1584 fileio_to_host_openflags in common/fileio.c. Single use
1585 updated.
1586
a2d5a9d7
MF
15872015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1588
1589 * linux-xtensa-low.c (xtensa_fill_gregset)
1590 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1591 XCHAL_HAVE_LOOP.
1592
deb44829
MF
15932015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1594
1595 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1596 (regs_info): Replace usrregs pointer with NULL.
1597
e57f1de3
GB
15982015-04-17 Gary Benson <gbenson@redhat.com>
1599
1600 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1601 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1602 * server.c (handle_qxfer_exec_file): New function.
1603 (qxfer_packets): Add exec-file entry.
1604 (handle_query): Report qXfer:exec-file:read as supported packet.
1605
62828379
RN
16062015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1607
1608 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1609
b88bb450
GB
16102015-04-09 Gary Benson <gbenson@redhat.com>
1611
1612 * hostio-errno.c (errno_to_fileio_error): Remove function.
1613 Update caller to use remote_fileio_to_fio_error.
1614
c8f4bfdd
YQ
16152015-04-09 Yao Qi <yao.qi@linaro.org>
1616
1617 * linux-low.c (linux_insert_point): Call
1618 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1619 (linux_remove_point): Call remove_memory_breakpoint if type is
1620 raw_bkpt_type_sw.
1621 * linux-x86-low.c (x86_insert_point): Don't call
1622 insert_memory_breakpoint.
1623 (x86_remove_point): Don't call remove_memory_breakpoint.
1624
41f98f02
PA
16252015-04-01 Pedro Alves <palves@redhat.com>
1626 Cleber Rosa <crosa@redhat.com>
1627
1628 * server.c (gdbserver_usage): Reorganize and extend the usage
1629 message.
1630
2bf6fb9d
PA
16312015-03-24 Pedro Alves <palves@redhat.com>
1632
1633 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1634 output. Also dump TRAP_TRACE.
1635 (linux_low_filter_event): In debug output, distinguish a
1636 resume_stop SIGSTOP from a delayed SIGSTOP.
1637
369f6daa
GB
16382015-03-24 Gary Benson <gbenson@redhat.com>
1639
1640 * linux-x86-low.c (x86_linux_new_thread): Moved to
1641 nat/x86-linux.c.
1642 (x86_linux_prepare_to_resume): Likewise.
1643
8e5d4070
GB
16442015-03-24 Gary Benson <gbenson@redhat.com>
1645
1646 * Makefile.in (x86-linux-dregs.o): New rule.
1647 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1648 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1649 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1650 (x86_linux_dr_get): Likewise.
1651 (x86_linux_dr_set): Likewise.
1652 (update_debug_registers_callback): Likewise.
1653 (x86_linux_dr_set_addr): Likewise.
1654 (x86_linux_dr_get_addr): Likewise.
1655 (x86_linux_dr_set_control): Likewise.
1656 (x86_linux_dr_get_control): Likewise.
1657 (x86_linux_dr_get_status): Likewise.
1658 (x86_linux_update_debug_registers): Likewise.
1659
2b95d440
GB
16602015-03-24 Gary Benson <gbenson@redhat.com>
1661
1662 * linux-x86-low.c (x86_linux_update_debug_registers):
1663 New function, factored out from...
1664 (x86_linux_prepare_to_resume): ...this.
1665
14b0bc68
GB
16662015-03-24 Gary Benson <gbenson@redhat.com>
1667
1668 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1669 (x86_linux_dr_set): Likewise.
1670 (update_debug_registers_callback): Likewise.
1671 (x86_linux_dr_set_addr): Likewise.
1672 (x86_linux_dr_get_addr): Likewise.
1673 (x86_linux_dr_set_control): Likewise.
1674 (x86_linux_dr_get_control): Likewise.
1675 (x86_linux_dr_get_status): Likewise.
1676 (x86_linux_prepare_to_resume): Likewise.
1677
5dfe6ca8
GB
16782015-03-24 Gary Benson <gbenson@redhat.com>
1679
1680 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1681 Use perror_with_name. Pass string through gettext.
1682 (x86_linux_dr_set): Likewise.
1683
d33472ad
GB
16842015-03-24 Gary Benson <gbenson@redhat.com>
1685
1686 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1687 (x86_linux_dr_set_addr): ...this.
1688 (x86_dr_low_get_addr): Rename to...
1689 (x86_linux_dr_get_addr): ...this.
1690 (x86_dr_low_set_control): Rename to...
1691 (x86_linux_dr_set_control): ...this.
1692 (x86_dr_low_get_control): Rename to...
1693 (x86_linux_dr_get_control): ...this.
1694 (x86_dr_low_get_status): Rename to...
1695 (x86_linux_dr_get_status): ...this.
1696 (x86_dr_low): Update with new function names.
1697
4b134ca1
GB
16982015-03-24 Gary Benson <gbenson@redhat.com>
1699
1700 * Makefile.in (x86-linux.o): New rule.
1701 * configure.srv: Add x86-linux.o to relevant targets.
1702 * linux-low.c (lwp_set_arch_private_info): New function.
1703 (lwp_arch_private_info): Likewise.
1704 * linux-x86-low.c: Include nat/x86-linux.h.
1705 (arch_lwp_info): Removed structure.
1706 (update_debug_registers_callback):
1707 Use lwp_set_debug_registers_changed.
1708 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1709 and lwp_set_debug_registers_changed.
1710 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1711
34c703da
GB
17122015-03-24 Gary Benson <gbenson@redhat.com>
1713
1714 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1715 * linux-arm-low.c (arm_new_thread): Likewise.
1716 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1717 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1718 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1719 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1720
cff068da
GB
17212015-03-24 Gary Benson <gbenson@redhat.com>
1722
1723 * linux-low.c (ptid_of_lwp): New function.
1724 (lwp_is_stopped): Likewise.
1725 (lwp_stop_reason): Likewise.
1726 * linux-x86-low.c (update_debug_registers_callback):
1727 Use lwp_is_stopped.
1728 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1729 lwp_stop_reason.
1730
b2f7c7e8
GB
17312015-03-24 Gary Benson <gbenson@redhat.com>
1732
1733 * linux-low.h (linux_stop_lwp): Remove declaration.
1734
6d4ee8c6
GB
17352015-03-24 Gary Benson <gbenson@redhat.com>
1736
1737 * linux-low.h: Include nat/linux-nat.h.
1738 * linux-low.c (iterate_over_lwps_args): New structure.
1739 (iterate_over_lwps_filter): New function.
1740 (iterate_over_lwps): Likewise.
1741 * linux-x86-low.c (update_debug_registers_callback):
1742 Update signature to what iterate_over_lwps expects.
1743 Remove PID check that iterate_over_lwps now performs.
1744 (x86_dr_low_set_addr): Use iterate_over_lwps.
1745 (x86_dr_low_set_control): Likewise.
1746
70a0bb6b
GB
17472015-03-24 Gary Benson <gbenson@redhat.com>
1748
1749 * linux-x86-low.c (x86_debug_reg_state): New function.
1750 (x86_linux_prepare_to_resume): Use the above.
1751
7b669087
GB
17522015-03-24 Gary Benson <gbenson@redhat.com>
1753
1754 * linux-low.c (current_lwp_ptid): New function.
1755 * linux-x86-low.c: Include nat/linux-nat.h.
1756 (x86_dr_low_get_addr): Use current_lwp_ptid.
1757 (x86_dr_low_get_control): Likewise.
1758 (x86_dr_low_get_status): Likewise.
1759
eef49a3d
PA
17602015-03-20 Pedro Alves <palves@redhat.com>
1761
1762 * tracepoint.c (cmd_qtstatus): Make "str" const.
1763
b2333d22
PA
17642015-03-20 Pedro Alves <palves@redhat.com>
1765
1766 * server.c (handle_general_set): Make "req_str" const.
1767
23f238d3
PA
17682015-03-19 Pedro Alves <palves@redhat.com>
1769
1770 * linux-low.c (linux_resume_one_lwp): Rename to ...
1771 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1772 instead call perror_with_name.
1773 (check_ptrace_stopped_lwp_gone): New function.
1774 (linux_resume_one_lwp): Reimplement as wrapper around
1775 linux_resume_one_lwp_throw that swallows errors if the LWP is
1776 gone.
1777
91baf43f
PA
17782015-03-19 Pedro Alves <palves@redhat.com>
1779
1780 * linux-low.c (count_events_callback, select_event_lwp_callback):
1781 No longer check whether the thread has resume_stop as last resume
1782 kind.
1783
8bf3b159
PA
17842015-03-19 Pedro Alves <palves@redhat.com>
1785
1786 * linux-low.c (count_events_callback, select_event_lwp_callback):
1787 Use the lwp's status_pending_p field, not the thread's.
1788
b90fc188
PA
17892015-03-19 Pedro Alves <palves@redhat.com>
1790
1791 * linux-low.c (select_event_lwp_callback): Update comments to
1792 no longer mention SIGTRAP.
1793
464b0089
GB
17942015-03-18 Gary Benson <gbenson@redhat.com>
1795
1796 * server.c (handle_query): Do not report vFile:fstat as supported.
1797
aa9e327f
GB
17982015-03-11 Gary Benson <gbenson@redhat.com>
1799
1800 * hostio.c (sys/types.h): New include.
1801 (sys/stat.h): Likewise.
1802 (common-remote-fileio.h): Likewise.
1803 (handle_fstat): New function.
1804 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 1805
791c0056
GB
18062015-03-11 Gary Benson <gbenson@redhat.com>
1807
1808 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1809 struct stat.st_blocks and struct stat.st_blksize.
1810 * configure: Regenerate.
1811 * config.in: Likewise.
1812 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1813 (OBS): Add common-remote-fileio.o.
1814 (common-remote-fileio.o): New rule.
1815
9a9df970
PA
18162015-03-09 Pedro Alves <palves@redhat.com>
1817
1818 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1819 'struct sockaddr' pointer in 'accept' call.
1820
9eb1356e
PA
18212015-03-09 Pedro Alves <palves@redhat.com>
1822
1823 Revert:
1824 2015-03-07 Pedro Alves <palves@redhat.com>
1825 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1826 or <winsock2.h> here. Instead include "gdb_socket.h".
1827 (remote_open): Use union gdb_sockaddr_u.
1828 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1829 or <winsock2.h> here. Instead include "gdb_socket.h".
1830 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1831 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1832 or <sys/un.h>.
1833 (init_named_socket, gdb_agent_helper_thread): Use union
1834 gdb_sockaddr_u.
1835
aac331e4
PA
18362015-03-07 Pedro Alves <palves@redhat.com>
1837
1838 * configure.ac (build_warnings): Move
1839 -Wdeclaration-after-statement to the C-specific set.
1840 * configure: Regenerate.
1841
366c75fc
PA
18422015-03-07 Pedro Alves <palves@redhat.com>
1843
1844 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1845 or <winsock2.h> here. Instead include "gdb_socket.h".
1846 (remote_open): Use union gdb_sockaddr_u.
1847 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1848 or <winsock2.h> here. Instead include "gdb_socket.h".
1849 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1850 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1851 or <sys/un.h>.
1852 (init_named_socket, gdb_agent_helper_thread): Use union
1853 gdb_sockaddr_u.
1854
492d29ea
PA
18552015-03-07 Pedro Alves <palves@redhat.com>
1856
1857 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1858 instead.
1859
60a191ed
YQ
18602015-03-06 Yao Qi <yao.qi@linaro.org>
1861
1862 * linux-aarch64-low.c (aarch64_insert_point): Use
1863 show_debug_regs as a boolean.
1864 (aarch64_remove_point): Likewise.
1865
f5771b1d
PA
18662015-03-05 Pedro Alves <palves@redhat.com>
1867
1868 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1869 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1870 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1871 * nto-low.c (nto_target_ops): Likewise.
1872 * spu-low.c (spu_target_ops): Likewise.
1873 * win32-low.c (win32_target_ops): Likewise.
1874
3e572f71
PA
18752015-03-04 Pedro Alves <palves@redhat.com>
1876
72f4393d 1877 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
1878 Decide whether a breakpoint triggered based on the SIGTRAP's
1879 siginfo.si_code.
72f4393d
L
1880 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1881 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
1882 (linux_low_filter_event): Check for breakpoints before checking
1883 watchpoints.
1884 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1885 siginfo.si_code.
72f4393d
L
1886 (linux_stopped_by_sw_breakpoint)
1887 (linux_supports_stopped_by_sw_breakpoint)
1888 (linux_stopped_by_hw_breakpoint)
1889 (linux_supports_stopped_by_hw_breakpoint): New functions.
1890 (linux_target_ops): Install new target methods.
3e572f71 1891
1ec68e26
PA
18922015-03-04 Pedro Alves <palves@redhat.com>
1893
1894 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1895 * server.c (swbreak_feature, hwbreak_feature): New globals.
1896 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1897 (captured_main): Clear swbreak_feature and hwbreak_feature.
1898 * server.h (swbreak_feature, hwbreak_feature): Declare.
1899 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1900 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1901 supports_stopped_by_hw_breakpoint>: New fields.
1902 (target_supports_stopped_by_sw_breakpoint)
1903 (target_stopped_by_sw_breakpoint)
1904 (target_supports_stopped_by_hw_breakpoint)
1905 (target_stopped_by_hw_breakpoint): Declare.
1906
15c66dd6
PA
19072015-03-04 Pedro Alves <palves@redhat.com>
1908
1909 enum lwp_stop_reason -> enum target_stop_reason
1910 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1911 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1912 (linux_wait_1, stuck_in_jump_pad_callback)
1913 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1914 (linux_stopped_by_watchpoint):
1915 * linux-low.h (enum lwp_stop_reason): Delete.
1916 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1917 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1918
98fc70d6
YQ
19192015-03-04 Yao Qi <yao.qi@linaro.org>
1920
1921 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1922
dd2ac174
GB
19232015-03-03 Gary Benson <gbenson@redhat.com>
1924
1925 * hostio.c (handle_vFile): Fix prefix lengths.
1926
d68e53f4
MM
19272015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1928
1929 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1930 ptr_bits.
1931
bf2d68ab
AA
19322015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1933
1934 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1935 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1936 (clean): Add "rm -f" for above C files.
1937 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1938 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1939 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1940 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1941 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1942 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1943 (init_registers_s390x_vx_linux64)
1944 (init_registers_s390x_tevx_linux64)
1945 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1946 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1947 declarations.
1948 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1949 (s390_store_vxrs_high): New functions.
1950 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1951 NT_S390_VXRS_HIGH.
1952 (s390_arch_setup): Add logic for selecting one of the new target
1953 descriptions. Activate the new vector regsets if applicable.
1954 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1955 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1956 and init_registers_s390x_tevx_linux64.
1957
c966a859
PA
19582015-03-01 Pedro Alves <palves@redhat.com>
1959
1960 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1961 parameter.
1962
4180215b
PA
19632015-02-27 Pedro Alves <palves@redhat.com>
1964
1965 * linux-x86-low.c (u_debugreg_offset): New function.
1966 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1967
749bab01
PA
19682015-02-27 Pedro Alves <palves@redhat.com>
1969
1970 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1971 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1972 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1973 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1974 (ps_lsetfpregs, ps_getpid)
1975 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1976 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1977 (ps_lsetxregs, ps_plog): Declare.
1978
3c14e5a3
PA
19792015-02-27 Pedro Alves <palves@redhat.com>
1980
1981 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1982 IP_AGENT_EXPORT_FUNC.
1983 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1984 IP_AGENT_EXPORT_FUNC.
1985 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1986 (IP_AGENT_EXPORT): Delete.
1987 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1988 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1989 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1990 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1991 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1992 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1993 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1994 (traceframe_read_count, traceframe_write_count)
1995 (traceframes_created, trace_state_variables, get_raw_reg)
1996 (get_trace_state_variable_value, set_trace_state_variable_value)
1997 (ust_loaded, helper_thread_id, cmd_buf): Use
1998 IPA_SYM_EXPORTED_NAME.
1999 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2000 (tracepoints) Use IP_AGENT_EXPORT_VAR.
2001 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2002 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2003 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2004 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2005 EXTERN_C_PUSH/EXTERN_C_POP.
2006 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2007 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2008 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2009 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2010 (traceframe_write_count, traceframe_read_count)
2011 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2012 (about_to_request_buffer_space, get_trace_state_variable_value)
2013 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2014 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2015 EXTERN_C_PUSH/EXTERN_C_POP.
2016 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2017 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2018 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2019 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2020 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2021 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2022 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2023 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2024 Define.
2025 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2026 (IP_AGENT_EXPORT_VAR_DECL): Define.
2027 (tracing): Declare.
2028 (gdb_agent_get_raw_reg): Declare.
2029
fe978cb0
PA
20302015-02-27 Tom Tromey <tromey@redhat.com>
2031 Pedro Alves <palves@redhat.com>
2032
2033 Rename symbols whose names are reserved C++ keywords throughout.
2034
3bc3d82a
PA
20352015-02-27 Pedro Alves <palves@redhat.com>
2036
2037 * Makefile.in (COMPILER): New, get it from autoconf.
2038 (CXX): Get from autoconf instead.
2039 (COMPILE.pre): Use COMPILER.
2040 (CC-LD): Rename to ...
2041 (CC_LD): ... this. Use COMPILER.
2042 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2043 (CXX_FOR_TARGET): Default to g++ instead of gcc.
2044 * acinclude.m4: Include build-with-cxx.m4.
2045 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2046 Disable -Werror by default if building in C++ mode.
2047 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2048 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2049 the C++ compiler. Save/restore CXXFLAGS too.
2050 * configure: Regenerate.
2051
07697489
PA
20522015-02-27 Pedro Alves <palves@redhat.com>
2053
2054 * acinclude.m4: Include libiberty.m4.
2055 * configure.ac: Call libiberty_INIT.
2056 * config.in, configure: Regenerate.
2057
9beb7c4e
PA
20582015-02-26 Pedro Alves <palves@redhat.com>
2059
2060 * linux-low.c (linux_wait_1): When incrementing the PC past a
2061 program breakpoint always use the_low_target.breakpoint_len as
2062 increment, rather than the maximum between that and
2063 the_low_target.decr_pc_after_break.
2064
8090aef2
PA
20652015-02-23 Pedro Alves <palves@redhat.com>
2066
2067 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2068 thread was doing a step-over; always adjust the PC if
2069 we stepped over a permanent breakpoint.
2070 (linux_wait_1): If we stepped over breakpoint that was on top of a
2071 permanent breakpoint, manually advance the PC past it.
2072
bc9540e8
PA
20732015-02-23 Pedro Alves <palves@redhat.com>
2074
2075 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2076 modes.
2077 (x86_fill_gregset, x86_store_gregset): Use it when handling
2078 $orig_eax.
2079
2db9a427
PA
20802015-02-20 Pedro Alves <palves@redhat.com>
2081
2082 * thread-db.c: Include "nat/linux-procfs.h".
2083 (thread_db_init): Skip listing new threads if the kernel supports
2084 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2085
afa8d396
PA
20862015-02-20 Pedro Alves <palves@redhat.com>
2087
2088 * linux-low.c (status_pending_p_callback): Use ptid_match.
2089
c9587f88
AT
20902015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2091
2092 PR breakpoints/16812
2093 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2094 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2095 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2096
b05ec7a5
AT
20972015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2098
2099 PR breakpoints/15956
2100 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2101
d33501a5
MM
21022015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2103
2104 * linux-low.c (linux_low_btrace_conf): Print size.
2105 * server.c (handle_btrace_conf_general_set): New.
2106 (hanle_general_set): Call handle_btrace_conf_general_set.
2107 (handle_query): Report Qbtrace-conf:bts:size as supported.
2108
f4abbc16
MM
21092015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2110
2111 * linux-low.c (linux_low_enable_btrace): Update parameters.
2112 (linux_low_btrace_conf): New.
2113 (linux_target_ops)<to_btrace_conf>: Initialize.
2114 * server.c (current_btrace_conf): New.
2115 (handle_btrace_enable): Rename to ...
2116 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
2117 to target_enable_btrace. Update comment. Update users.
2118 (handle_qxfer_btrace_conf): New.
2119 (qxfer_packets): Add btrace-conf entry.
2120 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2121 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2122 (target_ops)<read_btrace_conf>: New.
2123 (target_enable_btrace): Update parameters.
2124 (target_read_btrace_conf): New.
2125
043c3577
MM
21262015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2127
2128 * server.c (handle_btrace_general_set): Remove call to
2129 target_supports_btrace.
2130 (supported_btrace_packets): New.
2131 (handle_query): Call supported_btrace_packets.
2132 * target.h: include btrace-common.h.
2133 (btrace_target_info): Removed.
2134 (supports_btrace, target_supports_btrace): Update parameters.
2135
734b0e4b
MM
21362015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2137
2138 * Makefile.in (SFILES): Add common/btrace-common.c.
2139 (OBS): Add common/btrace-common.o.
2140 (btrace-common.o): Add build rules.
2141 * linux-low: Include btrace-common.h.
2142 (linux_low_read_btrace): Use struct btrace_data. Call
2143 btrace_data_init and btrace_data_fini.
2144
d6c146e9
PA
21452015-02-06 Pedro Alves <palves@redhat.com>
2146
2147 * thread-db.c (find_new_threads_callback): Add debug output.
2148
20ba1ce6
PA
21492015-02-04 Pedro Alves <palves@redhat.com>
2150
2151 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2152 (resume_stopped_resumed_lwps): New function.
2153 (linux_wait_for_event_filtered): Use it.
2154
8cc73a39
SDJ
21552015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2156
2157 * Makefile.in (SFILES): Add linux-personality.c.
2158 (linux-personality.o): New rule.
2159 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2160 list of objects to be built.
2161 * linux-low.c: Include nat/linux-personality.h.
2162 (linux_create_inferior): Remove code to disable address space
2163 randomization (moved to ../nat/linux-personality.c). Create
2164 cleanup to disable address space randomization.
2165
fb23d554
SDJ
21662015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2167
2168 * Makefile.in (posix-strerror.o): New rule.
2169 (mingw-strerror.o): Likewise.
2170 * configure: Regenerated.
2171 * configure.ac: Source file ../common/common.host. Initialize new
2172 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2173
cdf43629
YQ
21742015-01-14 Yao Qi <yao@codesourcery.com>
2175
2176 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2177 (ppc-linux.o): New rule.
2178 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2179 * configure.ac: AC_CHECK_FUNCS(getauxval).
2180 * config.in: Re-generated.
2181 * configure: Re-generated.
2182 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2183 ppc64_64bit_inferior_p
2184
514c5338
YQ
21852015-01-14 Yao Qi <yao@codesourcery.com>
2186
2187 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2188 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2189 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2190 (PT_ORIG_R3, PT_TRAP): Likewise.
2191 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2192 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2193 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2194
3368c1e5
JB
21952015-01-10 Joel Brobecker <brobecker@adacore.com>
2196
2197 * i387-fp.c (i387_cache_to_xsave): In look over
2198 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2199 zmmh_low_space field by use of zmmh_high_space.
2200
582511be
PA
22012015-01-09 Pedro Alves <palves@redhat.com>
2202
2203 * linux-low.c (step_over_bkpt): Move higher up in the file.
2204 (handle_extended_wait): Don't store the stop_pc here.
2205 (get_stop_pc): Adjust comments and rename to ...
2206 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2207 stopped for a software breakpoint or hardware breakpoint.
2208 (thread_still_has_status_pending_p): New function.
2209 (status_pending_p_callback): Use
2210 thread_still_has_status_pending_p. If the event is no longer
2211 interesting, resume the LWP.
2212 (handle_tracepoints): Add assert.
2213 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2214 (wstatus_maybe_breakpoint): New function.
2215 (cancel_breakpoint): Delete function.
2216 (check_stopped_by_watchpoint): New function, factored out from
2217 linux_low_filter_event.
2218 (lp_status_maybe_breakpoint): Delete function.
2219 (linux_low_filter_event): Remove filter_ptid argument.
2220 Leave thread group exits pending here. Store the LWP's stop PC.
2221 Always leave events pending.
2222 (linux_wait_for_event_filtered): Pull all events out of the
2223 kernel, and leave them all pending.
2224 (count_events_callback, select_event_lwp_callback): Consider all
2225 events.
2226 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2227 (select_event_lwp): Only give preference to the stepping LWP in
2228 all-stop mode. Adjust comments.
2229 (ignore_event): New function.
2230 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2231 references to cancel_breakpoints. Adjust to renames. Also give
2232 equal priority to all LWPs that have had events in non-stop mode.
2233 If reporting a software breakpoint event, unadjust the LWP's PC.
2234 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2235 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2236 Adjust.
2237 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2238 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2239 (linux_stopped_by_watchpoint): Adjust.
2240 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2241 * linux-low.h (enum lwp_stop_reason): New.
2242 (struct lwp_info) <stop_pc>: Adjust comment.
2243 <stopped_by_watchpoint>: Delete field.
2244 <stop_reason>: New field.
2245 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2246 * mem-break.c (software_breakpoint_inserted_here)
2247 (hardware_breakpoint_inserted_here): New function.
2248 * mem-break.h (software_breakpoint_inserted_here)
2249 (hardware_breakpoint_inserted_here): Declare.
2250 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2251 (cancel_breakpoints): Delete.
2252 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2253 (upload_fast_traceframes): Remove references to
2254 cancel_breakpoints.
2255
a33e3959
PA
22562015-01-09 Pedro Alves <palves@redhat.com>
2257
2258 * thread-db.c (find_new_threads_callback): Ignore thread if the
2259 kernel thread ID is -1.
2260
8784d563
PA
22612015-01-09 Pedro Alves <palves@redhat.com>
2262
2263 * linux-low.c (linux_attach_fail_reason_string): Move to
2264 nat/linux-ptrace.c, and rename.
2265 (linux_attach_lwp): Update comment.
2266 (attach_proc_task_lwp_callback): New function.
2267 (linux_attach): Adjust to rename and use
2268 linux_proc_attach_tgid_threads.
2269 (linux_attach_fail_reason_string): Delete declaration.
2270
76f2b779
JB
22712015-01-01 Joel Brobecker <brobecker@adacore.com>
2272
2273 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2274 * server.c (gdbserver_version): Likewise.
2275
fafcc06a
SDJ
22762014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2277
2278 * remote-utils.c: Include ctype.h.
2279 (input_interrupt): Explicitly handle the case when the char
2280 received is the NUL byte. Improve the printing of non-ASCII
2281 characters.
2282
beed38b8
JB
22832014-12-16 Joel Brobecker <brobecker@adacore.com>
2284
2285 * linux-low.c (linux_low_filter_event): Update call to
2286 linux_enable_event_reporting following the addition of
2287 a new parameter to that function.
2288
bf330350
CU
22892014-12-16 Catalin Udma <catalin.udma@freescale.com>
2290
2291 PR server/17457
2292 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2293 (AARCH64_FPCR_REGNO): Likewise.
2294 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2295 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2296 (aarch64_store_fpregset): Likewise.
2297
5227d625
JB
22982014-12-15 Joel Brobecker <brobecker@adacore.com>
2299
2300 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2301 Remove FIXME comment about assumption about N.
2302
f93b65a0
JB
23032014-12-13 Joel Brobecker <brobecker@adacore.com>
2304
2305 * configure.ac: If large-file support is disabled in GDBserver,
2306 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2307 * configure: Regenerate.
2308
e5a9158d
AA
23092014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2310
2311 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2312 warning upon ENODATA from ptrace.
2313 * linux-s390-low.c (s390_store_tdb): New.
2314 (s390_regsets): Add regset for NT_S390_TDB.
2315
feea5f36
AA
23162014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2317
2318 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2319 without a fill_function.
2320 * linux-s390-low.c (s390_fill_last_break): Remove.
2321 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2322 (s390_arch_setup): Use regset's size instead of fill_function for
2323 loop end condition.
2324
098dbe61
AA
23252014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2326
2327 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2328 the regset's store function when ptrace returned an error.
2329 * regcache.c (get_thread_regcache): Invalidate register cache
2330 before fetching inferior's registers.
2331
28eef672
AA
23322014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2333
2334 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2335 while-loop as for-loop.
2336 (regsets_store_inferior_registers): Likewise.
2337
bdca27a2
YQ
23382014-11-28 Yao Qi <yao@codesourcery.com>
2339
2340 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2341 * config.in, configure: Re-generate.
2342 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2343 is defined.
2344
9c232dda
YQ
23452014-11-21 Yao Qi <yao@codesourcery.com>
2346
2347 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2348 (AC_CHECK_HEADERS): Remove malloc.h.
2349 * configure: Re-generated.
2350 * config.in: Re-generated.
2351 * server.h: Don't include alloca.h and malloc.h.
2352 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2353 Don't include malloc.h.
2354
43968415
JB
23552014-11-17 Joel Brobecker <brobecker@adacore.com>
2356
2357 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2358 corresponding ERRNO check in same block.
2359
40e91bc7
PA
23602014-11-12 Pedro Alves <palves@redhat.com>
2361
2362 * server.c (cont_thread): Update comment.
2363 (start_inferior, attach_inferior): No longer clear cont_thread.
2364 (handle_v_cont): No longer set cont_thread.
2365 (captured_main): Clear cont_thread each time a GDB connects.
2366
c2c118cf
PA
23672014-11-12 Pedro Alves <palves@redhat.com>
2368
2369 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2370 thread, and don't resume all threads if the Hc thread has exited.
2371
78708b7c
PA
23722014-11-12 Pedro Alves <palves@redhat.com>
2373
2374 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2375 the process group instead of to a specific LWP.
2376
a2abc7de
PA
23772014-10-15 Pedro Alves <palves@redhat.com>
2378
2379 PR server/17487
2380 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2381 parameter.
2382 (arm_set_thread_context): Delete.
2383 (the_low_target): Adjust.
2384 * win32-i386-low.c (debug_registers_changed)
2385 (debug_registers_used): Delete.
2386 (update_debug_registers_callback): New function.
2387 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2388 needing to update their debug registers.
2389 (win32_get_current_dr): New function.
2390 (x86_dr_low_get_addr, x86_dr_low_get_control)
2391 (x86_dr_low_get_status): Fetch the debug register from the thread
2392 record's context.
2393 (i386_initial_stuff): Adjust.
2394 (i386_get_thread_context): Remove current_event parameter. Don't
2395 clear debug_registers_changed nor copy DR values to
2396 debug_reg_state.
2397 (i386_set_thread_context): Delete.
2398 (i386_prepare_to_resume): New function.
2399 (i386_thread_added): Mark the thread as needing to update irs
2400 debug registers.
2401 (the_low_target): Remove i386_set_thread_context and install
2402 i386_prepare_to_resume.
2403 * win32-low.c (win32_get_thread_context): Adjust.
2404 (win32_set_thread_context): Use SetThreadContext
2405 directly.
2406 (win32_prepare_to_resume): New function.
2407 (win32_require_context): New function, factored out from ...
2408 (thread_rec): ... this.
2409 (continue_one_thread): Call win32_prepare_to_resume on each thread
2410 we're about to continue.
2411 (win32_resume): Call win32_prepare_to_resume on the event thread.
2412 * win32-low.h (struct win32_thread_info)
2413 <debug_registers_changed>: New field.
2414 (struct win32_target_ops): Change prototype of set_thread_context,
2415 delete set_thread_context and add prepare_to_resume.
2416 (win32_require_context): New declaration.
2417
a442d071
GB
24182014-10-08 Gary Benson <gbenson@redhat.com>
2419
2420 * server.h: Do not include common-exceptions.h.
2421
6f1947e8
GB
24222014-10-08 Gary Benson <gbenson@redhat.com>
2423
2424 * server.h: Do not include cleanups.h.
2425
63b434a4
JH
24262014-09-30 James Hogan <james.hogan@imgtec.com>
2427
2428 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2429 mips64-dsp-linux.c.
2430
c4d9ceb6
YQ
24312014-09-23 Yao Qi <yao@codesourcery.com>
2432
2433 * linux-low.c (lp_status_maybe_breakpoint): New function.
2434 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2435 (count_events_callback): Likewise.
2436 (select_event_lwp_callback): Likewise.
2437 (cancel_breakpoints_callback): Likewise.
2438
89a5711c
DB
24392014-09-19 Don Breazeal <donb@codesourcery.com>
2440
2441 * linux-low.c (handle_extended_wait): Call
2442 linux_ptrace_get_extended_event.
2443 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2444 linux_is_extended_waitstatus.
2445
bffc0964
JB
24462014-09-16 Joel Brobecker <brobecker@adacore.com>
2447
2448 * Makefile.in (CPPFLAGS): Define.
2449 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2450 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2451
0bfdf32f
GB
24522014-09-16 Gary Benson <gbenson@redhat.com>
2453
2454 * inferiors.h (current_inferior): Renamed as...
2455 (current_thread): New variable. All uses updated.
2456 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2457 (maybe_move_out_of_jump_pad): Likewise.
2458 (cancel_breakpoint): Likewise.
2459 (linux_low_filter_event): Likewise.
2460 (wait_for_sigstop): Likewise.
2461 (linux_resume_one_lwp): Likewise.
2462 (need_step_over_p): Likewise.
2463 (start_step_over): Likewise.
2464 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2465 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2466 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2467 and save_inferior as saved_thread.
2468 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2469 saved_thread.
2470 (regcache_invalidate_thread): Likewise.
2471 * remote-utils.c (prepare_resume_reply): Likewise.
2472 * thread-db.c (thread_db_get_tls_address): Likewise.
2473 (disable_thread_event_reporting): Likewise.
2474 (remove_thread_event_breakpoints): Likewise.
2475 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2476 as saved_thread.
2477 * target.h (set_desired_inferior): Renamed as...
2478 (set_desired_thread): New declaration. All uses updated.
2479 * server.c (myresume): Updated comment to reference thread instead
2480 of inferior.
2481 (handle_serial_event): Likewise.
2482 (handle_target_event): Likewise.
2483
361c8ade
GB
24842014-09-12 Tom Tromey <tromey@redhat.com>
2485 Gary Benson <gbenson@redhat.com>
2486
2487 * regcache.h: Include common-regcache.h.
2488 (regcache_read_pc): Don't declare.
2489 * regcache.c (get_thread_regcache_for_ptid): New function.
2490
bd9269f7
GB
24912014-09-11 Tom Tromey <tromey@redhat.com>
2492 Gary Benson <gbenson@redhat.com>
2493
2494 * symbol.c: New file.
2495 * Makefile.in (SFILES): Add symbol.c.
2496 (OBS): Add symbol.o.
2497
f8c1d06b
GB
24982014-09-11 Gary Benson <gbenson@redhat.com>
2499
2500 * target.c (target_stop_ptid, target_continue_ptid): New
2501 functions.
2502
721ec300
GB
25032014-09-11 Tom Tromey <tromey@redhat.com>
2504 Gary Benson <gbenson@redhat.com>
2505
2506 * target.h: Include target/target.h.
2507 * target.c (target_read_memory, target_read_uint32)
2508 (target_write_memory): New functions.
2509
c5e92cca
GB
25102014-09-11 Gary Benson <gbenson@redhat.com>
2511
2512 * server.h (debug_hw_points): Don't declare.
2513 * server.c (debug_hw_points): Don't define. Replace all uses
2514 with show_debug_regs.
2515 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2516 all uses with show_debug_regs.
2517
2e4bb98a
EBM
25182014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2519
2520 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2521 endianness into account.
2522 (ppc_supply_ptrace_register): Likewise.
2523
ac740bc7
JH
25242014-09-03 James Hogan <james.hogan@imgtec.com>
2525
2526 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2527 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2528
97ea6506
GB
25292014-09-03 Gary Benson <gbenson@redhat.com>
2530
2531 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2532 ALL_DEBUG_ADDRESS_REGISTERS.
2533
df7e5265
GB
25342014-09-02 Gary Benson <gbenson@redhat.com>
2535
2536 * i386-low.h: Renamed as...
2537 * x86-low.h: New file. All type, function and variable name
2538 prefixes changed from "i386_" to "x86_". All references updated.
2539 * i386-low.c: Renamed as...
2540 * x86-low.c: New file. All type, function and variable name
2541 prefixes changed from "i386_" to "x86_". All references updated.
2542
ed859da7
GB
25432014-09-02 Gary Benson <gbenson@redhat.com>
2544
2545 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2546 (x86_linux_new_thread): Likewise.
2547
860789c7
GB
25482014-08-29 Gary Benson <gbenson@redhat.com>
2549
2550 * server.h (setjmp.h): Do not include.
2551 (toplevel): Do not declare.
2552 (common-exceptions.h): Include.
2553 (cleanups.h): Likewise.
2554 * server.c (toplevel): Do not define.
2555 (exit_code): New static global.
2556 (detach_or_kill_for_exit_cleanup): New function.
2557 (main): New function. Original main renamed to...
2558 (captured_main): New function.
2559 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2560
ff55e1b5
GB
25612014-08-29 Gary Benson <gbenson@redhat.com>
2562
2563 * Makefile.in (SFILES): Add common/common-exceptions.c.
2564 (OBS): Add common-exceptions.o.
2565 (common-exceptions.o): New rule.
2566 * utils.c (prepare_to_throw_exception): New function.
2567
e9bcb658
GB
25682014-08-29 Gary Benson <gbenson@redhat.com>
2569
2570 * config.in: Regenerate.
2571 * configure: Likewise.
2572
e3180625
GB
25732014-08-29 Gary Benson <gbenson@redhat.com>
2574
2575 * Makefile.in (SFILES): Add common/cleanups.c.
2576 (OBS): cleanups.o.
2577 (cleanups.o): New rule.
2578
e3d6ba5d
GB
25792014-08-29 Gary Benson <gbenson@redhat.com>
2580
2581 * utils.c (internal_vwarning): New function.
2582
7096e886
GB
25832014-08-28 Gary Benson <gbenson@redhat.com>
2584
2585 * utils.h (fatal): Remove declaration.
2586 * utils.c (fatal): Remove function.
2587
14ce3192
GB
25882014-08-28 Gary Benson <gbenson@redhat.com>
2589
2590 * tracepoint.c (gdb_agent_init): Replace fatal with
2591 perror_with_name.
2592 (initialize_tracepoint): Likewise.
2593
50278d59
GB
25942014-08-28 Gary Benson <gbenson@redhat.com>
2595
2596 * remote-utils.c (remote_prepare): Replace fatal with error.
2597
aa96c426
GB
25982014-08-28 Gary Benson <gbenson@redhat.com>
2599
2600 * linux-low.c (linux_async): Replace fatal with warning.
2601 Tidy up and return.
2602 (linux_start_non_stop): Return -1 if linux_async failed.
2603
f7160e97
GB
26042014-08-28 Gary Benson <gbenson@redhat.com>
2605
2606 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2607 gdb_assert.
2608 (i386_dr_low_get_addr): Remove vague comment.
2609 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2610 gdb_assert.
2611
38e08fca
GB
26122014-08-28 Gary Benson <gbenson@redhat.com>
2613
2614 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2615 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2616 internal_error.
2617 (linux_resume_one_lwp): Likewise.
2618 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2619 gdb_assert.
2620 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2621 with internal_error.
2622 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2623 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2624 (find_register_by_name): Replace fatal with internal_error.
2625 (find_regno): Likewise.
2626 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2627 * thread-db.c (thread_db_create_event): Likewise.
2628 (thread_db_load_search): Likewise.
2629 (try_thread_db_load_1): Likewise.
2630 * tracepoint.c (get_jump_space_head): Replace fatal with
2631 internal_error.
2632 (claim_trampoline_space): Likewise.
2633 (have_fast_tracepoint_trampoline_buffer): Likewise.
2634 (cmd_qtstart): Likewise.
2635 (stop_tracing): Likewise.
2636 (fast_tracepoint_collecting): Likewise.
2637 (target_malloc): Likewise.
2638 (download_tracepoint): Likewise.
2639 (download_trace_state_variables): Replace check with gdb_assert.
2640 (upload_fast_traceframes): Replace fatal with internal_error.
2641
34abf635
GB
26422014-08-19 Tom Tromey <tromey@redhat.com>
2643 Gary Benson <gbenson@redhat.com>
2644
2645 * Makefile.in (SFILES): Add common/common-debug.c.
2646 (OBS): Add common-debug.o.
2647 (common-debug.o): New rule.
2648 * debug.h (debug_printf): Don't declare.
2649 * debug.c (debug_printf): Renamed and rewritten as...
2650 (debug_vprintf): New function.
2651
f6e94d78
GB
26522014-08-19 Gary Benson <gbenson@redhat.com>
2653
2654 * utils.h: Do not include print-utils.h.
2655
9239eeab
GB
26562014-08-19 Tom Tromey <tromey@redhat.com>
2657 Gary Benson <gbenson@redhat.com>
2658
2659 * server.h: Add static assertion.
2660 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2661
ef87c8bb
GB
26622014-08-19 Tom Tromey <tromey@redhat.com>
2663 Gary Benson <gbenson@redhat.com>
2664
2665 * Makefile.in (SFILES): Add common/errors.c.
2666 (OBS): Add errors.o.
2667 (IPA_OBS): Add errors-ipa.o.
2668 (errors.o): New rule.
2669 (errors-ipa.o): Likewise.
2670 * utils.h (perror_with_name, error, warning): Don't declare.
2671 * utils.c (warning): Renamed and rewritten as...
2672 (vwarning): New function.
2673 (error): Renamed and rewritten as...
2674 (verror): New function.
2675 (internal_error): Renamed and rewritten as...
2676 (internal_verror): New function.
2677
bb974a24
GB
26782014-08-07 Gary Benson <gbenson@redhat.com>
2679
2680 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2681 * configure: Regenerate.
2682 * config.in: Likewise.
2683 * server.h: Do not include errno.h.
2684 * event-loop.c: Likewise.
2685 * hostio-errno.c: Likewise.
2686 * linux-low.c: Likewise.
2687 * remote-utils.c: Likewise.
2688 * spu-low.c: Likewise.
2689 * utils.c: Likewise.
2690 * gdbreplay.c: Unconditionally include errno.h.
2691
6d3d12eb
GB
26922014-08-07 Gary Benson <gbenson@redhat.com>
2693
2694 * server.h: Do not include string.h.
2695 * event-loop.c: Likewise.
2696 * linux-low.c: Likewise.
2697 * regcache.c: Likewise.
2698 * remote-utils.c: Likewise.
2699 * spu-low.c: Likewise.
2700 * utils.c: Likewise.
2701
dccbb609
GB
27022014-08-07 Gary Benson <gbenson@redhat.com>
2703
2704 * server.h: Do not include gdb_assert.h.
2705
e76df0d0
GB
27062014-08-07 Gary Benson <gbenson@redhat.com>
2707
2708 * server.h: Do not include common-utils.h.
2709
4cb9c816
GB
27102014-08-07 Gary Benson <gbenson@redhat.com>
2711
2712 * server.h: Do not include ptid.h.
2713 * notif.h: Likewise.
2714
3995eeee
GB
27152014-08-07 Gary Benson <gbenson@redhat.com>
2716
2717 * server.h: Do not include gdb_locale.h.
2718
cb9f1a9b
GB
27192014-08-07 Gary Benson <gbenson@redhat.com>
2720
2721 * server.h: Do not include gdb/signals.h.
2722 * win32-low.c: Likewise.
2723
a5fceff8
GB
27242014-08-07 Gary Benson <gbenson@redhat.com>
2725
2726 * server.h: Do not include pathmax.h.
2727
b9391142
GB
27282014-08-07 Gary Benson <gbenson@redhat.com>
2729
2730 * server.h: Do not include libiberty.h.
2731 * linux-bfin-low.c: Likewise.
2732
0e443c87
GB
27332014-08-07 Gary Benson <gbenson@redhat.com>
2734
2735 * server.h: Do not include ansidecl.h.
2736
8ebb3f56
GB
27372014-08-07 Gary Benson <gbenson@redhat.com>
2738
2739 * linux-x86-low.c: Do not include stddef.h.
2740 * lynx-ppc-low.c: Likewise.
2741 * tracepoint.c: Likewise.
2742
8980bdf6
GB
27432014-08-07 Gary Benson <gbenson@redhat.com>
2744
2745 * server.h: Do not include stdarg.h.
2746 * nto-low.c: Likewise.
2747
d7096f71
GB
27482014-08-07 Gary Benson <gbenson@redhat.com>
2749
2750 * server.h: Do not include stdlib.h.
2751 * inferiors.c: Likewise.
2752 * linux-low.c: Likewise.
2753 * regcache.c: Likewise.
2754 * spu-low.c: Likewise.
2755 * tracepoint.c: Likewise.
2756 * utils.c: Likewise.
2757
d02f550d
GB
27582014-08-07 Gary Benson <gbenson@redhat.com>
2759
2760 * server.h: Do not include stdio.h.
2761 * linux-low.c: Likewise.
2762 * remote-utils.c: Likewise.
2763 * spu-low.c: Likewise.
2764 * utils.c: Likewise.
2765 * wincecompat.c: Likewise.
2766
87f6c4e3
GB
27672014-08-06 Gary Benson <gbenson@redhat.com>
2768
2769 * regcache.c (init_register_cache): Move conditionals inside if.
2770
7089dca4
GB
27712014-08-06 Gary Benson <gbenson@redhat.com>
2772
2773 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2774
462f517e
GB
27752014-07-31 Gary Benson <gbenson@redhat.com>
2776
2777 * ax.h: Do not include server.h.
2778 * gdbthread.h: Likewise.
2779 * lynx-low.h: Likewise.
2780 * notif.h: Likewise.
2781
976411d6
GB
27822014-07-30 Gary Benson <gbenson@redhat.com>
2783
2784 * server.h: Include common-defs.h.
2785 Do not include config.h or build-gnulib-gdbserver/config.h.
2786
d41f6d8e
GB
27872014-07-30 Gary Benson <gbenson@redhat.com>
2788
2789 * hostio-errno.c: Move server.h to top of includes list.
2790 * inferiors.c: Likewise.
2791 * linux-x86-low.c: Likewise.
2792 * notif.c: Include server.h.
2793
314c6a35
TT
27942014-07-24 Tom Tromey <tromey@redhat.com>
2795 Gary Benson <gbenson@redhat.com>
2796
2797 * server.h (CORE_ADDR): Now unsigned.
2798
69ff6be5
PA
27992014-07-16 Pedro Alves <palves@redhat.com>
2800
2801 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2802
ce9e3fe7
PA
28032014-07-15 Pedro Alves <palves@redhat.com>
2804
2805 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2806 copy.
2807
e76126e8
PA
28082014-07-11 Pedro Alves <palves@redhat.com>
2809
2810 * linux-low.c (kill_wait_lwp): New function, based on
2811 kill_one_lwp_callback, but use my_waitpid directly.
2812 (kill_one_lwp_callback, linux_kill): Use it.
2813
8e9db26e
PA
28142014-06-23 Pedro Alves <palves@redhat.com>
2815
2816 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2817 before setting DR0..DR3.
2818
698b3e08
GB
28192014-06-20 Gary Benson <gbenson@redhat.com>
2820
2821 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2822 * configure: Regenerated.
2823 * config.in: Likewise.
2824
125f8a3d
GB
28252014-06-20 Gary Benson <gbenson@redhat.com>
2826
2827 * Makefile.in (SFILES): Update locations for files moved
2828 from common to nat.
2829 (object file files): Reordered.
2830
42995dbd
GB
28312014-06-20 Gary Benson <gbenson@redhat.com>
2832
2833 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2834 (i386_dr_low_set_addr): Likewise.
2835 (i386_dr_low_get_addr): Likewise.
2836 (i386_dr_low_can_set_control): Likewise.
2837 (i386_dr_low_set_control): Likewise.
2838 (i386_dr_low_get_control): Likewise.
2839 (i386_dr_low_get_status): Likewise.
2840 (i386_get_debug_register_length): Likewise.
2841 * linux-x86-low.c (i386_dr_low_set_addr):
2842 Changed signature. Made static.
2843 (i386_dr_low_get_addr): Likewise.
2844 (i386_dr_low_set_control): Likewise.
2845 (i386_dr_low_get_control): Likewise.
2846 (i386_dr_low_get_status): Likewise.
2847 (i386_dr_low): New global variable.
2848 * win32-i386-low.c (i386_dr_low_set_addr):
2849 Changed signature. Made static.
2850 (i386_dr_low_get_addr): Likewise.
2851 (i386_dr_low_set_control): Likewise.
2852 (i386_dr_low_get_control): Likewise.
2853 (i386_dr_low_get_status): Likewise.
2854 (i386_dr_low): New global variable.
2855
e1d2394b
MS
28562014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2857
2858 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2859 * Makefile.in (AR, AR_FLAGS): Define.
2860 * configure: Regenerate.
2861
3a8ee006
GB
28622014-06-19 Gary Benson <gbenson@redhat.com>
2863
2864 * Makefile.in (i386-dregs.o): New rule.
2865 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2866 * i386-low.c (target.h): Remove include.
2867 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2868 (DR_CONTROL_SHIFT): Likewise.
2869 (DR_CONTROL_SIZE): Likewise.
2870 (DR_RW_EXECUTE): Likewise.
2871 (DR_RW_WRITE): Likewise.
2872 (DR_RW_READ): Likewise.
2873 (DR_RW_IORW): Likewise.
2874 (DR_LEN_1): Likewise.
2875 (DR_LEN_2): Likewise.
2876 (DR_LEN_4): Likewise.
2877 (DR_LEN_8): Likewise.
2878 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2879 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2880 (DR_ENABLE_SIZE): Likewise.
2881 (DR_LOCAL_SLOWDOWN): Likewise.
2882 (DR_GLOBAL_SLOWDOWN): Likewise.
2883 (DR_CONTROL_RESERVED): Likewise.
2884 (I386_DR_CONTROL_MASK): Likewise.
2885 (I386_DR_VACANT): Likewise.
2886 (I386_DR_LOCAL_ENABLE): Likewise.
2887 (I386_DR_GLOBAL_ENABLE): Likewise.
2888 (I386_DR_DISABLE): Likewise.
2889 (I386_DR_SET_RW_LEN): Likewise.
2890 (I386_DR_GET_RW_LEN): Likewise.
2891 (I386_DR_WATCH_HIT): Likewise.
2892 (i386_wp_op_t): Likewise.
2893 (i386_show_dr): Likewise.
2894 (i386_length_and_rw_bits): Likewise.
2895 (i386_insert_aligned_watchpoint): Likewise.
2896 (i386_remove_aligned_watchpoint): Likewise.
2897 (i386_handle_nonaligned_watchpoint): Likewise.
2898 i386_update_inferior_debug_regs(): Likewise.
2899 (i386_dr_insert_watchpoint): Likewise.
2900 (i386_dr_remove_watchpoint): Likewise.
2901 (i386_dr_region_ok_for_watchpoint): Likewise.
2902 (i386_dr_stopped_data_address): Likewise.
2903 (i386_dr_stopped_by_watchpoint): Likewise.
2904
8f26655c
GB
29052014-06-19 Gary Benson <gbenson@redhat.com>
2906
2907 * i386-low.c (i386_dr_show): Renamed to
2908 i386_show_dr and made static. All uses updated.
2909 (i386_dr_length_and_rw_bits): Renamed to
2910 i386_length_and_rw_bits and made static.
2911 All uses updated.
2912 (i386_dr_insert_aligned_watchpoint): Renamed to
2913 i386_insert_aligned_watchpoint and made static.
2914 All uses updated.
2915 (i386_dr_remove_aligned_watchpoint): Renamed to
2916 i386_remove_aligned_watchpoint and made static.
2917 All uses updated.
2918 (i386_dr_update_inferior_debug_regs): Renamed to
2919 i386_update_inferior_debug_regs and made static.
2920 All uses updated.
2921
b9228891
GB
29222014-06-18 Gary Benson <gbenson@redhat.com>
2923
5171def3
GB
2924 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2925 (i386_dr_low_can_set_control): Likewise.
2926 (i386_get_debug_register_length): Likewise.
2927 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2928 (i386_dr_low_can_set_control): Likewise.
2929 (i386_get_debug_register_length): Likewise.
2930
29312014-06-17 Gary Benson <gbenson@redhat.com>
2932
b9228891
GB
2933 * i386-low.h (i386-dregs.h): New include.
2934 (DR_FIRSTADDR): Now in i386-dregs.h.
2935 (DR_LASTADDR): Likewise.
2936 (DR_NADDR): Likewise.
2937 (DR_STATUS): Likewise.
2938 (DR_CONTROL): Likewise.
2939 (i386_debug_reg_state): Likewise.
2940 (i386_dr_insert_watchpoint): Likewise.
2941 (i386_dr_remove_watchpoint): Likewise.
2942 (i386_dr_region_ok_for_watchpoint): Likewise.
2943 (i386_dr_stopped_data_address): Likewise.
2944 (i386_dr_stopped_by_watchpoint): Likewise.
2945 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2946
4be83cc2
GB
29472014-06-18 Gary Benson <gbenson@redhat.com>
2948
2949 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2950 i386_dr_insert_watchpoint.
2951 (i386_low_remove_watchpoint): Renamed to
2952 i386_dr_remove_watchpoint.
2953 (i386_low_region_ok_for_watchpoint): Renamed to
2954 i386_dr_region_ok_for_watchpoint.
2955 (i386_low_stopped_data_address): Renamed to
2956 i386_dr_stopped_data_address.
2957 (i386_low_stopped_by_watchpoint): Renamed to
2958 i386_dr_stopped_by_watchpoint.
2959 * i386-low.c (i386_show_dr): Renamed to
2960 i386_dr_show and made nonstatic. All uses updated.
2961 (i386_length_and_rw_bits): Renamed to
2962 i386_dr_length_and_rw_bits and made nonstatic.
2963 All uses updated.
2964 (i386_insert_aligned_watchpoint): Renamed to
2965 i386_dr_insert_aligned_watchpoint and made nonstatic.
2966 All uses updated.
2967 (i386_remove_aligned_watchpoint): Renamed to
2968 i386_dr_remove_aligned_watchpoint and made nonstatic.
2969 All uses updated.
2970 (i386_update_inferior_debug_regs): Renamed to
2971 i386_dr_update_inferior_debug_regs and made nonstatic.
2972 All uses updated.
2973 (i386_low_insert_watchpoint): Renamed to
2974 i386_dr_insert_watchpoint. All uses updated.
2975 (i386_low_remove_watchpoint): Renamed to
2976 i386_dr_remove_watchpoint. All uses updated.
2977 (i386_low_region_ok_for_watchpoint): Renamed to
2978 i386_dr_region_ok_for_watchpoint. All uses updated.
2979 (i386_low_stopped_data_address): Renamed to
2980 i386_dr_stopped_data_address. All uses updated.
2981 (i386_low_stopped_by_watchpoint): Renamed to
2982 i386_dr_stopped_by_watchpoint. All uses updated.
2983
131aa0d4
GB
29842014-06-18 Gary Benson <gbenson@redhat.com>
2985
2986 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2987 (i386_dr_low_can_set_control): Likewise.
2988 (i386_insert_aligned_watchpoint): New check.
2989
d9305f7f
GB
29902014-06-18 Gary Benson <gbenson@redhat.com>
2991
2992 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2993 Renamed to state.
2994
e927c9fc
GB
29952014-06-18 Gary Benson <gbenson@redhat.com>
2996
2997 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2998 instead of fatal and error.
2999 (i386_handle_nonaligned_watchpoint): Likewise.
3000
1b6d4134
GB
30012014-06-18 Gary Benson <gbenson@redhat.com>
3002
3003 * i386-low.c (i386_get_debug_register_length): New macro.
3004 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
3005 (i386_show_dr): Use debug_printf instead of fprintf. Use
3006 phex to format values.
3007
6e62758f
GB
30082014-06-18 Gary Benson <gbenson@redhat.com>
3009
3010 * i386-low.h: Comment changes.
3011 * i386-low.c: Likewise.
3012
fc6e2f03
GB
30132014-06-18 Gary Benson <gbenson@redhat.com>
3014
3015 * i386-low.c: Whitespace changes.
3016
f9d1eeed
TT
30172014-06-12 Tom Tromey <tromey@redhat.com>
3018
3019 * utils.c (freeargv): Remove.
3020
0b04e523
TT
30212014-06-12 Tom Tromey <tromey@redhat.com>
3022
3023 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3024 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3025 (parse_debug_format_options): Likewise.
3026 (gdbserver_usage): Likewise.
3027 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3028 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3029 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3030 against libiberty.
3031 ($(LIBGNU)): Depend on libiberty.
3032 (all-lib): Recurse into all subdirs.
3033 (install-only): Invoke "install" target in subdirs.
3034 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3035 targets.
3036 * configure: Rebuild.
3037 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
3038 for vasprintf, vsnprintf, or gettimeofday.
3039 * configure.srv: Don't add safe-ctype.o or lbasename.o to
3040 srv_tgtobj.
3041
270c9937
JB
30422014-06-05 Joel Brobecker <brobecker@adacore.com>
3043
3044 * development.sh: Delete.
3045 * Makefile.in (config.status): Adjust dependency on development.sh.
3046 * configure.ac: Adjust development.sh source call.
3047 * configure: Regenerate.
3048
0a261ed8
PA
30492014-06-02 Pedro Alves <palves@redhat.com>
3050
3051 * ax.c (gdb_free_agent_expr): New function.
3052 * ax.h (gdb_free_agent_expr): New declaration.
3053 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3054 list.
3055 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3056 static.
3057 (clear_breakpoint_conditions_and_commands): New function.
3058 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3059 (clear_breakpoint_conditions_and_commands): New declaration.
3060
e9dae05e
RR
30612014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3062
3063 * linux-aarch64-low.c (asm/ptrace.h): Include.
3064
5876f503
JK
30652014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3066
3067 Fix TLS access for -static -pthread.
3068 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3069 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3070 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3071
802e8e6d
PA
30722014-05-20 Pedro Alves <palves@redhat.com>
3073
3074 * linux-aarch64-low.c (aarch64_insert_point)
3075 (aarch64_remove_point): No longer check whether the type is
3076 supported here. Adjust to new interface.
3077 (the_low_target): Install aarch64_supports_z_point_type as
3078 supports_z_point_type method.
3079 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3080 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3081 instead of a Z packet char. Adjust.
3082 (arm_supports_z_point_type): New function.
3083 (arm_insert_point, arm_remove_point): Adjust to new interface.
3084 (the_low_target): Install arm_supports_z_point_type.
3085 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3086 (cris_insert_point, cris_remove_point): Adjust to new interface.
3087 Don't check whether the type is supported here.
3088 (the_low_target): Install cris_supports_z_point_type.
3089 * linux-low.c (linux_supports_z_point_type): New function.
3090 (linux_insert_point, linux_remove_point): Adjust to new interface.
3091 * linux-low.h (struct linux_target_ops) <insert_point,
3092 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3093 raw_breakpoint pointer parameter.
3094 <supports_z_point_type>: New method.
3095 * linux-mips-low.c (mips_supports_z_point_type): New function.
3096 (mips_insert_point, mips_remove_point): Adjust to new interface.
3097 Use mips_supports_z_point_type.
3098 (the_low_target): Install mips_supports_z_point_type.
3099 * linux-ppc-low.c (the_low_target): Install NULL as
3100 supports_z_point_type method.
3101 * linux-s390-low.c (the_low_target): Install NULL as
3102 supports_z_point_type method.
3103 * linux-sparc-low.c (the_low_target): Install NULL as
3104 supports_z_point_type method.
3105 * linux-x86-low.c (x86_supports_z_point_type): New function.
3106 (x86_insert_point): Adjust to new insert_point interface. Use
3107 insert_memory_breakpoint. Adjust to new
3108 i386_low_insert_watchpoint interface.
3109 (x86_remove_point): Adjust to remove_point interface. Use
3110 remove_memory_breakpoint. Adjust to new
3111 i386_low_remove_watchpoint interface.
3112 (the_low_target): Install x86_supports_z_point_type.
3113 * lynx-low.c (lynx_target_ops): Install NULL as
3114 supports_z_point_type callback.
3115 * nto-low.c (nto_supports_z_point_type): New.
3116 (nto_insert_point, nto_remove_point): Adjust to new interface.
3117 (nto_target_ops): Install nto_supports_z_point_type.
3118 * mem-break.c: Adjust intro comment.
3119 (struct raw_breakpoint) <raw_type, size>: New fields.
3120 <inserted>: Update comment.
3121 <shlib_disabled>: Delete field.
3122 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3123 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3124 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3125 (raw_bkpt_type_to_target_hw_bp_type): New function.
3126 (find_enabled_raw_code_breakpoint_at): New function.
3127 (find_raw_breakpoint_at): New type and size parameters. Use them.
3128 (insert_memory_breakpoint): New function, based off
3129 set_raw_breakpoint_at.
3130 (remove_memory_breakpoint): New function.
3131 (set_raw_breakpoint_at): Reimplement.
3132 (set_breakpoint): New, based on set_breakpoint_at.
3133 (set_breakpoint_at): Reimplement.
3134 (delete_raw_breakpoint): Go through the_target->remove_point
3135 instead of assuming memory breakpoints.
3136 (find_gdb_breakpoint_at): Delete.
3137 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3138 (find_gdb_breakpoint): New function.
3139 (set_gdb_breakpoint_at): Delete.
3140 (z_type_supported): New function.
3141 (set_gdb_breakpoint_1): New function, loosely based off
3142 set_gdb_breakpoint_at.
3143 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3144 (delete_gdb_breakpoint_at): Delete.
3145 (delete_gdb_breakpoint_1): New function, loosely based off
3146 delete_gdb_breakpoint_at.
3147 (delete_gdb_breakpoint): New function.
3148 (clear_gdb_breakpoint_conditions): Rename to ...
3149 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3150 breakpoint.
3151 (add_condition_to_breakpoint): Make static.
3152 (add_breakpoint_condition): Take a struct breakpoint pointer
3153 instead of an address. Adjust.
3154 (gdb_condition_true_at_breakpoint): Rename to ...
3155 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3156 z_type parameter.
3157 (gdb_condition_true_at_breakpoint): Reimplement.
3158 (add_breakpoint_commands): Take a struct breakpoint pointer
3159 instead of an address. Adjust.
3160 (gdb_no_commands_at_breakpoint): Rename to ...
3161 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3162 parameter. Return true if no breakpoint was found. Change debug
3163 output.
3164 (gdb_no_commands_at_breakpoint): Reimplement.
3165 (run_breakpoint_commands): Rename to ...
3166 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3167 and change return type to boolean.
3168 (run_breakpoint_commands): New function.
3169 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3170 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3171 breakpoint. Go through the_target->remove_point instead of
3172 assuming memory breakpoint.
3173 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3174 software and hardware breakpoints.
3175 (reinsert_raw_breakpoint): Go through the_target->insert_point
3176 instead of assuming memory breakpoint.
3177 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3178 software and hardware breakpoints.
3179 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3180 Check both software and hardware breakpoints.
3181 (validate_inserted_breakpoint): Assert the breakpoint is a
3182 software breakpoint. Set the inserted flag to -1 instead of
3183 setting shlib_disabled.
3184 (delete_disabled_breakpoints): Adjust.
3185 (validate_breakpoints): Only validate software breakpoints.
3186 Adjust to inserted flag change.
3187 (check_mem_read, check_mem_write): Skip breakpoint types other
3188 than software breakpoints. Adjust to inserted flag change.
3189 * mem-break.h (enum raw_bkpt_type): New enum.
3190 (raw_breakpoint, struct process_info): Forward declare.
3191 (Z_packet_to_target_hw_bp_type): Delete declaration.
3192 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3193 (set_gdb_breakpoint, delete_gdb_breakpoint)
3194 (clear_breakpoint_conditions): New declarations.
3195 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3196 (breakpoint_inserted_here): Update comment.
3197 (add_breakpoint_condition, add_breakpoint_commands): Replace
3198 address parameter with a breakpoint pointer parameter.
3199 (gdb_breakpoint_here): Update comment.
3200 (delete_gdb_breakpoint_at): Delete.
3201 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3202 * server.c (process_point_options): Take a struct breakpoint
3203 pointer instead of an address. Adjust.
3204 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3205 delete_gdb_breakpoint.
3206 * spu-low.c (spu_target_ops): Install NULL as
3207 supports_z_point_type method.
3208 * target.h: Include mem-break.h.
3209 (struct target_ops) <prepare_to_access_memory>: Update comment.
3210 <supports_z_point_type>: New field.
3211 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3212 instead of a char. Also take a raw breakpoint pointer.
3213 * win32-arm-low.c (the_low_target): Install NULL as
3214 supports_z_point_type.
3215 * win32-i386-low.c (i386_supports_z_point_type): New function.
3216 (i386_insert_point, i386_remove_point): Adjust to new interface.
3217 (the_low_target): Install i386_supports_z_point_type.
3218 * win32-low.c (win32_supports_z_point_type): New function.
3219 (win32_insert_point, win32_remove_point): Adjust to new interface.
3220 (win32_target_ops): Install win32_supports_z_point_type.
3221 * win32-low.h (struct win32_target_ops):
3222 <supports_z_point_type>: New method.
3223 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3224 instead of a char. Also take a raw breakpoint pointer.
3225
932539e3
PA
32262014-05-20 Pedro Alves <palves@redhat.com>
3227
3228 * mem-break.h: Include break-common.h.
3229 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3230 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3231 (Z_packet_to_target_hw_bp_type): New declaration.
3232 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3233 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3234 (Z_PACKET_ACCESS_WP): Delete macros.
3235 (Z_packet_to_hw_type): Delete function.
3236 * i386-low.h: Don't include break-common.h here.
3237 (Z_packet_to_hw_type): Delete declaration.
3238 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3239 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3240 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3241 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3242 * linux-aarch64-low.c: Don't include break-common.h here.
3243 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3244 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3245 (Z_packet_to_target_hw_bp_type): Delete function.
3246 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3247 function.
3248 (mips_insert_point, mips_remove_point): Use
3249 Z_packet_to_target_hw_bp_type.
3250
4ff0d3d8
PA
32512014-05-20 Pedro Alves <palves@redhat.com>
3252
3253 * linux-aarch64-low.c: Include break-common.h.
3254 (enum target_point_type): Delete.
3255 (Z_packet_to_point_type): Rename to ...
3256 (Z_packet_to_target_hw_bp_type): ... this, and return a
3257 target_hw_bp_type instead.
3258 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3259 instead of an enum target_point_type.
3260 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3261 breakpoint type.
3262 (aarch64_dr_state_insert_one_point)
3263 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3264 (aarch64_handle_aligned_watchpoint)
3265 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3266 Take an enum target_hw_bp_type instead of an enum
3267 target_point_type.
3268 (aarch64_supports_z_point_type): New function.
3269 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3270 use Z_packet_to_target_hw_bp_type.
3271
786dc519
JB
32722014-05-20 Joel Brobecker <brobecker@adacore.com>
3273
3274 * configure.ac: Only use -Werror by default when DEVELOPMENT
3275 is true.
3276 * configure: Regenerate.
3277
9e0aa64f
JK
32782014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3279
3280 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3281 * linux-x86-low.c (X86_64_USER_REGS): New.
3282 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3283
2b577b92
YQ
32842014-04-28 Yao Qi <yao@codesourcery.com>
3285
3286 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3287 name.
3288
94611da2
PA
32892014-04-25 Pedro Alves <palves@redhat.com>
3290
3291 PR server/16255
3292 * linux-low.c (linux_attach_fail_reason_string): New function.
3293 (linux_attach_lwp): Delete.
3294 (linux_attach_lwp_1): Rename to ...
3295 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3296 argument. Remove "initial" parameter. Return int instead of
3297 void. Don't error or warn here.
3298 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3299 failure to attach to the tgid. Call warning when failing to
3300 attach to an lwp.
3301 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3302 argument. Remove "initial" parameter. Return int instead of
3303 void. Don't error or warn here.
3304 (linux_attach_fail_reason_string): New declaration.
3305 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3306 interface change. Use linux_attach_fail_reason_string.
3307
01f9f808
MS
33082014-04-24 Michael Sturm <michael.sturm@mintel.com>
3309 Walfred Tedeschi <walfred.tedeschi@intel.com>
3310
3311 * Makefile.in: Added rules to handle new files
3312 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3313 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3314 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3315 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3316 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3317 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3318 x32-avx512-linux.o.
3319 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3320 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3321 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3322 i386/x32-avx512.xml.
3323 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3324 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3325 i386/x32-avx512-linux.xml.
3326 * i387-fp.c (num_avx512_k_registers): New constant for number
3327 of K registers.
3328 (num_avx512_zmmh_low_registers): New constant for number of
3329 lower ZMM registers (0-15).
3330 (num_avx512_zmmh_high_registers): New constant for number of
3331 higher ZMM registers (16-31).
3332 (num_avx512_ymmh_registers): New contant for number of higher
3333 YMM registers (ymm16-31 added by avx521 on x86_64).
3334 (num_avx512_xmm_registers): New constant for number of higher
3335 XMM registers (xmm16-31 added by AVX512 on x86_64).
3336 (struct i387_xsave): Add space for AVX512 registers.
3337 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3338 Add code to handle AVX512 registers.
3339 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3340 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3341 prototypei from generated file.
3342 (tdesc_amd64_avx512_linux): Likewise.
3343 (init_registers_x32_avx512_linux): Likewise.
3344 (tdesc_x32_avx512_linux): Likewise.
3345 (init_registers_i386_avx512_linux): Likewise.
3346 (tdesc_i386_avx512_linux): Likewise.
3347 (x86_64_regmap): Add AVX512 registers.
3348 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3349 mask.
3350 (initialize_low_arch): Add code to initialize AVX512 registers.
3351
51aa91f9
PA
33522014-04-23 Pedro Alves <palves@redhat.com>
3353
3354 * mem-break.c (find_gdb_breakpoint_at): Make static.
3355 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3356
a4165e94
PA
33572014-04-23 Pedro Alves <palves@redhat.com>
3358
3359 * i386-low.c: Don't include break-common.h here.
3360 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3361 prototype to take target_hw_bp_type as argument instead of a Z
3362 packet char.
3363 * i386-low.h: Include break-common.h here.
3364 (Z_packet_to_hw_type): Declare.
3365 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3366 prototypes.
3367 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3368 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3369 (x86_remove_point): Convert the packet number to a
3370 target_hw_bp_type before calling i386_low_remove_watchpoint.
3371 * win32-i386-low.c (i386_insert_point): Convert the packet number
3372 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3373 (i386_remove_point): Convert the packet number to a
3374 target_hw_bp_type before calling i386_low_remove_watchpoint.
3375
b8acf843
PA
33762014-04-23 Pedro Alves <palves@redhat.com>
3377
3378 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3379
d708bcd1
PA
33802014-04-10 Pedro Alves <palves@redhat.com>
3381
3382 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3383 Check if the condition or command is NULL before checking if the
3384 breakpoint is known. On success, return true.
3385 * mem-break.h (add_breakpoint_condition): Document return.
3386 (add_breakpoint_commands): Add describing comment.
3387 * server.c (skip_to_semicolon): New function.
3388 (process_point_options): Use it.
3389
2eec7d5b
PA
33902014-04-09 Pedro Alves <palves@redhat.com>
3391
3392 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3393 to lwpid_of.
3394
fa96cb38
PA
33952014-02-27 Pedro Alves <palves@redhat.com>
3396
3397 PR 12702
3398 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3399 macros.
3400 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3401 output.
3402 (last_thread_of_process_p): Take a PID argument instead of a
3403 thread pointer.
3404 (linux_wait_for_lwp): Delete.
3405 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3406 functions.
3407 (linux_low_filter_event): New function, party factored out from
3408 linux_wait_for_event.
3409 (linux_wait_for_event): Rename to ...
3410 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3411 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3412 sigsuspend. Check for zombie leaders.
3413 (linux_wait_for_event): Reimplement as wrapper around
3414 linux_wait_for_event_filtered.
3415 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3416 a normal or signal exit is seen, it's the whole process exiting.
3417 (wait_for_sigstop): No longer a for_each_inferior callback.
3418 Rewrite on top of linux_wait_for_event_filtered.
3419 (stop_all_lwps): Call wait_for_sigstop directly.
3420 * server.c (resume, handle_target_event): Handle
3421 TARGET_WAITKIND_NO_RESUMED.
3422
d763de10
JB
34232014-02-26 Joel Brobecker <brobecker@adacore.com>
3424
3425 * win32-low.c (psapi_get_dll_name,
3426 * win32_CreateToolhelp32Snapshot): Delete.
3427 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3428 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3429 Delete.
3430 (handle_load_dll): Add function description.
3431 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3432
850a0f76
JB
34332014-02-26 Joel Brobecker <brobecker@adacore.com>
3434
3435 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3436 Add comment.
3437 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3438 base address when calling win32_add_one_solib.
3439 (handle_load_dll): Delete local variable load_addr.
3440 Remove 0x1000 offset applied to DLL base address when calling
3441 win32_add_one_solib.
3442 (handle_unload_dll): Add comment.
3443
f25b3fc3
JB
34442014-02-26 Joel Brobecker <brobecker@adacore.com>
3445
3446 * win32-low.c (win32_add_all_dlls): Renames
3447 win32_ensure_ntdll_loaded. Rewrite function documentation.
3448 Adjust implementation to always load all DLLs.
3449 Add 0x1000 offset to DLL base address when calling
3450 win32_add_one_solib.
3451 (child_initialization_done): New static global.
3452 (do_initial_child_stuff): Set child_initialization_done to
3453 zero during child initialization, and 1 after. Replace call
3454 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3455 Add comment.
3456 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3457 (handle_unload_dll): Add function documentation.
3458 (get_child_debug_event): Ignore load and unload DLL events
3459 during child initialization.
3460
d86d4aaf
DE
34612014-02-20 Doug Evans <dje@google.com>
3462
3bc32da3 3463 Remove global all_lwps.
d86d4aaf
DE
3464 * inferiors.h (ptid_of): Move here from linux-low.h.
3465 (pid_of, lwpid_of): Ditto.
3466 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3467 parameter is a struct thread_info * now.
3468 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3469 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3470 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3471 directly.
3472 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3473 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3474 * linux-arm-low.c (update_registers_callback): Update, "entry"
3475 parameter is a struct thread_info * now.
3476 Fetch lwpid from current_inferior directly.
3477 (arm_insert_point): Pass &all_threads to find_inferior instead of
3478 &all_lwps.
3479 (arm_remove_point): Ditto.
3480 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3481 (arm_prepare_to_resume): Fetch pid from thread.
3482 (arm_read_description): Fetch lwpid from current_inferior directly.
3483 * linux-low.c (all_lwps): Delete.
3484 (delete_lwp): Delete call to remove_inferior.
3485 (handle_extended_wait): Fetch lwpid from thread.
3486 (add_lwp): Don't set lwp->entry.id. Remove call to
3487 add_inferior_to_list.
3488 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3489 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3490 (kill_one_lwp_callback): Ditto.
3491 (linux_kill): Don't dereference NULL pointer.
3492 Fetch ptid,lwpid from thread.
3493 (get_detach_signal): Fetch ptid from thread.
3494 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3495 Simplify call to regcache_invalidate_thread.
3496 (delete_lwp_callback): Update, "entry" parameter is a
3497 struct thread_info * now. Fetch pid from thread.
3498 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3499 (status_pending_p_callback): Update, "entry" parameter is a
3500 struct thread_info * now. Fetch ptid from thread.
3501 (find_lwp_pid): Update, "entry" parameter is a
3502 struct thread_info * now.
3503 (linux_wait_for_lwp): Fetch pid from thread.
3504 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3505 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3506 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3507 (dequeue_one_deferred_signal): Ditto.
3508 (cancel_breakpoint): Fetch ptid from current_inferior.
3509 (linux_wait_for_event): Pass &all_threads to find_inferior,
3510 not &all_lwps. Fetch ptid, lwpid from thread.
3511 (count_events_callback): Update, "entry" parameter is a
3512 struct thread_info * now.
3513 (select_singlestep_lwp_callback): Ditto.
3514 (select_event_lwp_callback): Ditto.
3515 (cancel_breakpoints_callback): Ditto.
3516 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3517 not &all_lwps.
3518 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3519 (unsuspend_one_lwp): Update, "entry" parameter is a
3520 struct thread_info * now.
3521 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3522 not &all_lwps.
3523 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3524 Fetch lwpid from thread, not lwp.
3525 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3526 Pass &all_threads to find_inferior, not &all_lwps.
3527 (send_sigstop): Fetch lwpid from thread, not lwp.
3528 (send_sigstop_callback): Update, "entry" parameter is a
3529 struct thread_info * now.
3530 (suspend_and_send_sigstop_callback): Ditto.
3531 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3532 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3533 struct thread_info * now.
3534 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3535 from thread, lwp.
3536 (lwp_running): Update, "entry" parameter is a
3537 struct thread_info * now.
3538 (stop_all_lwps): Fetch ptid from thread.
3539 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3540 (linux_resume_one_lwp): Fetch lwpid from thread.
3541 (linux_set_resume_request): Update, "entry" parameter is a
3542 struct thread_info * now. Fetch pid, lwpid from thread.
3543 (resume_status_pending_p): Update, "entry" parameter is a
3544 struct thread_info * now.
3545 (need_step_over_p): Ditto. Fetch lwpid from thread.
3546 (start_step_over): Fetch lwpid from thread.
3547 (linux_resume_one_thread): Update, "entry" parameter is a
3548 struct thread_info * now. Fetch lwpid from thread.
3549 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3550 (proceed_one_lwp): Update, "entry" parameter is a
3551 struct thread_info * now. Fetch lwpid from thread.
3552 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3553 struct thread_info * now.
3554 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3555 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3556 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3557 directly.
3558 (regsets_store_inferior_registers): Ditto.
3559 (fetch_register, store_register): Ditto.
3560 (linux_read_memory, linux_write_memory): Ditto.
3561 (linux_request_interrupt): Ditto.
3562 (linux_read_auxv): Ditto.
3563 (linux_xfer_siginfo): Ditto.
3564 (linux_qxfer_spu): Ditto.
3565 (linux_qxfer_libraries_svr4): Ditto.
3566 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3567 moved to inferiors.h.
3568 (get_lwp): Delete.
3569 (get_thread_lwp): Update.
3570 (struct lwp_info): Delete member "entry". Simplify comment for
3571 member "thread".
3572 (all_lwps): Delete.
3573 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3574 current_inferior directly.
3575 (update_watch_registers_callback): Update, "entry" parameter is a
3576 struct thread_info * now. Fetch pid from thread.
3577 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3578 (mips_insert_point): Fetch lwpid from current_inferior.
3579 Pass &all_threads to find_inferior, not &all_lwps.
3580 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3581 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3582 directly.
3583 (mips_stopped_data_address): Ditto.
3584 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3585 directly.
3586 * linux-tile-low.c (tile_arch_setup): Ditto.
3587 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3588 (update_debug_registers_callback): Update, "entry" parameter is a
3589 struct thread_info * now. Fetch pid from thread.
3590 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3591 Pass &all_threads to find_inferior, not &all_lwps.
3592 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3593 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3594 Pass &all_threads to find_inferior, not &all_lwps.
3595 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3596 (i386_dr_low_get_status): Ditto.
3597 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3598 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3599 (x86_linux_read_description): Ditto.
3600 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3601
3b8361aa
DE
36022014-02-20 Doug Evans <dje@google.com>
3603
3604 * inferiors.c (get_first_inferior): Fix buglet.
3605
f7667f0d
DE
36062014-02-19 Doug Evans <dje@google.com>
3607
3608 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3609 * inferiors.c (add_thread): Change result type to struct thread_info *.
3610 All callers updated.
3611 (add_lwp): Call add_thread here instead of in callers.
3612 All callers updated.
3613 * linux-low.h (get_lwp_thread): Rewrite.
3614 (struct lwp_info): New member "thread".
3615
b3312d80
DE
36162014-02-19 Doug Evans <dje@google.com>
3617
3618 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3619 All callers updated.
3620
ecc6f45c
DE
36212014-02-19 Doug Evans <dje@google.com>
3622
3623 * inferiors.c (add_thread): Fix whitespace.
3624
649ebbca
DE
36252014-02-19 Doug Evans <dje@google.com>
3626
3627 * dll.c (clear_dlls): Replace accessing list implemention details
3628 with API function.
3629 * gdbthread.h (get_first_thread): Declare.
3630 * inferiors.c (for_each_inferior_with_data): New function.
3631 (get_first_thread): New function.
3632 (find_thread_ptid): Simplify.
3633 (get_first_inferior): New function.
3634 (clear_list): Delete.
3635 (one_inferior_p): New function.
3636 (clear_inferior_list): New function.
3637 (clear_inferiors): Update.
3638 * inferiors.h (for_each_inferior_with_data): Declare.
3639 (clear_inferior_list): Declare.
3640 (one_inferior_p): Declare.
3641 (get_first_inferior): Declare.
3642 * linux-low.c (linux_wait_for_event): Replace accessing list
3643 implemention details with API function.
3644 * server.c (target_running): Ditto.
3645 (accumulate_file_name_length): New function.
3646 (emit_dll_description): New function.
3647 (handle_qxfer_libraries): Replace accessing list implemention
3648 details with API function.
3649 (handle_qxfer_threads_worker): New function.
3650 (handle_qxfer_threads_proper): Replace accessing list implemention
3651 details with API function.
3652 (handle_query): Ditto.
3653 (visit_actioned_threads_callback_ftype): New typedef.
3654 (visit_actioned_threads_data): New struct.
3655 (visit_actioned_threads): Rewrite to be find_inferior callback.
3656 (resume): Call find_inferior.
3657 (handle_status): Replace accessing list implemention
3658 details with API function.
3659 (process_serial_event): Replace accessing list implemention details
3660 with API function.
3661 * target.c (set_desired_inferior): Replace accessing list implemention
3662 details with API function.
3663 * tracepoint.c (same_process_p): New function.
3664 (gdb_agent_about_to_close): Replace accessing list implemention
3665 details with API function.
3666 * win32-low.c (child_delete_thread): Replace accessing list
3667 implemention details with API function.
3668 (match_dll_by_basename): New function.
3669 (dll_is_loaded_by_basename): New function.
3670 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3671 details call to dll_is_loaded_by_basename.
3672
80894984
DE
36732014-02-19 Doug Evans <dje@google.com>
3674
3675 * dll.h (struct dll_info): Add comment.
3676 * gdbthread.h (struct thread_info): Add comment.
3677 (current_ptid): Simplify.
3678 * inferiors.c (add_process): Update.
3679 (remove_process): Update.
3680 * inferiors.h (struct process_info): Rename member "head" to "entry".
3681 * linux-low.c (delete_lwp): Update.
3682 (add_lwp): Update.
3683 (last_thread_of_process_p): Update.
3684 (kill_one_lwp_callback, linux_kill): Update.
3685 (status_pending_p_callback): Update.
3686 (wait_for_sigstop): Update. Simplify read of ptid.
3687 (start_step_over): Update.
3688 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3689 (get_lwp_thread): Update.
3690 (struct lwp_info): Rename member "head" to "entry".
3691 * regcache.h (inferior_list_entry): Delete.
3692 * server.c (kill_inferior_callback): Update.
3693 (detach_or_kill_inferior_callback): Update.
3694 (print_started_pid): Update.
3695 (print_attached_pid): Update.
3696 (process_serial_event): Simplify read of ptid.
3697 * thread-db.c (thread_db_create_event): Update.
3698 (thread_db_get_tls_address): Update.
3699 * win32-low.c (current_inferior_ptid): Simplify.
3700
46917d26
TT
37012014-02-19 Tom Tromey <tromey@redhat.com>
3702
3703 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3704 argument.
3705 (target_supports_btrace): Update.
3706
0759a81e
YQ
37072014-02-14 Yao Qi <yao@codesourcery.com>
3708
3709 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3710 (rsp-low-ipa.o): New target.
3711
a7191e8b
TT
37122014-02-12 Tom Tromey <tromey@redhat.com>
3713
3714 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3715 convert_ascii_to_int.
3716 * regcache.c (registers_to_string): Likewise.
3717 * remote-utils.c (decode_M_packet): Likewise.
3718 * server.c (process_serial_event): Likewise.
3719
ff0e980e
TT
37202014-02-12 Tom Tromey <tromey@redhat.com>
3721
3722 * server.c (handle_query, handle_v_run): Use hex2bin, not
3723 unhexify.
3724 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3725
e9371aff
TT
37262014-02-12 Tom Tromey <tromey@redhat.com>
3727
3728 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3729 convert_int_to_ascii.
3730 * regcache.c (registers_to_string, collect_register_as_string):
3731 Likewise.
3732 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3733 Likewise.
3734 * server.c (process_serial_event): Likewise.
3735 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3736 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3737
971dc0b8
TT
37382014-02-12 Tom Tromey <tromey@redhat.com>
3739
3740 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3741 bin2hex, not hexify.
3742 * tracepoint.c (cmd_qtstatus): Likewise.
3743
0a822afb
TT
37442014-02-12 Tom Tromey <tromey@redhat.com>
3745
3746 * remote-utils.c (monitor_output): Pass explicit length to
3747 hexify.
3748
9c3d6531
TT
37492014-02-12 Tom Tromey <tromey@redhat.com>
3750
3751 * tracepoint.c: Include rsp-low.h.
3752 * server.c: Include rsp-low.h.
3753 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3754 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3755 declare.
3756 * remote-utils.c: Include rsp-low.h.
3757 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3758 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3759 (convert_int_to_ascii, convert_ascii_to_int): Move to
3760 common/rsp-low.c.
3761 * regcache.c: Include rsp-low.h.
3762 * ax.c: Include rsp-low.h.
3763 * Makefile.in (SFILES): Add common/rsp-low.c.
3764 (OBS): Add rsp-low.o.
3765 (rsp-low.o): New target.
3766
01fd3ea5
TT
37672014-02-12 Tom Tromey <tromey@redhat.com>
3768
3769 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3770 Include print-utils.h.
3771 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3772 (plongest, thirty_two, phex_nz): Remove.
3773 * Makefile.in (SFILES): Add common/print-utils.c.
3774 (OBS): Add print-utils.o.
3775 (print-utils-ipa.o): New target.
3776 (print-utils.o): New target.
3777 (IPA_OBJS): Add print-utils-ipa.o.
3778
e99dc820
TT
37792014-02-06 Tom Tromey <tromey@redhat.com>
3780
3781 * Makefile.in (SFILES): Fix indentation.
3782
ee1e2d4f
DE
37832014-02-05 Doug Evans <dje@google.com>
3784
3785 * linux-low.c (linux_wait_for_event): Improve comment.
3786 (linux_wait_1): Keep current_inferior in sync with event_child.
3787
f5a02773
DE
37882014-01-22 Doug Evans <dje@google.com>
3789
3790 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3791
87ce2a04
DE
37922014-01-22 Doug Evans <dje@google.com>
3793
3794 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3795 * configure: Regenerate.
3796 * config.in: Regenerate.
3797 * Makefile.in (SFILES): Add debug.c.
3798 (OBS): Add debug.o.
3799 * debug.c: New file.
3800 * debug.h: New file.
3801 * linux-aarch64-low.c (*): Update all debugging printfs to use
3802 debug_printf instead of fprintf.
3803 * linux-arm-low.c (*): Ditto.
3804 * linux-cris-low.c (*): Ditto.
3805 * linux-crisv32-low.c (*): Ditto.
3806 * linux-m32r-low.c (*): Ditto.
3807 * linux-sparc-low.c (*): Ditto.
3808 * linux-x86.c (*): Ditto.
3809 * linux-low.c (*): Ditto.
3810 (linux_wait_1): Add calls to debug_enter, debug_exit.
3811 (linux_wait): Remove redundant debugging printf.
3812 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3813 (linux_resume, unstop_all_lwps): Ditto.
3814 * mem-break.c (*): Update all debugging printfs to use
3815 debug_printf instead of fprintf.
3816 * remote-utils.c (*): Ditto.
3817 * thread-db.c (*): Ditto.
3818 * server.c #include <ctype.h>, "gdb_vecs.h".
3819 (debug_threads): Moved to debug.c.
3820 (*): Update all debugging printfs to use debug_printf instead of
3821 fprintf.
3822 (start_inferior): Replace call to fflush with call to debug_flush.
3823 (monitor_show_help): Mention set debug-format.
3824 (parse_debug_format_options): New function.
3825 (handle_monitor_command): Handle "monitor set debug-format".
3826 (gdbserver_usage): Mention --debug-format.
3827 (main): Parse --debug-format.
3828 * server.h (debug_threads): Declaration moved to debug.h.
3829 #include "debug.h".
3830 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3831 trace_debug_1 that uses debug_printf.
3832 (tracepoint_look_up_symbols): Update all debugging printfs to use
3833 debug_printf instead of fprintf.
3834
e671835b
BS
38352014-01-20 Baruch Siach <baruch@tkos.co.il>
3836
3837 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3838 sys/ptrace.h.
3839
b5737fa9
PA
38402014-01-17 Pedro Alves <palves@redhat.com>
3841
ea38d2a9 3842 PR build/16445
c7faa97a
PA
3843 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3844 defined after including gdb_proc_service.h.
b5737fa9 3845
40ed484e
DE
38462014-01-16 Doug Evans <dje@google.com>
3847
3848 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3849 (match_dll): Use it.
3850
969c39fb
MM
38512014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3852
3853 * target.h (target_ops) <read_btrace>: Change parameters and
3854 return type to allow error reporting.
3855 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3856 trace reading errors on.
3857 * linux-low.c (linux_low_read_btrace): Pass trace reading
3858 errors on.
3859 (linux_low_disable_btrace): New.
3860
ab7f45ba
DE
38612014-01-15 Doug Evans <dje@google.com>
3862
3863 * inferiors.c (thread_id_to_gdb_id): Delete.
3864 * inferiors.h (thread_id_to_gdb_id): Delete.
3865
66af0f44
EZ
38662014-01-13 Eli Zaretskii <eliz@gnu.org>
3867
3868 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3869 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3870 versions.
3871
9939e131
PA
38722014-01-08 Pedro Alves <palves@redhat.com>
3873
3874 * server.c (handle_status): Don't discard previous queued stop
3875 replies or thread's pending status here.
3876 (main) <disconnection>: Do it here instead.
3877
b7ea362b
PA
38782014-01-08 Pedro Alves <palves@redhat.com>
3879
3880 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3881 * server.c (visit_actioned_threads, handle_pending_status): New
3882 function.
3883 (handle_v_cont): Factor out parts to ...
3884 (resume): ... this new function. If in all-stop, and a thread
3885 being resumed has a pending status, report it without actually
3886 resuming.
3887 (myresume): Adjust to use the new 'resume' function.
3888 (clear_pending_status_callback, set_pending_status_callback)
3889 (find_status_pending_thread_callback): New functions.
3890 (handle_status): Handle the case of multiple threads having
3891 interesting statuses to report. Report threads' real last signal
3892 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3893 with an interesting thread to report the status for, instead of
3894 always reporting the status of the first thread.
3895
28498c42
JB
38962014-01-01 Joel Brobecker <brobecker@adacore.com>
3897
3898 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3899 * gdbreplay.c (gdbreplay_version): Likewise.
3900
f45c82da
YZ
39012013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3902
3903 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3904 iov.iov_len with the real length in use.
3905
379a5e2d
JB
39062013-12-13 Joel Brobecker <brobecker@adacore.com>
3907
3908 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3909 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3910 for all targets that use win32-low.c.
3911 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3912 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3913
4210d83e
PA
39142013-12-13 Pedro Alves <palves@redhat.com>
3915
3916 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3917 if equal to TARGET_WAITKIND_LOADED.
3918 * win32-low.c (cached_status): New static global.
3919 (win32_wait): Add declaration.
3920 (do_initial_child_stuff): Flush all initial pending debug events
3921 up to the initial breakpoint.
3922 (win32_wait): If CACHED_STATUS was set, return that instead
3923 of doing a real wait. Remove the code resuming the execution
3924 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3925 during the initial phase. Also remove the code changing
3926 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3927 TARGET_WAITKIND_STOPPED.
3928
e7f0d979
YQ
39292013-12-11 Yao Qi <yao@codesourcery.com>
3930
3931 * notif.c (handle_notif_ack): Return 0 if no notification
3932 matches.
3933
ebcf782c
DE
39342013-11-20 Doug Evans <dje@google.com>
3935
3936 * linux-low.c (linux_set_resume_request): Fix comment.
3937
20ad9378
DE
39382013-11-20 Doug Evans <dje@google.com>
3939
3940 * linux-low.c (resume_status_pending_p): Tweak comment.
3941
a196ebeb
WT
39422013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3943
3944 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3945 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3946 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3947 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3948 (srv_amd64_regobj): Add amd64-mpx.o.
3949 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3950 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3951 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3952 * i387-fp.c (num_pl_bnd_register) Added constant.
3953 (num_pl_bnd_cfg_registers) Added constant.
3954 (struct i387_xsave) Added reserved area and MPX fields.
3955 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3956 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3957 function.
3958 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3959 (init_registers_amd64_mpx_linux): Declare new function.
3960 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3961 (x86_64_regmap): Add MPX registers.
3962 (x86_linux_read_description): Add MPX case.
3963 (initialize_low_arch): Initialize MPX targets.
3964
0080a2f6
TT
39652013-11-18 Tom Tromey <tromey@redhat.com>
3966
3967 * configure: Rebuild.
3968 * configure.ac: Don't check for stdlib.h.
3969 * gdbreplay.c: Unconditionally include stdlib.h.
3970
2978b111
TT
39712013-11-18 Tom Tromey <tromey@redhat.com>
3972
3973 * config.in: Rebuild.
3974 * configure: Rebuild.
3975 * configure.ac: Don't use AC_HEADER_DIRENT.
3976
a3d08894
TT
39772013-11-18 Tom Tromey <tromey@redhat.com>
3978
3979 * server.h: Don't check HAVE_STRING_H.
3980 * gdbreplay.c: Don't check HAVE_STRING_H.
3981 * configure: Rebuild.
3982
0a5dd17d
TT
39832013-11-18 Tom Tromey <tromey@redhat.com>
3984
3985 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3986 LIBGNU.
3987
1bd2f0ba
TT
39882013-11-08 Tom Tromey <tromey@redhat.com>
3989
3990 * configure, config.in: Rebuild.
3991 * configure.ac: Remove unused configury.
3992
3266f10b
TT
39932013-11-08 Tom Tromey <tromey@redhat.com>
3994
3995 * acinclude.m4: Include common.m4, codeset.m4.
3996 * configure, config.in: Rebuild.
3997 * configure.ac: Use GDB_AC_COMMON.
3998
6682d959
AA
39992013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
4000
4001 * linux-s390-low.c (HWCAP_S390_TE): New define.
4002 (s390_arch_setup): Consider the TE field in the HWCAP for
4003 determining 'have_regset_tdb'.
4004
fd0a4d76
SDJ
40052013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
4006
4007 PR gdb/16014
4008 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4009 call to sizeof.
4010
1a3d890b
PA
40112013-10-02 Pedro Alves <palves@redhat.com>
4012
4013 * server.c (process_serial_event): Don't output "GDBserver
4014 exiting" if GDB is connected through stdio.
4015 * target.c (mywait): Likewise, be silent if GDB is connected
4016 through stdio.
4017
97ad4581
JB
40182013-10-01 Joel Brobecker <brobecker@adacore.com>
4019
4020 * lynx-low.c (lynx_add_threads_after_attach): New function.
4021 (lynx_attach): Remove call to add_thread. Add call to
4022 lynx_add_threads_after_attach instead.
4023
5b4e221c
MF
40242013-09-28 Mike Frysinger <vapier@gentoo.org>
4025
4026 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4027 * config.in, configure: Regenerated.
4028
ee47b2f8
YQ
40292013-09-18 Yao Qi <yao@codesourcery.com>
4030
4031 PR server/15959
4032 * server.c (start_inferior): Clear 'resume_info'.
4033
d6707650 40342013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 4035
d6707650
JW
4036 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4037 for each register.
4038
9243dd0e 40392013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 4040
9243dd0e
JW
4041 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4042 linux-tile-low.o to srv_tgtobj.
4043
c623a6ef
WN
40442013-09-16 Will Newton <will.newton@linaro.org>
4045
4046 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4047 out regs.
4048
fb71d39e
PA
40492013-09-06 Pedro Alves <palves@redhat.com>
4050
4051 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4052 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4053 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4054 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4055 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4056 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4057
8e7e9910
PA
40582013-09-06 Pedro Alves <palves@redhat.com>
4059
4060 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4061 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4062
7c3a12ca
PA
40632013-09-06 Pedro Alves <palves@redhat.com>
4064
4065 * linux-amd64-ipa.c: Include tracepoint.h.
4066 * linux-i386-ipa.c: Include tracepoint.h.
4067
8eb3d7b6
RW
40682013-09-06 Ricard Wanderlof <ricardw@axis.com>
4069
4070 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4071 (ps_get_thread_area): New function.
4072
eddddb9d
RW
40732013-09-06 Ricard Wanderlof <ricardw@axis.com>
4074
4075 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4076 (initialize_low_arch): Call init_registers_crisv32 rather than
4077 init_register_crisv32.
4078
533b0600
PA
40792013-09-05 Pedro Alves <palves@redhat.com>
4080
4081 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4082 to ...
4083 * hostio.h: ... this new file.
4084 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4085 win32-low.c: Include hostio.h.
4086
0ce3d3b5
PA
40872013-09-05 Pedro Alves <palves@redhat.com>
4088
4089 * server.h (gdb_client_data, handler_func, callback_handler_func)
4090 (delete_file_handler, add_file_handler, append_callback_event)
4091 (delete_callback_event, start_event_loop, initialize_event_loop):
4092 Move to event-loop.h and include it.
4093 * event-loop.h: New file.
4094
799cdc37
PA
40952013-09-05 Pedro Alves <palves@redhat.com>
4096
4097 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4098 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4099 (loaded_dll, unloaded_dll): Move to ...
4100 * dll.h: ... this new file.
4101 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4102
6a6bbd9d
PA
41032013-09-05 Pedro Alves <palves@redhat.com>
4104
4105 * server.h (current_process, get_thread_process, all_processes)
4106 (add_inferior_to_list, for_each_inferior, current_inferior)
4107 (remove_inferior, add_process, remove_process, find_process_pid)
4108 (have_started_inferiors_p, have_attached_inferiors_p)
4109 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4110 (clear_inferiors, find_inferior, find_inferior_id)
4111 (inferior_target_data, set_inferior_target_data)
4112 (inferior_regcache_data, set_inferior_regcache_data): Move to
4113 inferiors.h, and include it.
4114 * inferiors.h: New file.
4115
f699aaba
PA
41162013-09-05 Pedro Alves <palves@redhat.com>
4117
4118 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4119 Move ...
72f4393d 4120 * ax.h: ... here.
f699aaba 4121
c144c7a0
PA
41222013-09-05 Pedro Alves <palves@redhat.com>
4123
4124 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4125 tracepoint.h.
4126 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4127 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4128 (handle_tracepoint_general_set, handle_tracepoint_query)
4129 (tracepoint_finished_step, tracepoint_was_hit)
4130 (release_while_stepping_state_list, current_traceframe)
4131 (in_readonly_region, traceframe_read_mem)
4132 (fetch_traceframe_registers, traceframe_read_sdata)
4133 (traceframe_read_info, struct fast_tpoint_collect_status)
4134 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4135 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4136 (supply_fast_tracepoint_registers)
4137 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4138 (ipa_tdesc, claim_trampoline_space)
4139 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4140 (agent_mem_read, agent_get_trace_state_variable_value)
4141 (agent_set_trace_state_variable_value, agent_tsv_read)
4142 (agent_mem_read_string, get_raw_reg_func_addr)
4143 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4144 * tracepoint.h: ... this new file.
4145
ff42e6ab
PA
41462013-09-05 Pedro Alves <palves@redhat.com>
4147
4148 * server.h (perror_with_name, error, fatal, warning, paddress)
4149 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4150 include it.
4151 * utils.h: New file.
4152
541af0f4
PA
41532013-09-05 Pedro Alves <palves@redhat.com>
4154
4155 * server.h (remote_debug, noack_mode, transport_is_reliable)
4156 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4157 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4158 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4159 (write_enn, initialize_async_io, enable_async_io)
4160 (disable_async_io, check_remote_input_interrupt_request)
4161 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4162 (dead_thread_notify, prepare_resume_reply)
4163 (decode_address_to_semicolon, decode_address, decode_m_packet)
4164 (decode_M_packet, decode_X_packet, decode_xfer_write)
4165 (decode_search_memory_packet, unhexify, hexify)
4166 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4167 (look_up_one_symbol, relocate_instruction)
4168 (monitor_output): Move to remote-utils.h, and include it.
4169 * remote-utils.h: New file.
4170
eebdf26b
PA
41712013-09-05 Pedro Alves <palves@redhat.com>
4172
4173 * server.h (_): Delete.
4174
3aafd2ff
PA
41752013-09-02 Pedro Alves <palves@redhat.com>
4176
4177 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4178 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4179 allocated.
4180 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4181
cee83bcb
PM
41822013-09-02 Pierre Muller <muller@sourceware.org>
4183
4184 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4185 or WriteProcessMemory complete successfully and handle
4186 ERROR_PARTIAL_COPY error.
4187
9a13b2fa
PA
41882013-09-02 Pedro Alves <palves@redhat.com>
4189
4190 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4191 error instead of EIO.
4192
602e3198
JK
41932013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4194
4195 PR server/15604
4196 * linux-low.c: Include filestuff.h.
4197 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4198 * lynx-low.c: Include filestuff.h.
4199 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4200 * server.c: Include filestuff.h.
4201 (main): Call notice_open_fds.
4202 * spu-low.c: Include filestuff.h.
4203 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4204
96d7229d
LM
42052013-08-22 Luis Machado <lgustavo@codesourcery.com>
4206
4207 * Makefile.in: Explain why ../target and ../nat are not
4208 listed as include file search paths.
4209 (linux-waitpid.o): New object file rule.
4210 * configure.srv (srv_native_linux_obj): New variable.
4211 Replace all occurrences of linux native object files with
4212 $srv_native_linux_obj.
4213 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4214 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4215 (linux_enable_event_reporting): Remove declaration.
4216 (my_waitpid): Moved to common/linux-waitpid.c.
4217 (linux_wait_for_event): Pass ptid when calling
4218 linux_enable_event_reporting.
4219 (linux_supports_tracefork_flag): Remove.
4220 (linux_enable_event_reporting): Likewise.
4221 (linux_tracefork_grandchild): Remove.
4222 (STACK_SIZE): Moved to common/linux-ptrace.c.
4223 (linux_tracefork_child): Remove.
4224 (linux_test_for_tracefork): Remove.
4225 (linux_look_up_symbols): Call linux_supports_traceclone.
4226 (initialize_low): Remove call to linux_test_for_tracefork.
4227 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4228 common/linux-ptrace.h.
4229 (PTRACE_TYPE_ARG4): Likewise.
4230 Include linux-ptrace.h.
4231
32940073
PA
42322013-08-21 Pedro Alves <palves@redhat.com>
4233
4234 * config.in: Renegerate.
4235
33b60d58 42362013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 4237
33b60d58
LM
4238 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4239 (SFILES): Remove $(srcdir)/common/target-common.c and
4240 add $(srcdir)/target/waitstatus.c.
4241 (OBS): Remove target-common.o and add waitstatus.o.
4242 (server_h): Remove $(srcdir)/../common/target-common.h and
4243 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4244 and $(srcdir)/../target/waitstatus.h.
4245 (target-common.o): Remove.
4246 (waitstatus.o): New target object file.
4247 * target.h: Do not include target-common.h and
4248 include target/resume.h, target/wait.h and
4249 target/waitstatus.h.
4250
b8e1b30e
LM
42512013-08-13 Luis Machado <lgustavo@codesourcery.com>
4252
4253 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4254 to PTRACE_TYPE_ARG3.
4255 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4256 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4257 PTRACE_TYPE_ARG4.
4258 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4259 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4260
7a60ad40
YQ
42612013-07-27 Jie Zhang <jie@codesourcery.com>
4262 Daniel Jacobowitz <dan@codesourcery.com>
4263 Yao Qi <yao@codesourcery.com>
4264
4265 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4266 (mips-linux-watch.o): New rule.
4267 (mips_linux_watch_h): New variable.
4268 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4269 srv_tgtobj.
4270 * linux-mips-low.c: Include mips-linux-watch.h.
4271 (struct arch_process_info, struct arch_lwp_info): New.
4272 (update_watch_registers_callback): New function.
4273 (mips_linux_new_process, mips_linux_new_thread) New functions.
4274 (mips_linux_prepare_to_resume, mips_insert_point): New
4275 functions.
4276 (mips_remove_point, mips_stopped_by_watchpoint): New
4277 functions.
4278 (rsp_bp_type_to_target_hw_bp_type): New function.
4279 (mips_stopped_data_address): New function.
4280 (the_low_target): Add watchpoint support functions.
4281
de6f69ad
YQ
42822013-07-27 Yao Qi <yao@codesourcery.com>
4283
4284 * i386-low.c: Include break-common.h.
4285 (enum target_hw_bp_type): Remove.
4286
3360c0bf
LM
42872013-07-24 Luis Machado <lgustavo@codesourcery.com>
4288
4289 * Makefile.in (SFILES): /common/target-common.c.
4290 (OBS): Add target-common.o.
4291 (server_h): Add $(srcdir)/../common/target-common.h.
4292 (target-common.o): New target.
4293 * server.c (queue_stop_reply_callback): Free
4294 status string after use.
4295 * target.c (target_waitstatus_to_string): Remove.
4296 * target.h: Include target-common.h.
4297 (resume_kind): Likewise.
4298 (target_waitkind): Likewise.
4299 (target_waitstatus): Likewise.
4300 (TARGET_WNOHANG): Likewise.
4301
bd885420
YQ
43022013-07-04 Yao Qi <yao@codesourcery.com>
4303
4304 * Makefile.in (host_alias): Use @host_noncanonical@.
4305 (target_alias): Use @target_noncanonical@.
4306 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4307 ACX_NONCANONICAL_HOST.
4308 * configure: Regenerated.
4309
4310 Revert:
4311 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4312
4313 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4314 * configure: Rebuild.
4315 * Makefile.in (version_host, version_target): Get from configure.
4316 (version.c): Use $(version_host) and $(version_target).
4317
17ef446e
PA
43182013-07-03 Pedro Alves <palves@redhat.com>
4319
4320 * Makefile.in (config.status): Depend on development.sh.
4321 * acinclude.m4: Include libmcheck.m4.
4322 * configure: Regenerate.
4323
7a9a7487
MG
43242013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4325
4326 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4327 attribute inside the parentheses.
4328 (winapi_DebugSetProcessKillOnExit): Ditto.
4329 (winapi_DebugBreakProcess): Ditto.
4330 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 4331
49b64de6
MG
43322013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4333
4334 * notif.h (notif_event): Add a dummy member to avoid compiler
4335 errors.
4336
d5749ee7
PA
43372013-07-01 Pedro Alves <palves@redhat.com>
4338
4339 * hostio.c (HOSTIO_PATH_MAX): Define.
4340 (require_filename, handle_open, handle_unlink, handle_readlink):
4341 Use it.
4342
d8d2a3ee
PA
43432013-07-01 Pedro Alves <palves@redhat.com>
4344
4345 * server.h: Include "pathmax.h".
4346 * linux-low.c: Don't include sys/param.h.
4347 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4348 MAXPATHLEN.
4349 * win32-low.c: Don't include sys/param.h.
4350 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4351
bc7dea8d
PA
43522013-07-01 Pedro Alves <palves@redhat.com>
4353
4354 * event-loop.c: Don't check HAVE_UNISTD_H before including
4355 <unistd.h>.
4356 * gdbreplay.c: Likewise.
4357 * remote-utils.c: Likewise.
4358 * server.c: Likewise.
4359 * configure.ac: Don't check for unistd.h.
4360 * configure: Regenerate.
4361
d6c2da54
TT
43622013-06-28 Tom Tromey <tromey@redhat.com>
4363
4364 * Makefile.in (version.c): Use version.in, not
4365 common/version.in.
4366
257b6bec
MG
43672013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4368
4369 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4370 * configure: Rebuild.
4371 * Makefile.in (version_host, version_target): Get from configure.
4372 (version.c): Use $(version_host) and $(version_target).
4373
86ebe149
DK
43742013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4375
4376 Fix trace-status to output user name without trailing colon.
4377 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4378
f30aa5af
DK
43792013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4380
4381 Fix trace-status to output proper start-time and stop-time.
4382 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4383 output start time and stop time in hex as gdb expects.
4384
28a93511
YQ
43852013-06-26 Pedro Alves <pedro@codesourcery.com>
4386
4387 * tracepoint.c (build_traceframe_info_xml): Output trace state
4388 variables present in the trace buffer.
4389
01208463
TT
43902013-06-24 Tom Tromey <tromey@redhat.com>
4391
4392 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4393 create-version.sh.
4394 (version.o): Remove.
4395 * gdbreplay.c: Include version.h.
4396 (version, host_name): Don't declare.
4397 * server.h: Include version.h.
4398 (version, host_name): Don't declare.
4399
760256f9
PA
44002013-06-12 Pedro Alves <palves@redhat.com>
4401
4402 * linux-x86-low.c (linux_is_elf64): Delete global.
4403 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4404 with local linux_pid_exe_is_elf_64_file use.
4405
030031ee
PA
44062013-06-11 Pedro Alves <palves@redhat.com>
4407
4408 * linux-low.c (regset_disabled, disable_regset): New functions.
4409 (regsets_fetch_inferior_registers)
4410 (regsets_store_inferior_registers): Use them.
4411 (initialize_regsets_info); Don't allocate the disabled_regsets
4412 array here.
4413 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4414 comment.
4415
5da6eb0a
PA
44162013-06-11 Pedro Alves <palves@redhat.com>
4417
4418 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4419 xmalloc.
4420
7e5aaa09
PA
44212013-06-11 Pedro Alves <palves@redhat.com>
4422
4423 * linux-x86-low.c (initialize_low_arch): Call
4424 init_registers_x32_avx_linux.
4425
d878444c
JK
44262013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4427
4428 Fix compatibility with Android Bionic.
4429 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4430 it is not empty.
4431
3aee8918
PA
44322013-06-07 Pedro Alves <palves@redhat.com>
4433
5f2b57b5 4434 PR server/14823
3aee8918
PA
4435 * Makefile.in (OBS): Add tdesc.o.
4436 (IPA_OBJS): Add tdesc-ipa.o.
4437 (tdesc-ipa.o): New rule.
4438 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4439 interface.
4440 * linux-low.c (new_inferior): Delete.
4441 (disabled_regsets, num_regsets): Delete.
4442 (linux_add_process): Adjust to set the new per-process
4443 new_inferior flag.
4444 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4445 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4446 was a stop. When calling arch_setup, switch the current inferior
4447 to the thread that got an event.
4448 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4449 (regsets_fetch_inferior_registers)
4450 (regsets_store_inferior_registers): New regsets_info parameter.
4451 Adjust to use it.
4452 (linux_register_in_regsets): New regs_info parameter. Adjust to
4453 use it.
4454 (register_addr, fetch_register, store_register): New usrregs_info
4455 parameter. Adjust to use it.
4456 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4457 parameter regs_info. Adjust to use it.
4458 (linux_fetch_registers): Get the current inferior's regs_info, and
4459 adjust to use it.
4460 (linux_store_registers): Ditto.
4461 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4462 (initialize_low): Don't initialize the target_regsets here. Call
4463 initialize_low_arch.
4464 * linux-low.h (target_regsets): Delete declaration.
4465 (struct regsets_info): New.
4466 (struct usrregs_info): New.
4467 (struct regs_info): New.
4468 (struct process_info_private) <new_inferior>: New field.
4469 (struct linux_target_ops): Delete the num_regs, regmap, and
4470 regset_bitmap fields. New field regs_info.
4471 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4472 * i387-fp.c (num_xmm_registers): Delete.
4473 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4474 calls to new interface.
4475 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4476 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4477 Infer the number of xmm registers from the regcache's target
4478 description.
4479 * i387-fp.h (num_xmm_registers): Delete.
4480 * inferiors.c (add_thread): Don't install the thread's regcache
4481 here.
4482 * proc-service.c (gregset_info): Fetch the current inferior's
4483 regs_info. Adjust to use it.
4484 * regcache.c: Include tdesc.h.
4485 (register_bytes, reg_defs, num_registers)
4486 (gdbserver_expedite_regs): Delete.
4487 (get_thread_regcache): If the thread doesn't have a regcache yet,
4488 create one, instead of aborting gdbserver.
4489 (regcache_invalidate_one): Rename to ...
4490 (regcache_invalidate_thread): ... this.
4491 (regcache_invalidate_one): New.
4492 (regcache_invalidate): Only invalidate registers of the current
4493 process.
4494 (init_register_cache): Add target_desc parameter, and use it.
4495 (new_register_cache): Ditto. Assert the target description has a
4496 non zero registers_size.
4497 (regcache_cpy): Add assertions. Adjust.
4498 (realloc_register_cache, set_register_cache): Delete.
4499 (registers_to_string, registers_from_string): Adjust.
4500 (find_register_by_name, find_regno, find_register_by_number)
4501 (register_cache_size): Add target_desc parameter, and use it.
4502 (free_register_cache_thread, free_register_cache_thread_one)
4503 (regcache_release, register_cache_size): New.
4504 (register_size): Add target_desc parameter, and use it.
4505 (register_data, supply_register, supply_register_zeroed)
4506 (supply_regblock, supply_register_by_name, collect_register)
4507 (collect_register_as_string, collect_register_by_name): Adjust.
4508 * regcache.h (struct target_desc): Forward declare.
4509 (struct regcache) <tdesc>: New field.
4510 (init_register_cache, new_register_cache): Add target_desc
4511 parameter.
4512 (regcache_invalidate_thread): Declare.
4513 (regcache_invalidate_one): Delete declaration.
4514 (regcache_release): Declare.
4515 (find_register_by_number, register_cache_size, register_size)
4516 (find_regno): Add target_desc parameter.
4517 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4518 declarations.
4519 * remote-utils.c: Include tdesc.h.
4520 (outreg, prepare_resume_reply): Adjust.
4521 * server.c: Include tdesc.h.
4522 (gdbserver_xmltarget): Delete declaration.
4523 (get_features_xml, process_serial_event): Adjust.
4524 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4525 declare.
4526 (struct process_info) <tdesc>: New field.
4527 (ipa_tdesc): Declare.
4528 * tdesc.c: New file.
4529 * tdesc.h: New file.
4530 * tracepoint.c: Include tdesc.h.
4531 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4532 (get_context_regcache): Adjust to pass ipa_tdesc down.
4533 (do_action_at_tracepoint): Adjust to get the register cache size
4534 from the context regcache's description.
4535 (traceframe_walk_blocks): Adjust to get the register cache size
4536 from the current trace frame's description.
4537 (traceframe_get_pc): Adjust to get current trace frame's
4538 description and pass it down.
4539 (gdb_collect): Adjust to get the register cache size from the
4540 IPA's description.
4541 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4542 (gdbserver_xmltarget): Delete.
4543 (initialize_low_tracepoint): Set the ipa's target description.
4544 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4545 (initialize_low_tracepoint): Set the ipa's target description.
4546 * linux-x86-low.c: Include tdesc.h.
4547 [__x86_64__] (is_64bit_tdesc): New.
4548 (ps_get_thread_area, x86_get_thread_area): Use it.
4549 (i386_cannot_store_register): Rename to ...
4550 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4551 (i386_cannot_fetch_register): Rename to ...
4552 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4553 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4554 to new interface.
4555 (target_regsets): Rename to ...
4556 (x86_regsets): ... this.
4557 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4558 interface.
4559 (x86_siginfo_fixup): Use is_64bit_tdesc.
4560 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4561 (tdesc_x32_avx_linux, tdesc_x32_linux)
4562 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4563 Declare.
4564 (x86_linux_update_xmltarget): Delete.
4565 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4566 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4567 (AMD64_LINUX_USER64_CS): New.
4568 (x86_linux_read_description): New, based on
4569 x86_linux_update_xmltarget.
4570 (same_process_callback): New.
4571 (x86_arch_setup_process_callback): New.
4572 (x86_linux_update_xmltarget): New.
4573 (x86_regsets_info): New.
4574 (amd64_linux_regs_info): New.
4575 (i386_linux_usrregs_info): New.
4576 (i386_linux_regs_info): New.
4577 (x86_linux_regs_info): New.
4578 (x86_arch_setup): Reimplement.
4579 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4580 (x86_emit_ops): Ditto.
4581 (the_low_target): Adjust. Install x86_linux_regs_info,
4582 x86_cannot_fetch_register, and x86_cannot_store_register.
4583 (initialize_low_arch): New.
4584 * linux-ia64-low.c (tdesc_ia64): Declare.
4585 (ia64_fetch_register): Adjust.
4586 (ia64_usrregs_info, regs_info): New globals.
4587 (ia64_regs_info): New function.
4588 (the_low_target): Adjust.
4589 (initialize_low_arch): New function.
4590 * linux-sparc-low.c (tdesc_sparc64): Declare.
4591 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4592 Adjust.
4593 (sparc_arch_setup): New function.
4594 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4595 (the_low_target): Adjust.
4596 (initialize_low_arch): New function.
4597 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4598 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4599 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4600 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4601 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4602 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4603 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4604 (tdesc_powerpc_isa205_vsx64l): Declare.
4605 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4606 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4607 (ppc_set_pc, ppc_get_hwcap): Adjust.
4608 (ppc_usrregs_info): Forward declare.
4609 (!__powerpc64__) ppc_regmap_adjusted: New global.
4610 (ppc_arch_setup): Adjust to the current process'es target
4611 description.
4612 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4613 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4614 (ppc_store_evrregset): Adjust.
4615 (target_regsets): Rename to ...
4616 (ppc_regsets): ... this, and make static.
4617 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4618 (ppc_regs_info): New function.
4619 (the_low_target): Adjust.
4620 (initialize_low_arch): New function.
4621 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4622 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4623 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4624 (tdesc_s390x_linux64v2): Declare.
4625 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4626 (s390_fill_gregset, s390_store_last_break): Adjust.
4627 (target_regsets): Rename to ...
4628 (s390_regsets): ... this, and make static.
4629 (s390_get_pc, s390_set_pc): Adjust.
4630 (s390_get_hwcap): New target_desc parameter, and use it.
4631 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4632 (s390_arch_setup): Adjust to set the current process'es target
4633 description. Don't adjust the regmap.
4634 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4635 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4636 (regs_info_3264): New globals.
4637 (s390_regs_info): New function.
4638 (the_low_target): Adjust.
4639 (initialize_low_arch): New function.
4640 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4641 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4642 [__mips64] (init_registers_mips_linux)
4643 (init_registers_mips_dsp_linux): Delete defines.
4644 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4645 (have_dsp): New global.
4646 (mips_read_description): New, based on mips_arch_setup.
4647 (mips_arch_setup): Reimplement.
4648 (get_usrregs_info): New function.
4649 (mips_cannot_fetch_register, mips_cannot_store_register)
4650 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4651 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4652 (target_regsets): Rename to ...
4653 (mips_regsets): ... this, and make static.
4654 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4655 (dsp_regs_info, regs_info): New globals.
4656 (mips_regs_info): New function.
4657 (the_low_target): Adjust.
4658 (initialize_low_arch): New function.
4659 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4660 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4661 Declare.
4662 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4663 (arm_read_description): New, with bits factored from
4664 arm_arch_setup.
4665 (arm_arch_setup): Reimplement.
4666 (target_regsets): Rename to ...
4667 (arm_regsets): ... this, and make static.
4668 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4669 (arm_regs_info): New function.
4670 (the_low_target): Adjust.
4671 (initialize_low_arch): New function.
4672 * linux-m68k-low.c (tdesc_m68k): Declare.
4673 (target_regsets): Rename to ...
4674 (m68k_regsets): ... this, and make static.
4675 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4676 (m68k_regs_info): New function.
4677 (m68k_arch_setup): New function.
4678 (the_low_target): Adjust.
4679 (initialize_low_arch): New function.
4680 * linux-sh-low.c (tdesc_sharch): Declare.
4681 (target_regsets): Rename to ...
4682 (sh_regsets): ... this, and make static.
4683 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4684 (sh_regs_info, sh_arch_setup): New functions.
4685 (the_low_target): Adjust.
4686 (initialize_low_arch): New function.
4687 * linux-bfin-low.c (tdesc_bfin): Declare.
4688 (bfin_arch_setup): New function.
4689 (bfin_usrregs_info, regs_info): New globals.
4690 (bfin_regs_info): New function.
4691 (the_low_target): Adjust.
4692 (initialize_low_arch): New function.
4693 * linux-cris-low.c (tdesc_cris): Declare.
4694 (cris_arch_setup): New function.
4695 (cris_usrregs_info, regs_info): New globals.
4696 (cris_regs_info): New function.
4697 (the_low_target): Adjust.
4698 (initialize_low_arch): New function.
4699 * linux-cris-low.c (tdesc_crisv32): Declare.
4700 (cris_arch_setup): New function.
4701 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4702 (cris_regs_info): New function.
4703 (the_low_target): Adjust.
4704 (initialize_low_arch): New function.
4705 * linux-m32r-low.c (tdesc_m32r): Declare.
4706 (m32r_arch_setup): New function.
4707 (m32r_usrregs_info, regs_info): New globals.
4708 (m32r_regs_info): Adjust.
4709 (initialize_low_arch): New function.
4710 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4711 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4712 (tic6x_usrregs_info): Forward declare.
4713 (tic6x_read_description): New function, based on ...
4714 (tic6x_arch_setup): ... this. Reimplement.
4715 (target_regsets): Rename to ...
4716 (tic6x_regsets): ... this, and make static.
4717 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4718 (tic6x_regs_info): New function.
4719 (the_low_target): Adjust.
4720 (initialize_low_arch): New function.
4721 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4722 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4723 (target_regsets): Rename to ...
4724 (xtensa_regsets): ... this, and make static.
4725 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4726 globals.
4727 (xtensa_arch_setup, xtensa_regs_info): New functions.
4728 (the_low_target): Adjust.
4729 (initialize_low_arch): New function.
4730 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4731 (nios2_arch_setup): Set the current process'es tdesc.
4732 (target_regsets): Rename to ...
4733 (nios2_regsets): ... this.
4734 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4735 (nios2_regs_info): New function.
4736 (the_low_target): Adjust.
4737 (initialize_low_arch): New function.
a261b8f5
PA
4738 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4739 (aarch64_arch_setup): Set the current process'es tdesc.
4740 (target_regsets): Rename to ...
4741 (aarch64_regsets): ... this.
4742 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4743 (aarch64_regs_info): New function.
4744 (the_low_target): Adjust.
4745 (initialize_low_arch): New function.
3aee8918
PA
4746 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4747 globals.
4748 (target_regsets): Rename to ...
4749 (tile_regsets): ... this.
4750 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4751 (tile_regs_info): New function.
4752 (tile_arch_setup): Set the current process'es tdesc.
4753 (the_low_target): Adjust.
4754 (initialize_low_arch): New function.
4755 * spu-low.c (tdesc_spu): Declare.
4756 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4757 * win32-arm-low.c (tdesc_arm): Declare.
4758 (arm_arch_setup): New function.
4759 (the_low_target): Install arm_arch_setup instead of
4760 init_registers_arm.
4761 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4762 (init_windows_x86): Rename to ...
4763 (i386_arch_setup): ... this. Set `win32_tdesc'.
4764 (the_low_target): Adjust.
4765 * win32-low.c (win32_tdesc): New global.
4766 (child_add_thread): Don't create the thread cache here.
4767 (do_initial_child_stuff): Set the new process'es tdesc.
4768 * win32-low.h (struct target_desc): Forward declare.
4769 (win32_tdesc): Declare.
4770 * lynx-i386-low.c (tdesc_i386): Declare global.
4771 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4772 * lynx-low.c (lynx_tdesc): New global.
4773 (lynx_add_process): Set the new process'es tdesc.
4774 * lynx-low.h (struct target_desc): Forward declare.
4775 (lynx_tdesc): Declare global.
4776 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4777 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4778 * nto-low.c (nto_tdesc): New global.
4779 (do_attach): Set the new process'es tdesc.
4780 * nto-low.h (struct target_desc): Forward declare.
4781 (nto_tdesc): Declare.
4782 * nto-x86-low.c (tdesc_i386): Declare.
4783 (nto_x86_arch_setup): Set `nto_tdesc'.
4784
b1fbec62
GB
47852013-06-04 Gary Benson <gbenson@redhat.com>
4786
4787 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4788 to qSupported response when appropriate.
4789 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4790 with nonzero-length annex.
4791 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4792 arguments supplied in annex.
4793
d1ec4ce7
DE
47942013-05-31 Doug Evans <dje@google.com>
4795
ac44adcb 4796 PR server/15594
d1ec4ce7
DE
4797 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4798 64 bits in 64-cross-32 environment.
4799
9b25f2d3
PA
48002013-05-28 Pedro Alves <palves@redhat.com>
4801
4802 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4803 (aarch64-without-fpu.c): Delete rule.
4804 * configure.srv (aarch64*-*-linux*): Remove references to
4805 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4806 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4807 declaration.
4808
6740dc9c
PA
48092013-05-24 Pedro Alves <palves@redhat.com>
4810
4811 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4812 instead of strchr/decode_address. Error if the range isn't split
4813 with a ','. Don't assume there's be a ':' in the action.
4814
c2d6af84
PA
48152013-05-23 Yao Qi <yao@codesourcery.com>
4816 Pedro Alves <palves@redhat.com>
4817
4818 * linux-low.c (lwp_in_step_range): New function.
4819 (linux_wait_1): If the thread was range stepping and stopped
4820 outside the stepping range, report the stop to GDB. Otherwise,
4821 continue stepping. Add range stepping debug output.
4822 (linux_set_resume_request): Copy the step range from the resume
4823 request to the lwp.
4824 (linux_supports_range_stepping): New.
4825 (linux_target_ops) <supports_range_stepping>: Set to
4826 linux_supports_range_stepping.
4827 * linux-low.h (struct linux_target_ops)
4828 <supports_range_stepping>: New field.
4829 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4830 * linux-x86-low.c (x86_supports_range_stepping): New.
4831 (the_low_target) <supports_range_stepping>: Set to
4832 x86_supports_range_stepping.
4833 * server.c (handle_v_cont): Handle 'r' action.
4834 (handle_v_requests): Append ";r" if the target supports range
4835 stepping.
4836 * target.h (struct thread_resume) <step_range_start,
4837 step_range_end>: New fields.
4838 (struct target_ops) <supports_range_stepping>:
4839 New field.
4840 (target_supports_range_stepping): New macro.
4841
58794e1a
JB
48422013-05-17 Joel Brobecker <brobecker@adacore.com>
4843
4844 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4845 confusion in comment.
4846
d631c5a7
JB
48472013-05-17 Joel Brobecker <brobecker@adacore.com>
4848
4849 * lynx-low.c (struct process_info_private): New type.
4850 (lynx_add_process): New function.
4851 (lynx_create_inferior, lynx_attach): Replace calls to
4852 add_process by calls to lynx_add_process.
4853 (lynx_resume): If PTID is null, then try using
4854 current_process()->private->last_wait_event_ptid.
4855 Add comments.
4856 (lynx_clear_inferiors): Delete. The contents of that function
4857 has been inlined in lynx_mourn;
4858 (lynx_wait_1): Save the ptid in the process's private data.
4859 (lynx_mourn): Free the process' private data. Replace call
4860 to lynx_clear_inferiors by call to clear_inferiors.
4861
96f7a20f
YQ
48622013-05-17 Yao Qi <yao@codesourcery.com>
4863
4864 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4865 the right place.
4866
db0dfaa0
LM
48672013-05-16 Luis Machado <lgustavo@codesourcery.com>
4868
4869 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4870 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4871 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4872 PT_TEXT_END_ADDR guards. Update comments.
4873 (linux_target_op) <read_offsets>: Conditionally define to
4874 linux_read_offsets if the target is UCLIBC and if it defines
4875 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4876
68f5f838
SL
48772013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4878 Andrew Jenner <andrew@codesourcery.com>
4879
4880 * Makefile.in (SFILES): Add linux-nios2-low.c.
4881 (clean): Add action to delete nios2-linux.c.
4882 (nios2-linux.c): New rule.
4883 * configure.srv: Add nios2*-*-linux*.
4884 * linux-nios2-low.c: New.
4885
1ebff1fd
HAQ
48862013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4887
4888 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4889
f6150862
HZ
48902013-04-25 Hui Zhu <hui@codesourcery.com>
4891
4892 PR gdb/15186
f6150862
HZ
4893 * ax.c (ax_printf): Add fflush.
4894
614c279d
TT
48952013-04-22 Tom Tromey <tromey@redhat.com>
4896
4897 * Makefile.in (SFILES): Add filestuff.c.
4898 (OBS): Add filestuff.o.
4899 (filestuff.o): New target.
4900 * config.in, configure: Rebuild.
4901 * configure.ac: Check for fdwalk, pipe2.
4902
7d4e5717
PA
49032013-04-17 Pedro Alves <palves@redhat.com>
4904
4905 * configure.ac (USE_THREAD_DB): Delete variable.
4906 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4907 Don't AC_SUBST USE_THREAD_DB.
4908 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4909 * config.in, configure: Regenerate.
4910
d5c93e41
PA
49112013-04-16 Pedro Alves <palves@redhat.com>
4912
4913 * linux-low.h (struct lwp_info) <thread_known>: Move under
4914 the USE_THREAD_DB #ifdef.
4915
04f5fe89
PA
49162013-04-16 Pedro Alves <palves@redhat.com>
4917
4918 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4919 (linux-low.o): Delete rule.
4920 * linux-low.h: Always include "gdb_thread_db.h" instead of
4921 conditionally including thread_db.h.
4922 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4923 HAVE_THREAD_DB_H.
4924
480b27bf
JK
49252013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4926
4927 * Makefile.in (install-only): Fix make install regression.
4928
43662968
JK
49292013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4930
4931 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4932 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4933 installation.
4934 * gdbserver.1: Remove.
4935
3e74e146
PA
49362013-03-22 Pedro Alves <palves@redhat.com>
4937
4938 * linux-low.c (handle_extended_wait): Don't call
4939 linux_enable_event_reporting.
4940
a8347a2a
TT
49412013-03-15 Tony Theodore <tonyt@logyst.com>
4942
4943 PR build/9098:
4944 * Makefile.in (SHELL): Use @SHELL@.
4945
eeb56fa7
SDJ
49462013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4947
4948 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4949 compiler warning.
4950
4fa7e2ff
JB
49512013-03-13 Joel Brobecker <brobecker@adacore.com>
4952
4953 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4954 Remove extraneous NULL element.
4955
8ddb1965
YQ
49562013-03-13 Yao Qi <yao@codesourcery.com>
4957
4958 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4959 'V' block in trace frame.
4960
9accd112
MM
49612013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4962
4963 * target.h (struct target_ops): Add btrace ops.
4964 (target_supports_btrace): New macro.
4965 (target_enable_btrace): New macro.
4966 (target_disable_btrace): New macro.
4967 (target_read_btrace): New macro.
4968 * gdbthread.h (struct thread_info): Add btrace field.
4969 * server.c: Include btrace-common.h.
4970 (handle_btrace_general_set): New function.
4971 (handle_btrace_enable): New function.
4972 (handle_btrace_disable): New function.
4973 (handle_general_set): Call handle_btrace_general_set.
4974 (handle_qxfer_btrace): New function.
4975 (struct qxfer qxfer_packets[]): Add btrace entry.
4976 * inferiors.c (remove_thread): Disable btrace.
4977 * linux-low: Include linux-btrace.h.
4978 (linux_low_enable_btrace): New function.
4979 (linux_low_read_btrace): New function.
4980 (linux_target_ops): Add btrace ops.
4981 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4982 Add srv_linux_btrace=yes.
4983 (x86_64-*-linux*): Add linux-btrace.o.
4984 Add srv_linux_btrace=yes.
4985 * configure.ac: Define HAVE_LINUX_BTRACE.
4986 * config.in: Regenerated.
4987 * configure: Regenerated.
4988
5cc22e4c
MM
49892013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4990
4991 * server.c (handle_qxfer): Preserve error message if -3 is
4992 returned.
4993 (qxfer): Document the -3 return value.
4994
7c97f91e
MM
49952013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4996
4997 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4998 (linux_btrace_h): New variable.
4999 (linux-btrace.o): New rule.
5000
be9a119c 50012013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
5002 Hafiz Abid Qadeer <abidh@codesourcery.com>
5003
5004 * tracepoint.c (trace_buffer_size): New global.
5005 (DEFAULT_TRACE_BUFFER_SIZE): New define.
5006 (init_trace_buffer): Change to one-argument function. Allocate
5007 trace buffer memory.
5008 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5009 handle QTBuffer:size packet.
5010 (cmd_bigqtbuffer_size): New function.
5011 (initialize_tracepoint): Call init_trace_buffer with
5012 DEFAULT_TRACE_BUFFER_SIZE.
5013 * server.c (handle_query): Add QTBuffer:size in the
5014 supported packets.
5015
e64f7499
YQ
50162013-03-07 Yao Qi <yao@codesourcery.com>
5017
5018 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5019 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5020 of -1.
5021 (cmd_qtsp): Adjust condition. Do post increment.
5022 Set cur_action and cur_step_action back to 0.
5023
f0ae6fc3
PA
50242013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
5025
5026 PR server/15236
5027 * linux-low.c (linux_write_memory): Return early success if LEN is
5028 zero.
5029
b5b0b0af
CV
50302013-03-05 Corinna Vinschen <vinschen@redhat.de>
5031
334ad4a8 5032 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 5033
589bc927
TT
50342013-02-28 Tom Tromey <tromey@redhat.com>
5035
5036 * configure.ac: Invoke AC_SYS_LARGEFILE.
5037 * configure, config.in: Rebuild.
5038
dfe07582
CV
50392013-02-28 Corinna Vinschen <vinschen@redhat.com>
5040
5041 * win32-low.c: Throughout, fix format strings and casts of
5042 printf-like functions to avoid type related warnings on all
5043 platforms.
5044 (get_child_debug_event): Print dwDebugEventCode as hex since
5045 that's how it's usually documented.
5046
736cd585
YQ
50472013-02-28 Yao Qi <yao@codesourcery.com>
5048
5049 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5050 pulongest.
5051
e1f58301
JW
50522013-02-27 Jiong Wang <jiwang@tilera.com>
5053
5054 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5055 (reg-tilegx32.c): New rule.
5056 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5057 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5058 different register info initializer according to elf class.
5059 (init_registers_tilgx32): New function. The tilegx32 register info
5060 initializer.
5061 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5062 (tile_store_gregset): Likewise.
5063
d171ca78
YQ
50642013-02-27 Yao Qi <yao@codesourcery.com>
5065
5066 * server.c (process_point_options): Print debug message when
5067 debug_threads is true.
5068
282bbdf3
YQ
50692013-02-26 Yao Qi <yao@codesourcery.com>
5070
5071 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5072
aca22551
PA
50732013-02-19 Pedro Alves <palves@redhat.com>
5074 Kai Tietz <ktietz@redhat.com>
5075
5076 PR gdb/15161
5077
5078 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5079 instead of strtoul to extract address from packet.
5080 (process_serial_event) <'z'>: Likewise.
5081
4f3cee1c
YQ
50822013-02-18 Yao Qi <yao@codesourcery.com>
5083
5084 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5085
8e1d55a3
PA
50862013-02-14 Pedro Alves <palves@redhat.com>
5087
5088 Plug memory leak.
5089
5090 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5091 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5092
458820da
PA
50932013-02-14 Pedro Alves <palves@redhat.com>
5094
5095 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5096
baea0dae
PA
50972013-02-14 Pedro Alves <palves@redhat.com>
5098
5099 * tracepoint.c (save_string): Delete.
5100 (add_tracepoint_action): Use savestring instead of save_string.
5101
0b1afbb3
PA
51022013-02-12 Pedro Alves <palves@redhat.com>
5103
5104 * linux-xtensa-low.c: Ditto.
5105 * xtensa-xtregs.c: Ditto.
5106
8a4ac37e
PA
51072013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5108
5109 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5110 thread_db.
5111
148de6bb
MS
51122013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5113
5114 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5115 aarch64_num_wp_regs and aarch64_num_bp_regs to
5116 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5117
55fac6e0
MS
51182013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5119
5120 * linux-aarch64-low.c (ps_get_thread_area): Replace
5121 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5122
176eb98c
MS
51232013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5124 Marcus Shawcroft <marcus.shawcroft@arm.com>
5125 Nigel Stephens <nigel.stephens@arm.com>
5126 Yufeng Zhang <yufeng.zhang@arm.com>
5127
5128 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5129 (aarch64.c, aarch64-without-fpu.c): New targets.
5130 * configure.srv (aarch64*-*-linux*): New.
5131 * linux-aarch64-low.c: New file.
5132
56f7af9c
MS
51332013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5134
43aaf8b6 5135 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
5136 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5137 (dequeue_one_deferred_signal, linux_resume_one_thread)
5138 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5139 (linux_tracefork_grandchild, linux_test_for_tracefork)
5140 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5141 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5142 where the argument is 0.
5143
60f662b0
YQ
51442013-01-25 Yao Qi <yao@codesourcery.com>
5145
5146 * event-loop.c: Include "queue.h".
5147 (gdb_event_p): New typedef.
5148 (struct gdb_event) <next_event>: Remove.
5149 (event_queue): Change to QUEUE(gdb_event_p).
5150 (async_queue_event): Remove.
5151 (gdb_event_xfree): New.
5152 (initialize_event_loop): New.
5153 (process_event): Use API from QUEUE.
5154 (wait_for_event): Likewise.
5155 * server.c (main): Call initialize_event_loop.
5156 * server.h (initialize_event_loop): Declare.
5157
5ae4861a
YQ
51582013-01-18 Yao Qi <yao@codesourcery.com>
5159
5160 * ax.h (struct eval_agent_expr_context): New.
5161 (gdb_eval_agent_expr): Update declaration.
5162 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5163 TFRAME. Add new argument CTX.
5164 * server.h (struct eval_agent_expr_context): Declare.
5165 (agent_mem_read, agent_tsv_read): Update declaration.
5166 (agent_mem_read_string): Likewise.
5167 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5168 (add_traceframe_block): Add new argument TPOINT.
5169 Increase TPOINT->traceframe_usage.
5170 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5171 eval_tracepoint_agent_expr.
5172 (condition_true_at_tracepoint): Likewise.
5173 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5174 (agent_mem_read_string, agent_tsv_read): Likewise.
5175
85e00e85
YQ
51762013-01-16 Yao Qi <yao@codesourcery.com>
5177
5178 * linux-low.c (linux_resume_one_lwp): Don't check
5179 'lwp->bp_reinsert != 0'.
5180
4039cf45
JB
51812013-01-07 Joel Brobecker <brobecker@adacore.com>
5182 Pedro Alves <palves@redhat.com>
5183
5184 * lynx-low.c (ptrace_request_to_str): Define a temporary
5185 macro and use it to simplify this function's implementation.
5186
9044dee2
JB
51872013-01-07 Joel Brobecker <brobecker@adacore.com>
5188
5189 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5190 sets errno.
5191
e6352c8f
JB
51922013-01-07 Joel Brobecker <brobecker@adacore.com>
5193
5194 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5195
50681a27
JB
51962013-01-07 Joel Brobecker <brobecker@adacore.com>
5197
5198 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5199
3f6e77ef
JB
52002013-01-07 Joel Brobecker <brobecker@adacore.com>
5201
5202 * lynx-low.c (lynx_resume): Use the resume_info parameter
5203 to determine the ptid for the lynx_ptrace call, unless
5204 it is equal to minus_one_ptid, in which case we use the
5205 ptid of the current_inferior.
5206 (lynx_wait_1): After having received a thread create/exit
5207 event, resume the inferior's execution using the signaling
5208 thread's ptid, rather than the old ptid.
5209
7fda33ae
JB
52102013-01-07 Joel Brobecker <brobecker@adacore.com>
5211
5212 * lynx-low.c (lynx_resume): Delete variable ret.
5213
b9786c74
JB
52142013-01-01 Joel Brobecker <brobecker@adacore.com>
5215
5216 * gdbreplay.c (gdbreplay_version): Update copyright year.
5217 * server.c (gdbserver_version): Likewise.
5218
8b93d60f
JB
52192012-12-17 Joel Brobecker <brobecker@adacore.com>
5220
5221 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5222 new thread.
5223
037335a7
JB
52242012-12-17 Joel Brobecker <brobecker@adacore.com>
5225
5226 * lynx-low.c (ptrace_request_to_str): Add handling for
5227 PTRACE_GETTRACESIG.
5228
52d4cbd8
JB
52292012-12-17 Joel Brobecker <brobecker@adacore.com>
5230
5231 * lynx-low.c (lynx_attach): Delete variable new_process.
5232
ab8f6ca9
JB
52332012-12-17 Joel Brobecker <brobecker@adacore.com>
5234
5235 * lynx-low.c (lynx_create_inferior): Delete variable
5236 new_process.
5237
78cbc024
JB
52382012-12-17 Joel Brobecker <brobecker@adacore.com>
5239
5240 * lynx-low.c (ptrace_request_to_str): Do not handle
5241 PTRACE_GETTHREADLIST if this macro does not exist.
5242
14a00470
YQ
52432012-12-15 Yao Qi <yao@codesourcery.com>
5244
5245 * Makefile.in (OBS): Add notif.o.
5246 * notif.c, notif.h: New.
5247 * server.c: Include "notif.h".
5248 (struct vstop_notif) <next>: Remove.
5249 <base>: New field.
5250 (queue_stop_reply): Update.
5251 (push_event, send_next_stop_reply): Remove.
5252 (discard_queued_stop_replies): Update.
5253 (notif_stop): New variable.
5254 (handle_v_stopped): Remove.
5255 (handle_v_requests): Don't call handle_v_stopped. Call
5256 handle_ack_notif instead.
5257 (queue_stop_reply_callback): Call notif_event_enque instead
5258 of queue_stop_reply.
5259 (handle_status): Don't call send_next_stop_reply, call
5260 notif_write_event instead.
5261 (kill_inferior_callback): Likewise.
5262 (detach_or_kill_inferior_callback): Likewise.
5263 (main): Call initialize_notif.
5264 (process_serial_event): Call QUEUE_is_empty.
5265 (handle_target_event): Call notif_push instead of push event.
5266 * server.h (push_event): Remove declaration.
5267
61c125b9
TT
52682012-12-10 Tom Tromey <tromey@redhat.com>
5269
5270 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5271 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5272 macros.
5273 (.c.o): Rewrite.
5274 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5275 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5276 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5277 (amd64-linux-ipa.o, ax.o): Rewrite.
5278 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5279 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5280 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5281 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5282 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5283 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5284 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5285 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5286 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5287 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5288 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5289 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5290 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5291 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5292 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5293 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5294 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5295 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5296 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5297 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5298 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5299 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5300 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5301 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5302 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5303 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5304 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5305 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5306 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5307 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5308 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5309 (reg-tilegx.o): Remove.
5310 (all_object_files): New macro.
5311 Include .deps files.
5312 * aclocal.m4, configure: Rebuild.
5313 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5314 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5315 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5316
e90e9ad9
TT
53172012-12-05 Tom Tromey <tromey@redhat.com>
5318
5319 PR gdb/14917:
5320 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5321
02d403bf 53222012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
5323
5324 * configure.ac: Check for linux/perf_event.h.
5325 * config.in: Regenerated.
5326 * configure: Regenerated.
5327
0270a750
PA
53282012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5329
5330 * hostio.c (handle_readlink): Decrease buffer size
5331 parameter passed to readlink by one byte.
5332
8c29b58e
YQ
53332012-11-26 Yao Qi <yao@codesourcery.com>
5334
5335 * configure.ac (build_warnings): Append '-Wempty-body'.
5336 * configure: Regenerated.
5337 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5338 body.
5339
8bdce1ff
PM
53402012-11-15 Pierre Muller <muller@sourceware.org>
5341
5342 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5343 * config.in: Regenerate.
5344 * configure: Regenerate.
5345 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5346 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5347 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5348 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5349 header.
5350 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5351 instead of <sys/wait.h> header.
5352 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5353
02d403bf 53542012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
5355
5356 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5357 (various make rules): Remove -DGDBSERVER
5358
fbd5db48
YQ
53592012-11-09 Yao Qi <yao@codesourcery.com>
5360
5361 * spu-low.c (current_ptid): Move it to ..
5362 * gdbthread.h: ... here. New.
5363 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5364 * server.c (myresume, process_serial_event): Likewise.
5365 * thread-db.c (thread_db_find_new_threads): Likewise.
5366 * tracepoint.c (run_inferior_command): Likewise.
5367
b3dc46ff
AB
53682012-10-01 Andrew Burgess <aburgess@broadcom.com>
5369
5370 * server.c (handle_search_memory_1): Include access length in
5371 warning message.
5372
07c04788
HPN
53732012-09-05 Michael Brandt <michael.brandt@axis.com>
5374
5375 * linux-crisv32-low.c: Fix compile errors.
5376
918d227b
YQ
53772012-09-04 Yao Qi <yao@codesourcery.com>
5378
5379 * tracepoint.c (cmd_qtsv): Adjust debug message.
5380 Don't check CUR_TPOINT.
5381
18c1b81a
YQ
53822012-08-28 Yao Qi <yao@codesourcery.com>
5383
5384 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5385 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5386 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5387 Remove declarations of xmalloc, xreallloc, xstrdup and
5388 freeargv.
5389 * Makefile.in (libiberty_h): New.
5390 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5391 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5392
dc82f37b
YQ
53932012-08-23 Yao Qi <yao@codesourcery.com>
5394
5395 * server.h: Remove declaration of 'xsnprintf'.
5396
406b1477
KS
53972012-08-22 Keith Seitz <keiths@redhat.com>
5398
5399 * server.h: Include build-gnulib-gbserver/config.h.
5400 * gdbreplay.c: Likewise.
5401
e6712ff1
DE
54022012-08-08 Doug Evans <dje@google.com>
5403
5404 * Makefile.in (SFILES): Add gdb_vecs.c.
5405 (OBS): Add gdb_vecs.o.
5406 (gdb_vecs_h, host_defs_h): New variables.
5407 (thread-db.o): Add $(gdb_vecs_h) dependency.
5408 (gdb_vecs.o): New rule.
5409 * thread-db.c: #include "gdb_vecs.h".
5410 (thread_db_load_search): Use a vector to iterate over path elements.
5411 Handle text appearing after "$pdir".
5412
5413 * configure.ac: Add check for strstr.
5414 * config.in: Regenerate.
5415 * configure: Regenerate.
5416
7c3270ae
UW
54172012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5418
5419 * hostio.c (handle_pread): If pread fails, fall back to attempting
5420 lseek/read.
5421 (handle_pwrite): Likewise for pwrite.
5422
b62e2b27
UW
54232012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5424
5425 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5426 between unsupported TYPE and unimplementable ADDR/LEN combination.
5427 (arm_insert_point): Act on new return value.
5428
78a99e91
PA
54292012-07-31 Pedro Alves <palves@redhat.com>
5430
5431 * server.c (process_point_options): Only skip tokens if we find
5432 one that is unrecognized. Don't treat 'X' specially while
5433 skipping unrecognized tokens.
5434
fcf303ab
UW
54352012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5436
5437 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5438 to 4-byte-align HW breakpoint addresses for Thumb.
5439
7255706c
YQ
54402012-07-27 Yao Qi <yao@codesourcery.com>
5441
5442 PR remote/14161.
5443
5444 * server.h: Declare gdb_agent_about_to_close.
5445 * target.c (kill_inferior): Include "agent.h".
5446 New. Send command 'kill'.
5447 * target.h (kill_inferior): Removed macro.
5448 * tracepoint.c (gdb_agent_about_to_close): New.
5449 (gdb_agent_helper_thread): Handle command 'close'.
5450 Wait endlessly until the inferior stops.
5451 Install gdb_agent_remove_socket to atexit hook.
5452 (agent_socket_name): New static variable.
5453 (gdb_agent_socket_init): Replace local variable 'name' with
5454 'agent_socket_name'.
5455 (gdb_agent_remove_socket): New.
5456
5a3f286f
YQ
54572012-07-27 Yao Qi <yao@codesourcery.com>
5458
5459 * server.c (process_point_options): Stop at 'X' when parsing.
5460
961bd387
ME
54612012-07-19 Michael Eager <eager@eagercon.com>
5462
a261b8f5 5463 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
5464 to hw_execute.
5465 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5466 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5467 hardware breakpoint.
5468
aa7c7447
JK
54692012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5470
5471 * gdbserver/linux-low.c (initialize_low): Call
5472 linux_ptrace_init_warnings.
5473
7f216e7c
DE
54742012-07-02 Doug Evans <dje@google.com>
5475
5476 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5477 pointer to int.
5478
d3ce09f5
SS
54792012-07-02 Stan Shebs <stan@codesourcery.com>
5480
5481 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5482 (ax.o): Add it to build rule.
5483 (ax-ipa.o): Ditto.
5484 (OBS): Add format.o.
5485 (IPA_OBS): Add format.o.
5486 * server.c (handle_query): Claim support for breakpoint commands.
5487 (process_point_options): Add command case.
5488 (process_serial_event): Leave running if there are printfs in
5489 effect.
5490 * mem-break.h (any_persistent_commands): Declare.
5491 (add_breakpoint_commands): Declare.
5492 (gdb_no_commands_at_breakpoint): Declare.
5493 (run_breakpoint_commands): Declare.
5494 * mem-break.c (struct point_command_list): New struct.
5495 (struct breakpoint): New field command_list.
5496 (any_persistent_commands): New function.
5497 (add_commands_to_breakpoint): New function.
5498 (add_breakpoint_commands): New function.
5499 (gdb_no_commands_at_breakpoint): New function.
5500 (run_breakpoint_commands): New function.
5501 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5502 locally.
5503 * ax.c: Include format.h.
5504 (ax_printf): New function.
5505 (gdb_eval_agent_expr): Add printf opcode.
5506
2f8f6aed
YQ
55072012-06-13 Yao Qi <yao@codesourcery.com>
5508
5509 * server.c (start_inferior): Remove duplicated writes to fields
5510 'last_resume_kind' and 'last_status' of 'current_inferior'.
5511
0c9070b3
YQ
55122012-06-12 Yao Qi <yao@codesourcery.com>
5513 Pedro Alves <palves@redhat.com>
5514
5515 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5516 comment.
5517 * server.c (handle_v_cont): Extend comment.
5518
c52daf70
YQ
55192012-06-11 Yao Qi <yao@codesourcery.com>
5520
5521 * linux-low.c (linux_attach): Add 'static'.
5522
d38bbb0a
YQ
55232012-06-06 Yao Qi <yao@codesourcery.com>
5524
5525 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5526
89dc0afd
JK
55272012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5528
5529 Fix gcc -flto compilation warning.
5530 * server.c (main): Make variable multi_mode and attach volatile.
5531
75f62ce7
TJB
55322012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5533
5534 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5535 if the platform doesn't know about it.
5536
65f479b6
PA
55372012-05-30 Jeff Kenton <jkenton@tilera.com>
5538
5539 * Makefile.in (SFILES): Add linux-tile-low.c.
5540 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5541 * configure.srv: Handle tilegx-*-linux*.
5542 * linux-tile-low.c: New file.
5543
0c5bf5a9
JK
55442012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5545
5546 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5547
a493e3e2
PA
55482012-05-24 Pedro Alves <palves@redhat.com>
5549
5550 PR gdb/7205
5551
43aaf8b6 5552 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 5553
2ea28649
PA
55542012-05-24 Pedro Alves <palves@redhat.com>
5555
5556 PR gdb/7205
5557
5558 Replace target_signal with gdb_signal throughout.
5559
8d409d16
MR
55602012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5561
5562 * linux-low.c (linux_store_registers): Avoid the copying sequence
5563 when no data has been retrieved by ptrace.
5564
23512c01
MGD
55652012-05-22 Will Deacon <will.deacon@arm.com>
5566
5567 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5568 Include asm/ptrace.h.
5569 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5570 already defined.
5571
4934b29e
MR
55722012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5573
5574 * linux-low.c (linux_store_registers): Don't re-retrieve data
5575 with ptrace that has already been obtained from /proc. Always
5576 copy any data retrieved with ptrace to the buffer supplied.
5577
bde24c0a
PA
55782012-05-11 Yao Qi <yao@codesourcery.com>
5579 Pedro Alves <palves@redhat.com>
5580
5581 * linux-low.c (enum stopping_threads_kind): New.
5582 (stopping_threads): Change type to `enum stopping_threads_kind'.
5583 (handle_extended_wait): If stopping and suspending threads, leave
5584 the new_lwp suspended too.
5585 (linux_wait_for_event): Adjust.
5586 (stop_all_lwps): Set `stopping_threads' to
5587 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5588 whether we're suspending threads or just stopping them. Assert no
5589 recursion happens.
5590
623b6bdf
YQ
55912012-04-29 Yao Qi <yao@codesourcery.com>
5592
5593 * server.h: Move some code to ...
5594 * gdbthread.h: ... here. New.
5595 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5596 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5597 (nto-low.o, win32-low.o): Likewise.
5598 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5599 * regcache.c, remote-utils.c, server.c: Likewise.
5600 * target.c, tracepoint.c, win32-low.c: Likewise.
5601
f15f9948
TJB
56022012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5603
5604 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5605 (PTRACE_ARG4_TYPE): Likewise.
5606 (PTRACE_XFER_TYPE): Likewise.
5607 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5608 ptrace to PTRACE_ARG3_TYPE.
5609 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5610 (PTRACE_ARG4_TYPE): Likewise.
5611 (PTRACE_XFER_TYPE): Likewise.
5612 (linux_detach_one_lwp): Cast fourth argument of
5613 ptrace to long then PTRACE_ARG4_TYPE.
5614 (regsets_fetch_inferior_registers): Cast third argument of
5615 ptrace to long then PTRACE_ARG3_TYPE.
5616 (regsets_store_inferior_registers): Likewise.
5617
38ea300a
PA
56182012-04-20 Pedro Alves <palves@redhat.com>
5619
5620 * configure: Regenerate.
5621
c971b7fa
PA
56222012-04-19 Pedro Alves <palves@redhat.com>
5623
43aaf8b6 5624 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 5625 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
5626 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5627 (all, install-only, uninstall, clean-info, all-lib, clean): No
5628 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5629 (maintainer-clean realclean distclean): Use subdir_do.
5630 (subdir_do): New.
5631 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 5632 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
5633 * acinclude.m4: Include acx_configure_dir.m4.
5634 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5635 calls. Call AC_PROG_RANLIB. Configure gnulib using
5636 ACX_CONFIGURE_DIR.
5637 (GNULIB): New.
5638 (GNULIB_STDINT_H): Adjust.
5639 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5640 * gdbreplay.c: Include build-gnulib/config.h.
5641 * server.h: Likewise.
5642 * aclocal.m4: Regenerate.
5643 * config.in: Regenerate.
5644 * configure: Regenerate.
c971b7fa 5645
809277f8
PA
56462012-04-19 Pedro Alves <palves@redhat.com>
5647
5648 * Makefile.in (LIBGNU, INCGNU): Adjust.
5649 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5650 (all, install-only, uninstall, clean-info, all-lib, clean)
5651 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5652 * configure.ac: Adjust AC_OUTPUT output.
5653 * aclocal.m4: Regenerate.
5654 * configure: Regenerate.
5655
fd9bb8b8
PA
56562012-04-19 Pedro Alves <palves@redhat.com>
5657
5658 * Makefile.in (generated_files): New.
5659 (server_h): Remove the explicit dependency on config.h, and depend
5660 on $generated_files.
5661
1c298c66
PA
56622012-04-19 Pedro Alves <palves@redhat.com>
5663
5664 * Makefile.in (INCGNU): Add -Ignulib.
5665
57c4b50b
PA
56662012-04-19 Pedro Alves <palves@redhat.com>
5667
5668 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5669 (INCGNU): ... this, and spell out -I here.
5670 (GNULIB_LIB): Rename to ...
5671 (LIBGNU): ... this.
5672 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5673
1030e047
PA
56742012-04-19 Pedro Alves <palves@redhat.com>
5675
5676 * config.in: Regenerate.
5677
447d4319
PA
56782012-04-19 Pedro Alves <palves@redhat.com>
5679
5680 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5681 * server.h (memmem): Remove declaration.
5682 * config.in: Regenerate.
5683 * configure: Regenerate.
5684
aad9eab9
YQ
56852012-04-19 Yao Qi <yao@codesourcery.com>
5686
5687 * Makefile.in (SFILES): Add common/vec.c.
5688 (OBS): Add vec.o.
5689 (vec.o): New rule.
5690
3e10640f
YQ
56912012-04-19 Yao Qi <yao@codesourcery.com>
5692
5693 * remote-utils.c (prepare_resume_reply): Replace with macro
5694 target_core_of_thread.
5695 * server.c (handle_qxfer_threads_proper): Likewise.
5696 * target.h (traget_core_of_thread): New macro.
5697
71622373
PA
56982012-04-18 Pedro Alves <palves@redhat.com>
5699
5700 * aclocal.m4: Regenerate.
5701 * configure: Regenerate.
5702
80d26939
YQ
57032012-04-16 Yao Qi <yao@codesourcery.com>
5704
5705 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5706 duplicated on address.
5707
42476b70
YQ
57082012-04-16 Yao Qi <yao@codesourcery.com>
5709
5710 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5711 (struct tracepoint_action_ops) <send>: New field.
5712 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5713 (agent_expr_send, x_tracepoint_action_send): New.
5714 (l_tracepoint_action_send): New.
5715 (cmd_qtdp): Download and install tracepoint
5716 according to `use_agent'.
5717 (run_inferior_command): Add one more parameter `len'.
5718 Update callers.
5719 (tracepoint_send_agent): New.
5720 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5721
7bc83639
YQ
57222012-04-16 Yao Qi <yao@codesourcery.com>
5723
5724 * tracepoint.c (download_tracepoints): Moved to ...
5725 (cmd_qtstart): ... here.
5726
5f18041e
YQ
57272012-04-14 Yao Qi <yao@codesourcery.com>
5728
5729 * tracepoint.c: Include inttypes.h.
5730 (struct collect_memory_action): Use sized types.
5731 (struct tracepoint): Likewise.
5732 (cmd_qtdp, stop_tracing): Update print specifiers.
5733 (cmd_qtp, response_tracepoint): Likewise.
5734 (collect_data_at_tracepoint): Likewise.
5735 (collect_data_at_step): Likewise.
5736
55a8c076
YQ
57372012-04-14 Yao Qi <yao@codesourcery.com>
5738
5739 Import gnulib module inttypes.
5740 * aclocal.m4, config.in, configure: Regenerated.
5741
dc750257
YQ
57422012-04-14 Yao Qi <yao@codesourcery.com>
5743
5744 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5745 Makefile and config.status at last.
5746
0ab5faf9
YQ
57472012-04-13 Yao Qi <yao@codesourcery.com>
5748
5749 * tracepoint.c: Include stdint.h unconditionally.
5750
18f5fd81
TJB
57512012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5752
5753 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5754 on BFD_HAVE_SYS_PROCFS_TYPE.
5755 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5756 * configure: Regenerate.
5757 * config.in: Likewise.
5758
4d47af5c
L
57592012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5760
5761 * Makefile.in (clean): Also remove x32.c x32-linux.c
5762 x32-avx.c x32-avx-linux.c.
5763 (x32.o): New target.
5764 (x32.c): Likewise.
5765 (x32-linux.o): Likewise.
5766 (x32-linux.c): Likewise.
5767 (x32-avx.o): Likewise.
5768 (x32-avx.c): Likewise.
5769 (x32-avx-linux.o): Likewise.
5770 (x32-avx-linux.c): Likewise.
5771
5772 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5773 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5774 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5775 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5776 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5777 i386/x32-avx-linux.xml.
5778
5779 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5780 (init_registers_x32_avx_linux): Likwise.
5781 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5782 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5783
ecedbe58
PA
57842012-04-13 Pedro Alves <palves@redhat.com>
5785
5786 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5787 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5788 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5789 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5790 the sub-make.
5791
c92b5177
L
57922012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5793
5794 * linux-x86-low.c (compat_x32_clock_t): New.
5795 (compat_x32_siginfo_t): Likewise.
5796 (compat_x32_siginfo_from_siginfo): Likewise.
5797 (siginfo_from_compat_x32_siginfo): Likewise.
5798 (linux_is_elf64): Likewise.
5799 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5800 and siginfo_from_compat_x32_siginfo for x32.
5801 (x86_arch_setup): Set linux_is_elf64.
5802
214d508e
L
58032012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5804
5805 PR gdb/13969
5806 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5807 e_machine field.
5808 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5809 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5810 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5811 compatible with process.
5812
c9a1864a
YQ
58132012-04-12 Yao Qi <yao@codesourcery.com>
5814
5815 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5816 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5817 (install-only, install-info, clean): Handle sub dir gnulib.
5818 (all-lib, am--refresh): New targets.
5819 (memmem.o): Remove target.
5820 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5821 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5822 (AC_REPLACE_FUNCS): Remove memmem.
5823 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5824 (AC_OUTPUT): Generate Makefile in gnulib/.
5825 * aclocal.m4, config.in, configure: Regenerated.
5826
367ba2c2
MR
58272012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5828
5829 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5830
9d236627
PA
58312012-04-05 Pedro Alves <palves@redhat.com>
5832
5833 -Werror=strict-aliasing
5834
5835 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5836 pointer.
5837
111217b3
PA
58382012-04-04 Pedro Alves <palves@redhat.com>
5839
5840 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5841 (sparc_store_gregset_from_stack, sparc_store_gregset)
5842 (sparc_breakpoint_at): Fix formatting.
5843
8365dcf5
TJB
58442012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5845
5846 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5847 are available.
5848 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5849 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5850 * config.in: Regenerate.
5851 * configure: Likewise.
5852
689cc2ae
PA
58532012-03-29 Pedro Alves <palves@redhat.com>
5854
5855 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5856 Correct ptrace arguments.
5857
c14dfd32
PA
58582012-03-28 Pedro Alves <palves@redhat.com>
5859
5860 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5861 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5862 (IA64_FR1_REGNUM): New defines.
5863 (ia64_fetch_register): New.
5864 (the_low_target): Install it.
5865 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5866 field.
5867 * linux-low.c (linux_fetch_registers): Try the
5868 the_low_target.fetch_register hook first.
5869
5870 * linux-arm-low.c (the_low_target): Adjust.
5871 * linux-bfin-low.c (the_low_target): Adjust.
5872 * linux-cris-low.c (the_low_target): Adjust.
5873 * linux-crisv32-low.c (the_low_target): Adjust.
5874 * linux-m32r-low.c (the_low_target): Adjust.
5875 * linux-m68k-low.c (the_low_target): Adjust.
5876 * linux-mips-low.c (the_low_target): Adjust.
5877 * linux-ppc-low.c (the_low_target): Adjust.
5878 * linux-s390-low.c (the_low_target): Adjust.
5879 * linux-sh-low.c (the_low_target): Adjust.
5880 * linux-sparc-low.c (the_low_target): Adjust.
5881 * linux-tic6x-low.c (the_low_target): Adjust.
5882 * linux-x86-low.c (the_low_target): Adjust.
5883 * linux-xtensa-low.c (the_low_target): Adjust.
5884
63c88e13
PA
58852012-03-26 Pedro Alves <palves@redhat.com>
5886
5887 * server.c (handle_qxfer_libraries): Don't bail early if
5888 the_target->qxfer_libraries_svr4 is not NULL.
5889
fb723180
PA
58902012-03-26 Pedro Alves <palves@redhat.com>
5891
5892 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5893
0afae3cf
PA
58942012-03-23 Pedro Alves <palves@redhat.com>
5895
5896 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5897 "library-list-svr4" element's start tag when the the DSO list is
5898 empty.
5899
485f1ee4
PA
59002012-03-23 Pedro Alves <palves@redhat.com>
5901
5902 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5903 a variable whose type size is the same as the inferior's pointer
5904 size.
5905
a5362b9a
TS
59062012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5907
5908 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5909 struct siginfo.
5910 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5911 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5912 * linux-low.h: Include <signal.h>.
5913 (struct siginfo): Remove forward declaration.
5914 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5915 struct siginfo.
5916
d226c142
MF
59172012-03-21 Mike Frysinger <vapier@gentoo.org>
5918
5919 * .gitignore: Ignore more files.
5920
122f36ef
PA
59212012-03-19 Pedro Alves <palves@redhat.com>
5922 Jan Kratochvil <jan.kratochvil@redhat.com>
5923
5924 * server.c (cont_thread, general_thread): Add describing comments.
5925 (start_inferior): Clear `cont_thread'.
5926 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5927 of a process.
5928
fc3e5175
YQ
59292012-03-15 Yao Qi <yao@codesourcery.com>
5930
5931 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5932 handling to ...
5933 (cmd_qtdp): ... here.
5934
8d0d92cd
YQ
59352012-03-15 Yao Qi <yao@codesourcery.com>
5936
5937 * tracepoint.c (struct tracepoint_action_ops): New.
5938 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5939 (m_tracepoint_action_download): New.
5940 (r_tracepoint_action_download): New.
5941 (x_tracepoint_action_download): New.
5942 (l_tracepoint_action_download): New.
5943 (add_tracepoint_action): Install `action->ops' according type.
5944 (download_tracepoint_1): Move code `download' function pointer
5945 of various tracepoint_action_ops.
5946
87b0bb13
JK
59472012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5948
5949 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5950 linux_ptrace_attach_warnings.
5951
5f572dec
JK
59522012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5953
5954 * Makefile.in (linux-ptrace.o): New.
5955 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5956 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5957 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5958 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5959 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5960 of these targets.
5961 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5962
f4647387
YQ
59632012-03-08 Yao Qi <yao@codesourcery.com>
5964 Pedro Alves <palves@redhat.com>
5965
5966 Fix PR server/13392.
5967 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5968 offset of JMP insn.
5969 * tracepoint.c (remove_tracepoint): New.
5970 (cmd_qtdp): Call remove_tracepoint when failed to install.
5971
9b224c5e
PA
59722012-03-07 Pedro Alves <palves@redhat.com>
5973
5974 * linux-low.c (get_detach_signal): New.
5975 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5976 Pass on pending signals to PTRACE_DETACH. Check the result of the
5977 ptrace call.
5978 * server.c (program_signals, program_signals_p): New.
5979 (handle_general_set): Handle QProgramSignals.
5980 * server.h (program_signals, program_signals_p): Declare.
5981
e237a7e2
JK
59822012-03-05 Pedro Alves <palves@redhat.com>
5983 Jan Kratochvil <jan.kratochvil@redhat.com>
5984
5985 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5986 New comment why.
5987
5808517f
YQ
59882012-03-03 Yao Qi <yao@codesourcery.com>
5989
5990 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5991 agent_look_up_symbols.
5992
58b4daa5
YQ
59932012-03-03 Yao Qi <yao@codesourcery.com>
5994
5995 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5996 (linux-x86-low.o): Likewise.
5997 * server.h: Remove in_process_agent_loaded.
5998 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5999 common/agent.c.
6000 Update callers.
6001
8ffcbaaf
YQ
60022012-03-03 Yao Qi <yao@codesourcery.com>
6003
6004 * tracepoint.c (gdb_agent_capability): New global.
6005 (in_process_agent_loaded_ust): Renamed to
6006 `in_process_agent_supports_ust'.
6007 Update callers.
6008 (in_process_agent_supports_ust): Call agent_capability_check.
6009 (clear_installed_tracepoints): Assert that agent supports
6010 agent.
6011
d1feda86
YQ
60122012-03-03 Yao Qi <yao@codesourcery.com>
6013
6014 * linux-low.c (linux_supports_agent): New.
6015 (linux_target_ops): Initialize field `supports_agent' with
6016 linux_supports_agent.
6017 * target.h (struct target_ops) <supports_agent>: New.
6018 (target_supports_agent): New macro.
6019 * server.c (handle_general_set): Handle packet 'QAgent'.
6020 (handle_query): Send `QAgent+'.
6021 * Makefile.in (server.o): Depends on agent.h.
6022
2fa291ac
YQ
60232012-03-03 Yao Qi <yao@codesourcery.com>
6024
6025 * Makefile.in (OBS): Add agent.o.
6026 Add new rule for agent.o.
6027 Track dependence of tracepoint.c on agent.h.
6028 * tracepoint.c (run_inferior_command_1):
6029 (run_inferior_command): Call agent_run_command.
6030 (gdb_ust_connect_sync_socket): Deleted. Move it to
6031 common/agent.c.
6032 (resume_thread, stop_thread): Likewise.
6033 (gdb_ust_socket_init): Renamed to ...
6034 (gdb_agent_socket_init): ... New.
6035 (gdb_ust_thread): Renamed to ...
6036 (gdb_agent_helper_thread): ... New.
6037 (gdb_ust_init): Move some code to ...
6038 (gdb_agent_init): ... here. New.
6039 [HAVE_UST]: Call gdb_ust_init.
6040 (initialize_tracepoint_ftlib): Call gdb_agent_init.
6041 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6042 * config.in, configure: Regenerated.
6043
05044653
PA
60442012-03-02 Pedro Alves <palves@redhat.com>
6045
6046 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6047 * linux-low.c (struct simple_pid_list): New.
6048 (stopped_pids): New a struct simple_pid_list pointer.
6049 (add_to_pid_list, pull_pid_from_list): New.
6050 (handle_extended_wait): Don't assume the first signal new children
6051 report is SIGSTOP. Adjust call to pull_pid_from_list.
6052 (linux_wait_for_lwp): Adjust.
6053
8d00225b
YQ
60542012-03-02 Yao Qi <yao@codesourcery.com>
6055
6056 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6057 debug log.
6058
19560ba5
YQ
60592012-03-02 Yao Qi <yao@codesourcery.com>
6060
6061 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6062 `stop_pc' and `tpoint'. Update caller.
6063
1faeff08
MR
60642012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6065
6066 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6067 * linux-low.c (use_linux_regsets): New macro.
6068 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6069 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6070 (linux_register_in_regsets): New function.
6071 (usr_fetch_inferior_registers): Skip registers covered by
6072 regsets.
6073 (usr_store_inferior_registers): Likewise.
6074 (usr_fetch_inferior_registers): New macro.
6075 (usr_store_inferior_registers): Likewise.
6076 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6077 (linux_store_registers): Likewise.
6078 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6079 prototype.
6080 (init_registers_mips64_dsp_linux): Likewise.
6081 (init_registers_mips_linux): New macro.
6082 (init_registers_mips_dsp_linux): Likewise.
6083 (mips_dsp_num_regs): Likewise.
6084 (DSP_BASE, DSP_CONTROL): New fallback macros.
6085 (mips_base_regs): New macro.
6086 (mips_regmap): Use it. Fix the size.
6087 (mips_dsp_regmap): New variable.
6088 (mips_dsp_regset_bitmap): Likewise.
6089 (mips_arch_setup): New function.
6090 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6091 than mips_regmap.
6092 (mips_cannot_store_register): Likewise.
6093 (the_low_target): Update .arch_setup, .num_regs and .regmap
6094 initializers. Add .regset_bitmap initializer.
6095 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6096 initializer.
6097 * linux-bfin-low.c (the_low_target): Likewise.
6098 * linux-cris-low.c (the_low_target): Likewise.
6099 * linux-crisv32-low.c (the_low_target): Likewise.
6100 * linux-ia64-low.c (the_low_target): Likewise.
6101 * linux-m32r-low.c (the_low_target): Likewise.
6102 * linux-m68k-low.c (the_low_target): Likewise.
6103 * linux-ppc-low.c (the_low_target): Likewise.
6104 * linux-s390-low.c (the_low_target): Likewise.
6105 * linux-sh-low.c (the_low_target): Likewise.
6106 * linux-sparc-low.c (the_low_target): Likewise.
6107 * linux-tic6x-low.c (the_low_target): Likewise.
6108 * linux-x86-low.c (the_low_target): Likewise.
6109 * linux-xtensa-low.c (the_low_target): Likewise.
6110 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6111 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6112 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6113 srv_xmlfiles.
6114 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6115 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6116
c03e6ccc
YQ
61172012-02-29 Yao Qi <yao@codesourcery.com>
6118 Pedro Alves <palves@redhat.com>
6119
6120 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6121 `step_over_finished' is true.
6122
644cebc9
PA
61232012-02-27 Pedro Alves <palves@redhat.com>
6124
6125 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6126 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6127
c14d7ab2
PA
61282012-02-27 Pedro Alves <palves@redhat.com>
6129
6130 PR server/9684
6131 * linux-low.c (pid_is_stopped): New.
6132 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6133
412c89dd
LM
61342012-02-25 Luis Machado <lgustavo@codesourcery.com>
6135
6136 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6137 of conditions.
6138
b745defe
MR
61392012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6140
6141 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6142
9f3a5c85
LM
61432012-02-24 Luis Machado <lgustavo@codesourcery>
6144
6145 * server.c (handle_query): Advertise support for target-side
6146 breakpoint condition evaluation.
6147 (process_point_options): New function.
6148 (process_serial_event): When inserting a breakpoint, check for
6149 a target-side condition that should be evaluated.
6150
6151 * mem-break.c: Include regcache.h and ax.h.
6152 (point_cond_list_t): New data structure.
6153 (breakpoint) <cond_list>: New field.
6154 (find_gdb_breakpoint_at): Make non-static.
6155 (delete_gdb_breakpoint_at): Clear any target-side
6156 conditions.
6157 (clear_gdb_breakpoint_conditions): New function.
6158 (add_condition_to_breakpoint): Likewise.
6159 (add_breakpoint_condition): Likewise.
6160 (gdb_condition_true_at_breakpoint): Likewise.
6161 (gdb_breakpoint_here): Return result directly instead
6162 of going through a local variable.
6163
6164 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6165 (clear_gdb_breakpoint_conditions): Likewise.
6166 (add_breakpoint_condition): Likewise.
6167 (gdb_condition_true_at_breakpoint): Likewise.
6168
6169 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6170 (need_step_over_p): Take target-side breakpoint condition into
6171 consideration.
6172
5e1dc496
LM
61732012-02-24 Luis Machado <lgustavo@codesourcery>
6174
6175 * server.h: Include tracepoint.h.
6176 (agent_mem_read, agent_get_trace_state_variable_value,
6177 agent_set_trace_state_variable_value,
6178 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6179 get_set_tsv_func_addr): New prototypes.
6180
6181 * ax.h: New include file.
6182 * ax.c: New source file.
6183
6184 * tracepoint.c: Include ax.h.
6185 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6186 agent_expr, eval_result_type): Move to ax.h.
6187 (parse_agent_expr): Rename to ...
6188 (gdb_parse_agent_expr): ... this, make it non-static and move
6189 to ax.h.
6190 (unparse_agent_expr) Rename to ...
6191 (gdb_unparse_agent_expr): ... this, make it non-static and move
6192 to ax.h.
6193 (eval_agent_expr): Rename to ...
6194 (eval_tracepoint_agent_expr): ... this.
6195 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6196 forward declarations.
6197 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6198 (agent_get_trace_state_variable_value): New function.
6199 (agent_set_trace_state_variable_value): New function.
6200 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6201 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6202 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6203 (condition_true_at_tracepoint): Likewise.
6204 (parse_agent_expr): Rename to ...
6205 (gdb_parse_agent_expr): ... this and move to ax.c.
6206 (unparse_agent_expr): Rename to ...
6207 (gdb_unparse_agent_expr): ... this and move to ax.c.
6208 (gdb_agent_op_name): Move to ax.c.
6209 (eval_agent_expr): Rename to ...
6210 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6211 and move to ax.c.
6212 (eval_tracepoint_agent_expr): New function.
6213 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 6214 non-static.
5e1dc496
LM
6215 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6216 ax.c.
6217 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6218 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6219 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6220 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6221 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6222 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6223 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6224 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6225 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6226 (compile_bytecodes): Remove forward declaration.
6227 (is_goto_target): Move to ax.c.
6228 (compile_bytecodes): Move to ax.c and call
6229 agent_get_trace_state_variable_value (...) and
6230 agent_set_trace_state_variable_value (...).
6231
6232 * Makefile.in: Update ax.c and IPA dependencies.
6233
277e4e52
PA
62342012-02-24 Pedro Alves <palves@redhat.com>
6235
6236 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6237 (cmd_bigqtbuffer_circular): ... this. Only handle
6238 'QTBuffer:circular:'.
6239 (handle_tracepoint_general_set): Adjust.
6240
bf4c19f7
YQ
62412012-02-16 Yao Qi <yao@codesourcery.com>
6242
6243 * inferiors.c: Move code to ...
6244 * dll.c: .... here. New.
6245 * server.h: Declare clear_dlls.
6246 * Makefile.in (SFILES): Add dll.c.
6247 (OBS): Add dll.o
6248 (dll.o): New rule.
6249
d73f2619
YQ
62502012-02-11 Yao Qi <yao@codesourcery.com>
6251
6252 * server.c: (handle_monitor_command): Add a new parameter
6253 `own_buf'.
6254 (handle_query): Update caller.
6255
f8255c2a
JB
62562012-02-09 Joel Brobecker <brobecker@adacore.com>
6257
6258 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6259 * configure, config.in: Regenerate.
6260 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6261 is not defined.
6262
da84f473
PA
62632012-02-02 Pedro Alves <palves@redhat.com>
6264
6265 Try SIGKILL first, then PTRACE_KILL.
6266 * linux-low.c (linux_kill_one_lwp): New.
6267 (linux_kill_one_lwp): Rename to ...
6268 (kill_one_lwp_callback): ... this. Use the new
6269 linux_kill_one_lwp.
6270
e886a173
PA
62712012-02-02 Pedro Alves <palves@redhat.com>
6272
6273 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6274 inferior.
6275
be07f1a2
PA
62762012-01-27 Pedro Alves <palves@redhat.com>
6277
6278 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6279 (elf_64_file_p): Make static.
6280 (linux_pid_exe_is_elf_64_file): New.
6281 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6282 Delete declarations.
6283 (linux_pid_exe_is_elf_64_file): Declare.
6284 * linux-x86-low.c (x86_arch_setup): Use
6285 linux_pid_exe_is_elf_64_file.
6286
d8301ad1
JK
62872012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6288
6289 * linux-low.c (linux_wait_for_event_1): Rename to ...
6290 (linux_wait_for_event): ... here and merge it with former
6291 linux_wait_for_event - new variable wait_ptid, use it.
6292 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6293
01b17894
PA
62942012-01-23 Pedro Alves <palves@redhat.com>
6295
6296 * server.c (main): Avoid yet another case of infinite loop while
6297 detaching/killing after a longjmp.
6298
e825046f
JK
62992012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6300
6301 Code cleanup.
6302 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6303
b9e7b9c3
UW
63042012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6305
6306 * hostio.c (handle_readlink): New function.
6307 (handle_vFile): Call it to handle "vFile:readlink" packets.
6308
901f9912
UW
63092012-01-20 Pedro Alves <palves@redhat.com>
6310 Ulrich Weigand <ulrich.weigand@linaro.org>
6311
6312 * server.c (handle_v_requests): Only support vAttach and vRun to
6313 start multiple processes when in extended protocol mode.
6314
fc1ab1a0
PA
63152012-01-17 Pedro Alves <palves@redhat.com>
6316
6317 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6318 memalign plus mprotect to allocate the scratch buffer.
6319
7d5d4e98
PA
63202012-01-13 Pedro Alves <palves@redhat.com>
6321
6322 * server.c (attach_inferior): Clear `cont_thread'.
6323
f128d5e9
PA
63242012-01-13 Pedro Alves <palves@redhat.com>
6325
6326 * server.c (main): Avoid infinite loop while detaching/killing
6327 after a longjmp.
6328
06db92f0
DE
63292012-01-09 Doug Evans <dje@google.com>
6330
6331 * server.c (start_inferior): Set last_ptid in --wrapper case.
6332
32d92999
YQ
63332012-01-06 Yao Qi <yao@codesourcery.com>
6334
6335 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6336 defined.
6337 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6338
5e0a92a9
YQ
63392012-01-04 Yao Qi <yao@codesourcery.com>
6340
6341 * tracepoint.c (cmd_qtdp): Print debug message
6342 for static tracepoint.
6343
ae639e8c
YQ
63442012-01-04 Yao Qi <yao@codesourcery.com>
6345
6346 * tracepoint.c (trace_vdebug): Differentiate debug message
6347 between gdbserver and IPA.
6348
f72429c5
YQ
63492012-01-03 Yao Qi <yao@codesourcery.com>
6350
6351 * tracepoint.c (tracepoint_was_hit): Don't collect for
6352 static tracepoint.
6353
12c3e59c
JB
63542012-01-02 Joel Brobecker <brobecker@adacore.com>
6355
6356 * terminal.h: Reformat copyright header.
6357
67827812
JB
63582012-01-02 Joel Brobecker <brobecker@adacore.com>
6359
6360 * server.c (gdbserver_version): Update copyright year.
6361 * gdbreplay.c (gdbreplay_version): Likewise.
6362
3e52c33d
JK
63632011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6364
6365 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6366
6367 Revert:
6368 2011-12-18 Hui Zhu <teawater@gmail.com>
6369 * linux-low.c (linux_create_inferior): Save return value to ret.
6370
66f1260e
HZ
63712011-12-18 Hui Zhu <teawater@gmail.com>
6372
6373 * linux-low.c (linux_create_inferior): Save return value to ret.
6374
e77616d7
DE
63752011-12-16 Doug Evans <dje@google.com>
6376
e7b06c57
DE
6377 * linux-low.c (linux_create_inferior): If stdio connection,
6378 redirect stdin from /dev/null, stdout to stderr.
6379 * remote-utils.c (remote_is_stdio): New static global.
6380 (remote_connection_is_stdio): New function.
6381 (remote_prepare): Handle stdio connection.
6382 (remote_open): Ditto.
6383 (remote_close): Don't close stdin for stdio connections.
6384 (read_prim,write_prim): New functions. Replace all calls to
6385 read/write to these.
6386 * server.c (main): Watch for "-" argument. Move call to
6387 remote_prepare before start_inferior.
6388 * server.h (STDIO_CONNECTION_NAME): New macro.
6389 (remote_connection_is_stdio): Declare.
6390
e77616d7
DE
6391 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6392 in debugging output.
6393
82067193
YQ
63942011-12-15 Yao Qi <yao@codesourcery.com>
6395
6396 * tracepoint.c: Include sys/syscall.h.
6397 (gdb_ust_thread): Remove preprocessor conditional.
6398
82bfbe7e
PA
63992011-12-14 Pedro Alves <pedro@codesourcery.com>
6400
6401 * linux-low.c (linux_detach_one_lwp): Call
6402 the_low_target.prepare_to_resume before detaching.
6403
712c6575
YQ
64042011-12-14 Yao Qi <yao@codesourcery.com>
6405
6406 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6407 of write.
6408
d54d1edf
YQ
64092011-12-14 Yao Qi <yao@codesourcery.com>
6410
6411 * i386-low.c (i386_low_stopped_data_address): Initialize local
6412 variable `control'.
6413
6210a125
PA
64142011-12-13 Pedro Alves <pedro@codesourcery.com>
6415
6416 PR remote/13492
6417
6418 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6419 DR_CONTROL unless necessary. Extend comments.
6420 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6421 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6422
2ece8244
YQ
64232011-12-13 Yao Qi <yao@codesourcery.com>
6424
6425 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6426 macros.
6427 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6428
784867a5
JK
64292011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6430
6431 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6432 Print new debug message for such case.
6433
6bf36717
JK
64342011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6435
6436 Fix overlapping memcpy.
6437 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6438 the read_inferior_memory transfer.
6439 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6440 write_inferior_memory transfer.
6441 (set_fast_tracepoint_jump): New variable buf. Use it for the
6442 read_inferior_memory and write_inferior_memory transfers.
6443 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6444 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6445 Use it for the write_inferior_memory transfer.
6446 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6447 buffers.
6448
50275556
MR
64492011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6450
6451 * linux-low.c (fetch_register, store_register): Make code
6452 consistent, fix formatting.
6453
7325beb4
MR
64542011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6455
6456 * linux-low.c (usr_store_inferior_registers): Factor out code
6457 to handle individual registers into...
6458 (store_register): ... this new function.
6459
c642a434
UW
64602011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6461
6462 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6463 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6464 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6465 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6466 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6467 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6468 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6469 (srv_xmlfiles): Add new XML files.
6470
6471 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6472 and <sys/uio.h>.
6473 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6474 (init_registers_s390_linux32v1): Add prototype.
6475 (init_registers_s390_linux32v2): Likewise.
6476 (init_registers_s390_linux64v1): Likewise.
6477 (init_registers_s390_linux64v2): Likewise.
6478 (init_registers_s390x_linux64v1): Likewise.
6479 (init_registers_s390x_linux64v2): Likewise.
6480 (s390_num_regs): Increment to 52.
6481 (s390_regmap): Add orig_r2 register.
6482 (s390_num_regs_3264): Increment to 68.
6483 (s390_regmap_3264): Add orig_r2 register.
6484 (s390_collect_ptrace_register): Handle orig_r2 register.
6485 (s390_supply_ptrace_register): Likewise.
6486 (s390_fill_last_break): New function.
6487 (s390_store_last_break): Likewise.
6488 (s390_fill_system_call): New function.
6489 (s390_store_system_call): Likewise.
6490 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6491 register sets.
6492 (s390_check_regset): New function.
6493 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6494 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6495 Update target_regsets for available register sets.
6496
2268b414
JK
64972011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6498 Jan Kratochvil <jan.kratochvil@redhat.com>
6499
6500 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6501 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6502 New.
6503 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6504 * linux-low.h (struct process_info_private): New member r_debug.
6505 * server.c (handle_qxfer_libraries): Call
6506 the_target->qxfer_libraries_svr4.
6507 (handle_qxfer_libraries_svr4): New function.
6508 (qxfer_packets): New entry "libraries-svr4".
6509 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6510 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6511 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6512 PACKET_qXfer_libraries_svr4.
6513
d6db1fab
UW
65142011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6515
6516 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6517 PSW address/mask between 8-byte and 16-byte formats.
6518 (s390_supply_ptrace_register): Likewise.
6519 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6520 basic addressing mode bit.
6521
242f5f1c
SS
65222011-11-24 Stan Shebs <stan@codesourcery.com>
6523
6524 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6525
f196051f
SS
65262011-11-17 Stan Shebs <stan@codesourcery.com>
6527
6528 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6529 (tracing_start_time): New global.
6530 (tracing_stop_time): New global.
6531 (tracing_user_name): New global.
6532 (tracing_notes): New global.
6533 (tracing_stop_note): New global.
6534 (cmd_qtstart): Set traceframe_usage, start_time.
6535 (stop_tracing): Set stop_time.
6536 (cmd_qtstatus): Report additional status.
6537 (cmd_qtp): New function.
6538 (handle_tracepoint_query): Call it.
6539 (cmd_qtnotes): New function.
6540 (handle_tracepoint_general_set): Call it.
6541 (get_timestamp): Rename from tsv_get_timestamp.
6542
405f8e94
SS
65432011-11-14 Stan Shebs <stan@codesourcery.com>
6544 Kwok Cheung Yeung <kcy@codesourcery.com>
6545
6546 * linux-x86-low.c (small_jump_insn): New.
6547 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6548 trampoline and error message, build a trampoline and issue a small
6549 jump instruction to it.
6550 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6551 trampoline and error message.
6552 (x86_get_min_fast_tracepoint_insn_len): New.
6553 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6554 * linux-low.h (struct linux_target_ops): Add arguments to
6555 install_fast_tracepoint_jump_pad operation, add new operation.
6556 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6557 arguments.
6558 (linux_get_min_fast_tracepoint_insn_len): New function.
6559 (linux_target_op): Add new operation.
6560 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6561 (gdb_trampoline_buffer_end): Ditto.
6562 (gdb_trampoline_buffer_error): Ditto.
6563 (struct ipa_sym_addresses): Add fields for new IPA variables.
6564 (symbol_list): Add entries for new IPA variables.
6565 (struct tracepoint): Add fields to hold the address range of the
6566 trampoline used by the tracepoint.
6567 (trampoline_buffer_head): New static variable.
6568 (trampoline_buffer_tail): Ditto.
6569 (claim_trampoline_space): New function.
6570 (have_fast_tracepoint_trampoline_buffer): New function.
6571 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6572 structure.
6573 (install_fast_tracepoint): Ditto, also add error buffer argument.
6574 (cmd_qtminftpilen): New function.
6575 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6576 (fast_tracepoint_from_trampoline_address): New function.
6577 (fast_tracepoint_collecting): Handle trampoline as part of jump
6578 pad space.
6579 (set_trampoline_buffer_space): New function.
6580 (initialize_tracepoint): Initialize new IPA variables.
6581 * target.h (struct target_ops): Add arguments to
6582 install_fast_tracepoint_jump_pad operation, add new
6583 get_min_fast_tracepoint_insn_len operation.
6584 (target_get_min_fast_tracepoint_insn_len): New.
6585 (install_fast_tracepoint_jump_pad): Add arguments.
6586 * server.h (IPA_BUFSIZ): Define.
6587 * linux-i386-ipa.c: Include extra header files.
6588 (initialize_fast_tracepoint_trampoline_buffer): New function.
6589 (initialize_low_tracepoint): Call it.
6590 * server.h (set_trampoline_buffer_space): Declare.
6591 (claim_trampoline_space): Ditto.
6592 (have_fast_tracepoint_trampoline_buffer): Ditto.
6593
1e4d1764
YQ
65942011-11-14 Yao Qi <yao@codesourcery.com>
6595
6596 * server.c (handle_query): Handle InstallInTrace for qSupported.
6597 * tracepoint.c (add_tracepoint): Sort list.
6598 (install_tracepoint, download_tracepoint): New.
6599 (cmd_qtdp): Call them to install and download tracepoints.
6600 (sort_tracepoints): Removed.
6601 (cmd_qtstart): Update.
6602
5c73ff4e
YQ
66032011-11-14 Yao Qi <yao@codesourcery.com>
6604
6605 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6606 * mem-break.h: Declare.
6607 * tracepoint.c (cmd_qtstart): Move some code to ...
6608 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6609 New.
6610 (download_tracepoints): Move some code to ...
6611 (download_tracepoint_1): ... here. New.
6612
86a30030
YQ
66132011-11-08 Yao Qi <yao@codesourcery.com>
6614
6615 * remote-utils.c (relocate_instruction): A comment fix.
6616
8d26e50c
JB
66172011-11-07 Joel Brobecker <brobecker@adacore.com>
6618
6619 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6620 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6621 dr_status_mirror and dr_control_mirror from debug_reg_state.
6622 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6623 (i386_initial_stuff): Remove use of deleted globals.
6624 (i386_get_thread_context, i386_set_thread_context,
6625 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6626 from debug_reg_state.
6627
a59306a3
YQ
66282011-11-05 Yao Qi <yao@codesourcery.com>
6629
6630 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6631 address as TPOINT's.
6632
3065dfb6
SS
66332011-11-02 Stan Shebs <stan@codesourcery.com>
6634
6635 * tracepoint.c (agent_mem_read_string): New function.
6636 (eval_agent_expr): Call it for tracenz.
6637 * server.c (handle_query): Report support for tracenz.
6638
fd0d8c7c
YQ
66392011-11-02 Yao Qi <yao@codesourcery.com>
6640
6641 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6642
609086b1
YQ
66432011-11-02 Yao Qi <yao@codesourcery.com>
6644
6645 * target.h: Fix a typo in comment.
6646
b9fd1791
PA
66472011-10-31 Pedro Alves <pedro@codesourcery.com>
6648
6649 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6650 clobber the breakpoints' shadows with fast tracepoint jumps.
6651 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6652 * target.c (write_inferior_memory): Also pass MYADDR down to
6653 check_mem_write.
6654
03583c20
UW
66552011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6656
6657 * configure.ac: Check support for personality routine.
6658 * configure: Regenerate.
6659 * config.in: Likewise.
6660 * linux-low.c: Include <sys/personality.h>.
6661 Define ADDR_NO_RANDOMIZE if necessary.
6662 (linux_create_inferior): Disable address space randomization when
6663 forking inferior, if requested.
6664 (linux_supports_disable_randomization): New function.
6665 (linux_target_ops): Install it.
6666 * server.h (disable_randomization): Declare.
6667 * server.c (disable_randomization): New global variable.
6668 (handle_general_set): Handle QDisableRandomization.
6669 (handle_query): Likewise for qSupported.
6670 (main): Support --disable-randomization and --no-disable-randomization
6671 command line arguments.
6672 * target.h (struct target_ops): Add supports_disable_randomization.
6673 (target_supports_disable_randomization): New macro.
6674
723b724b
MF
66752011-09-29 Mike Frysinger <vapier@gentoo.org>
6676
6677 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6678 ifdef check.
6679 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6680 [!PT_GETDSBT] (target_loadmap): New definition.
6681 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6682 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6683 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6684 and PT_GETDSBT to LINUX_LOADMAP.
6685 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6686 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6687
55329a5c 66882011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
6689
6690 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6691 (arm_linux_hwbp_cap): New static variable.
6692 (arm_linux_get_hwbp_cap): Replace by ...
6693 (arm_linux_init_hwbp_cap): ... this new function.
6694 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6695 (arm_linux_get_hw_watchpoint_count): Likewise.
6696 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6697 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6698 (arm_prepare_to_resume): Use perror_with_name instead of error.
6699
55329a5c 67002011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
6701
6702 * linux-arm-low.c: Include <signal.h>.
6703 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6704 (struct arm_linux_hwbp_cap): New data type.
6705 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6706 (struct arm_linux_hw_breakpoint): New data type.
6707 (MAX_BPTS, MAX_WPTS): Define.
6708 (struct arch_process_info, struct arch_lwp_info): New data types.
6709 (arm_linux_get_hwbp_cap): New function.
6710 (arm_linux_get_hw_breakpoint_count): Likewise.
6711 (arm_linux_get_hw_watchpoint_count): Likewise.
6712 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6713 (arm_hwbp_control_initialize): Likewise.
6714 (arm_hwbp_control_is_enabled): Likewise.
6715 (arm_hwbp_control_is_initialized): Likewise.
6716 (arm_hwbp_control_disable): Likewise.
6717 (arm_linux_hw_breakpoint_equal): Likewise.
6718 (arm_linux_hw_point_initialize): Likewise.
6719 (struct update_registers_data): New data structure.
6720 (update_registers_callback: New function.
6721 (arm_insert_point): Likewise.
6722 (arm_remove_point): Likewise.
6723 (arm_stopped_by_watchpoint): Likewise.
6724 (arm_stopped_data_address): Likewise.
6725 (arm_new_process): Likewise.
6726 (arm_new_thread): Likewise.
6727 (arm_prepare_to_resume): Likewise.
6728 (the_low_target): Register arm_insert_point, arm_remove_point,
6729 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6730 arm_new_thread, and arm_prepare_to_resume.
6731
6b9801d4
SS
67322011-09-15 Stan Shebs <stan@codesourcery.com>
6733
6734 * server.h (struct emit_ops): Add compare-goto fields.
6735 * tracepoint.c (gdb_agent_op_sizes): New table.
6736 (emit_eq_goto): New function.
6737 (emit_ne_goto): New function.
6738 (emit_lt_goto): New function.
6739 (emit_le_goto): New function.
6740 (emit_gt_goto): New function.
6741 (emit_ge_goto): New function.
6742 (is_goto_target): New function.
6743 (compile_bytecodes): Recognize special cases of compare-goto
6744 combinations and call specialized emitters for them.
6745 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6746 (amd64_emit_ne_goto): New function.
6747 (amd64_emit_lt_goto): New function.
6748 (amd64_emit_le_goto): New function.
6749 (amd64_emit_gt_goto): New function.
6750 (amd64_emit_ge_goto): New function.
6751 (amd64_emit_ops): Add the new functions.
6752 (i386_emit_eq_goto): New function.
6753 (i386_emit_ne_goto): New function.
6754 (i386_emit_lt_goto): New function.
6755 (i386_emit_le_goto): New function.
6756 (i386_emit_gt_goto): New function.
6757 (i386_emit_ge_goto): New function.
6758 (i386_emit_ops): Add the new functions.
6759
bf15cbda
SS
67602011-09-08 Stan Shebs <stan@codesourcery.com>
6761
6762 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6763 (i386_emit_epilogue): Restore %ebx.
6764
943ca1dd
JZ
67652011-08-31 Jie Zhang <jzhang918@gmail.com>
6766
6767 * server.c (step_thread): Remove definition.
6768 (process_serial_event): Don't handle Hs.
6769 * server.h (step_thread): Remove declaration.
6770 * target.c (set_desired_inferior): Remove use of step_thread.
6771
e3deef73
LM
67722011-08-24 Luis Machado <lgustavo@codesourcery.com>
6773
6774 * linux-low.c: Include linux-procfs.h.
6775 (linux_attach_lwp_1): Update comments.
6776 (linux_attach): Scan for existing threads when attaching to a
6777 process that is the tgid.
6778 * Makefile.in: Update dependencies.
6779
13da1c97
LM
67802011-08-24 Luis Machado <lgustavo@codesourcery.com>
6781
6782 * configure.srv: Add linux-procfs.o dependencies.
6783
881127c9
YQ
67842011-08-14 Yao Qi <yao@codesourcery.com>
6785
6786 * target.h (struct target_ops): Fix indent.
6787 * win32-low.c (win32_target_ops): Fix comment.
6788
58dbd541
YQ
67892011-08-14 Andrew Jenner <andrew@codesourcery.com>
6790 Yao Qi <yao@codesourcery.com>
6791
6792 * Makefile.in (clean): Remove tic6x-*.c files.
6793 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6794 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6795 (tic6x-c64xp-linux.c): Likewise.
6796 * configure.srv: Add support for tic6x-*-uclinux.
6797 * linux-tic6x-low.c: New.
6798 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6799
78d85199
YQ
68002011-08-14 Andrew Stubbs <ams@codesourcery.com>
6801 Yao Qi <yao@codesourcery.com>
6802
6803 * target.h (struct target_ops): Add read_loadmap.
6804 * linux-low.c (struct target_loadseg): New type.
6805 (struct target_loadmap): New type.
6806 (linux_read_loadmap): New function.
6807 (linux_target_ops): Add linux_read_loadmap.
6808 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
6809 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6810 to NULL.
78d85199 6811
a959a88d
EZ
68122011-08-05 Eli Zaretskii <eliz@gnu.org>
6813
6814 * win32-low.c: Include <stdint.h>.
6815
1ced966e
PA
68162011-07-22 Pedro Alves <pedro@codesourcery.com>
6817
6818 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6819 to the inferior here.
6820 (i386_remove_aligned_watchpoint): Ditto.
6821 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6822 fit part of the watchpoint in the debug registers.
6823 (i386_update_inferior_debug_regs): New.
6824 (i386_low_insert_watchpoint): Work on a local mirror of the debug
6825 registers, and only update the inferior on success.
6826 (i386_low_remove_watchpoint): Ditto.
6827
d26e3629
KY
68282011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6829
6830 * linux-low.c (compare_ints, unique, list_threads, show_process,
6831 linux_core_of_thread): Delete.
6832 (linux_target_ops): Change linux_core_of_thread to
6833 linux_common_core_of_thread.
6834 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6835 * utils.c (malloc_failure): Change type of argument.
6836 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6837 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6838 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6839 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6840 (IPA_OBJS): Add common-utils-ipa.o.
6841 (ptid_h, linux_osdata_h): New macros.
6842 (server_h): Add common/common-utils.h, common/xml-utils.h,
6843 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6844 common/ptid.h.
6845 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6846 ptid.o, buffer.o): New rules.
6847 (linux-low.o): Add common/linux-osdata.h as a dependency.
6848 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6849 * configure.ac: Add AC_HEADER_DIRENT check.
6850 * config.in: Regenerate.
6851 * configure: Regenerate.
6852 * remote-utils.c (xml_escape_text): Delete.
6853 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6854 buffer_xml_printf): Move to common/buffer.c.
6855 * server.c (main): Remove call to initialize_inferiors.
6856 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6857 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6858 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6859 internal_error, gdb_assert, gdb_assert_fail): Delete.
6860 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6861 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6862 common/buffer.h.
6863 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6864 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6865 initialize_inferiors): Delete.
6866
2275a1a7
PA
68672011-07-20 Pedro Alves <pedro@codesourcery.com>
6868
6869 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6870 symbol error.
6871
0a5b1e09
PA
68722011-05-31 Pedro Alves <pedro@codesourcery.com>
6873
6874 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6875 assertion.
6876 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6877
6938fd34
YQ
68782011-05-26 Yao Qi <yao@codesourcery.com>
6879
6880 * Makefile.in (thread-db.o): Track dependence to
6881 common/gdb_thread_db.h.
6882 * thread-db.c: include gdb_thread_db.h from right place.
6883
b481f9e0
TT
68842011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6885
6886 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6887 __FILE__ and __LINE__ to internal_error.
6888
98a5dd13
DE
68892011-05-13 Doug Evans <dje@google.com>
6890
6891 * thread-db.c (try_thread_db_load_from_sdir): New function.
6892 (try_thread_db_load_from_dir): New function.
6893 (thread_db_load_search): Handle $sdir, ignore $pdir.
6894 Remove trying of system directories if search of
6895 libthread-db-search-path fails, that is now done via $sdir.
6896
d248b706
KY
68972011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6898
6899 * server.c (handle_query): Add EnableDisableTracepoints to the list
6900 of supported features.
43aaf8b6 6901 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 6902 tracepoints.
43aaf8b6
PA
6903 (cmd_qtenable_disable): New.
6904 (cmd_qtstart): Install tracepoints even if disabled.
6905 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6906 receiving a QTEnable or QTDisable packet.
6907 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6908 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6909 tracepoints.
6910 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 6911
84e578fb
DE
69122011-05-10 Doug Evans <dje@google.com>
6913
6914 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6915
71f55dd8
DE
69162011-05-04 Doug Evans <dje@google.com>
6917
6918 * linux-low.c (linux_join): Skip process lookup.
6919 * spu-low.c (spu_join): Ditto.
6920 * server.c (join_inferiors_callback): Delete.
6921 (process_serial_event): For 'D' packet (detach) call join_inferior
6922 directly.
6923
4d393d60
JM
69242011-05-04 Joseph Myers <joseph@codesourcery.com>
6925
6926 * README: Don't mention xscale*-*-linux*.
6927 * configure.srv (xscale*-*-linux*): Don't handle target.
6928
b00ad6ff
NF
69292011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6930
6931 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6932 casting pointers.
6933 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6934 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6935 (i386_emit_void_call_2): Likewise.
6936
af96c192
YQ
69372011-04-26 Yao Qi <yao@codesourcery.com>
6938
43aaf8b6
PA
6939 * linux-low.c: Move common macros to linux-ptrace.h.
6940 Include linux-ptrace.h.
af96c192
YQ
6941 * Makefile.in (linux_ptrace_h): New.
6942 (linux-low.o): Depends on linux-ptrace.h.
6943
03f2bd59
JK
69442011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6945
6946 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6947 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6948 (remote_prepare): New function with most of the TCP code from ...
6949 (remote_open): ... here. Detect PORT here unconditionally. Move also
6950 setting transport_is_reliable.
6951 * server.c (run_once): New variable.
6952 (gdbserver_usage): Document it.
6953 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6954 the first run if RUN_ONCE.
6955 * server.h (run_once, remote_prepare): New declarations.
6956
7a9dd1b2
TT
69572011-04-19 Tom Tromey <tromey@redhat.com>
6958
6959 * win32-low.c (handle_load_dll): Remove duplicate "the".
6960
81239425
PM
69612011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6962
6963 Remove support for old Cygwin 1.5 versions.
6964 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6965 function to avoid warning.
6966 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6967 warning.
6968
9e0627f1
PM
69692011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6970
6971 * gdbserver/server.h (Macro _): Define it if not available.
6972
588eebee
MS
69732011-03-14 Michael Snyder <msnyder@vmware.com>
6974
348af9f7 6975 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 6976
43f70d4c
JB
69772011-03-10 Joel Brobecker <brobecker@adacore.com>
6978
6979 * Makefile.in (maintainer-clean realclean distclean): Remove
6980 "make ... subdir_do" command.
6981
348af9f7
MS
69822011-03-10 Michael Snyder <msnyder@vmware.com>
6983
6984 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6985
6986 * server.c (handle_v_run): Free alloced buffer on early return.
6987
e637a4f5
YQ
69882011-03-09 Yao Qi <yao@codesourcery.com>
6989
6990 Revert:
6991 2011-03-04 Yao Qi <yao@codesourcery.com>
6992
6993 * Makefile.in: Remove GNU make feature --directory.
6994
6995 2011-03-05 Yao Qi <yao@codesourcery.com>
6996
6997 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6998 (subdir_do): New make target. Copied from gdb/Makefile.
6999 (maintainer-clean, realclean, distclean, clean): Call corresponding
7000 make targets in common/Makefile.
7001
7002 2011-02-11 Yao Qi <yao@codesourcery.com>
7003
7004 * configure.ac: Call AC_PROG_RANLIB.
7005 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7006 * configure: Regenerate.
7007
e6edda56
JK
70082011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7009
7010 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7011
e5141119
JB
70122011-03-06 Yao Qi <yao@codesourcery.com>
7013
7014 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7015
64794aa4
JB
70162011-03-05 Yao Qi <yao@codesourcery.com>
7017
7018 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7019 (subdir_do): New make target. Copied from gdb/Makefile.
7020 (maintainer-clean, realclean, distclean, clean): Call corresponding
7021 make targets in common/Makefile.
7022
7a762829
YQ
70232011-03-04 Yao Qi <yao@codesourcery.com>
7024
7025 * Makefile.in: Remove GNU make feature --directory.
7026
348af9f7
MS
70272011-03-04 Michael Snyder <msnyder@vmware.com>
7028
7029 * server.c (queue_stop_reply): Call xmalloc not malloc.
7030
70312011-03-02 Michael Snyder <msnyder@vmware.com>
7032
7033 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7034
9f72fee2
MS
70352011-02-28 Michael Snyder <msnyder@vmware.com>
7036
588eebee
MS
7037 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7038 (cmd_qtframe): Ditto.
7039 (cmd_qtbuffer): Ditto.
7040 (cmd_bigqtbuffer): Ditto.
7041
9f72fee2
MS
7042 * utils.c (decimal2str): Initialize 'width' to nine, then
7043 don't mess with it.
7044
8040bd49
UW
70452011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7046
7047 * hostio.c (require_data): Free *data, not data.
7048
7e52cbd0
JK
70492011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7050
7051 * hostio.c (require_data): Use free, not xfree.
7052
9130f83e
MS
70532011-02-27 Michael Snyder <msnyder@vmware.com>
7054
4b812f4e
MS
7055 * server.c (handle_query): Discard unused value.
7056
9130f83e
MS
7057 * hostio.c (require_data): Free malloc memory before returning
7058 error.
7059
69d37113
MS
70602011-02-26 Michael Snyder <msnyder@vmware.com>
7061
7062 * linux-low.c (list_threads): Call closedir for dirent.
7063
35f5825a
MS
70642011-02-27 Michael Snyder <msnyder@vmware.com>
7065
2a589cef
MS
7066 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7067 a case statement falls through.
7068
0adea5f7
MS
7069 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7070
35f5825a
MS
7071 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7072 in comparison.
7073
238f1c74
MS
70742011-02-26 Michael Snyder <msnyder@vmware.com>
7075
7076 * utils.c (decimal2str): Eliminate dead code and dead param.
7077 (pulongest): Drop dead param from call to decimal2str.
7078 (plongest): Ditto.
7079
633ff500
JB
70802011-02-24 Joel Brobecker <brobecker@adacore.com>
7081
7082 Revert the following patch (not approved yet):
7083 2011-02-21 Hui Zhu <teawater@gmail.com>
7084 * tracepoint.c (tp_printf): New function.
7085 (eval_agent_expr): Handle gdb_agent_op_printf.
7086
f9c6ff72
HZ
70872011-02-21 Hui Zhu <teawater@gmail.com>
7088
7089 * tracepoint.c (tp_printf): New function.
7090 (eval_agent_expr): Handle gdb_agent_op_printf.
7091
94d5e490
TT
70922011-02-18 Tom Tromey <tromey@redhat.com>
7093
7094 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7095 (tracepoint.o): Likewise.
7096 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7097 (gdb_agent_op_names): Likewise.
7098
c7f96d2b
TT
70992011-02-18 Tom Tromey <tromey@redhat.com>
7100
7101 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7102 gdb_agent_op_rot>: New constants.
7103 (gdb_agent_op_names): Add pick and roll.
7104 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7105 cases.
7106
0feedb2c
JK
71072011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7108
7109 * aclocal.m4: Regenerated with aclocal-1.11.1.
7110
b3b9301e
PA
71112011-02-14 Pedro Alves <pedro@codesourcery.com>
7112
7113 * server.c (handle_qxfer_traceframe_info): New.
7114 (qxfer_packets): Register "traceframe-info".
7115 (handle_query): Report support for qXfer:traceframe-info:read+.
7116 * tracepoint.c (match_blocktype): New.
7117 (traceframe_find_block_type): Rename to ...
7118 (traceframe_walk_blocks): ... this. Add callback filter argument,
7119 and use it.
7120 (traceframe_find_block_type): New, reimplemented on top of
7121 traceframe_walk_blocks.
7122 (build_traceframe_info_xml): New.
7123 (traceframe_read_info): New.
7124 * server.h (traceframe_read_info): Declare.
7125
4f3e6fb7
YQ
71262011-02-11 Yao Qi <yao@codesourcery.com>
7127
7128 * configure.ac: Call AC_PROG_RANLIB.
7129 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7130 * configure: Regenerate.
7131
764880b7
PA
71322011-02-07 Pedro Alves <pedro@codesourcery.com>
7133
7134 * server.c (gdb_read_memory): Change return semantics to allow
7135 partial transfers.
7136 (handle_search_memory_1): Adjust.
7137 (process_serial_event) <'m' packet>: Handle partial transfers.
7138 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7139
1c79eb8a
PA
71402011-01-28 Pedro Alves <pedro@codesourcery.com>
7141
7142 * regcache.c (init_register_cache): Initialize
7143 regcache->register_status.
7144 (free_register_cache): Release regcache->register_status.
7145 (regcache_cpy): Copy register_status.
7146 (registers_to_string): Print 'x's for unavailable registers.
7147 (supply_register): Mark the register's status valid or
7148 unavailable, depending on whether a buffer was passed in or not.
7149 (supply_register_zeroed): New.
7150 (supply_regblock): Mark the registers' status valid or
7151 unavailable, depending on whether a buffer was passed in or not.
7152 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7153 (struct regcache): New `register_status' field.
7154 (supply_register_zeroed): Declare.
7155 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7156 supply_register_zeroed, rather than passing a NULL buffer to
7157 supply_register.
7158 * tracepoint.c (fetch_traceframe_registers): Update comment.
7159
85724a0e
PA
71602011-01-28 Pedro Alves <pedro@codesourcery.com>
7161
7162 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7163 buffer explicit.
7164
d08aafef
PA
71652011-01-25 Pedro Alves <pedro@codesourcery.com>
7166
7167 * server.h (decode_xfer_write): Change prototype.
7168 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7169 and don't extract the annex here.
7170 * server.c (decode_xfer_read): Remove `annex' parameter,
7171 and don't extract the annex here.
7172 (decode_xfer): New.
7173 (struct qxfer): New.
7174 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7175 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7176 (handle_qxfer_statictrace): New functions, abstracted out from
7177 handle_query, and made to use the struct qxfer interface.
7178 (handle_threads_qxfer_proper): Rename to ...
7179 (handle_qxfer_threads_proper): ... this.
7180 (handle_threads_qxfer): Rename to ...
7181 (handle_qxfer_threads): ... this. Adjust.
7182 (qxfer_packets): New array.
7183 (handle_qxfer): New function.
7184 (handle_query): Use handle_qxfer.
7185
493e2a69
MS
71862011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7187
7188 * gdbreplay.c: Shorten lines of >= 80 columns.
7189 * linux-low.c: Ditto.
7190 * linux-ppc-low.c: Ditto.
7191 * linux-s390-low.c: Ditto.
7192 * linux-sparc-low.c: Ditto.
7193 * linux-x86-low.c: Ditto.
7194 * linux-xtensa-low.c: Ditto.
7195 * mem-break.c: Ditto.
7196 * nto-low.c: Ditto.
7197 * regcache.h: Ditto.
7198 * remote-utils.c: Ditto.
7199 * server.c: Ditto.
7200 * server.h: Ditto.
7201 * thread-db.c: Ditto.
7202 * tracepoint.c: Ditto.
7203 * utils.c: Ditto.
7204 * win32-low.h: Ditto.
7205
44944448
JB
72062011-01-05 Joel Brobecker <brobecker@adacore.com>
7207
7208 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7209 update.
7210
71ce852c
JB
72112011-01-01 Joel Brobecker <brobecker@adacore.com>
7212
7213 * server.c (gdbserver_version): Update copyright year in version
7214 output.
7215 * gdbreplay.c (gdbreplay_version): Ditto.
7216
eb826dc6
MF
72172010-12-29 Jie Zhang <jie.zhang@analog.com>
7218
7219 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7220 * linux-bfin-low.c: New file.
7221 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7222 PT_DATA_ADDR for BFIN targets.
7223 * Makefile.in (SFILES): Add linux-bfin-low.c.
7224 (clean): Remove reg-bfin.c.
7225 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7226 * README: Mention supported Blackfin targets.
7227
39ab222a
MF
72282010-12-23 Mike Frysinger <vapier@gentoo.org>
7229
7230 * .gitignore: New file.
7231
a1f2ce7d
MF
72322010-11-16 Mike Frysinger <vapier@gentoo.org>
7233
7234 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7235
f474844c
JZ
72362010-10-22 Jie Zhang <jie@codesourcery.com>
7237
7238 * Makefile.in: Add FLAGS_TO_PASS variable.
7239 (install): Remove dependency of install-only and recursively
7240 invoke make for install-only.
7241
f1048712
DE
72422010-10-04 Doug Evans <dje@google.com>
7243
7244 * Makefile.in (uninstall): Use $(DESTDIR).
7245
b53a1623
PA
72462010-09-24 Pedro Alves <pedro@codesourcery.com>
7247
e6ee044d
PA
7248 PR gdb/11842
7249
b53a1623
PA
7250 * linux-x86-low.c (compat_siginfo_from_siginfo)
7251 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7252 si_code is < 0. Check for si_code == SI_TIMER before checking for
7253 si_code < 0.
7254
fa1bd1e4
JB
72552010-09-13 Joel Brobecker <brobecker@adacore.com>
7256
7257 * lynx-i386-low.c: New file.
7258 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7259
47fac8f8
JB
72602010-09-13 Joel Brobecker <brobecker@adacore.com>
7261
7262 * lynx-low.c (ptrace_request_to_str): Remove handling for
7263 request values that have been removed in LynxOS 5.x.
7264
1adfc54d
JB
72652010-09-13 Joel Brobecker <brobecker@adacore.com>
7266
7267 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7268 <ptrace.h>
7269
c2a66c29
NS
72702010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7271
7272 * configure.ac: Add --enable-inprocess-agent option.
7273 * configure: Rebuilt.
7274
32fcada3
YQ
72752010-09-06 Yao Qi <yao@codesourcery.com>
7276
7277 * linux-low.c (linux_kill): Remove unused variable.
7278 (linux_stabilize_threads): Likewise.
7279 * server.c (start_inferior): Likewise.
7280 (queue_stop_reply_callback): Likewise.
7281 * tracepoint.c (do_action_at_tracepoint): Likewise.
7282
0cccb683
YQ
72832010-09-06 Yao Qi <yao@codesourcery.com>
7284
7285 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7286 on return.
7287
423ec54c
JK
72882010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7289
7290 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7291
12ac6819
PA
72922010-09-06 Pedro Alves <pedro@codesourcery.com>
7293
7294 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7295 "$(IPA_DEPFILES)".
7296
8ed54b31
JB
72972010-09-01 Joel Brobecker <brobecker@adacore.com>
7298
7299 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7300 gdbserver/lynx-ppc-low.c: New files.
7301 * Makefile.in (lynx_low_h): New variable.
7302 (lynx-low.o, lynx-ppc-low.o): New rules.
7303 * configure.ac: On LynxOS, link with -lnetinet.
7304 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7305 * configure: regenerate.
7306
bb0116a4
JB
73072010-09-01 Joel Brobecker <brobecker@adacore.com>
7308
7309 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7310 * configure.ac: Add check for vasprintf and vsnprintf.
7311 * configure, config.in: Regenerate.
7312 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7313
a778ab81 73142010-09-01 Joel Brobecker <brobecker@adacore.com>
7315
7316 * gdbreplay.c: Move include of alloca.h up, next to include of
7317 malloc.h.
7318 * server.h: Add include of malloc.h.
7319 * mem-break.c: Remove include of malloc.h.
7320 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7321
8b034a19 73222010-09-01 Joel Brobecker <brobecker@adacore.com>
7323
7324 * Makefile.in (memmem.o): Build with -Wno-error.
7325
73262010-09-01 Joel Brobecker <brobecker@adacore.com>
7327
7328 * utils.c (xsnprintf): Make non-static.
7329 * server.h: Add xsnprintf declaration.
7330 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7331 replace calls to snprintf by calls to xsnprintf throughout.
7332
73332010-09-01 Joel Brobecker <brobecker@adacore.com>
7334
7335 * configure.ac: Add configure check for alloca.
7336 * configure, config.in: Regenerate.
7337 * server.h: Include alloca.h if it exists.
7338 * gdbreplay.c: Include alloca.h if it exists.
7339
1a981360
PA
73402010-08-28 Pedro Alves <pedro@codesourcery.com>
7341
7342 * linux-low.c (__SIGRTMIN): Define if not already defined.
7343 (linux_create_inferior): Check for __ANDROID__ rather than
7344 __SIGRTMIN.
7345 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7346 are already deferred.
7347 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7348 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7349 stopped and already has a pending signal to report.
7350 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7351 a pending signal to report or is moving out of a jump pad.
7352 (linux_init_signals): Check for __ANDROID__ rather than
7353 __SIGRTMIN.
7354
b4d51a55
PA
73552010-08-28 Pedro Alves <pedro@codesourcery.com>
7356
7357 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7358 debug_threads check. Avoid a linear search when not doing debug
7359 output.
7360
ec48365d
PA
73612010-08-27 Pedro Alves <pedro@codesourcery.com>
7362
7363 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7364 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7365 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7366 (process_event): Change local fd's type to gdb_fildes_t.
7367 (create_file_handler): Adjust prototype.
7368 (delete_file_handler): Adjust prototype.
7369 (handle_file_event): Adjust prototype. Use pfildes.
7370 (create_file_event): Adjsut prototype.
7371 * remote-utils.c (remote_desc, listen_desc): Change type to
7372 gdb_fildes_t.
7373 * server.h: New gdb_fildes_t typedef.
7374 [USE_WIN32API]: Include winsock2.h.
7375 (delete_file_handler, add_file_handler): Adjust prototypes.
7376 (pfildes): Declare.
7377 * utils.c (pfildes): New.
7378
854d88f0
PA
73792010-08-27 Pedro Alves <pedro@codesourcery.com>
7380
7381 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7382 * configure: Regenerate.
7383
0146f85b
PA
73842010-08-27 Pedro Alves <pedro@codesourcery.com>
7385
7386 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7387 (linux_done_accessing_memory): ... this.
7388 (linux_target_ops): Adjust.
7389 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7390 * nto-low.c (nto_target_ops): Adjust comment.
7391 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7392 * spu-low.c (spu_target_ops): Adjust comment.
7393 * target.h (target_ops): Rename unprepare_to_access_memory field
7394 to done_accessing_memory.
7395 (unprepare_to_access_memory): Rename to ...
7396 (done_accessing_memory): ... this.
7397
90d74c30
PA
73982010-08-26 Pedro Alves <pedro@codesourcery.com>
7399
7400 * linux-low.c (linux_prepare_to_access_memory): New.
7401 (linux_unprepare_to_access_memory): New.
7402 (linux_target_ops): Install them.
7403 * server.c (read_memory): Rename to ...
7404 (gdb_read_memory): ... this. Use
7405 prepare_to_access_memory/prepare_to_access_memory.
7406 (write_memory): Rename to ...
7407 (gdb_write_memory): ... this. Use
7408 prepare_to_access_memory/prepare_to_access_memory.
7409 (handle_search_memory_1): Adjust.
7410 (process_serial_event): Adjust.
7411 * target.h (struct target_ops): New fields
7412 prepare_to_access_memory and unprepare_to_access_memory.
7413 (prepare_to_access_memory, unprepare_to_access_memory): New.
7414 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7415 prepare_to_access_memory/prepare_to_access_memory.
7416 * nto-low.c (nto_target_ops): Adjust.
7417 * spu-low.c (spu_target_ops): Adjust.
7418 * win32-low.c (win32_target_ops): Adjust.
7419
fd467969
PA
74202010-08-26 Pedro Alves <pedro@codesourcery.com>
7421
7422 * Makefile.in (WARN_CFLAGS): Get it from configure.
7423 (WERROR_CFLAGS): New.
7424 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7425 * configure.ac: Introduce --enable-werror, which adds -Werror to
7426 the compiler command line. Enabled by default. Disable with
7427 --disable-werror. Add -Wdeclaration-after-statement
7428 Wpointer-arith and -Wformat-nonliteral to warning flags.
7429 * configure: Regenerate.
7430
331e2f5f
PA
74312010-08-26 Pedro Alves <pedro@codesourcery.com>
7432
7433 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7434
e581f2b4
PA
74352010-08-26 Pedro Alves <pedro@codesourcery.com>
7436
7437 * gdbreplay.c (remote_error): New.
7438 (gdbchar): New.
7439 (expect): Use gdbchar. Check for error reading from GDB.
7440 Clarify sync error output.
7441 (play): Check for errors writing to GDB.
7442 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7443 * remote-utils.c (getpkt): Check for errors writing to the remote
7444 descriptor.
7445
3c11dd79
PA
74462010-08-25 Pedro Alves <pedro@codesourcery.com>
7447
7448 * linux-low.c (linux_wait_1): Move non-debugging code out of
7449 `debug_threads' control.
7450
d20a8ad9
PA
74512010-08-25 Pedro Alves <pedro@codesourcery.com>
7452
7453 * linux-low.c (linux_wait_1): Don't set last_status here.
7454 * server.c (push_event, queue_stop_reply_callback): Assert we're
7455 not pushing a TARGET_WAITKIND_IGNORE event.
7456 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7457 (myresume, handle_target_event): Set the thread's last_resume_kind
7458 and last_status from the target returned status.
7459
964e4306
PA
74602010-08-25 Pedro Alves <pedro@codesourcery.com>
7461
7462 PR threads/10729
7463
7464 * linux-x86-low.c (update_debug_registers_callback): New.
7465 (i386_dr_low_set_addr): Use it.
7466 (i386_dr_low_get_addr): New.
7467 (i386_dr_low_set_control): Use update_debug_registers_callback.
7468 (i386_dr_low_get_control): New.
7469 (i386_dr_low_get_status): Adjust.
7470 * linux-low.c (linux_stop_lwp): New.
7471 * linux-low.h (linux_stop_lwp): Declare.
7472
7473 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7474 argument instead of a i386_debug_reg_state.
7475 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7476 a i386_debug_reg_state.
7477 (i386_insert_aligned_watchpoint): Adjust.
7478 (i386_remove_aligned_watchpoint): Adjust.
7479 (i386_low_stopped_data_address): Read the debug registers from the
7480 inferior instead of from the mirrors.
7481 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7482 (i386_dr_low_get_addr): Declare.
7483 (i386_dr_low_get_control): Declare.
7484 (i386_dr_low_get_status): Change prototype.
7485
7486 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7487 (i386_dr_low_get_addr): New.
7488 (i386_dr_low_get_control): New.
7489 (i386_dr_low_get_status): Adjust prototype. Return
7490 dr_status_mirror.
7491 (i386_initial_stuff): Clear dr_status_mirror and
7492 dr_control_mirror.
7493 (i386_get_thread_context): Adjust.
7494 (i386_set_thread_context): Adjust.
7495 (i386_thread_added): Adjust.
7496
5f21a75b
PA
74972010-08-24 Pedro Alves <pedro@codesourcery.com>
7498
7499 * linux-low.h (linux_thread_area): Delete declaration.
7500
3e4c1235
TS
75012010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7502
7503 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7504 after its termination.
7505
1971b033
PA
75062010-08-09 Pedro Alves <pedro@codesourcery.com>
7507
7508 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7509 (gdb_wants_all_stopped): Delete.
7510 (linux_wait_1): Don't call them.
7511 * server.c (handle_v_cont): Tag all threads as want-stopped.
7512 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7513 stopped as "client-wants-stopped".
7514
310444ac
PA
75152010-07-31 Pedro Alves <pedro@codesourcery.com>
7516
7517 * Makefile.in (signals_h): New.
7518 (server_h): Depend on it.
7519 (server.o): Don't depend on $(signals_def).
7520 (signals.o): Depend on $(signals_def).
7521
a19cae16
JK
75222010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7523
7524 * Makefile.in (signals_def): New.
7525 (server_h): Append include/gdb/signals.h and signals_def.
7526 (server.o): Append signals_def.
7527
30d50328
JK
75282010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7529
7530 * server.c (handle_target_event): Use target_signal_to_host for
7531 resume_info.sig initialization.
7532 * target.h (struct thread_resume) <sig>: New comment.
7533
5c3216e2
OS
75342010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7535
c6f46ca0
OS
7536 * server.c (handle_query): strcpy() the returned string from paddress()
7537 instead of sprintf().
5c3216e2
OS
7538 * utils.c (paddress): Return phex_nz().
7539
6bd31874
JB
75402010-07-07 Joel Brobecker <brobecker@adacore.com>
7541
7542 * server.c (handle_v_cont): Call mourn_inferior if process
7543 just exited.
7544 (myresume): Likewise.
7545
0fb4aa4b
PA
75462010-07-01 Pedro Alves <pedro@codesourcery.com>
7547
7548 Static tracepoints, and integration with UST.
7549
7550 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7551 * mem-break.c (uninsert_all_breakpoints)
7552 (reinsert_all_breakpoints): New.
7553 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7554 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7555 (gdb_agent_ust_loaded, helper_thread_id)
7556 (gdb_agent_helper_thread_id): New macros.
7557 (struct ipa_sym_addresses): Add addr_ust_loaded,
7558 addr_helper_thread_id, addr_cmd_buf.
7559 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7560 (in_process_agent_loaded_ust): New.
7561 (write_e_ust_not_loaded): New.
7562 (maybe_write_ipa_ust_not_loaded): New.
7563 (struct collect_static_trace_data_action): New.
7564 (enum tracepoint_type) <static_tracepoint>: New.
7565 (struct tracepoint) <handle>: Mention static tracepoints.
7566 (struct static_tracepoint_ctx): New.
7567 (CMD_BUF_SIZE): New.
7568 (add_tracepoint_action): Handle static tracepoint actions.
7569 (unprobe_marker_at): New.
7570 (clear_installed_tracepoints): Handle static tracepoints.
7571 (cmd_qtdp): Handle static tracepoints.
7572 (probe_marker_at): New.
7573 (cmd_qtstart): Handle static tracepoints.
7574 (response_tracepoint): Handle static tracepoints.
7575 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7576 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7577 (get_context_regcache): Handle static tracepoints.
7578 (do_action_at_tracepoint): Handle static tracepoint actions.
7579 (traceframe_find_block_type): Handle static trace data blocks.
7580 (traceframe_read_sdata): New.
7581 (download_tracepoints): Download static tracepoint actions.
7582 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7583 (GDB_PROBE_NAME): New.
7584 (ust_ops): New.
7585 (GET_UST_SYM): New.
7586 (USTF): New.
7587 (dlsym_ust): New.
7588 (ust_marker_to_static_tracepoint): New.
7589 (gdb_probe): New.
7590 (collect_ust_data_at_tracepoint): New.
7591 (gdb_ust_probe): New.
7592 (UNIX_PATH_MAX, SOCK_DIR): New.
7593 (gdb_ust_connect_sync_socket): New.
7594 (resume_thread, stop_thread): New.
7595 (run_inferior_command): New.
7596 (init_named_socket): New.
7597 (gdb_ust_socket_init): New.
7598 (cstr_to_hexstr): New.
7599 (next_st): New.
7600 (first_marker, next_marker): New.
7601 (response_ust_marker): New.
7602 (cmd_qtfstm, cmd_qtsstm): New.
7603 (unprobe_marker_at, probe_marker_at): New.
7604 (cmd_qtstmat, gdb_ust_thread): New.
7605 (gdb_ust_init): New.
7606 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7607 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7608 (ST_REGENTRY): New.
7609 (x86_64_st_collect_regmap): New.
7610 (X86_64_NUM_ST_COLLECT_GREGS): New.
7611 (AMD64_RIP_REGNUM): New.
7612 (supply_static_tracepoint_registers): New.
7613 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7614 (ST_REGENTRY): New.
7615 (i386_st_collect_regmap): New.
7616 (i386_NUM_ST_COLLECT_GREGS): New.
7617 (supply_static_tracepoint_registers): New.
7618 * server.c (handle_query): Handle qXfer:statictrace:read.
7619 <qSupported>: Report support for StaticTracepoints, and
7620 qXfer:statictrace:read features.
7621 * server.h (traceframe_read_sdata)
7622 (supply_static_tracepoint_registers): Declare.
7623 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7624 (unpack_varlen_hex): Include in IPA build.
7625 * Makefile.in (ustlibs, ustinc): New.
7626 (IPA_OBJS): Add remote-utils-ipa.o.
7627 ($(IPA_LIB)): Link -ldl and -lpthread.
7628 (UST_CFLAGS): New.
7629 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7630 * config.in, configure: Regenerate.
7631
9e4344e5
PA
76322010-06-20 Ian Lance Taylor <iant@google.com>
7633 Pedro Alves <pedro@codesourcery.com>
7634
7635 * linux-x86-low.c (always_true): Delete.
7636 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7637 trying to fool the compiler with always_true.
7638
c6beb2cb
PA
76392010-06-20 Pedro Alves <pedro@codesourcery.com>
7640
7641 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7642 conditions in gdbserver.
7643
d2ed6730
UW
76442010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7645
7646 * spu-low.c (spu_read_memory): Wrap around local store limit.
7647 (spu_write_memory): Likewise.
7648
4e29fb54
PA
76492010-06-15 Pedro Alves <pedro@codesourcery.com>
7650
7651 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7652 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7653 LONGEST uses.
7654 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7655 uses.
7656 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7657 uses with LONGEST uses.
7658
6a271cae
PA
76592010-06-14 Stan Shebs <stan@codesourcery.com>
7660 Pedro Alves <pedro@codesourcery.com>
7661
7662 Bytecode compiler.
7663
7664 * linux-x86-low.c: Include limits.h.
7665 (add_insns): New.
7666 (always_true): New.
7667 (EMIT_ASM): New.
7668 (EMIT_ASM32): New.
7669 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7670 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7671 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7672 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7673 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7674 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7675 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7676 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7677 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7678 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7679 (amd64_emit_void_call_2): New.
7680 (amd64_emit_ops): New.
7681 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7682 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7683 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7684 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7685 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7686 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7687 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7688 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7689 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7690 (i386_emit_stack_adjust, i386_emit_int_call_1)
7691 (i386_emit_void_call_2): New.
7692 (i386_emit_ops): New.
7693 (x86_emit_ops): New.
7694 (the_low_target): Install x86_emit_ops.
7695 * server.h (struct emit_ops): New.
7696 (get_raw_reg_func_addr): Declare.
7697 (current_insn_ptr, emit_error): Declare.
7698 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7699 (set_trace_state_variable_value): New defines.
7700 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7701 addr_get_trace_state_variable_value and
7702 addr_set_trace_state_variable_value.
7703 (symbol_list): New fields for get_raw_reg,
7704 get_trace_state_variable_value and set_trace_state_variable_value.
7705 (condfn): New typedef.
7706 (struct tracepoint): New field `compiled_cond'.
7707 (do_action_at_tracepoint): Clear compiled_cond.
7708 (get_trace_state_variable_value, set_trace_state_variable_value):
7709 Export in the IPA.
7710 (condition_true_at_tracepoint): If there's a compiled condition,
7711 run that.
7712 (current_insn_ptr, emit_error): New globals.
7713 (struct bytecode_address): New.
7714 (get_raw_reg_func_addr): New.
7715 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7716 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7717 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7718 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7719 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7720 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7721 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7722 (compile_tracepoint_condition, compile_bytecodes): New.
7723 * target.h (emit_ops): Forward declare.
7724 (struct target_ops): New field emit_ops.
7725 (target_emit_ops): New.
7726 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7727 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7728 * linux-low.c (linux_emit_ops): New.
7729 (linux_target_ops): Install it.
7730 * linux-low.h (struct linux_target_ops): New field emit_ops.
7731
92b72907
UW
77322010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7733
7734 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7735 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7736
fa593d66
PA
77372010-06-01 Pedro Alves <pedro@codesourcery.com>
7738 Stan Shebs <stan@codesourcery.com>
7739
7740 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7741 (all): Depend on $(extra_libraries).
7742 (install-only): Install the IPA.
7743 (IPA_OBJS, IPA_LIB): New.
7744 (clean): Remove the IPA lib.
7745 (IPAGENT_CFLAGS): New.
7746 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7747 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7748 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7749 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7750 * configure.ac: Check for atomic builtins support in the compiler.
7751 (IPA_DEPFILES, extra_libraries): Define.
7752 * configure.srv (ipa_obj): Add description.
7753 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7754 (i[34567]86-*-linux*): Set ipa_obj.
7755 (x86_64-*-linux*): Set ipa_obj.
7756 * linux-low.c (stabilizing_threads): New.
7757 (supports_fast_tracepoints): New.
7758 (linux_detach): Stabilize threads before detaching.
7759 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7760 the lwp is either not stabilizing, or is moving out of a jump pad.
7761 (linux_fast_tracepoint_collecting): New.
7762 (maybe_move_out_of_jump_pad): New.
7763 (enqueue_one_deferred_signal): New.
7764 (dequeue_one_deferred_signal): New.
7765 (linux_wait_for_event_1): If moving out of a jump pad, defer
7766 pending signals to later.
7767 (linux_stabilize_threads): New.
7768 (linux_wait_1): Check if threads need moving out of jump pads, and
7769 do it if so.
7770 (stuck_in_jump_pad_callback): New.
7771 (move_out_of_jump_pad_callback): New.
7772 (lwp_running): New.
7773 (linux_resume_one_lwp): Handle moving out of jump pads.
7774 (linux_set_resume_request): Dequeue deferred signals.
7775 (need_step_over_p): Also step over fast tracepoint jumps.
7776 (start_step_over): Also uninsert fast tracepoint jumps.
7777 (finish_step_over): Also reinsert fast tracepoint jumps.
7778 (linux_install_fast_tracepoint_jump): New.
7779 (linux_target_ops): Install linux_stabilize_threads and
7780 linux_install_fast_tracepoint_jump_pad.
7781 * linux-low.h (linux_target_ops) <get_thread_area,
7782 install_fast_tracepoint_jump_pad>: New fields.
7783 (struct lwp_info) <collecting_fast_tracepoint,
7784 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7785 (linux_get_thread_area): Declare.
7786 * linux-x86-low.c (jump_insn): New.
7787 (x86_get_thread_area): New.
7788 (append_insns): New.
7789 (push_opcode): New.
7790 (amd64_install_fast_tracepoint_jump_pad): New.
7791 (i386_install_fast_tracepoint_jump_pad): New.
7792 (x86_install_fast_tracepoint_jump_pad): New.
7793 (the_low_target): Install x86_get_thread_area and
7794 x86_install_fast_tracepoint_jump_pad.
7795 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7796 (struct fast_tracepoint_jump): New.
7797 (fast_tracepoint_jump_insn): New.
7798 (fast_tracepoint_jump_shadow): New.
7799 (find_fast_tracepoint_jump_at): New.
7800 (fast_tracepoint_jump_here): New.
7801 (delete_fast_tracepoint_jump): New.
7802 (set_fast_tracepoint_jump): New.
7803 (uninsert_fast_tracepoint_jumps_at): New.
7804 (reinsert_fast_tracepoint_jumps_at): New.
7805 (set_breakpoint_at): Use write_inferior_memory.
7806 (uninsert_raw_breakpoint): Use write_inferior_memory.
7807 (check_mem_read): Mask out fast tracepoint jumps.
7808 (check_mem_write): Mask out fast tracepoint jumps.
7809 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7810 (set_fast_tracepoint_jump): Declare.
7811 (delete_fast_tracepoint_jump)
7812 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7813 (reinsert_fast_tracepoint_jumps_at): Declare.
7814 * regcache.c: Don't compile many functions when building the
7815 in-process agent library.
7816 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7817 the register buffer in the heap.
7818 (free_register_cache): If the register buffer isn't owned by the
7819 regcache, don't free it.
7820 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7821 pre-existing register caches.
7822 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7823 type.
7824 (convert_ascii_to_int): : Constify `from' parameter type.
7825 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7826 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7827 the needed buffer in-place.
7828 (relocate_instruction): New.
7829 * server.c (handle_query) <qSymbols>: If the target supports
7830 tracepoints, give it a chance of looking up symbols. Report
7831 support for fast tracepoints.
7832 (handle_status): Stabilize threads.
7833 (process_serial_event): Adjust.
7834 * server.h (struct fast_tracepoint_jump): Forward declare.
7835 (struct process_info) <fast_tracepoint_jumps>: New field.
7836 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7837 (decode_X_packet, decode_M_packet): Adjust.
7838 (relocate_instruction): Declare.
7839 (in_process_agent_loaded): Declare.
7840 (tracepoint_look_up_symbols): Declare.
7841 (struct fast_tpoint_collect_status): Declare.
7842 (fast_tracepoint_collecting): Declare.
7843 (force_unlock_trace_buffer): Declare.
7844 (handle_tracepoint_bkpts): Declare.
7845 (initialize_low_tracepoint)
7846 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7847 * target.h (struct target_ops) <stabilize_threads,
7848 install_fast_tracepoint_jump_pad>: New fields.
7849 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7850 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7851 [HAVE_STDINT_H]: Include stdint.h.
7852 (trace_debug_1): Rename to ...
7853 (trace_vdebug): ... this.
7854 (trace_debug): Rename to ...
7855 (trace_debug_1): ... this. Add `level' parameter.
7856 (trace_debug): New.
7857 (ATTR_USED, ATTR_NOINLINE): New.
7858 (IP_AGENT_EXPORT): New.
7859 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7860 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7861 (about_to_request_buffer_space, trace_buffer_is_full)
7862 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7863 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7864 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7865 (traceframe_write_count, traceframes_created)
7866 (trace_state_variables)
7867 New renaming defines.
7868 (struct ipa_sym_addresses): New.
7869 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7870 (symbol_list): New.
7871 (ipa_sym_addrs): New.
7872 (all_tracepoint_symbols_looked_up): New.
7873 (in_process_agent_loaded): New.
7874 (write_e_ipa_not_loaded): New.
7875 (maybe_write_ipa_not_loaded): New.
7876 (tracepoint_look_up_symbols): New.
7877 (debug_threads) [IN_PROCESS_AGENT]: New.
7878 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7879 (UNKNOWN_SIDE_EFFECTS): New.
7880 (stop_tracing): New.
7881 (flush_trace_buffer): New.
7882 (stop_tracing_bkpt): New.
7883 (flush_trace_buffer_bkpt): New.
7884 (read_inferior_integer): New.
7885 (read_inferior_uinteger): New.
7886 (read_inferior_data_pointer): New.
7887 (write_inferior_data_pointer): New.
7888 (write_inferior_integer): New.
7889 (write_inferior_uinteger): New.
7890 (struct collect_static_trace_data_action): Delete.
7891 (enum tracepoint_type): New.
7892 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
7893 <actions_str, step_actions, step_actions_str>: Only include in
7894 GDBserver.
fa593d66
PA
7895 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7896 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7897 (tracepoints): Use IP_AGENT_EXPORT.
7898 (last_tracepoint): Don't include in the IPA.
7899 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7900 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7901 (alloced_trace_state_variables): New.
7902 (trace_state_variables): Use IP_AGENT_EXPORT.
7903 (traceframe_t): Delete unused variable.
7904 (circular_trace_buffer): Don't include in the IPA.
7905 (trace_buffer_start): Delete.
7906 (struct trace_buffer_control): New.
7907 (trace_buffer_free): Delete.
7908 (struct ipa_trace_buffer_control): New.
7909 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7910 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7911 New.
7912 (trace_buffer_ctrl): New.
7913 (TRACE_BUFFER_CTRL_CURR): New.
7914 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7915 Reimplement as macros.
7916 (trace_buffer_wrap): Delete.
7917 (traceframe_write_count, traceframe_read_count)
7918 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7919 (struct tracepoint_hit_ctx) <type>: New field.
7920 (struct fast_tracepoint_ctx): New.
7921 (memory_barrier): New.
7922 (cmpxchg): New.
7923 (record_tracepoint_error): Update atomically in the IPA.
7924 (clear_inferior_trace_buffer): New.
7925 (about_to_request_buffer_space): New.
7926 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7927 updating the same buffer.
7928 (add_tracepoint): Default the tracepoint's type to trap
7929 tracepoint, and orig_size to -1.
7930 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7931 internal variables.
7932 (create_trace_state_variable): New parameter `gdb'. Handle it.
7933 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7934 (cmd_qtdp): Handle fast tracepoints.
7935 (cmd_qtdv): Adjust.
7936 (max_jump_pad_size): New.
7937 (gdb_jump_pad_head): New.
7938 (get_jump_space_head): New.
7939 (claim_jump_space): New.
7940 (sort_tracepoints): New.
7941 (MAX_JUMP_SIZE): New.
7942 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7943 IPA.
7944 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7945 support. Upload fast traceframes, and delete internal IPA
7946 breakpoints.
7947 (stop_tracing_handler): New.
7948 (flush_trace_buffer_handler): New.
7949 (cmd_qtstop): Upload fast tracepoints.
7950 (response_tracepoint): Handle fast tracepoints.
7951 (tracepoint_finished_step): Upload fast traceframes. Set the
7952 tracepoint hit context's tracepoint type.
7953 (handle_tracepoint_bkpts): New.
7954 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7955 type. Add comment about fast tracepoints.
7956 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7957 non-existing action_str field.
7958 (get_context_regcache): Handle fast tracepoints.
7959 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7960 to the regcache.
7961 (fast_tracepoint_from_jump_pad_address): New.
7962 (fast_tracepoint_from_ipa_tpoint_address): New.
7963 (collecting_t): New.
7964 (force_unlock_trace_buffer): New.
7965 (fast_tracepoint_collecting): New.
7966 (collecting): New.
7967 (gdb_collect): New.
7968 (write_inferior_data_ptr): New.
7969 (target_tp_heap): New.
7970 (target_malloc): New.
7971 (download_agent_expr): New.
7972 (UALIGN): New.
7973 (download_tracepoints): New.
7974 (download_trace_state_variables): New.
7975 (upload_fast_traceframes): New.
7976 (IPA_FIRST_TRACEFRAME): New.
7977 (IPA_NEXT_TRACEFRAME_1): New.
7978 (IPA_NEXT_TRACEFRAME): New.
7979 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7980 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7981 (gdb_jump_pad_buffer_end): New.
7982 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7983 (initialize_tracepoint): Adjust.
7984 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7985 buffer. Initialize the low module.
7986 * utils.c (PREFIX, TOOLNAME): New.
7987 (malloc_failure): Use PREFIX.
7988 (error): In the IPA, an error causes an exit.
7989 (fatal, warning): Use PREFIX.
7990 (internal_error): Use TOOLNAME.
7991 (NUMCELLS): Increase to 10.
7992 * configure, config.in: Regenerate.
7993
d149dd1d
PA
79942010-06-01 Pedro Alves <pedro@codesourcery.com>
7995
7996 * server.c (handle_query) <qSupported>: Do two passes over the
7997 qSupported string to avoid nesting strtok.
7998
f6528abd
JK
79992010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8000
8001 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8002 (CDEPS): New.
8003 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
8004 -Wl,--dynamic-list.
8005 * configure: Regenerate.
8006 * proc-service.list: New.
8007
ca2a87a0
JK
80082010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8009
8010 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8011 New comment.
8012
363a6e9f
OS
80132010-05-26 Ozkan Sezer <sezeroz@gmail.com>
8014
8015 * gdbreplay.c (remote_open): Check error return from socket() call by
8016 its equality to -1 not by it being negative.
8017 * remote-utils.c (remote_open): Likewise.
8018
d23b6cb1
PA
80192010-05-23 Pedro Alves <pedro@codesourcery.com>
8020
8021 * config.h: Regenerate.
8022
28d3cf85
MK
80232010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8024
8025 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8026 doesn't provide PTRACE_GET_THREAD_AREA.
8027
fea36a59
MK
80282010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8029
8030 * linux-m68k-low.c: Include <asm/ptrace.h>
8031 (ps_get_thread_area): Implement.
8032
24b066ba
DE
80332010-05-03 Doug Evans <dje@google.com>
8034
8035 * event-loop.c (struct callback_event): New struct.
8036 (callback_list): New global.
8037 (append_callback_event, delete_callback_event): New functions.
8038 (process_callback): New function.
8039 (start_event_loop): Call it.
8040 * remote-utils.c (NOT_SCHEDULED): Define.
8041 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8042 moved out of readchar.
8043 (readchar): Rewrite. Call reschedule before returning.
8044 (reset_readchar): New function.
8045 (remote_close): Call it.
8046 (process_remaining, reschedule): New functions.
8047 * server.h (callback_handler_func): New typedef.
8048 (append_callback_event, delete_callback_event): Declare.
8049
9836d6ea
PA
80502010-05-03 Pedro Alves <pedro@codesourcery.com>
8051
8052 * proc-service.c (ps_pglobal_lookup): Use
8053 thread_db_look_up_one_symbol.
8054 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8055 parameter. Use it instead of all_symbols_looked_up.
8056 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8057 field.
8058 (all_symbols_looked_up): Don't declare.
8059 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8060 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8061 field.
8062 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8063 Set all_symbols_looked_up here.
8064 (thread_db_look_up_one_symbol): New.
8065 (thread_db_get_tls_address): Adjust.
8066 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8067 thread_db object on the heap, and tentatively set it in the
8068 process structure.
8069 (thread_db_init): Don't set all_symbols_looked_up here.
8070 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8071
7984d532
PA
80722010-05-03 Pedro Alves <pedro@codesourcery.com>
8073
8074 * linux-low.c (linux_kill, linux_detach): Adjust.
8075 (status_pending_p_callback): Remove redundant statement. Check
8076 for !TARGET_WAITIKIND_IGNORE, instead of
8077 TARGET_WAITKIND_STOPPED.
8078 (handle_tracepoints): Make sure LWP is locked. Adjust.
8079 (linux_wait_for_event_1): Adjust.
8080 (linux_cancel_breakpoints): New.
8081 (unsuspend_one_lwp): New.
8082 (unsuspend_all_lwps): New.
8083 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8084 (send_sigstop_callback): Change return type to int, add new
8085 `except' parameter and handle it.
8086 (suspend_and_send_sigstop_callback): New.
8087 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8088 pass them down. If SUSPEND, also increment the lwp's suspend
8089 count.
8090 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8091 (need_step_over_p): Don't consider suspended LWPs.
8092 (start_step_over): Adjust.
8093 (proceed_one_lwp): Change return type to int, add new `except'
8094 parameter and handle it.
8095 (unsuspend_and_proceed_one_lwp): New.
8096 (proceed_all_lwps): Use find_inferior instead of
8097 for_each_inferior.
8098 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8099 also decrement the suspend count of LWPs. Pass `except' down,
8100 instead of hacking its suspend count.
8101 (linux_pause_all): Add `freeze' parameter. Adjust.
8102 (linux_unpause_all): New.
8103 (linux_target_ops): Install linux_unpause_all.
8104 * server.c (handle_status): Adjust.
8105 * target.h (struct target_ops): New fields `unpause_all' and
8106 `cancel_breakpoints'. Add new parameter to `pause_all'.
8107 (pause_all): Add new `freeze' parameter.
8108 (unpause_all): New.
8109 (cancel_breakpoints): New.
8110 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8111 cancel breakpoints.
8112 (cmd_qtstart): Pause threads.
8113 (stop_tracing): Pause threads, and cancel breakpoints.
8114 * win32-low.c (win32_target_ops): Adjust.
8115
e471f25b
PA
81162010-05-03 Pedro Alves <pedro@codesourcery.com>
8117
8118 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8119 the inferior right away from here...
8120 (linux_wait_1): ... to here, and adjust to check the thread's
8121 last_resume_kind instead of the lwp's step or stop_expected flags.
8122
1915ef4f
PA
81232010-05-02 Pedro Alves <pedro@codesourcery.com>
8124
8125 * README: Use consistent `GDB' and `GDBserver' spellings.
8126
f9e39928
PA
81272010-05-02 Pedro Alves <pedro@codesourcery.com>
8128
8129 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8130 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8131 (linux_detach_one_lwp): Assume the lwp is stopped.
8132 (any_thread_of): Delete.
8133 (linux_detach): Stop all lwps here. Don't blindly delete all
8134 breakpoints.
8135 (delete_lwp_callback): New.
8136 (linux_mourn): Delete all lwps of the process that is gone.
8137 (linux_wait_1): Don't delete the last lwp of the process here.
8138 * mem-break.h (mark_breakpoints_out): Declare.
8139 * mem-break.c (mark_breakpoints_out): New.
8140 (free_all_breakpoints): Use it.
8141 * server.c (handle_target_event): If the process is gone, mark
8142 breakpoints out.
8143 * thread-db.c (struct thread_db) <create_bp>: New field.
8144 (thread_db_enable_reporting): Fix prototype. Store a thread event
8145 breakpoint reference in the thread_db struct.
8146 (thread_db_load_search): Clear the thread_db object.
8147 (try_thread_db_load_1): Ditto.
8148 (switch_to_process): New.
8149 (disable_thread_event_reporting): Use it.
8150 (remove_thread_event_breakpoints): New.
8151 (thread_db_detach, thread_db_mourn): Use it.
8152
1e7fc18c
PA
81532010-05-01 Pedro Alves <pedro@codesourcery.com>
8154
8155 * linux-low.c (linux_enable_event_reporting): New.
8156 (linux_wait_for_event_1, handle_extended_wait): Use it.
8157
02fc4de7
PA
81582010-04-30 Pedro Alves <pedro@codesourcery.com>
8159
8160 * linux-low.c (linux_kill_one_lwp, linux_kill)
8161 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8162 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8163 SIGSTOP even if the LWP is stopped.
8164 (send_sigstop_callback): New.
8165 (stop_all_lwps): Use send_sigstop_callback instead.
8166 (linux_resume_one_thread): Adjust.
8167 (proceed_one_lwp): Still proceed an LWP that the client has
8168 requested to stop, if we haven't reported it as stopped yet. Make
8169 sure that LWPs the client want stopped, have a pending SIGSTOP.
8170
bc3b5632
DE
81712010-04-26 Doug Evans <dje@google.com>
8172
ae1ada35
DE
8173 * server.c (handle_general_set): Make static.
8174
bc3b5632
DE
8175 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8176 Print received char after testing for error/eof instead of before.
8177 (input_interrupt): Tweak comment.
8178
65730243
DE
81792010-04-23 Doug Evans <dje@google.com>
8180
8181 * server.c (start_inferior): Print inferior argv if --debug.
8182
a8ae7dc0
AR
81832010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8184
8185 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8186 * nto-x86-low.c: Include server.h
8187
1c07cc19
PM
81882010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8189
8190 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8191 be consistent with other sources of this directory.
8192 (init_registers_amd64): Correct name of source file of this function
8193 in the comment.
8194
e0a61e09
PM
81952010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8196
8197 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8198 64-bit executables.
8199
54709339
PM
82002010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8201
8202 * win32-i386-low.c: Add 64-bit support.
8203 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8204 (init_registers_amd64): Declare.
8205 (mappings): Add 64-bit version of array.
8206 (init_windows_x86): New function.
8207 (the_low_target): Change init_arch field to init_windows_x86.
8208
e8f0053d
PM
82092010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8210
8211 * win32-low.c: Adapt to support also 64-bit architecture.
8212 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8213 (get_image_name): Use SIZE_T type for local variable `done'.
8214 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8215 (toolhelp_get_dll_name): Idem.
8216 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8217 Use uintptr_t typecast to avoid warning.
8218 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8219 (handle_exception): Use phex_nz to avoid warning.
8220 (win32_wait): Remove unused local variable `process'.
8221
c481e77e
PM
82222010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8223
8224 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8225 `amd64-avx.o'.
8226
12ea4b69
PM
82272010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8228
8229 * configure.ac: Use `ws2_32' library for srv_mingw.
8230 * configure: Regenerate.
8231 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8232 * remote-utils.c: Likewise.
8233
f6d1620c
L
82342010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8235
8236 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8237 if __x86_64__ is defined.
8238
8e642873
PM
82392010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8240
8241 * configure: Regenerate.
8242
711e434b
PM
82432010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8244
8245 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8246 * target.h (target_ops): New get_tib_address field.
8247 * win32-low.h (win32_thread_info): Add thread_local_base field.
8248 * win32-low.c (child_add_thread): Add tlb argument.
8249 Set thread_local_base field to TLB.
8250 (get_child_debug_event): Adapt to child_add_thread change.
8251 (win32_get_tib_address): New function.
8252 (win32_target_ops): Set get_tib_address field to
8253 win32_get_tib_address.
8254 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8255
505106cd
PA
82562010-04-12 Pedro Alves <pedro@codesourcery.com>
8257
505106cd
PA
8258 * linux-low.c (linux_mourn): Also remove the process.
8259 * server.c (handle_target_event): Don't remove the process here.
8260 * nto-low.c (nto_mourn): New.
8261 (nto_target_ops): Install it.
8262 * spu-low.c (spu_mourn): New.
8263 (spu_target_ops): Install it.
8264 * win32-low.c (win32_mourn): New.
8265 (win32_target_ops): Install it.
8266
e8470a06
PA
82672010-04-12 Pedro Alves <pedro@codesourcery.com>
8268
8269 * server.h (buffer_xml_printf): Remove redundant `;'.
8270
45ba0d02
PA
82712010-04-12 Pedro Alves <pedro@codesourcery.com>
8272
8273 * regcache.c (set_register_cache): Invalidate regcaches before
8274 changing the register cache layout.
8275 (regcache_invalidate_one): Allow a NULL regcache.
8276 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8277 regcaches before changing the register cache layout or the target
8278 regsets.
8279
59e04013
L
82802010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8281
8282 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8283 variable warning on Linux/x86-64.
8284
8336d594
PA
82852010-04-11 Pedro Alves <pedro@codesourcery.com>
8286
8287 GDBserver disconnected tracing support.
8288
8289 * linux-low.c (linux_remove_process): Delete.
8290 (add_lwp): Don't set last_resume_kind here.
8291 (linux_kill): Use `mourn'.
8292 (linux_detach): Use `thread_db_detach', and `mourn'.
8293 (linux_mourn): New.
8294 (linux_attach_lwp_1): Adjust comment.
8295 (linux_attach): last_resume_kind moved the thread_info; adjust.
8296 (status_pending_p_callback): Adjust.
8297 (linux_wait_for_event_1): Adjust.
8298 (count_events_callback, select_singlestep_lwp_callback)
8299 (select_event_lwp_callback, cancel_breakpoints_callback)
8300 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8301 (proceed_one_lwp): Adjust.
8302 (linux_async): Add debug output.
8303 (linux_thread_stopped): New.
8304 (linux_pause_all): New.
8305 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8306 linux_pause_all.
8307 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8308 (thread_db_free): Delete declaration.
8309 (thread_db_detach, thread_db_mourn): Declare.
8310 * thread-db.c (thread_db_init): Use thread_db_mourn.
8311 (thread_db_free): Delete, split in two.
8312 (disable_thread_event_reporting): New.
8313 (thread_db_detach): New.
8314 (thread_db_mourn): New.
8315
8316 * server.h (struct thread_info) <last_resume_kind>: New field.
8317 <attached>: Add comment.
8318 <gdb_detached>: New field.
8319 (handler_func): Change return type to int.
8320 (handle_serial_event, handle_target_event): Ditto.
8321 (gdb_connected): Declare.
8322 (tracing): Delete.
8323 (disconnected_tracing): Declare.
8324 (stop_tracing): Declare.
8325
8326 * server.c (handle_query) <qSupported>: Report support for
8327 disconnected tracing.
8328 (queue_stop_reply_callback): Account for running threads.
8329 (gdb_wants_thread_stopped): New.
8330 (gdb_wants_all_threads_stopped): New.
8331 (gdb_reattached_process): New.
8332 (handle_status): Clear the `gdb_detached' flag of all processes.
8333 In all-stop, stop all threads.
8334 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8335 (process_serial_event): If the remote connection breaks, or if an
8336 exit was forced with "monitor exit", force an event loop exit.
8337 Handle disconnected tracing on detach.
8338 (handle_serial_event): Adjust.
8339 (handle_target_event): If GDB isn't connected, forward events back
8340 to the inferior, unless the last process exited, in which case,
8341 exit gdbserver. Adjust interface.
8342
8343 * remote-utils.c (remote_open): Don't block in accept. Instead
8344 register an event loop source on the listen socket file
8345 descriptor. Refactor bits into ...
8346 (listen_desc): ... this new global.
8347 (gdb_connected): ... this new function.
8348 (enable_async_notification): ... this new function.
8349 (handle_accept_event): ... this new function.
8350 (remote_close): Clear remote_desc.
8351
8352 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8353
8354 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8355 New fields.
8356 (mourn_inferior): Define.
8357 (target_process_qsupported): Avoid the dangling else problem.
8358 (thread_stopped): Define.
8359 (pause_all): Define.
8360 (target_waitstatus_to_string): Declare.
8361 * target.c (target_waitstatus_to_string): New.
8362
8363 * tracepoint.c (tracing): Make extern.
8364 (disconnected_tracing): New.
8365 (stop_tracing): Make extern. Handle tracing stops due to GDB
8366 disconnecting.
8367 (cmd_qtdisconnected): New.
8368 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8369 (handle_tracepoint_general_set): Handle QTDisconnected.
8370
8371 * event-loop.c (event_handler_func): Change return type to int.
8372 (process_event): Bail out if the event handler wants the event
8373 loop to stop.
8374 (handle_file_event): Ditto.
8375 (start_event_loop): Bail out if the event handler wants the event
8376 loop to stop.
8377
8378 * nto-low.c (nto_target_ops): Adjust.
8379 * spu-low.c (spu_wait): Don't remove the process here.
8380 (spu_target_ops): Adjust.
8381 * win32-low.c (win32_wait): Don't remove the process here.
8382 (win32_target_ops): Adjust.
8383
5d267c4c
PA
83842010-04-11 Pedro Alves <pedro@codesourcery.com>
8385
8386 * regcache.c (realloc_register_cache): Invalidate inferior's
8387 regcache before recreating it.
8388
623ccd72
PA
83892010-04-09 Pedro Alves <pedro@codesourcery.com>
8390
8391 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8392
219f2f23
PA
83932010-04-09 Stan Shebs <stan@codesourcery.com>
8394 Pedro Alves <pedro@codesourcery.com>
8395
8396 * server.h (LONGEST): New.
8397 (struct thread_info) <while_stepping>: New field.
8398 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8399 Declare.
8400 (initialize_tracepoint, handle_tracepoint_general_set)
8401 (handle_tracepoint_query, tracepoint_finished_step)
8402 (tracepoint_was_hit, release_while_stepping_state_list):
8403 (current_traceframe): Declare.
8404 * server.c (handle_general_set): Handle tracepoint packets.
8405 (read_memory): New.
8406 (write_memory): New.
8407 (handle_search_memory_1): Use read_memory.
8408 (handle_query): Report support for conditional tracepoints, trace
8409 state variables, and tracepoint sources. Handle tracepoint
8410 queries.
8411 (main): Initialize the tracepoints module.
8412 (process_serial_event): Handle traceframe reads/writes.
8413
8414 * linux-low.c (handle_tracepoints): New.
8415 (linux_wait_1): Call it.
8416 (linux_resume_one_lwp): Handle while-stepping.
8417 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8418 (linux_target_ops): Install them.
8419 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8420 New field.
8421 * linux-x86-low.c (x86_supports_tracepoints): New.
8422 (the_low_target). Install it.
8423
8424 * mem-break.h (delete_breakpoint): Declare.
8425 * mem-break.c (delete_breakpoint): Make external.
8426
8427 * target.h (struct target_ops): Add `supports_tracepoints',
8428 `read_pc', and `write_pc' fields.
8429 (target_supports_tracepoints): Define.
8430 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8431 (phex_nz): New.
8432
8433 * regcache.h (struct regcache) <registers_owned>: New field.
8434 (init_register_cache, regcache_cpy): Declare.
8435 (regcache_read_pc, regcache_write_pc): Declare.
8436 (register_cache_size): Declare.
8437 (supply_regblock): Declare.
8438 * regcache.c (init_register_cache): New.
8439 (new_register_cache): Use it.
8440 (regcache_cpy): New.
8441 (register_cache_size): New.
8442 (supply_regblock): New.
8443 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 8444
219f2f23
PA
8445 * tracepoint.c: New.
8446
8447 * Makefile.in (OBS): Add tracepoint.o.
8448 (tracepoint.o): New rule.
8449
3a13a53b
L
84502010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8451
8452 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8453 (i386-mmx.o): New.
8454 (i386-mmx.c): Likewise.
8455 (i386-mmx-linux.o): Likewise.
8456 (i386-mmx-linux.c): Likewise.
8457
8458 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8459 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8460 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8461 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8462
8463 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8464 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8465 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8466
1570b33e
L
84672010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8468
8469 * Makefile.in (clean): Updated.
8470 (i386-avx.o): New.
8471 (i386-avx.c): Likewise.
8472 (i386-avx-linux.o): Likewise.
8473 (i386-avx-linux.c): Likewise.
8474 (amd64-avx.o): Likewise.
8475 (amd64-avx.c): Likewise.
8476 (amd64-avx-linux.o): Likewise.
8477 (amd64-avx-linux.c): Likewise.
8478
8479 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8480 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8481 (srv_amd64_regobj): Add amd64-avx.o.
8482 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8483 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8484 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8485 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8486 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8487 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8488 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8489
8490 * i387-fp.c: Include "i386-xstate.h".
8491 (i387_xsave): New.
8492 (i387_cache_to_xsave): Likewise.
8493 (i387_xsave_to_cache): Likewise.
8494 (x86_xcr0): Likewise.
8495
8496 * i387-fp.h (i387_cache_to_xsave): Likewise.
8497 (i387_xsave_to_cache): Likewise.
8498 (x86_xcr0): Likewise.
8499
8500 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8501 * linux-crisv32-low.c (target_regsets): Likewise.
8502 * linux-m68k-low.c (target_regsets): Likewise.
8503 * linux-mips-low.c (target_regsets): Likewise.
8504 * linux-ppc-low.c (target_regsets): Likewise.
8505 * linux-s390-low.c (target_regsets): Likewise.
8506 * linux-sh-low.c (target_regsets): Likewise.
8507 * linux-sparc-low.c (target_regsets): Likewise.
8508 * linux-xtensa-low.c (target_regsets): Likewise.
8509
8510 * linux-low.c: Include <sys/uio.h>.
8511 (regsets_fetch_inferior_registers): Support nt_type.
8512 (regsets_store_inferior_registers): Likewise.
8513 (linux_process_qsupported): New.
8514 (linux_target_ops): Add linux_process_qsupported.
8515
8516 * linux-low.h (regset_info): Add nt_type.
8517 (linux_target_ops): Add process_qsupported.
8518
8519 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8520 and <sys/uio.h>.
8521 (init_registers_i386_avx_linux): New.
8522 (init_registers_amd64_avx_linux): Likewise.
8523 (xmltarget_i386_linux_no_xml): Likewise.
8524 (xmltarget_amd64_linux_no_xml): Likewise.
8525 (PTRACE_GETREGSET): Likewise.
8526 (PTRACE_SETREGSET): Likewise.
8527 (x86_fill_xstateregset): Likewise.
8528 (x86_store_xstateregset): Likewise.
8529 (use_xml): Likewise.
8530 (x86_linux_update_xmltarget): Likewise.
8531 (x86_linux_process_qsupported): Likewise.
8532 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8533 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8534 init_registers_i386_linux here. Call
8535 x86_linux_update_xmltarget.
8536 (the_low_target): Add x86_linux_process_qsupported.
8537
8538 * server.c (handle_query): Call target_process_qsupported.
8539
8540 * target.h (target_ops): Add process_qsupported.
8541 (target_process_qsupported): New.
8542
fc7238bb
PA
85432010-04-03 Pedro Alves <pedro@codesourcery.com>
8544
8545 * inferiors.c (add_thread): Set last_status kind to
8546 TARGET_WAITKIND_IGNORE.
8547 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8548 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8549 (linux_wait_1): Move `thread' local definition to block that uses
8550 it. Don't NULL initialize `event_child'.
8551 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8552 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8553 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8554
bdabb078
PA
85552010-04-01 Pedro Alves <pedro@codesourcery.com>
8556
8557 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8558 an extended waitstatus, or by a watchpoint.
8559 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8560 thread was stepping or has been stopped by a watchpoint.
8561
d3bbe7a0
PA
85622010-04-01 Pedro Alves <pedro@codesourcery.com>
8563
8564 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8565 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8566 of another, then delete the previous, and validate all
8567 breakpoints.
8568 (validate_inserted_breakpoint): New.
8569 (delete_disabled_breakpoints): New.
8570 (validate_breakpoints): New.
8571 (check_mem_read): Validate breakpoints before trusting their
8572 shadow. Delete disabled breakpoints.
8573 (check_mem_write): Validate breakpoints before trusting they
8574 should be inserted. Delete disabled breakpoints.
8575 * mem-break.h (validate_breakpoints):
8576 * server.c (handle_query): Validate breakpoints when we see a
8577 qSymbol query.
8578
8b07ae33
PA
85792010-04-01 Pedro Alves <pedro@codesourcery.com>
8580
8581 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8582 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8583 if we could tell there's a GDB breakpoint at stop_pc.
8584 (need_step_over_p): Don't do a step over if we find a GDB
8585 breakpoint at the resume PC.
8586
8587 * mem-break.c (struct raw_breakpoint): New.
8588 (enum bkpt_type): New type `gdb_breakpoint'.
8589 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8590 fields. New field `raw'.
8591 (find_raw_breakpoint_at): New.
8592 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8593 breakpoint instead.
8594 (set_breakpoint_at): Adjust.
8595 (delete_raw_breakpoint): New.
8596 (release_breakpoint): New.
8597 (delete_breakpoint): Rename to...
8598 (delete_breakpoint_1): ... this. Add proc parameter. Use
8599 release_breakpoint. Return ENOENT.
8600 (delete_breakpoint): Reimplement.
8601 (find_breakpoint_at): Delete.
8602 (find_gdb_breakpoint_at): New.
8603 (delete_breakpoint_at): Delete.
8604 (set_gdb_breakpoint_at): New.
8605 (delete_gdb_breakpoint_at): New.
8606 (gdb_breakpoint_here): New.
8607 (set_reinsert_breakpoint): Use release_breakpoint.
8608 (uninsert_breakpoint): Rename to ...
8609 (uninsert_raw_breakpoint): ... this.
8610 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8611 (reinsert_raw_breakpoint): Change parameter type to
8612 raw_breakpoint.
8613 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8614 instead.
8615 (check_breakpoints): Adjust. Use release_breakpoint.
8616 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8617 (breakpoint_inserted_here): Ditto.
8618 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8619 Don't trust the breakpoint's shadow if it is not inserted.
8620 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8621 (delete_all_breakpoints): Adjust.
8622 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8623 use delete_breakpoint_1.
8624
8625 * mem-break.h (breakpoints_supported): Delete declaration.
8626 (set_gdb_breakpoint_at): Declare.
8627 (gdb_breakpoint_here): Declare.
8628 (delete_breakpoint_at): Delete.
8629 (delete_gdb_breakpoint_at): Declare.
8630
8631 * server.h (struct raw_breakpoint): Forward declare.
8632 (struct process_info): New field `raw_breakpoints'.
8633
8634 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8635 breakpoints.
8636
6bf5e0ba
PA
86372010-03-24 Pedro Alves <pedro@codesourcery.com>
8638
8639 * linux-low.c (status_pending_p_callback): Fix comment.
8640 (linux_wait_for_event_1): Move most of the internal breakpoint
8641 handling from here...
8642 (linux_wait_1): ... to here.
8643 (count_events_callback): New.
8644 (select_singlestep_lwp_callback): New.
8645 (select_event_lwp_callback): New.
8646 (cancel_breakpoints_callback): New.
8647 (select_event_lwp): New.
8648 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8649 priority to all LWPs that have had events that should be reported
8650 to the client. Cancel breakpoints when about to reporting the
8651 event to the client, not while stopping lwps. No longer cancel
8652 finished single-steps here.
8653 (cancel_finished_single_step): Delete.
8654 (cancel_finished_single_steps): Delete.
8655
414a389f
PA
86562010-03-24 Pedro Alves <pedro@codesourcery.com>
8657
8658 * mem-break.c (enum bkpt_type): New.
8659 (struct breakpoint): New field `type'.
8660 (set_breakpoint_at): Change return type to struct breakpoint
8661 pointer. Set type to `other_breakpoint' by default.
8662 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8663 in the breakpoint list.
8664 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8665 (reinsert_breakpoint): Rename to ...
8666 (reinsert_raw_breakpoint): ... this.
8667 (reinsert_breakpoints_at): Adjust.
8668 * mem-break.h (struct breakpoint): Declare.
8669 (set_breakpoint_at): Change return type to struct breakpoint
8670 pointer.
8671
2280c721
PA
86722010-03-24 Pedro Alves <pedro@codesourcery.com>
8673
8674 * server.c (handle_query): Assign, not compare.
8675
d50171e4
PA
86762010-03-24 Pedro Alves <pedro@codesourcery.com>
8677
8678 Teach linux gdbserver to step-over-breakpoints.
8679
8680 * linux-low.c (can_hardware_single_step): New.
8681 (supports_breakpoints): New.
8682 (handle_extended_wait): If stopping threads, read the stop pc of
8683 the new cloned LWP.
8684 (get_pc): New.
8685 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8686 low target doesn't support retrieving the PC.
8687 (add_lwp): Set last_resume_kind to resume_continue.
8688 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8689 (linux_attach): Don't clear stop_expected. Set the lwp's
8690 last_resume_kind to resume_stop.
8691 (linux_detach_one_lwp): Don't check for removed breakpoints.
8692 (check_removed_breakpoint): Delete.
8693 (status_pending_p): Rename to ...
8694 (status_pending_p_callback): ... this. Don't check for removed
8695 breakpoints. Don't consider threads that are stopped from GDB's
8696 perspective.
8697 (linux_wait_for_lwp): Always read the stop_pc here.
8698 (cancel_breakpoint): New.
8699 (step_over_bkpt): New global.
8700 (linux_wait_for_event_1): Implement stepping over breakpoints.
8701 (gdb_wants_lwp_stopped): New.
8702 (gdb_wants_all_stopped): New.
8703 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8704 single-step traps here. Store the thread's last reported target
8705 wait status.
8706 (send_sigstop): Don't clear stop_expected. Always set it,
8707 instead.
8708 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8709 (cancel_finished_single_step): New.
8710 (cancel_finished_single_steps): New.
8711 (wait_for_sigstop): Don't cancel finished single-step traps here.
8712 (linux_resume_one_lwp): Don't check for removed breakpoints.
8713 Don't set `step' on non-hardware step archs.
8714 (linux_set_resume_request): Ignore resume_stop requests if already
8715 stopping or stopped. Set the lwp's last_resume_kind.
8716 (resume_status_pending_p): Don't check for removed breakpoints.
8717 (need_step_over_p): New.
8718 (start_step_over): New.
8719 (finish_step_over): New.
8720 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8721 requests. Clear the thread's last reported target waitstatus.
8722 Don't use the `suspended' flag. Don't consider pending breakpoints.
8723 (linux_resume): Start a step-over if necessary.
8724 (proceed_one_lwp): New.
8725 (proceed_all_lwps): New.
8726 (unstop_all_lwps): New.
8727 * linux-low.h (struct lwp_info): Rewrite comment for the
8728 `suspended' flag. Add the `stop_pc' field. Delete the
8729 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8730 Add `'last_resume_kind' and `need_step_over' fields.
8731 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8732 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8733 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8734 (set_raw_breakpoint_at): New.
8735 (set_breakpoint_at): Rewrite to use it.
8736 (reinsert_breakpoint_handler): Delete.
8737 (set_reinsert_breakpoint): New.
8738 (reinsert_breakpoint_by_bp): Delete.
8739 (delete_reinsert_breakpoints): New.
8740 (uninsert_breakpoint): Rewrite.
8741 (uninsert_breakpoints_at): New.
8742 (reinsert_breakpoint): Rewrite.
8743 (reinsert_breakpoints_at): New.
8744 (check_breakpoints): Rewrite.
8745 (breakpoint_here): New.
8746 (breakpoint_inserted_here): New.
8747 (check_mem_read): Adjust.
8748 * mem-break.h (breakpoints_supported, breakpoint_here)
8749 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8750 (reinsert_breakpoint_by_bp): Delete declaration.
8751 (delete_reinsert_breakpoints): Declare.
8752 (reinsert_breakpoint): Delete declaration.
8753 (reinsert_breakpoints_at): Declare.
8754 (uninsert_breakpoint): Delete declaration.
8755 (uninsert_breakpoints_at): Declare.
8756 (check_breakpoints): Adjust prototype.
8757 * server.h: Adjust include order.
8758 (struct thread_info): Declare here. Add a `last_status' field.
8759
30ba68cb
MS
87602010-03-23 Michael Snyder <msnyder@vmware.com>
8761
8762 * server.c (crc32): New function.
8763 (handle_query): Add handling for 'qCRC:' request.
8764
b9a881c2
PA
87652010-03-23 Pedro Alves <pedro@codesourcery.com>
8766
8767 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8768 lwp had been stopped by a watchpoint.
8769
e92d13d5
PA
87702010-03-16 Pedro Alves <pedro@codesourcery.com>
8771
8772 * server.h (internal_error): Declare.
8773 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8774 * utils.c (internal_error): New function.
8775
64daa791
AS
87762010-03-15 Andreas Schwab <schwab@redhat.com>
8777
8778 * configure.srv: Fix typo setting srv_regobj.
8779
f52cd8cd
PA
87802010-03-15 Pedro Alves <pedro@codesourcery.com>
8781
8782 * linux-low.c (fetch_register): Avoid passing a non string literal
8783 format to `error'.
8784 (usr_store_inferior_registers): Ditto.
8785
93ae6fdc
PA
87862010-03-14 Pedro Alves <pedro@codesourcery.com>
8787
8788 * linux-low.c (linux_write_memory): Bail out early if peeking
8789 memory failed.
8790
c3adc08c
PA
87912010-03-14 Pedro Alves <pedro@codesourcery.com>
8792
8793 * linux-low.h (struct lwp_info): New fields
8794 `stopped_by_watchpoint' and `stopped_data_address'.
8795 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8796 here, and cache them in the lwp object.
8797 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8798 directly.
8799 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8800 field.
8801 (linux_stopped_by_watchpoint): Rewrite.
8802 (linux_stopped_data_address): Rewrite.
8803
bce522a2
PA
88042010-03-06 Simo Melenius <simo.melenius@iki.fi>
8805
8806 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8807 switching the current inferior, not before.
8808
90884b2b
L
88092010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8810
8811 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8812 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8813 i386-linux.c and amd64-linux.c.
8814 (reg-i386.o): Removed.
8815 (reg-i386.c): Likewise.
8816 (reg-i386-linux.o): Likewise.
8817 (reg-i386-linux.c): Likewise.
8818 (reg-x86-64.o): Likewise.
8819 (reg-x86-64.c): Likewise.
8820 (reg-x86-64-linux.o): Likewise.
8821 (reg-x86-64-linux.c): Likewise.
8822 (i386.o): New.
8823 (i386.c): Likewise.
8824 (i386-linux.o): Likewise.
8825 (i386-linux.c): Likewise.
8826 (amd64.o): Likewise.
8827 (amd64.c): Likewise.
8828 (amd64-linux.o): Likewise.
8829 (amd64-linux.c): Likewise.
8830
8831 * configure.srv (srv_i386_regobj): New.
8832 (srv_i386_linux_regobj): Likewise.
8833 (srv_amd64_regobj): Likewise.
8834 (srv_amd64_linux_regobj): Likewise.
8835 (srv_i386_32bit_xmlfiles): Likewise.
8836 (srv_i386_64bit_xmlfiles): Likewise.
8837 (srv_i386_xmlfiles): Likewise.
8838 (srv_amd64_xmlfiles): Likewise.
8839 (srv_i386_linux_xmlfiles): Likewise.
8840 (srv_amd64_linux_xmlfiles): Likewise.
8841 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8842 srv_xmlfiles to $srv_i386_xmlfiles.
8843 (i[34567]86-*-mingw32ce*): Likewise.
8844 (i[34567]86-*-mingw*): Likewise.
8845 (i[34567]86-*-nto*): Likewise.
8846 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8847 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8848 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8849 (x86_64-*-linux*): Likewise.
8850
8851 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8852 (init_registers_amd64_linux): New.
8853 (x86_arch_setup): Replace init_registers_x86_64_linux with
8854 init_registers_amd64_linux.
8855
193f13e6
MK
88562010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8857
8858 * configure.ac: Check for libdl. If it is not available link against
8859 static libthread_db.
8860 * configure: Regenerate.
8861
85d721b8
PA
88622010-02-22 Pedro Alves <pedro@codesourcery.com>
8863
8864 PR9605
8865
8866 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8867 handing a read watchpoint.
8868 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8869
6076632b
DE
88702010-02-12 Doug Evans <dje@google.com>
8871
8872 * linux-low.c (linux_supports_tracefork_flag): Document.
8873 (linux_look_up_symbols): Add comment.
8874
3327ccf7
L
88752010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8876
8877 * regcache.c (supply_register): Clear regcache if buf is NULL.
8878
0718675c 88792010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 8880 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
8881
8882 * inferiors.c (find_inferior): Add function documentation.
8883 (unloaded_dll): Handle the case where the unloaded dll has not
8884 been previously registered in the dll list.
8885
177321bd
DJ
88862010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8887
8888 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8889 (thumb2_breakpoint): New.
8890 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8891
2b009048
DJ
88922010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8893
8894 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8895 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8896 breakpoints.
8897
3be029c7
PA
88982010-01-21 Pedro Alves <pedro@codesourcery.com>
8899
8900 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8901
18f5de3b
JK
89022010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8903
8904 * linux-s390-low.c (s390_collect_ptrace_register)
8905 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8906
3743bb4f
DE
89072010-01-21 Doug Evans <dje@google.com>
8908
14ce3065
DE
8909 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8910 (PTRACE_ARG4_TYPE): New macro.
8911 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8912 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8913 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8914 (usr_store_inferior_registers): Ditto.
8915 (linux_read_memory, linux_write_memory): Ditto.
8916 (linux_test_for_tracefork): Ditto.
8917
3743bb4f
DE
8918 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8919 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8920
8b315be5
PA
89212010-01-21 Pedro Alves <pedro@codesourcery.com>
8922
8923 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8924 target.
8925
85492558
PA
89262010-01-21 Pedro Alves <pedro@codesourcery.com>
8927
8928 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8929 prototype to take a regcache. Adjust.
8930
442ea881
PA
89312010-01-20 Pedro Alves <pedro@codesourcery.com>
8932
8933 * regcache.h (struct thread_info): Forward declare.
8934 (struct regcache): New.
8935 (new_register_cache): Adjust prototype.
8936 (get_thread_regcache): Declare.
8937 (free_register_cache): Adjust prototype.
8938 (registers_to_string, registers_from_string): Ditto.
8939 (supply_register, supply_register_by_name, collect_register)
8940 (collect_register_as_string, collect_register_by_name): Ditto.
8941 * regcache.c (struct inferior_regcache_data): Delete.
8942 (get_regcache): Rename to ...
8943 (get_thread_regcache): ... this. Adjust. Switch inferior before
8944 fetching registers.
8945 (regcache_invalidate_one): Adjust.
8946 (regcache_invalidate): Fix prototype.
8947 (new_register_cache): Return the new register cache.
8948 (free_register_cache): Change prototype.
8949 (realloc_register_cache): Adjust.
8950 (registers_to_string): Change prototype to take a regcache. Adjust.
8951 (registers_from_string): Ditto.
8952 (register_data): Ditto.
8953 (supply_register): Ditto.
8954 (supply_register_by_name): Ditto.
8955 (collect_register): Ditto.
8956 (collect_register_as_string): Ditto.
8957 (collect_register_by_name): Ditto.
8958 * server.c (process_serial_event): Adjust.
8959 * linux-low.h (regset_fill_func, regset_store_func): Change
8960 prototype.
8961 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8962 Change prototype.
8963 * linux-low.c (get_stop_pc): Adjust.
8964 (check_removed_breakpoint): Adjust.
8965 (linux_wait_for_event): Adjust.
8966 (linux_resume_one_lwp): Adjust.
8967 (fetch_register): Add regcache parameter. Adjust.
8968 (usr_store_inferior_registers): Ditto.
8969 (regsets_fetch_inferior_registers): Ditto.
8970 (regsets_store_inferior_registers): Ditto.
8971 (linux_fetch_registers, linux_store_registers): Ditto.
8972 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8973 regcache. Adjust.
43aaf8b6
PA
8974 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8975 Ditto.
442ea881
PA
8976 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8977 prototype to take a regcache.
8978 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8979 * remote-utils.c (convert_ascii_to_int, outreg)
8980 (prepare_resume_reply): Change prototype to take a regcache.
8981 Adjust.
8982 * target.h (struct target_ops) <fetch_registers, store_registers>:
8983 Change prototype to take a regcache.
8984 (fetch_inferior_registers, store_inferior_registers): Change
8985 prototype to take a regcache. Adjust.
8986 * proc-service.c (ps_lgetregs): Adjust.
8987 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8988 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8989 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8990 take a regcache. Adjust.
8991 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8992 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8993 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8994 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8995 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8996 (cris_cannot_fetch_register):
8997 (cris_breakpoint_at): Change prototype to take a regcache.
8998 Adjust.
8999 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9000 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9001 to take a regcache. Adjust.
9002 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9003 Adjust.
9004 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9005 take a regcache. Adjust.
9006 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9007 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9008 (m68k_set_pc): Change prototype to take a regcache. Adjust.
9009 * linux-mips-low.c (mips_get_pc):
9010 (mips_set_pc): Change prototype to take a regcache. Adjust.
9011 (mips_reinsert_addr): Adjust.
9012 (mips_collect_register): Change prototype to take a regcache.
9013 Adjust.
9014 (mips_supply_register):
9015 (mips_collect_register_32bit, mips_supply_register_32bit)
9016 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9017 (mips_store_fpregset): Ditto.
43aaf8b6
PA
9018 * linux-ppc-low.c (ppc_supply_ptrace_register)
9019 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
9020 (parse_spufs_run): Adjust.
9021 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9022 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9023 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9024 take a regcache. Adjust.
9025 * linux-s390-low.c (s390_collect_ptrace_register)
9026 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9027 (s390_set_pc): Change prototype to take a regcache. Adjust.
9028 (s390_arch_setup): Adjust.
9029 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9030 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
9031 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9032 (sparc_fill_gregset, sparc_store_gregset_from_stack)
9033 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9034 regcache. Adjust.
9035 (sparc_breakpoint_at): Adjust.
9036 * linux-xtensa-low.c (xtensa_fill_gregset):
9037 (xtensa_store_gregset):
9038 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9039 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
9040 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9041 prototype to take a regcache. Adjust.
9042 * win32-arm-low.c (arm_fetch_inferior_register)
9043 (arm_store_inferior_register): Change prototype to take a
9044 regcache. Adjust.
9045 * win32-i386-low.c (i386_fetch_inferior_register)
9046 (i386_store_inferior_register): Change prototype to take a
9047 regcache. Adjust.
9048 * win32-low.c (child_fetch_inferior_registers)
9049 (child_store_inferior_registers): Change prototype to take a
9050 regcache. Adjust.
9051 (win32_wait): Adjust.
9052 (win32_fetch_inferior_registers): Change prototype to take a
9053 regcache. Adjust.
9054 (win32_store_inferior_registers): Adjust.
9055 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9056 store_inferior_register>: Change prototype to take a regcache.
9057
60c3d7b0
DE
90582010-01-20 Doug Evans <dje@google.com>
9059
9060 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9061 #ifdef.
9062 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 9063 (W_STOPCODE): Provide definition if missing.
60c3d7b0 9064
dc146f7c
VP
90652010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9066
9067 * linux-low.c (linux_core_of_thread): New.
9068 (compare_ints, show_process, list_threads): New.
9069 (linux_qxfer_osdata): Report threads and cores.
9070 (linux_target_op): Register linux_core_of_thread.
9071 * remote-utils.c (prepare_resume_reply): Report the core.
9072 (buffer_xml_printf): Support %d specifier.
9073 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9074 New.
9075 (handle_query): Handle qXfer:threads. Announce availability
9076 thereof.
9077 * target.h (struct target_ops): New field core_of_thread.
9078
7803799a
UW
90792010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9080
9081 * Makefile.in (clean): Remove new generated files.
9082 (reg-s390.o, reg-s390.c): Remove rules.
9083 (reg-s390x.o, reg-s390x.c): Likewise.
9084 (s390-linux32.o, s390-linux32.c): Add rules.
9085 (s390-linux64.o, s390-linux64.c): Likewise.
9086 (s390x-linux64.o, s390x-linux64.c): Likewise.
9087 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9088 * linux-s390-low.c: Include <elf.h>.
9089 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9090 (init_registers_s390): Remove prototype.
9091 (init_registers_s390x): Likewise.
9092 (init_registers_s390_linux32): Add prototype.
9093 (init_registers_s390_linux64): Likewise.
9094 (init_registers_s390x_linux64): Likewise.
9095 (s390_num_regs_3264): New define.
9096 (s390_regmap_3264): New global variable.
9097 (s390_cannot_fetch_register): Remove obsolete check.
9098 (s390_cannot_store_register): Likewise.
9099 (s390_collect_ptrace_register): Handle upper/lower register halves.
9100 (s390_supply_ptrace_register): Likewise.
9101 (s390_fill_gregset): Update to register number changes.
9102 (s390_get_hwcap): New routine.
9103 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9104 Install appropriate regmap and register set.
9105
6e7ffa39
JB
91062010-01-01 Joel Brobecker <brobecker@adacore.com>
9107
9108 * server.c (gdbserver_version): Update copyright year to 2010.
9109 * gdbreplay.c (gdbreplay_version): Likewise.
9110
957f3f49
DE
91112009-12-28 Doug Evans <dje@google.com>
9112
9113 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9114 elf/external.h. Include <elf.h> instead but only if necessary.
9115
ca5c370d
PA
91162009-12-28 Pedro Alves <pedro@codesourcery.com>
9117
9118 * linux-low.c (linux_remove_process): Remove `detaching'
9119 parameter. Don't release/detach from thread_db here.
9120 (linux_kill): Release/detach from thread_db here, ...
9121 (linux_detach): ... and here, before actually detaching.
9122 (linux_wait_1): ... and here, when a process exits.
9123 * thread-db.c (any_thread_of): New.
9124 (thread_db_free): Switch the current inferior to a thread of the
9125 passed in process.
9126
4ee62156
DE
91272009-12-21 Doug Evans <dje@google.com>
9128
d90e6a88
DE
9129 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9130
c5f62d5f
DE
9131 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9132 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9133 warning ifndef __NR_tkill. Move setting of errno there too.
9134 Delete unnecessary resetting of errno after syscall.
9135 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9136
10e86dd7
DE
9137 * configure.ac: Check for dladdr.
9138 * config.in: Regenerate.
9139 * configure: Regenerate.
9140 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9141 (try_thread_db_load): Update.
9142
4ee62156
DE
9143 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9144
00f515da
DE
91452009-12-18 Doug Evans <dje@google.com>
9146
e9464885
DE
9147 * event-loop.c: Include unistd.h if it exists.
9148
07d4f67e
DE
9149 * linux-low.c (my_waitpid): Move definition away from being in
9150 between linux_tracefork_child/linux_test_for_tracefork.
9151
00f515da
DE
9152 * gdb_proc_service.h (psaddr_t): Fix type.
9153 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9154 signature to match glibc.
9155
1de1badb
DE
91562009-12-16 Doug Evans <dje@google.com>
9157
9158 * linux-low.c (linux_read_memory): Fix argument to read.
9159
aeeb81d1
PA
91602009-11-26 Pedro Alves <pedro@codesourcery.com>
9161
9162 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9163 events, don't leave current_inferior pointing at null.
9164
10357975
PA
91652009-11-26 Pedro Alves <pedro@codesourcery.com>
9166
9167 * win32-low.c (LOG): Delete.
9168 (OUTMSG): Output to stderr.
9169 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9170 on compile time LOG macro.
9171 (win32_wait): Fix debug output.
9172
cf6e3471
PA
91732009-11-26 Pedro Alves <pedro@codesourcery.com>
9174
9175 * win32-low.c (win32_add_one_solib): If the dll name is
9176 "ntdll.dll", prepend the system directory to the dll path.
9177
0c85e18e
MK
91782009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9179
9180 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9181
9ac544ce 91822009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 9183 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
9184
9185 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9186 * configure.ac: Check for __mcoldfire__ and set
9187 gdb_cv_m68k_is_coldfire.
9188 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9189 reg-cf.o and reg-m68k.o.
9190 * configure: Regenerated.
9191
fd7dd3e6
PA
91922009-11-16 Pedro Alves <pedro@codesourcery.com>
9193
9194 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9195 Pass it to thread_db_free.
9196 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9197 proper `detaching' argument to linux_remove_process.
9198 * linux-low.h (thread_db_free): Add `detaching' parameter.
9199 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9200 to thread_db_free.
9201 (thread_db_free): Add `detaching' parameter. Only
9202 call td_ta_clear_event if detaching from process.
9203
75aa492e
MK
92042009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9205
9206 * thread-db.c (thread_db_free): Fix typo.
9207
21e1bee4
PP
92082009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9209
9210 PR gdb/10838
9211 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9212
8838b45e
NS
92132009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9214
9215 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9216 with an i686 compiler.
9217 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9218 needed.
9219 * configure: Rebuilt.
9220
8a35fb51
SL
92212009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9222
9223 PR gdb/10783
9224
9225 * server.c (handle_search_memory_1): Correct read_addr initialization
9226 in loop for searching subsequent chunks.
9227
96f15937
PP
92282009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9229
9230 * configure.ac: New --with-libthread-db option.
9231 * thread-db.c: Allow direct dependence on libthread_db.
9232 (thread_db_free): Adjust.
9233 * config.in: Regenerate.
9234 * configure: Likewise.
889bf7c5 9235
5f7d1694
PP
92362009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9237
9238 PR gdb/10757
9239 * thread-db.c (attach_thread): New function.
9240 (maybe_attach_thread): Return success/failure.
9241 (find_new_threads_callback): Adjust.
889bf7c5
PA
9242 (thread_db_find_new_threads): Loop until no new threads.
9243
88e3b899
PA
92442009-10-13 Pedro Alves <pedro@codesourcery.com>
9245
9246 * proc-service.c (ps_lgetregs): Formatting.
9247
cdbfd419
PP
92482009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9249
9250 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9251 * configure.ac: Adjust.
9252 * linux-low.h (struct process_info_private): Move members to struct
9253 thread_db.
9254 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9255 * linux-low.c (linux_remove_process): Adjust.
9256 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9257 * server.c (handle_query): Move code ...
9258 (handle_monitor_command): ... here. New function.
9259 * target.h (struct target_ops): New member.
9260 * thread-db.c (struct thread_db): New.
9261 (libthread_db_search_path): New variable.
9262 (thread_db_create_event, thread_db_enable_reporting)
9263 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9264 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9265 (try_thread_db_load_1, dladdr_to_soname): New functions.
9266 (try_thread_db_load, thread_db_load_search): New functions.
9267 (thread_db_init): Search for libthread_db.
9268 (thread_db_free): New function.
9269 (thread_db_handle_monitor_command): Likewise.
9270 * config.in: Regenerate.
9271 * configure: Regenerate.
889bf7c5 9272
4168d2d6
UW
92732009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9274
9275 * spu-low.c (spu_kill): Wait for inferior to terminate.
9276 Call clear_inferiors.
9277 (spu_detach): Call clear_inferiors.
9278
81ecdfbb
RW
92792009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9280
9281 * aclocal.m4: Regenerate.
9282 * config.in: Likewise.
9283 * configure: Likewise.
9284
0b9ff2c0
UW
92852009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9286
9287 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9288 (parse_spufs_run): New function.
9289 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9290 (ppc_breakpoint_at): Handle SPU breakpoints.
9291
efcbbd14
UW
92922009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9293
9294 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9295 (SPUFS_MAGIC): Define.
9296 (spu_enumerate_spu_ids): New function.
9297 (linux_qxfer_spu): New function.
9298 (linux_target_ops): Install linux_qxfer_spu.
9299
f4d9bade
UW
93002009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9301
9302 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9303 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9304 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9305 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9306 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9307 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9308 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9309 (init_registers_powerpc_cell32l): Add prototype.
9310 (init_registers_powerpc_cell64l): Likewise.
9311 (ppc_arch_setup): Detect Cell/B.E. architecture.
9312
96e946ca
RW
93132009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9314
9315 * Makefile.in (datarootdir): New variable.
9316
58d6951d
DJ
93172009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9318
9319 * linux-low.c (linux_write_memory): Update debugging output.
9320 * Makefile.in (clean): Add new descriptions.
9321 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9322 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9323 * configure.srv: Add new files for arm*-*-linux*.
9324 * linux-arm-low.c: Add new declarations.
9325 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9326 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9327 (HWCAP_VFPv3D16): New.
9328 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9329 instead of __IWMMXT__.
9330 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9331 (arm_arch_setup): New.
9332 (target_regsets): Remove #ifdef. Add VFP regset.
9333 (the_low_target): Use arm_arch_setup.
9334
12b42a12
DJ
93352009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9336
9337 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9338 the main thread again.
9339
ac8c974e
AR
93402009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9341
9342 Adding Neutrino gdbserver.
9343 * configure: Regenerated.
9344 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9345 * configure.srv (i[34567]86-*-nto*): New target.
9346 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9347 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9348 (nto_comctrl) [__QNX__]: New function.
9349 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9350
4424e0c3 93512009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
9352
9353 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9354 srv_tgtobj.
9355
912cf4ba
PA
93562009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9357 Pedro Alves <pedro@codesourcery.com>
9358
9359 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9360 don't support CONTEXT_EXTENDED_REGISTERS.
9361 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9362 (the_low_target): Install them.
9363 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9364 failing with ERROR_PIPE_NOT_CONNECTED.
9365
aa5ca48f
DE
93662009-06-30 Doug Evans <dje@google.com>
9367 Pierre Muller <muller@ics.u-strasbg.fr>
9368
9369 Add h/w watchpoint support to x86-linux, win32-i386.
9370 * Makefile.in (SFILES): Add i386-low.c
9371 (i386_low_h): Define.
9372 (i386-low.o): Add dependencies.
9373 (linux-x86-low.o): Add i386-low.h dependency.
9374 (win32-i386-low.o): Ditto.
9375 * i386-low.c: New file.
9376 * i386-low.h: New file.
9377 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9378 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9379 * linux-low.c (linux_add_process): Initialize arch_private.
9380 (linux_remove_process): Free arch_private.
9381 (add_lwp): Initialize arch_private.
9382 (delete_lwp): Free arch_private.
9383 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9384 provided.
9385 * linux-low.h (process_info_private): New member arch_private.
9386 (lwp_info): New member arch_private.
9387 (linux_target_ops): New members new_process, new_thread,
9388 prepare_to_resume.
9389 (ptid_of): New macro.
9390 * linux-x86-low.c: Include stddef.h, i386-low.h.
9391 (arch_process_info): New struct.
9392 (arch_lwp_info): New struct.
9393 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9394 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9395 (i386_dr_low_get_status): New function.
9396 (x86_insert_point, x86_remove_point): New functions.
9397 (x86_stopped_by_watchpoint): New function.
9398 (x86_stopped_data_address): New function.
9399 (x86_linux_new_process, x86_linux_new_thread): New functions.
9400 (x86_linux_prepare_to_resume): New function.
9401 (the_low_target): Add entries for insert_point, remove_point,
9402 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9403 prepare_to_resume.
9404 * server.c (debug_hw_points): New global.
9405 (monitor_show_help): Document set debug-hw-points.
9406 (handle_query): Process "set debug-hw-points".
9407 * server.h (debug_hw_points): Declare.
9408 (paddress): Declare.
9409 * utils.c (NUMCELLS, CELLSIZE): New macros.
9410 (get_sell, xsnprintf, paddress): New functions.
9411 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9412 remove_point, stopped_by_watchpoint, stopped_data_address.
9413 * win32-i386-low.c: Include i386-low.h.
9414 (debug_reg_state): Replaces dr.
9415 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9416 (i386_dr_low_get_status): New function.
9417 (i386_insert_point, i386_remove_point): New functions.
9418 (i386_stopped_by_watchpoint): New function.
9419 (i386_stopped_data_address): New function.
9420 (i386_initial_stuff): Update.
9421 (get_thread_context,set_thread_context,i386_thread_added): Update.
9422 (the_low_target): Add entries for insert_point,
9423 remove_point, stopped_by_watchpoint, stopped_data_address.
9424 * win32-low.c (win32_insert_watchpoint): New function.
9425 (win32_remove_watchpoint): New function.
9426 (win32_stopped_by_watchpoint): New function.
9427 (win32_stopped_data_address): New function.
9428 (win32_target_ops): Add entries for insert_watchpoint,
9429 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9430 * win32-low.h (win32_target_ops): New members insert_point,
9431 remove_point, stopped_by_watchpoint, stopped_data_address.
9432
d993e290
PA
94332009-06-25 Pedro Alves <pedro@codesourcery.com>
9434
9435 * server.c (process_serial_event): Re-return unsupported, not
9436 error, if the type isn't recognized. Re-allow supporting only
9437 insert or remove packets. Also call require_running for
9438 breakpoints. Add missing break statement to default case. Tidy.
9439 * target.h (struct target_ops): Rename insert_watchpoint to
9440 insert_point, and remove_watchpoint to remove_point.
9441
9442 * linux-low.h (struct linux_target_ops): Likewise.
9443 * linux-low.c (linux_insert_watchpoint): Rename to ...
9444 (linux_insert_point): ... this. Adjust.
9445 (linux_remove_watchpoint): Rename to ...
9446 (linux_remove_point): ... this. Adjust.
9447 (linux_target_ops): Adjust.
9448 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9449 (cris_insert_point): ... this.
9450 (cris_remove_watchpoint): Rename to ...
9451 (cris_remove_point): ... this.
9452 (the_low_target): Adjust.
9453
0f54c268
PM
94542009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9455
9456 * server.c (handle_v_kill): Pass signal_pid to
9457 kill_inferior if multi_process is zero.
9458
c6314022
AR
94592009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9460
9461 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9462 * target.h (target_ops): Comment for *_watchpoint to make it clear
9463 the functions can get types '0' and '1'.
9464
4463ce24
AR
94652009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9466
9467 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9468 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9469 * regcache.c (get_regcache): Likewise.
9470 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9471 * win32-low.c (child_fetch_inferior_registers): Remove check for
9472 regno 0.
9473
cf8fd78b
PA
94742009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9475 Pedro Alves <pedro@codesourcery.com>
9476
9477 * target.h (struct target_ops) <supports_multi_process>: New
9478 callback.
9479 (target_supports_multi_process): New.
9480 * server.c (handle_query): Even if GDB reports support, only
9481 enable multi-process if the target also supports it. Report
9482 multi-process support only if the target backend supports it.
9483 * linux-low.c (linux_supports_multi_process): New function.
9484 (linux_target_ops): Install it as target_supports_multi_process
9485 callback.
9486
47c0c975
DE
94872009-05-24 Doug Evans <dje@google.com>
9488
e09875d4
DE
9489 Global renaming of find_thread_pid to find_thread_ptid.
9490 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9491 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9492 All callers updated.
9493
e27d73f6
DE
9494 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9495 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9496 directly.
9497
47c0c975
DE
9498 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9499 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9500 (linux_resume_one_lwp): Ditto.
9501
2acc282a
DE
95022009-05-23 Doug Evans <dje@google.com>
9503
9504 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9505 from struct inferior_list_entry * to struct lwp_info *.
9506 All callers updated.
9507
9f1036c1
DE
95082009-05-13 Doug Evans <dje@google.com>
9509
9510 * linux-x86-low.c: Don't include assert.h.
9511 (x86_siginfo_fixup): Use fatal, not assert.
9512 (x86_arch_setup): Fix comment.
9513
d0722149
DE
95142009-05-12 Doug Evans <dje@google.com>
9515
9516 Biarch support for i386/amd64 gdbserver.
9517 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9518 Add linux-x86-low.c.
9519 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9520 (linux-x86-low.o): Add.
9521 * linux-x86-64-low.c: Delete.
9522 * linux-i386-low.c: Delete.
9523 * linux-x86-low.c: New file.
9524 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9525 linux-x86-low.o.
9526 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9527 linux-x86-low.o.
9528 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9529 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9530 (linux_child_pid_to_exec_file): New function.
9531 (elf_64_header_p, elf_64_file_p): New functions.
9532 (siginfo_fixup): New function.
9533 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9534 give target a chance to convert layout.
9535 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9536 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9537
fdeb2a12
DE
95382009-05-07 Doug Evans <dje@google.com>
9539
9540 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9541 (regsets_store_inferior_registers): Ditto.
9542
a6dbe5df
PA
95432009-05-06 Pedro Alves <pedro@codesourcery.com>
9544
9545 PR server/10048
9546
9547 * linux-low.c (must_set_ptrace_flags): Delete.
9548 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9549 of the global.
9550 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9551 `lwp->must_set_ptrace_flags' instead.
ba42693b 9552 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
9553 (linux_wait_1): ... not here.
9554
5091eb23
DE
95552009-04-30 Doug Evans <dje@google.com>
9556
9f767825
DE
9557 * inferiors.c (started_inferior_callback): New function.
9558 (attached_inferior_callback): New function.
9559 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9560 * server.c (print_started_pid, print_attached_pid): New functions.
9561 (detach_or_kill_for_exit): New function.
9562 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9563 * server.h (have_started_inferiors_p): Declare.
9564 (have_attached_inferiors_p): Declare.
9565
5091eb23
DE
9566 * inferiors.c (remove_process): Fix memory leak, free process.
9567 * linux-low.c (linux_remove_process): New function.
9568 (linux_kill): Call it instead of remove_process.
9569 (linux_detach, linux_wait_1): Ditto.
9570
155c8968
PA
95712009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9572
9573 * configure.srv: Add x86 Windows CE target.
9574
7fe519cb
UW
95752009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9576
9577 * inferiors.c (get_thread_process): Make global.
9578 * server.h (get_thread_process): Add prototype.
9579 * thread-db.c (find_one_thread): Use get_thread_process
9580 instead of current_process.
9581 (thread_db_get_tls_address): Do not crash if called when
9582 thread layer is not yet initialized.
9583
5472f405
UW
95842009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9585
9586 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9587 * spu-low.c (current_tid): Rename to ...
9588 (current_ptid): ... this.
9589 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9590 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9591 ptid_get_lwp (current_ptid) instead of current_tid.
9592 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9593 instead of current_tid. Use find_process_pid to verify pid
9594 argument is valid. Pass proper argument to remove_process.
9595 (spu_thread_alive): Compare current_ptid instead of current_tid.
9596 (spu_resume): Likewise.
9597
55ac2b99
PA
95982009-04-02 Pedro Alves <pedro@codesourcery.com>
9599
9600 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9601 variable.
9602
95954743
PA
96032009-04-01 Pedro Alves <pedro@codesourcery.com>
9604
9605 Implement the multiprocess extensions, and add linux multiprocess
9606 support.
9607
9608 * server.h (ULONGEST): Declare.
9609 (struct ptid, ptid_t): New.
9610 (minus_one_ptid, null_ptid): Declare.
9611 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9612 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9613 (struct inferior_list_entry): Change `id' type from unsigned from
9614 to ptid_t.
9615 (struct sym_cache, struct breakpoint, struct
9616 process_info_private): Forward declare.
9617 (struct process_info): Declare.
9618 (current_process): Declare.
9619 (all_processes): Declare.
9620 (initialize_inferiors): Declare.
9621 (add_thread): Adjust to use ptid_t.
9622 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9623 (add_process, remove_process, find_thread_pid): Declare.
9624 (find_inferior_id): Adjust to use ptid_t.
9625 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9626 (multi_process): Declare.
9627 (push_event): Adjust to use ptid_t.
9628 (read_ptid, write_ptid): Declare.
9629 (prepare_resume_reply): Adjust to use ptid_t.
9630 (clear_symbol_cache): Declare.
9631 * inferiors.c (all_processes): New.
9632 (null_ptid, minus_one_ptid): New.
9633 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9634 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9635 (add_thread): Change unsigned long to ptid. Remove gdb_id
9636 parameter. Adjust.
9637 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9638 (gdb_id_to_thread): Rename to ...
9639 (find_thread_pid): ... this. Change unsigned long to ptid.
9640 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9641 (loaded_dll, pull_pid_from_list): Adjust.
9642 (add_process, remove_process, find_process_pid)
9643 (get_thread_process, current_process, initialize_inferiors): New.
9644 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9645 (struct target_waitstatus) <related_pid>: Ditto.
9646 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9647 return type to int.
9648 (struct target_ops) <join>: Add `pid' argument.
9649 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9650 (struct target_ops) <wait>: Add `ptid' field. Change return type
9651 to ptid.
9652 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9653 (mywait): Add `ptid' argument. Change return type to ptid_t.
9654 (target_pid_to_str): Declare.
9655 * target.c (set_desired_inferior): Adjust to use ptids.
9656 (mywait): Add new `ptid' argument. Adjust.
9657 (target_pid_to_str): New.
9658 * mem-break.h (free_all_breakpoints): Declare.
9659 * mem-break.c (breakpoints): Delelete.
9660 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9661 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9662 to use per-process breakpoint list.
9663 (free_all_breakpoints): New.
9664 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9665 (symbol_cache, all_symbols_looked_up): Delete.
9666 (hexchars): New.
9667 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9668 read_ptid): New.
9669 (prepare_resume_reply): Change ptid argument's type from unsigned
9670 long to ptid_t. Adjust. Implement W;process and X;process.
9671 (free_sym_cache, clear_symbol_cache): New.
9672 (look_up_one_symbol): Adjust to per-process symbol cache. *
9673 * server.c (cont_thread, general_thread, step_thread): Change type
9674 to ptid_t.
9675 (attached): Delete.
9676 (multi_process): New.
9677 (last_ptid): Change type to ptid_t.
9678 (struct vstop_notif) <ptid>: Change type to ptid_t.
9679 (queue_stop_reply, push_event): Change `ptid' argument's type to
9680 ptid_t.
9681 (discard_queued_stop_replies): Add `pid' argument.
9682 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9683 changes. Don't reference the `attached' global.
9684 (attach_inferior): Adjust to mywait interface changes.
9685 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9686 features. Handle and report "multiprocess+". Handle
9687 "qAttached:PID".
9688 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9689 changes.
9690 (handle_v_kill): New.
9691 (handle_v_stopped): Adjust to use target_pid_to_str.
9692 (handle_v_requests): Allow multiple attaches and runs when
9693 multiprocess extensions are in effect. Handle "vKill".
9694 (myresume): Adjust to use ptids.
9695 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9696 (handle_status): Adjust to discard_queued_stop_replies interface
9697 change.
9698 (first_thread_of, kill_inferior_callback)
9699 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9700 (main): Call initialize_inferiors. Adjust to use ptids, killing
9701 and detaching from all inferiors. Handle multiprocess packet
9702 variants.
9703 * linux-low.h: Include gdb_proc_service.h.
9704 (struct process_info_private): New.
9705 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9706 <lwpid_of>: Use ptid_get_lwp.
9707 (get_lwp_thread): Adjust.
9708 (struct lwp_info): Add `dead' member.
9709 (find_lwp_pid): Declare.
9710 * linux-low.c (thread_db_active): Delete.
9711 (new_inferior): Adjust comment.
9712 (inferior_pid): Delete.
9713 (linux_add_process): New.
9714 (handle_extended_wait): Adjust.
9715 (add_lwp): Change unsigned long to ptid.
9716 (linux_create_inferior): Add process to processes table. Adjust
9717 to use ptids. Don't set new_inferior here.
9718 (linux_attach_lwp): Rename to ...
9719 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9720 it. Adjust to use ptids.
9721 (linux_attach_lwp): New.
9722 (linux_attach): Add process to processes table. Don't set
9723 new_inferior here.
9724 (struct counter): New.
9725 (second_thread_of_pid_p, last_thread_of_process_p): New.
9726 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9727 multiple processes.
9728 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9729 processes. Remove process from process table.
9730 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9731 to multiple processes.
9732 (any_thread_of): New.
9733 (linux_detach): Add `pid' argument, and handle it. Remove process
9734 from processes table.
9735 (linux_join): Add `pid' argument. Handle it.
9736 (linux_thread_alive): Change unsighed long argument to ptid_t.
9737 Consider dead lwps as not being alive.
9738 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9739 threads we're not interested in.
9740 (same_lwp, find_lwp_pid): New.
9741 (linux_wait_for_lwp): Change `pid' argument's type from int to
9742 ptid_t. Adjust.
9743 (linux_wait_for_event): Rename to ...
9744 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9745 from int to ptid_t. Adjust.
9746 (linux_wait_for_event): New.
9747 (linux_wait_1): Add `ptid' argument. Change return type to
9748 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9749 that exit from the process table.
9750 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9751 Adjust.
9752 (mark_lwp_dead): New.
9753 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9754 stopping all threads, mark its main lwp as dead.
9755 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9756 ptids.
9757 (fetch_register, usr_store_inferior_registers)
9758 (regsets_fetch_inferior_registers)
9759 (regsets_store_inferior_registers, linux_read_memory)
9760 (linux_write_memory): Inline `inferior_pid'.
9761 (linux_look_up_symbols): Adjust to use per-process
9762 `thread_db_active'.
9763 (linux_request_interrupt): Adjust to use ptids.
9764 (linux_read_auxv): Inline `inferior_pid'.
9765 (initialize_low): Don't reference thread_db_active.
9766 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9767 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9768 (ps_getpid): Return the pid of the current inferior.
9769 * thread-db.c (proc_handle, thread_agent): Delete.
9770 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9771 per-process data.
9772 (find_one_thread): Change argument type to ptid_t. Adjust to
9773 per-process data.
9774 (maybe_attach_thread): Adjust to per-process data and ptids.
9775 (thread_db_find_new_threads): Ditto.
9776 (thread_db_init): Ditto.
9777 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9778 processes table. Adjust to use ptids.
9779 (spu_kill, spu_detach): Adjust interface. Remove process from
9780 processes table.
9781 (spu_join, spu_thread_alive): Adjust interface.
9782 (spu_wait): Adjust interface. Remove process from processes
9783 table. Adjust to use ptids.
9784 * win32-low.c (current_inferior_tid): Delete.
9785 (current_inferior_ptid): New.
9786 (debug_event_ptid): New.
9787 (thread_rec): Take a ptid. Adjust.
9788 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9789 (child_delete_thread): Ditto.
9790 (do_initial_child_stuff): Add `attached' argument. Add process to
9791 processes table.
9792 (child_fetch_inferior_registers, child_store_inferior_registers):
9793 Adjust.
9794 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9795 (win32_attach): Pass 1 to do_initial_child_stuff.
9796 (win32_kill): Adjust interface. Remove process from processes
9797 table.
9798 (win32_detach): Ditto.
9799 (win32_join): Adjust interface.
9800 (win32_thread_alive): Take a ptid.
9801 (win32_resume): Adjust to use ptids.
9802 (get_child_debug_event): Ditto.
9803 (win32_wait): Adjust interface. Remove exiting process from
9804 processes table.
9805
bd99dc85
PA
98062009-04-01 Pedro Alves <pedro@codesourcery.com>
9807
9808 Non-stop mode support.
9809
9810 * server.h (non_stop): Declare.
9811 (gdb_client_data, handler_func): Declare.
9812 (delete_file_handler, add_file_handler, start_event_loop):
9813 Declare.
9814 (handle_serial_event, handle_target_event, push_event)
9815 (putpkt_notif): Declare.
9816 * target.h (enum resume_kind): New.
9817 (struct thread_resume): Replace `step' field by `kind' field.
9818 (TARGET_WNOHANG): Define.
9819 (struct target_ops) <wait>: Add `options' argument.
9820 <supports_non_stop, async, start_non_stop>: New fields.
9821 (target_supports_non_stop, target_async): New.
9822 (start_non_stop): Declare.
9823 (mywait): Add `options' argument.
9824 * target.c (mywait): Add `options' argument. Print child exit
9825 notifications here.
9826 (start_non_stop): New.
9827 * server.c (non_stop, own_buf, mem_buf): New globals.
9828 (struct vstop_notif): New.
9829 (notif_queue): New global.
9830 (queue_stop_reply, push_event, discard_queued_stop_replies)
9831 (send_next_stop_reply): New.
9832 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9833 interface changes.
9834 (attach_inferior): In non-stop mode, don't wait for the target
9835 here.
9836 (handle_general_set): Handle QNonStop.
9837 (handle_query): When handling qC, return the current general
9838 thread, instead of the first thread of the list.
9839 (handle_query): If the backend supports non-stop mode, include
9840 QNonStop+ in the qSupported query response.
9841 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9842 and non-stop mode.
9843 (handle_v_attach, handle_v_run): Handle non-stop mode.
9844 (handle_v_stopped): New.
9845 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9846 (myresume): Adjust to use resume_kind. Handle non-stop.
9847 (queue_stop_reply_callback): New.
9848 (handle_status): Handle non-stop mode.
9849 (main): Clear non_stop flag on reconnection. Use the event-loop.
9850 Refactor serial protocol handling from here ...
9851 (process_serial_event): ... to this new function. When GDB
9852 selects any thread, select one here. In non-stop mode, wait until
9853 GDB acks all pending events before exiting.
9854 (handle_serial_event, handle_target_event): New.
9855 * remote-utils.c (remote_open): Install remote_desc in the event
9856 loop.
9857 (remote_close): Remove remote_desc from the event loop.
9858 (putpkt_binary): Rename to...
9859 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9860 (putpkt_binary): New as wrapper around putpkt_binary_1.
9861 (putpkt_notif): New.
9862 (prepare_resume_reply): In non-stop mode, don't change the
9863 general_thread.
9864 * event-loop.c: New.
9865 * Makefile.in (OBJ): Add event-loop.o.
9866 (event-loop.o): New rule.
9867
9868 * linux-low.h (pid_of): Moved here.
9869 (lwpid_of): New.
9870 (get_lwp_thread): Use lwpid_of.
9871 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9872 * linux-low.c (pid_of): Delete.
9873 (inferior_pid): Use lwpid_of.
9874 (linux_event_pipe): New.
9875 (target_is_async_p): New.
9876 (delete_lwp): New.
9877 (handle_extended_wait): Use lwpid_of.
9878 (add_lwp): Don't set lwpid field.
9879 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9880 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9881 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9882 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9883 first. Adjust to linux_wait_for_event interface changes. Use
9884 lwpid_of.
9885 (linux_detach): Don't delete the main lwp here.
9886 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9887 (status_pending_p): Don't consider explicitly suspended lwps.
9888 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9889 pointer. Add OPTIONS argument. Change return type to int. Use
9890 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9891 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9892 pointer. Add status pointer argument. Return a pid instead of a
9893 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9894 changes. In non-stop mode, don't switch to a random thread.
9895 (linux_wait): Rename to...
9896 (linux_wait_1): ... this. Add target_options argument, and handle
9897 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9898 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9899 clean exit and signal exit code. Don't stop all threads in
9900 non-stop mode. In all-stop mode, only stop all threads when
9901 reporting a stop to GDB. Handle explicit thread stop requests.
9902 (async_file_flush, async_file_mark): New.
9903 (linux_wait): New.
9904 (send_sigstop): Use lwpid_of.
9905 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9906 interface changes. In non-stop mode, don't switch to a random
9907 thread.
9908 (linux_resume_one_lwp): Use lwpid_of.
9909 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9910 (linux_resume_one_thread): ... this. Handle resume_stop. In
9911 non-stop mode, don't look for pending flag in all threads.
9912 (resume_status_pending_p): Don't consider explicitly suspended
9913 threads.
9914 (my_waitpid): Reimplement. Emulate __WALL.
9915 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9916 Use lwpid_of.
9917 (sigchld_handler, linux_supports_non_stop, linux_async)
9918 (linux_start_non_stop): New.
9919 (linux_target_ops): Register linux_supports_non_stop, linux_async
9920 and linux_start_non_stop.
9921 (initialize_low): Install SIGCHLD handler.
9922 * thread-db.c (thread_db_create_event, find_one_thread)
9923 (thread_db_get_tls_address): Use lwpid_of.
9924 * win32-low.c (win32_detach): Adjust to use resume_kind.
9925 (win32_wait): Add `options' argument.
9926 * spu-low.c (spu_resume): Adjust to use resume_kind.
9927 (spu_wait): Add `options' argument.
9928
5b1c542e
PA
99292009-04-01 Pedro Alves <pedro@codesourcery.com>
9930
9931 Decouple target code from remote protocol.
9932
9933 * target.h (enum target_waitkind): New.
9934 (struct target_waitstatus): New.
9935 (struct target_ops) <wait>: Return an unsigned long. Take a
9936 target_waitstatus pointer instead of a char pointer.
9937 (mywait): Likewise.
9938 * target.c (mywait): Change prototype to return an unsigned long.
9939 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9940 * server.h (thread_from_wait, old_thread_from_wait): Delete
9941 declarations.
9942 (prepare_resume_reply): Change prototype to take a
9943 target_waitstatus.
9944 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9945 (last_status, last_ptid): New.
9946 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9947 pid instead of a signal.
9948 (attach_inferior): Remove "status" and "signal" parameters.
9949 Adjust.
9950 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9951 not as an address.
9952 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9953 (handle_v_requests, myresume): Remove "status" and "signal"
9954 parameters. Adjust.
9955 (handle_status): New.
9956 (main): Delete local `status'. Adjust.
9957 * remote-utils.c: Include target.h.
9958 (prepare_resume_reply): Change prototype to take a
9959 target_waitstatus. Adjust.
9960
9961 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9962 interface.
9963 * spu-low.c (spu_wait): Adjust.
9964 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9965 Delete.
9966 (win32_wait): Adjust.
9967
2bd7c093
PA
99682009-04-01 Pedro Alves <pedro@codesourcery.com>
9969
9970 * target.h (struct thread_resume): Delete leave_stopped member.
9971 (struct target_ops): Add a `n' argument to the `resume' callback.
9972 * server.c (start_inferior): Adjust.
9973 (handle_v_cont, myresume): Adjust.
9974 * linux-low.c (check_removed_breakpoint): Adjust to resume
9975 interface change, and to removed leave_stopped field.
9976 (resume_ptr): Delete.
9977 (struct thread_resume_array): New.
9978 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9979 resume interface change.
9980 (linux_continue_one_thread, linux_queue_one_thread)
9981 (resume_status_pending_p): Check if the resume field is NULL
9982 instead of checking the leave_stopped member.
9983 (linux_resume): Adjust to the target resume interface change.
9984 * spu-low.c (spu_resume): Adjust to the target resume interface
9985 change.
9986 * win32-low.c (win32_detach, win32_resume): Ditto.
9987
c35fafde
PA
99882009-04-01 Pedro Alves <pedro@codesourcery.com>
9989
9990 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9991 flag.
9992 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9993 pending.
9994 (linux_continue_one_thread): Only preserve the stepping flag if
9995 there's a pending breakpoint.
9996
0a59d50b
PA
99972009-03-31 Pedro Alves <pedro@codesourcery.com>
9998
9999 * server.c (main): After the inferior having exited, call
10000 remote_close before exiting gdbserver.
10001
f04c6d38
TJB
100022009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
10003
10004 Fix size of FPSCR in Power 7 processors.
10005 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10006 (PPC_FEATURE_HAS_DFP): New #define.
10007 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10008 size of the FPSCR.
10009
78e5cee6
PA
100102009-03-23 Pedro Alves <pedro@codesourcery.com>
10011
10012 * server.c (handle_query) Whitespace and formatting.
10013
1b3f6016
PA
100142009-03-22 Pedro Alves <pedro@codesourcery.com>
10015
10016 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10017 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10018 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10019 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10020 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10021 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10022 Makefile.in, configure.ac: Fix whitespace throughout.
10023 * configure: Regenerate.
10024
a07b2135
PA
100252009-03-22 Pedro Alves <pedro@codesourcery.com>
10026
10027 * inferiors.c (find_inferior): Make it safe for the callback
10028 function to delete the currently iterated inferior.
10029
67cc2626
PA
100302009-03-22 Pedro Alves <pedro@codesourcery.com>
10031
10032 * Makefile.in (linuw_low_h): Move higher.
10033 (thread-db.o): Depend on $(linux_low_h).
10034
54a0b537
PA
100352009-03-17 Pedro Alves <pedro@codesourcery.com>
10036
10037 Rename "process" to "lwp" throughout.
10038
10039 * linux-low.c (all_processes): Rename to...
10040 (all_lwps): ... this.
10041 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10042 (add_process): Rename to ...
10043 (add_lwp): ... this. Adjust.
10044 (linux_create_inferior): Adjust.
10045 (linux_attach_lwp): Adjust.
10046 (linux_attach): Adjust.
10047 (linux_kill_one_process): Rename to ...
10048 (linux_kill_one_lwp): ... this. Adjust.
10049 (linux_kill): Adjust.
10050 (linux_detach_one_process): Rename to ...
10051 (linux_detach_one_lwp): ... this. Adjust.
10052 (linux_detach): Adjust.
10053 (check_removed_breakpoint): Adjust.
10054 (status_pending_p): Adjust.
10055 (linux_wait_for_process): Rename to ...
10056 (linux_wait_for_lwp): ... this. Adjust.
10057 (linux_wait_for_event): Adjust.
10058 (send_sigstop): Adjust.
10059 (wait_for_sigstop): Adjust.
10060 (stop_all_processes): Rename to ...
10061 (stop_all_lwps): ... this.
10062 (linux_resume_one_process): Rename to ...
10063 (linux_resume_one_lwp): ... this. Adjust.
10064 (linux_set_resume_request, linux_continue_one_thread)
10065 (linux_queue_one_thread, resume_status_pending_p)
10066 (usr_store_inferior_registers, regsets_store_inferior_registers)
10067 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10068 Adjust.
10069 * linux-low.h (get_process): Rename to ...
10070 (get_lwp): ... this. Adjust.
10071 (get_thread_process): Rename to ...
10072 (get_thread_lwp): ... this. Adjust.
10073 (get_process_thread): Rename to ...
10074 (get_lwp_thread): ... this. Adjust.
10075 (struct process_info): Rename to ...
10076 (struct lwp_info): ... this.
10077 (all_processes): Rename to ...
10078 (all_lwps): ... this.
10079 * proc-service.c (ps_lgetregs): Adjust.
10080 * thread-db.c (thread_db_create_event, find_one_thread)
10081 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10082
0b16c5cf
PA
100832009-03-14 Pedro Alves <pedro@codesourcery.com>
10084
10085 * server.c (handle_query): Handle "qAttached".
10086
32de4b9d
NS
100872009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10088
10089 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10090 GPLv3, update license URL.
10091
2aecd87f
DE
100922009-03-01 Doug Evans <dje@google.com>
10093
93efd302 10094 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
10095 (server_h): Add gdb_signals.h.
10096 (signals.o): Update.
10097 * server.h (target_signal_from_host,target_signal_to_host_p)
10098 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10099
86b1f9c5
PM
101002009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10101
10102 * remote-utils.c (getpkt): Also generate remote-debug
10103 information if noack_mode is set.
10104
4aa995e1
PA
101052009-02-06 Pedro Alves <pedro@codesourcery.com>
10106
10107 * server.c (handle_query): Report qXfer:siginfo:read and
10108 qXfer:siginfo:write as supported and handle them.
10109 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10110 * linux-low.c (linux_xfer_siginfo): New.
10111 (linux_target_ops): Set it.
10112
62709adf
PA
101132009-01-26 Pedro Alves <pedro@codesourcery.com>
10114
10115 * server.c (gdbserver_usage): Mention --remote-debug.
10116 (main): Accept '--remote-debug' switch.
10117
aef93bd7
DE
101182009-01-18 Doug Evans <dje@google.com>
10119
10120 * regcache.c (new_register_cache): No need to check result of xcalloc.
10121 * server.c (handle_search_memory): Back out calls to xmalloc,
10122 result is checked and error is returned to user upon failure.
10123 (handle_query): Ditto. Add more checks for result of malloc.
10124 (handle_v_cont): Check result of malloc, report error back to
10125 user upon failure.
10126 (handle_v_run): Ditto. Call freeargv.
10127 * server.h (freeargv): Declare.
10128 * utils.c (freeargv): New fn.
10129
54363045
DE
101302009-01-15 Doug Evans <dje@google.com>
10131
f626972c
DE
10132 * gdbreplay.c (perror_with_name): Make arg const char *.
10133 * server.h (target_signal_to_name): Make return type const char *.
0842e787 10134 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 10135 * utils.c (perror_with_name): Make arg const char *.
54363045 10136
18aae699
PA
101372009-01-14 Pedro Alves <pedro@codesourcery.com>
10138
10139 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10140 when handling a EXIT_PROCESS_DEBUG_EVENT.
10141
ff703abe
JB
101422009-01-06 Joel Brobecker <brobecker@adacore.com>
10143
10144 * gdbreplay.c (gdbreplay_version): Update copyright year.
10145 * server.c (gdbserver_version): Likewise.
10146
f21cc1a2 101472009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
10148
10149 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 10150 (handle_extended_wait): Improve comment.
0e21c1ec 10151
bca929d3
DE
101522008-12-13 Doug Evans <dje@google.com>
10153
10154 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10155 * server.h (ATTR_MALLOC): New macro.
10156 (xmalloc,xcalloc,xstrdup): Declare.
10157 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10158 * inferiors.c: Ditto.
10159 * linux-low.c: Ditto.
10160 * mem-break.c: Ditto.
10161 * regcache.c: Ditto.
10162 * remote-utils.c: Ditto.
10163 * server.c: Ditto.
10164 * target.c: Ditto.
10165 * win32-low.c: Ditto.
10166
97438e3f
DE
101672008-12-12 Doug Evans <dje@google.com>
10168
896c7fbb
DE
10169 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10170 in debugging printf.
10171
97438e3f
DE
10172 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10173
e3b886f8
DE
101742008-12-09 Doug Evans <dje@google.com>
10175
10176 * linux-low.h (struct process_info): Delete member tid, unused.
10177 * thread-db.c (find_one_thread): Update.
10178 (maybe_attach_thread): Update.
10179
07e059b5
VP
101802008-12-02 Pedro Alves <pedro@codesourcery.com>
10181
889bf7c5
PA
10182 * target.h (struct target_ops): Add qxfer_osdata member.
10183 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10184 and dirent.h.
10185 (linux_qxfer_osdata): New functions.
10186 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10187 callback.
10188 * server.c (handle_query): Handle "qXfer:osdata:read:".
10189 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10190 (buffer_xml_printf): New functions.
10191 * server.h (struct buffer): New.
10192 (buffer_grow_str, buffer_grow_str0): New macros.
10193 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10194 (buffer_xml_printf): Declare.
07e059b5 10195
4cab47ab
DE
101962008-11-24 Doug Evans <dje@google.com>
10197
10198 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10199
f142445f
DJ
102002008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10201
10202 * server.c (handle_v_run): Always use the supplied argument list.
10203
d0107bb6 102042008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 10205
d0107bb6
BW
10206 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10207 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 10208
2c4ad781
TJB
102092008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10210
10211 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10212 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10213 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10214 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10215 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10216 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10217 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10218 XML target descriptions.
10219 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10220 when inferior is running on an ISA 2.05 or later processor. Add
10221 special case to return offset for full 64-bit slot of FPSCR when
10222 in 32-bits.
10223
dfb64f85
DJ
102242008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10225
10226 * Makefile.in (SFILES, clean): Added sparc64 files.
10227 (reg-sparc64.o, reg-sparc64.c): New.
10228 * configure.srv (sparc*-*-linux*): New configuration.
10229 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10230 syscall arguments for SPARC.
10231 (regsets_store_inferior_registers): Likewise.
10232 * linux-sparc-low.c: New file.
10233
66b6e1dd
DE
102342008-10-21 Doug Evans <dje@google.com>
10235
10236 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10237 (READLINE_DIR,READLINE_DEP): Delete.
10238 (INTERNAL_CFLAGS): Update.
10239 (LINTFLAGS): Update.
10240
9b710a42
PA
102412008-10-10 Pedro Alves <pedro@codesourcery.com>
10242
10243 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10244 whole argv from the last run, not just argv[0].
10245
5822d809
PA
102462008-09-08 Pedro Alves <pedro@codesourcery.com>
10247
10248 * regcache.c (new_register_cache): Return NULL if the register
10249 cache size isn't known yet.
10250 (free_register_cache): Avoid dereferencing a NULL regcache.
10251
74aac56f
DJ
102522008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10253
10254 * configure.srv: Merge MIPS and MIPS64.
10255
400b20f5
MR
102562008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10257
10258 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10259
677c5bb1
LM
102602008-08-18 Luis Machado <luisgpm@br.ibm.com>
10261
10262 * Makefile.in: Add required vsx dependencies.
10263
10264 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10265 Declare init_registers_powerpc_vsx32l.
10266 Declare init_registers_powerpc_vsx64l.
10267 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10268 (ppc_arch_setup): Check for VSX in hwcap.
10269 (ppc_fill_vsxregset): New function.
10270 (ppc_store_vsxregset): New function.
10271 Add new VSX entry in regset_info target_regsets.
10272
10273 * configure.srv: Add new VSX dependencies.
10274
a6f3e723
SL
102752008-08-12 Pedro Alves <pedro@codesourcery.com>
10276
10277 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10278 (remote_open): Set or clear transport_is_reliable.
10279 (putpkt_binary): Don't expect acks in noack mode.
10280 (getpkt): Don't send ack/nac in noack mode.
10281 * server.c (handle_general_set): Handle QStartNoAckMode.
10282 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10283 qSupported.
10284 (main): Reset noack_mode on every connection.
10285 * server.h (noack_mode): Declare.
10286
a417dc56
RW
102872008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10288
10289 * Makefile.in (GDBREPLAY_OBS): New variable.
10290 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10291
3221518c
UW
102922008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10293 Daniel Jacobowitz <dan@codesourcery.com>
10294
10295 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10296 (usr_store_inferior_registers): Likewise.
10297 (regsets_store_inferior_registers): Likewise.
10298
ec56be1b
PA
102992008-07-31 Rolf Jansen <rj@surtec.com>
10300 Pedro Alves <pedro@codesourcery.com>
10301
10302 * configure.ac: Check for memmem declaration.
10303 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10304 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10305 (disable_packet_qfThreadInfo): Unconditionally compile.
10306 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10307 * configure, config.in: Regenerate.
10308
2fe5e3ff
DE
103092008-07-28 Doug Kwan <dougkwan@google.com>
10310
10311 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10312 (linux_write_memory): Remove declaration of errno.
10313
836acd6d
UW
103142008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10315
10316 * linux-low.c (handle_extended_wait): Do not use "status"
10317 variable uninitialized.
10318
aeba519e
PA
103192008-07-07 Pedro Alves <pedro@codesourcery.com>
10320
10321 * server.c (handle_v_attach): Inhibit reporting dll changes.
10322
db42f210
PA
103232008-06-27 Pedro Alves <pedro@codesourcery.com>
10324
10325 * remote-utils.c (prepare_resume_reply): If requested, don't
10326 output "thread:TID" in the T stop reply.
10327
10328 * server.c (disable_packet_vCont, disable_packet_Tthread)
10329 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10330 (handle_query): If requested, disable support for qC, qfThreadInfo
10331 and qsThreadInfo.
10332 (handle_v_requests): If requested, disable support for vCont.
10333 (gdbserver_show_disableable): New.
10334 (main): Handle --disable-packet and --disable-packet=LIST.
10335
10336 * server.h (disable_packet_vCont, disable_packet_Tthread)
10337 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10338
8e4c5421
CD
103392008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10340
10341 * server.c (gdbserver_usage): Mention --version.
10342
6e23a804
DJ
103432008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10344
10345 * Makefile.in (gdbreplay.o): New rule.
10346
90aa6a40
JM
103472008-06-06 Joseph Myers <joseph@codesourcery.com>
10348
10349 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10350 message, not gdbserver.
10351
c16158bc 103522008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
10353 Nathan Sidwell <nathan@codesourcery.com>
10354 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
10355
10356 * acinclude.m4: Include ../../config/acx.m4.
10357 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10358 * configure, config.in: Regenerate.
10359 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10360 * server.c (gdbserver_version): Print PKGVERSION.
10361 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10362 (main): Adjust gdbserver_usage calls.
10363 * gdbreplay.c (version, host_name): Add declarations.
10364 (gdbreplay_version, gdbreplay_usage): New.
10365 (main): Accept --version and --help options.
10366
aeb75bf5
DJ
103672008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10368
10369 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10370 (arm_breakpoint_at): Handle Thumb.
10371 (the_low_target): Add comment.
10372
76b233dd
UW
103732008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10374
10375 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10376
08388c79
DE
103772008-05-09 Doug Evans <dje@google.com>
10378
a3c83fae
DE
10379 * server.h (decode_search_memory_packet): Declare.
10380 * remote-utils.c (decode_search_memory_packet): New fn.
10381 * server.c (handle_search_memory_1): New fn.
08388c79
DE
10382 (handle_search_memory): New fn.
10383 (handle_query): Process qSearch:memory packets.
10384
bb9c3d36
UW
103852008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10386
10387 * regcache.c (registers_length): Remove.
10388 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10389 full register packet.
10390 * regcache.h (registers_length): Remove prototype.
10391 * server.h (PBUFSIZ): Define to 16384.
10392
7284e1be
UW
103932008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10394
10395 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10396 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10397 powerpc-64l.o, and powerpc-altivec64l.o.
10398 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10399 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10400 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10401 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10402 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10403 to srv_xmlfiles.
10404
10405 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10406 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10407 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10408 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10409 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10410 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10411 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10412 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10413 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10414 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10415 (clean): Update.
10416
10417 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10418 (init_registers_powerpc_32l): ... this new prototype.
10419 (init_registers_powerpc_32): Remove, replace by ...
10420 (init_registers_powerpc_altivec32l): ... this new prototype.
10421 (init_registers_powerpc_e500): Remove, replace by ...
10422 (init_registers_powerpc_e500l): ... this new prototype.
10423 (init_registers_ppc64): Remove, replace by ...
10424 (init_registers_powerpc_64l): ... this new prototype.
10425 (init_registers_powerpc_64): Remove, replace by ...
10426 (init_registers_powerpc_altivec64l): ... this new prototype.
10427 (ppc_num_regs): Set to 73.
10428 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10429 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10430 (ppc_cannot_store_register): Handle orig_r3 and trap.
10431 (ppc_arch_setup): Update init_registers_... calls.
10432 (ppc_fill_gregset): Handle orig_r3 and trap.
10433
10434 * inferiors.c (clear_inferiors): Reset current_inferior.
10435
fdc59709
PB
104362008-04-23 Paolo Bonzini <bonzini@gnu.org>
10437
889bf7c5
PA
10438 * acinclude.m4: Add override.m4.
10439 * configure: Regenerate.
fdc59709 10440
c9b2f845
UW
104412008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10442
10443 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10444 initial call to init_register_ppc64.
10445
550512b8
UW
104462008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10447
43aaf8b6
PA
10448 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10449 single powerpc*-*-linux* case.
550512b8
UW
10450 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10451
b6430ec3
UW
104522008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10453
10454 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 10455 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
10456 from reg_xmlfiles.
10457 * linux-ppc-low.c: Include <elf.h>.
10458 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10459 (ppc_hwcap): New global variable.
10460 (ppc_regmap): Remove __SPE__ #ifdef sections.
10461 (ppc_regmap_e500): New global variable.
10462 (ppc_cannot_store_register): Update __SPE__ special case.
10463 (ppc_get_hwcap): New function.
10464 (ppc_arch_setup): Use it to determine whether inferior supports
10465 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10466 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10467 Do not access registers if target does not support AltiVec.
10468 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10469 Do not access registers if target does not support SPE.
10470 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10471
52fa2412
UW
104722008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10473
10474 * linux-low.c (disabled_regsets, num_regsets): New.
10475 (use_regsets_p): Delete.
10476 (linux_wait_for_process): Clear disabled_regsets.
10477 (regsets_fetch_inferior_registers): Check and set it.
10478 (regsets_store_inferior_registers): Likewise.
10479 (linux_fetch_registers, linux_store_registers): Do not use
10480 use_regsets_p.
10481 (initialize_low): Allocate disabled_regsets.
10482
e28b3332
DJ
104832008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10484
10485 * Makefile.in (LIBOBJS): New.
10486 (OBS): Use LIBOBJS.
10487 (memmem.o): New rule.
10488 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10489 * configure: Regenerated.
10490
4536995d
UW
104912008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10492
10493 * server.c (handle_query): Never return "unsupported" for
10494 qXfer:features:read queries.
10495
221c031f
UW
104962008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10497
10498 * server.c (get_features_xml): Fix inverted condition.
10499 (handle_query): Always support qXfer:feature:read.
10500
ccd213ac
DJ
105012008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10502
10503 * server.c (wrapper_argv): New.
10504 (start_inferior): Handle wrapper_argv. If set, expect an extra
10505 trap.
10506 (gdbserver_usage): Document --wrapper.
10507 (main): Parse --wrapper.
10508
6fe305f7
UW
105092008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10510
10511 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10512 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10513 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10514 (ppc_set_pc): Likewise.
10515 (ppc_arch_setup): New function.
10516 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10517 of collect_register.
889bf7c5 10518 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 10519
5b0a002e
UW
105202008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10521
10522 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10523 instead of linux-ppc64-low.o.
10524 * linux-ppc64-low.c: Remove file.
10525 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10526 (linux-ppc64-low.o): Remove rule.
10527
10528 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10529 (init_registers_powerpc_64): Likewise.
10530 (ppc_regmap): Conditionally define depending on __powerpc64__.
10531 (ppc_cannot_store_register): Do not special-case "fpscr" when
10532 compiled on __powerpc64__.
10533 (ppc_collect_ptrace_register): New function.
10534 (ppc_supply_ptrace_register): New function.
10535 (ppc_breakpoint): Change type to "unsigned int".
10536 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10537 (the_low_target): Conditionally provide initializers for the
889bf7c5 10538 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
10539 collect_ptrace_register and supply_ptrace_register members.
10540
9b4b61c8
UW
105412008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10542
10543 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10544 * server.c (gdbserver_xmltarget): Define.
10545 (get_features_xml): Use it to replace "target.xml" and arch_string.
10546
10547 * configure.srv: Remove srv_xmltarget. Add XML files that were
10548 mentioned there to srv_xmlfiles instead. Remove conditional tests
10549 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10550 srv_xmlfiles and srv_regobj to include all possible choices.
10551 * configure.ac (srv_xmltarget): Remove.
10552 (srv_xmlfiles): Do not add "target.xml".
10553 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10554 checks for supplementary target information.
10555 * configure: Regenerate.
10556 * Makefile.in (XML_TARGET): Remove.
10557 (target.xml): Remove rule.
10558 (clean): Do not clean up target.xml.
10559 (.PRECIOUS): Do not mention target.xml.
10560
10561 * target.h (struct target_ops): Remove arch_string member.
10562 * linux-low.c (linux_arch_string): Remove.
10563 (linux_target_ops): Remove arch_string initializer.
10564 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10565 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10566 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10567 * spu-low.c (spu_arch_string): Remove.
10568 (spu_target_ops): Remove arch_string initializer.
10569 * win32-low.c (win32_arch_string): Remove.
10570 (win32_target_ops): Remove arch_string initializer.
10571 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10572 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10573 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10574
ee1a7ae4
UW
105752008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10576
10577 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10578 by collect_ptrace_register and supply_ptrace_register hooks.
10579 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10580 instead of checking for the_low_target.left_pad_xfer.
10581 (usr_store_inferior_registers): Use collect_ptrace_register callback
10582 instead of checking for the_low_target.left_pad_xfer.
10583
10584 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10585 (s390_supply_ptrace_register): Likewise.
10586 (s390_fill_gregset): Call s390_collect_ptrace_register.
10587 (the_low_target): Update.
10588
10589 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10590 (ppc_supply_ptrace_register): Likewise.
10591 (the_low_target): Update.
10592
10593 * linux-i386-low.c (the_low_target): Update.
10594 * linux-x86-64-low.c (the_low_target): Update.
10595
d61ddec4
UW
105962008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10597
10598 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10599 reg-s390.o and reg-s390x.o.
10600
10601 * linux-low.c (new_inferior): New global variable.
10602 (linux_create_inferior, linux_attach): Set it.
10603 (linux_wait_for_process): Call the_low_target.arch_setup after the
10604 target has stopped for the first time.
10605 (initialize_low): Do not call the_low_target.arch_setup.
10606
10607 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10608 (s390_set_pc): Likewise.
10609 (s390_arch_setup): New function.
10610 (the_low_target): Use s390_arch_setup as arch_setup routine.
10611
10612 * regcache.c (realloc_register_cache): New function.
10613 (set_register_cache): Call it for each existing regcache.
10614
d05b4ac3
UW
106152008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10616
10617 * server.h (init_registers): Remove prototype.
10618
10619 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10620 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10621 instead of init_registers ().
10622 * linux-arm-low.c (init_registers_arm): Add prototype.
10623 (init_registers_arm_with_iwmmxt): Likewise.
10624 (the_low_target): Add initializer for arch_setup field.
10625 * linux-cris-low.c (init_registers_cris): Add prototype.
10626 (the_low_target): Add initializer for arch_setup field.
10627 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10628 (the_low_target): Add initializer for arch_setup field.
10629 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10630 (the_low_target): Add initializer for arch_setup field.
10631 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10632 (the_low_target): Add initializer for arch_setup field.
10633 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10634 (the_low_target): Add initializer for arch_setup field.
10635 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10636 (the_low_target): Add initializer for arch_setup field.
10637 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10638 (init_registers_mips64_linux): Likewise.
10639 (the_low_target): Add initializer for arch_setup field.
10640 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10641 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10642 (the_low_target): Add initializer for arch_setup field.
10643 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10644 (init_registers_powerpc_64): Likewise.
10645 (the_low_target): Add initializer for arch_setup field.
10646 * linux-s390-low.c (init_registers_s390): Add prototype.
10647 (init_registers_s390x): Likewise.
10648 (the_low_target): Add initializer for arch_setup field.
10649 * linux-sh-low.c (init_registers_sh): Add prototype.
10650 (the_low_target): Add initializer for arch_setup field.
10651 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10652 (the_low_target): Add initializer for arch_setup field.
10653 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10654 (the_low_target): Add initializer for arch_setup field.
10655
10656 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10657 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10658 instead of init_registers ().
10659 * win32-arm-low.c (init_registers_arm): Add prototype.
10660 (the_low_target): Add initializer for arch_setup field.
10661 * win32-i386-low.c (init_registers_i386): Add prototype.
10662 (the_low_target): Add initializer for arch_setup field.
10663
10664 * spu-low.c (init_registers_spu): Add prototype.
10665 (initialize_low): Call initialie_registers_spu () instead of
10666 initialize_registers ().
10667
fd96d250
PA
106682008-02-19 Pedro Alves <pedro@codesourcery.com>
10669
10670 * server.c (handle_v_requests): When handling the vRun and vAttach
10671 packets, if already debugging a process, don't kill it. Return an
10672 error instead.
10673
d41b6bb4
DJ
106742008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10675
10676 * server.c (handle_query): Correct length check.
10677
5ac588cf
PA
106782008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10679
10680 * win32-low.c (do_initial_child_stuff): Add process handle
10681 parameter. Set current_process_handle and current_process_id from the
10682 parameters. Clear globals.
10683 (win32_create_inferior): Don't set current_process_handle and
10684 current_process_id here. Instead pass them on the call to
10685 do_initial_child_stuff.
10686 (win32_attach): Likewise.
10687 (win32_clear_inferiors): New.
10688 (win32_kill): Don't close the current process handle or the
10689 current thread handle here. Instead call win32_clear_inferiors.
10690 (win32_detach): Don't open a new handle to the process. Call
10691 win32_clear_inferiors.
10692 (win32_join): Don't rely on current_process_handle; open a new
10693 handle using the process id.
10694 (win32_wait): Call win32_clear_inferiors when the inferior process
10695 has exited.
10696
ecd7ecbc
DJ
106972008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10698
10699 * server.c (monitor_show_help): Add "exit".
10700
1525d545
MG
107012008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10702
ecd7ecbc 10703 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
10704 (clean): Add reg-xtensa.c.
10705 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
10706 * configure.srv (xtensa*-*-linux*) New target.
10707 * linux-xtensa-low.c: New.
10708 * xtensa-xtregs.c: New.
1525d545 10709
59a016f0
PA
107102008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10711
10712 * hostio.c: Don't include errno.h.
10713 (errno_to_fileio_errno): Move to hostio-errno.
10714 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10715 error number outputting to the target->hostio_last_error callback.
10716 (hostio_packet_error): Use FILEIO_EINVAL directly.
10717 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10718 calls to hostio_error.
10719 * hostio-errno.c: New.
10720 * server.h (hostio_last_error_from_errno): Declare.
10721 * target.h (target_ops): Add hostio_last_error member.
10722 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10723 as hostio_last_error handler.
889bf7c5 10724 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
10725 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10726 (wince_hostio_last_error): New functions.
10727 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10728 as hostio_last_error handler.
10729 (win32_target_ops) [!_WIN32_WCE]: Register
10730 hostio_last_error_from_errno as hostio_last_error handler.
10731 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10732 (hostio-errno.o): New rule.
10733 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10734 * configure.srv (srv_hostio_err_objs): New variable. Default to
10735 hostio-errno.o.
10736 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10737 * configure: Regenerate.
10738
2d717e4f
DJ
107392008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10740
10741 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10742 (linux_kill, linux_detach): Clean up the process list.
10743 * remote-utils.c (remote_open): Improve port number parsing.
10744 (putpkt_binary, input_interrupt): Only send interrupts if the target
10745 is running.
10746 * server.c (extended_protocol): Make static.
10747 (attached): Define earlier.
10748 (exit_requested, response_needed, program_argv): New variables.
10749 (target_running): New.
10750 (start_inferior): Clear attached here.
10751 (attach_inferior): Set attached here.
10752 (require_running): Define.
10753 (handle_query): Use require_running and target_running. Implement
10754 "monitor exit".
10755 (handle_v_attach, handle_v_run): New.
10756 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10757 (gdbserver_usage): Update.
10758 (main): Redo argument parsing. Handle --debug and --multi. Handle
10759 --attach along with other options or after the port. Save
10760 program_argv. Support no initial program. Resynchronize
10761 communication with GDB after an error. Handle "monitor exit".
10762 Use require_running and target_running. Always allow the extended
10763 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10764 restart in extended mode.
10765 * README: Refer to the GDB manual. Update --attach usage.
10766
7407e2de
AS
107672007-12-20 Andreas Schwab <schwab@suse.de>
10768
10769 * linux-low.c (STACK_SIZE): Define.
10770 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10771 (linux_test_for_tracefork): Likewise.
10772
b65d95c5
DJ
107732007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10774
10775 * linux-low.c (linux_wait_for_event): Update messages. Do not
10776 reinsert auto-delete breakpoints.
10777 * mem-break.c (struct breakpoint): Change return type of handler to
10778 int.
10779 (set_breakpoint_at): Update handler type.
10780 (reinsert_breakpoint_handler): Return 1 instead of calling
10781 delete_breakpoint.
10782 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10783 setting a new one.
10784 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10785 * mem-break.h (set_breakpoint_at): Update handler type.
10786 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10787 * win32-low.c (auto_delete_breakpoint): New.
10788 (get_child_debug_event): Use it.
10789
4e799345
DJ
107902007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10791
10792 * configure.ac: Check for pread and pwrite.
10793 * hostio.c (handle_pread): Fall back to lseek and read.
10794 (handle_pwrite): Fall back to lseek and write.
10795 * config.in, configure: Regenerated.
10796
27524b67
DJ
107972007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10798
10799 * server.c (myresume): Add own_buf argument.
10800 (main): Update calls.
10801
a20d5e98
DJ
108022007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10803
10804 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10805 * remote-utils.c (remote_open): Do not call disable_async_io.
10806 (block_async_io): Delete.
10807 (unblock_async_io): Make static.
10808 (initialize_async_io): New.
10809 * server.c (handle_v_cont): Handle async I/O here.
10810 (myresume): Likewise. Move other common resume tasks here...
10811 (main): ... from here. Call initialize_async_io. Disable async
10812 I/O before the main loop.
10813 * server.h (initialize_async_io): Declare.
10814 (block_async_io, unblock_async_io): Delete prototypes.
10815 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10816
b79d787e
DJ
108172007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10818
10819 * remote-utils.c (readchar): Allow binary data in received messages.
10820
d97903b2
PA
108212007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10822
10823 * win32-low.c (attaching): New global.
10824 (win32_create_inferior): Clear the `attaching' global.
10825 (win32_attach): Set the `attaching' global.
10826 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10827 attaching. Only set a breakpoint at the entry point if not
10828 attaching.
10829
311de423
PA
108302007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10831
10832 * server.c (main): Don't report dll events on the initial
10833 connection on attaches.
10834
6c2d16d2
PA
108352007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10836
10837 * server.c (main): Relax numerical bases supported for the pid of
10838 the --attach command line argument.
10839
5ca906e6
PA
108402007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10841
10842 * win32-low.c (win32_attach): Call OpenProcess before
10843 DebugActiveProcess, not after. Add last error output to error
10844 call.
10845
9c6c8194
PA
108462007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10847
10848 * win32-low.c (win32_get_thread_context)
10849 (win32_set_thread_context): New functions.
10850 (thread_rec): Use win32_get_thread_context.
10851 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10852 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10853 field.
10854
4d5d1aaa
PA
108552007-12-03 Leo Zayas
10856 Pedro Alves <pedro_alves@portugalmail.pt>
10857
10858 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10859 global variables.
10860 (child_add_thread): Minor cleanup.
10861 (child_continue): Resume artificially suspended threads before
10862 calling ContinueDebugEvent.
10863 (suspend_one_thread): New.
10864 (fake_breakpoint_event): New.
10865 (get_child_debug_event): Change return type to int. Check here if
10866 gdb sent an interrupt request. If a soft interrupt was requested,
10867 fake a breakpoint event. Return 0 if there is no event to handle,
10868 and 1 otherwise.
10869 (win32_wait): Don't check here if gdb sent an interrupt request.
10870 Ensure there is a valid event to handle.
10871 (win32_request_interrupt): Add soft interruption method as last
10872 resort.
10873
c436e841
PA
108742007-12-03 Leo Zayas
10875 Pedro Alves <pedro_alves@portugalmail.pt>
10876
10877 * win32-low.h (win32_thread_info): Add descriptions to the
10878 structure members. Replace `suspend_count' counter by a
10879 `suspended' flag.
10880 * win32-low.c (thread_rec): Update condition of when to get the
10881 context from the inferior. Rely on ContextFlags being set if it
10882 has already been retrieved. Only suspend the inferior thread if
10883 we haven't already. Warn if that fails.
10884 (continue_one_thread): s/suspend_count/suspended/. Only call
10885 ResumeThread once. Warn if that fails.
10886
e7b5fa67
PA
108872007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10888
10889 * win32-low.c (win32_wait): Don't read from the inferior when it
10890 has already exited.
10891
a385171d
PA
108922007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10893
10894 * Makefile.in (win32_low_h): New variable.
10895 (win32-low.o): Add dependency on $(win32_low_h).
10896 (win32-arm-low.o, win32-i386-low.o): New rules.
10897
f80c84b3
DJ
108982007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10899
10900 * hostio.c: Correct copyright year.
10901
a6b151f1
DJ
109022007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10903
10904 * Makefile.in (OBS): Add hostio.o.
10905 (hostio.o): New rule.
10906 * server.h (handle_vFile): Declare.
10907 * hostio.c: New file.
10908 * server.c (handle_v_requests): Take packet_len and new_packet_len
10909 for binary packets. Call handle_vFile.
10910 (main): Update call to handle_v_requests.
10911
f9387fc3
DJ
109122007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10913
10914 * linux-low.c: Include <sched.h>.
10915
51c2684e
DJ
109162007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10917
10918 * linux-low.c (linux_tracefork_grandchild): New.
10919 (linux_tracefork_child): Use clone.
10920 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10921
75f83163
JB
109222007-10-31 Joel Brobecker <brobecker@adacore.com>
10923
10924 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10925
da5898ce
DJ
109262007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10927
10928 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10929
24a09b5f
DJ
109302007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10931
10932 * inferiors.c (change_inferior_id): Delete.
10933 (add_pid_to_list, pull_pid_from_list): New.
10934 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10935 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10936 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10937 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10938 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10939 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10940 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10941 (using_threads): Always set to 1.
10942 (handle_extended_wait): New.
10943 (add_process): Do not set TID.
10944 (linux_create_inferior): Set must_set_ptrace_flags.
10945 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10946 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10947 (linux_thread_alive): Rename TID argument to LWPID.
10948 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10949 (linux_wait_for_event): Do not use TID or check using_threads. Update
10950 call to dead_thread_notify. Call handle_extended_wait.
10951 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10952 (send_sigstop): Delete sigstop_sent.
10953 (wait_for_sigstop): Avoid TID.
10954 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10955 (linux_test_for_tracefork): New.
10956 (linux_lookup_signals): Use thread_db_active and
10957 linux_supports_tracefork_flag.
10958 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10959 * linux-low.h (get_process_thread): Avoid TID.
10960 (struct process_ifo): Move thread_known and tid to the end. Remove
10961 sigstop_sent.
10962 (linux_attach_lwp, thread_db_init): Update prototypes.
10963 * server.h (change_inferior_id): Delete prototype.
10964 (add_pid_to_list, pull_pid_from_list): New prototypes.
10965 * thread-db.c (thread_db_use_events): New.
10966 (find_first_thread): Rename to...
10967 (find_one_thread): ...this. Update callers and messages. Do not
10968 call fatal. Check thread_db_use_events. Do not call
10969 change_inferior_id or new_thread_notify.
10970 (maybe_attach_thread): Update. Do not call new_thread_notify.
10971 (thread_db_init): Set thread_db_use_events. Check use_events.
10972 * utils.c (fatal, warning): Correct message prefix.
10973
30ed0a8f
DJ
109742007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10975
10976 * Makefile.in (clean): Remove new files.
10977 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10978 (powerpc-64.o, powerpc-64.c): New rules.
10979 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10980 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10981 with SPE.
10982 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10983 SPE targets.
10984 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10985 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10986 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10987 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10988 (target_regsets): Add AltiVec and SPE register sets.
10989 * configure.ac: Check for AltiVec and SPE.
10990 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10991 (ppc_fill_vrregset, ppc_store_vrregset): New.
10992 (target_regsets): Add AltiVec register set.
10993 * configure: Regenerated.
10994
fd462a61
DJ
109952007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10996
10997 * linux-low.c (O_LARGEFILE): Define.
10998 (linux_read_memory): Use /proc/PID/mem.
10999 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
11000 * configure, config.in: Regenerated.
11001
69f223ed
DJ
110022007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11003
11004 * linux-low.c (linux_wait_for_event): Do not pass signals while
11005 single-stepping.
11006
aec18585
PA
110072007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11008
11009 * win32-low.c (create_process): New.
11010 (win32_create_inferior): Use create_process instead of
11011 CreateProcess. If create_process failed retry appending an ".exe"
11012 suffix. Store the GetLastError result immediatelly after
11013 create_process calls and use it on the call to error.
11014
34d86ddd
PA
110152007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11016
11017 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11018
5a0e3bd0
JB
110192007-08-23 Joel Brobecker <brobecker@adacore.com>
11020
11021 * configure.ac: Switch license to GPLv3.
11022
f88c79e6
MS
110232007-08-01 Michael Snyder <msnyder@access-company.com>
11024
11025 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11026
6b3d9b83
PA
110272007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
11028
11029 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11030 typedef.
11031 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11032 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
11033 CloseToolhelp32Snapshot.
11034 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11035 CloseToolhelp32Snapshot.
11036
c588c53c
MS
110372007-07-27 Michael Snyder <michael.snyder@access-company.com>
11038
11039 * server.c (main): Check for inferior exit before main loop.
11040
aa0403d9
PA
110412007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
11042
11043 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11044 instead of on tmp_desc.
11045
255e7678
DJ
110462007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11047 Daniel Jacobowitz <dan@codesourcery.com>
11048
11049 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11050 (add_thread): Minor cleanups.
11051 (clear_inferiors): Move lower in the file. Clear the DLL
11052 list.
11053 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11054 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11055 (xml_escape_text): New.
11056 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11057 for qSupported.
11058 (handle_v_cont): Report errors.
11059 (gdbserver_version): Update.
11060 (main): Correct size of own_buf. Do not report initial DLL events.
11061 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11062 (unloaded_dll, xml_escape_text): New.
11063 * win32-low.c (enum target_waitkind): Update comments.
11064 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11065 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11066 (win32_EnumProcessModules, win32_GetModuleInformation)
11067 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11068 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11069 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11070 (win32_Module32First, win32_Module32Next, load_toolhelp)
11071 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11072 (get_child_debug_event): Handle DLL events.
11073 (win32_wait): Likewise.
11074
0d37add9
DJ
110752007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11076
11077 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11078 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11079
45e2715e
PA
110802007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11081
11082 * win32-low.c (handle_output_debug_string): Ignore event if not
11083 waiting.
11084
c5674cf1
PA
110852007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11086
11087 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11088
2bbe3cc1
DJ
110892007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11090
11091 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11092
ae13219e
DJ
110932007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11094
11095 * inferiors.c (change_inferior_id): Add comment.
11096 * linux-low.c (check_removed_breakpoint): Add an early
11097 prototype. Improve debug output.
11098 (linux_attach): Doc update.
11099 (linux_detach_one_process, linux_detach): Clean up before releasing
11100 each process.
11101 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11102 * linux-low.h (struct process_info): Doc improvement.
11103 * mem-break.c (delete_all_breakpoints): New.
11104 * mem-break.h (delete_all_breakpoints): New prototype.
11105 * thread-db.c (find_first_thread): New.
11106 (thread_db_create_event): Call it instead of
11107 thread_db_find_new_threads. Clean up unused variables.
11108 (maybe_attach_thread): Remove first thread handling.
11109 (thread_db_find_new_threads): Use find_first_thread.
11110 (thread_db_get_tls_address): Likewise.
11111
4105de34
DJ
111122007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11113
11114 * thread-db.c (thread_db_find_new_threads): Add prototype.
11115 (thread_db_create_event): Check for the main thread before adding
11116 a new thread.
11117 (maybe_attach_thread): Only enable event reporting if TID == 0.
11118 (thread_db_get_tls_address): Check for new threads.
11119
2b876972
DJ
111202007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11121
11122 * linux-low.c (linux_create_inferior): Try execv before execvp.
11123 * spu-low.c (spu_create_inferior): Likewise.
11124
7a245884
DJ
111252007-06-13 Mike Frysinger <vapier@gentoo.org>
11126
11127 * linux-low.c (linux_create_inferior): Change execv to execvp.
11128 * spu-low.c (spu_create_inferior): Likewies.
11129
117ce543
DJ
111302007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11131
11132 * Makefile.in (clean): Clean new files instead of deleted ones.
11133 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11134 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11135 rules.
11136 * configure.srv: Specify XML files and new regformats for MIPS and
11137 MIPS64 GNU/Linux.
11138 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11139 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11140 an entry for the restart register.
11141 (mips_cannot_fetch_register, mips_cannot_store_register)
11142 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11143 register names to match the XML descriptions.
11144 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11145 restart register instead of $0.
11146
0e7f50da
UW
111472007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11148 Markus Deuling <deuling@de.ibm.com>
11149
11150 * remote-utils.c (decode_xfer_write): New function.
11151 * server.h (decode_xfer_write): Add prototype.
11152 * server.c (handle_query): Add PACKET_LEN argument. Support
11153 qXfer:spu:read and qXfer:spu:write packets.
11154 (main): Pass packet_len to handle_query.
11155 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11156 * target.h (target_ops): Add qxfer_spu.
11157
374c1d38
UW
111582007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11159
11160 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11161 accessing non-seekable spufs files.
11162
bb63802a
UW
111632007-05-16 Markus Deuling <deuling@de.ibm.com>
11164
889bf7c5 11165 * server.c (handle_query): Add reply for qC packet.
bb63802a 11166
7390519e
PA
111672007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11168 Leo Zayas <lerele@champenstudios@com>
11169
11170 * server.h (check_remote_input_interrupt_request): New function.
11171 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11172 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11173 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11174 (check_remote_input_interrupt_request): New function.
11175 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 11176 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
11177 winapi_GenerateConsoleCtrlEvent): New typedefs.
11178 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11179 to 250 ms.
11180 (win32_wait): Check for remote interrupt request
11181 with check_remote_input_interrupt_request.
11182 (win32_request_interrupt): New function.
11183 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11184
34b34921
PA
111852007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11186
11187 * win32-low.c (debug_registers_changed,
11188 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11189 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11190 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11191 (thread_rec): Get context using the low target.
11192 (child_add_thread): Call thread_added on the low target,
11193 which does the same thing.
11194 (regptr): Delete.
11195 (do_initial_child_stuff): Remove debug registers references.
11196 Set context using the low target. Resume threads after
11197 setting the contexts.
11198 (child_continue): Remove dead variable. Remove debug
11199 registers references.
11200 (child_fetch_inferior_registers): Go through the low target.
11201 (do_child_store_inferior_registers): Remove.
11202 (child_store_inferior_registers): Go through the low target.
11203 (win32_resume): Remove debug registers references.
11204 Set context using the low target.
11205 (handle_exception): Change return type to void. Don't record
11206 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11207 first chance exception.
889bf7c5 11208 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
11209 goto loop. Always return after waiting for debug event.
11210 (win32_wait): Convert to switch statement. Handle spurious
11211 events.
11212
11213 * win32-i386-low.c (debug_registers_changed,
11214 debug_registers_used): New.
11215 (initial_stuff): Rename to ...
11216 (i386_initial_stuff): ... this. Clear debug registers
11217 state variables.
11218 (store_debug_registers): Delete.
11219 (i386_get_thread_context): New.
11220 (load_debug_registers): Delete.
11221 (i386_set_thread_context): New.
11222 (i386_thread_added): New.
11223 (single_step): Rename to ...
11224 (i386_single_step): ... this.
11225 (do_fetch_inferior_registers): Rename to ...
11226 (i386_fetch_inferior_register): ... this.
11227 (i386_store_inferior_register): New.
11228 (the_low_target): Adapt to new interface.
11229
11230 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11231 (arm_get_thread_context): New.
11232 (arm_set_thread_context): New.
11233 (regptr): New.
11234 (do_fetch_inferior_registers): Rename to ...
11235 (arm_fetch_inferior_register): ... this.
11236 (arm_store_inferior_register): New.
11237 (arm_wince_breakpoint): Reimplement as unsigned long.
11238 (arm_wince_breakpoint_len): Define.
11239 (the_low_target): Adapt to new interface.
11240
11241 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11242 load_debug_registers. Add get_thread_context, set_thread_context,
11243 thread_added and store_inferior_register. Rename
11244 fetch_inferior_registers to fetch_inferior_register.
11245 (regptr): Remove declaration.
11246
dd6953e1
PA
112472007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11248
11249 * linux-low.c (linux_detach): Change return type to int. Return 0.
11250 * spu-low.c (spu_detach): Likewise.
11251
444d6139
PA
112522007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11253
11254 * target.h (target_ops): Change return type of detach to int.
11255 Add join.
11256 (join_inferior): New.
11257 * server.c (main): Don't skip detach support on mingw32.
11258 If the inferior doesn't support detaching return error.
11259 Call join_inferior instead of using waitpid.
11260 * linux-low.c (linux_join): New.
11261 (linux_target_op): Add linux_join.
11262 * spu-low.c (spu_join): New.
11263 (spu_target_ops): Add spu_join.
11264 * win32-low.c (win32_detach): Adapt to new interface.
11265 Reopen current_process_handle before detaching. Issue a child
11266 resume before detaching.
11267 (win32_join): New.
11268 (win32_target_op): Add win32_join.
11269
1d5315fe
PA
112702007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11271
11272 * win32-low.c (win32-attach): Fix return value.
11273 * target.h (target_ops): Describe ATTACH return values.
11274
bf914831
PA
112752007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11276
11277 * win32-low.c (GETPROCADDRESS): Define.
11278 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11279 (winapi_DebugSetProcessKillOnExit): Likewise.
11280 (win32_create_inferior): Force usage of ansi CreateProcessA.
11281 (win32_attach): Use GETPROCADDRESS.
11282 (win32_detach): Likewise.
11283
f72f3e60
PA
112842007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11285
11286 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11287
ed50f18f
PA
112882007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11289
11290 * win32-low.c: Commit leftover changes from 2007-03-29.
11291
0c2ead7e
DJ
112922007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11293
11294 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11295 fields short instead of int. Add explicit padding.
11296 (i387_cache_to_fsave): Remove unnecessary casts.
11297 (i387_fsave_to_cache): Doc fix.
11298 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11299
73725ff3
DJ
113002007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11301
11302 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11303 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11304
d99f33d8
PA
113052007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11306
11307 * configure.srv (arm*-*-mingw32ce*): Move near the other
11308 arm targets.
11309
68070c10
PA
113102007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11311
2482afc6 11312 * configure.ac: Add errno checking.
68070c10
PA
11313 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11314 sys/file.h and malloc.h.
11315 (AC_CHECK_DECLS): Add perror.
11316 (srv_mingwce): Handle.
2482afc6 11317 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
11318 win32-i386-low.o to srv_tgtobj.
11319 (i[34567]86-*-mingw*): Likewise.
11320 (arm*-*-mingw32ce*): Add case.
11321 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11322 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11323 [__MINGW32CE__] (strerror): New function.
11324 [__MINGW32CE__] (errno): Define to GetLastError.
11325 [__MINGW32CE__] (COUNTOF): New macro.
11326 (remote_open): Remove extra close call.
11327 * mem-break.c (delete_breakpoint_at): New function.
11328 * mem-break.h (delete_breakpoint_at): Declare.
11329 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11330 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11331 [USE_WIN32API] (read, write): Add char* casts.
11332 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11333 * server.h: Include wincecompat.h on Windows CE.
11334 [HAVE_ERRNO_H]: Check.
11335 (perror): Declare if not declared.
11336 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11337 (perror_with_name): Remove errno declaration.
11338 * wincecompat.h: New.
11339 * wincecompat.c: New.
11340 * win32-low.h: New.
11341 * win32-arm-low.c: New.
11342 * win32-i386-low.c: New.
11343 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11344 (OUTMSG2): Make it safe.
11345 (_T): New macro.
11346 (COUNTOF): New macro.
11347 (NUM_REGS): Get it from the low target.
11348 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11349 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11350 (thread_rec): Let low target handle debug registers.
11351 (child_add_thread): Likewise.
11352 (child_init_thread_list): Likewise.
11353 (continue_one_thread): Likewise.
11354 (regptr): New.
11355 (do_child_fetch_inferior_registers): Move to ...
11356 * win32-i386-low.c: ... here, and rename to ...
11357 (do_fetch_inferior_registers): ... this.
889bf7c5 11358 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
11359 Go through the low target.
11360 (do_child_store_inferior_registers): Use regptr.
11361 (strwinerror): New function.
11362 (win32_create_inferior): Handle Windows CE.
11363 Use strwinerror instead of strerror on Windows error
11364 codes. Add program to the error output.
11365 Don't close the main thread handle on Windows CE.
11366 (win32_attach): Use coredll.dll on Windows CE.
11367 (win32_kill): Close current process and current
11368 thread handles.
11369 (win32_detach): Use coredll.dll on Windows CE.
11370 (win32_resume): Let low target handle debug registers, and
11371 step request.
11372 (handle_exception): Add/Remove initial breakpoint. Avoid
11373 non-existant WSTOPSIG on Windows CE.
11374 (win32_read_inferior_memory): Cast to remove warning.
11375 (win32_arch_string): Go through the low target.
11376 (initialize_low): Call set_breakpoint_data with the low
11377 target's breakpoint.
11378 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11379 FOP_REGNUM, mappings): Move to ...
11380 * win32-i386-low.c: ... here.
11381 * win32-low.c (win32_thread_info): Move to ...
11382 * win32-low.h: ... here.
11383 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11384 win32-arm-low.c and wincecompat.c.
11385 (all:): Add $EXEEXT.
11386 (install-only:): Likewise.
11387 (gdbserver:): Likewise.
11388 (gdbreplay:): Likewise.
11389 * config.in: Regenerate.
11390 * configure: Regenerate.
11391
41093d81
PA
113922007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11393
11394 * win32-low.c: Rename typedef thread_info to
11395 win32_thread_info throughout.
11396
544afa54
PA
113972007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11398
11399 * win32-i386-low.c: Rename to ...
11400 * win32-low.c: ... this.
11401 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11402 * Makefile.in: Likewise.
11403
bce7165d
PA
114042007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11405
11406 * remote-utils.c (monitor_output): Constify msg parameter.
11407 * server.h (monitor_output): Likewise.
11408 * win32-i386-low.c (handle_output_debug_string): New.
11409 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11410 handle_output_debug_string.
11411 (get_child_debug_event): Likewise.
11412
506c7aa0
DJ
114132007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11414
11415 * server.c (main): Correct strtoul check.
11416
42c81e2a
DJ
114172007-03-27 Jon Ringle <jon@ringle.org>
11418
11419 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11420
9453113a
DJ
114212007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11422
11423 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11424
64a69107
DJ
114252007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11426
11427 * terminal.h: Check HAVE_SGTTY_H.
11428
114292007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
11430
11431 * remote-utils.c (remote_open): Print out the assigned port number.
11432
c74d0ad8
DJ
114332007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11434
11435 * remote-utils.c (monitor_output): New function.
11436 * server.c (debug_threads): Define here.
11437 (monitor_show_help): New function.
11438 (handle_query): Handle qRcmd.
11439 (main): Do not handle 'd' packet.
11440 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11441 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11442 of debug_threads.
11443
de7c3b4a
PA
114442007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11445
11446 * Makefile.in (EXEEXT): New.
11447 (clean): Use $(EXEEXT).
11448
ef57601b
PA
114492007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11450
11451 * target.h (target_ops): Rename send_signal to request_interrupt,
11452 and remove enum target_signal parameter.
11453 * linux-low.c (linux_request_interrupt): Rename from
11454 linux_send_signal, and always send SIGINT.
11455 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11456 and always send SIGINT.
11457 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11458 of send_signal.
11459 (input_interrupt): Likewise.
11460
820f2bda
PA
114612007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11462
11463 * server.c (get_features_xml): Check if target implemented
11464 arch_string.
11465 * win32-i386-low.c (win32_arch_string): New.
11466 (win32_target_ops): Add win32_arch_string as arch_string member.
11467
ab39bf24
UW
114682007-02-22 Markus Deuling <deuling@de.ibm.com>
11469
11470 * spu-low.c (spu_arch_string): New.
11471 (spu_target_ops): Add spu_arch_string.
11472
61ff6e04
DJ
114732007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11474
11475 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11476 * configure.ac: Do not check for terminal.h.
11477 * configure, config.in: Regenerated.
11478
fb1e4ffc
DJ
114792007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11480
11481 * Makefile.in (OBS): Add $(XML_BUILTIN).
11482 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11483 (clean): Update.
11484 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11485 (arm-with-iwmmxt.c): New.
11486 * config.in, configure: Regenerate.
11487 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11488 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11489 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11490 (arm*-*-linux*): Add iWMMXt and regset support.
11491 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11492 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11493 (arm_store_wmmxregset, target_regsets): New.
11494 * server.c (get_features_xml): Take annex argument. Check builtin
11495 XML documents.
11496 (handle_query): Handle multiple annexes.
11497
0f48aa01
DJ
114982007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11499
11500 * remote-utils.c [USE_WIN32API] (read, write): Define.
11501 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11502 write.
11503
23181151
DJ
115042007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11505
11506 * linux-i386-low.c (the_low_target): Set arch_string.
11507 * linux-x86-64-low.c (the_low_target): Likewise.
11508 * linux-low.c (linux_arch_string): New.
11509 (linux_target_ops): Add it.
11510 * linux-low.h (struct linux_target_ops): Add arch_string.
11511 * server.c (write_qxfer_response): Use const void * for DATA.
11512 (get_features_xml): New.
11513 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11514 * target.h (struct target_ops): Add arch_string method.
11515
9d606399
DJ
115162007-01-03 Denis Pilat <denis.pilat@st.com>
11517 Daniel Jacobowitz <dan@codesourcery.com>
11518
11519 * linux-low.c (linux_kill): Handle being called with no threads.
11520 * win32-i386-low.c (win32_kill): Likewise.
11521 (get_child_debug_event): Clear current_process_handle.
11522
115232006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
11524 Daniel Jacobowitz <dan@codesourcery.com>
11525
11526 * remote-utils.c (remote_open): Check the type of specified
11527 serial port devices before opening them.
11528 * server.c (main): Kill the inferior if an error occurs during
11529 the first remote_open.
11530
a5e13d24
DJ
115312006-12-05 Markus Deuling <deuling@de.ibm.com>
11532
11533 * README: Update supported targets.
11534
186947f7
DJ
115352006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11536
11537 * Makefile.in (clean): Remove reg-mips64.c.
11538 (reg-mips64.c, reg-mips64.o): New rules.
11539 * configure.srv: Handle mips64. Include regset support for mips.
11540 * linux-mips-low.c (union mips_register): New.
11541 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11542 (mips_breakpoint, mips_breakpoint_at): Use int.
11543 (mips_collect_register, mips_supply_register)
11544 (mips_collect_register_32bit, mips_supply_register_32bit)
11545 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11546 (mips_store_fpregset, target_regsets): New.
11547 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11548
a13e2c95
UW
115492006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11550
11551 * configure.srv: Add target "spu*-*-*".
11552 * Makefile.in (clean): Remove reg-spu.c.
11553 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11554 * spu-low.c: New file.
11555
cb7283db
DJ
115562006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11557
11558 * configure.ac: Correct td_thr_tls_get_addr test.
11559 * configure: Regenerated.
11560
89be2091
DJ
115612006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11562
11563 * linux-low.c (linux_wait_for_event): Reformat. Use the
11564 pass_signals array.
11565 * remote-utils.c (decode_address_to_semicolon): New.
11566 * server.c (pass_signals, handle_general_set): New.
11567 (handle_query): Mention QPassSignals for qSupported.
11568 (main): Call handle_general_set.
11569 * server.h (pass_signals, decode_address_to_semicolon): New.
11570
000ef4f0
DJ
115712006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11572
11573 * server.c (handle_query): Correct error handling for read_auxv.
11574
b7149293
UW
115752005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11576
11577 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11578 and srv_linux_thread_db to yes.
11579 * linux-s390-low.c (s390_fill_gregset): New function.
11580 (target_regsets): Define data structure.
11581
dae5f5cf
DJ
115822006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11583
11584 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11585 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11586 * config.in, configure: Regenerated.
11587 * inferiors.c (gdb_id_to_thread): New function.
11588 (gdb_id_to_thread_id): Use it.
11589 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11590 * linux-low.h (struct process_info): Add th member.
11591 (thread_db_get_tls_address): New prototype.
11592 * remote-utils.c (decode_address): Make non-static.
11593 * server.c (handle_query): Handle qGetTLSAddr.
11594 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11595 * target.h (struct target_ops): Add get_tls_address.
11596 * thread-db.c (maybe_attach_thread): Save the thread handle.
11597 (thread_db_get_tls_address): New.
11598
32ca6d61
DJ
115992006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11600
11601 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11602 (linux_resume_one_process): Take a siginfo_t *. Update all
11603 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11604 (struct pending_signals): Add a siginfo_t.
11605 (linux_wait_for_process): Always set last_status.
11606 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11607 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11608 * linux-low.h (struct process_info): Add last_status.
11609
5ffff7c1
DJ
116102006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11611
11612 * remote-utils.c (try_rle): New function.
11613 (putpkt_binary): Use it.
11614
8695c747
DJ
116152006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11616
11617 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11618 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11619 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11620 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11621 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11622 point registers.
11623
290fadea
RS
116242006-08-08 Richard Sandiford <richard@codesourcery.com>
11625
11626 * server.c (terminal_fd): New variable.
11627 (old_foreground_pgrp): Likewise.
11628 (restore_old_foreground_pgrp): New function.
11629 (start_inferior): Record the terminal file descriptor in terminal_fd
11630 and its original foreground group in old_foreground_pgrp. Register
11631 restore_old_foreground_pgrp with atexit().
11632
9f2e1e63
DJ
116332006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11634
11635 * server.c (handle_query): Correct qPart to qXfer.
11636
b80864fb
DJ
116372006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11638
11639 * configure.ac: Check for more headers which are missing on
11640 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11641 * configure.srv: Add Cygwin and mingw32.
11642 * remote-utils.c: Don't include headers unconditionally which
11643 are missing on mingw32. Include <winsock.h> for mingw32.
11644 (remote_open): Adjust for mingw32 support. Flush
11645 standard error after writing to it.
11646 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11647 (unblock_async_io, enable_async_io, disable_async_io)
11648 (readchar, getpkt): Update for Winsock support.
11649 (prepare_resume_reply): Expect a protocol signal number.
11650 * server.c: Disable <sys/wait.h> on mingw32.
11651 (start_inferior): Adjust for mingw32 support. Flush
11652 standard error after writing to it.
11653 (attach_inferior): Likewise. Use protocol signal
11654 numbers.
11655 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11656 and names.
11657 * win32-i386-low.c: New file.
11658 * Makefile.in (XM_CLIBS): Set.
11659 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11660 (win32-i386-low.o): New dependency rule.
11661 * linux-low.c (linux_wait): Use target signal numbers.
11662 * target.h (struct target_ops): Doc fix.
11663 * server.h (target_signal_to_name): New prototype.
11664 * gdbreplay.c: Don't include headers unconditionally which
11665 are missing on mingw32. Include <winsock.h> for mingw32.
11666 (remote_close, remote_open): Adjust for Winsock support.
11667 * configure, config.in: Regenerated.
11668
0876f84a
DJ
116692006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11670
11671 * server.c (decode_xfer_read, write_qxfer_response): New.
11672 (handle_query): Take a packet length argument. Handle
11673 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11674 the qSupported response.
11675 (main): Update call to handle_query.
11676
01f9e8fa
DJ
116772006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11678
11679 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11680 (putpkt_binary): Renamed from putpkt and adjusted for binary
11681 data.
11682 (putpkt): New wrapper for putpkt_binary.
11683 (readchar): Don't mask off the high bit.
11684 (decode_X_packet): New function.
11685 * server.c (main): Call putpkt_binary if a handler sets the packet
11686 length. Save the length of the incoming packet. Handle 'X'.
11687 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11688
be2a5f71
DJ
116892006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11690
11691 * server.c (handle_query): Handle qSupported.
11692
ea025f5f
DJ
116932006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11694
11695 * remote-utils.c (all_symbols_looked_up): New variable.
11696 (look_up_one_symbol): Check it.
11697 * server.h (look_up_one_symbol): New declaration.
11698 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11699
9308fc88
DJ
117002006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11701
11702 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 11703 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
11704 (PTRACE_GET_THREAD_AREA): Define.
11705 (ps_get_thread_area): New function.
11706
52fb6437
NS
117072006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11708
11709 * configure.srv (m68k*-*-uclinux*): New target.
11710 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11711 (linux_resume_one_process): Remove extraneous cast.
11712 (linux_read_offsets): New.
11713 (linux_target_op): Add linux_read_offsets on mmuless systems.
11714 * server.c (handle_query): Add qOffsets logic.
11715 * target.h (struct target_ops): Add read_offsets.
11716
21b0f40c
DJ
117172006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11718
11719 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11720 (PTRACE_GET_THREAD_AREA): Define.
11721 (ps_get_thread_area): New function.
11722 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11723 (linux-x86-64-low.o): Update.
11724
0050a760
DJ
117252006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11726
11727 * configure.ac: Remove checks for prfpregset_t.
11728 * gdb_proc_service.h: New file.
11729 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11730 new "gdb_proc_service.h".
11731 * proc-service.c: Likewise.
11732 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11733 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11734 * Makefile.in (gdb_proc_service_h): Updated.
11735 * configure, config.in: Regenerated.
11736
b92a518e
DJ
117372006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11738
11739 * remote-utils.c (prepare_resume_reply): Move declaration
11740 of gdb_id_from_wait to the top of the block.
11741
545587ee
DJ
117422006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11743
11744 * linux-low.c (regsets_store_inferior_registers): Read the regset
11745 from the target before filling it.
11746
9db87ebd
DJ
117472006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11748
11749 * server.c (attach_inferior): Return SIGTRAP for a successful
11750 attach.
11751
dd24457d
DJ
117522006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11753
11754 * Makefile.in (OBS): Add version.o.
11755 (STAGESTUFF): Delete.
11756 (version.o): Add dependencies.
11757 (version.c): Replace rule.
11758 (clean): Remove version.c.
11759 * server.c (gdbserver_version): New.
11760 (gdbserver_usage): Use printf.
11761 (main): Handle --version and --help.
11762 * server.h (version, host_name): Add declarations.
11763
6f0f660e
EZ
117642005-12-23 Eli Zaretskii <eliz@gnu.org>
11765
889bf7c5
PA
11766 * linux-arm-low.c:
11767 * linux-arm-low.c:
11768 * inferiors.c:
11769 * i387-fp.h:
11770 * i387-fp.c:
11771 * gdbreplay.c:
11772 * regcache.c:
11773 * proc-service.c:
11774 * mem-break.h:
11775 * mem-break.c:
11776 * linux-x86-64-low.c:
11777 * linux-sh-low.c:
11778 * linux-s390-low.c:
11779 * linux-ppc64-low.c:
11780 * linux-ppc-low.c:
11781 * linux-mips-low.c:
11782 * linux-m68k-low.c:
11783 * linux-m32r-low.c:
11784 * linux-low.h:
11785 * linux-low.c:
11786 * linux-ia64-low.c:
11787 * linux-i386-low.c:
11788 * linux-crisv32-low.c:
11789 * thread-db.c:
11790 * terminal.h:
11791 * target.h:
11792 * target.c:
11793 * server.h:
11794 * server.c:
11795 * remote-utils.c:
11796 * regcache.h:
11797 * utils.c:
11798 * Makefile.in:
11799 * configure.ac:
6f0f660e
EZ
11800 * gdbserver.1: Add (C) after Copyright. Update the FSF
11801 address.
11802
9d1fb177
DJ
118032005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11804
11805 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11806 (arm_breakpoint_at): Recognize both breakpoints.
11807 (the_low_target): Use the correct breakpoint instruction.
11808
011a70c2
DJ
118092005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11810
11811 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11812 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11813 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11814 (the_low_target): Update.
11815
7fb85e41
AS
118162005-10-25 Andreas Schwab <schwab@suse.de>
11817
11818 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11819
11820 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11821 (ia64_num_regs): Reduce to 462.
11822
3db0444b
DJ
118232005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11824
11825 * acinclude.m4: Correct quoting.
11826 * aclocal.m4: Regenerated.
11827
11828 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11829 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11830 (thread_db_init): Call thread_db_err_str.
11831 * configure.ac: Check for TD_VERSION.
11832 * config.in, configure: Regenerated.
11833
bee0189a
DJ
118342005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11835
11836 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11837
e9d25b98
DJ
118382005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11839
11840 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11841 is not available. Define HAVE_PTRACE_GETREGS if it is.
11842 * config.in, configure: Regenerated.
11843 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11844 * linux-i386-low.c, linux-m68k-low.c: Update to use
11845 HAVE_PTRACE_GETREGS.
11846 * linux-low.c (regsets_fetch_inferior_registers)
11847 (regsets_store_inferior_registers): Only return 0 if we processed
11848 GENERAL_REGS.
11849 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11850 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11851
a06660f7
DJ
118522005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11853
11854 * inferiors.c (struct thread_info): Add gdb_id.
11855 (add_thread): Add gdb_id argument.
11856 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11857 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11858 calls to add_thread.
11859 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11860 * server.c (handle_query): Use thread_to_gdb_id.
11861 (handle_v_cont, main): Use gdb_id_to_thread_id.
11862 * server.h (add_thread): Update prototype.
11863 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11864 prototypes.
11865
5a1f5858
DJ
118662005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11867
11868 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11869 left-padded registers.
11870 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11871 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11872
e122f1f5
SE
118732005-07-01 Steve Ellcey <sje@cup.hp.com>
11874
11875 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11876 * configure: Regenerate.
11877 * config.in: Regenerate.
11878 * server.h (NEED_DECLARATION_STRERROR):
11879 Replace with !HAVE_DECL_STRERROR.
11880
d592fa2f
DJ
118812005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11882
11883 * linux-low.c (linux_wait, linux_send_signal): Don't test
11884 an unsigned long variable for > 0 if it could be MAX_ULONG.
11885 * server.c (myresume): Likewise.
11886 * target.c (set_desired_inferior): Likewise.
11887
ccbd4912
MK
118882005-06-13 Mark Kettenis <kettenis@gnu.org>
11889
11890 * configure.ac: Simplify and improve check for socklen_t.
11891 * configure, config.in: Regenerate.
11892
f450004a
DJ
118932005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11894
11895 * acconfig.h: Remove.
11896 * configure.ac: Add a test for socklen_t. Use three-argument
11897 AC_DEFINE throughout.
11898 * config.in: Regenerated using autoheader 2.59.
11899 * configure: Regenerated.
11900
11901 * gdbreplay.c (socklen_t): Provide a default.
11902 (remote_open): Use socklen_t.
11903 * remote-utils.c (socklen_t): Provide a default.
11904 (remote_open): Use socklen_t.
11905 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11906 unsigned char.
11907
11908 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11909 char for buffers.
11910 * linux-low.c (linux_read_memory, linux_write_memory)
11911 (linux_read_auxv): Likewise.
11912 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11913 (check_mem_write): Likewise.
11914 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11915 Likewise.
11916 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11917 (registers_from_string, register_data): Likewise.
11918 * server.c (handle_query, main): Likewise.
11919 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11920 (decode_M_packet): Likewise.
11921 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11922 * target.h (struct target_ops): Update read_memory, write_memory,
11923 and read_auxv.
11924 (read_inferior_memory, write_inferior_memory): Update.
11925 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11926 to unsigned char *.
11927 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11928 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11929 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11930 linux-s390-low.c, linux-sh-low.c: Update for changes in
11931 read_inferior_memory and the_low_target->breakpoint.
11932
eee84df1
DJ
119332005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11934
11935 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11936 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11937 * configure.srv: Add powerpc64-*-linux*.
11938 * linux-ppc64-low.c: New file.
11939
45b134e5
OF
119402005-05-23 Orjan Friberg <orjanf@axis.com>
11941
11942 * linux-cris-low.c: New file with support for CRIS.
11943 * linux-crisv32-low.c: Ditto for CRISv32.
11944 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11945 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 11946 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
11947 reg-crisv32.o, and reg-crisv32.c to make rules.
11948 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11949 recognized targets.
11950
48d93c75
UW
119512005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11952
11953 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11954 of sizeof (PTRACE_XFER_TYPE).
11955 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11956
e013ee27
OF
119572005-05-12 Orjan Friberg <orjanf@axis.com>
11958
889bf7c5 11959 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
11960 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11961 pointers for hardware watchpoint support.
11962 * linux-low.h (struct linux_target_ops): Ditto.
11963 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11964 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11965 to linux_target_ops.
11966 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11967 reply packet.
11968 * server.c (main): Recognize 'Z' and 'z' packets.
11969
b0ded00b
UW
119702005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11971
11972 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11973 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11974 (the_low_target): Add new members.
11975
8643e2ad
DJ
119762005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11977
11978 * proc-service.c (ps_lgetregs): Search all_processes instead of
11979 all_threads.
11980
fc620387
DJ
119812005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11982
11983 * server.c (start_inferior): Change return type to int.
11984 (attach_inferior): Change sigptr to int *.
11985 (handle_v_cont, handle_v_requests): Change signal to int *.
11986 (main): Change signal to int.
11987
119882005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
11989
11990 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11991 * configure.srv: Add m32r*-*-linux*.
11992 * linux-m32r-low.c: New file.
11993
e0e76420
DJ
119942005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11995
11996 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11997
a1928bad
DJ
119982005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11999
12000 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12001 Take unsigned long arguments for PIDs.
12002 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12003 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12004 (wait_for_sigstop, linux_resume_one_process)
12005 (regsets_fetch_inferior_registers, linux_send_signal)
12006 (linux_read_auxv): Likewise. Update the types of variables holding
12007 PIDs. Update format string specifiers.
12008 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12009 * remote-utils.c (prepare_resume_reply): Likewise.
12010 * server.c (cont_thread, general_thread, step_thread)
12011 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12012 unsigned long.
12013 (handle_query): Update format specifiers.
12014 (handle_v_cont, main): Use strtoul for thread IDs.
12015 * server.h (struct inferior_list_entry): Use unsigned long for ID.
12016 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12017 (general_thread, step_thread, thread_from_wait)
12018 (old_thread_from_wait): Update.
12019 * target.h (struct thread_resume): Use unsigned long for THREAD.
12020 (struct target_ops): Use unsigned long for arguments to attach and
12021 thread_alive.
12022
dcdb98d2
DJ
120232005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
12024
12025 * acinclude.m4: Include bfd/bfd.m4 directly.
12026 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
12027 <agriffis@toolchain.org>.
12028 * aclocal.m4, configure: Regenerated.
12029
bec39cab
AC
120302005-01-07 Andrew Cagney <cagney@gnu.org>
12031
12032 * configure.ac: Rename configure.in, require autoconf 2.59.
12033 * configure: Re-generate.
12034
434c4c77
DJ
120352004-12-08 Daniel Jacobowitz <dan@debian.org>
12036
12037 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
12038 LIBS when finished.
12039 * aclocal.m4: Regenerated.
12040 * configure: Regenerated.
12041
db1d3e1b
AS
120422004-11-21 Andreas Schwab <schwab@suse.de>
12043
12044 * linux-m68k-low.c (m68k_num_gregs): Define.
12045 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12046 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12047 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12048 (m68k_breakpoint_at): New. Add to the_low_target.
12049
12050 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12051 srv_linux_thread_db to yes.
12052
43360365
JB
120532004-10-20 Joel Brobecker <brobecker@gnat.com>
12054
12055 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12056 (ARCH_SET_FS): Likewise.
12057 (ARCH_GET_FS): Likewise.
12058 (ARCH_GET_GS): Likewise.
12059
fd500816
DJ
120602004-10-16 Daniel Jacobowitz <dan@debian.org>
12061
12062 * linux-i386-low.c (ps_get_thread_area): New.
12063 * linux-x86-64-low.c (ps_get_thread_area): New.
12064 * linux-low.c: Include <sys/syscall.h>.
12065 (linux_kill_one_process): Don't kill the first thread here.
12066 (linux_kill): Kill the first thread here.
12067 (kill_lwp): New function.
12068 (send_sigstop, linux_send_signal): Use it.
12069 * proc-service.c: Clean up #ifdefs.
12070 (fpregset_info): Delete.
12071 (ps_lgetregs): Update and enable implementation.
12072 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12073 implementations.
12074 * remote-utils.c (struct sym_cache, symbol_cache): New.
12075 (input_interrupt): Print a clearer message.
12076 (async_io_enabled): New variable.
12077 (enable_async_io, disable_async_io): Use it. Update comments.
12078 (look_up_one_symbol): Use the symbol cache.
12079 * thread-db.c (thread_db_look_up_symbols): New function.
12080 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12081
f6de3c42
DJ
120822004-10-16 Daniel Jacobowitz <dan@debian.org>
12083
12084 * configure.in: Test for -rdynamic.
12085 * configure: Regenerated.
12086 * Makefile (INTERNAL_LDFLAGS): New.
12087 (gdbserver, gdbreplay): Use it.
12088
2c0fc042
AC
120892004-09-02 Andrew Cagney <cagney@gnu.org>
12090
12091 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12092
075b3282
DJ
120932004-03-23 Daniel Jacobowitz <drow@mvista.com>
12094
12095 * linux-low.c (linux_wait): Clear all_processes list also.
12096
fa6a77dc
DJ
120972004-03-12 Daniel Jacobowitz <drow@mvista.com>
12098
12099 * linux-low.c: Include <errno.h>. Remove extern declaration of
12100 errno.
12101
6d782a97
DJ
121022004-03-12 Daniel Jacobowitz <drow@mvista.com>
12103
12104 * gdbreplay.c, server.h, utils.c: Update copyright years.
12105
3a7fb99b
DJ
121062004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12107
12108 * server.c (main): Print child status or termination signal from
12109 variable 'signal', not 'sig'.
12110
c3e735a6
DJ
121112004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12112
12113 * linux-low.c (linux_read_memory): Change return type to
12114 int. Check for and return error from ptrace().
12115 * target.c (read_inferior_memory): Change return type to int. Pass
12116 back return status from the_target->read_memory().
12117 * target.h (struct target_ops): Adapt *read_memory() prototype.
12118 Update comment.
12119 (read_inferior_memory): Adapt prototype.
12120 * server.c (main): Return an error packet if
12121 read_inferior_memory() returns an error.
12122
a59d1c82
DJ
121232004-03-04 Daniel Jacobowitz <drow@mvista.com>
12124
12125 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12126 Unify with other clean targets.
12127
dc3f8883
DJ
121282004-02-29 Daniel Jacobowitz <drow@mvista.com>
12129
12130 * server.c (handle_v_cont): Call set_desired_inferior.
12131
89a208da
DJ
121322004-02-29 Daniel Jacobowitz <drow@mvista.com>
12133
12134 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12135
62ea82f5
DJ
121362004-02-29 Daniel Jacobowitz <drow@mvista.com>
12137
12138 * linux-low.c (linux_wait): Unblock async I/O.
12139 (linux_resume): Block and enable async I/O.
12140 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12141 * server.h (block_async_io, unblock_async_io): Add prototypes.
12142
6910d122
DJ
121432004-02-29 Daniel Jacobowitz <drow@mvista.com>
12144
12145 * remote-utils.c (remote_open): Print a status notice after
12146 opening a TCP port.
12147 * server.c (attach_inferior): Print a status notice after
12148 attaching.
12149
121502004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
12151
12152 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12153
c89dc5d4
DJ
121542004-02-26 Daniel Jacobowitz <drow@mvista.com>
12155
12156 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12157 error packet.
12158 * server.c, target.h: Update copyright years.
12159
4b8dad4a
RM
121602004-02-25 Roland McGrath <roland@redhat.com>
12161
12162 * target.h (struct target_ops): New member `read_auxv'.
12163 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12164 * linux-low.c (linux_read_auxv): New function.
12165 (linux_target_ops): Initialize `read_auxv' member to that.
12166
d7446758
JB
121672004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12168
12169 Committed by Jim Blandy <jimb@redhat.com>.
12170
12171 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 12172 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
12173 instead of GPR_SIZE to distiguish s390 and s390x targets.
12174
5544ad89
DJ
121752004-01-31 Daniel Jacobowitz <drow@mvista.com>
12176
12177 * linux-low.c: Update copyright year.
12178 (check_removed_breakpoint): Clear pending_is_breakpoint.
12179 (linux_set_resume_request, linux_queue_one_thread)
12180 (resume_status_pending_p): New functions.
12181 (linux_continue_one_thread): Use process->resume.
12182 (linux_resume): Only resume threads if there are no pending events.
12183 * linux-low.h (struct process_info): Add resume request
12184 pointer.
12185
2a68b70e
DJ
121862004-01-30 Daniel Jacobowitz <drow@mvista.com>
12187
12188 * regcache.c (new_register_cache): Clear the allocated register
12189 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12190
64386c31
DJ
121912003-10-13 Daniel Jacobowitz <drow@mvista.com>
12192
12193 * linux-low.c (linux_resume): Take a struct thread_resume *
12194 argument.
12195 (linux_wait): Update call.
12196 (resume_ptr): New static variable.
12197 (linux_continue_one_thread): Renamed from
12198 linux_continue_one_process. Use resume_ptr.
12199 (linux_resume): Use linux_continue_one_thread.
12200 * server.c (handle_v_cont, handle_v_requests): New functions.
12201 (myresume): New function.
12202 (main): Handle 'v' case.
12203 * target.h (struct thread_resume): New type.
12204 (struct target_ops): Change argument of "resume" to struct
12205 thread_resume *.
12206 (myresume): Delete macro.
12207
c938e9b0
L
122082003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12209
12210 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12211 (uninstall): Support DESTDIR.
12212
7f313d07
BC
12213Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12214
12215 * configure.srv: Add xscale*linux copy of arm*linux entry.
12216
3b2fc2ea
DJ
122172003-07-24 Daniel Jacobowitz <drow@mvista.com>
12218
12219 * linux-arm-low.c (arm_reinsert_addr): New function.
12220 (the_low_target): Add arm_reinsert_addr.
12221
1c0a559e
MK
122222003-07-08 Mark Kettenis <kettenis@gnu.org>
12223
12224 * mem-break.c: Remove whitespace at end of file.
12225
43d5792c
DJ
122262003-06-28 Daniel Jacobowitz <drow@mvista.com>
12227
12228 * configure.in: Check whether we need to prototype strerror.
12229 * server.h: Optionally prototype strerror.
12230 * gdbreplay.c (perror_with_name): Use strerror.
12231 * linux-low.c (linux_attach_lwp): Use strerror.
12232 * utils.c (perror_with_name): Use strerror.
12233 * config.in, configure: Regenerated.
12234
c8a86edf
DJ
122352003-06-28 Daniel Jacobowitz <drow@mvista.com>
12236
12237 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12238 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12239
73d37363
DJ
122402003-06-20 Daniel Jacobowitz <drow@mvista.com>
12241
12242 * Makefile.in (SFILES): Update.
12243 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12244 low-sun3.c: Remove files.
12245
6ad8ae5c
DJ
122462003-06-17 Daniel Jacobowitz <drow@mvista.com>
12247
12248 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12249 (linux_detach_one_process, linux_detach): New functions.
12250 (linux_target_ops): Add linux_detach.
12251 * server.c (main): Handle 'D' packet.
12252 * target.h (struct target_ops): Add "detach" member.
12253 (detach_inferior): Define.
12254
1581182a
MK
122552003-06-13 Mark Kettenis <kettenis@gnu.org>
12256
12257 From Kelley Cook <kelleycook@wideopenwest.com>:
12258 * configure.srv: Accept i[34567]86 variants.
12259
e5379b03
DJ
122602003-06-05 Daniel Jacobowitz <drow@mvista.com>
12261
12262 * linux-low.c (linux_wait_for_event): Correct comment typos.
12263 (linux_resume_one_process): Call check_removed_breakpoint.
12264 (linux_send_signal): New function.
12265 (linux_target_ops): Add linux_send_signal.
12266 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12267 of kill.
12268 * target.h (struct target_ops): Add send_signal.
12269
2ff29de4
JB
122702003-05-29 Jim Blandy <jimb@redhat.com>
12271
12272 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12273 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12274 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12275 away part of the register's value.
12276
254787d4
DJ
122772003-03-26 Daniel Jacobowitz <drow@mvista.com>
12278
12279 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12280 (linux_wait_for_event, linux_init_signals): Likewise.
12281
94e10508
DJ
122822003-03-17 Daniel Jacobowitz <drow@mvista.com>
12283
12284 * configure.in: Check for stdlib.h.
12285 * configure: Regenerated.
12286 * config.in: Regenerated.
12287
4c0711e0
DJ
122882003-01-04 Andreas Schwab <schwab@suse.de>
12289
12290 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12291
ef66e766
AC
122922003-01-02 Andrew Cagney <ac131313@redhat.com>
12293
12294 * Makefile.in: Remove obsolete code.
12295
a1358604
DJ
122962002-11-20 Daniel Jacobowitz <drow@mvista.com>
12297
12298 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12299 defined(PT_FPR0_HI).
12300
23ce3b1c
DJ
123012002-11-17 Stuart Hughes <seh@zee2.com>
12302
12303 * linux-arm-low.c (arm_num_regs): Increase.
12304 (arm_regmap): Include status register.
12305
123062002-11-17 Daniel Jacobowitz <drow@mvista.com>
12307
12308 * linux-low.c (register_addr): Remove incorrect -1 check.
12309
a9fa9f7d
DJ
123102002-08-29 Daniel Jacobowitz <drow@mvista.com>
12311
12312 * linux-low.c (linux_create_inferior): Call setpgid. Return
12313 the new PID.
12314 (unstopped_p, linux_signal_pid): Remove.
12315 (linux_target_ops): Remove linux_signal_pid.
12316 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12317 global instead of target method.
12318 * target.h (struct target_ops): Remove signal_pid. Update comment
12319 for create_inferior.
12320 * server.c (signal_pid): New variable.
12321 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 12322 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
12323 (attach_inferior): Set signal_pid.
12324
17574093
DJ
123252002-08-23 Daniel Jacobowitz <drow@mvista.com>
12326
12327 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12328
123292002-08-20 Jim Blandy <jimb@redhat.com>
12330
12331 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12332 default for this.
12333
123342002-08-01 Andrew Cagney <cagney@redhat.com>
12335
12336 * Makefile.in: Make chill references obsolete.
12337
123382002-07-24 Kevin Buettner <kevinb@redhat.com>
12339
12340 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12341 * configure: Regenerate.
12342 * config.in: Regenerate.
12343
123442002-07-09 David O'Brien <obrien@FreeBSD.org>
12345
12346 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12347 (perror_with_name, remote_close, remote_open, expect, play): Static.
12348
123492002-07-04 Michal Ludvig <mludvig@suse.cz>
12350
4b8dad4a 12351 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
12352 byte offsets instead of an array of indexes.
12353 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12354
123552002-06-13 Daniel Jacobowitz <drow@mvista.com>
12356
12357 * regcache.c: Add comment.
12358
123592002-06-11 Daniel Jacobowitz <drow@mvista.com>
12360
12361 * thread-db.c: New file.
12362 * proc-service.c: New file.
12363 * acinclude.m4: New file.
12364 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12365 proc-service.o, and thread-db.o.
12366 (linux-low.o): Add USE_THREAD_DB.
12367 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12368 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12369 * aclocal.m4: Regenerated.
12370 * config.in: Regenerated.
12371 * configure: Regenerated.
12372 * configure.in: Check for proc_service.h, sys/procfs.h,
12373 thread_db.h, and linux/elf.h headrs.
12374 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12375 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12376 Check for -lthread_db and thread support.
12377 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12378 PowerPC, and SuperH.
12379 * i387-fp.c: Constify arguments.
12380 * i387-fp.h: Likewise.
12381 * inferiors.c: (struct thread_info): Renamed from
12382 `struct inferior_info'. Remove PID member. Use generic inferior
12383 list header. All uses updated.
12384 (inferiors, signal_pid): Removed.
12385 (all_threads): New variable.
12386 (get_thread): Define.
12387 (add_inferior_to_list): New function.
12388 (for_each_inferior): New function.
12389 (change_inferior_id): New function.
12390 (add_inferior): Removed.
12391 (remove_inferior): New function.
12392 (add_thread): New function.
12393 (free_one_thread): New function.
12394 (remove_thread): New function.
12395 (clear_inferiors): Use for_each_inferior and free_one_thread.
12396 (find_inferior): New function.
12397 (find_inferior_id): New function.
12398 (inferior_target_data): Update argument type.
12399 (set_inferior_target_data): Likewise.
12400 (inferior_regcache_data): Likewise.
12401 (set_inferior_regcache_data): Likewise.
12402 * linux-low.c (linux_bp_reinsert): Remove.
12403 (all_processes, stopping_threads, using_thrads)
12404 (struct pending_signals, debug_threads, pid_of): New.
12405 (inferior_pid): Replace with macro.
12406 (struct inferior_linux_data): Remove.
12407 (get_stop_pc, add_process): New functions.
12408 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12409 Use add_process and add_thread.
12410 (linux_attach_lwp): New function, based on old linux_attach. Use
12411 add_process and add_thread. Set stop_expected for new threads.
12412 (linux_attach): New function.
12413 (linux_kill_one_process): New function.
12414 (linux_kill): Kill all LWPs.
12415 (linux_thread_alive): Use find_inferior_id.
12416 (check_removed_breakpoints, status_pending_p): New functions.
12417 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12418 Update. Use WNOHANG. Wait for cloned processes also. Update process
12419 struct for the found process.
12420 (linux_wait_for_event): New function.
12421 (linux_wait): Use it. Support LWPs.
12422 (send_sigstop, wait_for_sigstop, stop_all_processes)
12423 (linux_resume_one_process, linux_continue_one_process): New functions.
12424 (linux_resume): Support LWPs.
12425 (REGISTER_RAW_SIZE): Remove.
12426 (fetch_register): Use register_size instead. Call supply_register.
12427 (usr_store_inferior_registers): Likewise. Call collect_register.
12428 Fix recursive case.
12429 (regsets_fetch_inferior_registers): Improve error message.
12430 (regsets_store_inferior_registers): Add debugging.
12431 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12432 (unstopped_p, linux_signal_pid): New functions.
12433 (linux_target_ops): Add linux_signal_pid.
12434 (linux_init_signals): New function.
12435 (initialize_low): Call it. Initialize using_threads.
12436 * regcache.c (inferior_regcache_data): Add valid
12437 flag.
12438 (get_regcache): Fetch registers lazily. Add fetch argument
12439 and update all callers.
12440 (regcache_invalidate_one, regcache_invalidate): New
12441 functions.
12442 (new_register_cache): Renamed from create_register_cache.
12443 Return the new regcache.
12444 (free_register_cache): Change argument to a void *.
12445 (registers_to_string, registers_from_string): Call get_regcache
12446 with fetch flag set.
12447 (register_data): Make static. Pass fetch flag to get_regcache.
12448 (supply_register): Call get_regcache with fetch flag clear.
12449 (collect_register): Call get_regcache with fetch flag set.
12450 (collect_register_as_string): New function.
12451 * regcache.h: Update.
12452 * remote-utils.c (putpkt): Flush after debug output and use
12453 stderr.
12454 Handle input interrupts while waiting for an ACK.
12455 (input_interrupt): Use signal_pid method.
12456 (getpkt): Flush after debug output and use stderr.
12457 (outreg): Use collect_register_as_string.
12458 (new_thread_notify, dead_thread_notify): New functions.
12459 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12460 and general_thread.
12461 (look_up_one_symbol): Flush after debug output.
12462 * server.c (step_thread, server_waiting): New variables.
12463 (start_inferior): Don't use signal_pid. Update call to mywait.
12464 (attach_inferior): Update call to mywait.
12465 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12466 (main): Don't fetch/store registers explicitly. Use
12467 set_desired_inferior. Support proposed ``Hs'' packet. Update
12468 calls to mywait.
12469 * server.h: Update.
12470 (struct inferior_list, struct_inferior_list_entry): New.
12471 * target.c (set_desired_inferior): New.
12472 (write_inferior_memory): Constify.
12473 (mywait): New function.
12474 * target.h: Update.
12475 (struct target_ops): New signal_pid method.
12476 (mywait): Removed macro, added prototype.
12477
12478 * linux-low.h (regset_func): Removed.
12479 (regset_fill_func, regset_store_func): New.
12480 (enum regset_type): New.
12481 (struct regset_info): Add type field. Use new operation types.
12482 (struct linux_target_ops): stop_pc renamed to get_pc.
12483 Add decr_pc_after_break and breakpoint_at.
12484 (get_process, get_thread_proess, get_process_thread)
12485 (strut process_info, all_processes, linux_attach_lwp)
12486 (thread_db_init): New.
12487
12488 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12489 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12490 (the_low_target): Add new members.
12491 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12492 (i386_store_fpxregset): Constify.
12493 (target_regsets): Add new kind identifier.
12494 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12495 (i386_set_pc): Add debugging.
12496 (i386_breakpoint_at): New function.
12497 (the_low_target): Add new members.
12498 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12499 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12500 (mips_breakpoint_at): New.
12501 (the_low_target): Add new members.
12502 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12503 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12504 (the_low_target): Add new members.
12505 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12506 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12507 (the_low_target): Add new members.
12508 * linux-x86-64-low.c (target_regsets): Add new kind
12509 identifier.
12510
125112002-05-15 Daniel Jacobowitz <drow@mvista.com>
12512
12513 From Martin Pool <mbp@samba.org>:
12514 * server.c (gdbserver_usage): New function.
12515 (main): Call it.
12516
125172002-05-14 Daniel Jacobowitz <drow@mvista.com>
12518
12519 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12520 stop_at -> stop_pc.
12521
125222002-05-04 Andrew Cagney <ac131313@redhat.com>
12523
12524 * Makefile.in: Remove obsolete code.
12525
125262002-04-24 Michal Ludvig <mludvig@suse.cz>
12527
12528 * linux-low.c (regsets_fetch_inferior_registers),
12529 (regsets_store_inferior_registers): Removed cast to int from
12530 ptrace() calls.
12531 * regcache.h: Added declaration of struct inferior_info.
12532
125332002-04-20 Daniel Jacobowitz <drow@mvista.com>
12534
12535 * inferiors.c (struct inferior_info): Add regcache_data.
12536 (add_inferior): Call create_register_cache.
12537 (clear_inferiors): Call free_register_cache.
12538 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12539 * regcache.c (struct inferior_regcache_data): New.
12540 (registers): Remove.
12541 (get_regcache): New function.
12542 (create_register_cache, free_register_cache): New functions.
12543 (set_register_cache): Don't initialize the register cache here.
12544 (registers_to_string, registers_from_string, register_data): Call
12545 get_regcache.
12546 * regcache.h: Add prototypes.
12547 * server.h: Likewise.
12548
125492002-04-20 Daniel Jacobowitz <drow@mvista.com>
12550
12551 * mem-break.c: New file.
12552 * mem-break.h: New file.
12553 * Makefile.in: Add mem-break.o rule; update server.h
12554 dependencies.
12555 * inferiors.c (struct inferior_info): Add target_data
12556 member.
12557 (clear_inferiors): Free target_data member if set.
12558 (inferior_target_data, set_inferior_target_data): New functions.
12559 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12560 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12561 * linux-low.c (linux_bp_reinsert): New variable.
12562 (struct inferior_linux_data): New.
12563 (linux_create_inferior): Use set_inferior_target_data.
12564 (linux_attach): Likewise. Call add_inferior.
12565 (linux_wait_for_one_inferior): New function.
12566 (linux_wait): Call it.
12567 (linux_write_memory): Add const.
12568 (initialize_low): Call set_breakpoint_data.
12569 * linux-low.h (struct linux_target_ops): Add breakpoint
12570 handling members.
12571 * server.c (attach_inferior): Remove extra add_inferior
12572 call.
12573 * server.h: Include mem-break.h. Update inferior.c
12574 prototypes.
12575 * target.c (read_inferior_memory)
12576 (write_inferior_memory): New functions.
12577 * target.h (read_inferior_memory)
12578 (write_inferior_memory): Change macros to prototypes.
12579 (struct target_ops): Update comments. Add const to write_memory
12580 definition.
12581
125822002-04-11 Daniel Jacobowitz <drow@mvista.com>
12583
12584 * linux-low.c (usr_store_inferior_registers): Support
12585 registers which are allowed to fail to store.
12586 * linux-low.h (linux_target_ops): Likewise.
12587 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12588 (ppc_cannot_store_register): FPSCR may not be storable.
12589
125902002-04-09 Daniel Jacobowitz <drow@mvista.com>
12591
12592 * server.h: Include <string.h> if HAVE_STRING_H.
12593 * ChangeLog: Correct paths in last ChangeLog entry.
12594
125952002-04-09 Daniel Jacobowitz <drow@mvista.com>
12596
12597 * linux-low.h: Remove obsolete prototypes.
12598 (struct linux_target_ops): New.
12599 (extern the_low_target): New.
12600 * linux-low.c (num_regs, regmap): Remove declarations.
12601 (register_addr): Use the_low_target explicitly.
12602 (fetch_register): Likewise.
12603 (usr_fetch_inferior_registers): Likewise.
12604 (usr_store_inferior_registers): Likewise.
12605 * linux-arm-low.c (num_regs): Remove.
12606 (arm_num_regs): Define.
12607 (arm_regmap): Renamed from regmap, made static.
12608 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12609 made static.
12610 (arm_cannot_store_register): Renamed from cannot_store_register,
12611 made static.
12612 (the_low_target): New.
12613 * linux-i386-low.c (num_regs): Remove.
12614 (i386_num_regs): Define.
12615 (i386_regmap): Renamed from regmap, made static.
12616 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12617 made static.
12618 (i386_cannot_store_register): Renamed from cannot_store_register,
12619 made static.
12620 (the_low_target): New.
12621 * linux-ia64-low.c (num_regs): Remove.
12622 (ia64_num_regs): Define.
12623 (ia64_regmap): Renamed from regmap, made static.
12624 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12625 made static.
12626 (ia64_cannot_store_register): Renamed from cannot_store_register,
12627 made static.
12628 (the_low_target): New.
12629 * linux-m68k-low.c (num_regs): Remove.
12630 (m68k_num_regs): Define.
12631 (m68k_regmap): Renamed from regmap, made static.
12632 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12633 made static.
12634 (m68k_cannot_store_register): Renamed from cannot_store_register,
12635 made static.
12636 (the_low_target): New.
12637 * linux-mips-low.c (num_regs): Remove.
12638 (mips_num_regs): Define.
12639 (mips_regmap): Renamed from regmap, made static.
12640 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12641 made static.
12642 (mips_cannot_store_register): Renamed from cannot_store_register,
12643 made static.
12644 (the_low_target): New.
12645 * linux-ppc-low.c (num_regs): Remove.
12646 (ppc_num_regs): Define.
12647 (ppc_regmap): Renamed from regmap, made static.
12648 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12649 made static.
12650 (ppc_cannot_store_register): Renamed from cannot_store_register,
12651 made static.
12652 (the_low_target): New.
12653 * linux-s390-low.c (num_regs): Remove.
12654 (s390_num_regs): Define.
12655 (s390_regmap): Renamed from regmap, made static.
12656 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12657 made static.
12658 (s390_cannot_store_register): Renamed from cannot_store_register,
12659 made static.
12660 (the_low_target): New.
12661 * linux-sh-low.c (num_regs): Remove.
12662 (sh_num_regs): Define.
12663 (sh_regmap): Renamed from regmap, made static.
12664 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12665 made static.
12666 (sh_cannot_store_register): Renamed from cannot_store_register,
12667 made static.
12668 (the_low_target): New.
12669 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12670 (the_low_target): New.
12671
126722002-04-09 Daniel Jacobowitz <drow@mvista.com>
12673
12674 * Makefile.in: Add stamp-h target.
12675 * configure.in: Create stamp-h.
12676 * configure: Regenerated.
12677
126782002-04-09 Daniel Jacobowitz <drow@mvista.com>
12679
12680 * inferiors.c: New file.
12681 * target.c: New file.
12682 * target.h: New file.
12683 * Makefile.in: Add target.o and inferiors.o. Update
12684 dependencies.
12685 * linux-low.c (inferior_pid): New static variable,
12686 moved from server.c.
12687 (linux_create_inferior): Renamed from create_inferior.
12688 Call add_inferior. Return 0 on success instead of a PID.
12689 (linux_attach): Renamed from myattach.
12690 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12691 (linux_thread_alive): Renamed from mythread_alive.
12692 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12693 child dies.
12694 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12695 (regsets_store_inferior_registers): Correct error message.
12696 Add missing ``return 0''.
12697 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12698 (linux_store_registers): Renamed from store_inferior_registers.
12699 (linux_read_memory): Renamed from read_inferior_memory.
12700 (linux_write_memory): Renamed from write_inferior_memory.
12701 (linux_target_ops): New structure.
12702 (initialize_low): Call set_target_ops ().
12703 * remote-utils.c (unhexify): New function.
12704 (hexify): New function.
12705 (input_interrupt): Send signals to ``signal_pid''.
12706 * server.c (inferior_pid): Remove.
12707 (start_inferior): Update create_inferior call.
12708 (attach_inferior): Call add_inferior.
12709 (handle_query): New function.
12710 (main): Call handle_query for `q' packets.
12711 * server.h: Include "target.h". Remove obsolete prototypes.
12712 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12713
127142002-04-09 Daniel Jacobowitz <drow@mvista.com>
12715
12716 * Makefile.in: Add WARN_CFLAGS. Update configury
12717 dependencies.
12718 * configure.in: Check for <string.h>
12719 * configure: Regenerate.
12720 * config.in: Regenerate.
12721 * gdbreplay.c: Include needed system headers.
12722 (remote_open): Remove strchr prototype.
12723 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12724 * regcache.c (supply_register): Change buf argument to const void *.
12725 (supply_register_by_name): Likewise.
12726 (collect_register): Change buf argument to void *.
12727 (collect_register_by_name): Likewise.
12728 * regcache.h: Add missing prototypes.
12729 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12730 * server.c (handle_query): New function.
12731 (attached): New static variable, moved out of main.
12732 (main): Quiet longjmp clobber warnings.
12733 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12734 * utils.c (error): Remove NORETURN.
12735 (fatal): Likewise.