]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
dwarf2read.c: Add cast
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
d2412fa5
PA
12015-10-29 Pedro Alves <palves@redhat.com>
2
3 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4
c17414a2
PA
52015-10-29 Pedro Alves <palves@redhat.com>
6
7 * tracepoint.c (clear_installed_tracepoints): Add casts.
8
e053fbc4
PA
92015-10-29 Pedro Alves <palves@redhat.com>
10
11 * server.c (handle_v_cont, process_serial_event): Add enum
12 gdb_signal casts to signal parsing code.
13
add67df8
PA
142015-10-29 Pedro Alves <palves@redhat.com>
15
16 * linux-low.h (NULL_REGSET): Define.
17 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
18 * linux-arm-low.c (arm_regsets): Likewise.
19 * linux-crisv32-low.c (cris_regsets): Likewise.
20 * linux-m68k-low.c (m68k_regsets): Likewise.
21 * linux-mips-low.c (mips_regsets): Likewise.
22 * linux-nios2-low.c (nios2_regsets): Likewise.
23 * linux-ppc-low.c (ppc_regsets): Likewise.
24 * linux-s390-low.c (s390_regsets): Likewise.
25 * linux-sh-low.c (sh_regsets): Likewise.
26 * linux-sparc-low.c (sparc_regsets): Likewise.
27 * linux-tic6x-low.c (tic6x_regsets): Likewise.
28 * linux-tile-low.c (tile_regsets): Likewise.
29 * linux-x86-low.c (x86_regsets): Likewise.
30 * linux-xtensa-low.c (xtensa_regsets): Likewise.
31
50bc912a
PA
322015-10-29 Pedro Alves <palves@redhat.com>
33
34 * linux-low.h (NULL_REGSET): Define.
35 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
36 * linux-arm-low.c (arm_regsets): Likewise.
37 * linux-crisv32-low.c (cris_regsets): Likewise.
38 * linux-m68k-low.c (m68k_regsets): Likewise.
39 * linux-mips-low.c (mips_regsets): Likewise.
40 * linux-nios2-low.c (nios2_regsets): Likewise.
41 * linux-ppc-low.c (ppc_regsets): Likewise.
42 * linux-s390-low.c (s390_regsets): Likewise.
43 * linux-sh-low.c (sh_regsets): Likewise.
44 * linux-sparc-low.c (sparc_regsets): Likewise.
45 * linux-tic6x-low.c (tic6x_regsets): Likewise.
46 * linux-tile-low.c (tile_regsets): Likewise.
47 * linux-x86-low.c (x86_regsets): Likewise.
48 * linux-xtensa-low.c (xtensa_regsets): Likewise.
49
682b2546
DE
502015-10-26 Doug Evans <dje@google.com>
51
52 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
53
963843d4
DE
542015-10-26 Doug Evans <dje@google.com>
55
56 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
57
d41401ac
DE
582015-10-26 Doug Evans <dje@google.com>
59
60 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
61 for debug_printf.
62 (attach_thread, find_new_threads_callback): Ditto.
63
3db28855
AT
642015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
65
66 * mem-break.h (set_breakpoint_data): Remove.
67
fb78e89c
AT
682015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
69
70 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
71 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
72 (initialize_low): Remove set_breakpoint_data call.
73 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
74 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
75 (initialize_low): Remove set_breakpoint_data call.
76 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
77 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
78 (initialize_low): Remove set_breakpoint_data call.
79
2e6ee069
AT
802015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
81
82 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
83 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
84 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
85 * target.h (target_breakpoint_kind_from_pc): New macro.
86
1652a986
AT
872015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
88
89 * linux-low.c (default_breakpoint_kind_from_pc): New function.
90 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
91 the default breakpoint kind.
92
abeead09
AT
932015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
94
95 * linux-arm-low.c (arm_supports_z_point_type): Add software
96 breakpoint support.
97
b0b4b501
AT
982015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
99
100 * linux-arm-low.c: Refactor breakpoint definitions.
101 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
102 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
103
8689682c
AT
1042015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
105
106 * Makefile.in: Add arm.c/o.
107 * configure.srv: Likewise.
108 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
109 (arm_breakpoint_kind_from_pc): New function.
110 (arm_sw_breakpoint_from_kind): Return proper kind.
111 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
112
27165294
AT
1132015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
114
115 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
116 removal.
117 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
118 (struct raw_breakpoint) <size>: Remove.
119 (struct raw_breakpoint) <kind>: Add.
120 (bp_size): New function.
121 (bp_opcode): Likewise.
122 (find_raw_breakpoint_at): Adjust for kind.
123 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
124 (remove_memory_breakpoint): Adjust for kind call bp_size.
125 (set_raw_breakpoint_at): Adjust for kind.
126 (set_breakpoint): Likewise.
127 (set_breakpoint_at): Call breakpoint_kind_from_pc.
128 (delete_raw_breakpoint): Adjust for kind.
129 (delete_breakpoint): Likewise.
130 (find_gdb_breakpoint): Likewise.
131 (set_gdb_breakpoint_1): Likewise.
132 (set_gdb_breakpoint): Likewise.
133 (delete_gdb_breakpoint_1): Likewise.
134 (delete_gdb_breakpoint): Likewise.
135 (uninsert_raw_breakpoint): Likewise.
136 (reinsert_raw_breakpoint): Likewise.
137 (set_breakpoint_data): Remove.
138 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
139 (check_mem_read): Adjust for kind call bp_size.
140 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
141 (clone_one_breakpoint): Adjust for kind.
142 * mem-break.h (set_gdb_breakpoint): Likewise.
143 (delete_gdb_breakpoint): Likewise.
144 * server.c (process_serial_event): Likewise.
145
dd373349
AT
1462015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
147
148 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
149 (struct linux_target_ops) <breakpoint>: Remove.
150 (struct linux_target_ops) <breakpoint_len>: Remove.
151 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
152 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
153 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
154 (arm_sw_breakpoint_from_kind): New function.
155 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
156 (struct linux_target_ops) <breakpoint>: Remove.
157 (struct linux_target_ops) <breakpoint_len>: Remove.
158 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
159 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
160 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
161 (struct linux_target_ops) <breakpoint>: Remove.
162 (struct linux_target_ops) <breakpoint_len>: Remove.
163 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
164 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
165 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
166 (struct linux_target_ops) <breakpoint>: Remove.
167 (struct linux_target_ops) <breakpoint_len>: Remove.
168 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
169 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
170 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
171 and sw_breakpoint_from_kind to increment the pc.
172 (linux_breakpoint_kind_from_pc): New function.
173 (linux_sw_breakpoint_from_kind): New function.
174 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
175 (initialize_low): Call breakpoint_kind_from_pc and
176 sw_breakpoint_from_kind to replace breakpoint_data/len.
177 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
178 New field.
179 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
180 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
181 (struct linux_target_ops) <breakpoint>: Remove.
182 (struct linux_target_ops) <breakpoint_len>: Remove.
183 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
184 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
185 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
186 (struct linux_target_ops) <breakpoint>: Remove.
187 (struct linux_target_ops) <breakpoint_len>: Remove.
188 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
189 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
190 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
191 (struct linux_target_ops) <breakpoint>: Remove.
192 (struct linux_target_ops) <breakpoint_len>: Remove.
193 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
194 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
195 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
196 (struct linux_target_ops) <breakpoint>: Remove.
197 (struct linux_target_ops) <breakpoint_len>: Remove.
198 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
199 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
200 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
201 (struct linux_target_ops) <breakpoint>: Remove.
202 (struct linux_target_ops) <breakpoint_len>: Remove.
203 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
204 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
205 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
206 (struct linux_target_ops) <breakpoint>: Remove.
207 (struct linux_target_ops) <breakpoint_len>: Remove.
208 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
209 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
210 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
211 (struct linux_target_ops) <breakpoint>: Remove.
212 (struct linux_target_ops) <breakpoint_len>: Remove.
213 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
214 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
215 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
216 (struct linux_target_ops) <breakpoint>: Remove.
217 (struct linux_target_ops) <breakpoint_len>: Remove.
218 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
219 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
220 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
221 (struct linux_target_ops) <breakpoint>: Remove.
222 (struct linux_target_ops) <breakpoint_len>: Remove.
223 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
224 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
225 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
226 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
227 (struct linux_target_ops) <breakpoint>: Remove.
228 (struct linux_target_ops) <breakpoint_len>: Remove.
229 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
230 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
231 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
232 (struct linux_target_ops) <breakpoint>: Remove.
233 (struct linux_target_ops) <breakpoint_len>: Remove.
234 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
235 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
236
4cd98a19
AT
2372015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
238
239 * linux-cris-low.c (cris_get_pc): Remove void arg.
240
774ee6d2
AR
2412015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
242
243 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
244 variable name.
245
833dcd29
AR
2462015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
247
248 * inferiors.c (thread_pid_matches_callback): New function.
249 (find_thread_process): New function.
250 (remove_thread): Reset current_thread.
251 (remove_process): Assert threads have been removed first.
252
8d689ee5
YQ
2532015-10-15 Yao Qi <yao.qi@linaro.org>
254
255 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
256 if it is 3.
257 (aarch64_remove_point): Likewise.
258 * regcache.c (regcache_register_size): New function.
259
1c2e1515
YQ
2602015-10-12 Yao Qi <yao.qi@linaro.org>
261
262 * linux-aarch64-low.c: Update all callers as emit_load_store
263 is renamed to aarch64_emit_load_store.
264
e1c587c3
YQ
2652015-10-12 Yao Qi <yao.qi@linaro.org>
266
267 * linux-aarch64-low.c: Update all callers of function renaming
268 from emit_insn to aarch64_emit_insn.
269
b6542f81
YQ
2702015-10-12 Yao Qi <yao.qi@linaro.org>
271
272 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
273 arch/aarch64-insn.h.
274 (struct aarch64_memory_operand): Likewise.
275 (ENCODE): Likewise.
276 (emit_insn): Move to arch/aarch64-insn.c.
277 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
278 (emit_load_store): Move to arch/aarch64-insn.c.
279 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
280 (can_encode_int32): Remove.
281
246994ce
YQ
2822015-10-12 Yao Qi <yao.qi@linaro.org>
283
284 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
285 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
286 (aarch64_relocate_instruction): Likewise.
287 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
288 (struct aarch64_insn_visitor): Likewise.
289
0badd99f
YQ
2902015-10-12 Yao Qi <yao.qi@linaro.org>
291
292 * linux-aarch64-low.c (struct aarch64_insn_data): New.
293 (struct aarch64_insn_visitor): New.
294 (struct aarch64_insn_relocation_data): New.
295 (aarch64_ftrace_insn_reloc_b): New function.
296 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
297 (aarch64_ftrace_insn_reloc_cb): Likewise.
298 (aarch64_ftrace_insn_reloc_tb): Likewise.
299 (aarch64_ftrace_insn_reloc_adr): Likewise.
300 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
301 (aarch64_ftrace_insn_reloc_others): Likewise.
302 (visitor): New.
303 (aarch64_relocate_instruction): Use visitor.
304
dfaffe9d
YQ
3052015-10-12 Yao Qi <yao.qi@linaro.org>
306
307 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
308 int. Add argument buf.
309 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
310 aarch64_relocate_instruction.
311
70b439f0
YQ
3122015-10-12 Yao Qi <yao.qi@linaro.org>
313
314 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
315 argument insn. Remove local variable insn. Don't call
316 target_read_uint32.
317 (aarch64_install_fast_tracepoint_jump_pad): Call
318 target_read_uint32.
319
7781c06f
YQ
3202015-09-30 Yao Qi <yao.qi@linaro.org>
321
322 * linux-aarch64-low.c (emit_movk): Shorten a long line.
323 (emit_load_store_pair): Likewise.
324
9a3c8263
SM
3252015-09-25 Simon Marchi <simon.marchi@ericsson.com>
326
327 * dll.c (match_dll): Add cast(s).
328 (unloaded_dll): Likewise.
329 * linux-low.c (second_thread_of_pid_p): Likewise.
330 (delete_lwp_callback): Likewise.
331 (count_events_callback): Likewise.
332 (select_event_lwp_callback): Likewise.
333 (linux_set_resume_request): Likewise.
334 * server.c (accumulate_file_name_length): Likewise.
335 (emit_dll_description): Likewise.
336 (handle_qxfer_threads_worker): Likewise.
337 (visit_actioned_threads): Likewise.
338 * thread-db.c (any_thread_of): Likewise.
339 * tracepoint.c (same_process_p): Likewise.
340 (match_blocktype): Likewise.
341 (build_traceframe_info_xml): Likewise.
342
224c3ddb
SM
3432015-09-25 Simon Marchi <simon.marchi@ericsson.com>
344
345 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
346 assignment.
347 (gdb_unparse_agent_expr): Likewise.
348 * hostio.c (require_data): Likewise.
349 (handle_pread): Likewise.
350 * linux-low.c (disable_regset): Likewise.
351 (fetch_register): Likewise.
352 (store_register): Likewise.
353 (get_dynamic): Likewise.
354 (linux_qxfer_libraries_svr4): Likewise.
355 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
356 (set_fast_tracepoint_jump): Likewise.
357 (uninsert_fast_tracepoint_jumps_at): Likewise.
358 (reinsert_fast_tracepoint_jumps_at): Likewise.
359 (validate_inserted_breakpoint): Likewise.
360 (clone_agent_expr): Likewise.
361 * regcache.c (init_register_cache): Likewise.
362 * remote-utils.c (putpkt_binary_1): Likewise.
363 (decode_M_packet): Likewise.
364 (decode_X_packet): Likewise.
365 (look_up_one_symbol): Likewise.
366 (relocate_instruction): Likewise.
367 (monitor_output): Likewise.
368 * server.c (handle_search_memory): Likewise.
369 (handle_qxfer_exec_file): Likewise.
370 (handle_qxfer_libraries): Likewise.
371 (handle_qxfer): Likewise.
372 (handle_query): Likewise.
373 (handle_v_cont): Likewise.
374 (handle_v_run): Likewise.
375 (captured_main): Likewise.
376 * target.c (write_inferior_memory): Likewise.
377 * thread-db.c (try_thread_db_load_from_dir): Likewise.
378 * tracepoint.c (init_trace_buffer): Likewise.
379 (add_tracepoint_action): Likewise.
380 (add_traceframe): Likewise.
381 (add_traceframe_block): Likewise.
382 (cmd_qtdpsrc): Likewise.
383 (cmd_qtdv): Likewise.
384 (cmd_qtstatus): Likewise.
385 (response_source): Likewise.
386 (response_tsv): Likewise.
387 (cmd_qtnotes): Likewise.
388 (gdb_collect): Likewise.
389 (initialize_tracepoint): Likewise.
390
afbe19f8
PL
3912015-09-21 Pierre Langlois <pierre.langlois@arm.com>
392
393 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
394 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
395 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
396 <NOP>: New.
397 (enum aarch64_condition_codes): New enum.
398 (w0): New static global.
399 (fp): Likewise.
400 (lr): Likewise.
401 (struct aarch64_memory_operand) <type>: New
402 MEMORY_OPERAND_POSTINDEX type.
403 (postindex_memory_operand): New helper function.
404 (emit_ret): New function.
405 (emit_load_store_pair): New function, factored out of emit_stp
406 with support for MEMORY_OPERAND_POSTINDEX.
407 (emit_stp): Rewrite using emit_load_store_pair.
408 (emit_ldp): New function.
409 (emit_load_store): Likewise.
410 (emit_ldr): Mention post-index instruction in comment.
411 (emit_ldrh): New function.
412 (emit_ldrb): New function.
413 (emit_ldrsw): Mention post-index instruction in comment.
414 (emit_str): Likewise.
415 (emit_subs): New function.
416 (emit_cmp): Likewise.
417 (emit_and): Likewise.
418 (emit_orr): Likewise.
419 (emit_orn): Likewise.
420 (emit_eor): Likewise.
421 (emit_mvn): Likewise.
422 (emit_lslv): Likewise.
423 (emit_lsrv): Likewise.
424 (emit_asrv): Likewise.
425 (emit_mul): Likewise.
426 (emit_sbfm): Likewise.
427 (emit_sbfx): Likewise.
428 (emit_ubfm): Likewise.
429 (emit_ubfx): Likewise.
430 (emit_csinc): Likewise.
431 (emit_cset): Likewise.
432 (emit_nop): Likewise.
433 (emit_ops_insns): New helper function.
434 (emit_pop): Likewise.
435 (emit_push): Likewise.
436 (aarch64_emit_prologue): New function.
437 (aarch64_emit_epilogue): Likewise.
438 (aarch64_emit_add): Likewise.
439 (aarch64_emit_sub): Likewise.
440 (aarch64_emit_mul): Likewise.
441 (aarch64_emit_lsh): Likewise.
442 (aarch64_emit_rsh_signed): Likewise.
443 (aarch64_emit_rsh_unsigned): Likewise.
444 (aarch64_emit_ext): Likewise.
445 (aarch64_emit_log_not): Likewise.
446 (aarch64_emit_bit_and): Likewise.
447 (aarch64_emit_bit_or): Likewise.
448 (aarch64_emit_bit_xor): Likewise.
449 (aarch64_emit_bit_not): Likewise.
450 (aarch64_emit_equal): Likewise.
451 (aarch64_emit_less_signed): Likewise.
452 (aarch64_emit_less_unsigned): Likewise.
453 (aarch64_emit_ref): Likewise.
454 (aarch64_emit_if_goto): Likewise.
455 (aarch64_emit_goto): Likewise.
456 (aarch64_write_goto_address): Likewise.
457 (aarch64_emit_const): Likewise.
458 (aarch64_emit_call): Likewise.
459 (aarch64_emit_reg): Likewise.
460 (aarch64_emit_pop): Likewise.
461 (aarch64_emit_stack_flush): Likewise.
462 (aarch64_emit_zero_ext): Likewise.
463 (aarch64_emit_swap): Likewise.
464 (aarch64_emit_stack_adjust): Likewise.
465 (aarch64_emit_int_call_1): Likewise.
466 (aarch64_emit_void_call_2): Likewise.
467 (aarch64_emit_eq_goto): Likewise.
468 (aarch64_emit_ne_goto): Likewise.
469 (aarch64_emit_lt_goto): Likewise.
470 (aarch64_emit_le_goto): Likewise.
471 (aarch64_emit_gt_goto): Likewise.
472 (aarch64_emit_ge_got): Likewise.
473 (aarch64_emit_ops_impl): New static global variable.
474 (aarch64_emit_ops): New target function, return
475 &aarch64_emit_ops_impl.
476 (struct linux_target_ops): Install it.
477
bb903df0
PL
4782015-09-21 Pierre Langlois <pierre.langlois@arm.com>
479
480 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
481 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
482 aarch64-ipa.o.
483 * linux-aarch64-ipa.c: New file.
484 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
485 and endian.h.
486 (aarch64_get_thread_area): New target method.
487 (extract_signed_bitfield): New helper function.
488 (aarch64_decode_ldr_literal): New function.
489 (enum aarch64_opcodes): New enum.
490 (struct aarch64_register): New struct.
491 (struct aarch64_operand): New struct.
492 (x0): New static global.
493 (x1): Likewise.
494 (x2): Likewise.
495 (x3): Likewise.
496 (x4): Likewise.
497 (w2): Likewise.
498 (ip0): Likewise.
499 (sp): Likewise.
500 (xzr): Likewise.
501 (aarch64_register): New helper function.
502 (register_operand): Likewise.
503 (immediate_operand): Likewise.
504 (struct aarch64_memory_operand): New struct.
505 (offset_memory_operand): New helper function.
506 (preindex_memory_operand): Likewise.
507 (enum aarch64_system_control_registers): New enum.
508 (ENCODE): New macro.
509 (emit_insn): New helper function.
510 (emit_b): New function.
511 (emit_bcond): Likewise.
512 (emit_cb): Likewise.
513 (emit_tb): Likewise.
514 (emit_blr): Likewise.
515 (emit_stp): Likewise.
516 (emit_ldp_q_offset): Likewise.
517 (emit_stp_q_offset): Likewise.
518 (emit_load_store): Likewise.
519 (emit_ldr): Likewise.
520 (emit_ldrsw): Likewise.
521 (emit_str): Likewise.
522 (emit_ldaxr): Likewise.
523 (emit_stxr): Likewise.
524 (emit_stlr): Likewise.
525 (emit_data_processing_reg): Likewise.
526 (emit_data_processing): Likewise.
527 (emit_add): Likewise.
528 (emit_sub): Likewise.
529 (emit_mov): Likewise.
530 (emit_movk): Likewise.
531 (emit_mov_addr): Likewise.
532 (emit_mrs): Likewise.
533 (emit_msr): Likewise.
534 (emit_sevl): Likewise.
535 (emit_wfe): Likewise.
536 (append_insns): Likewise.
537 (can_encode_int32_in): New helper function.
538 (aarch64_relocate_instruction): New function.
539 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
540 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
541 (struct linux_target_ops): Install aarch64_get_thread_area,
542 aarch64_install_fast_tracepoint_jump_pad and
543 aarch64_get_min_fast_tracepoint_insn_len.
544
787749ea
PL
5452015-09-21 Pierre Langlois <pierre.langlois@arm.com>
546
547 * Makefile.in (aarch64-insn.o): New rule.
548 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
549
9812b2e6
YQ
5502015-09-21 Yao Qi <yao.qi@linaro.org>
551
552 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
553
18fe412b
YQ
5542015-09-21 Yao Qi <yao.qi@linaro.org>
555
556 * tracepoint.c (max_jump_pad_size): Remove.
557
a0cc84cd
YQ
5582015-09-18 Yao Qi <yao.qi@linaro.org>
559
560 * linux-aarch64-low.c: Don't include sys/uio.h.
561 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
562
d78908cf
WW
5632015-09-16 Wei-cheng Wang <cole945@gmail.com>
564
565 * tracepoint.c (eval_result_type): Change prototype.
566 (condition_true_at_tracepoint): Fix argument to compiled_cond.
567
d57e0d50
PA
5682015-09-15 Pedro Alves <palves@redhat.com>
569
570 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
571 Check whether to report exec events instead of checking whether
572 multiprocess is enabled.
573
5a676acc
PA
5742015-09-15 Pedro Alves <palves@redhat.com>
575
576 PR remote/18965
577 * remote-utils.c (prepare_resume_reply): Merge
578 TARGET_WAITKIND_VFORK_DONE switch case with the
579 TARGET_WAITKIND_FORKED case.
580
7c5d0fad
YQ
5812015-09-15 Yao Qi <yao.qi@linaro.org>
582
583 * server.c (handle_query): Check string comparison using
584 "else if" instead of "if".
585
750ce8d1
YQ
5862015-09-15 Yao Qi <yao.qi@linaro.org>
587
588 * server.c (vCont_supported): New global variable.
589 (handle_query): Set vCont_supported to 1 if "vContSupported+"
590 matches. Append ";vContSupported+" to own_buf.
591 (handle_v_requests): Append ";s;S" to own_buf if target supports
592 hardware single step or vCont_supported is false.
593 (capture_main): Set vCont_supported to zero.
594
70b90b91
YQ
5952015-09-15 Yao Qi <yao.qi@linaro.org>
596
597 * linux-low.c (linux_supports_conditional_breakpoints): Rename
598 it to ...
599 (linux_supports_hardware_single_step): ... New function.
600 (linux_target_ops): Update.
601 * lynx-low.c (lynx_target_ops): Set field
602 supports_hardware_single_step to target_can_do_hardware_single_step.
603 * nto-low.c (nto_target_ops): Likewise.
604 * spu-low.c (spu_target_ops): Likewise.
605 * win32-low.c (win32_target_ops): Likewise.
606 * target.c (target_can_do_hardware_single_step): New function.
607 * target.h (struct target_ops) <supports_conditional_breakpoints>:
608 Remove. <supports_hardware_single_step>: New field.
609 (target_supports_conditional_breakpoints): Remove.
610 (target_supports_hardware_single_step): New macro.
611 (target_can_do_hardware_single_step): Declare.
612 * server.c (handle_query): Use target_supports_hardware_single_step
613 instead of target_supports_conditional_breakpoints.
614
ade90bde
YQ
6152015-09-15 Yao Qi <yao.qi@linaro.org>
616
617 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
618 function.
619 (struct linux_target_ops the_low_target): Install
620 aarch64_linux_siginfo_fixup.
621
94585166
DB
6222015-09-11 Don Breazeal <donb@codesourcery.com>
623 Luis Machado <lgustavo@codesourcery.com>
624
625 * linux-low.c (linux_mourn): Static declaration.
626 (linux_arch_setup): Move in front of
627 handle_extended_wait.
628 (linux_arch_setup_thread): New function.
629 (handle_extended_wait): Handle exec events. Call
630 linux_arch_setup_thread. Make event_lwp argument a
631 pointer-to-a-pointer.
632 (check_zombie_leaders): Do not check stopped threads.
633 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
634 (linux_low_filter_event): Add lwp and thread for exec'ing
635 non-leader thread if leader thread has been deleted.
636 Refactor code into linux_arch_setup_thread and call it.
637 Pass child lwp pointer by reference to handle_extended_wait.
638 (linux_wait_for_event_filtered): Update comment.
639 (linux_wait_1): Prevent clobbering exec event status.
640 (linux_supports_exec_events): New function.
641 (linux_target_ops) <supports_exec_events>: Initialize new member.
642 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
643 new member.
644 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
645 * server.c (report_exec_events): New global variable.
646 (handle_query): Handle qSupported query for exec-events feature.
647 (captured_main): Initialize report_exec_events.
648 * server.h (report_exec_events): Declare new global variable.
649 * target.h (struct target_ops) <supports_exec_events>: New
650 member.
651 (target_supports_exec_events): New macro.
652 * win32-low.c (win32_target_ops) <supports_exec_events>:
653 Initialize new member.
654
0568462b
MM
6552015-09-09 Markus Metzger <markus.t.metzger@intel.com>
656
657 * linux-low.c (linux_low_enable_btrace): Remove.
658 (linux_target_ops): Replace linux_low_enable_btrace with
659 linux_enable_btrace.
660
39edd165
YQ
6612015-09-03 Yao Qi <yao.qi@linaro.org>
662
663 * linux-aarch64-low.c (aarch64_insert_point): Call
664 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
665 returns true.
666
1db33b5a
UW
6672015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
668
669 * linux-low.c (check_stopped_by_breakpoint): Use
670 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
671
ab290430
PA
6722015-08-27 Pedro Alves <palves@redhat.com>
673
674 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
675
8d749320
SM
6762015-08-26 Simon Marchi <simon.marchi@ericsson.com>
677
6711b7f8
SM
678 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
679 the XNEW-family equivalent.
8d749320
SM
680 (compile_bytecodes): Likewise.
681 * dll.c (loaded_dll): Likewise.
682 * event-loop.c (append_callback_event): Likewise.
683 (create_file_handler): Likewise.
684 (create_file_event): Likewise.
685 * hostio.c (handle_open): Likewise.
686 * inferiors.c (add_thread): Likewise.
687 (add_process): Likewise.
688 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
689 * linux-arm-low.c (arm_new_process): Likewise.
690 (arm_new_thread): Likewise.
691 * linux-low.c (add_to_pid_list): Likewise.
692 (linux_add_process): Likewise.
693 (handle_extended_wait): Likewise.
694 (add_lwp): Likewise.
695 (enqueue_one_deferred_signal): Likewise.
696 (enqueue_pending_signal): Likewise.
697 (linux_resume_one_lwp_throw): Likewise.
698 (linux_resume_one_thread): Likewise.
699 (linux_read_memory): Likewise.
700 (linux_write_memory): Likewise.
701 * linux-mips-low.c (mips_linux_new_process): Likewise.
702 (mips_linux_new_thread): Likewise.
703 (mips_add_watchpoint): Likewise.
704 * linux-x86-low.c (initialize_low_arch): Likewise.
705 * lynx-low.c (lynx_add_process): Likewise.
706 * mem-break.c (set_raw_breakpoint_at): Likewise.
707 (set_breakpoint): Likewise.
708 (add_condition_to_breakpoint): Likewise.
709 (add_commands_to_breakpoint): Likewise.
710 (clone_agent_expr): Likewise.
711 (clone_one_breakpoint): Likewise.
712 * regcache.c (new_register_cache): Likewise.
713 * remote-utils.c (look_up_one_symbol): Likewise.
714 * server.c (queue_stop_reply): Likewise.
715 (start_inferior): Likewise.
716 (queue_stop_reply_callback): Likewise.
717 (handle_target_event): Likewise.
718 * spu-low.c (fetch_ppc_memory): Likewise.
719 (store_ppc_memory): Likewise.
720 * target.c (set_target_ops): Likewise.
721 * thread-db.c (thread_db_load_search): Likewise.
722 (try_thread_db_load_1): Likewise.
723 * tracepoint.c (add_tracepoint): Likewise.
724 (add_tracepoint_action): Likewise.
725 (create_trace_state_variable): Likewise.
726 (cmd_qtdpsrc): Likewise.
727 (cmd_qtro): Likewise.
728 (add_while_stepping_state): Likewise.
729 * win32-low.c (child_add_thread): Likewise.
730 (get_image_name): Likewise.
731
ed8b7b42
YQ
7322015-08-25 Yao Qi <yao.qi@linaro.org>
733
734 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
735
db3cb7cb
YQ
7362015-08-25 Yao Qi <yao.qi@linaro.org>
737
738 * Makefile.in (aarch64-linux.o): New rule.
739 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
740 srv_tgtobj.
741 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
742 (aarch64_init_debug_reg_state): Make it extern.
743 (aarch64_linux_prepare_to_resume): Remove.
744
f6011a1c
YQ
7452015-08-25 Yao Qi <yao.qi@linaro.org>
746
747 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
748 lwp_arch_private_info and ptid_of_lwp.
749
88e2cf7e
YQ
7502015-08-25 Yao Qi <yao.qi@linaro.org>
751
752 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
753 Find proc_info by find_process_pid. All callers updated.
754
5e35436e
YQ
7552015-08-25 Yao Qi <yao.qi@linaro.org>
756
757 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
758 Remove.
759 (debug_reg_change_callback): Remove.
760 (aarch64_notify_debug_reg_change): Remove.
761
4a8a7965
YQ
7622015-08-25 Yao Qi <yao.qi@linaro.org>
763
764 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
765 Call current_lwp_ptid.
766
32a271ee
YQ
7672015-08-25 Yao Qi <yao.qi@linaro.org>
768
769 * linux-aarch64-low.c (debug_reg_change_callback): Use
770 debug_printf.
771
0d51c8d7
YQ
7722015-08-25 Yao Qi <yao.qi@linaro.org>
773
774 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
775
31a43dd5
YQ
7762015-08-25 Yao Qi <yao.qi@linaro.org>
777
778 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
779
8ee52567
YQ
7802015-08-25 Yao Qi <yao.qi@linaro.org>
781
782 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
783 the code.
784
ff3f0f45
YQ
7852015-08-25 Yao Qi <yao.qi@linaro.org>
786
787 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
788 Remove.
789 (debug_reg_change_callback): Remove argument entry and add argument
790 lwp. Remove local variable thread. Don't print thread id in the
791 debugging output. Don't check whether pid of thread equals to pid.
792 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
793 iterate_over_lwps instead find_inferior.
794
3d40fbb5
PA
7952015-08-24 Pedro Alves <palves@redhat.com>
796
797 * inferiors.c (get_first_process): New function.
798 * inferiors.h (get_first_process): New declaration.
799 * remote-utils.c (read_ptid): Default to the first process in the
800 list, instead of to the current thread's process.
801
438e1e42
PA
8022015-08-24 Pedro Alves <palves@redhat.com>
803
804 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
805 * event-loop.c: Likewise.
806 * remote-utils.c: Likewise.
807 * tracepoint.c: Likewise.
808
a8c6d4fc
PA
8092015-08-24 Pedro Alves <palves@redhat.com>
810
811 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
812 ptid_get_lwp.
813
99b0bb12
PA
8142015-08-21 Pedro Alves <palves@redhat.com>
815
816 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
817 instead of literal 1.
818
f8904751
PA
8192015-08-21 Pedro Alves <palves@redhat.com>
820
821 * tdesc.c (default_description): Explicitly zero-initialize.
822
465a859e
PA
8232015-08-21 Pedro Alves <palves@redhat.com>
824
825 PR gdb/18749
826 * inferiors.c (remove_thread): Discard any pending stop reply for
827 this thread.
828 * server.c (remove_all_on_match_pid): Rename to ...
829 (remove_all_on_match_ptid): ... this. Work with a filter ptid
830 instead of a pid.
831 (discard_queued_stop_replies): Change parameter to a ptid. Now
832 extern.
833 (handle_v_kill, kill_inferior_callback, captured_main)
834 (process_serial_event): Adjust.
835 * server.h (discard_queued_stop_replies): Declare.
836
f0db101d
PA
8372015-08-21 Pedro Alves <palves@redhat.com>
838
839 * linux-low.c (wait_for_sigstop): Always switch to no thread
840 selected if the previously current thread dies.
841 * lynx-low.c (lynx_request_interrupt): Use the first thread's
842 process instead of the current thread's.
843 * remote-utils.c (input_interrupt): Don't check if there's no
844 current thread.
845 * server.c (gdb_read_memory, gdb_write_memory): If setting the
846 current thread to the general thread fails, error out.
847 (handle_qxfer_auxv, handle_qxfer_libraries)
848 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
849 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
850 (handle_query): Check if there's a thread selected instead of
851 checking whether there's any thread in the thread list.
852 (handle_qxfer_threads, handle_qxfer_btrace)
853 (handle_qxfer_btrace_conf): Don't error out early if there's no
854 thread in the thread list.
855 (handle_v_cont, myresume): Don't set the current thread to the
856 continue thread.
857 (process_serial_event) <Hg handling>: Also set thread_id if the
858 previous general thread is still alive.
859 (process_serial_event) <g/G handling>: If setting the current
860 thread to the general thread fails, error out.
861 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
862 thread's lwp instead of the current thread's.
863 * target.c (set_desired_thread): If the desired thread was not
864 found, leave the current thread pointing to NULL. Return an int
865 (boolean) indicating success.
866 * target.h (set_desired_thread): Change return type to int.
867
40045d91
MF
8682015-08-20 Max Filippov <jcmvbkbc@gmail.com>
869
870 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
871 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
872 #includes.
873 (ps_get_thread_area): New function.
874
45face3b
GB
8752015-08-19 Gary Benson <gbenson@redhat.com>
876
877 * hostio.c (handle_pread): Do not attempt to read more data
878 than hostio_reply_with_data can fit in a packet.
879
16d5f642
JB
8802015-08-18 Joel Brobecker <brobecker@adacore.com>
881
882 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
883
a738da3a
MF
8842015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
885
886 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
887
33ebda9d
PA
8882015-08-06 Pedro Alves <palves@redhat.com>
889
890 * tracepoint.c (expr_eval_result): Now an int.
891
a44892be
PA
8922015-08-06 Pedro Alves <palves@redhat.com>
893
894 * gdbthread.h (struct regcache): Forward declare.
895 (struct thread_info) <regcache_data>: Now a struct regcache
896 pointer.
897 * inferiors.c (inferior_regcache_data)
898 (set_inferior_regcache_data): Now work with struct regcache
899 pointers.
900 * inferiors.h (struct regcache): Forward declare.
901 (inferior_regcache_data, set_inferior_regcache_data): Now work
902 with struct regcache pointers.
903 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
904 (free_register_cache_thread): Remove struct regcache pointer
905 casts.
906
608a1e46
PA
9072015-08-06 Pedro Alves <palves@redhat.com>
908
909 * server.c (captured_main): On error, print the exception message
910 to stderr, and if run_once is set, throw a quit.
911
f0ce0d3a
PA
9122015-08-06 Pedro Alves <palves@redhat.com>
913
914 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
915 the current thread.
916
bf47e248
PA
9172015-08-06 Pedro Alves <palves@redhat.com>
918
919 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
920 reading beyond the passed in buffer length.
921
b6b9ffcc
PL
9222015-08-06 Pierre Langlois <pierre.langlois@arm.com>
923
924 * tracepoint.c (symbol_list) <required>: Remove.
925
863d01bd
PA
9262015-08-06 Pedro Alves <palves@redhat.com>
927
928 * linux-low.c (handle_extended_wait): Set the fork child's suspend
929 count if stopping and suspending threads.
930 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
931 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
932 (linux_detach): Complete an ongoing step-over.
933 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
934 throughout.
935 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
936 (linux_wait_1): If passing a signal to the inferior after
937 finishing a step-over, unsuspend and re-resume all lwps. If we
938 see a single-step event but the thread should be continuing, don't
939 pass the trap to gdb.
940 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
941 internal_error instead of gdb_assert.
942 (enqueue_pending_signal): New function.
943 (check_ptrace_stopped_lwp_gone): Add debug output.
944 (start_step_over): Use internal_error instead of gdb_assert.
945 (complete_ongoing_step_over): New function.
946 (linux_resume_one_thread): Don't resume a suspended thread.
947 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
948 it stepping.
949
00db26fa
PA
9502015-08-06 Pedro Alves <palves@redhat.com>
951
952 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
953 (linux_thread_alive): Use lwp_is_marked_dead.
954 (extended_event_reported): Delete.
955 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
956 instead of extended_event_reported.
957 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
958 as well.
959 (lwp_is_marked_dead): New function.
960 (lwp_running): Use lwp_is_marked_dead.
961 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
962 comment.
963
ad071a30
PA
9642015-08-06 Pedro Alves <palves@redhat.com>
965
966 * linux-low.c (linux_wait_1): Move fork event output out of the
967 !report_to_gdb check. Pass event_child->waitstatus to
968 target_waitstatus_to_string instead of ourstatus.
969
524b57e6
YQ
9702015-08-04 Yao Qi <yao.qi@linaro.org>
971
972 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
973 if current_thread is 32 bit.
974
6085d6f6
YQ
9752015-08-04 Yao Qi <yao.qi@linaro.org>
976
977 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
978 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
979 * server.c (extended_protocol): Remove "static".
980 * server.h (extended_protocol): Declare it.
981
8a7e4587
YQ
9822015-08-04 Yao Qi <yao.qi@linaro.org>
983
984 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
985 both aarch64 and aarch32.
986 (aarch64_set_pc): Likewise.
987
3b53ae99
YQ
9882015-08-04 Yao Qi <yao.qi@linaro.org>
989
990 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
991 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
992 arm-with-neon.xml to srv_xmlfiles.
993 * linux-aarch64-low.c: Include linux-aarch32-low.h.
994 (is_64bit_tdesc): New function.
995 (aarch64_linux_read_description): New function.
996 (aarch64_arch_setup): Call aarch64_linux_read_description.
997 (regs_info): Rename to regs_info_aarch64.
998 (aarch64_regs_info): Return right regs_info.
999 (initialize_low_arch): Call initialize_low_arch_aarch32.
1000
bd9e6534
YQ
10012015-08-04 Yao Qi <yao.qi@linaro.org>
1002
1003 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1004 * linux-aarch32-low.c: New file.
1005 * linux-aarch32-low.h: New file.
1006 * linux-arm-low.c (arm_fill_gregset): Move it to
1007 linux-aarch32-low.c.
1008 (arm_store_gregset): Likewise.
1009 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1010 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1011 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1012 (regs_info): Rename to regs_info_arm.
1013 (arm_regs_info): Return regs_info_aarch32 if
1014 have_ptrace_getregset is 1 and target description is
1015 arm_with_neon or arm_with_vfpv3.
1016 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1017 Call initialize_low_arch_aarch32 instead.
1018
ded48a5e
YQ
10192015-08-04 Yao Qi <yao.qi@linaro.org>
1020
1021 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1022 * linux-low.c: ... here.
1023 * linux-low.h (have_ptrace_getregset): Declare it.
1024
96e9210f
PA
10252015-08-04 Pedro Alves <palves@redhat.com>
1026
1027 * thread-db.c (struct thread_db): Use new typedefs.
1028 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1029 CHK calls.
1030 (disable_thread_event_reporting): Cast result of dlsym to
1031 destination function pointer type.
1032 (thread_db_mourn): Use td_ta_delete_ftype.
1033
af60a1ef
SL
10342015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1035
1036 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1037 arch variant.
1038 (CDX_BREAKPOINT): Define for R2.
1039 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1040 (the_low_target): Add comments.
1041
e8b41681
YQ
10422015-07-30 Yao Qi <yao.qi@linaro.org>
1043
1044 * linux-arm-low.c (arm_hwcap): Remove it.
1045 (arm_read_description): New local variable arm_hwcap. Don't
1046 set arm_hwcap to zero.
1047
89abb039
YQ
10482015-07-30 Yao Qi <yao.qi@linaro.org>
1049
1050 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1051 Use regcache->tdesc instead.
1052 (arm_store_wmmxregset): Likewise.
1053 (arm_fill_vfpregset): Likewise.
1054 (arm_store_vfpregset): Likewise.
1055
deca266c
YQ
10562015-07-30 Yao Qi <yao.qi@linaro.org>
1057
1058 * linux-arm-low.c: Include arch/arm.h.
1059 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1060 (arm_store_gregset): Likewise.
1061
aa58a496
SM
10622015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1063
1064 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1065 ptrace's 4th parameter.
1066
50904b25
YQ
10672015-07-27 Yao Qi <yao.qi@linaro.org>
1068
1069 * configure.srv (case aarch64*-*-linux*): Don't set
1070 srv_linux_usrregs.
1071
5826e159
PA
10722015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1073
1074 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1075 sys/ptrace.h.
1076 * linux-arm-low.c: Likewise.
1077 * linux-cris-low.c: Likewise.
1078 * linux-crisv32-low.c: Likewise.
1079 * linux-low.c: Likewise.
1080 * linux-m68k-low.c: Likewise.
1081 * linux-mips-low.c: Likewise.
1082 * linux-nios2-low.c: Likewise.
1083 * linux-s390-low.c: Likewise.
1084 * linux-sparc-low.c: Likewise.
1085 * linux-tic6x-low.c: Likewise.
1086 * linux-tile-low.c: Likewise.
1087 * linux-x86-low.c: Likewise.
1088
54019719
PA
10892015-07-24 Pedro Alves <palves@redhat.com>
1090
1091 * config.in: Regenerate.
1092 * configure: Regenerate.
1093
eb7aa561
PA
10942015-07-24 Pedro Alves <palves@redhat.com>
1095
1096 * acinclude.m4: Include ../ptrace.m4.
1097 * configure.ac: Call GDB_AC_PTRACE.
1098 * config.in, configure: Regenerate.
1099
55d7b841
YQ
11002015-07-24 Yao Qi <yao.qi@linaro.org>
1101
1102 * linux-low.c (linux_create_inferior): Remove setting to
1103 proc->priv->new_inferior.
1104 (linux_attach): Likewise.
1105 (linux_low_filter_event): Likewise.
1106 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1107
c06cbd92
YQ
11082015-07-24 Yao Qi <yao.qi@linaro.org>
1109
1110 * linux-low.c (linux_arch_setup): New function.
1111 (linux_low_filter_event): If proc->tdesc is NULL and
1112 proc->attached is true, call the_low_target.arch_setup.
1113 Otherwise, keep status pending, and return.
1114 (linux_resume_one_lwp_throw): Don't call get_pc if
1115 thread->while_stepping isn't NULL. Don't call
1116 get_thread_regcache if proc->tdesc is NULL.
1117 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1118 (linux_target_ops): Install arch_setup.
1119 * server.c (start_inferior): Call the_target->arch_setup.
1120 * target.h (struct target_ops) <arch_setup>: New field.
1121 (target_arch_setup): New marco.
1122 * lynx-low.c (lynx_target_ops): Update.
1123 * nto-low.c (nto_target_ops): Update.
1124 * spu-low.c (spu_target_ops): Update.
1125 * win32-low.c (win32_target_ops): Update.
1126
5ae3ebba
YQ
11272015-07-24 Yao Qi <yao.qi@linaro.org>
1128
1129 * linux-low.c (linux_add_process): Don't set
1130 proc->priv->new_inferior.
1131 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1132 (linux_attach): Likewise.
1133
eb97750b
YQ
11342015-07-24 Yao Qi <yao.qi@linaro.org>
1135
1136 * server.c (start_inferior): Code refactor.
1137
51aee833
YQ
11382015-07-24 Yao Qi <yao.qi@linaro.org>
1139
1140 * server.c (process_serial_event): Set general_thread.
1141
af1b22f3
YQ
11422015-07-21 Yao Qi <yao.qi@linaro.org>
1143
1144 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1145 aarch64_linux_get_debug_reg_capacity.
1146
554717a3
YQ
11472015-07-17 Yao Qi <yao.qi@linaro.org>
1148
1149 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1150 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1151 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1152 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1153 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1154 (AARCH64_HWP_ALIGNMENT): Likewise.
1155 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1156 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1157 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1158 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1159 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1160 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1161 (struct aarch64_debug_reg_state): Likewise.
1162 (struct arch_lwp_info): Likewise.
1163 (aarch64_align_watchpoint): Likewise.
1164 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1165 (aarch64_watchpoint_length): Likewise.
1166 (aarch64_point_encode_ctrl_reg): Likewise
1167 (aarch64_point_is_aligned): Likewise.
1168 (aarch64_align_watchpoint): Likewise.
1169 (aarch64_linux_set_debug_regs):
1170 (aarch64_dr_state_insert_one_point): Likewise.
1171 (aarch64_dr_state_remove_one_point): Likewise.
1172 (aarch64_handle_breakpoint): Likewise.
1173 (aarch64_handle_aligned_watchpoint): Likewise.
1174 (aarch64_handle_unaligned_watchpoint): Likewise.
1175 (aarch64_handle_watchpoint): Likewise.
1176
c67ca4de
YQ
11772015-07-17 Yao Qi <yao.qi@linaro.org>
1178
1179 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1180 and don't aarch64_get_debug_reg_state. All callers update.
1181 (aarch64_handle_aligned_watchpoint): Likewise.
1182 (aarch64_handle_unaligned_watchpoint): Likewise.
1183 (aarch64_handle_watchpoint): Likewise.
1184 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1185 (aarch64_remove_point): Likewise.
1186
25abf979
YQ
11872015-07-17 Yao Qi <yao.qi@linaro.org>
1188
1189 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1190 debug_printf.
1191 (aarch64_handle_unaligned_watchpoint): Likewise.
1192
db1ff28b
JK
11932015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1194
1195 Revert the previous 3 commits:
1196 Move gdb_regex* to common/
1197 Move linux_find_memory_regions_full & co.
1198 gdbserver build-id attribute generator
1199
700ca40f
JK
12002015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1201 Jan Kratochvil <jan.kratochvil@redhat.com>
1202
1203 gdbserver build-id attribute generator.
1204 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1205 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1206 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1207 (find_phdr): New.
1208 (get_dynamic): Use find_pdhr to traverse program headers.
1209 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1210 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1211 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1212 (get_hex_build_id): New.
1213 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1214 to reply XML document.
1215
9904185c
JK
12162015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1217 Jan Kratochvil <jan.kratochvil@redhat.com>
1218
1219 * target.c: Include target/target-utils.h and fcntl.h.
1220 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1221 (target_fileio_read_stralloc): New functions.
1222
6e5b4429
JK
12232015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1224
1225 * Makefile.in (OBS): Add gdb_regex.o.
1226 (gdb_regex.o): New.
1227 * config.in: Rebuilt.
1228 * configure: Rebuilt.
1229
ddc98fbf
JK
12302015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1231 Jan Kratochvil <jan.kratochvil@redhat.com>
1232
1233 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1234 * Makefile.in (OBS): Add target-utils.o.
1235 (linux-maps.o, target-utils.o): New.
1236 * configure.srv (srv_linux_obj): Add linux-maps.o.
1237
e57bb7a0
PL
12382015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1239
1240 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1241 function, return 1.
1242 (the_low_target): Install it.
1243
586b02a9
PA
12442015-07-14 Pedro Alves <palves@redhat.com>
1245
1246 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1247 Instead, ignore ECHILD, and throw an error for other errnos.
1248
58c1b36c
PA
12492015-07-10 Pedro Alves <palves@redhat.com>
1250
1251 * event-loop.c (struct callback_event) <data>: Change type to
1252 gdb_client_data instance instead of gdb_client_data pointer.
1253 (append_callback_event): Adjust.
1254
421530db
PL
12552015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1256
1257 * linux-aarch64-low.c: Add comments for each linux_target_ops
1258 method. Remove comments already covered in target_ops and
1259 linux_target_ops definitions.
1260 (the_low_target): Add comments for each unimplemented method.
1261
c2d65f38
YQ
12622015-07-09 Yao Qi <yao.qi@linaro.org>
1263
1264 * linux-aarch64-low.c (aarch64_regmap): Remove.
1265 (aarch64_usrregs_info): Remove.
1266 (regs_info): Set field usrregs to NULL.
1267
b20a6524
MM
12682015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1269
1270 * linux-low.c: Include "rsp-low.h"
1271 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1272 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1273 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1274 (handle_btrace_enable_pt): New.
1275 (handle_btrace_general_set): Support "pt".
1276 (handle_btrace_conf_general_set): Support "pt:size".
1277
96c97461
PL
12782015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1279
1280 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1281 Z_PACKET_SW_BP.
1282
37d66942
PL
12832015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1284
1285 * linux-aarch64-low.c: Remove comment about endianness.
1286 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1287 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1288 memcmp.
1289
dc06243f
GB
12902015-06-24 Gary Benson <gbenson@redhat.com>
1291
1292 * linux-i386-ipa.c (stdint.h): Do not include.
1293 * lynx-i386-low.c (stdint.h): Likewise.
1294 * lynx-ppc-low.c (stdint.h): Likewise.
1295 * mem-break.c (stdint.h): Likewise.
1296 * thread-db.c (stdint.h): Likewise.
1297 * tracepoint.c (stdint.h): Likewise.
1298 * win32-low.c (stdint.h): Likewise.
1299
124e13d9
SM
13002015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1301
1302 * server.c (write_qxfer_response): Update call to
1303 remote_escape_output.
1304
909c2cda
JK
13052015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1306 Jan Kratochvil <jan.kratochvil@redhat.com>
1307
1308 Merge multiple hex conversions.
1309 * gdbreplay.c (tohex): Rename to 'fromhex'.
1310 (logchar): Use fromhex.
1311
24c05f46
JK
13122015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1313
1314 * server.c (handle_qxfer_libraries): Set `version' attribute for
1315 <library-list>.
1316
14d2069a
GB
13172015-06-10 Gary Benson <gbenson@redhat.com>
1318
1319 * target.h (struct target_ops) <multifs_open>: New field.
1320 <multifs_unlink>: Likewise.
1321 <multifs_readlink>: Likewise.
1322 * linux-low.c (nat/linux-namespaces.h): New include.
1323 (linux_target_ops): Initialize the_target->multifs_open,
1324 the_target->multifs_unlink and the_target->multifs_readlink.
1325 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1326 * hostio.c (hostio_fs_pid): New static variable.
1327 (hostio_handle_new_gdb_connection): New function.
1328 (handle_setfs): Likewise.
1329 (handle_open): Use the_target->multifs_open as appropriate.
1330 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1331 (handle_readlink): Use the_target->multifs_readlink as
1332 appropriate.
1333 (handle_vFile): Handle vFile:setfs packets.
1334 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1335 after target_handle_new_gdb_connection.
1336
4b8b5e72
GB
13372015-06-10 Gary Benson <gbenson@redhat.com>
1338
1339 * configure.ac (AC_CHECK_FUNCS): Add setns.
1340 * config.in: Regenerate.
1341 * configure: Likewise.
1342 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1343 (linux-namespaces.o): New rule.
1344 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1345
3ac2e371
GB
13462015-06-09 Gary Benson <gbenson@redhat.com>
1347
1348 * hostio.c (handle_open): Process mode argument with
1349 fileio_to_host_mode.
1350
ca9b78ce
YQ
13512015-06-01 Yao Qi <yao.qi@linaro.org>
1352
1353 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1354 * linux-x86-low.c: Likewise.
1355
bfacd19d
DB
13562015-05-28 Don Breazeal <donb@codesourcery.com>
1357
1358 * linux-low.c (handle_extended_wait): Initialize
1359 thread_info.last_resume_kind for new fork children.
1360
452003ef
PA
13612015-05-15 Pedro Alves <palves@redhat.com>
1362
1363 * target.h (target_handle_new_gdb_connection): Rewrite using if
1364 wrapped in do/while.
1365
1041a03c
JB
13662015-05-14 Joel Brobecker <brobecker@adacore.com>
1367
1368 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1369 * configure, config.in: Regenerate.
1370 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1371 Declare typedef.
1372
c269dbdb
DB
13732015-05-12 Don Breazeal <donb@codesourcery.com>
1374
1375 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1376 PTRACE_EVENT_VFORK_DONE.
1377 (linux_low_ptrace_options, extended_event_reported): Add vfork
1378 events.
1379 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1380 and "vforkdone" for RSP 'T' Stop Reply Packet.
1381 * server.h (report_vfork_events): Declare
1382 global variable.
1383
3a8a0396
DB
13842015-05-12 Don Breazeal <donb@codesourcery.com>
1385
1386 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1387 (the_low_target) <new_fork>: Initialize new member.
1388 * linux-arm-low.c (arm_new_fork): New function.
1389 (the_low_target) <new_fork>: Initialize new member.
1390 * linux-low.c (handle_extended_wait): Call new target function
1391 new_fork.
1392 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1393 * linux-mips-low.c (mips_add_watchpoint): New function
1394 extracted from mips_insert_point.
1395 (the_low_target) <new_fork>: Initialize new member.
1396 (mips_linux_new_fork): New function.
1397 (mips_insert_point): Call mips_add_watchpoint.
1398 * linux-x86-low.c (x86_linux_new_fork): New function.
1399 (the_low_target) <new_fork>: Initialize new member.
1400
de0d863e
DB
14012015-05-12 Don Breazeal <donb@codesourcery.com>
1402
1403 * linux-low.c (handle_extended_wait): Implement return value,
1404 rename argument 'event_child' to 'event_lwp', handle
1405 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1406 (linux_low_ptrace_options): New function.
1407 (linux_low_filter_event): Call linux_low_ptrace_options,
1408 use different argument fo linux_enable_event_reporting,
1409 use return value from handle_extended_wait.
1410 (extended_event_reported): New function.
1411 (linux_wait_1): Call extended_event_reported and set
1412 status to report fork events.
1413 (linux_write_memory): Add pid to debug message.
1414 (reset_lwp_ptrace_options_callback): New function.
1415 (linux_handle_new_gdb_connection): New function.
1416 (linux_target_ops): Initialize new structure member.
1417 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1418 * lynx-low.c: Initialize new structure member.
1419 * remote-utils.c (prepare_resume_reply): Implement stop reason
1420 "fork" for "T" stop message.
1421 * server.c (handle_query): Call handle_new_gdb_connection.
1422 * server.h (report_fork_events): Declare global flag.
1423 * target.h (struct target_ops) <handle_new_gdb_connection>:
1424 New member.
1425 (target_handle_new_gdb_connection): New macro.
1426 * win32-low.c: Initialize new structure member.
1427
ddcbc397
DB
14282015-05-12 Don Breazeal <donb@codesourcery.com>
1429
1430 * mem-break.c (APPEND_TO_LIST): Define macro.
1431 (clone_agent_expr): New function.
1432 (clone_one_breakpoint): New function.
1433 (clone_all_breakpoints): New function.
1434 * mem-break.h: Declare new functions.
1435
89245bc0
DB
14362015-05-12 Don Breazeal <donb@codesourcery.com>
1437
1438 * linux-low.c (linux_supports_fork_events): New function.
1439 (linux_supports_vfork_events): New function.
1440 (linux_target_ops): Initialize new structure members.
1441 (initialize_low): Call linux_check_ptrace_features.
1442 * lynx-low.c (lynx_target_ops): Initialize new structure
1443 members.
1444 * server.c (report_fork_events, report_vfork_events):
1445 New global flags.
1446 (handle_query): Add new features to qSupported packet and
1447 response.
1448 (captured_main): Initialize new global variables.
1449 * target.h (struct target_ops) <supports_fork_events>:
1450 New member.
1451 <supports_vfork_events>: New member.
1452 (target_supports_fork_events): New macro.
1453 (target_supports_vfork_events): New macro.
1454 * win32-low.c (win32_target_ops): Initialize new structure
1455 members.
1456
835205d0
GB
14572015-05-12 Gary Benson <gbenson@redhat.com>
1458
1459 * server.c (handle_qxfer_exec_file): Use current process
1460 if annex is empty.
1461
21e94bd9
SL
14622015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1463
1464 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1465 Remove HAVE_PTRACE_GETREGS conditionals.
1466 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1467 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1468
45614f15
YQ
14692015-05-08 Yao Qi <yao.qi@linaro.org>
1470
1471 * linux-low.c (linux_supports_conditional_breakpoints): New
1472 function.
1473 (linux_target_ops): Install new target method.
1474 * lynx-low.c (lynx_target_ops): Install NULL hook for
1475 supports_conditional_breakpoints.
1476 * nto-low.c (nto_target_ops): Likewise.
1477 * spu-low.c (spu_target_ops): Likewise.
1478 * win32-low.c (win32_target_ops): Likewise.
1479 * server.c (handle_query): Check
1480 target_supports_conditional_breakpoints.
1481 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1482 New field.
1483 (target_supports_conditional_breakpoints): New macro.
1484
80ad801e
PA
14852015-05-06 Pedro Alves <palves@redhat.com>
1486
1487 PR server/18081
1488 * server.c (start_inferior): If the process exits, mourn it.
1489
819843c7
GB
14902015-04-21 Gary Benson <gbenson@redhat.com>
1491
1492 * hostio.c (fileio_open_flags_to_host): Factored out to
1493 fileio_to_host_openflags in common/fileio.c. Single use
1494 updated.
1495
a2d5a9d7
MF
14962015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1497
1498 * linux-xtensa-low.c (xtensa_fill_gregset)
1499 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1500 XCHAL_HAVE_LOOP.
1501
deb44829
MF
15022015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1503
1504 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1505 (regs_info): Replace usrregs pointer with NULL.
1506
e57f1de3
GB
15072015-04-17 Gary Benson <gbenson@redhat.com>
1508
1509 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1510 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1511 * server.c (handle_qxfer_exec_file): New function.
1512 (qxfer_packets): Add exec-file entry.
1513 (handle_query): Report qXfer:exec-file:read as supported packet.
1514
62828379
RN
15152015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1516
1517 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1518
b88bb450
GB
15192015-04-09 Gary Benson <gbenson@redhat.com>
1520
1521 * hostio-errno.c (errno_to_fileio_error): Remove function.
1522 Update caller to use remote_fileio_to_fio_error.
1523
c8f4bfdd
YQ
15242015-04-09 Yao Qi <yao.qi@linaro.org>
1525
1526 * linux-low.c (linux_insert_point): Call
1527 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1528 (linux_remove_point): Call remove_memory_breakpoint if type is
1529 raw_bkpt_type_sw.
1530 * linux-x86-low.c (x86_insert_point): Don't call
1531 insert_memory_breakpoint.
1532 (x86_remove_point): Don't call remove_memory_breakpoint.
1533
41f98f02
PA
15342015-04-01 Pedro Alves <palves@redhat.com>
1535 Cleber Rosa <crosa@redhat.com>
1536
1537 * server.c (gdbserver_usage): Reorganize and extend the usage
1538 message.
1539
2bf6fb9d
PA
15402015-03-24 Pedro Alves <palves@redhat.com>
1541
1542 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1543 output. Also dump TRAP_TRACE.
1544 (linux_low_filter_event): In debug output, distinguish a
1545 resume_stop SIGSTOP from a delayed SIGSTOP.
1546
369f6daa
GB
15472015-03-24 Gary Benson <gbenson@redhat.com>
1548
1549 * linux-x86-low.c (x86_linux_new_thread): Moved to
1550 nat/x86-linux.c.
1551 (x86_linux_prepare_to_resume): Likewise.
1552
8e5d4070
GB
15532015-03-24 Gary Benson <gbenson@redhat.com>
1554
1555 * Makefile.in (x86-linux-dregs.o): New rule.
1556 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1557 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1558 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1559 (x86_linux_dr_get): Likewise.
1560 (x86_linux_dr_set): Likewise.
1561 (update_debug_registers_callback): Likewise.
1562 (x86_linux_dr_set_addr): Likewise.
1563 (x86_linux_dr_get_addr): Likewise.
1564 (x86_linux_dr_set_control): Likewise.
1565 (x86_linux_dr_get_control): Likewise.
1566 (x86_linux_dr_get_status): Likewise.
1567 (x86_linux_update_debug_registers): Likewise.
1568
2b95d440
GB
15692015-03-24 Gary Benson <gbenson@redhat.com>
1570
1571 * linux-x86-low.c (x86_linux_update_debug_registers):
1572 New function, factored out from...
1573 (x86_linux_prepare_to_resume): ...this.
1574
14b0bc68
GB
15752015-03-24 Gary Benson <gbenson@redhat.com>
1576
1577 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1578 (x86_linux_dr_set): Likewise.
1579 (update_debug_registers_callback): Likewise.
1580 (x86_linux_dr_set_addr): Likewise.
1581 (x86_linux_dr_get_addr): Likewise.
1582 (x86_linux_dr_set_control): Likewise.
1583 (x86_linux_dr_get_control): Likewise.
1584 (x86_linux_dr_get_status): Likewise.
1585 (x86_linux_prepare_to_resume): Likewise.
1586
5dfe6ca8
GB
15872015-03-24 Gary Benson <gbenson@redhat.com>
1588
1589 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1590 Use perror_with_name. Pass string through gettext.
1591 (x86_linux_dr_set): Likewise.
1592
d33472ad
GB
15932015-03-24 Gary Benson <gbenson@redhat.com>
1594
1595 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1596 (x86_linux_dr_set_addr): ...this.
1597 (x86_dr_low_get_addr): Rename to...
1598 (x86_linux_dr_get_addr): ...this.
1599 (x86_dr_low_set_control): Rename to...
1600 (x86_linux_dr_set_control): ...this.
1601 (x86_dr_low_get_control): Rename to...
1602 (x86_linux_dr_get_control): ...this.
1603 (x86_dr_low_get_status): Rename to...
1604 (x86_linux_dr_get_status): ...this.
1605 (x86_dr_low): Update with new function names.
1606
4b134ca1
GB
16072015-03-24 Gary Benson <gbenson@redhat.com>
1608
1609 * Makefile.in (x86-linux.o): New rule.
1610 * configure.srv: Add x86-linux.o to relevant targets.
1611 * linux-low.c (lwp_set_arch_private_info): New function.
1612 (lwp_arch_private_info): Likewise.
1613 * linux-x86-low.c: Include nat/x86-linux.h.
1614 (arch_lwp_info): Removed structure.
1615 (update_debug_registers_callback):
1616 Use lwp_set_debug_registers_changed.
1617 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1618 and lwp_set_debug_registers_changed.
1619 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1620
34c703da
GB
16212015-03-24 Gary Benson <gbenson@redhat.com>
1622
1623 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1624 * linux-arm-low.c (arm_new_thread): Likewise.
1625 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1626 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1627 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1628 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1629
cff068da
GB
16302015-03-24 Gary Benson <gbenson@redhat.com>
1631
1632 * linux-low.c (ptid_of_lwp): New function.
1633 (lwp_is_stopped): Likewise.
1634 (lwp_stop_reason): Likewise.
1635 * linux-x86-low.c (update_debug_registers_callback):
1636 Use lwp_is_stopped.
1637 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1638 lwp_stop_reason.
1639
b2f7c7e8
GB
16402015-03-24 Gary Benson <gbenson@redhat.com>
1641
1642 * linux-low.h (linux_stop_lwp): Remove declaration.
1643
6d4ee8c6
GB
16442015-03-24 Gary Benson <gbenson@redhat.com>
1645
1646 * linux-low.h: Include nat/linux-nat.h.
1647 * linux-low.c (iterate_over_lwps_args): New structure.
1648 (iterate_over_lwps_filter): New function.
1649 (iterate_over_lwps): Likewise.
1650 * linux-x86-low.c (update_debug_registers_callback):
1651 Update signature to what iterate_over_lwps expects.
1652 Remove PID check that iterate_over_lwps now performs.
1653 (x86_dr_low_set_addr): Use iterate_over_lwps.
1654 (x86_dr_low_set_control): Likewise.
1655
70a0bb6b
GB
16562015-03-24 Gary Benson <gbenson@redhat.com>
1657
1658 * linux-x86-low.c (x86_debug_reg_state): New function.
1659 (x86_linux_prepare_to_resume): Use the above.
1660
7b669087
GB
16612015-03-24 Gary Benson <gbenson@redhat.com>
1662
1663 * linux-low.c (current_lwp_ptid): New function.
1664 * linux-x86-low.c: Include nat/linux-nat.h.
1665 (x86_dr_low_get_addr): Use current_lwp_ptid.
1666 (x86_dr_low_get_control): Likewise.
1667 (x86_dr_low_get_status): Likewise.
1668
eef49a3d
PA
16692015-03-20 Pedro Alves <palves@redhat.com>
1670
1671 * tracepoint.c (cmd_qtstatus): Make "str" const.
1672
b2333d22
PA
16732015-03-20 Pedro Alves <palves@redhat.com>
1674
1675 * server.c (handle_general_set): Make "req_str" const.
1676
23f238d3
PA
16772015-03-19 Pedro Alves <palves@redhat.com>
1678
1679 * linux-low.c (linux_resume_one_lwp): Rename to ...
1680 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1681 instead call perror_with_name.
1682 (check_ptrace_stopped_lwp_gone): New function.
1683 (linux_resume_one_lwp): Reimplement as wrapper around
1684 linux_resume_one_lwp_throw that swallows errors if the LWP is
1685 gone.
1686
91baf43f
PA
16872015-03-19 Pedro Alves <palves@redhat.com>
1688
1689 * linux-low.c (count_events_callback, select_event_lwp_callback):
1690 No longer check whether the thread has resume_stop as last resume
1691 kind.
1692
8bf3b159
PA
16932015-03-19 Pedro Alves <palves@redhat.com>
1694
1695 * linux-low.c (count_events_callback, select_event_lwp_callback):
1696 Use the lwp's status_pending_p field, not the thread's.
1697
b90fc188
PA
16982015-03-19 Pedro Alves <palves@redhat.com>
1699
1700 * linux-low.c (select_event_lwp_callback): Update comments to
1701 no longer mention SIGTRAP.
1702
464b0089
GB
17032015-03-18 Gary Benson <gbenson@redhat.com>
1704
1705 * server.c (handle_query): Do not report vFile:fstat as supported.
1706
aa9e327f
GB
17072015-03-11 Gary Benson <gbenson@redhat.com>
1708
1709 * hostio.c (sys/types.h): New include.
1710 (sys/stat.h): Likewise.
1711 (common-remote-fileio.h): Likewise.
1712 (handle_fstat): New function.
1713 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 1714
791c0056
GB
17152015-03-11 Gary Benson <gbenson@redhat.com>
1716
1717 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1718 struct stat.st_blocks and struct stat.st_blksize.
1719 * configure: Regenerate.
1720 * config.in: Likewise.
1721 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1722 (OBS): Add common-remote-fileio.o.
1723 (common-remote-fileio.o): New rule.
1724
9a9df970
PA
17252015-03-09 Pedro Alves <palves@redhat.com>
1726
1727 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1728 'struct sockaddr' pointer in 'accept' call.
1729
9eb1356e
PA
17302015-03-09 Pedro Alves <palves@redhat.com>
1731
1732 Revert:
1733 2015-03-07 Pedro Alves <palves@redhat.com>
1734 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1735 or <winsock2.h> here. Instead include "gdb_socket.h".
1736 (remote_open): Use union gdb_sockaddr_u.
1737 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1738 or <winsock2.h> here. Instead include "gdb_socket.h".
1739 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1740 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1741 or <sys/un.h>.
1742 (init_named_socket, gdb_agent_helper_thread): Use union
1743 gdb_sockaddr_u.
1744
aac331e4
PA
17452015-03-07 Pedro Alves <palves@redhat.com>
1746
1747 * configure.ac (build_warnings): Move
1748 -Wdeclaration-after-statement to the C-specific set.
1749 * configure: Regenerate.
1750
366c75fc
PA
17512015-03-07 Pedro Alves <palves@redhat.com>
1752
1753 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1754 or <winsock2.h> here. Instead include "gdb_socket.h".
1755 (remote_open): Use union gdb_sockaddr_u.
1756 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1757 or <winsock2.h> here. Instead include "gdb_socket.h".
1758 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1759 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1760 or <sys/un.h>.
1761 (init_named_socket, gdb_agent_helper_thread): Use union
1762 gdb_sockaddr_u.
1763
492d29ea
PA
17642015-03-07 Pedro Alves <palves@redhat.com>
1765
1766 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1767 instead.
1768
60a191ed
YQ
17692015-03-06 Yao Qi <yao.qi@linaro.org>
1770
1771 * linux-aarch64-low.c (aarch64_insert_point): Use
1772 show_debug_regs as a boolean.
1773 (aarch64_remove_point): Likewise.
1774
f5771b1d
PA
17752015-03-05 Pedro Alves <palves@redhat.com>
1776
1777 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1778 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1779 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1780 * nto-low.c (nto_target_ops): Likewise.
1781 * spu-low.c (spu_target_ops): Likewise.
1782 * win32-low.c (win32_target_ops): Likewise.
1783
3e572f71
PA
17842015-03-04 Pedro Alves <palves@redhat.com>
1785
72f4393d 1786 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
1787 Decide whether a breakpoint triggered based on the SIGTRAP's
1788 siginfo.si_code.
72f4393d
L
1789 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1790 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
1791 (linux_low_filter_event): Check for breakpoints before checking
1792 watchpoints.
1793 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1794 siginfo.si_code.
72f4393d
L
1795 (linux_stopped_by_sw_breakpoint)
1796 (linux_supports_stopped_by_sw_breakpoint)
1797 (linux_stopped_by_hw_breakpoint)
1798 (linux_supports_stopped_by_hw_breakpoint): New functions.
1799 (linux_target_ops): Install new target methods.
3e572f71 1800
1ec68e26
PA
18012015-03-04 Pedro Alves <palves@redhat.com>
1802
1803 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1804 * server.c (swbreak_feature, hwbreak_feature): New globals.
1805 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1806 (captured_main): Clear swbreak_feature and hwbreak_feature.
1807 * server.h (swbreak_feature, hwbreak_feature): Declare.
1808 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1809 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1810 supports_stopped_by_hw_breakpoint>: New fields.
1811 (target_supports_stopped_by_sw_breakpoint)
1812 (target_stopped_by_sw_breakpoint)
1813 (target_supports_stopped_by_hw_breakpoint)
1814 (target_stopped_by_hw_breakpoint): Declare.
1815
15c66dd6
PA
18162015-03-04 Pedro Alves <palves@redhat.com>
1817
1818 enum lwp_stop_reason -> enum target_stop_reason
1819 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1820 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1821 (linux_wait_1, stuck_in_jump_pad_callback)
1822 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1823 (linux_stopped_by_watchpoint):
1824 * linux-low.h (enum lwp_stop_reason): Delete.
1825 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1826 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1827
98fc70d6
YQ
18282015-03-04 Yao Qi <yao.qi@linaro.org>
1829
1830 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1831
dd2ac174
GB
18322015-03-03 Gary Benson <gbenson@redhat.com>
1833
1834 * hostio.c (handle_vFile): Fix prefix lengths.
1835
d68e53f4
MM
18362015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1837
1838 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1839 ptr_bits.
1840
bf2d68ab
AA
18412015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1842
1843 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1844 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1845 (clean): Add "rm -f" for above C files.
1846 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1847 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1848 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1849 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1850 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1851 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1852 (init_registers_s390x_vx_linux64)
1853 (init_registers_s390x_tevx_linux64)
1854 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1855 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1856 declarations.
1857 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1858 (s390_store_vxrs_high): New functions.
1859 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1860 NT_S390_VXRS_HIGH.
1861 (s390_arch_setup): Add logic for selecting one of the new target
1862 descriptions. Activate the new vector regsets if applicable.
1863 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1864 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1865 and init_registers_s390x_tevx_linux64.
1866
c966a859
PA
18672015-03-01 Pedro Alves <palves@redhat.com>
1868
1869 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1870 parameter.
1871
4180215b
PA
18722015-02-27 Pedro Alves <palves@redhat.com>
1873
1874 * linux-x86-low.c (u_debugreg_offset): New function.
1875 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1876
749bab01
PA
18772015-02-27 Pedro Alves <palves@redhat.com>
1878
1879 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1880 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1881 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1882 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1883 (ps_lsetfpregs, ps_getpid)
1884 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1885 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1886 (ps_lsetxregs, ps_plog): Declare.
1887
3c14e5a3
PA
18882015-02-27 Pedro Alves <palves@redhat.com>
1889
1890 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1891 IP_AGENT_EXPORT_FUNC.
1892 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1893 IP_AGENT_EXPORT_FUNC.
1894 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1895 (IP_AGENT_EXPORT): Delete.
1896 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1897 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1898 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1899 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1900 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1901 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1902 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1903 (traceframe_read_count, traceframe_write_count)
1904 (traceframes_created, trace_state_variables, get_raw_reg)
1905 (get_trace_state_variable_value, set_trace_state_variable_value)
1906 (ust_loaded, helper_thread_id, cmd_buf): Use
1907 IPA_SYM_EXPORTED_NAME.
1908 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1909 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1910 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1911 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1912 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1913 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1914 EXTERN_C_PUSH/EXTERN_C_POP.
1915 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1916 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1917 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1918 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1919 (traceframe_write_count, traceframe_read_count)
1920 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1921 (about_to_request_buffer_space, get_trace_state_variable_value)
1922 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1923 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1924 EXTERN_C_PUSH/EXTERN_C_POP.
1925 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1926 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1927 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1928 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1929 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1930 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1931 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1932 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1933 Define.
1934 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1935 (IP_AGENT_EXPORT_VAR_DECL): Define.
1936 (tracing): Declare.
1937 (gdb_agent_get_raw_reg): Declare.
1938
fe978cb0
PA
19392015-02-27 Tom Tromey <tromey@redhat.com>
1940 Pedro Alves <palves@redhat.com>
1941
1942 Rename symbols whose names are reserved C++ keywords throughout.
1943
3bc3d82a
PA
19442015-02-27 Pedro Alves <palves@redhat.com>
1945
1946 * Makefile.in (COMPILER): New, get it from autoconf.
1947 (CXX): Get from autoconf instead.
1948 (COMPILE.pre): Use COMPILER.
1949 (CC-LD): Rename to ...
1950 (CC_LD): ... this. Use COMPILER.
1951 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
1952 (CXX_FOR_TARGET): Default to g++ instead of gcc.
1953 * acinclude.m4: Include build-with-cxx.m4.
1954 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
1955 Disable -Werror by default if building in C++ mode.
1956 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
1957 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
1958 the C++ compiler. Save/restore CXXFLAGS too.
1959 * configure: Regenerate.
1960
07697489
PA
19612015-02-27 Pedro Alves <palves@redhat.com>
1962
1963 * acinclude.m4: Include libiberty.m4.
1964 * configure.ac: Call libiberty_INIT.
1965 * config.in, configure: Regenerate.
1966
9beb7c4e
PA
19672015-02-26 Pedro Alves <palves@redhat.com>
1968
1969 * linux-low.c (linux_wait_1): When incrementing the PC past a
1970 program breakpoint always use the_low_target.breakpoint_len as
1971 increment, rather than the maximum between that and
1972 the_low_target.decr_pc_after_break.
1973
8090aef2
PA
19742015-02-23 Pedro Alves <palves@redhat.com>
1975
1976 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
1977 thread was doing a step-over; always adjust the PC if
1978 we stepped over a permanent breakpoint.
1979 (linux_wait_1): If we stepped over breakpoint that was on top of a
1980 permanent breakpoint, manually advance the PC past it.
1981
bc9540e8
PA
19822015-02-23 Pedro Alves <palves@redhat.com>
1983
1984 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
1985 modes.
1986 (x86_fill_gregset, x86_store_gregset): Use it when handling
1987 $orig_eax.
1988
2db9a427
PA
19892015-02-20 Pedro Alves <palves@redhat.com>
1990
1991 * thread-db.c: Include "nat/linux-procfs.h".
1992 (thread_db_init): Skip listing new threads if the kernel supports
1993 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
1994
afa8d396
PA
19952015-02-20 Pedro Alves <palves@redhat.com>
1996
1997 * linux-low.c (status_pending_p_callback): Use ptid_match.
1998
c9587f88
AT
19992015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2000
2001 PR breakpoints/16812
2002 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2003 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2004 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2005
b05ec7a5
AT
20062015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2007
2008 PR breakpoints/15956
2009 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2010
d33501a5
MM
20112015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2012
2013 * linux-low.c (linux_low_btrace_conf): Print size.
2014 * server.c (handle_btrace_conf_general_set): New.
2015 (hanle_general_set): Call handle_btrace_conf_general_set.
2016 (handle_query): Report Qbtrace-conf:bts:size as supported.
2017
f4abbc16
MM
20182015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2019
2020 * linux-low.c (linux_low_enable_btrace): Update parameters.
2021 (linux_low_btrace_conf): New.
2022 (linux_target_ops)<to_btrace_conf>: Initialize.
2023 * server.c (current_btrace_conf): New.
2024 (handle_btrace_enable): Rename to ...
2025 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
2026 to target_enable_btrace. Update comment. Update users.
2027 (handle_qxfer_btrace_conf): New.
2028 (qxfer_packets): Add btrace-conf entry.
2029 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2030 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2031 (target_ops)<read_btrace_conf>: New.
2032 (target_enable_btrace): Update parameters.
2033 (target_read_btrace_conf): New.
2034
043c3577
MM
20352015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2036
2037 * server.c (handle_btrace_general_set): Remove call to
2038 target_supports_btrace.
2039 (supported_btrace_packets): New.
2040 (handle_query): Call supported_btrace_packets.
2041 * target.h: include btrace-common.h.
2042 (btrace_target_info): Removed.
2043 (supports_btrace, target_supports_btrace): Update parameters.
2044
734b0e4b
MM
20452015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2046
2047 * Makefile.in (SFILES): Add common/btrace-common.c.
2048 (OBS): Add common/btrace-common.o.
2049 (btrace-common.o): Add build rules.
2050 * linux-low: Include btrace-common.h.
2051 (linux_low_read_btrace): Use struct btrace_data. Call
2052 btrace_data_init and btrace_data_fini.
2053
d6c146e9
PA
20542015-02-06 Pedro Alves <palves@redhat.com>
2055
2056 * thread-db.c (find_new_threads_callback): Add debug output.
2057
20ba1ce6
PA
20582015-02-04 Pedro Alves <palves@redhat.com>
2059
2060 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2061 (resume_stopped_resumed_lwps): New function.
2062 (linux_wait_for_event_filtered): Use it.
2063
8cc73a39
SDJ
20642015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2065
2066 * Makefile.in (SFILES): Add linux-personality.c.
2067 (linux-personality.o): New rule.
2068 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2069 list of objects to be built.
2070 * linux-low.c: Include nat/linux-personality.h.
2071 (linux_create_inferior): Remove code to disable address space
2072 randomization (moved to ../nat/linux-personality.c). Create
2073 cleanup to disable address space randomization.
2074
fb23d554
SDJ
20752015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2076
2077 * Makefile.in (posix-strerror.o): New rule.
2078 (mingw-strerror.o): Likewise.
2079 * configure: Regenerated.
2080 * configure.ac: Source file ../common/common.host. Initialize new
2081 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2082
cdf43629
YQ
20832015-01-14 Yao Qi <yao@codesourcery.com>
2084
2085 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2086 (ppc-linux.o): New rule.
2087 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2088 * configure.ac: AC_CHECK_FUNCS(getauxval).
2089 * config.in: Re-generated.
2090 * configure: Re-generated.
2091 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2092 ppc64_64bit_inferior_p
2093
514c5338
YQ
20942015-01-14 Yao Qi <yao@codesourcery.com>
2095
2096 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2097 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2098 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2099 (PT_ORIG_R3, PT_TRAP): Likewise.
2100 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2101 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2102 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2103
3368c1e5
JB
21042015-01-10 Joel Brobecker <brobecker@adacore.com>
2105
2106 * i387-fp.c (i387_cache_to_xsave): In look over
2107 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2108 zmmh_low_space field by use of zmmh_high_space.
2109
582511be
PA
21102015-01-09 Pedro Alves <palves@redhat.com>
2111
2112 * linux-low.c (step_over_bkpt): Move higher up in the file.
2113 (handle_extended_wait): Don't store the stop_pc here.
2114 (get_stop_pc): Adjust comments and rename to ...
2115 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2116 stopped for a software breakpoint or hardware breakpoint.
2117 (thread_still_has_status_pending_p): New function.
2118 (status_pending_p_callback): Use
2119 thread_still_has_status_pending_p. If the event is no longer
2120 interesting, resume the LWP.
2121 (handle_tracepoints): Add assert.
2122 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2123 (wstatus_maybe_breakpoint): New function.
2124 (cancel_breakpoint): Delete function.
2125 (check_stopped_by_watchpoint): New function, factored out from
2126 linux_low_filter_event.
2127 (lp_status_maybe_breakpoint): Delete function.
2128 (linux_low_filter_event): Remove filter_ptid argument.
2129 Leave thread group exits pending here. Store the LWP's stop PC.
2130 Always leave events pending.
2131 (linux_wait_for_event_filtered): Pull all events out of the
2132 kernel, and leave them all pending.
2133 (count_events_callback, select_event_lwp_callback): Consider all
2134 events.
2135 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2136 (select_event_lwp): Only give preference to the stepping LWP in
2137 all-stop mode. Adjust comments.
2138 (ignore_event): New function.
2139 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2140 references to cancel_breakpoints. Adjust to renames. Also give
2141 equal priority to all LWPs that have had events in non-stop mode.
2142 If reporting a software breakpoint event, unadjust the LWP's PC.
2143 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2144 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2145 Adjust.
2146 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2147 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2148 (linux_stopped_by_watchpoint): Adjust.
2149 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2150 * linux-low.h (enum lwp_stop_reason): New.
2151 (struct lwp_info) <stop_pc>: Adjust comment.
2152 <stopped_by_watchpoint>: Delete field.
2153 <stop_reason>: New field.
2154 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2155 * mem-break.c (software_breakpoint_inserted_here)
2156 (hardware_breakpoint_inserted_here): New function.
2157 * mem-break.h (software_breakpoint_inserted_here)
2158 (hardware_breakpoint_inserted_here): Declare.
2159 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2160 (cancel_breakpoints): Delete.
2161 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2162 (upload_fast_traceframes): Remove references to
2163 cancel_breakpoints.
2164
a33e3959
PA
21652015-01-09 Pedro Alves <palves@redhat.com>
2166
2167 * thread-db.c (find_new_threads_callback): Ignore thread if the
2168 kernel thread ID is -1.
2169
8784d563
PA
21702015-01-09 Pedro Alves <palves@redhat.com>
2171
2172 * linux-low.c (linux_attach_fail_reason_string): Move to
2173 nat/linux-ptrace.c, and rename.
2174 (linux_attach_lwp): Update comment.
2175 (attach_proc_task_lwp_callback): New function.
2176 (linux_attach): Adjust to rename and use
2177 linux_proc_attach_tgid_threads.
2178 (linux_attach_fail_reason_string): Delete declaration.
2179
76f2b779
JB
21802015-01-01 Joel Brobecker <brobecker@adacore.com>
2181
2182 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2183 * server.c (gdbserver_version): Likewise.
2184
fafcc06a
SDJ
21852014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2186
2187 * remote-utils.c: Include ctype.h.
2188 (input_interrupt): Explicitly handle the case when the char
2189 received is the NUL byte. Improve the printing of non-ASCII
2190 characters.
2191
beed38b8
JB
21922014-12-16 Joel Brobecker <brobecker@adacore.com>
2193
2194 * linux-low.c (linux_low_filter_event): Update call to
2195 linux_enable_event_reporting following the addition of
2196 a new parameter to that function.
2197
bf330350
CU
21982014-12-16 Catalin Udma <catalin.udma@freescale.com>
2199
2200 PR server/17457
2201 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2202 (AARCH64_FPCR_REGNO): Likewise.
2203 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2204 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2205 (aarch64_store_fpregset): Likewise.
2206
5227d625
JB
22072014-12-15 Joel Brobecker <brobecker@adacore.com>
2208
2209 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2210 Remove FIXME comment about assumption about N.
2211
f93b65a0
JB
22122014-12-13 Joel Brobecker <brobecker@adacore.com>
2213
2214 * configure.ac: If large-file support is disabled in GDBserver,
2215 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2216 * configure: Regenerate.
2217
e5a9158d
AA
22182014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2219
2220 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2221 warning upon ENODATA from ptrace.
2222 * linux-s390-low.c (s390_store_tdb): New.
2223 (s390_regsets): Add regset for NT_S390_TDB.
2224
feea5f36
AA
22252014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2226
2227 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2228 without a fill_function.
2229 * linux-s390-low.c (s390_fill_last_break): Remove.
2230 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2231 (s390_arch_setup): Use regset's size instead of fill_function for
2232 loop end condition.
2233
098dbe61
AA
22342014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2235
2236 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2237 the regset's store function when ptrace returned an error.
2238 * regcache.c (get_thread_regcache): Invalidate register cache
2239 before fetching inferior's registers.
2240
28eef672
AA
22412014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2242
2243 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2244 while-loop as for-loop.
2245 (regsets_store_inferior_registers): Likewise.
2246
bdca27a2
YQ
22472014-11-28 Yao Qi <yao@codesourcery.com>
2248
2249 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2250 * config.in, configure: Re-generate.
2251 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2252 is defined.
2253
9c232dda
YQ
22542014-11-21 Yao Qi <yao@codesourcery.com>
2255
2256 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2257 (AC_CHECK_HEADERS): Remove malloc.h.
2258 * configure: Re-generated.
2259 * config.in: Re-generated.
2260 * server.h: Don't include alloca.h and malloc.h.
2261 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2262 Don't include malloc.h.
2263
43968415
JB
22642014-11-17 Joel Brobecker <brobecker@adacore.com>
2265
2266 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2267 corresponding ERRNO check in same block.
2268
40e91bc7
PA
22692014-11-12 Pedro Alves <palves@redhat.com>
2270
2271 * server.c (cont_thread): Update comment.
2272 (start_inferior, attach_inferior): No longer clear cont_thread.
2273 (handle_v_cont): No longer set cont_thread.
2274 (captured_main): Clear cont_thread each time a GDB connects.
2275
c2c118cf
PA
22762014-11-12 Pedro Alves <palves@redhat.com>
2277
2278 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2279 thread, and don't resume all threads if the Hc thread has exited.
2280
78708b7c
PA
22812014-11-12 Pedro Alves <palves@redhat.com>
2282
2283 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2284 the process group instead of to a specific LWP.
2285
a2abc7de
PA
22862014-10-15 Pedro Alves <palves@redhat.com>
2287
2288 PR server/17487
2289 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2290 parameter.
2291 (arm_set_thread_context): Delete.
2292 (the_low_target): Adjust.
2293 * win32-i386-low.c (debug_registers_changed)
2294 (debug_registers_used): Delete.
2295 (update_debug_registers_callback): New function.
2296 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2297 needing to update their debug registers.
2298 (win32_get_current_dr): New function.
2299 (x86_dr_low_get_addr, x86_dr_low_get_control)
2300 (x86_dr_low_get_status): Fetch the debug register from the thread
2301 record's context.
2302 (i386_initial_stuff): Adjust.
2303 (i386_get_thread_context): Remove current_event parameter. Don't
2304 clear debug_registers_changed nor copy DR values to
2305 debug_reg_state.
2306 (i386_set_thread_context): Delete.
2307 (i386_prepare_to_resume): New function.
2308 (i386_thread_added): Mark the thread as needing to update irs
2309 debug registers.
2310 (the_low_target): Remove i386_set_thread_context and install
2311 i386_prepare_to_resume.
2312 * win32-low.c (win32_get_thread_context): Adjust.
2313 (win32_set_thread_context): Use SetThreadContext
2314 directly.
2315 (win32_prepare_to_resume): New function.
2316 (win32_require_context): New function, factored out from ...
2317 (thread_rec): ... this.
2318 (continue_one_thread): Call win32_prepare_to_resume on each thread
2319 we're about to continue.
2320 (win32_resume): Call win32_prepare_to_resume on the event thread.
2321 * win32-low.h (struct win32_thread_info)
2322 <debug_registers_changed>: New field.
2323 (struct win32_target_ops): Change prototype of set_thread_context,
2324 delete set_thread_context and add prepare_to_resume.
2325 (win32_require_context): New declaration.
2326
a442d071
GB
23272014-10-08 Gary Benson <gbenson@redhat.com>
2328
2329 * server.h: Do not include common-exceptions.h.
2330
6f1947e8
GB
23312014-10-08 Gary Benson <gbenson@redhat.com>
2332
2333 * server.h: Do not include cleanups.h.
2334
63b434a4
JH
23352014-09-30 James Hogan <james.hogan@imgtec.com>
2336
2337 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2338 mips64-dsp-linux.c.
2339
c4d9ceb6
YQ
23402014-09-23 Yao Qi <yao@codesourcery.com>
2341
2342 * linux-low.c (lp_status_maybe_breakpoint): New function.
2343 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2344 (count_events_callback): Likewise.
2345 (select_event_lwp_callback): Likewise.
2346 (cancel_breakpoints_callback): Likewise.
2347
89a5711c
DB
23482014-09-19 Don Breazeal <donb@codesourcery.com>
2349
2350 * linux-low.c (handle_extended_wait): Call
2351 linux_ptrace_get_extended_event.
2352 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2353 linux_is_extended_waitstatus.
2354
bffc0964
JB
23552014-09-16 Joel Brobecker <brobecker@adacore.com>
2356
2357 * Makefile.in (CPPFLAGS): Define.
2358 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2359 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2360
0bfdf32f
GB
23612014-09-16 Gary Benson <gbenson@redhat.com>
2362
2363 * inferiors.h (current_inferior): Renamed as...
2364 (current_thread): New variable. All uses updated.
2365 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2366 (maybe_move_out_of_jump_pad): Likewise.
2367 (cancel_breakpoint): Likewise.
2368 (linux_low_filter_event): Likewise.
2369 (wait_for_sigstop): Likewise.
2370 (linux_resume_one_lwp): Likewise.
2371 (need_step_over_p): Likewise.
2372 (start_step_over): Likewise.
2373 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2374 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2375 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2376 and save_inferior as saved_thread.
2377 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2378 saved_thread.
2379 (regcache_invalidate_thread): Likewise.
2380 * remote-utils.c (prepare_resume_reply): Likewise.
2381 * thread-db.c (thread_db_get_tls_address): Likewise.
2382 (disable_thread_event_reporting): Likewise.
2383 (remove_thread_event_breakpoints): Likewise.
2384 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2385 as saved_thread.
2386 * target.h (set_desired_inferior): Renamed as...
2387 (set_desired_thread): New declaration. All uses updated.
2388 * server.c (myresume): Updated comment to reference thread instead
2389 of inferior.
2390 (handle_serial_event): Likewise.
2391 (handle_target_event): Likewise.
2392
361c8ade
GB
23932014-09-12 Tom Tromey <tromey@redhat.com>
2394 Gary Benson <gbenson@redhat.com>
2395
2396 * regcache.h: Include common-regcache.h.
2397 (regcache_read_pc): Don't declare.
2398 * regcache.c (get_thread_regcache_for_ptid): New function.
2399
bd9269f7
GB
24002014-09-11 Tom Tromey <tromey@redhat.com>
2401 Gary Benson <gbenson@redhat.com>
2402
2403 * symbol.c: New file.
2404 * Makefile.in (SFILES): Add symbol.c.
2405 (OBS): Add symbol.o.
2406
f8c1d06b
GB
24072014-09-11 Gary Benson <gbenson@redhat.com>
2408
2409 * target.c (target_stop_ptid, target_continue_ptid): New
2410 functions.
2411
721ec300
GB
24122014-09-11 Tom Tromey <tromey@redhat.com>
2413 Gary Benson <gbenson@redhat.com>
2414
2415 * target.h: Include target/target.h.
2416 * target.c (target_read_memory, target_read_uint32)
2417 (target_write_memory): New functions.
2418
c5e92cca
GB
24192014-09-11 Gary Benson <gbenson@redhat.com>
2420
2421 * server.h (debug_hw_points): Don't declare.
2422 * server.c (debug_hw_points): Don't define. Replace all uses
2423 with show_debug_regs.
2424 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2425 all uses with show_debug_regs.
2426
2e4bb98a
EBM
24272014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2428
2429 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2430 endianness into account.
2431 (ppc_supply_ptrace_register): Likewise.
2432
ac740bc7
JH
24332014-09-03 James Hogan <james.hogan@imgtec.com>
2434
2435 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2436 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2437
97ea6506
GB
24382014-09-03 Gary Benson <gbenson@redhat.com>
2439
2440 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2441 ALL_DEBUG_ADDRESS_REGISTERS.
2442
df7e5265
GB
24432014-09-02 Gary Benson <gbenson@redhat.com>
2444
2445 * i386-low.h: Renamed as...
2446 * x86-low.h: New file. All type, function and variable name
2447 prefixes changed from "i386_" to "x86_". All references updated.
2448 * i386-low.c: Renamed as...
2449 * x86-low.c: New file. All type, function and variable name
2450 prefixes changed from "i386_" to "x86_". All references updated.
2451
ed859da7
GB
24522014-09-02 Gary Benson <gbenson@redhat.com>
2453
2454 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2455 (x86_linux_new_thread): Likewise.
2456
860789c7
GB
24572014-08-29 Gary Benson <gbenson@redhat.com>
2458
2459 * server.h (setjmp.h): Do not include.
2460 (toplevel): Do not declare.
2461 (common-exceptions.h): Include.
2462 (cleanups.h): Likewise.
2463 * server.c (toplevel): Do not define.
2464 (exit_code): New static global.
2465 (detach_or_kill_for_exit_cleanup): New function.
2466 (main): New function. Original main renamed to...
2467 (captured_main): New function.
2468 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2469
ff55e1b5
GB
24702014-08-29 Gary Benson <gbenson@redhat.com>
2471
2472 * Makefile.in (SFILES): Add common/common-exceptions.c.
2473 (OBS): Add common-exceptions.o.
2474 (common-exceptions.o): New rule.
2475 * utils.c (prepare_to_throw_exception): New function.
2476
e9bcb658
GB
24772014-08-29 Gary Benson <gbenson@redhat.com>
2478
2479 * config.in: Regenerate.
2480 * configure: Likewise.
2481
e3180625
GB
24822014-08-29 Gary Benson <gbenson@redhat.com>
2483
2484 * Makefile.in (SFILES): Add common/cleanups.c.
2485 (OBS): cleanups.o.
2486 (cleanups.o): New rule.
2487
e3d6ba5d
GB
24882014-08-29 Gary Benson <gbenson@redhat.com>
2489
2490 * utils.c (internal_vwarning): New function.
2491
7096e886
GB
24922014-08-28 Gary Benson <gbenson@redhat.com>
2493
2494 * utils.h (fatal): Remove declaration.
2495 * utils.c (fatal): Remove function.
2496
14ce3192
GB
24972014-08-28 Gary Benson <gbenson@redhat.com>
2498
2499 * tracepoint.c (gdb_agent_init): Replace fatal with
2500 perror_with_name.
2501 (initialize_tracepoint): Likewise.
2502
50278d59
GB
25032014-08-28 Gary Benson <gbenson@redhat.com>
2504
2505 * remote-utils.c (remote_prepare): Replace fatal with error.
2506
aa96c426
GB
25072014-08-28 Gary Benson <gbenson@redhat.com>
2508
2509 * linux-low.c (linux_async): Replace fatal with warning.
2510 Tidy up and return.
2511 (linux_start_non_stop): Return -1 if linux_async failed.
2512
f7160e97
GB
25132014-08-28 Gary Benson <gbenson@redhat.com>
2514
2515 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2516 gdb_assert.
2517 (i386_dr_low_get_addr): Remove vague comment.
2518 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2519 gdb_assert.
2520
38e08fca
GB
25212014-08-28 Gary Benson <gbenson@redhat.com>
2522
2523 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2524 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2525 internal_error.
2526 (linux_resume_one_lwp): Likewise.
2527 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2528 gdb_assert.
2529 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2530 with internal_error.
2531 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2532 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2533 (find_register_by_name): Replace fatal with internal_error.
2534 (find_regno): Likewise.
2535 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2536 * thread-db.c (thread_db_create_event): Likewise.
2537 (thread_db_load_search): Likewise.
2538 (try_thread_db_load_1): Likewise.
2539 * tracepoint.c (get_jump_space_head): Replace fatal with
2540 internal_error.
2541 (claim_trampoline_space): Likewise.
2542 (have_fast_tracepoint_trampoline_buffer): Likewise.
2543 (cmd_qtstart): Likewise.
2544 (stop_tracing): Likewise.
2545 (fast_tracepoint_collecting): Likewise.
2546 (target_malloc): Likewise.
2547 (download_tracepoint): Likewise.
2548 (download_trace_state_variables): Replace check with gdb_assert.
2549 (upload_fast_traceframes): Replace fatal with internal_error.
2550
34abf635
GB
25512014-08-19 Tom Tromey <tromey@redhat.com>
2552 Gary Benson <gbenson@redhat.com>
2553
2554 * Makefile.in (SFILES): Add common/common-debug.c.
2555 (OBS): Add common-debug.o.
2556 (common-debug.o): New rule.
2557 * debug.h (debug_printf): Don't declare.
2558 * debug.c (debug_printf): Renamed and rewritten as...
2559 (debug_vprintf): New function.
2560
f6e94d78
GB
25612014-08-19 Gary Benson <gbenson@redhat.com>
2562
2563 * utils.h: Do not include print-utils.h.
2564
9239eeab
GB
25652014-08-19 Tom Tromey <tromey@redhat.com>
2566 Gary Benson <gbenson@redhat.com>
2567
2568 * server.h: Add static assertion.
2569 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2570
ef87c8bb
GB
25712014-08-19 Tom Tromey <tromey@redhat.com>
2572 Gary Benson <gbenson@redhat.com>
2573
2574 * Makefile.in (SFILES): Add common/errors.c.
2575 (OBS): Add errors.o.
2576 (IPA_OBS): Add errors-ipa.o.
2577 (errors.o): New rule.
2578 (errors-ipa.o): Likewise.
2579 * utils.h (perror_with_name, error, warning): Don't declare.
2580 * utils.c (warning): Renamed and rewritten as...
2581 (vwarning): New function.
2582 (error): Renamed and rewritten as...
2583 (verror): New function.
2584 (internal_error): Renamed and rewritten as...
2585 (internal_verror): New function.
2586
bb974a24
GB
25872014-08-07 Gary Benson <gbenson@redhat.com>
2588
2589 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2590 * configure: Regenerate.
2591 * config.in: Likewise.
2592 * server.h: Do not include errno.h.
2593 * event-loop.c: Likewise.
2594 * hostio-errno.c: Likewise.
2595 * linux-low.c: Likewise.
2596 * remote-utils.c: Likewise.
2597 * spu-low.c: Likewise.
2598 * utils.c: Likewise.
2599 * gdbreplay.c: Unconditionally include errno.h.
2600
6d3d12eb
GB
26012014-08-07 Gary Benson <gbenson@redhat.com>
2602
2603 * server.h: Do not include string.h.
2604 * event-loop.c: Likewise.
2605 * linux-low.c: Likewise.
2606 * regcache.c: Likewise.
2607 * remote-utils.c: Likewise.
2608 * spu-low.c: Likewise.
2609 * utils.c: Likewise.
2610
dccbb609
GB
26112014-08-07 Gary Benson <gbenson@redhat.com>
2612
2613 * server.h: Do not include gdb_assert.h.
2614
e76df0d0
GB
26152014-08-07 Gary Benson <gbenson@redhat.com>
2616
2617 * server.h: Do not include common-utils.h.
2618
4cb9c816
GB
26192014-08-07 Gary Benson <gbenson@redhat.com>
2620
2621 * server.h: Do not include ptid.h.
2622 * notif.h: Likewise.
2623
3995eeee
GB
26242014-08-07 Gary Benson <gbenson@redhat.com>
2625
2626 * server.h: Do not include gdb_locale.h.
2627
cb9f1a9b
GB
26282014-08-07 Gary Benson <gbenson@redhat.com>
2629
2630 * server.h: Do not include gdb/signals.h.
2631 * win32-low.c: Likewise.
2632
a5fceff8
GB
26332014-08-07 Gary Benson <gbenson@redhat.com>
2634
2635 * server.h: Do not include pathmax.h.
2636
b9391142
GB
26372014-08-07 Gary Benson <gbenson@redhat.com>
2638
2639 * server.h: Do not include libiberty.h.
2640 * linux-bfin-low.c: Likewise.
2641
0e443c87
GB
26422014-08-07 Gary Benson <gbenson@redhat.com>
2643
2644 * server.h: Do not include ansidecl.h.
2645
8ebb3f56
GB
26462014-08-07 Gary Benson <gbenson@redhat.com>
2647
2648 * linux-x86-low.c: Do not include stddef.h.
2649 * lynx-ppc-low.c: Likewise.
2650 * tracepoint.c: Likewise.
2651
8980bdf6
GB
26522014-08-07 Gary Benson <gbenson@redhat.com>
2653
2654 * server.h: Do not include stdarg.h.
2655 * nto-low.c: Likewise.
2656
d7096f71
GB
26572014-08-07 Gary Benson <gbenson@redhat.com>
2658
2659 * server.h: Do not include stdlib.h.
2660 * inferiors.c: Likewise.
2661 * linux-low.c: Likewise.
2662 * regcache.c: Likewise.
2663 * spu-low.c: Likewise.
2664 * tracepoint.c: Likewise.
2665 * utils.c: Likewise.
2666
d02f550d
GB
26672014-08-07 Gary Benson <gbenson@redhat.com>
2668
2669 * server.h: Do not include stdio.h.
2670 * linux-low.c: Likewise.
2671 * remote-utils.c: Likewise.
2672 * spu-low.c: Likewise.
2673 * utils.c: Likewise.
2674 * wincecompat.c: Likewise.
2675
87f6c4e3
GB
26762014-08-06 Gary Benson <gbenson@redhat.com>
2677
2678 * regcache.c (init_register_cache): Move conditionals inside if.
2679
7089dca4
GB
26802014-08-06 Gary Benson <gbenson@redhat.com>
2681
2682 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2683
462f517e
GB
26842014-07-31 Gary Benson <gbenson@redhat.com>
2685
2686 * ax.h: Do not include server.h.
2687 * gdbthread.h: Likewise.
2688 * lynx-low.h: Likewise.
2689 * notif.h: Likewise.
2690
976411d6
GB
26912014-07-30 Gary Benson <gbenson@redhat.com>
2692
2693 * server.h: Include common-defs.h.
2694 Do not include config.h or build-gnulib-gdbserver/config.h.
2695
d41f6d8e
GB
26962014-07-30 Gary Benson <gbenson@redhat.com>
2697
2698 * hostio-errno.c: Move server.h to top of includes list.
2699 * inferiors.c: Likewise.
2700 * linux-x86-low.c: Likewise.
2701 * notif.c: Include server.h.
2702
314c6a35
TT
27032014-07-24 Tom Tromey <tromey@redhat.com>
2704 Gary Benson <gbenson@redhat.com>
2705
2706 * server.h (CORE_ADDR): Now unsigned.
2707
69ff6be5
PA
27082014-07-16 Pedro Alves <palves@redhat.com>
2709
2710 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2711
ce9e3fe7
PA
27122014-07-15 Pedro Alves <palves@redhat.com>
2713
2714 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2715 copy.
2716
e76126e8
PA
27172014-07-11 Pedro Alves <palves@redhat.com>
2718
2719 * linux-low.c (kill_wait_lwp): New function, based on
2720 kill_one_lwp_callback, but use my_waitpid directly.
2721 (kill_one_lwp_callback, linux_kill): Use it.
2722
8e9db26e
PA
27232014-06-23 Pedro Alves <palves@redhat.com>
2724
2725 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2726 before setting DR0..DR3.
2727
698b3e08
GB
27282014-06-20 Gary Benson <gbenson@redhat.com>
2729
2730 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2731 * configure: Regenerated.
2732 * config.in: Likewise.
2733
125f8a3d
GB
27342014-06-20 Gary Benson <gbenson@redhat.com>
2735
2736 * Makefile.in (SFILES): Update locations for files moved
2737 from common to nat.
2738 (object file files): Reordered.
2739
42995dbd
GB
27402014-06-20 Gary Benson <gbenson@redhat.com>
2741
2742 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2743 (i386_dr_low_set_addr): Likewise.
2744 (i386_dr_low_get_addr): Likewise.
2745 (i386_dr_low_can_set_control): Likewise.
2746 (i386_dr_low_set_control): Likewise.
2747 (i386_dr_low_get_control): Likewise.
2748 (i386_dr_low_get_status): Likewise.
2749 (i386_get_debug_register_length): Likewise.
2750 * linux-x86-low.c (i386_dr_low_set_addr):
2751 Changed signature. Made static.
2752 (i386_dr_low_get_addr): Likewise.
2753 (i386_dr_low_set_control): Likewise.
2754 (i386_dr_low_get_control): Likewise.
2755 (i386_dr_low_get_status): Likewise.
2756 (i386_dr_low): New global variable.
2757 * win32-i386-low.c (i386_dr_low_set_addr):
2758 Changed signature. Made static.
2759 (i386_dr_low_get_addr): Likewise.
2760 (i386_dr_low_set_control): Likewise.
2761 (i386_dr_low_get_control): Likewise.
2762 (i386_dr_low_get_status): Likewise.
2763 (i386_dr_low): New global variable.
2764
e1d2394b
MS
27652014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2766
2767 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2768 * Makefile.in (AR, AR_FLAGS): Define.
2769 * configure: Regenerate.
2770
3a8ee006
GB
27712014-06-19 Gary Benson <gbenson@redhat.com>
2772
2773 * Makefile.in (i386-dregs.o): New rule.
2774 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2775 * i386-low.c (target.h): Remove include.
2776 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2777 (DR_CONTROL_SHIFT): Likewise.
2778 (DR_CONTROL_SIZE): Likewise.
2779 (DR_RW_EXECUTE): Likewise.
2780 (DR_RW_WRITE): Likewise.
2781 (DR_RW_READ): Likewise.
2782 (DR_RW_IORW): Likewise.
2783 (DR_LEN_1): Likewise.
2784 (DR_LEN_2): Likewise.
2785 (DR_LEN_4): Likewise.
2786 (DR_LEN_8): Likewise.
2787 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2788 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2789 (DR_ENABLE_SIZE): Likewise.
2790 (DR_LOCAL_SLOWDOWN): Likewise.
2791 (DR_GLOBAL_SLOWDOWN): Likewise.
2792 (DR_CONTROL_RESERVED): Likewise.
2793 (I386_DR_CONTROL_MASK): Likewise.
2794 (I386_DR_VACANT): Likewise.
2795 (I386_DR_LOCAL_ENABLE): Likewise.
2796 (I386_DR_GLOBAL_ENABLE): Likewise.
2797 (I386_DR_DISABLE): Likewise.
2798 (I386_DR_SET_RW_LEN): Likewise.
2799 (I386_DR_GET_RW_LEN): Likewise.
2800 (I386_DR_WATCH_HIT): Likewise.
2801 (i386_wp_op_t): Likewise.
2802 (i386_show_dr): Likewise.
2803 (i386_length_and_rw_bits): Likewise.
2804 (i386_insert_aligned_watchpoint): Likewise.
2805 (i386_remove_aligned_watchpoint): Likewise.
2806 (i386_handle_nonaligned_watchpoint): Likewise.
2807 i386_update_inferior_debug_regs(): Likewise.
2808 (i386_dr_insert_watchpoint): Likewise.
2809 (i386_dr_remove_watchpoint): Likewise.
2810 (i386_dr_region_ok_for_watchpoint): Likewise.
2811 (i386_dr_stopped_data_address): Likewise.
2812 (i386_dr_stopped_by_watchpoint): Likewise.
2813
8f26655c
GB
28142014-06-19 Gary Benson <gbenson@redhat.com>
2815
2816 * i386-low.c (i386_dr_show): Renamed to
2817 i386_show_dr and made static. All uses updated.
2818 (i386_dr_length_and_rw_bits): Renamed to
2819 i386_length_and_rw_bits and made static.
2820 All uses updated.
2821 (i386_dr_insert_aligned_watchpoint): Renamed to
2822 i386_insert_aligned_watchpoint and made static.
2823 All uses updated.
2824 (i386_dr_remove_aligned_watchpoint): Renamed to
2825 i386_remove_aligned_watchpoint and made static.
2826 All uses updated.
2827 (i386_dr_update_inferior_debug_regs): Renamed to
2828 i386_update_inferior_debug_regs and made static.
2829 All uses updated.
2830
b9228891
GB
28312014-06-18 Gary Benson <gbenson@redhat.com>
2832
5171def3
GB
2833 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2834 (i386_dr_low_can_set_control): Likewise.
2835 (i386_get_debug_register_length): Likewise.
2836 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2837 (i386_dr_low_can_set_control): Likewise.
2838 (i386_get_debug_register_length): Likewise.
2839
28402014-06-17 Gary Benson <gbenson@redhat.com>
2841
b9228891
GB
2842 * i386-low.h (i386-dregs.h): New include.
2843 (DR_FIRSTADDR): Now in i386-dregs.h.
2844 (DR_LASTADDR): Likewise.
2845 (DR_NADDR): Likewise.
2846 (DR_STATUS): Likewise.
2847 (DR_CONTROL): Likewise.
2848 (i386_debug_reg_state): Likewise.
2849 (i386_dr_insert_watchpoint): Likewise.
2850 (i386_dr_remove_watchpoint): Likewise.
2851 (i386_dr_region_ok_for_watchpoint): Likewise.
2852 (i386_dr_stopped_data_address): Likewise.
2853 (i386_dr_stopped_by_watchpoint): Likewise.
2854 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2855
4be83cc2
GB
28562014-06-18 Gary Benson <gbenson@redhat.com>
2857
2858 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2859 i386_dr_insert_watchpoint.
2860 (i386_low_remove_watchpoint): Renamed to
2861 i386_dr_remove_watchpoint.
2862 (i386_low_region_ok_for_watchpoint): Renamed to
2863 i386_dr_region_ok_for_watchpoint.
2864 (i386_low_stopped_data_address): Renamed to
2865 i386_dr_stopped_data_address.
2866 (i386_low_stopped_by_watchpoint): Renamed to
2867 i386_dr_stopped_by_watchpoint.
2868 * i386-low.c (i386_show_dr): Renamed to
2869 i386_dr_show and made nonstatic. All uses updated.
2870 (i386_length_and_rw_bits): Renamed to
2871 i386_dr_length_and_rw_bits and made nonstatic.
2872 All uses updated.
2873 (i386_insert_aligned_watchpoint): Renamed to
2874 i386_dr_insert_aligned_watchpoint and made nonstatic.
2875 All uses updated.
2876 (i386_remove_aligned_watchpoint): Renamed to
2877 i386_dr_remove_aligned_watchpoint and made nonstatic.
2878 All uses updated.
2879 (i386_update_inferior_debug_regs): Renamed to
2880 i386_dr_update_inferior_debug_regs and made nonstatic.
2881 All uses updated.
2882 (i386_low_insert_watchpoint): Renamed to
2883 i386_dr_insert_watchpoint. All uses updated.
2884 (i386_low_remove_watchpoint): Renamed to
2885 i386_dr_remove_watchpoint. All uses updated.
2886 (i386_low_region_ok_for_watchpoint): Renamed to
2887 i386_dr_region_ok_for_watchpoint. All uses updated.
2888 (i386_low_stopped_data_address): Renamed to
2889 i386_dr_stopped_data_address. All uses updated.
2890 (i386_low_stopped_by_watchpoint): Renamed to
2891 i386_dr_stopped_by_watchpoint. All uses updated.
2892
131aa0d4
GB
28932014-06-18 Gary Benson <gbenson@redhat.com>
2894
2895 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2896 (i386_dr_low_can_set_control): Likewise.
2897 (i386_insert_aligned_watchpoint): New check.
2898
d9305f7f
GB
28992014-06-18 Gary Benson <gbenson@redhat.com>
2900
2901 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2902 Renamed to state.
2903
e927c9fc
GB
29042014-06-18 Gary Benson <gbenson@redhat.com>
2905
2906 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2907 instead of fatal and error.
2908 (i386_handle_nonaligned_watchpoint): Likewise.
2909
1b6d4134
GB
29102014-06-18 Gary Benson <gbenson@redhat.com>
2911
2912 * i386-low.c (i386_get_debug_register_length): New macro.
2913 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2914 (i386_show_dr): Use debug_printf instead of fprintf. Use
2915 phex to format values.
2916
6e62758f
GB
29172014-06-18 Gary Benson <gbenson@redhat.com>
2918
2919 * i386-low.h: Comment changes.
2920 * i386-low.c: Likewise.
2921
fc6e2f03
GB
29222014-06-18 Gary Benson <gbenson@redhat.com>
2923
2924 * i386-low.c: Whitespace changes.
2925
f9d1eeed
TT
29262014-06-12 Tom Tromey <tromey@redhat.com>
2927
2928 * utils.c (freeargv): Remove.
2929
0b04e523
TT
29302014-06-12 Tom Tromey <tromey@redhat.com>
2931
2932 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2933 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2934 (parse_debug_format_options): Likewise.
2935 (gdbserver_usage): Likewise.
2936 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2937 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2938 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2939 against libiberty.
2940 ($(LIBGNU)): Depend on libiberty.
2941 (all-lib): Recurse into all subdirs.
2942 (install-only): Invoke "install" target in subdirs.
2943 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2944 targets.
2945 * configure: Rebuild.
2946 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
2947 for vasprintf, vsnprintf, or gettimeofday.
2948 * configure.srv: Don't add safe-ctype.o or lbasename.o to
2949 srv_tgtobj.
2950
270c9937
JB
29512014-06-05 Joel Brobecker <brobecker@adacore.com>
2952
2953 * development.sh: Delete.
2954 * Makefile.in (config.status): Adjust dependency on development.sh.
2955 * configure.ac: Adjust development.sh source call.
2956 * configure: Regenerate.
2957
0a261ed8
PA
29582014-06-02 Pedro Alves <palves@redhat.com>
2959
2960 * ax.c (gdb_free_agent_expr): New function.
2961 * ax.h (gdb_free_agent_expr): New declaration.
2962 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
2963 list.
2964 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
2965 static.
2966 (clear_breakpoint_conditions_and_commands): New function.
2967 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
2968 (clear_breakpoint_conditions_and_commands): New declaration.
2969
e9dae05e
RR
29702014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2971
2972 * linux-aarch64-low.c (asm/ptrace.h): Include.
2973
5876f503
JK
29742014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2975
2976 Fix TLS access for -static -pthread.
2977 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
2978 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
2979 (thread_db_load_search, try_thread_db_load_1): Initialize it.
2980
802e8e6d
PA
29812014-05-20 Pedro Alves <palves@redhat.com>
2982
2983 * linux-aarch64-low.c (aarch64_insert_point)
2984 (aarch64_remove_point): No longer check whether the type is
2985 supported here. Adjust to new interface.
2986 (the_low_target): Install aarch64_supports_z_point_type as
2987 supports_z_point_type method.
2988 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
2989 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
2990 instead of a Z packet char. Adjust.
2991 (arm_supports_z_point_type): New function.
2992 (arm_insert_point, arm_remove_point): Adjust to new interface.
2993 (the_low_target): Install arm_supports_z_point_type.
2994 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
2995 (cris_insert_point, cris_remove_point): Adjust to new interface.
2996 Don't check whether the type is supported here.
2997 (the_low_target): Install cris_supports_z_point_type.
2998 * linux-low.c (linux_supports_z_point_type): New function.
2999 (linux_insert_point, linux_remove_point): Adjust to new interface.
3000 * linux-low.h (struct linux_target_ops) <insert_point,
3001 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3002 raw_breakpoint pointer parameter.
3003 <supports_z_point_type>: New method.
3004 * linux-mips-low.c (mips_supports_z_point_type): New function.
3005 (mips_insert_point, mips_remove_point): Adjust to new interface.
3006 Use mips_supports_z_point_type.
3007 (the_low_target): Install mips_supports_z_point_type.
3008 * linux-ppc-low.c (the_low_target): Install NULL as
3009 supports_z_point_type method.
3010 * linux-s390-low.c (the_low_target): Install NULL as
3011 supports_z_point_type method.
3012 * linux-sparc-low.c (the_low_target): Install NULL as
3013 supports_z_point_type method.
3014 * linux-x86-low.c (x86_supports_z_point_type): New function.
3015 (x86_insert_point): Adjust to new insert_point interface. Use
3016 insert_memory_breakpoint. Adjust to new
3017 i386_low_insert_watchpoint interface.
3018 (x86_remove_point): Adjust to remove_point interface. Use
3019 remove_memory_breakpoint. Adjust to new
3020 i386_low_remove_watchpoint interface.
3021 (the_low_target): Install x86_supports_z_point_type.
3022 * lynx-low.c (lynx_target_ops): Install NULL as
3023 supports_z_point_type callback.
3024 * nto-low.c (nto_supports_z_point_type): New.
3025 (nto_insert_point, nto_remove_point): Adjust to new interface.
3026 (nto_target_ops): Install nto_supports_z_point_type.
3027 * mem-break.c: Adjust intro comment.
3028 (struct raw_breakpoint) <raw_type, size>: New fields.
3029 <inserted>: Update comment.
3030 <shlib_disabled>: Delete field.
3031 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3032 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3033 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3034 (raw_bkpt_type_to_target_hw_bp_type): New function.
3035 (find_enabled_raw_code_breakpoint_at): New function.
3036 (find_raw_breakpoint_at): New type and size parameters. Use them.
3037 (insert_memory_breakpoint): New function, based off
3038 set_raw_breakpoint_at.
3039 (remove_memory_breakpoint): New function.
3040 (set_raw_breakpoint_at): Reimplement.
3041 (set_breakpoint): New, based on set_breakpoint_at.
3042 (set_breakpoint_at): Reimplement.
3043 (delete_raw_breakpoint): Go through the_target->remove_point
3044 instead of assuming memory breakpoints.
3045 (find_gdb_breakpoint_at): Delete.
3046 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3047 (find_gdb_breakpoint): New function.
3048 (set_gdb_breakpoint_at): Delete.
3049 (z_type_supported): New function.
3050 (set_gdb_breakpoint_1): New function, loosely based off
3051 set_gdb_breakpoint_at.
3052 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3053 (delete_gdb_breakpoint_at): Delete.
3054 (delete_gdb_breakpoint_1): New function, loosely based off
3055 delete_gdb_breakpoint_at.
3056 (delete_gdb_breakpoint): New function.
3057 (clear_gdb_breakpoint_conditions): Rename to ...
3058 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3059 breakpoint.
3060 (add_condition_to_breakpoint): Make static.
3061 (add_breakpoint_condition): Take a struct breakpoint pointer
3062 instead of an address. Adjust.
3063 (gdb_condition_true_at_breakpoint): Rename to ...
3064 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3065 z_type parameter.
3066 (gdb_condition_true_at_breakpoint): Reimplement.
3067 (add_breakpoint_commands): Take a struct breakpoint pointer
3068 instead of an address. Adjust.
3069 (gdb_no_commands_at_breakpoint): Rename to ...
3070 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3071 parameter. Return true if no breakpoint was found. Change debug
3072 output.
3073 (gdb_no_commands_at_breakpoint): Reimplement.
3074 (run_breakpoint_commands): Rename to ...
3075 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3076 and change return type to boolean.
3077 (run_breakpoint_commands): New function.
3078 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3079 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3080 breakpoint. Go through the_target->remove_point instead of
3081 assuming memory breakpoint.
3082 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3083 software and hardware breakpoints.
3084 (reinsert_raw_breakpoint): Go through the_target->insert_point
3085 instead of assuming memory breakpoint.
3086 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3087 software and hardware breakpoints.
3088 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3089 Check both software and hardware breakpoints.
3090 (validate_inserted_breakpoint): Assert the breakpoint is a
3091 software breakpoint. Set the inserted flag to -1 instead of
3092 setting shlib_disabled.
3093 (delete_disabled_breakpoints): Adjust.
3094 (validate_breakpoints): Only validate software breakpoints.
3095 Adjust to inserted flag change.
3096 (check_mem_read, check_mem_write): Skip breakpoint types other
3097 than software breakpoints. Adjust to inserted flag change.
3098 * mem-break.h (enum raw_bkpt_type): New enum.
3099 (raw_breakpoint, struct process_info): Forward declare.
3100 (Z_packet_to_target_hw_bp_type): Delete declaration.
3101 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3102 (set_gdb_breakpoint, delete_gdb_breakpoint)
3103 (clear_breakpoint_conditions): New declarations.
3104 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3105 (breakpoint_inserted_here): Update comment.
3106 (add_breakpoint_condition, add_breakpoint_commands): Replace
3107 address parameter with a breakpoint pointer parameter.
3108 (gdb_breakpoint_here): Update comment.
3109 (delete_gdb_breakpoint_at): Delete.
3110 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3111 * server.c (process_point_options): Take a struct breakpoint
3112 pointer instead of an address. Adjust.
3113 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3114 delete_gdb_breakpoint.
3115 * spu-low.c (spu_target_ops): Install NULL as
3116 supports_z_point_type method.
3117 * target.h: Include mem-break.h.
3118 (struct target_ops) <prepare_to_access_memory>: Update comment.
3119 <supports_z_point_type>: New field.
3120 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3121 instead of a char. Also take a raw breakpoint pointer.
3122 * win32-arm-low.c (the_low_target): Install NULL as
3123 supports_z_point_type.
3124 * win32-i386-low.c (i386_supports_z_point_type): New function.
3125 (i386_insert_point, i386_remove_point): Adjust to new interface.
3126 (the_low_target): Install i386_supports_z_point_type.
3127 * win32-low.c (win32_supports_z_point_type): New function.
3128 (win32_insert_point, win32_remove_point): Adjust to new interface.
3129 (win32_target_ops): Install win32_supports_z_point_type.
3130 * win32-low.h (struct win32_target_ops):
3131 <supports_z_point_type>: New method.
3132 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3133 instead of a char. Also take a raw breakpoint pointer.
3134
932539e3
PA
31352014-05-20 Pedro Alves <palves@redhat.com>
3136
3137 * mem-break.h: Include break-common.h.
3138 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3139 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3140 (Z_packet_to_target_hw_bp_type): New declaration.
3141 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3142 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3143 (Z_PACKET_ACCESS_WP): Delete macros.
3144 (Z_packet_to_hw_type): Delete function.
3145 * i386-low.h: Don't include break-common.h here.
3146 (Z_packet_to_hw_type): Delete declaration.
3147 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3148 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3149 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3150 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3151 * linux-aarch64-low.c: Don't include break-common.h here.
3152 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3153 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3154 (Z_packet_to_target_hw_bp_type): Delete function.
3155 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3156 function.
3157 (mips_insert_point, mips_remove_point): Use
3158 Z_packet_to_target_hw_bp_type.
3159
4ff0d3d8
PA
31602014-05-20 Pedro Alves <palves@redhat.com>
3161
3162 * linux-aarch64-low.c: Include break-common.h.
3163 (enum target_point_type): Delete.
3164 (Z_packet_to_point_type): Rename to ...
3165 (Z_packet_to_target_hw_bp_type): ... this, and return a
3166 target_hw_bp_type instead.
3167 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3168 instead of an enum target_point_type.
3169 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3170 breakpoint type.
3171 (aarch64_dr_state_insert_one_point)
3172 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3173 (aarch64_handle_aligned_watchpoint)
3174 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3175 Take an enum target_hw_bp_type instead of an enum
3176 target_point_type.
3177 (aarch64_supports_z_point_type): New function.
3178 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3179 use Z_packet_to_target_hw_bp_type.
3180
786dc519
JB
31812014-05-20 Joel Brobecker <brobecker@adacore.com>
3182
3183 * configure.ac: Only use -Werror by default when DEVELOPMENT
3184 is true.
3185 * configure: Regenerate.
3186
9e0aa64f
JK
31872014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3188
3189 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3190 * linux-x86-low.c (X86_64_USER_REGS): New.
3191 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3192
2b577b92
YQ
31932014-04-28 Yao Qi <yao@codesourcery.com>
3194
3195 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3196 name.
3197
94611da2
PA
31982014-04-25 Pedro Alves <palves@redhat.com>
3199
3200 PR server/16255
3201 * linux-low.c (linux_attach_fail_reason_string): New function.
3202 (linux_attach_lwp): Delete.
3203 (linux_attach_lwp_1): Rename to ...
3204 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3205 argument. Remove "initial" parameter. Return int instead of
3206 void. Don't error or warn here.
3207 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3208 failure to attach to the tgid. Call warning when failing to
3209 attach to an lwp.
3210 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3211 argument. Remove "initial" parameter. Return int instead of
3212 void. Don't error or warn here.
3213 (linux_attach_fail_reason_string): New declaration.
3214 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3215 interface change. Use linux_attach_fail_reason_string.
3216
01f9f808
MS
32172014-04-24 Michael Sturm <michael.sturm@mintel.com>
3218 Walfred Tedeschi <walfred.tedeschi@intel.com>
3219
3220 * Makefile.in: Added rules to handle new files
3221 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3222 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3223 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3224 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3225 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3226 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3227 x32-avx512-linux.o.
3228 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3229 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3230 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3231 i386/x32-avx512.xml.
3232 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3233 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3234 i386/x32-avx512-linux.xml.
3235 * i387-fp.c (num_avx512_k_registers): New constant for number
3236 of K registers.
3237 (num_avx512_zmmh_low_registers): New constant for number of
3238 lower ZMM registers (0-15).
3239 (num_avx512_zmmh_high_registers): New constant for number of
3240 higher ZMM registers (16-31).
3241 (num_avx512_ymmh_registers): New contant for number of higher
3242 YMM registers (ymm16-31 added by avx521 on x86_64).
3243 (num_avx512_xmm_registers): New constant for number of higher
3244 XMM registers (xmm16-31 added by AVX512 on x86_64).
3245 (struct i387_xsave): Add space for AVX512 registers.
3246 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3247 Add code to handle AVX512 registers.
3248 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3249 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3250 prototypei from generated file.
3251 (tdesc_amd64_avx512_linux): Likewise.
3252 (init_registers_x32_avx512_linux): Likewise.
3253 (tdesc_x32_avx512_linux): Likewise.
3254 (init_registers_i386_avx512_linux): Likewise.
3255 (tdesc_i386_avx512_linux): Likewise.
3256 (x86_64_regmap): Add AVX512 registers.
3257 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3258 mask.
3259 (initialize_low_arch): Add code to initialize AVX512 registers.
3260
51aa91f9
PA
32612014-04-23 Pedro Alves <palves@redhat.com>
3262
3263 * mem-break.c (find_gdb_breakpoint_at): Make static.
3264 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3265
a4165e94
PA
32662014-04-23 Pedro Alves <palves@redhat.com>
3267
3268 * i386-low.c: Don't include break-common.h here.
3269 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3270 prototype to take target_hw_bp_type as argument instead of a Z
3271 packet char.
3272 * i386-low.h: Include break-common.h here.
3273 (Z_packet_to_hw_type): Declare.
3274 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3275 prototypes.
3276 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3277 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3278 (x86_remove_point): Convert the packet number to a
3279 target_hw_bp_type before calling i386_low_remove_watchpoint.
3280 * win32-i386-low.c (i386_insert_point): Convert the packet number
3281 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3282 (i386_remove_point): Convert the packet number to a
3283 target_hw_bp_type before calling i386_low_remove_watchpoint.
3284
b8acf843
PA
32852014-04-23 Pedro Alves <palves@redhat.com>
3286
3287 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3288
d708bcd1
PA
32892014-04-10 Pedro Alves <palves@redhat.com>
3290
3291 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3292 Check if the condition or command is NULL before checking if the
3293 breakpoint is known. On success, return true.
3294 * mem-break.h (add_breakpoint_condition): Document return.
3295 (add_breakpoint_commands): Add describing comment.
3296 * server.c (skip_to_semicolon): New function.
3297 (process_point_options): Use it.
3298
2eec7d5b
PA
32992014-04-09 Pedro Alves <palves@redhat.com>
3300
3301 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3302 to lwpid_of.
3303
fa96cb38
PA
33042014-02-27 Pedro Alves <palves@redhat.com>
3305
3306 PR 12702
3307 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3308 macros.
3309 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3310 output.
3311 (last_thread_of_process_p): Take a PID argument instead of a
3312 thread pointer.
3313 (linux_wait_for_lwp): Delete.
3314 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3315 functions.
3316 (linux_low_filter_event): New function, party factored out from
3317 linux_wait_for_event.
3318 (linux_wait_for_event): Rename to ...
3319 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3320 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3321 sigsuspend. Check for zombie leaders.
3322 (linux_wait_for_event): Reimplement as wrapper around
3323 linux_wait_for_event_filtered.
3324 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3325 a normal or signal exit is seen, it's the whole process exiting.
3326 (wait_for_sigstop): No longer a for_each_inferior callback.
3327 Rewrite on top of linux_wait_for_event_filtered.
3328 (stop_all_lwps): Call wait_for_sigstop directly.
3329 * server.c (resume, handle_target_event): Handle
3330 TARGET_WAITKIND_NO_RESUMED.
3331
d763de10
JB
33322014-02-26 Joel Brobecker <brobecker@adacore.com>
3333
3334 * win32-low.c (psapi_get_dll_name,
3335 * win32_CreateToolhelp32Snapshot): Delete.
3336 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3337 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3338 Delete.
3339 (handle_load_dll): Add function description.
3340 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3341
850a0f76
JB
33422014-02-26 Joel Brobecker <brobecker@adacore.com>
3343
3344 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3345 Add comment.
3346 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3347 base address when calling win32_add_one_solib.
3348 (handle_load_dll): Delete local variable load_addr.
3349 Remove 0x1000 offset applied to DLL base address when calling
3350 win32_add_one_solib.
3351 (handle_unload_dll): Add comment.
3352
f25b3fc3
JB
33532014-02-26 Joel Brobecker <brobecker@adacore.com>
3354
3355 * win32-low.c (win32_add_all_dlls): Renames
3356 win32_ensure_ntdll_loaded. Rewrite function documentation.
3357 Adjust implementation to always load all DLLs.
3358 Add 0x1000 offset to DLL base address when calling
3359 win32_add_one_solib.
3360 (child_initialization_done): New static global.
3361 (do_initial_child_stuff): Set child_initialization_done to
3362 zero during child initialization, and 1 after. Replace call
3363 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3364 Add comment.
3365 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3366 (handle_unload_dll): Add function documentation.
3367 (get_child_debug_event): Ignore load and unload DLL events
3368 during child initialization.
3369
d86d4aaf
DE
33702014-02-20 Doug Evans <dje@google.com>
3371
3bc32da3 3372 Remove global all_lwps.
d86d4aaf
DE
3373 * inferiors.h (ptid_of): Move here from linux-low.h.
3374 (pid_of, lwpid_of): Ditto.
3375 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3376 parameter is a struct thread_info * now.
3377 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3378 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3379 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3380 directly.
3381 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3382 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3383 * linux-arm-low.c (update_registers_callback): Update, "entry"
3384 parameter is a struct thread_info * now.
3385 Fetch lwpid from current_inferior directly.
3386 (arm_insert_point): Pass &all_threads to find_inferior instead of
3387 &all_lwps.
3388 (arm_remove_point): Ditto.
3389 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3390 (arm_prepare_to_resume): Fetch pid from thread.
3391 (arm_read_description): Fetch lwpid from current_inferior directly.
3392 * linux-low.c (all_lwps): Delete.
3393 (delete_lwp): Delete call to remove_inferior.
3394 (handle_extended_wait): Fetch lwpid from thread.
3395 (add_lwp): Don't set lwp->entry.id. Remove call to
3396 add_inferior_to_list.
3397 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3398 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3399 (kill_one_lwp_callback): Ditto.
3400 (linux_kill): Don't dereference NULL pointer.
3401 Fetch ptid,lwpid from thread.
3402 (get_detach_signal): Fetch ptid from thread.
3403 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3404 Simplify call to regcache_invalidate_thread.
3405 (delete_lwp_callback): Update, "entry" parameter is a
3406 struct thread_info * now. Fetch pid from thread.
3407 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3408 (status_pending_p_callback): Update, "entry" parameter is a
3409 struct thread_info * now. Fetch ptid from thread.
3410 (find_lwp_pid): Update, "entry" parameter is a
3411 struct thread_info * now.
3412 (linux_wait_for_lwp): Fetch pid from thread.
3413 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3414 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3415 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3416 (dequeue_one_deferred_signal): Ditto.
3417 (cancel_breakpoint): Fetch ptid from current_inferior.
3418 (linux_wait_for_event): Pass &all_threads to find_inferior,
3419 not &all_lwps. Fetch ptid, lwpid from thread.
3420 (count_events_callback): Update, "entry" parameter is a
3421 struct thread_info * now.
3422 (select_singlestep_lwp_callback): Ditto.
3423 (select_event_lwp_callback): Ditto.
3424 (cancel_breakpoints_callback): Ditto.
3425 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3426 not &all_lwps.
3427 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3428 (unsuspend_one_lwp): Update, "entry" parameter is a
3429 struct thread_info * now.
3430 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3431 not &all_lwps.
3432 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3433 Fetch lwpid from thread, not lwp.
3434 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3435 Pass &all_threads to find_inferior, not &all_lwps.
3436 (send_sigstop): Fetch lwpid from thread, not lwp.
3437 (send_sigstop_callback): Update, "entry" parameter is a
3438 struct thread_info * now.
3439 (suspend_and_send_sigstop_callback): Ditto.
3440 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3441 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3442 struct thread_info * now.
3443 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3444 from thread, lwp.
3445 (lwp_running): Update, "entry" parameter is a
3446 struct thread_info * now.
3447 (stop_all_lwps): Fetch ptid from thread.
3448 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3449 (linux_resume_one_lwp): Fetch lwpid from thread.
3450 (linux_set_resume_request): Update, "entry" parameter is a
3451 struct thread_info * now. Fetch pid, lwpid from thread.
3452 (resume_status_pending_p): Update, "entry" parameter is a
3453 struct thread_info * now.
3454 (need_step_over_p): Ditto. Fetch lwpid from thread.
3455 (start_step_over): Fetch lwpid from thread.
3456 (linux_resume_one_thread): Update, "entry" parameter is a
3457 struct thread_info * now. Fetch lwpid from thread.
3458 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3459 (proceed_one_lwp): Update, "entry" parameter is a
3460 struct thread_info * now. Fetch lwpid from thread.
3461 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3462 struct thread_info * now.
3463 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3464 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3465 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3466 directly.
3467 (regsets_store_inferior_registers): Ditto.
3468 (fetch_register, store_register): Ditto.
3469 (linux_read_memory, linux_write_memory): Ditto.
3470 (linux_request_interrupt): Ditto.
3471 (linux_read_auxv): Ditto.
3472 (linux_xfer_siginfo): Ditto.
3473 (linux_qxfer_spu): Ditto.
3474 (linux_qxfer_libraries_svr4): Ditto.
3475 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3476 moved to inferiors.h.
3477 (get_lwp): Delete.
3478 (get_thread_lwp): Update.
3479 (struct lwp_info): Delete member "entry". Simplify comment for
3480 member "thread".
3481 (all_lwps): Delete.
3482 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3483 current_inferior directly.
3484 (update_watch_registers_callback): Update, "entry" parameter is a
3485 struct thread_info * now. Fetch pid from thread.
3486 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3487 (mips_insert_point): Fetch lwpid from current_inferior.
3488 Pass &all_threads to find_inferior, not &all_lwps.
3489 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3490 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3491 directly.
3492 (mips_stopped_data_address): Ditto.
3493 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3494 directly.
3495 * linux-tile-low.c (tile_arch_setup): Ditto.
3496 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3497 (update_debug_registers_callback): Update, "entry" parameter is a
3498 struct thread_info * now. Fetch pid from thread.
3499 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3500 Pass &all_threads to find_inferior, not &all_lwps.
3501 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3502 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3503 Pass &all_threads to find_inferior, not &all_lwps.
3504 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3505 (i386_dr_low_get_status): Ditto.
3506 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3507 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3508 (x86_linux_read_description): Ditto.
3509 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3510
3b8361aa
DE
35112014-02-20 Doug Evans <dje@google.com>
3512
3513 * inferiors.c (get_first_inferior): Fix buglet.
3514
f7667f0d
DE
35152014-02-19 Doug Evans <dje@google.com>
3516
3517 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3518 * inferiors.c (add_thread): Change result type to struct thread_info *.
3519 All callers updated.
3520 (add_lwp): Call add_thread here instead of in callers.
3521 All callers updated.
3522 * linux-low.h (get_lwp_thread): Rewrite.
3523 (struct lwp_info): New member "thread".
3524
b3312d80
DE
35252014-02-19 Doug Evans <dje@google.com>
3526
3527 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3528 All callers updated.
3529
ecc6f45c
DE
35302014-02-19 Doug Evans <dje@google.com>
3531
3532 * inferiors.c (add_thread): Fix whitespace.
3533
649ebbca
DE
35342014-02-19 Doug Evans <dje@google.com>
3535
3536 * dll.c (clear_dlls): Replace accessing list implemention details
3537 with API function.
3538 * gdbthread.h (get_first_thread): Declare.
3539 * inferiors.c (for_each_inferior_with_data): New function.
3540 (get_first_thread): New function.
3541 (find_thread_ptid): Simplify.
3542 (get_first_inferior): New function.
3543 (clear_list): Delete.
3544 (one_inferior_p): New function.
3545 (clear_inferior_list): New function.
3546 (clear_inferiors): Update.
3547 * inferiors.h (for_each_inferior_with_data): Declare.
3548 (clear_inferior_list): Declare.
3549 (one_inferior_p): Declare.
3550 (get_first_inferior): Declare.
3551 * linux-low.c (linux_wait_for_event): Replace accessing list
3552 implemention details with API function.
3553 * server.c (target_running): Ditto.
3554 (accumulate_file_name_length): New function.
3555 (emit_dll_description): New function.
3556 (handle_qxfer_libraries): Replace accessing list implemention
3557 details with API function.
3558 (handle_qxfer_threads_worker): New function.
3559 (handle_qxfer_threads_proper): Replace accessing list implemention
3560 details with API function.
3561 (handle_query): Ditto.
3562 (visit_actioned_threads_callback_ftype): New typedef.
3563 (visit_actioned_threads_data): New struct.
3564 (visit_actioned_threads): Rewrite to be find_inferior callback.
3565 (resume): Call find_inferior.
3566 (handle_status): Replace accessing list implemention
3567 details with API function.
3568 (process_serial_event): Replace accessing list implemention details
3569 with API function.
3570 * target.c (set_desired_inferior): Replace accessing list implemention
3571 details with API function.
3572 * tracepoint.c (same_process_p): New function.
3573 (gdb_agent_about_to_close): Replace accessing list implemention
3574 details with API function.
3575 * win32-low.c (child_delete_thread): Replace accessing list
3576 implemention details with API function.
3577 (match_dll_by_basename): New function.
3578 (dll_is_loaded_by_basename): New function.
3579 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3580 details call to dll_is_loaded_by_basename.
3581
80894984
DE
35822014-02-19 Doug Evans <dje@google.com>
3583
3584 * dll.h (struct dll_info): Add comment.
3585 * gdbthread.h (struct thread_info): Add comment.
3586 (current_ptid): Simplify.
3587 * inferiors.c (add_process): Update.
3588 (remove_process): Update.
3589 * inferiors.h (struct process_info): Rename member "head" to "entry".
3590 * linux-low.c (delete_lwp): Update.
3591 (add_lwp): Update.
3592 (last_thread_of_process_p): Update.
3593 (kill_one_lwp_callback, linux_kill): Update.
3594 (status_pending_p_callback): Update.
3595 (wait_for_sigstop): Update. Simplify read of ptid.
3596 (start_step_over): Update.
3597 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3598 (get_lwp_thread): Update.
3599 (struct lwp_info): Rename member "head" to "entry".
3600 * regcache.h (inferior_list_entry): Delete.
3601 * server.c (kill_inferior_callback): Update.
3602 (detach_or_kill_inferior_callback): Update.
3603 (print_started_pid): Update.
3604 (print_attached_pid): Update.
3605 (process_serial_event): Simplify read of ptid.
3606 * thread-db.c (thread_db_create_event): Update.
3607 (thread_db_get_tls_address): Update.
3608 * win32-low.c (current_inferior_ptid): Simplify.
3609
46917d26
TT
36102014-02-19 Tom Tromey <tromey@redhat.com>
3611
3612 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3613 argument.
3614 (target_supports_btrace): Update.
3615
0759a81e
YQ
36162014-02-14 Yao Qi <yao@codesourcery.com>
3617
3618 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3619 (rsp-low-ipa.o): New target.
3620
a7191e8b
TT
36212014-02-12 Tom Tromey <tromey@redhat.com>
3622
3623 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3624 convert_ascii_to_int.
3625 * regcache.c (registers_to_string): Likewise.
3626 * remote-utils.c (decode_M_packet): Likewise.
3627 * server.c (process_serial_event): Likewise.
3628
ff0e980e
TT
36292014-02-12 Tom Tromey <tromey@redhat.com>
3630
3631 * server.c (handle_query, handle_v_run): Use hex2bin, not
3632 unhexify.
3633 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3634
e9371aff
TT
36352014-02-12 Tom Tromey <tromey@redhat.com>
3636
3637 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3638 convert_int_to_ascii.
3639 * regcache.c (registers_to_string, collect_register_as_string):
3640 Likewise.
3641 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3642 Likewise.
3643 * server.c (process_serial_event): Likewise.
3644 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3645 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3646
971dc0b8
TT
36472014-02-12 Tom Tromey <tromey@redhat.com>
3648
3649 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3650 bin2hex, not hexify.
3651 * tracepoint.c (cmd_qtstatus): Likewise.
3652
0a822afb
TT
36532014-02-12 Tom Tromey <tromey@redhat.com>
3654
3655 * remote-utils.c (monitor_output): Pass explicit length to
3656 hexify.
3657
9c3d6531
TT
36582014-02-12 Tom Tromey <tromey@redhat.com>
3659
3660 * tracepoint.c: Include rsp-low.h.
3661 * server.c: Include rsp-low.h.
3662 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3663 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3664 declare.
3665 * remote-utils.c: Include rsp-low.h.
3666 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3667 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3668 (convert_int_to_ascii, convert_ascii_to_int): Move to
3669 common/rsp-low.c.
3670 * regcache.c: Include rsp-low.h.
3671 * ax.c: Include rsp-low.h.
3672 * Makefile.in (SFILES): Add common/rsp-low.c.
3673 (OBS): Add rsp-low.o.
3674 (rsp-low.o): New target.
3675
01fd3ea5
TT
36762014-02-12 Tom Tromey <tromey@redhat.com>
3677
3678 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3679 Include print-utils.h.
3680 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3681 (plongest, thirty_two, phex_nz): Remove.
3682 * Makefile.in (SFILES): Add common/print-utils.c.
3683 (OBS): Add print-utils.o.
3684 (print-utils-ipa.o): New target.
3685 (print-utils.o): New target.
3686 (IPA_OBJS): Add print-utils-ipa.o.
3687
e99dc820
TT
36882014-02-06 Tom Tromey <tromey@redhat.com>
3689
3690 * Makefile.in (SFILES): Fix indentation.
3691
ee1e2d4f
DE
36922014-02-05 Doug Evans <dje@google.com>
3693
3694 * linux-low.c (linux_wait_for_event): Improve comment.
3695 (linux_wait_1): Keep current_inferior in sync with event_child.
3696
f5a02773
DE
36972014-01-22 Doug Evans <dje@google.com>
3698
3699 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3700
87ce2a04
DE
37012014-01-22 Doug Evans <dje@google.com>
3702
3703 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3704 * configure: Regenerate.
3705 * config.in: Regenerate.
3706 * Makefile.in (SFILES): Add debug.c.
3707 (OBS): Add debug.o.
3708 * debug.c: New file.
3709 * debug.h: New file.
3710 * linux-aarch64-low.c (*): Update all debugging printfs to use
3711 debug_printf instead of fprintf.
3712 * linux-arm-low.c (*): Ditto.
3713 * linux-cris-low.c (*): Ditto.
3714 * linux-crisv32-low.c (*): Ditto.
3715 * linux-m32r-low.c (*): Ditto.
3716 * linux-sparc-low.c (*): Ditto.
3717 * linux-x86.c (*): Ditto.
3718 * linux-low.c (*): Ditto.
3719 (linux_wait_1): Add calls to debug_enter, debug_exit.
3720 (linux_wait): Remove redundant debugging printf.
3721 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3722 (linux_resume, unstop_all_lwps): Ditto.
3723 * mem-break.c (*): Update all debugging printfs to use
3724 debug_printf instead of fprintf.
3725 * remote-utils.c (*): Ditto.
3726 * thread-db.c (*): Ditto.
3727 * server.c #include <ctype.h>, "gdb_vecs.h".
3728 (debug_threads): Moved to debug.c.
3729 (*): Update all debugging printfs to use debug_printf instead of
3730 fprintf.
3731 (start_inferior): Replace call to fflush with call to debug_flush.
3732 (monitor_show_help): Mention set debug-format.
3733 (parse_debug_format_options): New function.
3734 (handle_monitor_command): Handle "monitor set debug-format".
3735 (gdbserver_usage): Mention --debug-format.
3736 (main): Parse --debug-format.
3737 * server.h (debug_threads): Declaration moved to debug.h.
3738 #include "debug.h".
3739 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3740 trace_debug_1 that uses debug_printf.
3741 (tracepoint_look_up_symbols): Update all debugging printfs to use
3742 debug_printf instead of fprintf.
3743
e671835b
BS
37442014-01-20 Baruch Siach <baruch@tkos.co.il>
3745
3746 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3747 sys/ptrace.h.
3748
b5737fa9
PA
37492014-01-17 Pedro Alves <palves@redhat.com>
3750
ea38d2a9 3751 PR build/16445
c7faa97a
PA
3752 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3753 defined after including gdb_proc_service.h.
b5737fa9 3754
40ed484e
DE
37552014-01-16 Doug Evans <dje@google.com>
3756
3757 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3758 (match_dll): Use it.
3759
969c39fb
MM
37602014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3761
3762 * target.h (target_ops) <read_btrace>: Change parameters and
3763 return type to allow error reporting.
3764 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3765 trace reading errors on.
3766 * linux-low.c (linux_low_read_btrace): Pass trace reading
3767 errors on.
3768 (linux_low_disable_btrace): New.
3769
ab7f45ba
DE
37702014-01-15 Doug Evans <dje@google.com>
3771
3772 * inferiors.c (thread_id_to_gdb_id): Delete.
3773 * inferiors.h (thread_id_to_gdb_id): Delete.
3774
66af0f44
EZ
37752014-01-13 Eli Zaretskii <eliz@gnu.org>
3776
3777 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3778 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3779 versions.
3780
9939e131
PA
37812014-01-08 Pedro Alves <palves@redhat.com>
3782
3783 * server.c (handle_status): Don't discard previous queued stop
3784 replies or thread's pending status here.
3785 (main) <disconnection>: Do it here instead.
3786
b7ea362b
PA
37872014-01-08 Pedro Alves <palves@redhat.com>
3788
3789 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3790 * server.c (visit_actioned_threads, handle_pending_status): New
3791 function.
3792 (handle_v_cont): Factor out parts to ...
3793 (resume): ... this new function. If in all-stop, and a thread
3794 being resumed has a pending status, report it without actually
3795 resuming.
3796 (myresume): Adjust to use the new 'resume' function.
3797 (clear_pending_status_callback, set_pending_status_callback)
3798 (find_status_pending_thread_callback): New functions.
3799 (handle_status): Handle the case of multiple threads having
3800 interesting statuses to report. Report threads' real last signal
3801 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3802 with an interesting thread to report the status for, instead of
3803 always reporting the status of the first thread.
3804
28498c42
JB
38052014-01-01 Joel Brobecker <brobecker@adacore.com>
3806
3807 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3808 * gdbreplay.c (gdbreplay_version): Likewise.
3809
f45c82da
YZ
38102013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3811
3812 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3813 iov.iov_len with the real length in use.
3814
379a5e2d
JB
38152013-12-13 Joel Brobecker <brobecker@adacore.com>
3816
3817 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3818 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3819 for all targets that use win32-low.c.
3820 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3821 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3822
4210d83e
PA
38232013-12-13 Pedro Alves <palves@redhat.com>
3824
3825 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3826 if equal to TARGET_WAITKIND_LOADED.
3827 * win32-low.c (cached_status): New static global.
3828 (win32_wait): Add declaration.
3829 (do_initial_child_stuff): Flush all initial pending debug events
3830 up to the initial breakpoint.
3831 (win32_wait): If CACHED_STATUS was set, return that instead
3832 of doing a real wait. Remove the code resuming the execution
3833 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3834 during the initial phase. Also remove the code changing
3835 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3836 TARGET_WAITKIND_STOPPED.
3837
e7f0d979
YQ
38382013-12-11 Yao Qi <yao@codesourcery.com>
3839
3840 * notif.c (handle_notif_ack): Return 0 if no notification
3841 matches.
3842
ebcf782c
DE
38432013-11-20 Doug Evans <dje@google.com>
3844
3845 * linux-low.c (linux_set_resume_request): Fix comment.
3846
20ad9378
DE
38472013-11-20 Doug Evans <dje@google.com>
3848
3849 * linux-low.c (resume_status_pending_p): Tweak comment.
3850
a196ebeb
WT
38512013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3852
3853 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3854 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3855 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3856 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3857 (srv_amd64_regobj): Add amd64-mpx.o.
3858 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3859 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3860 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3861 * i387-fp.c (num_pl_bnd_register) Added constant.
3862 (num_pl_bnd_cfg_registers) Added constant.
3863 (struct i387_xsave) Added reserved area and MPX fields.
3864 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3865 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3866 function.
3867 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3868 (init_registers_amd64_mpx_linux): Declare new function.
3869 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3870 (x86_64_regmap): Add MPX registers.
3871 (x86_linux_read_description): Add MPX case.
3872 (initialize_low_arch): Initialize MPX targets.
3873
0080a2f6
TT
38742013-11-18 Tom Tromey <tromey@redhat.com>
3875
3876 * configure: Rebuild.
3877 * configure.ac: Don't check for stdlib.h.
3878 * gdbreplay.c: Unconditionally include stdlib.h.
3879
2978b111
TT
38802013-11-18 Tom Tromey <tromey@redhat.com>
3881
3882 * config.in: Rebuild.
3883 * configure: Rebuild.
3884 * configure.ac: Don't use AC_HEADER_DIRENT.
3885
a3d08894
TT
38862013-11-18 Tom Tromey <tromey@redhat.com>
3887
3888 * server.h: Don't check HAVE_STRING_H.
3889 * gdbreplay.c: Don't check HAVE_STRING_H.
3890 * configure: Rebuild.
3891
0a5dd17d
TT
38922013-11-18 Tom Tromey <tromey@redhat.com>
3893
3894 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3895 LIBGNU.
3896
1bd2f0ba
TT
38972013-11-08 Tom Tromey <tromey@redhat.com>
3898
3899 * configure, config.in: Rebuild.
3900 * configure.ac: Remove unused configury.
3901
3266f10b
TT
39022013-11-08 Tom Tromey <tromey@redhat.com>
3903
3904 * acinclude.m4: Include common.m4, codeset.m4.
3905 * configure, config.in: Rebuild.
3906 * configure.ac: Use GDB_AC_COMMON.
3907
6682d959
AA
39082013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3909
3910 * linux-s390-low.c (HWCAP_S390_TE): New define.
3911 (s390_arch_setup): Consider the TE field in the HWCAP for
3912 determining 'have_regset_tdb'.
3913
fd0a4d76
SDJ
39142013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3915
3916 PR gdb/16014
3917 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3918 call to sizeof.
3919
1a3d890b
PA
39202013-10-02 Pedro Alves <palves@redhat.com>
3921
3922 * server.c (process_serial_event): Don't output "GDBserver
3923 exiting" if GDB is connected through stdio.
3924 * target.c (mywait): Likewise, be silent if GDB is connected
3925 through stdio.
3926
97ad4581
JB
39272013-10-01 Joel Brobecker <brobecker@adacore.com>
3928
3929 * lynx-low.c (lynx_add_threads_after_attach): New function.
3930 (lynx_attach): Remove call to add_thread. Add call to
3931 lynx_add_threads_after_attach instead.
3932
5b4e221c
MF
39332013-09-28 Mike Frysinger <vapier@gentoo.org>
3934
3935 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3936 * config.in, configure: Regenerated.
3937
ee47b2f8
YQ
39382013-09-18 Yao Qi <yao@codesourcery.com>
3939
3940 PR server/15959
3941 * server.c (start_inferior): Clear 'resume_info'.
3942
d6707650 39432013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 3944
d6707650
JW
3945 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
3946 for each register.
3947
9243dd0e 39482013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 3949
9243dd0e
JW
3950 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
3951 linux-tile-low.o to srv_tgtobj.
3952
c623a6ef
WN
39532013-09-16 Will Newton <will.newton@linaro.org>
3954
3955 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
3956 out regs.
3957
fb71d39e
PA
39582013-09-06 Pedro Alves <palves@redhat.com>
3959
3960 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
3961 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
3962 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
3963 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
3964 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
3965 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
3966
8e7e9910
PA
39672013-09-06 Pedro Alves <palves@redhat.com>
3968
3969 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
3970 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
3971
7c3a12ca
PA
39722013-09-06 Pedro Alves <palves@redhat.com>
3973
3974 * linux-amd64-ipa.c: Include tracepoint.h.
3975 * linux-i386-ipa.c: Include tracepoint.h.
3976
8eb3d7b6
RW
39772013-09-06 Ricard Wanderlof <ricardw@axis.com>
3978
3979 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
3980 (ps_get_thread_area): New function.
3981
eddddb9d
RW
39822013-09-06 Ricard Wanderlof <ricardw@axis.com>
3983
3984 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
3985 (initialize_low_arch): Call init_registers_crisv32 rather than
3986 init_register_crisv32.
3987
533b0600
PA
39882013-09-05 Pedro Alves <palves@redhat.com>
3989
3990 * server.h (handle_vFile, hostio_last_error_from_errno): Move
3991 to ...
3992 * hostio.h: ... this new file.
3993 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
3994 win32-low.c: Include hostio.h.
3995
0ce3d3b5
PA
39962013-09-05 Pedro Alves <palves@redhat.com>
3997
3998 * server.h (gdb_client_data, handler_func, callback_handler_func)
3999 (delete_file_handler, add_file_handler, append_callback_event)
4000 (delete_callback_event, start_event_loop, initialize_event_loop):
4001 Move to event-loop.h and include it.
4002 * event-loop.h: New file.
4003
799cdc37
PA
40042013-09-05 Pedro Alves <palves@redhat.com>
4005
4006 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4007 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4008 (loaded_dll, unloaded_dll): Move to ...
4009 * dll.h: ... this new file.
4010 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4011
6a6bbd9d
PA
40122013-09-05 Pedro Alves <palves@redhat.com>
4013
4014 * server.h (current_process, get_thread_process, all_processes)
4015 (add_inferior_to_list, for_each_inferior, current_inferior)
4016 (remove_inferior, add_process, remove_process, find_process_pid)
4017 (have_started_inferiors_p, have_attached_inferiors_p)
4018 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4019 (clear_inferiors, find_inferior, find_inferior_id)
4020 (inferior_target_data, set_inferior_target_data)
4021 (inferior_regcache_data, set_inferior_regcache_data): Move to
4022 inferiors.h, and include it.
4023 * inferiors.h: New file.
4024
f699aaba
PA
40252013-09-05 Pedro Alves <palves@redhat.com>
4026
4027 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4028 Move ...
72f4393d 4029 * ax.h: ... here.
f699aaba 4030
c144c7a0
PA
40312013-09-05 Pedro Alves <palves@redhat.com>
4032
4033 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4034 tracepoint.h.
4035 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4036 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4037 (handle_tracepoint_general_set, handle_tracepoint_query)
4038 (tracepoint_finished_step, tracepoint_was_hit)
4039 (release_while_stepping_state_list, current_traceframe)
4040 (in_readonly_region, traceframe_read_mem)
4041 (fetch_traceframe_registers, traceframe_read_sdata)
4042 (traceframe_read_info, struct fast_tpoint_collect_status)
4043 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4044 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4045 (supply_fast_tracepoint_registers)
4046 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4047 (ipa_tdesc, claim_trampoline_space)
4048 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4049 (agent_mem_read, agent_get_trace_state_variable_value)
4050 (agent_set_trace_state_variable_value, agent_tsv_read)
4051 (agent_mem_read_string, get_raw_reg_func_addr)
4052 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4053 * tracepoint.h: ... this new file.
4054
ff42e6ab
PA
40552013-09-05 Pedro Alves <palves@redhat.com>
4056
4057 * server.h (perror_with_name, error, fatal, warning, paddress)
4058 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4059 include it.
4060 * utils.h: New file.
4061
541af0f4
PA
40622013-09-05 Pedro Alves <palves@redhat.com>
4063
4064 * server.h (remote_debug, noack_mode, transport_is_reliable)
4065 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4066 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4067 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4068 (write_enn, initialize_async_io, enable_async_io)
4069 (disable_async_io, check_remote_input_interrupt_request)
4070 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4071 (dead_thread_notify, prepare_resume_reply)
4072 (decode_address_to_semicolon, decode_address, decode_m_packet)
4073 (decode_M_packet, decode_X_packet, decode_xfer_write)
4074 (decode_search_memory_packet, unhexify, hexify)
4075 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4076 (look_up_one_symbol, relocate_instruction)
4077 (monitor_output): Move to remote-utils.h, and include it.
4078 * remote-utils.h: New file.
4079
eebdf26b
PA
40802013-09-05 Pedro Alves <palves@redhat.com>
4081
4082 * server.h (_): Delete.
4083
3aafd2ff
PA
40842013-09-02 Pedro Alves <palves@redhat.com>
4085
4086 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4087 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4088 allocated.
4089 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4090
cee83bcb
PM
40912013-09-02 Pierre Muller <muller@sourceware.org>
4092
4093 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4094 or WriteProcessMemory complete successfully and handle
4095 ERROR_PARTIAL_COPY error.
4096
9a13b2fa
PA
40972013-09-02 Pedro Alves <palves@redhat.com>
4098
4099 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4100 error instead of EIO.
4101
602e3198
JK
41022013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4103
4104 PR server/15604
4105 * linux-low.c: Include filestuff.h.
4106 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4107 * lynx-low.c: Include filestuff.h.
4108 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4109 * server.c: Include filestuff.h.
4110 (main): Call notice_open_fds.
4111 * spu-low.c: Include filestuff.h.
4112 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4113
96d7229d
LM
41142013-08-22 Luis Machado <lgustavo@codesourcery.com>
4115
4116 * Makefile.in: Explain why ../target and ../nat are not
4117 listed as include file search paths.
4118 (linux-waitpid.o): New object file rule.
4119 * configure.srv (srv_native_linux_obj): New variable.
4120 Replace all occurrences of linux native object files with
4121 $srv_native_linux_obj.
4122 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4123 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4124 (linux_enable_event_reporting): Remove declaration.
4125 (my_waitpid): Moved to common/linux-waitpid.c.
4126 (linux_wait_for_event): Pass ptid when calling
4127 linux_enable_event_reporting.
4128 (linux_supports_tracefork_flag): Remove.
4129 (linux_enable_event_reporting): Likewise.
4130 (linux_tracefork_grandchild): Remove.
4131 (STACK_SIZE): Moved to common/linux-ptrace.c.
4132 (linux_tracefork_child): Remove.
4133 (linux_test_for_tracefork): Remove.
4134 (linux_look_up_symbols): Call linux_supports_traceclone.
4135 (initialize_low): Remove call to linux_test_for_tracefork.
4136 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4137 common/linux-ptrace.h.
4138 (PTRACE_TYPE_ARG4): Likewise.
4139 Include linux-ptrace.h.
4140
32940073
PA
41412013-08-21 Pedro Alves <palves@redhat.com>
4142
4143 * config.in: Renegerate.
4144
33b60d58 41452013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 4146
33b60d58
LM
4147 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4148 (SFILES): Remove $(srcdir)/common/target-common.c and
4149 add $(srcdir)/target/waitstatus.c.
4150 (OBS): Remove target-common.o and add waitstatus.o.
4151 (server_h): Remove $(srcdir)/../common/target-common.h and
4152 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4153 and $(srcdir)/../target/waitstatus.h.
4154 (target-common.o): Remove.
4155 (waitstatus.o): New target object file.
4156 * target.h: Do not include target-common.h and
4157 include target/resume.h, target/wait.h and
4158 target/waitstatus.h.
4159
b8e1b30e
LM
41602013-08-13 Luis Machado <lgustavo@codesourcery.com>
4161
4162 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4163 to PTRACE_TYPE_ARG3.
4164 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4165 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4166 PTRACE_TYPE_ARG4.
4167 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4168 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4169
7a60ad40
YQ
41702013-07-27 Jie Zhang <jie@codesourcery.com>
4171 Daniel Jacobowitz <dan@codesourcery.com>
4172 Yao Qi <yao@codesourcery.com>
4173
4174 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4175 (mips-linux-watch.o): New rule.
4176 (mips_linux_watch_h): New variable.
4177 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4178 srv_tgtobj.
4179 * linux-mips-low.c: Include mips-linux-watch.h.
4180 (struct arch_process_info, struct arch_lwp_info): New.
4181 (update_watch_registers_callback): New function.
4182 (mips_linux_new_process, mips_linux_new_thread) New functions.
4183 (mips_linux_prepare_to_resume, mips_insert_point): New
4184 functions.
4185 (mips_remove_point, mips_stopped_by_watchpoint): New
4186 functions.
4187 (rsp_bp_type_to_target_hw_bp_type): New function.
4188 (mips_stopped_data_address): New function.
4189 (the_low_target): Add watchpoint support functions.
4190
de6f69ad
YQ
41912013-07-27 Yao Qi <yao@codesourcery.com>
4192
4193 * i386-low.c: Include break-common.h.
4194 (enum target_hw_bp_type): Remove.
4195
3360c0bf
LM
41962013-07-24 Luis Machado <lgustavo@codesourcery.com>
4197
4198 * Makefile.in (SFILES): /common/target-common.c.
4199 (OBS): Add target-common.o.
4200 (server_h): Add $(srcdir)/../common/target-common.h.
4201 (target-common.o): New target.
4202 * server.c (queue_stop_reply_callback): Free
4203 status string after use.
4204 * target.c (target_waitstatus_to_string): Remove.
4205 * target.h: Include target-common.h.
4206 (resume_kind): Likewise.
4207 (target_waitkind): Likewise.
4208 (target_waitstatus): Likewise.
4209 (TARGET_WNOHANG): Likewise.
4210
bd885420
YQ
42112013-07-04 Yao Qi <yao@codesourcery.com>
4212
4213 * Makefile.in (host_alias): Use @host_noncanonical@.
4214 (target_alias): Use @target_noncanonical@.
4215 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4216 ACX_NONCANONICAL_HOST.
4217 * configure: Regenerated.
4218
4219 Revert:
4220 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4221
4222 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4223 * configure: Rebuild.
4224 * Makefile.in (version_host, version_target): Get from configure.
4225 (version.c): Use $(version_host) and $(version_target).
4226
17ef446e
PA
42272013-07-03 Pedro Alves <palves@redhat.com>
4228
4229 * Makefile.in (config.status): Depend on development.sh.
4230 * acinclude.m4: Include libmcheck.m4.
4231 * configure: Regenerate.
4232
7a9a7487
MG
42332013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4234
4235 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4236 attribute inside the parentheses.
4237 (winapi_DebugSetProcessKillOnExit): Ditto.
4238 (winapi_DebugBreakProcess): Ditto.
4239 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 4240
49b64de6
MG
42412013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4242
4243 * notif.h (notif_event): Add a dummy member to avoid compiler
4244 errors.
4245
d5749ee7
PA
42462013-07-01 Pedro Alves <palves@redhat.com>
4247
4248 * hostio.c (HOSTIO_PATH_MAX): Define.
4249 (require_filename, handle_open, handle_unlink, handle_readlink):
4250 Use it.
4251
d8d2a3ee
PA
42522013-07-01 Pedro Alves <palves@redhat.com>
4253
4254 * server.h: Include "pathmax.h".
4255 * linux-low.c: Don't include sys/param.h.
4256 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4257 MAXPATHLEN.
4258 * win32-low.c: Don't include sys/param.h.
4259 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4260
bc7dea8d
PA
42612013-07-01 Pedro Alves <palves@redhat.com>
4262
4263 * event-loop.c: Don't check HAVE_UNISTD_H before including
4264 <unistd.h>.
4265 * gdbreplay.c: Likewise.
4266 * remote-utils.c: Likewise.
4267 * server.c: Likewise.
4268 * configure.ac: Don't check for unistd.h.
4269 * configure: Regenerate.
4270
d6c2da54
TT
42712013-06-28 Tom Tromey <tromey@redhat.com>
4272
4273 * Makefile.in (version.c): Use version.in, not
4274 common/version.in.
4275
257b6bec
MG
42762013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4277
4278 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4279 * configure: Rebuild.
4280 * Makefile.in (version_host, version_target): Get from configure.
4281 (version.c): Use $(version_host) and $(version_target).
4282
86ebe149
DK
42832013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4284
4285 Fix trace-status to output user name without trailing colon.
4286 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4287
f30aa5af
DK
42882013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4289
4290 Fix trace-status to output proper start-time and stop-time.
4291 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4292 output start time and stop time in hex as gdb expects.
4293
28a93511
YQ
42942013-06-26 Pedro Alves <pedro@codesourcery.com>
4295
4296 * tracepoint.c (build_traceframe_info_xml): Output trace state
4297 variables present in the trace buffer.
4298
01208463
TT
42992013-06-24 Tom Tromey <tromey@redhat.com>
4300
4301 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4302 create-version.sh.
4303 (version.o): Remove.
4304 * gdbreplay.c: Include version.h.
4305 (version, host_name): Don't declare.
4306 * server.h: Include version.h.
4307 (version, host_name): Don't declare.
4308
760256f9
PA
43092013-06-12 Pedro Alves <palves@redhat.com>
4310
4311 * linux-x86-low.c (linux_is_elf64): Delete global.
4312 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4313 with local linux_pid_exe_is_elf_64_file use.
4314
030031ee
PA
43152013-06-11 Pedro Alves <palves@redhat.com>
4316
4317 * linux-low.c (regset_disabled, disable_regset): New functions.
4318 (regsets_fetch_inferior_registers)
4319 (regsets_store_inferior_registers): Use them.
4320 (initialize_regsets_info); Don't allocate the disabled_regsets
4321 array here.
4322 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4323 comment.
4324
5da6eb0a
PA
43252013-06-11 Pedro Alves <palves@redhat.com>
4326
4327 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4328 xmalloc.
4329
7e5aaa09
PA
43302013-06-11 Pedro Alves <palves@redhat.com>
4331
4332 * linux-x86-low.c (initialize_low_arch): Call
4333 init_registers_x32_avx_linux.
4334
d878444c
JK
43352013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4336
4337 Fix compatibility with Android Bionic.
4338 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4339 it is not empty.
4340
3aee8918
PA
43412013-06-07 Pedro Alves <palves@redhat.com>
4342
5f2b57b5 4343 PR server/14823
3aee8918
PA
4344 * Makefile.in (OBS): Add tdesc.o.
4345 (IPA_OBJS): Add tdesc-ipa.o.
4346 (tdesc-ipa.o): New rule.
4347 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4348 interface.
4349 * linux-low.c (new_inferior): Delete.
4350 (disabled_regsets, num_regsets): Delete.
4351 (linux_add_process): Adjust to set the new per-process
4352 new_inferior flag.
4353 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4354 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4355 was a stop. When calling arch_setup, switch the current inferior
4356 to the thread that got an event.
4357 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4358 (regsets_fetch_inferior_registers)
4359 (regsets_store_inferior_registers): New regsets_info parameter.
4360 Adjust to use it.
4361 (linux_register_in_regsets): New regs_info parameter. Adjust to
4362 use it.
4363 (register_addr, fetch_register, store_register): New usrregs_info
4364 parameter. Adjust to use it.
4365 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4366 parameter regs_info. Adjust to use it.
4367 (linux_fetch_registers): Get the current inferior's regs_info, and
4368 adjust to use it.
4369 (linux_store_registers): Ditto.
4370 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4371 (initialize_low): Don't initialize the target_regsets here. Call
4372 initialize_low_arch.
4373 * linux-low.h (target_regsets): Delete declaration.
4374 (struct regsets_info): New.
4375 (struct usrregs_info): New.
4376 (struct regs_info): New.
4377 (struct process_info_private) <new_inferior>: New field.
4378 (struct linux_target_ops): Delete the num_regs, regmap, and
4379 regset_bitmap fields. New field regs_info.
4380 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4381 * i387-fp.c (num_xmm_registers): Delete.
4382 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4383 calls to new interface.
4384 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4385 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4386 Infer the number of xmm registers from the regcache's target
4387 description.
4388 * i387-fp.h (num_xmm_registers): Delete.
4389 * inferiors.c (add_thread): Don't install the thread's regcache
4390 here.
4391 * proc-service.c (gregset_info): Fetch the current inferior's
4392 regs_info. Adjust to use it.
4393 * regcache.c: Include tdesc.h.
4394 (register_bytes, reg_defs, num_registers)
4395 (gdbserver_expedite_regs): Delete.
4396 (get_thread_regcache): If the thread doesn't have a regcache yet,
4397 create one, instead of aborting gdbserver.
4398 (regcache_invalidate_one): Rename to ...
4399 (regcache_invalidate_thread): ... this.
4400 (regcache_invalidate_one): New.
4401 (regcache_invalidate): Only invalidate registers of the current
4402 process.
4403 (init_register_cache): Add target_desc parameter, and use it.
4404 (new_register_cache): Ditto. Assert the target description has a
4405 non zero registers_size.
4406 (regcache_cpy): Add assertions. Adjust.
4407 (realloc_register_cache, set_register_cache): Delete.
4408 (registers_to_string, registers_from_string): Adjust.
4409 (find_register_by_name, find_regno, find_register_by_number)
4410 (register_cache_size): Add target_desc parameter, and use it.
4411 (free_register_cache_thread, free_register_cache_thread_one)
4412 (regcache_release, register_cache_size): New.
4413 (register_size): Add target_desc parameter, and use it.
4414 (register_data, supply_register, supply_register_zeroed)
4415 (supply_regblock, supply_register_by_name, collect_register)
4416 (collect_register_as_string, collect_register_by_name): Adjust.
4417 * regcache.h (struct target_desc): Forward declare.
4418 (struct regcache) <tdesc>: New field.
4419 (init_register_cache, new_register_cache): Add target_desc
4420 parameter.
4421 (regcache_invalidate_thread): Declare.
4422 (regcache_invalidate_one): Delete declaration.
4423 (regcache_release): Declare.
4424 (find_register_by_number, register_cache_size, register_size)
4425 (find_regno): Add target_desc parameter.
4426 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4427 declarations.
4428 * remote-utils.c: Include tdesc.h.
4429 (outreg, prepare_resume_reply): Adjust.
4430 * server.c: Include tdesc.h.
4431 (gdbserver_xmltarget): Delete declaration.
4432 (get_features_xml, process_serial_event): Adjust.
4433 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4434 declare.
4435 (struct process_info) <tdesc>: New field.
4436 (ipa_tdesc): Declare.
4437 * tdesc.c: New file.
4438 * tdesc.h: New file.
4439 * tracepoint.c: Include tdesc.h.
4440 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4441 (get_context_regcache): Adjust to pass ipa_tdesc down.
4442 (do_action_at_tracepoint): Adjust to get the register cache size
4443 from the context regcache's description.
4444 (traceframe_walk_blocks): Adjust to get the register cache size
4445 from the current trace frame's description.
4446 (traceframe_get_pc): Adjust to get current trace frame's
4447 description and pass it down.
4448 (gdb_collect): Adjust to get the register cache size from the
4449 IPA's description.
4450 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4451 (gdbserver_xmltarget): Delete.
4452 (initialize_low_tracepoint): Set the ipa's target description.
4453 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4454 (initialize_low_tracepoint): Set the ipa's target description.
4455 * linux-x86-low.c: Include tdesc.h.
4456 [__x86_64__] (is_64bit_tdesc): New.
4457 (ps_get_thread_area, x86_get_thread_area): Use it.
4458 (i386_cannot_store_register): Rename to ...
4459 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4460 (i386_cannot_fetch_register): Rename to ...
4461 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4462 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4463 to new interface.
4464 (target_regsets): Rename to ...
4465 (x86_regsets): ... this.
4466 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4467 interface.
4468 (x86_siginfo_fixup): Use is_64bit_tdesc.
4469 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4470 (tdesc_x32_avx_linux, tdesc_x32_linux)
4471 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4472 Declare.
4473 (x86_linux_update_xmltarget): Delete.
4474 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4475 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4476 (AMD64_LINUX_USER64_CS): New.
4477 (x86_linux_read_description): New, based on
4478 x86_linux_update_xmltarget.
4479 (same_process_callback): New.
4480 (x86_arch_setup_process_callback): New.
4481 (x86_linux_update_xmltarget): New.
4482 (x86_regsets_info): New.
4483 (amd64_linux_regs_info): New.
4484 (i386_linux_usrregs_info): New.
4485 (i386_linux_regs_info): New.
4486 (x86_linux_regs_info): New.
4487 (x86_arch_setup): Reimplement.
4488 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4489 (x86_emit_ops): Ditto.
4490 (the_low_target): Adjust. Install x86_linux_regs_info,
4491 x86_cannot_fetch_register, and x86_cannot_store_register.
4492 (initialize_low_arch): New.
4493 * linux-ia64-low.c (tdesc_ia64): Declare.
4494 (ia64_fetch_register): Adjust.
4495 (ia64_usrregs_info, regs_info): New globals.
4496 (ia64_regs_info): New function.
4497 (the_low_target): Adjust.
4498 (initialize_low_arch): New function.
4499 * linux-sparc-low.c (tdesc_sparc64): Declare.
4500 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4501 Adjust.
4502 (sparc_arch_setup): New function.
4503 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4504 (the_low_target): Adjust.
4505 (initialize_low_arch): New function.
4506 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4507 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4508 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4509 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4510 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4511 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4512 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4513 (tdesc_powerpc_isa205_vsx64l): Declare.
4514 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4515 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4516 (ppc_set_pc, ppc_get_hwcap): Adjust.
4517 (ppc_usrregs_info): Forward declare.
4518 (!__powerpc64__) ppc_regmap_adjusted: New global.
4519 (ppc_arch_setup): Adjust to the current process'es target
4520 description.
4521 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4522 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4523 (ppc_store_evrregset): Adjust.
4524 (target_regsets): Rename to ...
4525 (ppc_regsets): ... this, and make static.
4526 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4527 (ppc_regs_info): New function.
4528 (the_low_target): Adjust.
4529 (initialize_low_arch): New function.
4530 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4531 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4532 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4533 (tdesc_s390x_linux64v2): Declare.
4534 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4535 (s390_fill_gregset, s390_store_last_break): Adjust.
4536 (target_regsets): Rename to ...
4537 (s390_regsets): ... this, and make static.
4538 (s390_get_pc, s390_set_pc): Adjust.
4539 (s390_get_hwcap): New target_desc parameter, and use it.
4540 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4541 (s390_arch_setup): Adjust to set the current process'es target
4542 description. Don't adjust the regmap.
4543 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4544 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4545 (regs_info_3264): New globals.
4546 (s390_regs_info): New function.
4547 (the_low_target): Adjust.
4548 (initialize_low_arch): New function.
4549 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4550 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4551 [__mips64] (init_registers_mips_linux)
4552 (init_registers_mips_dsp_linux): Delete defines.
4553 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4554 (have_dsp): New global.
4555 (mips_read_description): New, based on mips_arch_setup.
4556 (mips_arch_setup): Reimplement.
4557 (get_usrregs_info): New function.
4558 (mips_cannot_fetch_register, mips_cannot_store_register)
4559 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4560 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4561 (target_regsets): Rename to ...
4562 (mips_regsets): ... this, and make static.
4563 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4564 (dsp_regs_info, regs_info): New globals.
4565 (mips_regs_info): New function.
4566 (the_low_target): Adjust.
4567 (initialize_low_arch): New function.
4568 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4569 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4570 Declare.
4571 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4572 (arm_read_description): New, with bits factored from
4573 arm_arch_setup.
4574 (arm_arch_setup): Reimplement.
4575 (target_regsets): Rename to ...
4576 (arm_regsets): ... this, and make static.
4577 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4578 (arm_regs_info): New function.
4579 (the_low_target): Adjust.
4580 (initialize_low_arch): New function.
4581 * linux-m68k-low.c (tdesc_m68k): Declare.
4582 (target_regsets): Rename to ...
4583 (m68k_regsets): ... this, and make static.
4584 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4585 (m68k_regs_info): New function.
4586 (m68k_arch_setup): New function.
4587 (the_low_target): Adjust.
4588 (initialize_low_arch): New function.
4589 * linux-sh-low.c (tdesc_sharch): Declare.
4590 (target_regsets): Rename to ...
4591 (sh_regsets): ... this, and make static.
4592 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4593 (sh_regs_info, sh_arch_setup): New functions.
4594 (the_low_target): Adjust.
4595 (initialize_low_arch): New function.
4596 * linux-bfin-low.c (tdesc_bfin): Declare.
4597 (bfin_arch_setup): New function.
4598 (bfin_usrregs_info, regs_info): New globals.
4599 (bfin_regs_info): New function.
4600 (the_low_target): Adjust.
4601 (initialize_low_arch): New function.
4602 * linux-cris-low.c (tdesc_cris): Declare.
4603 (cris_arch_setup): New function.
4604 (cris_usrregs_info, regs_info): New globals.
4605 (cris_regs_info): New function.
4606 (the_low_target): Adjust.
4607 (initialize_low_arch): New function.
4608 * linux-cris-low.c (tdesc_crisv32): Declare.
4609 (cris_arch_setup): New function.
4610 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4611 (cris_regs_info): New function.
4612 (the_low_target): Adjust.
4613 (initialize_low_arch): New function.
4614 * linux-m32r-low.c (tdesc_m32r): Declare.
4615 (m32r_arch_setup): New function.
4616 (m32r_usrregs_info, regs_info): New globals.
4617 (m32r_regs_info): Adjust.
4618 (initialize_low_arch): New function.
4619 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4620 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4621 (tic6x_usrregs_info): Forward declare.
4622 (tic6x_read_description): New function, based on ...
4623 (tic6x_arch_setup): ... this. Reimplement.
4624 (target_regsets): Rename to ...
4625 (tic6x_regsets): ... this, and make static.
4626 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4627 (tic6x_regs_info): New function.
4628 (the_low_target): Adjust.
4629 (initialize_low_arch): New function.
4630 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4631 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4632 (target_regsets): Rename to ...
4633 (xtensa_regsets): ... this, and make static.
4634 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4635 globals.
4636 (xtensa_arch_setup, xtensa_regs_info): New functions.
4637 (the_low_target): Adjust.
4638 (initialize_low_arch): New function.
4639 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4640 (nios2_arch_setup): Set the current process'es tdesc.
4641 (target_regsets): Rename to ...
4642 (nios2_regsets): ... this.
4643 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4644 (nios2_regs_info): New function.
4645 (the_low_target): Adjust.
4646 (initialize_low_arch): New function.
a261b8f5
PA
4647 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4648 (aarch64_arch_setup): Set the current process'es tdesc.
4649 (target_regsets): Rename to ...
4650 (aarch64_regsets): ... this.
4651 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4652 (aarch64_regs_info): New function.
4653 (the_low_target): Adjust.
4654 (initialize_low_arch): New function.
3aee8918
PA
4655 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4656 globals.
4657 (target_regsets): Rename to ...
4658 (tile_regsets): ... this.
4659 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4660 (tile_regs_info): New function.
4661 (tile_arch_setup): Set the current process'es tdesc.
4662 (the_low_target): Adjust.
4663 (initialize_low_arch): New function.
4664 * spu-low.c (tdesc_spu): Declare.
4665 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4666 * win32-arm-low.c (tdesc_arm): Declare.
4667 (arm_arch_setup): New function.
4668 (the_low_target): Install arm_arch_setup instead of
4669 init_registers_arm.
4670 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4671 (init_windows_x86): Rename to ...
4672 (i386_arch_setup): ... this. Set `win32_tdesc'.
4673 (the_low_target): Adjust.
4674 * win32-low.c (win32_tdesc): New global.
4675 (child_add_thread): Don't create the thread cache here.
4676 (do_initial_child_stuff): Set the new process'es tdesc.
4677 * win32-low.h (struct target_desc): Forward declare.
4678 (win32_tdesc): Declare.
4679 * lynx-i386-low.c (tdesc_i386): Declare global.
4680 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4681 * lynx-low.c (lynx_tdesc): New global.
4682 (lynx_add_process): Set the new process'es tdesc.
4683 * lynx-low.h (struct target_desc): Forward declare.
4684 (lynx_tdesc): Declare global.
4685 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4686 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4687 * nto-low.c (nto_tdesc): New global.
4688 (do_attach): Set the new process'es tdesc.
4689 * nto-low.h (struct target_desc): Forward declare.
4690 (nto_tdesc): Declare.
4691 * nto-x86-low.c (tdesc_i386): Declare.
4692 (nto_x86_arch_setup): Set `nto_tdesc'.
4693
b1fbec62
GB
46942013-06-04 Gary Benson <gbenson@redhat.com>
4695
4696 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4697 to qSupported response when appropriate.
4698 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4699 with nonzero-length annex.
4700 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4701 arguments supplied in annex.
4702
d1ec4ce7
DE
47032013-05-31 Doug Evans <dje@google.com>
4704
ac44adcb 4705 PR server/15594
d1ec4ce7
DE
4706 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4707 64 bits in 64-cross-32 environment.
4708
9b25f2d3
PA
47092013-05-28 Pedro Alves <palves@redhat.com>
4710
4711 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4712 (aarch64-without-fpu.c): Delete rule.
4713 * configure.srv (aarch64*-*-linux*): Remove references to
4714 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4715 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4716 declaration.
4717
6740dc9c
PA
47182013-05-24 Pedro Alves <palves@redhat.com>
4719
4720 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4721 instead of strchr/decode_address. Error if the range isn't split
4722 with a ','. Don't assume there's be a ':' in the action.
4723
c2d6af84
PA
47242013-05-23 Yao Qi <yao@codesourcery.com>
4725 Pedro Alves <palves@redhat.com>
4726
4727 * linux-low.c (lwp_in_step_range): New function.
4728 (linux_wait_1): If the thread was range stepping and stopped
4729 outside the stepping range, report the stop to GDB. Otherwise,
4730 continue stepping. Add range stepping debug output.
4731 (linux_set_resume_request): Copy the step range from the resume
4732 request to the lwp.
4733 (linux_supports_range_stepping): New.
4734 (linux_target_ops) <supports_range_stepping>: Set to
4735 linux_supports_range_stepping.
4736 * linux-low.h (struct linux_target_ops)
4737 <supports_range_stepping>: New field.
4738 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4739 * linux-x86-low.c (x86_supports_range_stepping): New.
4740 (the_low_target) <supports_range_stepping>: Set to
4741 x86_supports_range_stepping.
4742 * server.c (handle_v_cont): Handle 'r' action.
4743 (handle_v_requests): Append ";r" if the target supports range
4744 stepping.
4745 * target.h (struct thread_resume) <step_range_start,
4746 step_range_end>: New fields.
4747 (struct target_ops) <supports_range_stepping>:
4748 New field.
4749 (target_supports_range_stepping): New macro.
4750
58794e1a
JB
47512013-05-17 Joel Brobecker <brobecker@adacore.com>
4752
4753 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4754 confusion in comment.
4755
d631c5a7
JB
47562013-05-17 Joel Brobecker <brobecker@adacore.com>
4757
4758 * lynx-low.c (struct process_info_private): New type.
4759 (lynx_add_process): New function.
4760 (lynx_create_inferior, lynx_attach): Replace calls to
4761 add_process by calls to lynx_add_process.
4762 (lynx_resume): If PTID is null, then try using
4763 current_process()->private->last_wait_event_ptid.
4764 Add comments.
4765 (lynx_clear_inferiors): Delete. The contents of that function
4766 has been inlined in lynx_mourn;
4767 (lynx_wait_1): Save the ptid in the process's private data.
4768 (lynx_mourn): Free the process' private data. Replace call
4769 to lynx_clear_inferiors by call to clear_inferiors.
4770
96f7a20f
YQ
47712013-05-17 Yao Qi <yao@codesourcery.com>
4772
4773 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4774 the right place.
4775
db0dfaa0
LM
47762013-05-16 Luis Machado <lgustavo@codesourcery.com>
4777
4778 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4779 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4780 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4781 PT_TEXT_END_ADDR guards. Update comments.
4782 (linux_target_op) <read_offsets>: Conditionally define to
4783 linux_read_offsets if the target is UCLIBC and if it defines
4784 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4785
68f5f838
SL
47862013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4787 Andrew Jenner <andrew@codesourcery.com>
4788
4789 * Makefile.in (SFILES): Add linux-nios2-low.c.
4790 (clean): Add action to delete nios2-linux.c.
4791 (nios2-linux.c): New rule.
4792 * configure.srv: Add nios2*-*-linux*.
4793 * linux-nios2-low.c: New.
4794
1ebff1fd
HAQ
47952013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4796
4797 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4798
f6150862
HZ
47992013-04-25 Hui Zhu <hui@codesourcery.com>
4800
4801 PR gdb/15186
f6150862
HZ
4802 * ax.c (ax_printf): Add fflush.
4803
614c279d
TT
48042013-04-22 Tom Tromey <tromey@redhat.com>
4805
4806 * Makefile.in (SFILES): Add filestuff.c.
4807 (OBS): Add filestuff.o.
4808 (filestuff.o): New target.
4809 * config.in, configure: Rebuild.
4810 * configure.ac: Check for fdwalk, pipe2.
4811
7d4e5717
PA
48122013-04-17 Pedro Alves <palves@redhat.com>
4813
4814 * configure.ac (USE_THREAD_DB): Delete variable.
4815 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4816 Don't AC_SUBST USE_THREAD_DB.
4817 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4818 * config.in, configure: Regenerate.
4819
d5c93e41
PA
48202013-04-16 Pedro Alves <palves@redhat.com>
4821
4822 * linux-low.h (struct lwp_info) <thread_known>: Move under
4823 the USE_THREAD_DB #ifdef.
4824
04f5fe89
PA
48252013-04-16 Pedro Alves <palves@redhat.com>
4826
4827 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4828 (linux-low.o): Delete rule.
4829 * linux-low.h: Always include "gdb_thread_db.h" instead of
4830 conditionally including thread_db.h.
4831 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4832 HAVE_THREAD_DB_H.
4833
480b27bf
JK
48342013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4835
4836 * Makefile.in (install-only): Fix make install regression.
4837
43662968
JK
48382013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4839
4840 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4841 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4842 installation.
4843 * gdbserver.1: Remove.
4844
3e74e146
PA
48452013-03-22 Pedro Alves <palves@redhat.com>
4846
4847 * linux-low.c (handle_extended_wait): Don't call
4848 linux_enable_event_reporting.
4849
a8347a2a
TT
48502013-03-15 Tony Theodore <tonyt@logyst.com>
4851
4852 PR build/9098:
4853 * Makefile.in (SHELL): Use @SHELL@.
4854
eeb56fa7
SDJ
48552013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4856
4857 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4858 compiler warning.
4859
4fa7e2ff
JB
48602013-03-13 Joel Brobecker <brobecker@adacore.com>
4861
4862 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4863 Remove extraneous NULL element.
4864
8ddb1965
YQ
48652013-03-13 Yao Qi <yao@codesourcery.com>
4866
4867 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4868 'V' block in trace frame.
4869
9accd112
MM
48702013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4871
4872 * target.h (struct target_ops): Add btrace ops.
4873 (target_supports_btrace): New macro.
4874 (target_enable_btrace): New macro.
4875 (target_disable_btrace): New macro.
4876 (target_read_btrace): New macro.
4877 * gdbthread.h (struct thread_info): Add btrace field.
4878 * server.c: Include btrace-common.h.
4879 (handle_btrace_general_set): New function.
4880 (handle_btrace_enable): New function.
4881 (handle_btrace_disable): New function.
4882 (handle_general_set): Call handle_btrace_general_set.
4883 (handle_qxfer_btrace): New function.
4884 (struct qxfer qxfer_packets[]): Add btrace entry.
4885 * inferiors.c (remove_thread): Disable btrace.
4886 * linux-low: Include linux-btrace.h.
4887 (linux_low_enable_btrace): New function.
4888 (linux_low_read_btrace): New function.
4889 (linux_target_ops): Add btrace ops.
4890 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4891 Add srv_linux_btrace=yes.
4892 (x86_64-*-linux*): Add linux-btrace.o.
4893 Add srv_linux_btrace=yes.
4894 * configure.ac: Define HAVE_LINUX_BTRACE.
4895 * config.in: Regenerated.
4896 * configure: Regenerated.
4897
5cc22e4c
MM
48982013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4899
4900 * server.c (handle_qxfer): Preserve error message if -3 is
4901 returned.
4902 (qxfer): Document the -3 return value.
4903
7c97f91e
MM
49042013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4905
4906 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4907 (linux_btrace_h): New variable.
4908 (linux-btrace.o): New rule.
4909
be9a119c 49102013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
4911 Hafiz Abid Qadeer <abidh@codesourcery.com>
4912
4913 * tracepoint.c (trace_buffer_size): New global.
4914 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4915 (init_trace_buffer): Change to one-argument function. Allocate
4916 trace buffer memory.
4917 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4918 handle QTBuffer:size packet.
4919 (cmd_bigqtbuffer_size): New function.
4920 (initialize_tracepoint): Call init_trace_buffer with
4921 DEFAULT_TRACE_BUFFER_SIZE.
4922 * server.c (handle_query): Add QTBuffer:size in the
4923 supported packets.
4924
e64f7499
YQ
49252013-03-07 Yao Qi <yao@codesourcery.com>
4926
4927 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4928 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4929 of -1.
4930 (cmd_qtsp): Adjust condition. Do post increment.
4931 Set cur_action and cur_step_action back to 0.
4932
f0ae6fc3
PA
49332013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
4934
4935 PR server/15236
4936 * linux-low.c (linux_write_memory): Return early success if LEN is
4937 zero.
4938
b5b0b0af
CV
49392013-03-05 Corinna Vinschen <vinschen@redhat.de>
4940
334ad4a8 4941 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 4942
589bc927
TT
49432013-02-28 Tom Tromey <tromey@redhat.com>
4944
4945 * configure.ac: Invoke AC_SYS_LARGEFILE.
4946 * configure, config.in: Rebuild.
4947
dfe07582
CV
49482013-02-28 Corinna Vinschen <vinschen@redhat.com>
4949
4950 * win32-low.c: Throughout, fix format strings and casts of
4951 printf-like functions to avoid type related warnings on all
4952 platforms.
4953 (get_child_debug_event): Print dwDebugEventCode as hex since
4954 that's how it's usually documented.
4955
736cd585
YQ
49562013-02-28 Yao Qi <yao@codesourcery.com>
4957
4958 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
4959 pulongest.
4960
e1f58301
JW
49612013-02-27 Jiong Wang <jiwang@tilera.com>
4962
4963 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
4964 (reg-tilegx32.c): New rule.
4965 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
4966 * linux-tile-low.c (tile_arch_setup): New function. Invoke
4967 different register info initializer according to elf class.
4968 (init_registers_tilgx32): New function. The tilegx32 register info
4969 initializer.
4970 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
4971 (tile_store_gregset): Likewise.
4972
d171ca78
YQ
49732013-02-27 Yao Qi <yao@codesourcery.com>
4974
4975 * server.c (process_point_options): Print debug message when
4976 debug_threads is true.
4977
282bbdf3
YQ
49782013-02-26 Yao Qi <yao@codesourcery.com>
4979
4980 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
4981
aca22551
PA
49822013-02-19 Pedro Alves <palves@redhat.com>
4983 Kai Tietz <ktietz@redhat.com>
4984
4985 PR gdb/15161
4986
4987 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
4988 instead of strtoul to extract address from packet.
4989 (process_serial_event) <'z'>: Likewise.
4990
4f3cee1c
YQ
49912013-02-18 Yao Qi <yao@codesourcery.com>
4992
4993 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
4994
8e1d55a3
PA
49952013-02-14 Pedro Alves <palves@redhat.com>
4996
4997 Plug memory leak.
4998
4999 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5000 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5001
458820da
PA
50022013-02-14 Pedro Alves <palves@redhat.com>
5003
5004 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5005
baea0dae
PA
50062013-02-14 Pedro Alves <palves@redhat.com>
5007
5008 * tracepoint.c (save_string): Delete.
5009 (add_tracepoint_action): Use savestring instead of save_string.
5010
0b1afbb3
PA
50112013-02-12 Pedro Alves <palves@redhat.com>
5012
5013 * linux-xtensa-low.c: Ditto.
5014 * xtensa-xtregs.c: Ditto.
5015
8a4ac37e
PA
50162013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5017
5018 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5019 thread_db.
5020
148de6bb
MS
50212013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5022
5023 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5024 aarch64_num_wp_regs and aarch64_num_bp_regs to
5025 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5026
55fac6e0
MS
50272013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5028
5029 * linux-aarch64-low.c (ps_get_thread_area): Replace
5030 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5031
176eb98c
MS
50322013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5033 Marcus Shawcroft <marcus.shawcroft@arm.com>
5034 Nigel Stephens <nigel.stephens@arm.com>
5035 Yufeng Zhang <yufeng.zhang@arm.com>
5036
5037 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5038 (aarch64.c, aarch64-without-fpu.c): New targets.
5039 * configure.srv (aarch64*-*-linux*): New.
5040 * linux-aarch64-low.c: New file.
5041
56f7af9c
MS
50422013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5043
43aaf8b6 5044 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
5045 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5046 (dequeue_one_deferred_signal, linux_resume_one_thread)
5047 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5048 (linux_tracefork_grandchild, linux_test_for_tracefork)
5049 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5050 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5051 where the argument is 0.
5052
60f662b0
YQ
50532013-01-25 Yao Qi <yao@codesourcery.com>
5054
5055 * event-loop.c: Include "queue.h".
5056 (gdb_event_p): New typedef.
5057 (struct gdb_event) <next_event>: Remove.
5058 (event_queue): Change to QUEUE(gdb_event_p).
5059 (async_queue_event): Remove.
5060 (gdb_event_xfree): New.
5061 (initialize_event_loop): New.
5062 (process_event): Use API from QUEUE.
5063 (wait_for_event): Likewise.
5064 * server.c (main): Call initialize_event_loop.
5065 * server.h (initialize_event_loop): Declare.
5066
5ae4861a
YQ
50672013-01-18 Yao Qi <yao@codesourcery.com>
5068
5069 * ax.h (struct eval_agent_expr_context): New.
5070 (gdb_eval_agent_expr): Update declaration.
5071 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5072 TFRAME. Add new argument CTX.
5073 * server.h (struct eval_agent_expr_context): Declare.
5074 (agent_mem_read, agent_tsv_read): Update declaration.
5075 (agent_mem_read_string): Likewise.
5076 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5077 (add_traceframe_block): Add new argument TPOINT.
5078 Increase TPOINT->traceframe_usage.
5079 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5080 eval_tracepoint_agent_expr.
5081 (condition_true_at_tracepoint): Likewise.
5082 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5083 (agent_mem_read_string, agent_tsv_read): Likewise.
5084
85e00e85
YQ
50852013-01-16 Yao Qi <yao@codesourcery.com>
5086
5087 * linux-low.c (linux_resume_one_lwp): Don't check
5088 'lwp->bp_reinsert != 0'.
5089
4039cf45
JB
50902013-01-07 Joel Brobecker <brobecker@adacore.com>
5091 Pedro Alves <palves@redhat.com>
5092
5093 * lynx-low.c (ptrace_request_to_str): Define a temporary
5094 macro and use it to simplify this function's implementation.
5095
9044dee2
JB
50962013-01-07 Joel Brobecker <brobecker@adacore.com>
5097
5098 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5099 sets errno.
5100
e6352c8f
JB
51012013-01-07 Joel Brobecker <brobecker@adacore.com>
5102
5103 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5104
50681a27
JB
51052013-01-07 Joel Brobecker <brobecker@adacore.com>
5106
5107 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5108
3f6e77ef
JB
51092013-01-07 Joel Brobecker <brobecker@adacore.com>
5110
5111 * lynx-low.c (lynx_resume): Use the resume_info parameter
5112 to determine the ptid for the lynx_ptrace call, unless
5113 it is equal to minus_one_ptid, in which case we use the
5114 ptid of the current_inferior.
5115 (lynx_wait_1): After having received a thread create/exit
5116 event, resume the inferior's execution using the signaling
5117 thread's ptid, rather than the old ptid.
5118
7fda33ae
JB
51192013-01-07 Joel Brobecker <brobecker@adacore.com>
5120
5121 * lynx-low.c (lynx_resume): Delete variable ret.
5122
b9786c74
JB
51232013-01-01 Joel Brobecker <brobecker@adacore.com>
5124
5125 * gdbreplay.c (gdbreplay_version): Update copyright year.
5126 * server.c (gdbserver_version): Likewise.
5127
8b93d60f
JB
51282012-12-17 Joel Brobecker <brobecker@adacore.com>
5129
5130 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5131 new thread.
5132
037335a7
JB
51332012-12-17 Joel Brobecker <brobecker@adacore.com>
5134
5135 * lynx-low.c (ptrace_request_to_str): Add handling for
5136 PTRACE_GETTRACESIG.
5137
52d4cbd8
JB
51382012-12-17 Joel Brobecker <brobecker@adacore.com>
5139
5140 * lynx-low.c (lynx_attach): Delete variable new_process.
5141
ab8f6ca9
JB
51422012-12-17 Joel Brobecker <brobecker@adacore.com>
5143
5144 * lynx-low.c (lynx_create_inferior): Delete variable
5145 new_process.
5146
78cbc024
JB
51472012-12-17 Joel Brobecker <brobecker@adacore.com>
5148
5149 * lynx-low.c (ptrace_request_to_str): Do not handle
5150 PTRACE_GETTHREADLIST if this macro does not exist.
5151
14a00470
YQ
51522012-12-15 Yao Qi <yao@codesourcery.com>
5153
5154 * Makefile.in (OBS): Add notif.o.
5155 * notif.c, notif.h: New.
5156 * server.c: Include "notif.h".
5157 (struct vstop_notif) <next>: Remove.
5158 <base>: New field.
5159 (queue_stop_reply): Update.
5160 (push_event, send_next_stop_reply): Remove.
5161 (discard_queued_stop_replies): Update.
5162 (notif_stop): New variable.
5163 (handle_v_stopped): Remove.
5164 (handle_v_requests): Don't call handle_v_stopped. Call
5165 handle_ack_notif instead.
5166 (queue_stop_reply_callback): Call notif_event_enque instead
5167 of queue_stop_reply.
5168 (handle_status): Don't call send_next_stop_reply, call
5169 notif_write_event instead.
5170 (kill_inferior_callback): Likewise.
5171 (detach_or_kill_inferior_callback): Likewise.
5172 (main): Call initialize_notif.
5173 (process_serial_event): Call QUEUE_is_empty.
5174 (handle_target_event): Call notif_push instead of push event.
5175 * server.h (push_event): Remove declaration.
5176
61c125b9
TT
51772012-12-10 Tom Tromey <tromey@redhat.com>
5178
5179 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5180 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5181 macros.
5182 (.c.o): Rewrite.
5183 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5184 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5185 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5186 (amd64-linux-ipa.o, ax.o): Rewrite.
5187 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5188 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5189 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5190 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5191 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5192 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5193 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5194 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5195 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5196 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5197 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5198 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5199 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5200 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5201 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5202 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5203 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5204 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5205 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5206 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5207 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5208 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5209 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5210 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5211 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5212 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5213 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5214 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5215 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5216 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5217 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5218 (reg-tilegx.o): Remove.
5219 (all_object_files): New macro.
5220 Include .deps files.
5221 * aclocal.m4, configure: Rebuild.
5222 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5223 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5224 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5225
e90e9ad9
TT
52262012-12-05 Tom Tromey <tromey@redhat.com>
5227
5228 PR gdb/14917:
5229 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5230
02d403bf 52312012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
5232
5233 * configure.ac: Check for linux/perf_event.h.
5234 * config.in: Regenerated.
5235 * configure: Regenerated.
5236
0270a750
PA
52372012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5238
5239 * hostio.c (handle_readlink): Decrease buffer size
5240 parameter passed to readlink by one byte.
5241
8c29b58e
YQ
52422012-11-26 Yao Qi <yao@codesourcery.com>
5243
5244 * configure.ac (build_warnings): Append '-Wempty-body'.
5245 * configure: Regenerated.
5246 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5247 body.
5248
8bdce1ff
PM
52492012-11-15 Pierre Muller <muller@sourceware.org>
5250
5251 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5252 * config.in: Regenerate.
5253 * configure: Regenerate.
5254 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5255 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5256 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5257 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5258 header.
5259 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5260 instead of <sys/wait.h> header.
5261 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5262
02d403bf 52632012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
5264
5265 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5266 (various make rules): Remove -DGDBSERVER
5267
fbd5db48
YQ
52682012-11-09 Yao Qi <yao@codesourcery.com>
5269
5270 * spu-low.c (current_ptid): Move it to ..
5271 * gdbthread.h: ... here. New.
5272 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5273 * server.c (myresume, process_serial_event): Likewise.
5274 * thread-db.c (thread_db_find_new_threads): Likewise.
5275 * tracepoint.c (run_inferior_command): Likewise.
5276
b3dc46ff
AB
52772012-10-01 Andrew Burgess <aburgess@broadcom.com>
5278
5279 * server.c (handle_search_memory_1): Include access length in
5280 warning message.
5281
07c04788
HPN
52822012-09-05 Michael Brandt <michael.brandt@axis.com>
5283
5284 * linux-crisv32-low.c: Fix compile errors.
5285
918d227b
YQ
52862012-09-04 Yao Qi <yao@codesourcery.com>
5287
5288 * tracepoint.c (cmd_qtsv): Adjust debug message.
5289 Don't check CUR_TPOINT.
5290
18c1b81a
YQ
52912012-08-28 Yao Qi <yao@codesourcery.com>
5292
5293 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5294 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5295 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5296 Remove declarations of xmalloc, xreallloc, xstrdup and
5297 freeargv.
5298 * Makefile.in (libiberty_h): New.
5299 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5300 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5301
dc82f37b
YQ
53022012-08-23 Yao Qi <yao@codesourcery.com>
5303
5304 * server.h: Remove declaration of 'xsnprintf'.
5305
406b1477
KS
53062012-08-22 Keith Seitz <keiths@redhat.com>
5307
5308 * server.h: Include build-gnulib-gbserver/config.h.
5309 * gdbreplay.c: Likewise.
5310
e6712ff1
DE
53112012-08-08 Doug Evans <dje@google.com>
5312
5313 * Makefile.in (SFILES): Add gdb_vecs.c.
5314 (OBS): Add gdb_vecs.o.
5315 (gdb_vecs_h, host_defs_h): New variables.
5316 (thread-db.o): Add $(gdb_vecs_h) dependency.
5317 (gdb_vecs.o): New rule.
5318 * thread-db.c: #include "gdb_vecs.h".
5319 (thread_db_load_search): Use a vector to iterate over path elements.
5320 Handle text appearing after "$pdir".
5321
5322 * configure.ac: Add check for strstr.
5323 * config.in: Regenerate.
5324 * configure: Regenerate.
5325
7c3270ae
UW
53262012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5327
5328 * hostio.c (handle_pread): If pread fails, fall back to attempting
5329 lseek/read.
5330 (handle_pwrite): Likewise for pwrite.
5331
b62e2b27
UW
53322012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5333
5334 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5335 between unsupported TYPE and unimplementable ADDR/LEN combination.
5336 (arm_insert_point): Act on new return value.
5337
78a99e91
PA
53382012-07-31 Pedro Alves <palves@redhat.com>
5339
5340 * server.c (process_point_options): Only skip tokens if we find
5341 one that is unrecognized. Don't treat 'X' specially while
5342 skipping unrecognized tokens.
5343
fcf303ab
UW
53442012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5345
5346 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5347 to 4-byte-align HW breakpoint addresses for Thumb.
5348
7255706c
YQ
53492012-07-27 Yao Qi <yao@codesourcery.com>
5350
5351 PR remote/14161.
5352
5353 * server.h: Declare gdb_agent_about_to_close.
5354 * target.c (kill_inferior): Include "agent.h".
5355 New. Send command 'kill'.
5356 * target.h (kill_inferior): Removed macro.
5357 * tracepoint.c (gdb_agent_about_to_close): New.
5358 (gdb_agent_helper_thread): Handle command 'close'.
5359 Wait endlessly until the inferior stops.
5360 Install gdb_agent_remove_socket to atexit hook.
5361 (agent_socket_name): New static variable.
5362 (gdb_agent_socket_init): Replace local variable 'name' with
5363 'agent_socket_name'.
5364 (gdb_agent_remove_socket): New.
5365
5a3f286f
YQ
53662012-07-27 Yao Qi <yao@codesourcery.com>
5367
5368 * server.c (process_point_options): Stop at 'X' when parsing.
5369
961bd387
ME
53702012-07-19 Michael Eager <eager@eagercon.com>
5371
a261b8f5 5372 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
5373 to hw_execute.
5374 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5375 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5376 hardware breakpoint.
5377
aa7c7447
JK
53782012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5379
5380 * gdbserver/linux-low.c (initialize_low): Call
5381 linux_ptrace_init_warnings.
5382
7f216e7c
DE
53832012-07-02 Doug Evans <dje@google.com>
5384
5385 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5386 pointer to int.
5387
d3ce09f5
SS
53882012-07-02 Stan Shebs <stan@codesourcery.com>
5389
5390 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5391 (ax.o): Add it to build rule.
5392 (ax-ipa.o): Ditto.
5393 (OBS): Add format.o.
5394 (IPA_OBS): Add format.o.
5395 * server.c (handle_query): Claim support for breakpoint commands.
5396 (process_point_options): Add command case.
5397 (process_serial_event): Leave running if there are printfs in
5398 effect.
5399 * mem-break.h (any_persistent_commands): Declare.
5400 (add_breakpoint_commands): Declare.
5401 (gdb_no_commands_at_breakpoint): Declare.
5402 (run_breakpoint_commands): Declare.
5403 * mem-break.c (struct point_command_list): New struct.
5404 (struct breakpoint): New field command_list.
5405 (any_persistent_commands): New function.
5406 (add_commands_to_breakpoint): New function.
5407 (add_breakpoint_commands): New function.
5408 (gdb_no_commands_at_breakpoint): New function.
5409 (run_breakpoint_commands): New function.
5410 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5411 locally.
5412 * ax.c: Include format.h.
5413 (ax_printf): New function.
5414 (gdb_eval_agent_expr): Add printf opcode.
5415
2f8f6aed
YQ
54162012-06-13 Yao Qi <yao@codesourcery.com>
5417
5418 * server.c (start_inferior): Remove duplicated writes to fields
5419 'last_resume_kind' and 'last_status' of 'current_inferior'.
5420
0c9070b3
YQ
54212012-06-12 Yao Qi <yao@codesourcery.com>
5422 Pedro Alves <palves@redhat.com>
5423
5424 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5425 comment.
5426 * server.c (handle_v_cont): Extend comment.
5427
c52daf70
YQ
54282012-06-11 Yao Qi <yao@codesourcery.com>
5429
5430 * linux-low.c (linux_attach): Add 'static'.
5431
d38bbb0a
YQ
54322012-06-06 Yao Qi <yao@codesourcery.com>
5433
5434 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5435
89dc0afd
JK
54362012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5437
5438 Fix gcc -flto compilation warning.
5439 * server.c (main): Make variable multi_mode and attach volatile.
5440
75f62ce7
TJB
54412012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5442
5443 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5444 if the platform doesn't know about it.
5445
65f479b6
PA
54462012-05-30 Jeff Kenton <jkenton@tilera.com>
5447
5448 * Makefile.in (SFILES): Add linux-tile-low.c.
5449 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5450 * configure.srv: Handle tilegx-*-linux*.
5451 * linux-tile-low.c: New file.
5452
0c5bf5a9
JK
54532012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5454
5455 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5456
a493e3e2
PA
54572012-05-24 Pedro Alves <palves@redhat.com>
5458
5459 PR gdb/7205
5460
43aaf8b6 5461 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 5462
2ea28649
PA
54632012-05-24 Pedro Alves <palves@redhat.com>
5464
5465 PR gdb/7205
5466
5467 Replace target_signal with gdb_signal throughout.
5468
8d409d16
MR
54692012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5470
5471 * linux-low.c (linux_store_registers): Avoid the copying sequence
5472 when no data has been retrieved by ptrace.
5473
23512c01
MGD
54742012-05-22 Will Deacon <will.deacon@arm.com>
5475
5476 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5477 Include asm/ptrace.h.
5478 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5479 already defined.
5480
4934b29e
MR
54812012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5482
5483 * linux-low.c (linux_store_registers): Don't re-retrieve data
5484 with ptrace that has already been obtained from /proc. Always
5485 copy any data retrieved with ptrace to the buffer supplied.
5486
bde24c0a
PA
54872012-05-11 Yao Qi <yao@codesourcery.com>
5488 Pedro Alves <palves@redhat.com>
5489
5490 * linux-low.c (enum stopping_threads_kind): New.
5491 (stopping_threads): Change type to `enum stopping_threads_kind'.
5492 (handle_extended_wait): If stopping and suspending threads, leave
5493 the new_lwp suspended too.
5494 (linux_wait_for_event): Adjust.
5495 (stop_all_lwps): Set `stopping_threads' to
5496 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5497 whether we're suspending threads or just stopping them. Assert no
5498 recursion happens.
5499
623b6bdf
YQ
55002012-04-29 Yao Qi <yao@codesourcery.com>
5501
5502 * server.h: Move some code to ...
5503 * gdbthread.h: ... here. New.
5504 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5505 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5506 (nto-low.o, win32-low.o): Likewise.
5507 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5508 * regcache.c, remote-utils.c, server.c: Likewise.
5509 * target.c, tracepoint.c, win32-low.c: Likewise.
5510
f15f9948
TJB
55112012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5512
5513 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5514 (PTRACE_ARG4_TYPE): Likewise.
5515 (PTRACE_XFER_TYPE): Likewise.
5516 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5517 ptrace to PTRACE_ARG3_TYPE.
5518 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5519 (PTRACE_ARG4_TYPE): Likewise.
5520 (PTRACE_XFER_TYPE): Likewise.
5521 (linux_detach_one_lwp): Cast fourth argument of
5522 ptrace to long then PTRACE_ARG4_TYPE.
5523 (regsets_fetch_inferior_registers): Cast third argument of
5524 ptrace to long then PTRACE_ARG3_TYPE.
5525 (regsets_store_inferior_registers): Likewise.
5526
38ea300a
PA
55272012-04-20 Pedro Alves <palves@redhat.com>
5528
5529 * configure: Regenerate.
5530
c971b7fa
PA
55312012-04-19 Pedro Alves <palves@redhat.com>
5532
43aaf8b6 5533 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 5534 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
5535 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5536 (all, install-only, uninstall, clean-info, all-lib, clean): No
5537 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5538 (maintainer-clean realclean distclean): Use subdir_do.
5539 (subdir_do): New.
5540 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 5541 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
5542 * acinclude.m4: Include acx_configure_dir.m4.
5543 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5544 calls. Call AC_PROG_RANLIB. Configure gnulib using
5545 ACX_CONFIGURE_DIR.
5546 (GNULIB): New.
5547 (GNULIB_STDINT_H): Adjust.
5548 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5549 * gdbreplay.c: Include build-gnulib/config.h.
5550 * server.h: Likewise.
5551 * aclocal.m4: Regenerate.
5552 * config.in: Regenerate.
5553 * configure: Regenerate.
c971b7fa 5554
809277f8
PA
55552012-04-19 Pedro Alves <palves@redhat.com>
5556
5557 * Makefile.in (LIBGNU, INCGNU): Adjust.
5558 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5559 (all, install-only, uninstall, clean-info, all-lib, clean)
5560 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5561 * configure.ac: Adjust AC_OUTPUT output.
5562 * aclocal.m4: Regenerate.
5563 * configure: Regenerate.
5564
fd9bb8b8
PA
55652012-04-19 Pedro Alves <palves@redhat.com>
5566
5567 * Makefile.in (generated_files): New.
5568 (server_h): Remove the explicit dependency on config.h, and depend
5569 on $generated_files.
5570
1c298c66
PA
55712012-04-19 Pedro Alves <palves@redhat.com>
5572
5573 * Makefile.in (INCGNU): Add -Ignulib.
5574
57c4b50b
PA
55752012-04-19 Pedro Alves <palves@redhat.com>
5576
5577 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5578 (INCGNU): ... this, and spell out -I here.
5579 (GNULIB_LIB): Rename to ...
5580 (LIBGNU): ... this.
5581 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5582
1030e047
PA
55832012-04-19 Pedro Alves <palves@redhat.com>
5584
5585 * config.in: Regenerate.
5586
447d4319
PA
55872012-04-19 Pedro Alves <palves@redhat.com>
5588
5589 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5590 * server.h (memmem): Remove declaration.
5591 * config.in: Regenerate.
5592 * configure: Regenerate.
5593
aad9eab9
YQ
55942012-04-19 Yao Qi <yao@codesourcery.com>
5595
5596 * Makefile.in (SFILES): Add common/vec.c.
5597 (OBS): Add vec.o.
5598 (vec.o): New rule.
5599
3e10640f
YQ
56002012-04-19 Yao Qi <yao@codesourcery.com>
5601
5602 * remote-utils.c (prepare_resume_reply): Replace with macro
5603 target_core_of_thread.
5604 * server.c (handle_qxfer_threads_proper): Likewise.
5605 * target.h (traget_core_of_thread): New macro.
5606
71622373
PA
56072012-04-18 Pedro Alves <palves@redhat.com>
5608
5609 * aclocal.m4: Regenerate.
5610 * configure: Regenerate.
5611
80d26939
YQ
56122012-04-16 Yao Qi <yao@codesourcery.com>
5613
5614 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5615 duplicated on address.
5616
42476b70
YQ
56172012-04-16 Yao Qi <yao@codesourcery.com>
5618
5619 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5620 (struct tracepoint_action_ops) <send>: New field.
5621 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5622 (agent_expr_send, x_tracepoint_action_send): New.
5623 (l_tracepoint_action_send): New.
5624 (cmd_qtdp): Download and install tracepoint
5625 according to `use_agent'.
5626 (run_inferior_command): Add one more parameter `len'.
5627 Update callers.
5628 (tracepoint_send_agent): New.
5629 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5630
7bc83639
YQ
56312012-04-16 Yao Qi <yao@codesourcery.com>
5632
5633 * tracepoint.c (download_tracepoints): Moved to ...
5634 (cmd_qtstart): ... here.
5635
5f18041e
YQ
56362012-04-14 Yao Qi <yao@codesourcery.com>
5637
5638 * tracepoint.c: Include inttypes.h.
5639 (struct collect_memory_action): Use sized types.
5640 (struct tracepoint): Likewise.
5641 (cmd_qtdp, stop_tracing): Update print specifiers.
5642 (cmd_qtp, response_tracepoint): Likewise.
5643 (collect_data_at_tracepoint): Likewise.
5644 (collect_data_at_step): Likewise.
5645
55a8c076
YQ
56462012-04-14 Yao Qi <yao@codesourcery.com>
5647
5648 Import gnulib module inttypes.
5649 * aclocal.m4, config.in, configure: Regenerated.
5650
dc750257
YQ
56512012-04-14 Yao Qi <yao@codesourcery.com>
5652
5653 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5654 Makefile and config.status at last.
5655
0ab5faf9
YQ
56562012-04-13 Yao Qi <yao@codesourcery.com>
5657
5658 * tracepoint.c: Include stdint.h unconditionally.
5659
18f5fd81
TJB
56602012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5661
5662 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5663 on BFD_HAVE_SYS_PROCFS_TYPE.
5664 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5665 * configure: Regenerate.
5666 * config.in: Likewise.
5667
4d47af5c
L
56682012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5669
5670 * Makefile.in (clean): Also remove x32.c x32-linux.c
5671 x32-avx.c x32-avx-linux.c.
5672 (x32.o): New target.
5673 (x32.c): Likewise.
5674 (x32-linux.o): Likewise.
5675 (x32-linux.c): Likewise.
5676 (x32-avx.o): Likewise.
5677 (x32-avx.c): Likewise.
5678 (x32-avx-linux.o): Likewise.
5679 (x32-avx-linux.c): Likewise.
5680
5681 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5682 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5683 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5684 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5685 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5686 i386/x32-avx-linux.xml.
5687
5688 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5689 (init_registers_x32_avx_linux): Likwise.
5690 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5691 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5692
ecedbe58
PA
56932012-04-13 Pedro Alves <palves@redhat.com>
5694
5695 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5696 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5697 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5698 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5699 the sub-make.
5700
c92b5177
L
57012012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5702
5703 * linux-x86-low.c (compat_x32_clock_t): New.
5704 (compat_x32_siginfo_t): Likewise.
5705 (compat_x32_siginfo_from_siginfo): Likewise.
5706 (siginfo_from_compat_x32_siginfo): Likewise.
5707 (linux_is_elf64): Likewise.
5708 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5709 and siginfo_from_compat_x32_siginfo for x32.
5710 (x86_arch_setup): Set linux_is_elf64.
5711
214d508e
L
57122012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5713
5714 PR gdb/13969
5715 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5716 e_machine field.
5717 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5718 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5719 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5720 compatible with process.
5721
c9a1864a
YQ
57222012-04-12 Yao Qi <yao@codesourcery.com>
5723
5724 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5725 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5726 (install-only, install-info, clean): Handle sub dir gnulib.
5727 (all-lib, am--refresh): New targets.
5728 (memmem.o): Remove target.
5729 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5730 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5731 (AC_REPLACE_FUNCS): Remove memmem.
5732 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5733 (AC_OUTPUT): Generate Makefile in gnulib/.
5734 * aclocal.m4, config.in, configure: Regenerated.
5735
367ba2c2
MR
57362012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5737
5738 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5739
9d236627
PA
57402012-04-05 Pedro Alves <palves@redhat.com>
5741
5742 -Werror=strict-aliasing
5743
5744 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5745 pointer.
5746
111217b3
PA
57472012-04-04 Pedro Alves <palves@redhat.com>
5748
5749 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5750 (sparc_store_gregset_from_stack, sparc_store_gregset)
5751 (sparc_breakpoint_at): Fix formatting.
5752
8365dcf5
TJB
57532012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5754
5755 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5756 are available.
5757 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5758 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5759 * config.in: Regenerate.
5760 * configure: Likewise.
5761
689cc2ae
PA
57622012-03-29 Pedro Alves <palves@redhat.com>
5763
5764 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5765 Correct ptrace arguments.
5766
c14dfd32
PA
57672012-03-28 Pedro Alves <palves@redhat.com>
5768
5769 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5770 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5771 (IA64_FR1_REGNUM): New defines.
5772 (ia64_fetch_register): New.
5773 (the_low_target): Install it.
5774 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5775 field.
5776 * linux-low.c (linux_fetch_registers): Try the
5777 the_low_target.fetch_register hook first.
5778
5779 * linux-arm-low.c (the_low_target): Adjust.
5780 * linux-bfin-low.c (the_low_target): Adjust.
5781 * linux-cris-low.c (the_low_target): Adjust.
5782 * linux-crisv32-low.c (the_low_target): Adjust.
5783 * linux-m32r-low.c (the_low_target): Adjust.
5784 * linux-m68k-low.c (the_low_target): Adjust.
5785 * linux-mips-low.c (the_low_target): Adjust.
5786 * linux-ppc-low.c (the_low_target): Adjust.
5787 * linux-s390-low.c (the_low_target): Adjust.
5788 * linux-sh-low.c (the_low_target): Adjust.
5789 * linux-sparc-low.c (the_low_target): Adjust.
5790 * linux-tic6x-low.c (the_low_target): Adjust.
5791 * linux-x86-low.c (the_low_target): Adjust.
5792 * linux-xtensa-low.c (the_low_target): Adjust.
5793
63c88e13
PA
57942012-03-26 Pedro Alves <palves@redhat.com>
5795
5796 * server.c (handle_qxfer_libraries): Don't bail early if
5797 the_target->qxfer_libraries_svr4 is not NULL.
5798
fb723180
PA
57992012-03-26 Pedro Alves <palves@redhat.com>
5800
5801 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5802
0afae3cf
PA
58032012-03-23 Pedro Alves <palves@redhat.com>
5804
5805 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5806 "library-list-svr4" element's start tag when the the DSO list is
5807 empty.
5808
485f1ee4
PA
58092012-03-23 Pedro Alves <palves@redhat.com>
5810
5811 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5812 a variable whose type size is the same as the inferior's pointer
5813 size.
5814
a5362b9a
TS
58152012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5816
5817 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5818 struct siginfo.
5819 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5820 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5821 * linux-low.h: Include <signal.h>.
5822 (struct siginfo): Remove forward declaration.
5823 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5824 struct siginfo.
5825
d226c142
MF
58262012-03-21 Mike Frysinger <vapier@gentoo.org>
5827
5828 * .gitignore: Ignore more files.
5829
122f36ef
PA
58302012-03-19 Pedro Alves <palves@redhat.com>
5831 Jan Kratochvil <jan.kratochvil@redhat.com>
5832
5833 * server.c (cont_thread, general_thread): Add describing comments.
5834 (start_inferior): Clear `cont_thread'.
5835 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5836 of a process.
5837
fc3e5175
YQ
58382012-03-15 Yao Qi <yao@codesourcery.com>
5839
5840 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5841 handling to ...
5842 (cmd_qtdp): ... here.
5843
8d0d92cd
YQ
58442012-03-15 Yao Qi <yao@codesourcery.com>
5845
5846 * tracepoint.c (struct tracepoint_action_ops): New.
5847 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5848 (m_tracepoint_action_download): New.
5849 (r_tracepoint_action_download): New.
5850 (x_tracepoint_action_download): New.
5851 (l_tracepoint_action_download): New.
5852 (add_tracepoint_action): Install `action->ops' according type.
5853 (download_tracepoint_1): Move code `download' function pointer
5854 of various tracepoint_action_ops.
5855
87b0bb13
JK
58562012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5857
5858 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5859 linux_ptrace_attach_warnings.
5860
5f572dec
JK
58612012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5862
5863 * Makefile.in (linux-ptrace.o): New.
5864 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5865 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5866 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5867 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5868 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5869 of these targets.
5870 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5871
f4647387
YQ
58722012-03-08 Yao Qi <yao@codesourcery.com>
5873 Pedro Alves <palves@redhat.com>
5874
5875 Fix PR server/13392.
5876 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5877 offset of JMP insn.
5878 * tracepoint.c (remove_tracepoint): New.
5879 (cmd_qtdp): Call remove_tracepoint when failed to install.
5880
9b224c5e
PA
58812012-03-07 Pedro Alves <palves@redhat.com>
5882
5883 * linux-low.c (get_detach_signal): New.
5884 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5885 Pass on pending signals to PTRACE_DETACH. Check the result of the
5886 ptrace call.
5887 * server.c (program_signals, program_signals_p): New.
5888 (handle_general_set): Handle QProgramSignals.
5889 * server.h (program_signals, program_signals_p): Declare.
5890
e237a7e2
JK
58912012-03-05 Pedro Alves <palves@redhat.com>
5892 Jan Kratochvil <jan.kratochvil@redhat.com>
5893
5894 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5895 New comment why.
5896
5808517f
YQ
58972012-03-03 Yao Qi <yao@codesourcery.com>
5898
5899 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5900 agent_look_up_symbols.
5901
58b4daa5
YQ
59022012-03-03 Yao Qi <yao@codesourcery.com>
5903
5904 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5905 (linux-x86-low.o): Likewise.
5906 * server.h: Remove in_process_agent_loaded.
5907 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5908 common/agent.c.
5909 Update callers.
5910
8ffcbaaf
YQ
59112012-03-03 Yao Qi <yao@codesourcery.com>
5912
5913 * tracepoint.c (gdb_agent_capability): New global.
5914 (in_process_agent_loaded_ust): Renamed to
5915 `in_process_agent_supports_ust'.
5916 Update callers.
5917 (in_process_agent_supports_ust): Call agent_capability_check.
5918 (clear_installed_tracepoints): Assert that agent supports
5919 agent.
5920
d1feda86
YQ
59212012-03-03 Yao Qi <yao@codesourcery.com>
5922
5923 * linux-low.c (linux_supports_agent): New.
5924 (linux_target_ops): Initialize field `supports_agent' with
5925 linux_supports_agent.
5926 * target.h (struct target_ops) <supports_agent>: New.
5927 (target_supports_agent): New macro.
5928 * server.c (handle_general_set): Handle packet 'QAgent'.
5929 (handle_query): Send `QAgent+'.
5930 * Makefile.in (server.o): Depends on agent.h.
5931
2fa291ac
YQ
59322012-03-03 Yao Qi <yao@codesourcery.com>
5933
5934 * Makefile.in (OBS): Add agent.o.
5935 Add new rule for agent.o.
5936 Track dependence of tracepoint.c on agent.h.
5937 * tracepoint.c (run_inferior_command_1):
5938 (run_inferior_command): Call agent_run_command.
5939 (gdb_ust_connect_sync_socket): Deleted. Move it to
5940 common/agent.c.
5941 (resume_thread, stop_thread): Likewise.
5942 (gdb_ust_socket_init): Renamed to ...
5943 (gdb_agent_socket_init): ... New.
5944 (gdb_ust_thread): Renamed to ...
5945 (gdb_agent_helper_thread): ... New.
5946 (gdb_ust_init): Move some code to ...
5947 (gdb_agent_init): ... here. New.
5948 [HAVE_UST]: Call gdb_ust_init.
5949 (initialize_tracepoint_ftlib): Call gdb_agent_init.
5950 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
5951 * config.in, configure: Regenerated.
5952
05044653
PA
59532012-03-02 Pedro Alves <palves@redhat.com>
5954
5955 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
5956 * linux-low.c (struct simple_pid_list): New.
5957 (stopped_pids): New a struct simple_pid_list pointer.
5958 (add_to_pid_list, pull_pid_from_list): New.
5959 (handle_extended_wait): Don't assume the first signal new children
5960 report is SIGSTOP. Adjust call to pull_pid_from_list.
5961 (linux_wait_for_lwp): Adjust.
5962
8d00225b
YQ
59632012-03-02 Yao Qi <yao@codesourcery.com>
5964
5965 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
5966 debug log.
5967
19560ba5
YQ
59682012-03-02 Yao Qi <yao@codesourcery.com>
5969
5970 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
5971 `stop_pc' and `tpoint'. Update caller.
5972
1faeff08
MR
59732012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
5974
5975 * linux-low.h (linux_target_ops): Add regset_bitmap member.
5976 * linux-low.c (use_linux_regsets): New macro.
5977 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
5978 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
5979 (linux_register_in_regsets): New function.
5980 (usr_fetch_inferior_registers): Skip registers covered by
5981 regsets.
5982 (usr_store_inferior_registers): Likewise.
5983 (usr_fetch_inferior_registers): New macro.
5984 (usr_store_inferior_registers): Likewise.
5985 (linux_fetch_registers): Handle mixed regset/non-regset targets.
5986 (linux_store_registers): Likewise.
5987 * linux-mips-low.c (init_registers_mips_dsp_linux): New
5988 prototype.
5989 (init_registers_mips64_dsp_linux): Likewise.
5990 (init_registers_mips_linux): New macro.
5991 (init_registers_mips_dsp_linux): Likewise.
5992 (mips_dsp_num_regs): Likewise.
5993 (DSP_BASE, DSP_CONTROL): New fallback macros.
5994 (mips_base_regs): New macro.
5995 (mips_regmap): Use it. Fix the size.
5996 (mips_dsp_regmap): New variable.
5997 (mips_dsp_regset_bitmap): Likewise.
5998 (mips_arch_setup): New function.
5999 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6000 than mips_regmap.
6001 (mips_cannot_store_register): Likewise.
6002 (the_low_target): Update .arch_setup, .num_regs and .regmap
6003 initializers. Add .regset_bitmap initializer.
6004 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6005 initializer.
6006 * linux-bfin-low.c (the_low_target): Likewise.
6007 * linux-cris-low.c (the_low_target): Likewise.
6008 * linux-crisv32-low.c (the_low_target): Likewise.
6009 * linux-ia64-low.c (the_low_target): Likewise.
6010 * linux-m32r-low.c (the_low_target): Likewise.
6011 * linux-m68k-low.c (the_low_target): Likewise.
6012 * linux-ppc-low.c (the_low_target): Likewise.
6013 * linux-s390-low.c (the_low_target): Likewise.
6014 * linux-sh-low.c (the_low_target): Likewise.
6015 * linux-sparc-low.c (the_low_target): Likewise.
6016 * linux-tic6x-low.c (the_low_target): Likewise.
6017 * linux-x86-low.c (the_low_target): Likewise.
6018 * linux-xtensa-low.c (the_low_target): Likewise.
6019 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6020 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6021 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6022 srv_xmlfiles.
6023 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6024 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6025
c03e6ccc
YQ
60262012-02-29 Yao Qi <yao@codesourcery.com>
6027 Pedro Alves <palves@redhat.com>
6028
6029 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6030 `step_over_finished' is true.
6031
644cebc9
PA
60322012-02-27 Pedro Alves <palves@redhat.com>
6033
6034 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6035 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6036
c14d7ab2
PA
60372012-02-27 Pedro Alves <palves@redhat.com>
6038
6039 PR server/9684
6040 * linux-low.c (pid_is_stopped): New.
6041 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6042
412c89dd
LM
60432012-02-25 Luis Machado <lgustavo@codesourcery.com>
6044
6045 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6046 of conditions.
6047
b745defe
MR
60482012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6049
6050 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6051
9f3a5c85
LM
60522012-02-24 Luis Machado <lgustavo@codesourcery>
6053
6054 * server.c (handle_query): Advertise support for target-side
6055 breakpoint condition evaluation.
6056 (process_point_options): New function.
6057 (process_serial_event): When inserting a breakpoint, check for
6058 a target-side condition that should be evaluated.
6059
6060 * mem-break.c: Include regcache.h and ax.h.
6061 (point_cond_list_t): New data structure.
6062 (breakpoint) <cond_list>: New field.
6063 (find_gdb_breakpoint_at): Make non-static.
6064 (delete_gdb_breakpoint_at): Clear any target-side
6065 conditions.
6066 (clear_gdb_breakpoint_conditions): New function.
6067 (add_condition_to_breakpoint): Likewise.
6068 (add_breakpoint_condition): Likewise.
6069 (gdb_condition_true_at_breakpoint): Likewise.
6070 (gdb_breakpoint_here): Return result directly instead
6071 of going through a local variable.
6072
6073 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6074 (clear_gdb_breakpoint_conditions): Likewise.
6075 (add_breakpoint_condition): Likewise.
6076 (gdb_condition_true_at_breakpoint): Likewise.
6077
6078 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6079 (need_step_over_p): Take target-side breakpoint condition into
6080 consideration.
6081
5e1dc496
LM
60822012-02-24 Luis Machado <lgustavo@codesourcery>
6083
6084 * server.h: Include tracepoint.h.
6085 (agent_mem_read, agent_get_trace_state_variable_value,
6086 agent_set_trace_state_variable_value,
6087 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6088 get_set_tsv_func_addr): New prototypes.
6089
6090 * ax.h: New include file.
6091 * ax.c: New source file.
6092
6093 * tracepoint.c: Include ax.h.
6094 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6095 agent_expr, eval_result_type): Move to ax.h.
6096 (parse_agent_expr): Rename to ...
6097 (gdb_parse_agent_expr): ... this, make it non-static and move
6098 to ax.h.
6099 (unparse_agent_expr) Rename to ...
6100 (gdb_unparse_agent_expr): ... this, make it non-static and move
6101 to ax.h.
6102 (eval_agent_expr): Rename to ...
6103 (eval_tracepoint_agent_expr): ... this.
6104 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6105 forward declarations.
6106 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6107 (agent_get_trace_state_variable_value): New function.
6108 (agent_set_trace_state_variable_value): New function.
6109 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6110 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6111 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6112 (condition_true_at_tracepoint): Likewise.
6113 (parse_agent_expr): Rename to ...
6114 (gdb_parse_agent_expr): ... this and move to ax.c.
6115 (unparse_agent_expr): Rename to ...
6116 (gdb_unparse_agent_expr): ... this and move to ax.c.
6117 (gdb_agent_op_name): Move to ax.c.
6118 (eval_agent_expr): Rename to ...
6119 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6120 and move to ax.c.
6121 (eval_tracepoint_agent_expr): New function.
6122 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 6123 non-static.
5e1dc496
LM
6124 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6125 ax.c.
6126 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6127 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6128 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6129 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6130 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6131 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6132 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6133 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6134 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6135 (compile_bytecodes): Remove forward declaration.
6136 (is_goto_target): Move to ax.c.
6137 (compile_bytecodes): Move to ax.c and call
6138 agent_get_trace_state_variable_value (...) and
6139 agent_set_trace_state_variable_value (...).
6140
6141 * Makefile.in: Update ax.c and IPA dependencies.
6142
277e4e52
PA
61432012-02-24 Pedro Alves <palves@redhat.com>
6144
6145 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6146 (cmd_bigqtbuffer_circular): ... this. Only handle
6147 'QTBuffer:circular:'.
6148 (handle_tracepoint_general_set): Adjust.
6149
bf4c19f7
YQ
61502012-02-16 Yao Qi <yao@codesourcery.com>
6151
6152 * inferiors.c: Move code to ...
6153 * dll.c: .... here. New.
6154 * server.h: Declare clear_dlls.
6155 * Makefile.in (SFILES): Add dll.c.
6156 (OBS): Add dll.o
6157 (dll.o): New rule.
6158
d73f2619
YQ
61592012-02-11 Yao Qi <yao@codesourcery.com>
6160
6161 * server.c: (handle_monitor_command): Add a new parameter
6162 `own_buf'.
6163 (handle_query): Update caller.
6164
f8255c2a
JB
61652012-02-09 Joel Brobecker <brobecker@adacore.com>
6166
6167 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6168 * configure, config.in: Regenerate.
6169 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6170 is not defined.
6171
da84f473
PA
61722012-02-02 Pedro Alves <palves@redhat.com>
6173
6174 Try SIGKILL first, then PTRACE_KILL.
6175 * linux-low.c (linux_kill_one_lwp): New.
6176 (linux_kill_one_lwp): Rename to ...
6177 (kill_one_lwp_callback): ... this. Use the new
6178 linux_kill_one_lwp.
6179
e886a173
PA
61802012-02-02 Pedro Alves <palves@redhat.com>
6181
6182 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6183 inferior.
6184
be07f1a2
PA
61852012-01-27 Pedro Alves <palves@redhat.com>
6186
6187 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6188 (elf_64_file_p): Make static.
6189 (linux_pid_exe_is_elf_64_file): New.
6190 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6191 Delete declarations.
6192 (linux_pid_exe_is_elf_64_file): Declare.
6193 * linux-x86-low.c (x86_arch_setup): Use
6194 linux_pid_exe_is_elf_64_file.
6195
d8301ad1
JK
61962012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6197
6198 * linux-low.c (linux_wait_for_event_1): Rename to ...
6199 (linux_wait_for_event): ... here and merge it with former
6200 linux_wait_for_event - new variable wait_ptid, use it.
6201 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6202
01b17894
PA
62032012-01-23 Pedro Alves <palves@redhat.com>
6204
6205 * server.c (main): Avoid yet another case of infinite loop while
6206 detaching/killing after a longjmp.
6207
e825046f
JK
62082012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6209
6210 Code cleanup.
6211 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6212
b9e7b9c3
UW
62132012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6214
6215 * hostio.c (handle_readlink): New function.
6216 (handle_vFile): Call it to handle "vFile:readlink" packets.
6217
901f9912
UW
62182012-01-20 Pedro Alves <palves@redhat.com>
6219 Ulrich Weigand <ulrich.weigand@linaro.org>
6220
6221 * server.c (handle_v_requests): Only support vAttach and vRun to
6222 start multiple processes when in extended protocol mode.
6223
fc1ab1a0
PA
62242012-01-17 Pedro Alves <palves@redhat.com>
6225
6226 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6227 memalign plus mprotect to allocate the scratch buffer.
6228
7d5d4e98
PA
62292012-01-13 Pedro Alves <palves@redhat.com>
6230
6231 * server.c (attach_inferior): Clear `cont_thread'.
6232
f128d5e9
PA
62332012-01-13 Pedro Alves <palves@redhat.com>
6234
6235 * server.c (main): Avoid infinite loop while detaching/killing
6236 after a longjmp.
6237
06db92f0
DE
62382012-01-09 Doug Evans <dje@google.com>
6239
6240 * server.c (start_inferior): Set last_ptid in --wrapper case.
6241
32d92999
YQ
62422012-01-06 Yao Qi <yao@codesourcery.com>
6243
6244 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6245 defined.
6246 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6247
5e0a92a9
YQ
62482012-01-04 Yao Qi <yao@codesourcery.com>
6249
6250 * tracepoint.c (cmd_qtdp): Print debug message
6251 for static tracepoint.
6252
ae639e8c
YQ
62532012-01-04 Yao Qi <yao@codesourcery.com>
6254
6255 * tracepoint.c (trace_vdebug): Differentiate debug message
6256 between gdbserver and IPA.
6257
f72429c5
YQ
62582012-01-03 Yao Qi <yao@codesourcery.com>
6259
6260 * tracepoint.c (tracepoint_was_hit): Don't collect for
6261 static tracepoint.
6262
12c3e59c
JB
62632012-01-02 Joel Brobecker <brobecker@adacore.com>
6264
6265 * terminal.h: Reformat copyright header.
6266
67827812
JB
62672012-01-02 Joel Brobecker <brobecker@adacore.com>
6268
6269 * server.c (gdbserver_version): Update copyright year.
6270 * gdbreplay.c (gdbreplay_version): Likewise.
6271
3e52c33d
JK
62722011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6273
6274 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6275
6276 Revert:
6277 2011-12-18 Hui Zhu <teawater@gmail.com>
6278 * linux-low.c (linux_create_inferior): Save return value to ret.
6279
66f1260e
HZ
62802011-12-18 Hui Zhu <teawater@gmail.com>
6281
6282 * linux-low.c (linux_create_inferior): Save return value to ret.
6283
e77616d7
DE
62842011-12-16 Doug Evans <dje@google.com>
6285
e7b06c57
DE
6286 * linux-low.c (linux_create_inferior): If stdio connection,
6287 redirect stdin from /dev/null, stdout to stderr.
6288 * remote-utils.c (remote_is_stdio): New static global.
6289 (remote_connection_is_stdio): New function.
6290 (remote_prepare): Handle stdio connection.
6291 (remote_open): Ditto.
6292 (remote_close): Don't close stdin for stdio connections.
6293 (read_prim,write_prim): New functions. Replace all calls to
6294 read/write to these.
6295 * server.c (main): Watch for "-" argument. Move call to
6296 remote_prepare before start_inferior.
6297 * server.h (STDIO_CONNECTION_NAME): New macro.
6298 (remote_connection_is_stdio): Declare.
6299
e77616d7
DE
6300 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6301 in debugging output.
6302
82067193
YQ
63032011-12-15 Yao Qi <yao@codesourcery.com>
6304
6305 * tracepoint.c: Include sys/syscall.h.
6306 (gdb_ust_thread): Remove preprocessor conditional.
6307
82bfbe7e
PA
63082011-12-14 Pedro Alves <pedro@codesourcery.com>
6309
6310 * linux-low.c (linux_detach_one_lwp): Call
6311 the_low_target.prepare_to_resume before detaching.
6312
712c6575
YQ
63132011-12-14 Yao Qi <yao@codesourcery.com>
6314
6315 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6316 of write.
6317
d54d1edf
YQ
63182011-12-14 Yao Qi <yao@codesourcery.com>
6319
6320 * i386-low.c (i386_low_stopped_data_address): Initialize local
6321 variable `control'.
6322
6210a125
PA
63232011-12-13 Pedro Alves <pedro@codesourcery.com>
6324
6325 PR remote/13492
6326
6327 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6328 DR_CONTROL unless necessary. Extend comments.
6329 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6330 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6331
2ece8244
YQ
63322011-12-13 Yao Qi <yao@codesourcery.com>
6333
6334 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6335 macros.
6336 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6337
784867a5
JK
63382011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6339
6340 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6341 Print new debug message for such case.
6342
6bf36717
JK
63432011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6344
6345 Fix overlapping memcpy.
6346 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6347 the read_inferior_memory transfer.
6348 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6349 write_inferior_memory transfer.
6350 (set_fast_tracepoint_jump): New variable buf. Use it for the
6351 read_inferior_memory and write_inferior_memory transfers.
6352 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6353 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6354 Use it for the write_inferior_memory transfer.
6355 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6356 buffers.
6357
50275556
MR
63582011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6359
6360 * linux-low.c (fetch_register, store_register): Make code
6361 consistent, fix formatting.
6362
7325beb4
MR
63632011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6364
6365 * linux-low.c (usr_store_inferior_registers): Factor out code
6366 to handle individual registers into...
6367 (store_register): ... this new function.
6368
c642a434
UW
63692011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6370
6371 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6372 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6373 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6374 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6375 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6376 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6377 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6378 (srv_xmlfiles): Add new XML files.
6379
6380 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6381 and <sys/uio.h>.
6382 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6383 (init_registers_s390_linux32v1): Add prototype.
6384 (init_registers_s390_linux32v2): Likewise.
6385 (init_registers_s390_linux64v1): Likewise.
6386 (init_registers_s390_linux64v2): Likewise.
6387 (init_registers_s390x_linux64v1): Likewise.
6388 (init_registers_s390x_linux64v2): Likewise.
6389 (s390_num_regs): Increment to 52.
6390 (s390_regmap): Add orig_r2 register.
6391 (s390_num_regs_3264): Increment to 68.
6392 (s390_regmap_3264): Add orig_r2 register.
6393 (s390_collect_ptrace_register): Handle orig_r2 register.
6394 (s390_supply_ptrace_register): Likewise.
6395 (s390_fill_last_break): New function.
6396 (s390_store_last_break): Likewise.
6397 (s390_fill_system_call): New function.
6398 (s390_store_system_call): Likewise.
6399 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6400 register sets.
6401 (s390_check_regset): New function.
6402 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6403 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6404 Update target_regsets for available register sets.
6405
2268b414
JK
64062011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6407 Jan Kratochvil <jan.kratochvil@redhat.com>
6408
6409 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6410 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6411 New.
6412 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6413 * linux-low.h (struct process_info_private): New member r_debug.
6414 * server.c (handle_qxfer_libraries): Call
6415 the_target->qxfer_libraries_svr4.
6416 (handle_qxfer_libraries_svr4): New function.
6417 (qxfer_packets): New entry "libraries-svr4".
6418 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6419 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6420 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6421 PACKET_qXfer_libraries_svr4.
6422
d6db1fab
UW
64232011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6424
6425 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6426 PSW address/mask between 8-byte and 16-byte formats.
6427 (s390_supply_ptrace_register): Likewise.
6428 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6429 basic addressing mode bit.
6430
242f5f1c
SS
64312011-11-24 Stan Shebs <stan@codesourcery.com>
6432
6433 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6434
f196051f
SS
64352011-11-17 Stan Shebs <stan@codesourcery.com>
6436
6437 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6438 (tracing_start_time): New global.
6439 (tracing_stop_time): New global.
6440 (tracing_user_name): New global.
6441 (tracing_notes): New global.
6442 (tracing_stop_note): New global.
6443 (cmd_qtstart): Set traceframe_usage, start_time.
6444 (stop_tracing): Set stop_time.
6445 (cmd_qtstatus): Report additional status.
6446 (cmd_qtp): New function.
6447 (handle_tracepoint_query): Call it.
6448 (cmd_qtnotes): New function.
6449 (handle_tracepoint_general_set): Call it.
6450 (get_timestamp): Rename from tsv_get_timestamp.
6451
405f8e94
SS
64522011-11-14 Stan Shebs <stan@codesourcery.com>
6453 Kwok Cheung Yeung <kcy@codesourcery.com>
6454
6455 * linux-x86-low.c (small_jump_insn): New.
6456 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6457 trampoline and error message, build a trampoline and issue a small
6458 jump instruction to it.
6459 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6460 trampoline and error message.
6461 (x86_get_min_fast_tracepoint_insn_len): New.
6462 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6463 * linux-low.h (struct linux_target_ops): Add arguments to
6464 install_fast_tracepoint_jump_pad operation, add new operation.
6465 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6466 arguments.
6467 (linux_get_min_fast_tracepoint_insn_len): New function.
6468 (linux_target_op): Add new operation.
6469 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6470 (gdb_trampoline_buffer_end): Ditto.
6471 (gdb_trampoline_buffer_error): Ditto.
6472 (struct ipa_sym_addresses): Add fields for new IPA variables.
6473 (symbol_list): Add entries for new IPA variables.
6474 (struct tracepoint): Add fields to hold the address range of the
6475 trampoline used by the tracepoint.
6476 (trampoline_buffer_head): New static variable.
6477 (trampoline_buffer_tail): Ditto.
6478 (claim_trampoline_space): New function.
6479 (have_fast_tracepoint_trampoline_buffer): New function.
6480 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6481 structure.
6482 (install_fast_tracepoint): Ditto, also add error buffer argument.
6483 (cmd_qtminftpilen): New function.
6484 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6485 (fast_tracepoint_from_trampoline_address): New function.
6486 (fast_tracepoint_collecting): Handle trampoline as part of jump
6487 pad space.
6488 (set_trampoline_buffer_space): New function.
6489 (initialize_tracepoint): Initialize new IPA variables.
6490 * target.h (struct target_ops): Add arguments to
6491 install_fast_tracepoint_jump_pad operation, add new
6492 get_min_fast_tracepoint_insn_len operation.
6493 (target_get_min_fast_tracepoint_insn_len): New.
6494 (install_fast_tracepoint_jump_pad): Add arguments.
6495 * server.h (IPA_BUFSIZ): Define.
6496 * linux-i386-ipa.c: Include extra header files.
6497 (initialize_fast_tracepoint_trampoline_buffer): New function.
6498 (initialize_low_tracepoint): Call it.
6499 * server.h (set_trampoline_buffer_space): Declare.
6500 (claim_trampoline_space): Ditto.
6501 (have_fast_tracepoint_trampoline_buffer): Ditto.
6502
1e4d1764
YQ
65032011-11-14 Yao Qi <yao@codesourcery.com>
6504
6505 * server.c (handle_query): Handle InstallInTrace for qSupported.
6506 * tracepoint.c (add_tracepoint): Sort list.
6507 (install_tracepoint, download_tracepoint): New.
6508 (cmd_qtdp): Call them to install and download tracepoints.
6509 (sort_tracepoints): Removed.
6510 (cmd_qtstart): Update.
6511
5c73ff4e
YQ
65122011-11-14 Yao Qi <yao@codesourcery.com>
6513
6514 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6515 * mem-break.h: Declare.
6516 * tracepoint.c (cmd_qtstart): Move some code to ...
6517 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6518 New.
6519 (download_tracepoints): Move some code to ...
6520 (download_tracepoint_1): ... here. New.
6521
86a30030
YQ
65222011-11-08 Yao Qi <yao@codesourcery.com>
6523
6524 * remote-utils.c (relocate_instruction): A comment fix.
6525
8d26e50c
JB
65262011-11-07 Joel Brobecker <brobecker@adacore.com>
6527
6528 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6529 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6530 dr_status_mirror and dr_control_mirror from debug_reg_state.
6531 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6532 (i386_initial_stuff): Remove use of deleted globals.
6533 (i386_get_thread_context, i386_set_thread_context,
6534 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6535 from debug_reg_state.
6536
a59306a3
YQ
65372011-11-05 Yao Qi <yao@codesourcery.com>
6538
6539 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6540 address as TPOINT's.
6541
3065dfb6
SS
65422011-11-02 Stan Shebs <stan@codesourcery.com>
6543
6544 * tracepoint.c (agent_mem_read_string): New function.
6545 (eval_agent_expr): Call it for tracenz.
6546 * server.c (handle_query): Report support for tracenz.
6547
fd0d8c7c
YQ
65482011-11-02 Yao Qi <yao@codesourcery.com>
6549
6550 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6551
609086b1
YQ
65522011-11-02 Yao Qi <yao@codesourcery.com>
6553
6554 * target.h: Fix a typo in comment.
6555
b9fd1791
PA
65562011-10-31 Pedro Alves <pedro@codesourcery.com>
6557
6558 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6559 clobber the breakpoints' shadows with fast tracepoint jumps.
6560 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6561 * target.c (write_inferior_memory): Also pass MYADDR down to
6562 check_mem_write.
6563
03583c20
UW
65642011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6565
6566 * configure.ac: Check support for personality routine.
6567 * configure: Regenerate.
6568 * config.in: Likewise.
6569 * linux-low.c: Include <sys/personality.h>.
6570 Define ADDR_NO_RANDOMIZE if necessary.
6571 (linux_create_inferior): Disable address space randomization when
6572 forking inferior, if requested.
6573 (linux_supports_disable_randomization): New function.
6574 (linux_target_ops): Install it.
6575 * server.h (disable_randomization): Declare.
6576 * server.c (disable_randomization): New global variable.
6577 (handle_general_set): Handle QDisableRandomization.
6578 (handle_query): Likewise for qSupported.
6579 (main): Support --disable-randomization and --no-disable-randomization
6580 command line arguments.
6581 * target.h (struct target_ops): Add supports_disable_randomization.
6582 (target_supports_disable_randomization): New macro.
6583
723b724b
MF
65842011-09-29 Mike Frysinger <vapier@gentoo.org>
6585
6586 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6587 ifdef check.
6588 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6589 [!PT_GETDSBT] (target_loadmap): New definition.
6590 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6591 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6592 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6593 and PT_GETDSBT to LINUX_LOADMAP.
6594 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6595 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6596
55329a5c 65972011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
6598
6599 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6600 (arm_linux_hwbp_cap): New static variable.
6601 (arm_linux_get_hwbp_cap): Replace by ...
6602 (arm_linux_init_hwbp_cap): ... this new function.
6603 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6604 (arm_linux_get_hw_watchpoint_count): Likewise.
6605 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6606 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6607 (arm_prepare_to_resume): Use perror_with_name instead of error.
6608
55329a5c 66092011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
6610
6611 * linux-arm-low.c: Include <signal.h>.
6612 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6613 (struct arm_linux_hwbp_cap): New data type.
6614 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6615 (struct arm_linux_hw_breakpoint): New data type.
6616 (MAX_BPTS, MAX_WPTS): Define.
6617 (struct arch_process_info, struct arch_lwp_info): New data types.
6618 (arm_linux_get_hwbp_cap): New function.
6619 (arm_linux_get_hw_breakpoint_count): Likewise.
6620 (arm_linux_get_hw_watchpoint_count): Likewise.
6621 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6622 (arm_hwbp_control_initialize): Likewise.
6623 (arm_hwbp_control_is_enabled): Likewise.
6624 (arm_hwbp_control_is_initialized): Likewise.
6625 (arm_hwbp_control_disable): Likewise.
6626 (arm_linux_hw_breakpoint_equal): Likewise.
6627 (arm_linux_hw_point_initialize): Likewise.
6628 (struct update_registers_data): New data structure.
6629 (update_registers_callback: New function.
6630 (arm_insert_point): Likewise.
6631 (arm_remove_point): Likewise.
6632 (arm_stopped_by_watchpoint): Likewise.
6633 (arm_stopped_data_address): Likewise.
6634 (arm_new_process): Likewise.
6635 (arm_new_thread): Likewise.
6636 (arm_prepare_to_resume): Likewise.
6637 (the_low_target): Register arm_insert_point, arm_remove_point,
6638 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6639 arm_new_thread, and arm_prepare_to_resume.
6640
6b9801d4
SS
66412011-09-15 Stan Shebs <stan@codesourcery.com>
6642
6643 * server.h (struct emit_ops): Add compare-goto fields.
6644 * tracepoint.c (gdb_agent_op_sizes): New table.
6645 (emit_eq_goto): New function.
6646 (emit_ne_goto): New function.
6647 (emit_lt_goto): New function.
6648 (emit_le_goto): New function.
6649 (emit_gt_goto): New function.
6650 (emit_ge_goto): New function.
6651 (is_goto_target): New function.
6652 (compile_bytecodes): Recognize special cases of compare-goto
6653 combinations and call specialized emitters for them.
6654 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6655 (amd64_emit_ne_goto): New function.
6656 (amd64_emit_lt_goto): New function.
6657 (amd64_emit_le_goto): New function.
6658 (amd64_emit_gt_goto): New function.
6659 (amd64_emit_ge_goto): New function.
6660 (amd64_emit_ops): Add the new functions.
6661 (i386_emit_eq_goto): New function.
6662 (i386_emit_ne_goto): New function.
6663 (i386_emit_lt_goto): New function.
6664 (i386_emit_le_goto): New function.
6665 (i386_emit_gt_goto): New function.
6666 (i386_emit_ge_goto): New function.
6667 (i386_emit_ops): Add the new functions.
6668
bf15cbda
SS
66692011-09-08 Stan Shebs <stan@codesourcery.com>
6670
6671 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6672 (i386_emit_epilogue): Restore %ebx.
6673
943ca1dd
JZ
66742011-08-31 Jie Zhang <jzhang918@gmail.com>
6675
6676 * server.c (step_thread): Remove definition.
6677 (process_serial_event): Don't handle Hs.
6678 * server.h (step_thread): Remove declaration.
6679 * target.c (set_desired_inferior): Remove use of step_thread.
6680
e3deef73
LM
66812011-08-24 Luis Machado <lgustavo@codesourcery.com>
6682
6683 * linux-low.c: Include linux-procfs.h.
6684 (linux_attach_lwp_1): Update comments.
6685 (linux_attach): Scan for existing threads when attaching to a
6686 process that is the tgid.
6687 * Makefile.in: Update dependencies.
6688
13da1c97
LM
66892011-08-24 Luis Machado <lgustavo@codesourcery.com>
6690
6691 * configure.srv: Add linux-procfs.o dependencies.
6692
881127c9
YQ
66932011-08-14 Yao Qi <yao@codesourcery.com>
6694
6695 * target.h (struct target_ops): Fix indent.
6696 * win32-low.c (win32_target_ops): Fix comment.
6697
58dbd541
YQ
66982011-08-14 Andrew Jenner <andrew@codesourcery.com>
6699 Yao Qi <yao@codesourcery.com>
6700
6701 * Makefile.in (clean): Remove tic6x-*.c files.
6702 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6703 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6704 (tic6x-c64xp-linux.c): Likewise.
6705 * configure.srv: Add support for tic6x-*-uclinux.
6706 * linux-tic6x-low.c: New.
6707 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6708
78d85199
YQ
67092011-08-14 Andrew Stubbs <ams@codesourcery.com>
6710 Yao Qi <yao@codesourcery.com>
6711
6712 * target.h (struct target_ops): Add read_loadmap.
6713 * linux-low.c (struct target_loadseg): New type.
6714 (struct target_loadmap): New type.
6715 (linux_read_loadmap): New function.
6716 (linux_target_ops): Add linux_read_loadmap.
6717 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
6718 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6719 to NULL.
78d85199 6720
a959a88d
EZ
67212011-08-05 Eli Zaretskii <eliz@gnu.org>
6722
6723 * win32-low.c: Include <stdint.h>.
6724
1ced966e
PA
67252011-07-22 Pedro Alves <pedro@codesourcery.com>
6726
6727 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6728 to the inferior here.
6729 (i386_remove_aligned_watchpoint): Ditto.
6730 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6731 fit part of the watchpoint in the debug registers.
6732 (i386_update_inferior_debug_regs): New.
6733 (i386_low_insert_watchpoint): Work on a local mirror of the debug
6734 registers, and only update the inferior on success.
6735 (i386_low_remove_watchpoint): Ditto.
6736
d26e3629
KY
67372011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6738
6739 * linux-low.c (compare_ints, unique, list_threads, show_process,
6740 linux_core_of_thread): Delete.
6741 (linux_target_ops): Change linux_core_of_thread to
6742 linux_common_core_of_thread.
6743 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6744 * utils.c (malloc_failure): Change type of argument.
6745 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6746 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6747 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6748 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6749 (IPA_OBJS): Add common-utils-ipa.o.
6750 (ptid_h, linux_osdata_h): New macros.
6751 (server_h): Add common/common-utils.h, common/xml-utils.h,
6752 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6753 common/ptid.h.
6754 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6755 ptid.o, buffer.o): New rules.
6756 (linux-low.o): Add common/linux-osdata.h as a dependency.
6757 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6758 * configure.ac: Add AC_HEADER_DIRENT check.
6759 * config.in: Regenerate.
6760 * configure: Regenerate.
6761 * remote-utils.c (xml_escape_text): Delete.
6762 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6763 buffer_xml_printf): Move to common/buffer.c.
6764 * server.c (main): Remove call to initialize_inferiors.
6765 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6766 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6767 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6768 internal_error, gdb_assert, gdb_assert_fail): Delete.
6769 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6770 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6771 common/buffer.h.
6772 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6773 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6774 initialize_inferiors): Delete.
6775
2275a1a7
PA
67762011-07-20 Pedro Alves <pedro@codesourcery.com>
6777
6778 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6779 symbol error.
6780
0a5b1e09
PA
67812011-05-31 Pedro Alves <pedro@codesourcery.com>
6782
6783 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6784 assertion.
6785 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6786
6938fd34
YQ
67872011-05-26 Yao Qi <yao@codesourcery.com>
6788
6789 * Makefile.in (thread-db.o): Track dependence to
6790 common/gdb_thread_db.h.
6791 * thread-db.c: include gdb_thread_db.h from right place.
6792
b481f9e0
TT
67932011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6794
6795 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6796 __FILE__ and __LINE__ to internal_error.
6797
98a5dd13
DE
67982011-05-13 Doug Evans <dje@google.com>
6799
6800 * thread-db.c (try_thread_db_load_from_sdir): New function.
6801 (try_thread_db_load_from_dir): New function.
6802 (thread_db_load_search): Handle $sdir, ignore $pdir.
6803 Remove trying of system directories if search of
6804 libthread-db-search-path fails, that is now done via $sdir.
6805
d248b706
KY
68062011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6807
6808 * server.c (handle_query): Add EnableDisableTracepoints to the list
6809 of supported features.
43aaf8b6 6810 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 6811 tracepoints.
43aaf8b6
PA
6812 (cmd_qtenable_disable): New.
6813 (cmd_qtstart): Install tracepoints even if disabled.
6814 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6815 receiving a QTEnable or QTDisable packet.
6816 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6817 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6818 tracepoints.
6819 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 6820
84e578fb
DE
68212011-05-10 Doug Evans <dje@google.com>
6822
6823 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6824
71f55dd8
DE
68252011-05-04 Doug Evans <dje@google.com>
6826
6827 * linux-low.c (linux_join): Skip process lookup.
6828 * spu-low.c (spu_join): Ditto.
6829 * server.c (join_inferiors_callback): Delete.
6830 (process_serial_event): For 'D' packet (detach) call join_inferior
6831 directly.
6832
4d393d60
JM
68332011-05-04 Joseph Myers <joseph@codesourcery.com>
6834
6835 * README: Don't mention xscale*-*-linux*.
6836 * configure.srv (xscale*-*-linux*): Don't handle target.
6837
b00ad6ff
NF
68382011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6839
6840 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6841 casting pointers.
6842 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6843 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6844 (i386_emit_void_call_2): Likewise.
6845
af96c192
YQ
68462011-04-26 Yao Qi <yao@codesourcery.com>
6847
43aaf8b6
PA
6848 * linux-low.c: Move common macros to linux-ptrace.h.
6849 Include linux-ptrace.h.
af96c192
YQ
6850 * Makefile.in (linux_ptrace_h): New.
6851 (linux-low.o): Depends on linux-ptrace.h.
6852
03f2bd59
JK
68532011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6854
6855 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6856 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6857 (remote_prepare): New function with most of the TCP code from ...
6858 (remote_open): ... here. Detect PORT here unconditionally. Move also
6859 setting transport_is_reliable.
6860 * server.c (run_once): New variable.
6861 (gdbserver_usage): Document it.
6862 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6863 the first run if RUN_ONCE.
6864 * server.h (run_once, remote_prepare): New declarations.
6865
7a9dd1b2
TT
68662011-04-19 Tom Tromey <tromey@redhat.com>
6867
6868 * win32-low.c (handle_load_dll): Remove duplicate "the".
6869
81239425
PM
68702011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6871
6872 Remove support for old Cygwin 1.5 versions.
6873 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6874 function to avoid warning.
6875 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6876 warning.
6877
9e0627f1
PM
68782011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6879
6880 * gdbserver/server.h (Macro _): Define it if not available.
6881
588eebee
MS
68822011-03-14 Michael Snyder <msnyder@vmware.com>
6883
348af9f7 6884 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 6885
43f70d4c
JB
68862011-03-10 Joel Brobecker <brobecker@adacore.com>
6887
6888 * Makefile.in (maintainer-clean realclean distclean): Remove
6889 "make ... subdir_do" command.
6890
348af9f7
MS
68912011-03-10 Michael Snyder <msnyder@vmware.com>
6892
6893 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6894
6895 * server.c (handle_v_run): Free alloced buffer on early return.
6896
e637a4f5
YQ
68972011-03-09 Yao Qi <yao@codesourcery.com>
6898
6899 Revert:
6900 2011-03-04 Yao Qi <yao@codesourcery.com>
6901
6902 * Makefile.in: Remove GNU make feature --directory.
6903
6904 2011-03-05 Yao Qi <yao@codesourcery.com>
6905
6906 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6907 (subdir_do): New make target. Copied from gdb/Makefile.
6908 (maintainer-clean, realclean, distclean, clean): Call corresponding
6909 make targets in common/Makefile.
6910
6911 2011-02-11 Yao Qi <yao@codesourcery.com>
6912
6913 * configure.ac: Call AC_PROG_RANLIB.
6914 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6915 * configure: Regenerate.
6916
e6edda56
JK
69172011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6918
6919 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6920
e5141119
JB
69212011-03-06 Yao Qi <yao@codesourcery.com>
6922
6923 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6924
64794aa4
JB
69252011-03-05 Yao Qi <yao@codesourcery.com>
6926
6927 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6928 (subdir_do): New make target. Copied from gdb/Makefile.
6929 (maintainer-clean, realclean, distclean, clean): Call corresponding
6930 make targets in common/Makefile.
6931
7a762829
YQ
69322011-03-04 Yao Qi <yao@codesourcery.com>
6933
6934 * Makefile.in: Remove GNU make feature --directory.
6935
348af9f7
MS
69362011-03-04 Michael Snyder <msnyder@vmware.com>
6937
6938 * server.c (queue_stop_reply): Call xmalloc not malloc.
6939
69402011-03-02 Michael Snyder <msnyder@vmware.com>
6941
6942 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6943
9f72fee2
MS
69442011-02-28 Michael Snyder <msnyder@vmware.com>
6945
588eebee
MS
6946 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6947 (cmd_qtframe): Ditto.
6948 (cmd_qtbuffer): Ditto.
6949 (cmd_bigqtbuffer): Ditto.
6950
9f72fee2
MS
6951 * utils.c (decimal2str): Initialize 'width' to nine, then
6952 don't mess with it.
6953
8040bd49
UW
69542011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6955
6956 * hostio.c (require_data): Free *data, not data.
6957
7e52cbd0
JK
69582011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6959
6960 * hostio.c (require_data): Use free, not xfree.
6961
9130f83e
MS
69622011-02-27 Michael Snyder <msnyder@vmware.com>
6963
4b812f4e
MS
6964 * server.c (handle_query): Discard unused value.
6965
9130f83e
MS
6966 * hostio.c (require_data): Free malloc memory before returning
6967 error.
6968
69d37113
MS
69692011-02-26 Michael Snyder <msnyder@vmware.com>
6970
6971 * linux-low.c (list_threads): Call closedir for dirent.
6972
35f5825a
MS
69732011-02-27 Michael Snyder <msnyder@vmware.com>
6974
2a589cef
MS
6975 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
6976 a case statement falls through.
6977
0adea5f7
MS
6978 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
6979
35f5825a
MS
6980 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
6981 in comparison.
6982
238f1c74
MS
69832011-02-26 Michael Snyder <msnyder@vmware.com>
6984
6985 * utils.c (decimal2str): Eliminate dead code and dead param.
6986 (pulongest): Drop dead param from call to decimal2str.
6987 (plongest): Ditto.
6988
633ff500
JB
69892011-02-24 Joel Brobecker <brobecker@adacore.com>
6990
6991 Revert the following patch (not approved yet):
6992 2011-02-21 Hui Zhu <teawater@gmail.com>
6993 * tracepoint.c (tp_printf): New function.
6994 (eval_agent_expr): Handle gdb_agent_op_printf.
6995
f9c6ff72
HZ
69962011-02-21 Hui Zhu <teawater@gmail.com>
6997
6998 * tracepoint.c (tp_printf): New function.
6999 (eval_agent_expr): Handle gdb_agent_op_printf.
7000
94d5e490
TT
70012011-02-18 Tom Tromey <tromey@redhat.com>
7002
7003 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7004 (tracepoint.o): Likewise.
7005 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7006 (gdb_agent_op_names): Likewise.
7007
c7f96d2b
TT
70082011-02-18 Tom Tromey <tromey@redhat.com>
7009
7010 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7011 gdb_agent_op_rot>: New constants.
7012 (gdb_agent_op_names): Add pick and roll.
7013 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7014 cases.
7015
0feedb2c
JK
70162011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7017
7018 * aclocal.m4: Regenerated with aclocal-1.11.1.
7019
b3b9301e
PA
70202011-02-14 Pedro Alves <pedro@codesourcery.com>
7021
7022 * server.c (handle_qxfer_traceframe_info): New.
7023 (qxfer_packets): Register "traceframe-info".
7024 (handle_query): Report support for qXfer:traceframe-info:read+.
7025 * tracepoint.c (match_blocktype): New.
7026 (traceframe_find_block_type): Rename to ...
7027 (traceframe_walk_blocks): ... this. Add callback filter argument,
7028 and use it.
7029 (traceframe_find_block_type): New, reimplemented on top of
7030 traceframe_walk_blocks.
7031 (build_traceframe_info_xml): New.
7032 (traceframe_read_info): New.
7033 * server.h (traceframe_read_info): Declare.
7034
4f3e6fb7
YQ
70352011-02-11 Yao Qi <yao@codesourcery.com>
7036
7037 * configure.ac: Call AC_PROG_RANLIB.
7038 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7039 * configure: Regenerate.
7040
764880b7
PA
70412011-02-07 Pedro Alves <pedro@codesourcery.com>
7042
7043 * server.c (gdb_read_memory): Change return semantics to allow
7044 partial transfers.
7045 (handle_search_memory_1): Adjust.
7046 (process_serial_event) <'m' packet>: Handle partial transfers.
7047 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7048
1c79eb8a
PA
70492011-01-28 Pedro Alves <pedro@codesourcery.com>
7050
7051 * regcache.c (init_register_cache): Initialize
7052 regcache->register_status.
7053 (free_register_cache): Release regcache->register_status.
7054 (regcache_cpy): Copy register_status.
7055 (registers_to_string): Print 'x's for unavailable registers.
7056 (supply_register): Mark the register's status valid or
7057 unavailable, depending on whether a buffer was passed in or not.
7058 (supply_register_zeroed): New.
7059 (supply_regblock): Mark the registers' status valid or
7060 unavailable, depending on whether a buffer was passed in or not.
7061 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7062 (struct regcache): New `register_status' field.
7063 (supply_register_zeroed): Declare.
7064 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7065 supply_register_zeroed, rather than passing a NULL buffer to
7066 supply_register.
7067 * tracepoint.c (fetch_traceframe_registers): Update comment.
7068
85724a0e
PA
70692011-01-28 Pedro Alves <pedro@codesourcery.com>
7070
7071 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7072 buffer explicit.
7073
d08aafef
PA
70742011-01-25 Pedro Alves <pedro@codesourcery.com>
7075
7076 * server.h (decode_xfer_write): Change prototype.
7077 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7078 and don't extract the annex here.
7079 * server.c (decode_xfer_read): Remove `annex' parameter,
7080 and don't extract the annex here.
7081 (decode_xfer): New.
7082 (struct qxfer): New.
7083 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7084 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7085 (handle_qxfer_statictrace): New functions, abstracted out from
7086 handle_query, and made to use the struct qxfer interface.
7087 (handle_threads_qxfer_proper): Rename to ...
7088 (handle_qxfer_threads_proper): ... this.
7089 (handle_threads_qxfer): Rename to ...
7090 (handle_qxfer_threads): ... this. Adjust.
7091 (qxfer_packets): New array.
7092 (handle_qxfer): New function.
7093 (handle_query): Use handle_qxfer.
7094
493e2a69
MS
70952011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7096
7097 * gdbreplay.c: Shorten lines of >= 80 columns.
7098 * linux-low.c: Ditto.
7099 * linux-ppc-low.c: Ditto.
7100 * linux-s390-low.c: Ditto.
7101 * linux-sparc-low.c: Ditto.
7102 * linux-x86-low.c: Ditto.
7103 * linux-xtensa-low.c: Ditto.
7104 * mem-break.c: Ditto.
7105 * nto-low.c: Ditto.
7106 * regcache.h: Ditto.
7107 * remote-utils.c: Ditto.
7108 * server.c: Ditto.
7109 * server.h: Ditto.
7110 * thread-db.c: Ditto.
7111 * tracepoint.c: Ditto.
7112 * utils.c: Ditto.
7113 * win32-low.h: Ditto.
7114
44944448
JB
71152011-01-05 Joel Brobecker <brobecker@adacore.com>
7116
7117 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7118 update.
7119
71ce852c
JB
71202011-01-01 Joel Brobecker <brobecker@adacore.com>
7121
7122 * server.c (gdbserver_version): Update copyright year in version
7123 output.
7124 * gdbreplay.c (gdbreplay_version): Ditto.
7125
eb826dc6
MF
71262010-12-29 Jie Zhang <jie.zhang@analog.com>
7127
7128 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7129 * linux-bfin-low.c: New file.
7130 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7131 PT_DATA_ADDR for BFIN targets.
7132 * Makefile.in (SFILES): Add linux-bfin-low.c.
7133 (clean): Remove reg-bfin.c.
7134 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7135 * README: Mention supported Blackfin targets.
7136
39ab222a
MF
71372010-12-23 Mike Frysinger <vapier@gentoo.org>
7138
7139 * .gitignore: New file.
7140
a1f2ce7d
MF
71412010-11-16 Mike Frysinger <vapier@gentoo.org>
7142
7143 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7144
f474844c
JZ
71452010-10-22 Jie Zhang <jie@codesourcery.com>
7146
7147 * Makefile.in: Add FLAGS_TO_PASS variable.
7148 (install): Remove dependency of install-only and recursively
7149 invoke make for install-only.
7150
f1048712
DE
71512010-10-04 Doug Evans <dje@google.com>
7152
7153 * Makefile.in (uninstall): Use $(DESTDIR).
7154
b53a1623
PA
71552010-09-24 Pedro Alves <pedro@codesourcery.com>
7156
e6ee044d
PA
7157 PR gdb/11842
7158
b53a1623
PA
7159 * linux-x86-low.c (compat_siginfo_from_siginfo)
7160 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7161 si_code is < 0. Check for si_code == SI_TIMER before checking for
7162 si_code < 0.
7163
fa1bd1e4
JB
71642010-09-13 Joel Brobecker <brobecker@adacore.com>
7165
7166 * lynx-i386-low.c: New file.
7167 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7168
47fac8f8
JB
71692010-09-13 Joel Brobecker <brobecker@adacore.com>
7170
7171 * lynx-low.c (ptrace_request_to_str): Remove handling for
7172 request values that have been removed in LynxOS 5.x.
7173
1adfc54d
JB
71742010-09-13 Joel Brobecker <brobecker@adacore.com>
7175
7176 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7177 <ptrace.h>
7178
c2a66c29
NS
71792010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7180
7181 * configure.ac: Add --enable-inprocess-agent option.
7182 * configure: Rebuilt.
7183
32fcada3
YQ
71842010-09-06 Yao Qi <yao@codesourcery.com>
7185
7186 * linux-low.c (linux_kill): Remove unused variable.
7187 (linux_stabilize_threads): Likewise.
7188 * server.c (start_inferior): Likewise.
7189 (queue_stop_reply_callback): Likewise.
7190 * tracepoint.c (do_action_at_tracepoint): Likewise.
7191
0cccb683
YQ
71922010-09-06 Yao Qi <yao@codesourcery.com>
7193
7194 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7195 on return.
7196
423ec54c
JK
71972010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7198
7199 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7200
12ac6819
PA
72012010-09-06 Pedro Alves <pedro@codesourcery.com>
7202
7203 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7204 "$(IPA_DEPFILES)".
7205
8ed54b31
JB
72062010-09-01 Joel Brobecker <brobecker@adacore.com>
7207
7208 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7209 gdbserver/lynx-ppc-low.c: New files.
7210 * Makefile.in (lynx_low_h): New variable.
7211 (lynx-low.o, lynx-ppc-low.o): New rules.
7212 * configure.ac: On LynxOS, link with -lnetinet.
7213 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7214 * configure: regenerate.
7215
bb0116a4
JB
72162010-09-01 Joel Brobecker <brobecker@adacore.com>
7217
7218 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7219 * configure.ac: Add check for vasprintf and vsnprintf.
7220 * configure, config.in: Regenerate.
7221 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7222
a778ab81 72232010-09-01 Joel Brobecker <brobecker@adacore.com>
7224
7225 * gdbreplay.c: Move include of alloca.h up, next to include of
7226 malloc.h.
7227 * server.h: Add include of malloc.h.
7228 * mem-break.c: Remove include of malloc.h.
7229 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7230
8b034a19 72312010-09-01 Joel Brobecker <brobecker@adacore.com>
7232
7233 * Makefile.in (memmem.o): Build with -Wno-error.
7234
72352010-09-01 Joel Brobecker <brobecker@adacore.com>
7236
7237 * utils.c (xsnprintf): Make non-static.
7238 * server.h: Add xsnprintf declaration.
7239 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7240 replace calls to snprintf by calls to xsnprintf throughout.
7241
72422010-09-01 Joel Brobecker <brobecker@adacore.com>
7243
7244 * configure.ac: Add configure check for alloca.
7245 * configure, config.in: Regenerate.
7246 * server.h: Include alloca.h if it exists.
7247 * gdbreplay.c: Include alloca.h if it exists.
7248
1a981360
PA
72492010-08-28 Pedro Alves <pedro@codesourcery.com>
7250
7251 * linux-low.c (__SIGRTMIN): Define if not already defined.
7252 (linux_create_inferior): Check for __ANDROID__ rather than
7253 __SIGRTMIN.
7254 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7255 are already deferred.
7256 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7257 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7258 stopped and already has a pending signal to report.
7259 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7260 a pending signal to report or is moving out of a jump pad.
7261 (linux_init_signals): Check for __ANDROID__ rather than
7262 __SIGRTMIN.
7263
b4d51a55
PA
72642010-08-28 Pedro Alves <pedro@codesourcery.com>
7265
7266 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7267 debug_threads check. Avoid a linear search when not doing debug
7268 output.
7269
ec48365d
PA
72702010-08-27 Pedro Alves <pedro@codesourcery.com>
7271
7272 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7273 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7274 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7275 (process_event): Change local fd's type to gdb_fildes_t.
7276 (create_file_handler): Adjust prototype.
7277 (delete_file_handler): Adjust prototype.
7278 (handle_file_event): Adjust prototype. Use pfildes.
7279 (create_file_event): Adjsut prototype.
7280 * remote-utils.c (remote_desc, listen_desc): Change type to
7281 gdb_fildes_t.
7282 * server.h: New gdb_fildes_t typedef.
7283 [USE_WIN32API]: Include winsock2.h.
7284 (delete_file_handler, add_file_handler): Adjust prototypes.
7285 (pfildes): Declare.
7286 * utils.c (pfildes): New.
7287
854d88f0
PA
72882010-08-27 Pedro Alves <pedro@codesourcery.com>
7289
7290 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7291 * configure: Regenerate.
7292
0146f85b
PA
72932010-08-27 Pedro Alves <pedro@codesourcery.com>
7294
7295 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7296 (linux_done_accessing_memory): ... this.
7297 (linux_target_ops): Adjust.
7298 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7299 * nto-low.c (nto_target_ops): Adjust comment.
7300 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7301 * spu-low.c (spu_target_ops): Adjust comment.
7302 * target.h (target_ops): Rename unprepare_to_access_memory field
7303 to done_accessing_memory.
7304 (unprepare_to_access_memory): Rename to ...
7305 (done_accessing_memory): ... this.
7306
90d74c30
PA
73072010-08-26 Pedro Alves <pedro@codesourcery.com>
7308
7309 * linux-low.c (linux_prepare_to_access_memory): New.
7310 (linux_unprepare_to_access_memory): New.
7311 (linux_target_ops): Install them.
7312 * server.c (read_memory): Rename to ...
7313 (gdb_read_memory): ... this. Use
7314 prepare_to_access_memory/prepare_to_access_memory.
7315 (write_memory): Rename to ...
7316 (gdb_write_memory): ... this. Use
7317 prepare_to_access_memory/prepare_to_access_memory.
7318 (handle_search_memory_1): Adjust.
7319 (process_serial_event): Adjust.
7320 * target.h (struct target_ops): New fields
7321 prepare_to_access_memory and unprepare_to_access_memory.
7322 (prepare_to_access_memory, unprepare_to_access_memory): New.
7323 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7324 prepare_to_access_memory/prepare_to_access_memory.
7325 * nto-low.c (nto_target_ops): Adjust.
7326 * spu-low.c (spu_target_ops): Adjust.
7327 * win32-low.c (win32_target_ops): Adjust.
7328
fd467969
PA
73292010-08-26 Pedro Alves <pedro@codesourcery.com>
7330
7331 * Makefile.in (WARN_CFLAGS): Get it from configure.
7332 (WERROR_CFLAGS): New.
7333 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7334 * configure.ac: Introduce --enable-werror, which adds -Werror to
7335 the compiler command line. Enabled by default. Disable with
7336 --disable-werror. Add -Wdeclaration-after-statement
7337 Wpointer-arith and -Wformat-nonliteral to warning flags.
7338 * configure: Regenerate.
7339
331e2f5f
PA
73402010-08-26 Pedro Alves <pedro@codesourcery.com>
7341
7342 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7343
e581f2b4
PA
73442010-08-26 Pedro Alves <pedro@codesourcery.com>
7345
7346 * gdbreplay.c (remote_error): New.
7347 (gdbchar): New.
7348 (expect): Use gdbchar. Check for error reading from GDB.
7349 Clarify sync error output.
7350 (play): Check for errors writing to GDB.
7351 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7352 * remote-utils.c (getpkt): Check for errors writing to the remote
7353 descriptor.
7354
3c11dd79
PA
73552010-08-25 Pedro Alves <pedro@codesourcery.com>
7356
7357 * linux-low.c (linux_wait_1): Move non-debugging code out of
7358 `debug_threads' control.
7359
d20a8ad9
PA
73602010-08-25 Pedro Alves <pedro@codesourcery.com>
7361
7362 * linux-low.c (linux_wait_1): Don't set last_status here.
7363 * server.c (push_event, queue_stop_reply_callback): Assert we're
7364 not pushing a TARGET_WAITKIND_IGNORE event.
7365 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7366 (myresume, handle_target_event): Set the thread's last_resume_kind
7367 and last_status from the target returned status.
7368
964e4306
PA
73692010-08-25 Pedro Alves <pedro@codesourcery.com>
7370
7371 PR threads/10729
7372
7373 * linux-x86-low.c (update_debug_registers_callback): New.
7374 (i386_dr_low_set_addr): Use it.
7375 (i386_dr_low_get_addr): New.
7376 (i386_dr_low_set_control): Use update_debug_registers_callback.
7377 (i386_dr_low_get_control): New.
7378 (i386_dr_low_get_status): Adjust.
7379 * linux-low.c (linux_stop_lwp): New.
7380 * linux-low.h (linux_stop_lwp): Declare.
7381
7382 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7383 argument instead of a i386_debug_reg_state.
7384 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7385 a i386_debug_reg_state.
7386 (i386_insert_aligned_watchpoint): Adjust.
7387 (i386_remove_aligned_watchpoint): Adjust.
7388 (i386_low_stopped_data_address): Read the debug registers from the
7389 inferior instead of from the mirrors.
7390 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7391 (i386_dr_low_get_addr): Declare.
7392 (i386_dr_low_get_control): Declare.
7393 (i386_dr_low_get_status): Change prototype.
7394
7395 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7396 (i386_dr_low_get_addr): New.
7397 (i386_dr_low_get_control): New.
7398 (i386_dr_low_get_status): Adjust prototype. Return
7399 dr_status_mirror.
7400 (i386_initial_stuff): Clear dr_status_mirror and
7401 dr_control_mirror.
7402 (i386_get_thread_context): Adjust.
7403 (i386_set_thread_context): Adjust.
7404 (i386_thread_added): Adjust.
7405
5f21a75b
PA
74062010-08-24 Pedro Alves <pedro@codesourcery.com>
7407
7408 * linux-low.h (linux_thread_area): Delete declaration.
7409
3e4c1235
TS
74102010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7411
7412 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7413 after its termination.
7414
1971b033
PA
74152010-08-09 Pedro Alves <pedro@codesourcery.com>
7416
7417 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7418 (gdb_wants_all_stopped): Delete.
7419 (linux_wait_1): Don't call them.
7420 * server.c (handle_v_cont): Tag all threads as want-stopped.
7421 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7422 stopped as "client-wants-stopped".
7423
310444ac
PA
74242010-07-31 Pedro Alves <pedro@codesourcery.com>
7425
7426 * Makefile.in (signals_h): New.
7427 (server_h): Depend on it.
7428 (server.o): Don't depend on $(signals_def).
7429 (signals.o): Depend on $(signals_def).
7430
a19cae16
JK
74312010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7432
7433 * Makefile.in (signals_def): New.
7434 (server_h): Append include/gdb/signals.h and signals_def.
7435 (server.o): Append signals_def.
7436
30d50328
JK
74372010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7438
7439 * server.c (handle_target_event): Use target_signal_to_host for
7440 resume_info.sig initialization.
7441 * target.h (struct thread_resume) <sig>: New comment.
7442
5c3216e2
OS
74432010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7444
c6f46ca0
OS
7445 * server.c (handle_query): strcpy() the returned string from paddress()
7446 instead of sprintf().
5c3216e2
OS
7447 * utils.c (paddress): Return phex_nz().
7448
6bd31874
JB
74492010-07-07 Joel Brobecker <brobecker@adacore.com>
7450
7451 * server.c (handle_v_cont): Call mourn_inferior if process
7452 just exited.
7453 (myresume): Likewise.
7454
0fb4aa4b
PA
74552010-07-01 Pedro Alves <pedro@codesourcery.com>
7456
7457 Static tracepoints, and integration with UST.
7458
7459 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7460 * mem-break.c (uninsert_all_breakpoints)
7461 (reinsert_all_breakpoints): New.
7462 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7463 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7464 (gdb_agent_ust_loaded, helper_thread_id)
7465 (gdb_agent_helper_thread_id): New macros.
7466 (struct ipa_sym_addresses): Add addr_ust_loaded,
7467 addr_helper_thread_id, addr_cmd_buf.
7468 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7469 (in_process_agent_loaded_ust): New.
7470 (write_e_ust_not_loaded): New.
7471 (maybe_write_ipa_ust_not_loaded): New.
7472 (struct collect_static_trace_data_action): New.
7473 (enum tracepoint_type) <static_tracepoint>: New.
7474 (struct tracepoint) <handle>: Mention static tracepoints.
7475 (struct static_tracepoint_ctx): New.
7476 (CMD_BUF_SIZE): New.
7477 (add_tracepoint_action): Handle static tracepoint actions.
7478 (unprobe_marker_at): New.
7479 (clear_installed_tracepoints): Handle static tracepoints.
7480 (cmd_qtdp): Handle static tracepoints.
7481 (probe_marker_at): New.
7482 (cmd_qtstart): Handle static tracepoints.
7483 (response_tracepoint): Handle static tracepoints.
7484 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7485 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7486 (get_context_regcache): Handle static tracepoints.
7487 (do_action_at_tracepoint): Handle static tracepoint actions.
7488 (traceframe_find_block_type): Handle static trace data blocks.
7489 (traceframe_read_sdata): New.
7490 (download_tracepoints): Download static tracepoint actions.
7491 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7492 (GDB_PROBE_NAME): New.
7493 (ust_ops): New.
7494 (GET_UST_SYM): New.
7495 (USTF): New.
7496 (dlsym_ust): New.
7497 (ust_marker_to_static_tracepoint): New.
7498 (gdb_probe): New.
7499 (collect_ust_data_at_tracepoint): New.
7500 (gdb_ust_probe): New.
7501 (UNIX_PATH_MAX, SOCK_DIR): New.
7502 (gdb_ust_connect_sync_socket): New.
7503 (resume_thread, stop_thread): New.
7504 (run_inferior_command): New.
7505 (init_named_socket): New.
7506 (gdb_ust_socket_init): New.
7507 (cstr_to_hexstr): New.
7508 (next_st): New.
7509 (first_marker, next_marker): New.
7510 (response_ust_marker): New.
7511 (cmd_qtfstm, cmd_qtsstm): New.
7512 (unprobe_marker_at, probe_marker_at): New.
7513 (cmd_qtstmat, gdb_ust_thread): New.
7514 (gdb_ust_init): New.
7515 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7516 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7517 (ST_REGENTRY): New.
7518 (x86_64_st_collect_regmap): New.
7519 (X86_64_NUM_ST_COLLECT_GREGS): New.
7520 (AMD64_RIP_REGNUM): New.
7521 (supply_static_tracepoint_registers): New.
7522 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7523 (ST_REGENTRY): New.
7524 (i386_st_collect_regmap): New.
7525 (i386_NUM_ST_COLLECT_GREGS): New.
7526 (supply_static_tracepoint_registers): New.
7527 * server.c (handle_query): Handle qXfer:statictrace:read.
7528 <qSupported>: Report support for StaticTracepoints, and
7529 qXfer:statictrace:read features.
7530 * server.h (traceframe_read_sdata)
7531 (supply_static_tracepoint_registers): Declare.
7532 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7533 (unpack_varlen_hex): Include in IPA build.
7534 * Makefile.in (ustlibs, ustinc): New.
7535 (IPA_OBJS): Add remote-utils-ipa.o.
7536 ($(IPA_LIB)): Link -ldl and -lpthread.
7537 (UST_CFLAGS): New.
7538 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7539 * config.in, configure: Regenerate.
7540
9e4344e5
PA
75412010-06-20 Ian Lance Taylor <iant@google.com>
7542 Pedro Alves <pedro@codesourcery.com>
7543
7544 * linux-x86-low.c (always_true): Delete.
7545 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7546 trying to fool the compiler with always_true.
7547
c6beb2cb
PA
75482010-06-20 Pedro Alves <pedro@codesourcery.com>
7549
7550 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7551 conditions in gdbserver.
7552
d2ed6730
UW
75532010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7554
7555 * spu-low.c (spu_read_memory): Wrap around local store limit.
7556 (spu_write_memory): Likewise.
7557
4e29fb54
PA
75582010-06-15 Pedro Alves <pedro@codesourcery.com>
7559
7560 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7561 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7562 LONGEST uses.
7563 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7564 uses.
7565 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7566 uses with LONGEST uses.
7567
6a271cae
PA
75682010-06-14 Stan Shebs <stan@codesourcery.com>
7569 Pedro Alves <pedro@codesourcery.com>
7570
7571 Bytecode compiler.
7572
7573 * linux-x86-low.c: Include limits.h.
7574 (add_insns): New.
7575 (always_true): New.
7576 (EMIT_ASM): New.
7577 (EMIT_ASM32): New.
7578 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7579 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7580 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7581 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7582 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7583 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7584 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7585 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7586 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7587 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7588 (amd64_emit_void_call_2): New.
7589 (amd64_emit_ops): New.
7590 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7591 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7592 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7593 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7594 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7595 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7596 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7597 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7598 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7599 (i386_emit_stack_adjust, i386_emit_int_call_1)
7600 (i386_emit_void_call_2): New.
7601 (i386_emit_ops): New.
7602 (x86_emit_ops): New.
7603 (the_low_target): Install x86_emit_ops.
7604 * server.h (struct emit_ops): New.
7605 (get_raw_reg_func_addr): Declare.
7606 (current_insn_ptr, emit_error): Declare.
7607 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7608 (set_trace_state_variable_value): New defines.
7609 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7610 addr_get_trace_state_variable_value and
7611 addr_set_trace_state_variable_value.
7612 (symbol_list): New fields for get_raw_reg,
7613 get_trace_state_variable_value and set_trace_state_variable_value.
7614 (condfn): New typedef.
7615 (struct tracepoint): New field `compiled_cond'.
7616 (do_action_at_tracepoint): Clear compiled_cond.
7617 (get_trace_state_variable_value, set_trace_state_variable_value):
7618 Export in the IPA.
7619 (condition_true_at_tracepoint): If there's a compiled condition,
7620 run that.
7621 (current_insn_ptr, emit_error): New globals.
7622 (struct bytecode_address): New.
7623 (get_raw_reg_func_addr): New.
7624 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7625 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7626 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7627 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7628 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7629 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7630 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7631 (compile_tracepoint_condition, compile_bytecodes): New.
7632 * target.h (emit_ops): Forward declare.
7633 (struct target_ops): New field emit_ops.
7634 (target_emit_ops): New.
7635 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7636 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7637 * linux-low.c (linux_emit_ops): New.
7638 (linux_target_ops): Install it.
7639 * linux-low.h (struct linux_target_ops): New field emit_ops.
7640
92b72907
UW
76412010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7642
7643 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7644 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7645
fa593d66
PA
76462010-06-01 Pedro Alves <pedro@codesourcery.com>
7647 Stan Shebs <stan@codesourcery.com>
7648
7649 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7650 (all): Depend on $(extra_libraries).
7651 (install-only): Install the IPA.
7652 (IPA_OBJS, IPA_LIB): New.
7653 (clean): Remove the IPA lib.
7654 (IPAGENT_CFLAGS): New.
7655 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7656 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7657 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7658 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7659 * configure.ac: Check for atomic builtins support in the compiler.
7660 (IPA_DEPFILES, extra_libraries): Define.
7661 * configure.srv (ipa_obj): Add description.
7662 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7663 (i[34567]86-*-linux*): Set ipa_obj.
7664 (x86_64-*-linux*): Set ipa_obj.
7665 * linux-low.c (stabilizing_threads): New.
7666 (supports_fast_tracepoints): New.
7667 (linux_detach): Stabilize threads before detaching.
7668 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7669 the lwp is either not stabilizing, or is moving out of a jump pad.
7670 (linux_fast_tracepoint_collecting): New.
7671 (maybe_move_out_of_jump_pad): New.
7672 (enqueue_one_deferred_signal): New.
7673 (dequeue_one_deferred_signal): New.
7674 (linux_wait_for_event_1): If moving out of a jump pad, defer
7675 pending signals to later.
7676 (linux_stabilize_threads): New.
7677 (linux_wait_1): Check if threads need moving out of jump pads, and
7678 do it if so.
7679 (stuck_in_jump_pad_callback): New.
7680 (move_out_of_jump_pad_callback): New.
7681 (lwp_running): New.
7682 (linux_resume_one_lwp): Handle moving out of jump pads.
7683 (linux_set_resume_request): Dequeue deferred signals.
7684 (need_step_over_p): Also step over fast tracepoint jumps.
7685 (start_step_over): Also uninsert fast tracepoint jumps.
7686 (finish_step_over): Also reinsert fast tracepoint jumps.
7687 (linux_install_fast_tracepoint_jump): New.
7688 (linux_target_ops): Install linux_stabilize_threads and
7689 linux_install_fast_tracepoint_jump_pad.
7690 * linux-low.h (linux_target_ops) <get_thread_area,
7691 install_fast_tracepoint_jump_pad>: New fields.
7692 (struct lwp_info) <collecting_fast_tracepoint,
7693 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7694 (linux_get_thread_area): Declare.
7695 * linux-x86-low.c (jump_insn): New.
7696 (x86_get_thread_area): New.
7697 (append_insns): New.
7698 (push_opcode): New.
7699 (amd64_install_fast_tracepoint_jump_pad): New.
7700 (i386_install_fast_tracepoint_jump_pad): New.
7701 (x86_install_fast_tracepoint_jump_pad): New.
7702 (the_low_target): Install x86_get_thread_area and
7703 x86_install_fast_tracepoint_jump_pad.
7704 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7705 (struct fast_tracepoint_jump): New.
7706 (fast_tracepoint_jump_insn): New.
7707 (fast_tracepoint_jump_shadow): New.
7708 (find_fast_tracepoint_jump_at): New.
7709 (fast_tracepoint_jump_here): New.
7710 (delete_fast_tracepoint_jump): New.
7711 (set_fast_tracepoint_jump): New.
7712 (uninsert_fast_tracepoint_jumps_at): New.
7713 (reinsert_fast_tracepoint_jumps_at): New.
7714 (set_breakpoint_at): Use write_inferior_memory.
7715 (uninsert_raw_breakpoint): Use write_inferior_memory.
7716 (check_mem_read): Mask out fast tracepoint jumps.
7717 (check_mem_write): Mask out fast tracepoint jumps.
7718 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7719 (set_fast_tracepoint_jump): Declare.
7720 (delete_fast_tracepoint_jump)
7721 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7722 (reinsert_fast_tracepoint_jumps_at): Declare.
7723 * regcache.c: Don't compile many functions when building the
7724 in-process agent library.
7725 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7726 the register buffer in the heap.
7727 (free_register_cache): If the register buffer isn't owned by the
7728 regcache, don't free it.
7729 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7730 pre-existing register caches.
7731 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7732 type.
7733 (convert_ascii_to_int): : Constify `from' parameter type.
7734 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7735 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7736 the needed buffer in-place.
7737 (relocate_instruction): New.
7738 * server.c (handle_query) <qSymbols>: If the target supports
7739 tracepoints, give it a chance of looking up symbols. Report
7740 support for fast tracepoints.
7741 (handle_status): Stabilize threads.
7742 (process_serial_event): Adjust.
7743 * server.h (struct fast_tracepoint_jump): Forward declare.
7744 (struct process_info) <fast_tracepoint_jumps>: New field.
7745 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7746 (decode_X_packet, decode_M_packet): Adjust.
7747 (relocate_instruction): Declare.
7748 (in_process_agent_loaded): Declare.
7749 (tracepoint_look_up_symbols): Declare.
7750 (struct fast_tpoint_collect_status): Declare.
7751 (fast_tracepoint_collecting): Declare.
7752 (force_unlock_trace_buffer): Declare.
7753 (handle_tracepoint_bkpts): Declare.
7754 (initialize_low_tracepoint)
7755 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7756 * target.h (struct target_ops) <stabilize_threads,
7757 install_fast_tracepoint_jump_pad>: New fields.
7758 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7759 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7760 [HAVE_STDINT_H]: Include stdint.h.
7761 (trace_debug_1): Rename to ...
7762 (trace_vdebug): ... this.
7763 (trace_debug): Rename to ...
7764 (trace_debug_1): ... this. Add `level' parameter.
7765 (trace_debug): New.
7766 (ATTR_USED, ATTR_NOINLINE): New.
7767 (IP_AGENT_EXPORT): New.
7768 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7769 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7770 (about_to_request_buffer_space, trace_buffer_is_full)
7771 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7772 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7773 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7774 (traceframe_write_count, traceframes_created)
7775 (trace_state_variables)
7776 New renaming defines.
7777 (struct ipa_sym_addresses): New.
7778 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7779 (symbol_list): New.
7780 (ipa_sym_addrs): New.
7781 (all_tracepoint_symbols_looked_up): New.
7782 (in_process_agent_loaded): New.
7783 (write_e_ipa_not_loaded): New.
7784 (maybe_write_ipa_not_loaded): New.
7785 (tracepoint_look_up_symbols): New.
7786 (debug_threads) [IN_PROCESS_AGENT]: New.
7787 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7788 (UNKNOWN_SIDE_EFFECTS): New.
7789 (stop_tracing): New.
7790 (flush_trace_buffer): New.
7791 (stop_tracing_bkpt): New.
7792 (flush_trace_buffer_bkpt): New.
7793 (read_inferior_integer): New.
7794 (read_inferior_uinteger): New.
7795 (read_inferior_data_pointer): New.
7796 (write_inferior_data_pointer): New.
7797 (write_inferior_integer): New.
7798 (write_inferior_uinteger): New.
7799 (struct collect_static_trace_data_action): Delete.
7800 (enum tracepoint_type): New.
7801 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
7802 <actions_str, step_actions, step_actions_str>: Only include in
7803 GDBserver.
fa593d66
PA
7804 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7805 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7806 (tracepoints): Use IP_AGENT_EXPORT.
7807 (last_tracepoint): Don't include in the IPA.
7808 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7809 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7810 (alloced_trace_state_variables): New.
7811 (trace_state_variables): Use IP_AGENT_EXPORT.
7812 (traceframe_t): Delete unused variable.
7813 (circular_trace_buffer): Don't include in the IPA.
7814 (trace_buffer_start): Delete.
7815 (struct trace_buffer_control): New.
7816 (trace_buffer_free): Delete.
7817 (struct ipa_trace_buffer_control): New.
7818 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7819 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7820 New.
7821 (trace_buffer_ctrl): New.
7822 (TRACE_BUFFER_CTRL_CURR): New.
7823 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7824 Reimplement as macros.
7825 (trace_buffer_wrap): Delete.
7826 (traceframe_write_count, traceframe_read_count)
7827 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7828 (struct tracepoint_hit_ctx) <type>: New field.
7829 (struct fast_tracepoint_ctx): New.
7830 (memory_barrier): New.
7831 (cmpxchg): New.
7832 (record_tracepoint_error): Update atomically in the IPA.
7833 (clear_inferior_trace_buffer): New.
7834 (about_to_request_buffer_space): New.
7835 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7836 updating the same buffer.
7837 (add_tracepoint): Default the tracepoint's type to trap
7838 tracepoint, and orig_size to -1.
7839 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7840 internal variables.
7841 (create_trace_state_variable): New parameter `gdb'. Handle it.
7842 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7843 (cmd_qtdp): Handle fast tracepoints.
7844 (cmd_qtdv): Adjust.
7845 (max_jump_pad_size): New.
7846 (gdb_jump_pad_head): New.
7847 (get_jump_space_head): New.
7848 (claim_jump_space): New.
7849 (sort_tracepoints): New.
7850 (MAX_JUMP_SIZE): New.
7851 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7852 IPA.
7853 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7854 support. Upload fast traceframes, and delete internal IPA
7855 breakpoints.
7856 (stop_tracing_handler): New.
7857 (flush_trace_buffer_handler): New.
7858 (cmd_qtstop): Upload fast tracepoints.
7859 (response_tracepoint): Handle fast tracepoints.
7860 (tracepoint_finished_step): Upload fast traceframes. Set the
7861 tracepoint hit context's tracepoint type.
7862 (handle_tracepoint_bkpts): New.
7863 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7864 type. Add comment about fast tracepoints.
7865 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7866 non-existing action_str field.
7867 (get_context_regcache): Handle fast tracepoints.
7868 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7869 to the regcache.
7870 (fast_tracepoint_from_jump_pad_address): New.
7871 (fast_tracepoint_from_ipa_tpoint_address): New.
7872 (collecting_t): New.
7873 (force_unlock_trace_buffer): New.
7874 (fast_tracepoint_collecting): New.
7875 (collecting): New.
7876 (gdb_collect): New.
7877 (write_inferior_data_ptr): New.
7878 (target_tp_heap): New.
7879 (target_malloc): New.
7880 (download_agent_expr): New.
7881 (UALIGN): New.
7882 (download_tracepoints): New.
7883 (download_trace_state_variables): New.
7884 (upload_fast_traceframes): New.
7885 (IPA_FIRST_TRACEFRAME): New.
7886 (IPA_NEXT_TRACEFRAME_1): New.
7887 (IPA_NEXT_TRACEFRAME): New.
7888 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7889 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7890 (gdb_jump_pad_buffer_end): New.
7891 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7892 (initialize_tracepoint): Adjust.
7893 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7894 buffer. Initialize the low module.
7895 * utils.c (PREFIX, TOOLNAME): New.
7896 (malloc_failure): Use PREFIX.
7897 (error): In the IPA, an error causes an exit.
7898 (fatal, warning): Use PREFIX.
7899 (internal_error): Use TOOLNAME.
7900 (NUMCELLS): Increase to 10.
7901 * configure, config.in: Regenerate.
7902
d149dd1d
PA
79032010-06-01 Pedro Alves <pedro@codesourcery.com>
7904
7905 * server.c (handle_query) <qSupported>: Do two passes over the
7906 qSupported string to avoid nesting strtok.
7907
f6528abd
JK
79082010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7909
7910 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7911 (CDEPS): New.
7912 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7913 -Wl,--dynamic-list.
7914 * configure: Regenerate.
7915 * proc-service.list: New.
7916
ca2a87a0
JK
79172010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7918
7919 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7920 New comment.
7921
363a6e9f
OS
79222010-05-26 Ozkan Sezer <sezeroz@gmail.com>
7923
7924 * gdbreplay.c (remote_open): Check error return from socket() call by
7925 its equality to -1 not by it being negative.
7926 * remote-utils.c (remote_open): Likewise.
7927
d23b6cb1
PA
79282010-05-23 Pedro Alves <pedro@codesourcery.com>
7929
7930 * config.h: Regenerate.
7931
28d3cf85
MK
79322010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7933
7934 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7935 doesn't provide PTRACE_GET_THREAD_AREA.
7936
fea36a59
MK
79372010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7938
7939 * linux-m68k-low.c: Include <asm/ptrace.h>
7940 (ps_get_thread_area): Implement.
7941
24b066ba
DE
79422010-05-03 Doug Evans <dje@google.com>
7943
7944 * event-loop.c (struct callback_event): New struct.
7945 (callback_list): New global.
7946 (append_callback_event, delete_callback_event): New functions.
7947 (process_callback): New function.
7948 (start_event_loop): Call it.
7949 * remote-utils.c (NOT_SCHEDULED): Define.
7950 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
7951 moved out of readchar.
7952 (readchar): Rewrite. Call reschedule before returning.
7953 (reset_readchar): New function.
7954 (remote_close): Call it.
7955 (process_remaining, reschedule): New functions.
7956 * server.h (callback_handler_func): New typedef.
7957 (append_callback_event, delete_callback_event): Declare.
7958
9836d6ea
PA
79592010-05-03 Pedro Alves <pedro@codesourcery.com>
7960
7961 * proc-service.c (ps_pglobal_lookup): Use
7962 thread_db_look_up_one_symbol.
7963 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
7964 parameter. Use it instead of all_symbols_looked_up.
7965 * server.h (struct process_info) <all_symbols_looked_up>: Delete
7966 field.
7967 (all_symbols_looked_up): Don't declare.
7968 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
7969 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
7970 field.
7971 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
7972 Set all_symbols_looked_up here.
7973 (thread_db_look_up_one_symbol): New.
7974 (thread_db_get_tls_address): Adjust.
7975 (thread_db_load_search, try_thread_db_load_1): Always allocate the
7976 thread_db object on the heap, and tentatively set it in the
7977 process structure.
7978 (thread_db_init): Don't set all_symbols_looked_up here.
7979 * linux-low.h (thread_db_look_up_one_symbol): Declare.
7980
7984d532
PA
79812010-05-03 Pedro Alves <pedro@codesourcery.com>
7982
7983 * linux-low.c (linux_kill, linux_detach): Adjust.
7984 (status_pending_p_callback): Remove redundant statement. Check
7985 for !TARGET_WAITIKIND_IGNORE, instead of
7986 TARGET_WAITKIND_STOPPED.
7987 (handle_tracepoints): Make sure LWP is locked. Adjust.
7988 (linux_wait_for_event_1): Adjust.
7989 (linux_cancel_breakpoints): New.
7990 (unsuspend_one_lwp): New.
7991 (unsuspend_all_lwps): New.
7992 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
7993 (send_sigstop_callback): Change return type to int, add new
7994 `except' parameter and handle it.
7995 (suspend_and_send_sigstop_callback): New.
7996 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
7997 pass them down. If SUSPEND, also increment the lwp's suspend
7998 count.
7999 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8000 (need_step_over_p): Don't consider suspended LWPs.
8001 (start_step_over): Adjust.
8002 (proceed_one_lwp): Change return type to int, add new `except'
8003 parameter and handle it.
8004 (unsuspend_and_proceed_one_lwp): New.
8005 (proceed_all_lwps): Use find_inferior instead of
8006 for_each_inferior.
8007 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8008 also decrement the suspend count of LWPs. Pass `except' down,
8009 instead of hacking its suspend count.
8010 (linux_pause_all): Add `freeze' parameter. Adjust.
8011 (linux_unpause_all): New.
8012 (linux_target_ops): Install linux_unpause_all.
8013 * server.c (handle_status): Adjust.
8014 * target.h (struct target_ops): New fields `unpause_all' and
8015 `cancel_breakpoints'. Add new parameter to `pause_all'.
8016 (pause_all): Add new `freeze' parameter.
8017 (unpause_all): New.
8018 (cancel_breakpoints): New.
8019 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8020 cancel breakpoints.
8021 (cmd_qtstart): Pause threads.
8022 (stop_tracing): Pause threads, and cancel breakpoints.
8023 * win32-low.c (win32_target_ops): Adjust.
8024
e471f25b
PA
80252010-05-03 Pedro Alves <pedro@codesourcery.com>
8026
8027 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8028 the inferior right away from here...
8029 (linux_wait_1): ... to here, and adjust to check the thread's
8030 last_resume_kind instead of the lwp's step or stop_expected flags.
8031
1915ef4f
PA
80322010-05-02 Pedro Alves <pedro@codesourcery.com>
8033
8034 * README: Use consistent `GDB' and `GDBserver' spellings.
8035
f9e39928
PA
80362010-05-02 Pedro Alves <pedro@codesourcery.com>
8037
8038 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8039 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8040 (linux_detach_one_lwp): Assume the lwp is stopped.
8041 (any_thread_of): Delete.
8042 (linux_detach): Stop all lwps here. Don't blindly delete all
8043 breakpoints.
8044 (delete_lwp_callback): New.
8045 (linux_mourn): Delete all lwps of the process that is gone.
8046 (linux_wait_1): Don't delete the last lwp of the process here.
8047 * mem-break.h (mark_breakpoints_out): Declare.
8048 * mem-break.c (mark_breakpoints_out): New.
8049 (free_all_breakpoints): Use it.
8050 * server.c (handle_target_event): If the process is gone, mark
8051 breakpoints out.
8052 * thread-db.c (struct thread_db) <create_bp>: New field.
8053 (thread_db_enable_reporting): Fix prototype. Store a thread event
8054 breakpoint reference in the thread_db struct.
8055 (thread_db_load_search): Clear the thread_db object.
8056 (try_thread_db_load_1): Ditto.
8057 (switch_to_process): New.
8058 (disable_thread_event_reporting): Use it.
8059 (remove_thread_event_breakpoints): New.
8060 (thread_db_detach, thread_db_mourn): Use it.
8061
1e7fc18c
PA
80622010-05-01 Pedro Alves <pedro@codesourcery.com>
8063
8064 * linux-low.c (linux_enable_event_reporting): New.
8065 (linux_wait_for_event_1, handle_extended_wait): Use it.
8066
02fc4de7
PA
80672010-04-30 Pedro Alves <pedro@codesourcery.com>
8068
8069 * linux-low.c (linux_kill_one_lwp, linux_kill)
8070 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8071 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8072 SIGSTOP even if the LWP is stopped.
8073 (send_sigstop_callback): New.
8074 (stop_all_lwps): Use send_sigstop_callback instead.
8075 (linux_resume_one_thread): Adjust.
8076 (proceed_one_lwp): Still proceed an LWP that the client has
8077 requested to stop, if we haven't reported it as stopped yet. Make
8078 sure that LWPs the client want stopped, have a pending SIGSTOP.
8079
bc3b5632
DE
80802010-04-26 Doug Evans <dje@google.com>
8081
ae1ada35
DE
8082 * server.c (handle_general_set): Make static.
8083
bc3b5632
DE
8084 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8085 Print received char after testing for error/eof instead of before.
8086 (input_interrupt): Tweak comment.
8087
65730243
DE
80882010-04-23 Doug Evans <dje@google.com>
8089
8090 * server.c (start_inferior): Print inferior argv if --debug.
8091
a8ae7dc0
AR
80922010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8093
8094 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8095 * nto-x86-low.c: Include server.h
8096
1c07cc19
PM
80972010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8098
8099 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8100 be consistent with other sources of this directory.
8101 (init_registers_amd64): Correct name of source file of this function
8102 in the comment.
8103
e0a61e09
PM
81042010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8105
8106 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8107 64-bit executables.
8108
54709339
PM
81092010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8110
8111 * win32-i386-low.c: Add 64-bit support.
8112 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8113 (init_registers_amd64): Declare.
8114 (mappings): Add 64-bit version of array.
8115 (init_windows_x86): New function.
8116 (the_low_target): Change init_arch field to init_windows_x86.
8117
e8f0053d
PM
81182010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8119
8120 * win32-low.c: Adapt to support also 64-bit architecture.
8121 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8122 (get_image_name): Use SIZE_T type for local variable `done'.
8123 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8124 (toolhelp_get_dll_name): Idem.
8125 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8126 Use uintptr_t typecast to avoid warning.
8127 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8128 (handle_exception): Use phex_nz to avoid warning.
8129 (win32_wait): Remove unused local variable `process'.
8130
c481e77e
PM
81312010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8132
8133 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8134 `amd64-avx.o'.
8135
12ea4b69
PM
81362010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8137
8138 * configure.ac: Use `ws2_32' library for srv_mingw.
8139 * configure: Regenerate.
8140 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8141 * remote-utils.c: Likewise.
8142
f6d1620c
L
81432010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8144
8145 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8146 if __x86_64__ is defined.
8147
8e642873
PM
81482010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8149
8150 * configure: Regenerate.
8151
711e434b
PM
81522010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8153
8154 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8155 * target.h (target_ops): New get_tib_address field.
8156 * win32-low.h (win32_thread_info): Add thread_local_base field.
8157 * win32-low.c (child_add_thread): Add tlb argument.
8158 Set thread_local_base field to TLB.
8159 (get_child_debug_event): Adapt to child_add_thread change.
8160 (win32_get_tib_address): New function.
8161 (win32_target_ops): Set get_tib_address field to
8162 win32_get_tib_address.
8163 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8164
505106cd
PA
81652010-04-12 Pedro Alves <pedro@codesourcery.com>
8166
505106cd
PA
8167 * linux-low.c (linux_mourn): Also remove the process.
8168 * server.c (handle_target_event): Don't remove the process here.
8169 * nto-low.c (nto_mourn): New.
8170 (nto_target_ops): Install it.
8171 * spu-low.c (spu_mourn): New.
8172 (spu_target_ops): Install it.
8173 * win32-low.c (win32_mourn): New.
8174 (win32_target_ops): Install it.
8175
e8470a06
PA
81762010-04-12 Pedro Alves <pedro@codesourcery.com>
8177
8178 * server.h (buffer_xml_printf): Remove redundant `;'.
8179
45ba0d02
PA
81802010-04-12 Pedro Alves <pedro@codesourcery.com>
8181
8182 * regcache.c (set_register_cache): Invalidate regcaches before
8183 changing the register cache layout.
8184 (regcache_invalidate_one): Allow a NULL regcache.
8185 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8186 regcaches before changing the register cache layout or the target
8187 regsets.
8188
59e04013
L
81892010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8190
8191 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8192 variable warning on Linux/x86-64.
8193
8336d594
PA
81942010-04-11 Pedro Alves <pedro@codesourcery.com>
8195
8196 GDBserver disconnected tracing support.
8197
8198 * linux-low.c (linux_remove_process): Delete.
8199 (add_lwp): Don't set last_resume_kind here.
8200 (linux_kill): Use `mourn'.
8201 (linux_detach): Use `thread_db_detach', and `mourn'.
8202 (linux_mourn): New.
8203 (linux_attach_lwp_1): Adjust comment.
8204 (linux_attach): last_resume_kind moved the thread_info; adjust.
8205 (status_pending_p_callback): Adjust.
8206 (linux_wait_for_event_1): Adjust.
8207 (count_events_callback, select_singlestep_lwp_callback)
8208 (select_event_lwp_callback, cancel_breakpoints_callback)
8209 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8210 (proceed_one_lwp): Adjust.
8211 (linux_async): Add debug output.
8212 (linux_thread_stopped): New.
8213 (linux_pause_all): New.
8214 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8215 linux_pause_all.
8216 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8217 (thread_db_free): Delete declaration.
8218 (thread_db_detach, thread_db_mourn): Declare.
8219 * thread-db.c (thread_db_init): Use thread_db_mourn.
8220 (thread_db_free): Delete, split in two.
8221 (disable_thread_event_reporting): New.
8222 (thread_db_detach): New.
8223 (thread_db_mourn): New.
8224
8225 * server.h (struct thread_info) <last_resume_kind>: New field.
8226 <attached>: Add comment.
8227 <gdb_detached>: New field.
8228 (handler_func): Change return type to int.
8229 (handle_serial_event, handle_target_event): Ditto.
8230 (gdb_connected): Declare.
8231 (tracing): Delete.
8232 (disconnected_tracing): Declare.
8233 (stop_tracing): Declare.
8234
8235 * server.c (handle_query) <qSupported>: Report support for
8236 disconnected tracing.
8237 (queue_stop_reply_callback): Account for running threads.
8238 (gdb_wants_thread_stopped): New.
8239 (gdb_wants_all_threads_stopped): New.
8240 (gdb_reattached_process): New.
8241 (handle_status): Clear the `gdb_detached' flag of all processes.
8242 In all-stop, stop all threads.
8243 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8244 (process_serial_event): If the remote connection breaks, or if an
8245 exit was forced with "monitor exit", force an event loop exit.
8246 Handle disconnected tracing on detach.
8247 (handle_serial_event): Adjust.
8248 (handle_target_event): If GDB isn't connected, forward events back
8249 to the inferior, unless the last process exited, in which case,
8250 exit gdbserver. Adjust interface.
8251
8252 * remote-utils.c (remote_open): Don't block in accept. Instead
8253 register an event loop source on the listen socket file
8254 descriptor. Refactor bits into ...
8255 (listen_desc): ... this new global.
8256 (gdb_connected): ... this new function.
8257 (enable_async_notification): ... this new function.
8258 (handle_accept_event): ... this new function.
8259 (remote_close): Clear remote_desc.
8260
8261 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8262
8263 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8264 New fields.
8265 (mourn_inferior): Define.
8266 (target_process_qsupported): Avoid the dangling else problem.
8267 (thread_stopped): Define.
8268 (pause_all): Define.
8269 (target_waitstatus_to_string): Declare.
8270 * target.c (target_waitstatus_to_string): New.
8271
8272 * tracepoint.c (tracing): Make extern.
8273 (disconnected_tracing): New.
8274 (stop_tracing): Make extern. Handle tracing stops due to GDB
8275 disconnecting.
8276 (cmd_qtdisconnected): New.
8277 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8278 (handle_tracepoint_general_set): Handle QTDisconnected.
8279
8280 * event-loop.c (event_handler_func): Change return type to int.
8281 (process_event): Bail out if the event handler wants the event
8282 loop to stop.
8283 (handle_file_event): Ditto.
8284 (start_event_loop): Bail out if the event handler wants the event
8285 loop to stop.
8286
8287 * nto-low.c (nto_target_ops): Adjust.
8288 * spu-low.c (spu_wait): Don't remove the process here.
8289 (spu_target_ops): Adjust.
8290 * win32-low.c (win32_wait): Don't remove the process here.
8291 (win32_target_ops): Adjust.
8292
5d267c4c
PA
82932010-04-11 Pedro Alves <pedro@codesourcery.com>
8294
8295 * regcache.c (realloc_register_cache): Invalidate inferior's
8296 regcache before recreating it.
8297
623ccd72
PA
82982010-04-09 Pedro Alves <pedro@codesourcery.com>
8299
8300 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8301
219f2f23
PA
83022010-04-09 Stan Shebs <stan@codesourcery.com>
8303 Pedro Alves <pedro@codesourcery.com>
8304
8305 * server.h (LONGEST): New.
8306 (struct thread_info) <while_stepping>: New field.
8307 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8308 Declare.
8309 (initialize_tracepoint, handle_tracepoint_general_set)
8310 (handle_tracepoint_query, tracepoint_finished_step)
8311 (tracepoint_was_hit, release_while_stepping_state_list):
8312 (current_traceframe): Declare.
8313 * server.c (handle_general_set): Handle tracepoint packets.
8314 (read_memory): New.
8315 (write_memory): New.
8316 (handle_search_memory_1): Use read_memory.
8317 (handle_query): Report support for conditional tracepoints, trace
8318 state variables, and tracepoint sources. Handle tracepoint
8319 queries.
8320 (main): Initialize the tracepoints module.
8321 (process_serial_event): Handle traceframe reads/writes.
8322
8323 * linux-low.c (handle_tracepoints): New.
8324 (linux_wait_1): Call it.
8325 (linux_resume_one_lwp): Handle while-stepping.
8326 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8327 (linux_target_ops): Install them.
8328 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8329 New field.
8330 * linux-x86-low.c (x86_supports_tracepoints): New.
8331 (the_low_target). Install it.
8332
8333 * mem-break.h (delete_breakpoint): Declare.
8334 * mem-break.c (delete_breakpoint): Make external.
8335
8336 * target.h (struct target_ops): Add `supports_tracepoints',
8337 `read_pc', and `write_pc' fields.
8338 (target_supports_tracepoints): Define.
8339 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8340 (phex_nz): New.
8341
8342 * regcache.h (struct regcache) <registers_owned>: New field.
8343 (init_register_cache, regcache_cpy): Declare.
8344 (regcache_read_pc, regcache_write_pc): Declare.
8345 (register_cache_size): Declare.
8346 (supply_regblock): Declare.
8347 * regcache.c (init_register_cache): New.
8348 (new_register_cache): Use it.
8349 (regcache_cpy): New.
8350 (register_cache_size): New.
8351 (supply_regblock): New.
8352 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 8353
219f2f23
PA
8354 * tracepoint.c: New.
8355
8356 * Makefile.in (OBS): Add tracepoint.o.
8357 (tracepoint.o): New rule.
8358
3a13a53b
L
83592010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8360
8361 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8362 (i386-mmx.o): New.
8363 (i386-mmx.c): Likewise.
8364 (i386-mmx-linux.o): Likewise.
8365 (i386-mmx-linux.c): Likewise.
8366
8367 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8368 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8369 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8370 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8371
8372 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8373 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8374 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8375
1570b33e
L
83762010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8377
8378 * Makefile.in (clean): Updated.
8379 (i386-avx.o): New.
8380 (i386-avx.c): Likewise.
8381 (i386-avx-linux.o): Likewise.
8382 (i386-avx-linux.c): Likewise.
8383 (amd64-avx.o): Likewise.
8384 (amd64-avx.c): Likewise.
8385 (amd64-avx-linux.o): Likewise.
8386 (amd64-avx-linux.c): Likewise.
8387
8388 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8389 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8390 (srv_amd64_regobj): Add amd64-avx.o.
8391 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8392 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8393 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8394 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8395 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8396 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8397 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8398
8399 * i387-fp.c: Include "i386-xstate.h".
8400 (i387_xsave): New.
8401 (i387_cache_to_xsave): Likewise.
8402 (i387_xsave_to_cache): Likewise.
8403 (x86_xcr0): Likewise.
8404
8405 * i387-fp.h (i387_cache_to_xsave): Likewise.
8406 (i387_xsave_to_cache): Likewise.
8407 (x86_xcr0): Likewise.
8408
8409 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8410 * linux-crisv32-low.c (target_regsets): Likewise.
8411 * linux-m68k-low.c (target_regsets): Likewise.
8412 * linux-mips-low.c (target_regsets): Likewise.
8413 * linux-ppc-low.c (target_regsets): Likewise.
8414 * linux-s390-low.c (target_regsets): Likewise.
8415 * linux-sh-low.c (target_regsets): Likewise.
8416 * linux-sparc-low.c (target_regsets): Likewise.
8417 * linux-xtensa-low.c (target_regsets): Likewise.
8418
8419 * linux-low.c: Include <sys/uio.h>.
8420 (regsets_fetch_inferior_registers): Support nt_type.
8421 (regsets_store_inferior_registers): Likewise.
8422 (linux_process_qsupported): New.
8423 (linux_target_ops): Add linux_process_qsupported.
8424
8425 * linux-low.h (regset_info): Add nt_type.
8426 (linux_target_ops): Add process_qsupported.
8427
8428 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8429 and <sys/uio.h>.
8430 (init_registers_i386_avx_linux): New.
8431 (init_registers_amd64_avx_linux): Likewise.
8432 (xmltarget_i386_linux_no_xml): Likewise.
8433 (xmltarget_amd64_linux_no_xml): Likewise.
8434 (PTRACE_GETREGSET): Likewise.
8435 (PTRACE_SETREGSET): Likewise.
8436 (x86_fill_xstateregset): Likewise.
8437 (x86_store_xstateregset): Likewise.
8438 (use_xml): Likewise.
8439 (x86_linux_update_xmltarget): Likewise.
8440 (x86_linux_process_qsupported): Likewise.
8441 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8442 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8443 init_registers_i386_linux here. Call
8444 x86_linux_update_xmltarget.
8445 (the_low_target): Add x86_linux_process_qsupported.
8446
8447 * server.c (handle_query): Call target_process_qsupported.
8448
8449 * target.h (target_ops): Add process_qsupported.
8450 (target_process_qsupported): New.
8451
fc7238bb
PA
84522010-04-03 Pedro Alves <pedro@codesourcery.com>
8453
8454 * inferiors.c (add_thread): Set last_status kind to
8455 TARGET_WAITKIND_IGNORE.
8456 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8457 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8458 (linux_wait_1): Move `thread' local definition to block that uses
8459 it. Don't NULL initialize `event_child'.
8460 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8461 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8462 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8463
bdabb078
PA
84642010-04-01 Pedro Alves <pedro@codesourcery.com>
8465
8466 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8467 an extended waitstatus, or by a watchpoint.
8468 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8469 thread was stepping or has been stopped by a watchpoint.
8470
d3bbe7a0
PA
84712010-04-01 Pedro Alves <pedro@codesourcery.com>
8472
8473 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8474 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8475 of another, then delete the previous, and validate all
8476 breakpoints.
8477 (validate_inserted_breakpoint): New.
8478 (delete_disabled_breakpoints): New.
8479 (validate_breakpoints): New.
8480 (check_mem_read): Validate breakpoints before trusting their
8481 shadow. Delete disabled breakpoints.
8482 (check_mem_write): Validate breakpoints before trusting they
8483 should be inserted. Delete disabled breakpoints.
8484 * mem-break.h (validate_breakpoints):
8485 * server.c (handle_query): Validate breakpoints when we see a
8486 qSymbol query.
8487
8b07ae33
PA
84882010-04-01 Pedro Alves <pedro@codesourcery.com>
8489
8490 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8491 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8492 if we could tell there's a GDB breakpoint at stop_pc.
8493 (need_step_over_p): Don't do a step over if we find a GDB
8494 breakpoint at the resume PC.
8495
8496 * mem-break.c (struct raw_breakpoint): New.
8497 (enum bkpt_type): New type `gdb_breakpoint'.
8498 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8499 fields. New field `raw'.
8500 (find_raw_breakpoint_at): New.
8501 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8502 breakpoint instead.
8503 (set_breakpoint_at): Adjust.
8504 (delete_raw_breakpoint): New.
8505 (release_breakpoint): New.
8506 (delete_breakpoint): Rename to...
8507 (delete_breakpoint_1): ... this. Add proc parameter. Use
8508 release_breakpoint. Return ENOENT.
8509 (delete_breakpoint): Reimplement.
8510 (find_breakpoint_at): Delete.
8511 (find_gdb_breakpoint_at): New.
8512 (delete_breakpoint_at): Delete.
8513 (set_gdb_breakpoint_at): New.
8514 (delete_gdb_breakpoint_at): New.
8515 (gdb_breakpoint_here): New.
8516 (set_reinsert_breakpoint): Use release_breakpoint.
8517 (uninsert_breakpoint): Rename to ...
8518 (uninsert_raw_breakpoint): ... this.
8519 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8520 (reinsert_raw_breakpoint): Change parameter type to
8521 raw_breakpoint.
8522 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8523 instead.
8524 (check_breakpoints): Adjust. Use release_breakpoint.
8525 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8526 (breakpoint_inserted_here): Ditto.
8527 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8528 Don't trust the breakpoint's shadow if it is not inserted.
8529 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8530 (delete_all_breakpoints): Adjust.
8531 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8532 use delete_breakpoint_1.
8533
8534 * mem-break.h (breakpoints_supported): Delete declaration.
8535 (set_gdb_breakpoint_at): Declare.
8536 (gdb_breakpoint_here): Declare.
8537 (delete_breakpoint_at): Delete.
8538 (delete_gdb_breakpoint_at): Declare.
8539
8540 * server.h (struct raw_breakpoint): Forward declare.
8541 (struct process_info): New field `raw_breakpoints'.
8542
8543 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8544 breakpoints.
8545
6bf5e0ba
PA
85462010-03-24 Pedro Alves <pedro@codesourcery.com>
8547
8548 * linux-low.c (status_pending_p_callback): Fix comment.
8549 (linux_wait_for_event_1): Move most of the internal breakpoint
8550 handling from here...
8551 (linux_wait_1): ... to here.
8552 (count_events_callback): New.
8553 (select_singlestep_lwp_callback): New.
8554 (select_event_lwp_callback): New.
8555 (cancel_breakpoints_callback): New.
8556 (select_event_lwp): New.
8557 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8558 priority to all LWPs that have had events that should be reported
8559 to the client. Cancel breakpoints when about to reporting the
8560 event to the client, not while stopping lwps. No longer cancel
8561 finished single-steps here.
8562 (cancel_finished_single_step): Delete.
8563 (cancel_finished_single_steps): Delete.
8564
414a389f
PA
85652010-03-24 Pedro Alves <pedro@codesourcery.com>
8566
8567 * mem-break.c (enum bkpt_type): New.
8568 (struct breakpoint): New field `type'.
8569 (set_breakpoint_at): Change return type to struct breakpoint
8570 pointer. Set type to `other_breakpoint' by default.
8571 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8572 in the breakpoint list.
8573 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8574 (reinsert_breakpoint): Rename to ...
8575 (reinsert_raw_breakpoint): ... this.
8576 (reinsert_breakpoints_at): Adjust.
8577 * mem-break.h (struct breakpoint): Declare.
8578 (set_breakpoint_at): Change return type to struct breakpoint
8579 pointer.
8580
2280c721
PA
85812010-03-24 Pedro Alves <pedro@codesourcery.com>
8582
8583 * server.c (handle_query): Assign, not compare.
8584
d50171e4
PA
85852010-03-24 Pedro Alves <pedro@codesourcery.com>
8586
8587 Teach linux gdbserver to step-over-breakpoints.
8588
8589 * linux-low.c (can_hardware_single_step): New.
8590 (supports_breakpoints): New.
8591 (handle_extended_wait): If stopping threads, read the stop pc of
8592 the new cloned LWP.
8593 (get_pc): New.
8594 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8595 low target doesn't support retrieving the PC.
8596 (add_lwp): Set last_resume_kind to resume_continue.
8597 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8598 (linux_attach): Don't clear stop_expected. Set the lwp's
8599 last_resume_kind to resume_stop.
8600 (linux_detach_one_lwp): Don't check for removed breakpoints.
8601 (check_removed_breakpoint): Delete.
8602 (status_pending_p): Rename to ...
8603 (status_pending_p_callback): ... this. Don't check for removed
8604 breakpoints. Don't consider threads that are stopped from GDB's
8605 perspective.
8606 (linux_wait_for_lwp): Always read the stop_pc here.
8607 (cancel_breakpoint): New.
8608 (step_over_bkpt): New global.
8609 (linux_wait_for_event_1): Implement stepping over breakpoints.
8610 (gdb_wants_lwp_stopped): New.
8611 (gdb_wants_all_stopped): New.
8612 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8613 single-step traps here. Store the thread's last reported target
8614 wait status.
8615 (send_sigstop): Don't clear stop_expected. Always set it,
8616 instead.
8617 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8618 (cancel_finished_single_step): New.
8619 (cancel_finished_single_steps): New.
8620 (wait_for_sigstop): Don't cancel finished single-step traps here.
8621 (linux_resume_one_lwp): Don't check for removed breakpoints.
8622 Don't set `step' on non-hardware step archs.
8623 (linux_set_resume_request): Ignore resume_stop requests if already
8624 stopping or stopped. Set the lwp's last_resume_kind.
8625 (resume_status_pending_p): Don't check for removed breakpoints.
8626 (need_step_over_p): New.
8627 (start_step_over): New.
8628 (finish_step_over): New.
8629 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8630 requests. Clear the thread's last reported target waitstatus.
8631 Don't use the `suspended' flag. Don't consider pending breakpoints.
8632 (linux_resume): Start a step-over if necessary.
8633 (proceed_one_lwp): New.
8634 (proceed_all_lwps): New.
8635 (unstop_all_lwps): New.
8636 * linux-low.h (struct lwp_info): Rewrite comment for the
8637 `suspended' flag. Add the `stop_pc' field. Delete the
8638 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8639 Add `'last_resume_kind' and `need_step_over' fields.
8640 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8641 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8642 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8643 (set_raw_breakpoint_at): New.
8644 (set_breakpoint_at): Rewrite to use it.
8645 (reinsert_breakpoint_handler): Delete.
8646 (set_reinsert_breakpoint): New.
8647 (reinsert_breakpoint_by_bp): Delete.
8648 (delete_reinsert_breakpoints): New.
8649 (uninsert_breakpoint): Rewrite.
8650 (uninsert_breakpoints_at): New.
8651 (reinsert_breakpoint): Rewrite.
8652 (reinsert_breakpoints_at): New.
8653 (check_breakpoints): Rewrite.
8654 (breakpoint_here): New.
8655 (breakpoint_inserted_here): New.
8656 (check_mem_read): Adjust.
8657 * mem-break.h (breakpoints_supported, breakpoint_here)
8658 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8659 (reinsert_breakpoint_by_bp): Delete declaration.
8660 (delete_reinsert_breakpoints): Declare.
8661 (reinsert_breakpoint): Delete declaration.
8662 (reinsert_breakpoints_at): Declare.
8663 (uninsert_breakpoint): Delete declaration.
8664 (uninsert_breakpoints_at): Declare.
8665 (check_breakpoints): Adjust prototype.
8666 * server.h: Adjust include order.
8667 (struct thread_info): Declare here. Add a `last_status' field.
8668
30ba68cb
MS
86692010-03-23 Michael Snyder <msnyder@vmware.com>
8670
8671 * server.c (crc32): New function.
8672 (handle_query): Add handling for 'qCRC:' request.
8673
b9a881c2
PA
86742010-03-23 Pedro Alves <pedro@codesourcery.com>
8675
8676 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8677 lwp had been stopped by a watchpoint.
8678
e92d13d5
PA
86792010-03-16 Pedro Alves <pedro@codesourcery.com>
8680
8681 * server.h (internal_error): Declare.
8682 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8683 * utils.c (internal_error): New function.
8684
64daa791
AS
86852010-03-15 Andreas Schwab <schwab@redhat.com>
8686
8687 * configure.srv: Fix typo setting srv_regobj.
8688
f52cd8cd
PA
86892010-03-15 Pedro Alves <pedro@codesourcery.com>
8690
8691 * linux-low.c (fetch_register): Avoid passing a non string literal
8692 format to `error'.
8693 (usr_store_inferior_registers): Ditto.
8694
93ae6fdc
PA
86952010-03-14 Pedro Alves <pedro@codesourcery.com>
8696
8697 * linux-low.c (linux_write_memory): Bail out early if peeking
8698 memory failed.
8699
c3adc08c
PA
87002010-03-14 Pedro Alves <pedro@codesourcery.com>
8701
8702 * linux-low.h (struct lwp_info): New fields
8703 `stopped_by_watchpoint' and `stopped_data_address'.
8704 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8705 here, and cache them in the lwp object.
8706 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8707 directly.
8708 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8709 field.
8710 (linux_stopped_by_watchpoint): Rewrite.
8711 (linux_stopped_data_address): Rewrite.
8712
bce522a2
PA
87132010-03-06 Simo Melenius <simo.melenius@iki.fi>
8714
8715 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8716 switching the current inferior, not before.
8717
90884b2b
L
87182010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8719
8720 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8721 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8722 i386-linux.c and amd64-linux.c.
8723 (reg-i386.o): Removed.
8724 (reg-i386.c): Likewise.
8725 (reg-i386-linux.o): Likewise.
8726 (reg-i386-linux.c): Likewise.
8727 (reg-x86-64.o): Likewise.
8728 (reg-x86-64.c): Likewise.
8729 (reg-x86-64-linux.o): Likewise.
8730 (reg-x86-64-linux.c): Likewise.
8731 (i386.o): New.
8732 (i386.c): Likewise.
8733 (i386-linux.o): Likewise.
8734 (i386-linux.c): Likewise.
8735 (amd64.o): Likewise.
8736 (amd64.c): Likewise.
8737 (amd64-linux.o): Likewise.
8738 (amd64-linux.c): Likewise.
8739
8740 * configure.srv (srv_i386_regobj): New.
8741 (srv_i386_linux_regobj): Likewise.
8742 (srv_amd64_regobj): Likewise.
8743 (srv_amd64_linux_regobj): Likewise.
8744 (srv_i386_32bit_xmlfiles): Likewise.
8745 (srv_i386_64bit_xmlfiles): Likewise.
8746 (srv_i386_xmlfiles): Likewise.
8747 (srv_amd64_xmlfiles): Likewise.
8748 (srv_i386_linux_xmlfiles): Likewise.
8749 (srv_amd64_linux_xmlfiles): Likewise.
8750 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8751 srv_xmlfiles to $srv_i386_xmlfiles.
8752 (i[34567]86-*-mingw32ce*): Likewise.
8753 (i[34567]86-*-mingw*): Likewise.
8754 (i[34567]86-*-nto*): Likewise.
8755 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8756 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8757 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8758 (x86_64-*-linux*): Likewise.
8759
8760 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8761 (init_registers_amd64_linux): New.
8762 (x86_arch_setup): Replace init_registers_x86_64_linux with
8763 init_registers_amd64_linux.
8764
193f13e6
MK
87652010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8766
8767 * configure.ac: Check for libdl. If it is not available link against
8768 static libthread_db.
8769 * configure: Regenerate.
8770
85d721b8
PA
87712010-02-22 Pedro Alves <pedro@codesourcery.com>
8772
8773 PR9605
8774
8775 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8776 handing a read watchpoint.
8777 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8778
6076632b
DE
87792010-02-12 Doug Evans <dje@google.com>
8780
8781 * linux-low.c (linux_supports_tracefork_flag): Document.
8782 (linux_look_up_symbols): Add comment.
8783
3327ccf7
L
87842010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8785
8786 * regcache.c (supply_register): Clear regcache if buf is NULL.
8787
0718675c 87882010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 8789 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
8790
8791 * inferiors.c (find_inferior): Add function documentation.
8792 (unloaded_dll): Handle the case where the unloaded dll has not
8793 been previously registered in the dll list.
8794
177321bd
DJ
87952010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8796
8797 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8798 (thumb2_breakpoint): New.
8799 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8800
2b009048
DJ
88012010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8802
8803 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8804 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8805 breakpoints.
8806
3be029c7
PA
88072010-01-21 Pedro Alves <pedro@codesourcery.com>
8808
8809 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8810
18f5de3b
JK
88112010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8812
8813 * linux-s390-low.c (s390_collect_ptrace_register)
8814 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8815
3743bb4f
DE
88162010-01-21 Doug Evans <dje@google.com>
8817
14ce3065
DE
8818 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8819 (PTRACE_ARG4_TYPE): New macro.
8820 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8821 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8822 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8823 (usr_store_inferior_registers): Ditto.
8824 (linux_read_memory, linux_write_memory): Ditto.
8825 (linux_test_for_tracefork): Ditto.
8826
3743bb4f
DE
8827 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8828 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8829
8b315be5
PA
88302010-01-21 Pedro Alves <pedro@codesourcery.com>
8831
8832 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8833 target.
8834
85492558
PA
88352010-01-21 Pedro Alves <pedro@codesourcery.com>
8836
8837 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8838 prototype to take a regcache. Adjust.
8839
442ea881
PA
88402010-01-20 Pedro Alves <pedro@codesourcery.com>
8841
8842 * regcache.h (struct thread_info): Forward declare.
8843 (struct regcache): New.
8844 (new_register_cache): Adjust prototype.
8845 (get_thread_regcache): Declare.
8846 (free_register_cache): Adjust prototype.
8847 (registers_to_string, registers_from_string): Ditto.
8848 (supply_register, supply_register_by_name, collect_register)
8849 (collect_register_as_string, collect_register_by_name): Ditto.
8850 * regcache.c (struct inferior_regcache_data): Delete.
8851 (get_regcache): Rename to ...
8852 (get_thread_regcache): ... this. Adjust. Switch inferior before
8853 fetching registers.
8854 (regcache_invalidate_one): Adjust.
8855 (regcache_invalidate): Fix prototype.
8856 (new_register_cache): Return the new register cache.
8857 (free_register_cache): Change prototype.
8858 (realloc_register_cache): Adjust.
8859 (registers_to_string): Change prototype to take a regcache. Adjust.
8860 (registers_from_string): Ditto.
8861 (register_data): Ditto.
8862 (supply_register): Ditto.
8863 (supply_register_by_name): Ditto.
8864 (collect_register): Ditto.
8865 (collect_register_as_string): Ditto.
8866 (collect_register_by_name): Ditto.
8867 * server.c (process_serial_event): Adjust.
8868 * linux-low.h (regset_fill_func, regset_store_func): Change
8869 prototype.
8870 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8871 Change prototype.
8872 * linux-low.c (get_stop_pc): Adjust.
8873 (check_removed_breakpoint): Adjust.
8874 (linux_wait_for_event): Adjust.
8875 (linux_resume_one_lwp): Adjust.
8876 (fetch_register): Add regcache parameter. Adjust.
8877 (usr_store_inferior_registers): Ditto.
8878 (regsets_fetch_inferior_registers): Ditto.
8879 (regsets_store_inferior_registers): Ditto.
8880 (linux_fetch_registers, linux_store_registers): Ditto.
8881 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8882 regcache. Adjust.
43aaf8b6
PA
8883 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8884 Ditto.
442ea881
PA
8885 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8886 prototype to take a regcache.
8887 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8888 * remote-utils.c (convert_ascii_to_int, outreg)
8889 (prepare_resume_reply): Change prototype to take a regcache.
8890 Adjust.
8891 * target.h (struct target_ops) <fetch_registers, store_registers>:
8892 Change prototype to take a regcache.
8893 (fetch_inferior_registers, store_inferior_registers): Change
8894 prototype to take a regcache. Adjust.
8895 * proc-service.c (ps_lgetregs): Adjust.
8896 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8897 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8898 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8899 take a regcache. Adjust.
8900 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8901 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8902 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8903 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8904 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8905 (cris_cannot_fetch_register):
8906 (cris_breakpoint_at): Change prototype to take a regcache.
8907 Adjust.
8908 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8909 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8910 to take a regcache. Adjust.
8911 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8912 Adjust.
8913 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8914 take a regcache. Adjust.
8915 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8916 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8917 (m68k_set_pc): Change prototype to take a regcache. Adjust.
8918 * linux-mips-low.c (mips_get_pc):
8919 (mips_set_pc): Change prototype to take a regcache. Adjust.
8920 (mips_reinsert_addr): Adjust.
8921 (mips_collect_register): Change prototype to take a regcache.
8922 Adjust.
8923 (mips_supply_register):
8924 (mips_collect_register_32bit, mips_supply_register_32bit)
8925 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8926 (mips_store_fpregset): Ditto.
43aaf8b6
PA
8927 * linux-ppc-low.c (ppc_supply_ptrace_register)
8928 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
8929 (parse_spufs_run): Adjust.
8930 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8931 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8932 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8933 take a regcache. Adjust.
8934 * linux-s390-low.c (s390_collect_ptrace_register)
8935 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8936 (s390_set_pc): Change prototype to take a regcache. Adjust.
8937 (s390_arch_setup): Adjust.
8938 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8939 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
8940 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8941 (sparc_fill_gregset, sparc_store_gregset_from_stack)
8942 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8943 regcache. Adjust.
8944 (sparc_breakpoint_at): Adjust.
8945 * linux-xtensa-low.c (xtensa_fill_gregset):
8946 (xtensa_store_gregset):
8947 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
8948 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
8949 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
8950 prototype to take a regcache. Adjust.
8951 * win32-arm-low.c (arm_fetch_inferior_register)
8952 (arm_store_inferior_register): Change prototype to take a
8953 regcache. Adjust.
8954 * win32-i386-low.c (i386_fetch_inferior_register)
8955 (i386_store_inferior_register): Change prototype to take a
8956 regcache. Adjust.
8957 * win32-low.c (child_fetch_inferior_registers)
8958 (child_store_inferior_registers): Change prototype to take a
8959 regcache. Adjust.
8960 (win32_wait): Adjust.
8961 (win32_fetch_inferior_registers): Change prototype to take a
8962 regcache. Adjust.
8963 (win32_store_inferior_registers): Adjust.
8964 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
8965 store_inferior_register>: Change prototype to take a regcache.
8966
60c3d7b0
DE
89672010-01-20 Doug Evans <dje@google.com>
8968
8969 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
8970 #ifdef.
8971 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 8972 (W_STOPCODE): Provide definition if missing.
60c3d7b0 8973
dc146f7c
VP
89742010-01-13 Vladimir Prus <vladimir@codesourcery.com>
8975
8976 * linux-low.c (linux_core_of_thread): New.
8977 (compare_ints, show_process, list_threads): New.
8978 (linux_qxfer_osdata): Report threads and cores.
8979 (linux_target_op): Register linux_core_of_thread.
8980 * remote-utils.c (prepare_resume_reply): Report the core.
8981 (buffer_xml_printf): Support %d specifier.
8982 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
8983 New.
8984 (handle_query): Handle qXfer:threads. Announce availability
8985 thereof.
8986 * target.h (struct target_ops): New field core_of_thread.
8987
7803799a
UW
89882010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
8989
8990 * Makefile.in (clean): Remove new generated files.
8991 (reg-s390.o, reg-s390.c): Remove rules.
8992 (reg-s390x.o, reg-s390x.c): Likewise.
8993 (s390-linux32.o, s390-linux32.c): Add rules.
8994 (s390-linux64.o, s390-linux64.c): Likewise.
8995 (s390x-linux64.o, s390x-linux64.c): Likewise.
8996 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
8997 * linux-s390-low.c: Include <elf.h>.
8998 (HWCAP_S390_HIGH_GPRS): Define if undefined.
8999 (init_registers_s390): Remove prototype.
9000 (init_registers_s390x): Likewise.
9001 (init_registers_s390_linux32): Add prototype.
9002 (init_registers_s390_linux64): Likewise.
9003 (init_registers_s390x_linux64): Likewise.
9004 (s390_num_regs_3264): New define.
9005 (s390_regmap_3264): New global variable.
9006 (s390_cannot_fetch_register): Remove obsolete check.
9007 (s390_cannot_store_register): Likewise.
9008 (s390_collect_ptrace_register): Handle upper/lower register halves.
9009 (s390_supply_ptrace_register): Likewise.
9010 (s390_fill_gregset): Update to register number changes.
9011 (s390_get_hwcap): New routine.
9012 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9013 Install appropriate regmap and register set.
9014
6e7ffa39
JB
90152010-01-01 Joel Brobecker <brobecker@adacore.com>
9016
9017 * server.c (gdbserver_version): Update copyright year to 2010.
9018 * gdbreplay.c (gdbreplay_version): Likewise.
9019
957f3f49
DE
90202009-12-28 Doug Evans <dje@google.com>
9021
9022 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9023 elf/external.h. Include <elf.h> instead but only if necessary.
9024
ca5c370d
PA
90252009-12-28 Pedro Alves <pedro@codesourcery.com>
9026
9027 * linux-low.c (linux_remove_process): Remove `detaching'
9028 parameter. Don't release/detach from thread_db here.
9029 (linux_kill): Release/detach from thread_db here, ...
9030 (linux_detach): ... and here, before actually detaching.
9031 (linux_wait_1): ... and here, when a process exits.
9032 * thread-db.c (any_thread_of): New.
9033 (thread_db_free): Switch the current inferior to a thread of the
9034 passed in process.
9035
4ee62156
DE
90362009-12-21 Doug Evans <dje@google.com>
9037
d90e6a88
DE
9038 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9039
c5f62d5f
DE
9040 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9041 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9042 warning ifndef __NR_tkill. Move setting of errno there too.
9043 Delete unnecessary resetting of errno after syscall.
9044 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9045
10e86dd7
DE
9046 * configure.ac: Check for dladdr.
9047 * config.in: Regenerate.
9048 * configure: Regenerate.
9049 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9050 (try_thread_db_load): Update.
9051
4ee62156
DE
9052 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9053
00f515da
DE
90542009-12-18 Doug Evans <dje@google.com>
9055
e9464885
DE
9056 * event-loop.c: Include unistd.h if it exists.
9057
07d4f67e
DE
9058 * linux-low.c (my_waitpid): Move definition away from being in
9059 between linux_tracefork_child/linux_test_for_tracefork.
9060
00f515da
DE
9061 * gdb_proc_service.h (psaddr_t): Fix type.
9062 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9063 signature to match glibc.
9064
1de1badb
DE
90652009-12-16 Doug Evans <dje@google.com>
9066
9067 * linux-low.c (linux_read_memory): Fix argument to read.
9068
aeeb81d1
PA
90692009-11-26 Pedro Alves <pedro@codesourcery.com>
9070
9071 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9072 events, don't leave current_inferior pointing at null.
9073
10357975
PA
90742009-11-26 Pedro Alves <pedro@codesourcery.com>
9075
9076 * win32-low.c (LOG): Delete.
9077 (OUTMSG): Output to stderr.
9078 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9079 on compile time LOG macro.
9080 (win32_wait): Fix debug output.
9081
cf6e3471
PA
90822009-11-26 Pedro Alves <pedro@codesourcery.com>
9083
9084 * win32-low.c (win32_add_one_solib): If the dll name is
9085 "ntdll.dll", prepend the system directory to the dll path.
9086
0c85e18e
MK
90872009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9088
9089 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9090
9ac544ce 90912009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 9092 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
9093
9094 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9095 * configure.ac: Check for __mcoldfire__ and set
9096 gdb_cv_m68k_is_coldfire.
9097 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9098 reg-cf.o and reg-m68k.o.
9099 * configure: Regenerated.
9100
fd7dd3e6
PA
91012009-11-16 Pedro Alves <pedro@codesourcery.com>
9102
9103 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9104 Pass it to thread_db_free.
9105 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9106 proper `detaching' argument to linux_remove_process.
9107 * linux-low.h (thread_db_free): Add `detaching' parameter.
9108 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9109 to thread_db_free.
9110 (thread_db_free): Add `detaching' parameter. Only
9111 call td_ta_clear_event if detaching from process.
9112
75aa492e
MK
91132009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9114
9115 * thread-db.c (thread_db_free): Fix typo.
9116
21e1bee4
PP
91172009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9118
9119 PR gdb/10838
9120 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9121
8838b45e
NS
91222009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9123
9124 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9125 with an i686 compiler.
9126 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9127 needed.
9128 * configure: Rebuilt.
9129
8a35fb51
SL
91302009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9131
9132 PR gdb/10783
9133
9134 * server.c (handle_search_memory_1): Correct read_addr initialization
9135 in loop for searching subsequent chunks.
9136
96f15937
PP
91372009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9138
9139 * configure.ac: New --with-libthread-db option.
9140 * thread-db.c: Allow direct dependence on libthread_db.
9141 (thread_db_free): Adjust.
9142 * config.in: Regenerate.
9143 * configure: Likewise.
889bf7c5 9144
5f7d1694
PP
91452009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9146
9147 PR gdb/10757
9148 * thread-db.c (attach_thread): New function.
9149 (maybe_attach_thread): Return success/failure.
9150 (find_new_threads_callback): Adjust.
889bf7c5
PA
9151 (thread_db_find_new_threads): Loop until no new threads.
9152
88e3b899
PA
91532009-10-13 Pedro Alves <pedro@codesourcery.com>
9154
9155 * proc-service.c (ps_lgetregs): Formatting.
9156
cdbfd419
PP
91572009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9158
9159 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9160 * configure.ac: Adjust.
9161 * linux-low.h (struct process_info_private): Move members to struct
9162 thread_db.
9163 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9164 * linux-low.c (linux_remove_process): Adjust.
9165 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9166 * server.c (handle_query): Move code ...
9167 (handle_monitor_command): ... here. New function.
9168 * target.h (struct target_ops): New member.
9169 * thread-db.c (struct thread_db): New.
9170 (libthread_db_search_path): New variable.
9171 (thread_db_create_event, thread_db_enable_reporting)
9172 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9173 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9174 (try_thread_db_load_1, dladdr_to_soname): New functions.
9175 (try_thread_db_load, thread_db_load_search): New functions.
9176 (thread_db_init): Search for libthread_db.
9177 (thread_db_free): New function.
9178 (thread_db_handle_monitor_command): Likewise.
9179 * config.in: Regenerate.
9180 * configure: Regenerate.
889bf7c5 9181
4168d2d6
UW
91822009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9183
9184 * spu-low.c (spu_kill): Wait for inferior to terminate.
9185 Call clear_inferiors.
9186 (spu_detach): Call clear_inferiors.
9187
81ecdfbb
RW
91882009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9189
9190 * aclocal.m4: Regenerate.
9191 * config.in: Likewise.
9192 * configure: Likewise.
9193
0b9ff2c0
UW
91942009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9195
9196 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9197 (parse_spufs_run): New function.
9198 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9199 (ppc_breakpoint_at): Handle SPU breakpoints.
9200
efcbbd14
UW
92012009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9202
9203 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9204 (SPUFS_MAGIC): Define.
9205 (spu_enumerate_spu_ids): New function.
9206 (linux_qxfer_spu): New function.
9207 (linux_target_ops): Install linux_qxfer_spu.
9208
f4d9bade
UW
92092009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9210
9211 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9212 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9213 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9214 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9215 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9216 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9217 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9218 (init_registers_powerpc_cell32l): Add prototype.
9219 (init_registers_powerpc_cell64l): Likewise.
9220 (ppc_arch_setup): Detect Cell/B.E. architecture.
9221
96e946ca
RW
92222009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9223
9224 * Makefile.in (datarootdir): New variable.
9225
58d6951d
DJ
92262009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9227
9228 * linux-low.c (linux_write_memory): Update debugging output.
9229 * Makefile.in (clean): Add new descriptions.
9230 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9231 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9232 * configure.srv: Add new files for arm*-*-linux*.
9233 * linux-arm-low.c: Add new declarations.
9234 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9235 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9236 (HWCAP_VFPv3D16): New.
9237 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9238 instead of __IWMMXT__.
9239 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9240 (arm_arch_setup): New.
9241 (target_regsets): Remove #ifdef. Add VFP regset.
9242 (the_low_target): Use arm_arch_setup.
9243
12b42a12
DJ
92442009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9245
9246 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9247 the main thread again.
9248
ac8c974e
AR
92492009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9250
9251 Adding Neutrino gdbserver.
9252 * configure: Regenerated.
9253 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9254 * configure.srv (i[34567]86-*-nto*): New target.
9255 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9256 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9257 (nto_comctrl) [__QNX__]: New function.
9258 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9259
4424e0c3 92602009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
9261
9262 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9263 srv_tgtobj.
9264
912cf4ba
PA
92652009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9266 Pedro Alves <pedro@codesourcery.com>
9267
9268 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9269 don't support CONTEXT_EXTENDED_REGISTERS.
9270 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9271 (the_low_target): Install them.
9272 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9273 failing with ERROR_PIPE_NOT_CONNECTED.
9274
aa5ca48f
DE
92752009-06-30 Doug Evans <dje@google.com>
9276 Pierre Muller <muller@ics.u-strasbg.fr>
9277
9278 Add h/w watchpoint support to x86-linux, win32-i386.
9279 * Makefile.in (SFILES): Add i386-low.c
9280 (i386_low_h): Define.
9281 (i386-low.o): Add dependencies.
9282 (linux-x86-low.o): Add i386-low.h dependency.
9283 (win32-i386-low.o): Ditto.
9284 * i386-low.c: New file.
9285 * i386-low.h: New file.
9286 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9287 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9288 * linux-low.c (linux_add_process): Initialize arch_private.
9289 (linux_remove_process): Free arch_private.
9290 (add_lwp): Initialize arch_private.
9291 (delete_lwp): Free arch_private.
9292 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9293 provided.
9294 * linux-low.h (process_info_private): New member arch_private.
9295 (lwp_info): New member arch_private.
9296 (linux_target_ops): New members new_process, new_thread,
9297 prepare_to_resume.
9298 (ptid_of): New macro.
9299 * linux-x86-low.c: Include stddef.h, i386-low.h.
9300 (arch_process_info): New struct.
9301 (arch_lwp_info): New struct.
9302 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9303 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9304 (i386_dr_low_get_status): New function.
9305 (x86_insert_point, x86_remove_point): New functions.
9306 (x86_stopped_by_watchpoint): New function.
9307 (x86_stopped_data_address): New function.
9308 (x86_linux_new_process, x86_linux_new_thread): New functions.
9309 (x86_linux_prepare_to_resume): New function.
9310 (the_low_target): Add entries for insert_point, remove_point,
9311 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9312 prepare_to_resume.
9313 * server.c (debug_hw_points): New global.
9314 (monitor_show_help): Document set debug-hw-points.
9315 (handle_query): Process "set debug-hw-points".
9316 * server.h (debug_hw_points): Declare.
9317 (paddress): Declare.
9318 * utils.c (NUMCELLS, CELLSIZE): New macros.
9319 (get_sell, xsnprintf, paddress): New functions.
9320 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9321 remove_point, stopped_by_watchpoint, stopped_data_address.
9322 * win32-i386-low.c: Include i386-low.h.
9323 (debug_reg_state): Replaces dr.
9324 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9325 (i386_dr_low_get_status): New function.
9326 (i386_insert_point, i386_remove_point): New functions.
9327 (i386_stopped_by_watchpoint): New function.
9328 (i386_stopped_data_address): New function.
9329 (i386_initial_stuff): Update.
9330 (get_thread_context,set_thread_context,i386_thread_added): Update.
9331 (the_low_target): Add entries for insert_point,
9332 remove_point, stopped_by_watchpoint, stopped_data_address.
9333 * win32-low.c (win32_insert_watchpoint): New function.
9334 (win32_remove_watchpoint): New function.
9335 (win32_stopped_by_watchpoint): New function.
9336 (win32_stopped_data_address): New function.
9337 (win32_target_ops): Add entries for insert_watchpoint,
9338 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9339 * win32-low.h (win32_target_ops): New members insert_point,
9340 remove_point, stopped_by_watchpoint, stopped_data_address.
9341
d993e290
PA
93422009-06-25 Pedro Alves <pedro@codesourcery.com>
9343
9344 * server.c (process_serial_event): Re-return unsupported, not
9345 error, if the type isn't recognized. Re-allow supporting only
9346 insert or remove packets. Also call require_running for
9347 breakpoints. Add missing break statement to default case. Tidy.
9348 * target.h (struct target_ops): Rename insert_watchpoint to
9349 insert_point, and remove_watchpoint to remove_point.
9350
9351 * linux-low.h (struct linux_target_ops): Likewise.
9352 * linux-low.c (linux_insert_watchpoint): Rename to ...
9353 (linux_insert_point): ... this. Adjust.
9354 (linux_remove_watchpoint): Rename to ...
9355 (linux_remove_point): ... this. Adjust.
9356 (linux_target_ops): Adjust.
9357 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9358 (cris_insert_point): ... this.
9359 (cris_remove_watchpoint): Rename to ...
9360 (cris_remove_point): ... this.
9361 (the_low_target): Adjust.
9362
0f54c268
PM
93632009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9364
9365 * server.c (handle_v_kill): Pass signal_pid to
9366 kill_inferior if multi_process is zero.
9367
c6314022
AR
93682009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9369
9370 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9371 * target.h (target_ops): Comment for *_watchpoint to make it clear
9372 the functions can get types '0' and '1'.
9373
4463ce24
AR
93742009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9375
9376 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9377 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9378 * regcache.c (get_regcache): Likewise.
9379 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9380 * win32-low.c (child_fetch_inferior_registers): Remove check for
9381 regno 0.
9382
cf8fd78b
PA
93832009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9384 Pedro Alves <pedro@codesourcery.com>
9385
9386 * target.h (struct target_ops) <supports_multi_process>: New
9387 callback.
9388 (target_supports_multi_process): New.
9389 * server.c (handle_query): Even if GDB reports support, only
9390 enable multi-process if the target also supports it. Report
9391 multi-process support only if the target backend supports it.
9392 * linux-low.c (linux_supports_multi_process): New function.
9393 (linux_target_ops): Install it as target_supports_multi_process
9394 callback.
9395
47c0c975
DE
93962009-05-24 Doug Evans <dje@google.com>
9397
e09875d4
DE
9398 Global renaming of find_thread_pid to find_thread_ptid.
9399 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9400 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9401 All callers updated.
9402
e27d73f6
DE
9403 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9404 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9405 directly.
9406
47c0c975
DE
9407 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9408 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9409 (linux_resume_one_lwp): Ditto.
9410
2acc282a
DE
94112009-05-23 Doug Evans <dje@google.com>
9412
9413 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9414 from struct inferior_list_entry * to struct lwp_info *.
9415 All callers updated.
9416
9f1036c1
DE
94172009-05-13 Doug Evans <dje@google.com>
9418
9419 * linux-x86-low.c: Don't include assert.h.
9420 (x86_siginfo_fixup): Use fatal, not assert.
9421 (x86_arch_setup): Fix comment.
9422
d0722149
DE
94232009-05-12 Doug Evans <dje@google.com>
9424
9425 Biarch support for i386/amd64 gdbserver.
9426 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9427 Add linux-x86-low.c.
9428 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9429 (linux-x86-low.o): Add.
9430 * linux-x86-64-low.c: Delete.
9431 * linux-i386-low.c: Delete.
9432 * linux-x86-low.c: New file.
9433 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9434 linux-x86-low.o.
9435 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9436 linux-x86-low.o.
9437 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9438 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9439 (linux_child_pid_to_exec_file): New function.
9440 (elf_64_header_p, elf_64_file_p): New functions.
9441 (siginfo_fixup): New function.
9442 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9443 give target a chance to convert layout.
9444 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9445 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9446
fdeb2a12
DE
94472009-05-07 Doug Evans <dje@google.com>
9448
9449 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9450 (regsets_store_inferior_registers): Ditto.
9451
a6dbe5df
PA
94522009-05-06 Pedro Alves <pedro@codesourcery.com>
9453
9454 PR server/10048
9455
9456 * linux-low.c (must_set_ptrace_flags): Delete.
9457 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9458 of the global.
9459 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9460 `lwp->must_set_ptrace_flags' instead.
ba42693b 9461 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
9462 (linux_wait_1): ... not here.
9463
5091eb23
DE
94642009-04-30 Doug Evans <dje@google.com>
9465
9f767825
DE
9466 * inferiors.c (started_inferior_callback): New function.
9467 (attached_inferior_callback): New function.
9468 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9469 * server.c (print_started_pid, print_attached_pid): New functions.
9470 (detach_or_kill_for_exit): New function.
9471 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9472 * server.h (have_started_inferiors_p): Declare.
9473 (have_attached_inferiors_p): Declare.
9474
5091eb23
DE
9475 * inferiors.c (remove_process): Fix memory leak, free process.
9476 * linux-low.c (linux_remove_process): New function.
9477 (linux_kill): Call it instead of remove_process.
9478 (linux_detach, linux_wait_1): Ditto.
9479
155c8968
PA
94802009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9481
9482 * configure.srv: Add x86 Windows CE target.
9483
7fe519cb
UW
94842009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9485
9486 * inferiors.c (get_thread_process): Make global.
9487 * server.h (get_thread_process): Add prototype.
9488 * thread-db.c (find_one_thread): Use get_thread_process
9489 instead of current_process.
9490 (thread_db_get_tls_address): Do not crash if called when
9491 thread layer is not yet initialized.
9492
5472f405
UW
94932009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9494
9495 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9496 * spu-low.c (current_tid): Rename to ...
9497 (current_ptid): ... this.
9498 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9499 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9500 ptid_get_lwp (current_ptid) instead of current_tid.
9501 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9502 instead of current_tid. Use find_process_pid to verify pid
9503 argument is valid. Pass proper argument to remove_process.
9504 (spu_thread_alive): Compare current_ptid instead of current_tid.
9505 (spu_resume): Likewise.
9506
55ac2b99
PA
95072009-04-02 Pedro Alves <pedro@codesourcery.com>
9508
9509 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9510 variable.
9511
95954743
PA
95122009-04-01 Pedro Alves <pedro@codesourcery.com>
9513
9514 Implement the multiprocess extensions, and add linux multiprocess
9515 support.
9516
9517 * server.h (ULONGEST): Declare.
9518 (struct ptid, ptid_t): New.
9519 (minus_one_ptid, null_ptid): Declare.
9520 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9521 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9522 (struct inferior_list_entry): Change `id' type from unsigned from
9523 to ptid_t.
9524 (struct sym_cache, struct breakpoint, struct
9525 process_info_private): Forward declare.
9526 (struct process_info): Declare.
9527 (current_process): Declare.
9528 (all_processes): Declare.
9529 (initialize_inferiors): Declare.
9530 (add_thread): Adjust to use ptid_t.
9531 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9532 (add_process, remove_process, find_thread_pid): Declare.
9533 (find_inferior_id): Adjust to use ptid_t.
9534 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9535 (multi_process): Declare.
9536 (push_event): Adjust to use ptid_t.
9537 (read_ptid, write_ptid): Declare.
9538 (prepare_resume_reply): Adjust to use ptid_t.
9539 (clear_symbol_cache): Declare.
9540 * inferiors.c (all_processes): New.
9541 (null_ptid, minus_one_ptid): New.
9542 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9543 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9544 (add_thread): Change unsigned long to ptid. Remove gdb_id
9545 parameter. Adjust.
9546 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9547 (gdb_id_to_thread): Rename to ...
9548 (find_thread_pid): ... this. Change unsigned long to ptid.
9549 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9550 (loaded_dll, pull_pid_from_list): Adjust.
9551 (add_process, remove_process, find_process_pid)
9552 (get_thread_process, current_process, initialize_inferiors): New.
9553 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9554 (struct target_waitstatus) <related_pid>: Ditto.
9555 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9556 return type to int.
9557 (struct target_ops) <join>: Add `pid' argument.
9558 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9559 (struct target_ops) <wait>: Add `ptid' field. Change return type
9560 to ptid.
9561 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9562 (mywait): Add `ptid' argument. Change return type to ptid_t.
9563 (target_pid_to_str): Declare.
9564 * target.c (set_desired_inferior): Adjust to use ptids.
9565 (mywait): Add new `ptid' argument. Adjust.
9566 (target_pid_to_str): New.
9567 * mem-break.h (free_all_breakpoints): Declare.
9568 * mem-break.c (breakpoints): Delelete.
9569 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9570 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9571 to use per-process breakpoint list.
9572 (free_all_breakpoints): New.
9573 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9574 (symbol_cache, all_symbols_looked_up): Delete.
9575 (hexchars): New.
9576 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9577 read_ptid): New.
9578 (prepare_resume_reply): Change ptid argument's type from unsigned
9579 long to ptid_t. Adjust. Implement W;process and X;process.
9580 (free_sym_cache, clear_symbol_cache): New.
9581 (look_up_one_symbol): Adjust to per-process symbol cache. *
9582 * server.c (cont_thread, general_thread, step_thread): Change type
9583 to ptid_t.
9584 (attached): Delete.
9585 (multi_process): New.
9586 (last_ptid): Change type to ptid_t.
9587 (struct vstop_notif) <ptid>: Change type to ptid_t.
9588 (queue_stop_reply, push_event): Change `ptid' argument's type to
9589 ptid_t.
9590 (discard_queued_stop_replies): Add `pid' argument.
9591 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9592 changes. Don't reference the `attached' global.
9593 (attach_inferior): Adjust to mywait interface changes.
9594 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9595 features. Handle and report "multiprocess+". Handle
9596 "qAttached:PID".
9597 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9598 changes.
9599 (handle_v_kill): New.
9600 (handle_v_stopped): Adjust to use target_pid_to_str.
9601 (handle_v_requests): Allow multiple attaches and runs when
9602 multiprocess extensions are in effect. Handle "vKill".
9603 (myresume): Adjust to use ptids.
9604 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9605 (handle_status): Adjust to discard_queued_stop_replies interface
9606 change.
9607 (first_thread_of, kill_inferior_callback)
9608 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9609 (main): Call initialize_inferiors. Adjust to use ptids, killing
9610 and detaching from all inferiors. Handle multiprocess packet
9611 variants.
9612 * linux-low.h: Include gdb_proc_service.h.
9613 (struct process_info_private): New.
9614 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9615 <lwpid_of>: Use ptid_get_lwp.
9616 (get_lwp_thread): Adjust.
9617 (struct lwp_info): Add `dead' member.
9618 (find_lwp_pid): Declare.
9619 * linux-low.c (thread_db_active): Delete.
9620 (new_inferior): Adjust comment.
9621 (inferior_pid): Delete.
9622 (linux_add_process): New.
9623 (handle_extended_wait): Adjust.
9624 (add_lwp): Change unsigned long to ptid.
9625 (linux_create_inferior): Add process to processes table. Adjust
9626 to use ptids. Don't set new_inferior here.
9627 (linux_attach_lwp): Rename to ...
9628 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9629 it. Adjust to use ptids.
9630 (linux_attach_lwp): New.
9631 (linux_attach): Add process to processes table. Don't set
9632 new_inferior here.
9633 (struct counter): New.
9634 (second_thread_of_pid_p, last_thread_of_process_p): New.
9635 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9636 multiple processes.
9637 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9638 processes. Remove process from process table.
9639 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9640 to multiple processes.
9641 (any_thread_of): New.
9642 (linux_detach): Add `pid' argument, and handle it. Remove process
9643 from processes table.
9644 (linux_join): Add `pid' argument. Handle it.
9645 (linux_thread_alive): Change unsighed long argument to ptid_t.
9646 Consider dead lwps as not being alive.
9647 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9648 threads we're not interested in.
9649 (same_lwp, find_lwp_pid): New.
9650 (linux_wait_for_lwp): Change `pid' argument's type from int to
9651 ptid_t. Adjust.
9652 (linux_wait_for_event): Rename to ...
9653 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9654 from int to ptid_t. Adjust.
9655 (linux_wait_for_event): New.
9656 (linux_wait_1): Add `ptid' argument. Change return type to
9657 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9658 that exit from the process table.
9659 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9660 Adjust.
9661 (mark_lwp_dead): New.
9662 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9663 stopping all threads, mark its main lwp as dead.
9664 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9665 ptids.
9666 (fetch_register, usr_store_inferior_registers)
9667 (regsets_fetch_inferior_registers)
9668 (regsets_store_inferior_registers, linux_read_memory)
9669 (linux_write_memory): Inline `inferior_pid'.
9670 (linux_look_up_symbols): Adjust to use per-process
9671 `thread_db_active'.
9672 (linux_request_interrupt): Adjust to use ptids.
9673 (linux_read_auxv): Inline `inferior_pid'.
9674 (initialize_low): Don't reference thread_db_active.
9675 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9676 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9677 (ps_getpid): Return the pid of the current inferior.
9678 * thread-db.c (proc_handle, thread_agent): Delete.
9679 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9680 per-process data.
9681 (find_one_thread): Change argument type to ptid_t. Adjust to
9682 per-process data.
9683 (maybe_attach_thread): Adjust to per-process data and ptids.
9684 (thread_db_find_new_threads): Ditto.
9685 (thread_db_init): Ditto.
9686 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9687 processes table. Adjust to use ptids.
9688 (spu_kill, spu_detach): Adjust interface. Remove process from
9689 processes table.
9690 (spu_join, spu_thread_alive): Adjust interface.
9691 (spu_wait): Adjust interface. Remove process from processes
9692 table. Adjust to use ptids.
9693 * win32-low.c (current_inferior_tid): Delete.
9694 (current_inferior_ptid): New.
9695 (debug_event_ptid): New.
9696 (thread_rec): Take a ptid. Adjust.
9697 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9698 (child_delete_thread): Ditto.
9699 (do_initial_child_stuff): Add `attached' argument. Add process to
9700 processes table.
9701 (child_fetch_inferior_registers, child_store_inferior_registers):
9702 Adjust.
9703 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9704 (win32_attach): Pass 1 to do_initial_child_stuff.
9705 (win32_kill): Adjust interface. Remove process from processes
9706 table.
9707 (win32_detach): Ditto.
9708 (win32_join): Adjust interface.
9709 (win32_thread_alive): Take a ptid.
9710 (win32_resume): Adjust to use ptids.
9711 (get_child_debug_event): Ditto.
9712 (win32_wait): Adjust interface. Remove exiting process from
9713 processes table.
9714
bd99dc85
PA
97152009-04-01 Pedro Alves <pedro@codesourcery.com>
9716
9717 Non-stop mode support.
9718
9719 * server.h (non_stop): Declare.
9720 (gdb_client_data, handler_func): Declare.
9721 (delete_file_handler, add_file_handler, start_event_loop):
9722 Declare.
9723 (handle_serial_event, handle_target_event, push_event)
9724 (putpkt_notif): Declare.
9725 * target.h (enum resume_kind): New.
9726 (struct thread_resume): Replace `step' field by `kind' field.
9727 (TARGET_WNOHANG): Define.
9728 (struct target_ops) <wait>: Add `options' argument.
9729 <supports_non_stop, async, start_non_stop>: New fields.
9730 (target_supports_non_stop, target_async): New.
9731 (start_non_stop): Declare.
9732 (mywait): Add `options' argument.
9733 * target.c (mywait): Add `options' argument. Print child exit
9734 notifications here.
9735 (start_non_stop): New.
9736 * server.c (non_stop, own_buf, mem_buf): New globals.
9737 (struct vstop_notif): New.
9738 (notif_queue): New global.
9739 (queue_stop_reply, push_event, discard_queued_stop_replies)
9740 (send_next_stop_reply): New.
9741 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9742 interface changes.
9743 (attach_inferior): In non-stop mode, don't wait for the target
9744 here.
9745 (handle_general_set): Handle QNonStop.
9746 (handle_query): When handling qC, return the current general
9747 thread, instead of the first thread of the list.
9748 (handle_query): If the backend supports non-stop mode, include
9749 QNonStop+ in the qSupported query response.
9750 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9751 and non-stop mode.
9752 (handle_v_attach, handle_v_run): Handle non-stop mode.
9753 (handle_v_stopped): New.
9754 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9755 (myresume): Adjust to use resume_kind. Handle non-stop.
9756 (queue_stop_reply_callback): New.
9757 (handle_status): Handle non-stop mode.
9758 (main): Clear non_stop flag on reconnection. Use the event-loop.
9759 Refactor serial protocol handling from here ...
9760 (process_serial_event): ... to this new function. When GDB
9761 selects any thread, select one here. In non-stop mode, wait until
9762 GDB acks all pending events before exiting.
9763 (handle_serial_event, handle_target_event): New.
9764 * remote-utils.c (remote_open): Install remote_desc in the event
9765 loop.
9766 (remote_close): Remove remote_desc from the event loop.
9767 (putpkt_binary): Rename to...
9768 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9769 (putpkt_binary): New as wrapper around putpkt_binary_1.
9770 (putpkt_notif): New.
9771 (prepare_resume_reply): In non-stop mode, don't change the
9772 general_thread.
9773 * event-loop.c: New.
9774 * Makefile.in (OBJ): Add event-loop.o.
9775 (event-loop.o): New rule.
9776
9777 * linux-low.h (pid_of): Moved here.
9778 (lwpid_of): New.
9779 (get_lwp_thread): Use lwpid_of.
9780 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9781 * linux-low.c (pid_of): Delete.
9782 (inferior_pid): Use lwpid_of.
9783 (linux_event_pipe): New.
9784 (target_is_async_p): New.
9785 (delete_lwp): New.
9786 (handle_extended_wait): Use lwpid_of.
9787 (add_lwp): Don't set lwpid field.
9788 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9789 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9790 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9791 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9792 first. Adjust to linux_wait_for_event interface changes. Use
9793 lwpid_of.
9794 (linux_detach): Don't delete the main lwp here.
9795 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9796 (status_pending_p): Don't consider explicitly suspended lwps.
9797 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9798 pointer. Add OPTIONS argument. Change return type to int. Use
9799 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9800 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9801 pointer. Add status pointer argument. Return a pid instead of a
9802 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9803 changes. In non-stop mode, don't switch to a random thread.
9804 (linux_wait): Rename to...
9805 (linux_wait_1): ... this. Add target_options argument, and handle
9806 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9807 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9808 clean exit and signal exit code. Don't stop all threads in
9809 non-stop mode. In all-stop mode, only stop all threads when
9810 reporting a stop to GDB. Handle explicit thread stop requests.
9811 (async_file_flush, async_file_mark): New.
9812 (linux_wait): New.
9813 (send_sigstop): Use lwpid_of.
9814 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9815 interface changes. In non-stop mode, don't switch to a random
9816 thread.
9817 (linux_resume_one_lwp): Use lwpid_of.
9818 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9819 (linux_resume_one_thread): ... this. Handle resume_stop. In
9820 non-stop mode, don't look for pending flag in all threads.
9821 (resume_status_pending_p): Don't consider explicitly suspended
9822 threads.
9823 (my_waitpid): Reimplement. Emulate __WALL.
9824 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9825 Use lwpid_of.
9826 (sigchld_handler, linux_supports_non_stop, linux_async)
9827 (linux_start_non_stop): New.
9828 (linux_target_ops): Register linux_supports_non_stop, linux_async
9829 and linux_start_non_stop.
9830 (initialize_low): Install SIGCHLD handler.
9831 * thread-db.c (thread_db_create_event, find_one_thread)
9832 (thread_db_get_tls_address): Use lwpid_of.
9833 * win32-low.c (win32_detach): Adjust to use resume_kind.
9834 (win32_wait): Add `options' argument.
9835 * spu-low.c (spu_resume): Adjust to use resume_kind.
9836 (spu_wait): Add `options' argument.
9837
5b1c542e
PA
98382009-04-01 Pedro Alves <pedro@codesourcery.com>
9839
9840 Decouple target code from remote protocol.
9841
9842 * target.h (enum target_waitkind): New.
9843 (struct target_waitstatus): New.
9844 (struct target_ops) <wait>: Return an unsigned long. Take a
9845 target_waitstatus pointer instead of a char pointer.
9846 (mywait): Likewise.
9847 * target.c (mywait): Change prototype to return an unsigned long.
9848 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9849 * server.h (thread_from_wait, old_thread_from_wait): Delete
9850 declarations.
9851 (prepare_resume_reply): Change prototype to take a
9852 target_waitstatus.
9853 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9854 (last_status, last_ptid): New.
9855 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9856 pid instead of a signal.
9857 (attach_inferior): Remove "status" and "signal" parameters.
9858 Adjust.
9859 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9860 not as an address.
9861 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9862 (handle_v_requests, myresume): Remove "status" and "signal"
9863 parameters. Adjust.
9864 (handle_status): New.
9865 (main): Delete local `status'. Adjust.
9866 * remote-utils.c: Include target.h.
9867 (prepare_resume_reply): Change prototype to take a
9868 target_waitstatus. Adjust.
9869
9870 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9871 interface.
9872 * spu-low.c (spu_wait): Adjust.
9873 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9874 Delete.
9875 (win32_wait): Adjust.
9876
2bd7c093
PA
98772009-04-01 Pedro Alves <pedro@codesourcery.com>
9878
9879 * target.h (struct thread_resume): Delete leave_stopped member.
9880 (struct target_ops): Add a `n' argument to the `resume' callback.
9881 * server.c (start_inferior): Adjust.
9882 (handle_v_cont, myresume): Adjust.
9883 * linux-low.c (check_removed_breakpoint): Adjust to resume
9884 interface change, and to removed leave_stopped field.
9885 (resume_ptr): Delete.
9886 (struct thread_resume_array): New.
9887 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9888 resume interface change.
9889 (linux_continue_one_thread, linux_queue_one_thread)
9890 (resume_status_pending_p): Check if the resume field is NULL
9891 instead of checking the leave_stopped member.
9892 (linux_resume): Adjust to the target resume interface change.
9893 * spu-low.c (spu_resume): Adjust to the target resume interface
9894 change.
9895 * win32-low.c (win32_detach, win32_resume): Ditto.
9896
c35fafde
PA
98972009-04-01 Pedro Alves <pedro@codesourcery.com>
9898
9899 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9900 flag.
9901 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9902 pending.
9903 (linux_continue_one_thread): Only preserve the stepping flag if
9904 there's a pending breakpoint.
9905
0a59d50b
PA
99062009-03-31 Pedro Alves <pedro@codesourcery.com>
9907
9908 * server.c (main): After the inferior having exited, call
9909 remote_close before exiting gdbserver.
9910
f04c6d38
TJB
99112009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9912
9913 Fix size of FPSCR in Power 7 processors.
9914 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9915 (PPC_FEATURE_HAS_DFP): New #define.
9916 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9917 size of the FPSCR.
9918
78e5cee6
PA
99192009-03-23 Pedro Alves <pedro@codesourcery.com>
9920
9921 * server.c (handle_query) Whitespace and formatting.
9922
1b3f6016
PA
99232009-03-22 Pedro Alves <pedro@codesourcery.com>
9924
9925 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9926 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9927 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9928 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9929 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9930 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9931 Makefile.in, configure.ac: Fix whitespace throughout.
9932 * configure: Regenerate.
9933
a07b2135
PA
99342009-03-22 Pedro Alves <pedro@codesourcery.com>
9935
9936 * inferiors.c (find_inferior): Make it safe for the callback
9937 function to delete the currently iterated inferior.
9938
67cc2626
PA
99392009-03-22 Pedro Alves <pedro@codesourcery.com>
9940
9941 * Makefile.in (linuw_low_h): Move higher.
9942 (thread-db.o): Depend on $(linux_low_h).
9943
54a0b537
PA
99442009-03-17 Pedro Alves <pedro@codesourcery.com>
9945
9946 Rename "process" to "lwp" throughout.
9947
9948 * linux-low.c (all_processes): Rename to...
9949 (all_lwps): ... this.
9950 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
9951 (add_process): Rename to ...
9952 (add_lwp): ... this. Adjust.
9953 (linux_create_inferior): Adjust.
9954 (linux_attach_lwp): Adjust.
9955 (linux_attach): Adjust.
9956 (linux_kill_one_process): Rename to ...
9957 (linux_kill_one_lwp): ... this. Adjust.
9958 (linux_kill): Adjust.
9959 (linux_detach_one_process): Rename to ...
9960 (linux_detach_one_lwp): ... this. Adjust.
9961 (linux_detach): Adjust.
9962 (check_removed_breakpoint): Adjust.
9963 (status_pending_p): Adjust.
9964 (linux_wait_for_process): Rename to ...
9965 (linux_wait_for_lwp): ... this. Adjust.
9966 (linux_wait_for_event): Adjust.
9967 (send_sigstop): Adjust.
9968 (wait_for_sigstop): Adjust.
9969 (stop_all_processes): Rename to ...
9970 (stop_all_lwps): ... this.
9971 (linux_resume_one_process): Rename to ...
9972 (linux_resume_one_lwp): ... this. Adjust.
9973 (linux_set_resume_request, linux_continue_one_thread)
9974 (linux_queue_one_thread, resume_status_pending_p)
9975 (usr_store_inferior_registers, regsets_store_inferior_registers)
9976 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9977 Adjust.
9978 * linux-low.h (get_process): Rename to ...
9979 (get_lwp): ... this. Adjust.
9980 (get_thread_process): Rename to ...
9981 (get_thread_lwp): ... this. Adjust.
9982 (get_process_thread): Rename to ...
9983 (get_lwp_thread): ... this. Adjust.
9984 (struct process_info): Rename to ...
9985 (struct lwp_info): ... this.
9986 (all_processes): Rename to ...
9987 (all_lwps): ... this.
9988 * proc-service.c (ps_lgetregs): Adjust.
9989 * thread-db.c (thread_db_create_event, find_one_thread)
9990 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
9991
0b16c5cf
PA
99922009-03-14 Pedro Alves <pedro@codesourcery.com>
9993
9994 * server.c (handle_query): Handle "qAttached".
9995
32de4b9d
NS
99962009-03-13 Nathan Sidwell <nathan@codesourcery.com>
9997
9998 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
9999 GPLv3, update license URL.
10000
2aecd87f
DE
100012009-03-01 Doug Evans <dje@google.com>
10002
93efd302 10003 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
10004 (server_h): Add gdb_signals.h.
10005 (signals.o): Update.
10006 * server.h (target_signal_from_host,target_signal_to_host_p)
10007 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10008
86b1f9c5
PM
100092009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10010
10011 * remote-utils.c (getpkt): Also generate remote-debug
10012 information if noack_mode is set.
10013
4aa995e1
PA
100142009-02-06 Pedro Alves <pedro@codesourcery.com>
10015
10016 * server.c (handle_query): Report qXfer:siginfo:read and
10017 qXfer:siginfo:write as supported and handle them.
10018 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10019 * linux-low.c (linux_xfer_siginfo): New.
10020 (linux_target_ops): Set it.
10021
62709adf
PA
100222009-01-26 Pedro Alves <pedro@codesourcery.com>
10023
10024 * server.c (gdbserver_usage): Mention --remote-debug.
10025 (main): Accept '--remote-debug' switch.
10026
aef93bd7
DE
100272009-01-18 Doug Evans <dje@google.com>
10028
10029 * regcache.c (new_register_cache): No need to check result of xcalloc.
10030 * server.c (handle_search_memory): Back out calls to xmalloc,
10031 result is checked and error is returned to user upon failure.
10032 (handle_query): Ditto. Add more checks for result of malloc.
10033 (handle_v_cont): Check result of malloc, report error back to
10034 user upon failure.
10035 (handle_v_run): Ditto. Call freeargv.
10036 * server.h (freeargv): Declare.
10037 * utils.c (freeargv): New fn.
10038
54363045
DE
100392009-01-15 Doug Evans <dje@google.com>
10040
f626972c
DE
10041 * gdbreplay.c (perror_with_name): Make arg const char *.
10042 * server.h (target_signal_to_name): Make return type const char *.
0842e787 10043 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 10044 * utils.c (perror_with_name): Make arg const char *.
54363045 10045
18aae699
PA
100462009-01-14 Pedro Alves <pedro@codesourcery.com>
10047
10048 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10049 when handling a EXIT_PROCESS_DEBUG_EVENT.
10050
ff703abe
JB
100512009-01-06 Joel Brobecker <brobecker@adacore.com>
10052
10053 * gdbreplay.c (gdbreplay_version): Update copyright year.
10054 * server.c (gdbserver_version): Likewise.
10055
f21cc1a2 100562009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
10057
10058 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 10059 (handle_extended_wait): Improve comment.
0e21c1ec 10060
bca929d3
DE
100612008-12-13 Doug Evans <dje@google.com>
10062
10063 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10064 * server.h (ATTR_MALLOC): New macro.
10065 (xmalloc,xcalloc,xstrdup): Declare.
10066 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10067 * inferiors.c: Ditto.
10068 * linux-low.c: Ditto.
10069 * mem-break.c: Ditto.
10070 * regcache.c: Ditto.
10071 * remote-utils.c: Ditto.
10072 * server.c: Ditto.
10073 * target.c: Ditto.
10074 * win32-low.c: Ditto.
10075
97438e3f
DE
100762008-12-12 Doug Evans <dje@google.com>
10077
896c7fbb
DE
10078 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10079 in debugging printf.
10080
97438e3f
DE
10081 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10082
e3b886f8
DE
100832008-12-09 Doug Evans <dje@google.com>
10084
10085 * linux-low.h (struct process_info): Delete member tid, unused.
10086 * thread-db.c (find_one_thread): Update.
10087 (maybe_attach_thread): Update.
10088
07e059b5
VP
100892008-12-02 Pedro Alves <pedro@codesourcery.com>
10090
889bf7c5
PA
10091 * target.h (struct target_ops): Add qxfer_osdata member.
10092 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10093 and dirent.h.
10094 (linux_qxfer_osdata): New functions.
10095 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10096 callback.
10097 * server.c (handle_query): Handle "qXfer:osdata:read:".
10098 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10099 (buffer_xml_printf): New functions.
10100 * server.h (struct buffer): New.
10101 (buffer_grow_str, buffer_grow_str0): New macros.
10102 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10103 (buffer_xml_printf): Declare.
07e059b5 10104
4cab47ab
DE
101052008-11-24 Doug Evans <dje@google.com>
10106
10107 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10108
f142445f
DJ
101092008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10110
10111 * server.c (handle_v_run): Always use the supplied argument list.
10112
d0107bb6 101132008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 10114
d0107bb6
BW
10115 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10116 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 10117
2c4ad781
TJB
101182008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10119
10120 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10121 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10122 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10123 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10124 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10125 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10126 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10127 XML target descriptions.
10128 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10129 when inferior is running on an ISA 2.05 or later processor. Add
10130 special case to return offset for full 64-bit slot of FPSCR when
10131 in 32-bits.
10132
dfb64f85
DJ
101332008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10134
10135 * Makefile.in (SFILES, clean): Added sparc64 files.
10136 (reg-sparc64.o, reg-sparc64.c): New.
10137 * configure.srv (sparc*-*-linux*): New configuration.
10138 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10139 syscall arguments for SPARC.
10140 (regsets_store_inferior_registers): Likewise.
10141 * linux-sparc-low.c: New file.
10142
66b6e1dd
DE
101432008-10-21 Doug Evans <dje@google.com>
10144
10145 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10146 (READLINE_DIR,READLINE_DEP): Delete.
10147 (INTERNAL_CFLAGS): Update.
10148 (LINTFLAGS): Update.
10149
9b710a42
PA
101502008-10-10 Pedro Alves <pedro@codesourcery.com>
10151
10152 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10153 whole argv from the last run, not just argv[0].
10154
5822d809
PA
101552008-09-08 Pedro Alves <pedro@codesourcery.com>
10156
10157 * regcache.c (new_register_cache): Return NULL if the register
10158 cache size isn't known yet.
10159 (free_register_cache): Avoid dereferencing a NULL regcache.
10160
74aac56f
DJ
101612008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10162
10163 * configure.srv: Merge MIPS and MIPS64.
10164
400b20f5
MR
101652008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10166
10167 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10168
677c5bb1
LM
101692008-08-18 Luis Machado <luisgpm@br.ibm.com>
10170
10171 * Makefile.in: Add required vsx dependencies.
10172
10173 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10174 Declare init_registers_powerpc_vsx32l.
10175 Declare init_registers_powerpc_vsx64l.
10176 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10177 (ppc_arch_setup): Check for VSX in hwcap.
10178 (ppc_fill_vsxregset): New function.
10179 (ppc_store_vsxregset): New function.
10180 Add new VSX entry in regset_info target_regsets.
10181
10182 * configure.srv: Add new VSX dependencies.
10183
a6f3e723
SL
101842008-08-12 Pedro Alves <pedro@codesourcery.com>
10185
10186 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10187 (remote_open): Set or clear transport_is_reliable.
10188 (putpkt_binary): Don't expect acks in noack mode.
10189 (getpkt): Don't send ack/nac in noack mode.
10190 * server.c (handle_general_set): Handle QStartNoAckMode.
10191 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10192 qSupported.
10193 (main): Reset noack_mode on every connection.
10194 * server.h (noack_mode): Declare.
10195
a417dc56
RW
101962008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10197
10198 * Makefile.in (GDBREPLAY_OBS): New variable.
10199 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10200
3221518c
UW
102012008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10202 Daniel Jacobowitz <dan@codesourcery.com>
10203
10204 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10205 (usr_store_inferior_registers): Likewise.
10206 (regsets_store_inferior_registers): Likewise.
10207
ec56be1b
PA
102082008-07-31 Rolf Jansen <rj@surtec.com>
10209 Pedro Alves <pedro@codesourcery.com>
10210
10211 * configure.ac: Check for memmem declaration.
10212 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10213 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10214 (disable_packet_qfThreadInfo): Unconditionally compile.
10215 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10216 * configure, config.in: Regenerate.
10217
2fe5e3ff
DE
102182008-07-28 Doug Kwan <dougkwan@google.com>
10219
10220 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10221 (linux_write_memory): Remove declaration of errno.
10222
836acd6d
UW
102232008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10224
10225 * linux-low.c (handle_extended_wait): Do not use "status"
10226 variable uninitialized.
10227
aeba519e
PA
102282008-07-07 Pedro Alves <pedro@codesourcery.com>
10229
10230 * server.c (handle_v_attach): Inhibit reporting dll changes.
10231
db42f210
PA
102322008-06-27 Pedro Alves <pedro@codesourcery.com>
10233
10234 * remote-utils.c (prepare_resume_reply): If requested, don't
10235 output "thread:TID" in the T stop reply.
10236
10237 * server.c (disable_packet_vCont, disable_packet_Tthread)
10238 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10239 (handle_query): If requested, disable support for qC, qfThreadInfo
10240 and qsThreadInfo.
10241 (handle_v_requests): If requested, disable support for vCont.
10242 (gdbserver_show_disableable): New.
10243 (main): Handle --disable-packet and --disable-packet=LIST.
10244
10245 * server.h (disable_packet_vCont, disable_packet_Tthread)
10246 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10247
8e4c5421
CD
102482008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10249
10250 * server.c (gdbserver_usage): Mention --version.
10251
6e23a804
DJ
102522008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10253
10254 * Makefile.in (gdbreplay.o): New rule.
10255
90aa6a40
JM
102562008-06-06 Joseph Myers <joseph@codesourcery.com>
10257
10258 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10259 message, not gdbserver.
10260
c16158bc 102612008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
10262 Nathan Sidwell <nathan@codesourcery.com>
10263 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
10264
10265 * acinclude.m4: Include ../../config/acx.m4.
10266 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10267 * configure, config.in: Regenerate.
10268 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10269 * server.c (gdbserver_version): Print PKGVERSION.
10270 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10271 (main): Adjust gdbserver_usage calls.
10272 * gdbreplay.c (version, host_name): Add declarations.
10273 (gdbreplay_version, gdbreplay_usage): New.
10274 (main): Accept --version and --help options.
10275
aeb75bf5
DJ
102762008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10277
10278 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10279 (arm_breakpoint_at): Handle Thumb.
10280 (the_low_target): Add comment.
10281
76b233dd
UW
102822008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10283
10284 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10285
08388c79
DE
102862008-05-09 Doug Evans <dje@google.com>
10287
a3c83fae
DE
10288 * server.h (decode_search_memory_packet): Declare.
10289 * remote-utils.c (decode_search_memory_packet): New fn.
10290 * server.c (handle_search_memory_1): New fn.
08388c79
DE
10291 (handle_search_memory): New fn.
10292 (handle_query): Process qSearch:memory packets.
10293
bb9c3d36
UW
102942008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10295
10296 * regcache.c (registers_length): Remove.
10297 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10298 full register packet.
10299 * regcache.h (registers_length): Remove prototype.
10300 * server.h (PBUFSIZ): Define to 16384.
10301
7284e1be
UW
103022008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10303
10304 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10305 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10306 powerpc-64l.o, and powerpc-altivec64l.o.
10307 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10308 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10309 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10310 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10311 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10312 to srv_xmlfiles.
10313
10314 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10315 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10316 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10317 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10318 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10319 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10320 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10321 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10322 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10323 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10324 (clean): Update.
10325
10326 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10327 (init_registers_powerpc_32l): ... this new prototype.
10328 (init_registers_powerpc_32): Remove, replace by ...
10329 (init_registers_powerpc_altivec32l): ... this new prototype.
10330 (init_registers_powerpc_e500): Remove, replace by ...
10331 (init_registers_powerpc_e500l): ... this new prototype.
10332 (init_registers_ppc64): Remove, replace by ...
10333 (init_registers_powerpc_64l): ... this new prototype.
10334 (init_registers_powerpc_64): Remove, replace by ...
10335 (init_registers_powerpc_altivec64l): ... this new prototype.
10336 (ppc_num_regs): Set to 73.
10337 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10338 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10339 (ppc_cannot_store_register): Handle orig_r3 and trap.
10340 (ppc_arch_setup): Update init_registers_... calls.
10341 (ppc_fill_gregset): Handle orig_r3 and trap.
10342
10343 * inferiors.c (clear_inferiors): Reset current_inferior.
10344
fdc59709
PB
103452008-04-23 Paolo Bonzini <bonzini@gnu.org>
10346
889bf7c5
PA
10347 * acinclude.m4: Add override.m4.
10348 * configure: Regenerate.
fdc59709 10349
c9b2f845
UW
103502008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10351
10352 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10353 initial call to init_register_ppc64.
10354
550512b8
UW
103552008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10356
43aaf8b6
PA
10357 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10358 single powerpc*-*-linux* case.
550512b8
UW
10359 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10360
b6430ec3
UW
103612008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10362
10363 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 10364 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
10365 from reg_xmlfiles.
10366 * linux-ppc-low.c: Include <elf.h>.
10367 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10368 (ppc_hwcap): New global variable.
10369 (ppc_regmap): Remove __SPE__ #ifdef sections.
10370 (ppc_regmap_e500): New global variable.
10371 (ppc_cannot_store_register): Update __SPE__ special case.
10372 (ppc_get_hwcap): New function.
10373 (ppc_arch_setup): Use it to determine whether inferior supports
10374 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10375 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10376 Do not access registers if target does not support AltiVec.
10377 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10378 Do not access registers if target does not support SPE.
10379 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10380
52fa2412
UW
103812008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10382
10383 * linux-low.c (disabled_regsets, num_regsets): New.
10384 (use_regsets_p): Delete.
10385 (linux_wait_for_process): Clear disabled_regsets.
10386 (regsets_fetch_inferior_registers): Check and set it.
10387 (regsets_store_inferior_registers): Likewise.
10388 (linux_fetch_registers, linux_store_registers): Do not use
10389 use_regsets_p.
10390 (initialize_low): Allocate disabled_regsets.
10391
e28b3332
DJ
103922008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10393
10394 * Makefile.in (LIBOBJS): New.
10395 (OBS): Use LIBOBJS.
10396 (memmem.o): New rule.
10397 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10398 * configure: Regenerated.
10399
4536995d
UW
104002008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10401
10402 * server.c (handle_query): Never return "unsupported" for
10403 qXfer:features:read queries.
10404
221c031f
UW
104052008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10406
10407 * server.c (get_features_xml): Fix inverted condition.
10408 (handle_query): Always support qXfer:feature:read.
10409
ccd213ac
DJ
104102008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10411
10412 * server.c (wrapper_argv): New.
10413 (start_inferior): Handle wrapper_argv. If set, expect an extra
10414 trap.
10415 (gdbserver_usage): Document --wrapper.
10416 (main): Parse --wrapper.
10417
6fe305f7
UW
104182008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10419
10420 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10421 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10422 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10423 (ppc_set_pc): Likewise.
10424 (ppc_arch_setup): New function.
10425 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10426 of collect_register.
889bf7c5 10427 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 10428
5b0a002e
UW
104292008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10430
10431 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10432 instead of linux-ppc64-low.o.
10433 * linux-ppc64-low.c: Remove file.
10434 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10435 (linux-ppc64-low.o): Remove rule.
10436
10437 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10438 (init_registers_powerpc_64): Likewise.
10439 (ppc_regmap): Conditionally define depending on __powerpc64__.
10440 (ppc_cannot_store_register): Do not special-case "fpscr" when
10441 compiled on __powerpc64__.
10442 (ppc_collect_ptrace_register): New function.
10443 (ppc_supply_ptrace_register): New function.
10444 (ppc_breakpoint): Change type to "unsigned int".
10445 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10446 (the_low_target): Conditionally provide initializers for the
889bf7c5 10447 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
10448 collect_ptrace_register and supply_ptrace_register members.
10449
9b4b61c8
UW
104502008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10451
10452 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10453 * server.c (gdbserver_xmltarget): Define.
10454 (get_features_xml): Use it to replace "target.xml" and arch_string.
10455
10456 * configure.srv: Remove srv_xmltarget. Add XML files that were
10457 mentioned there to srv_xmlfiles instead. Remove conditional tests
10458 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10459 srv_xmlfiles and srv_regobj to include all possible choices.
10460 * configure.ac (srv_xmltarget): Remove.
10461 (srv_xmlfiles): Do not add "target.xml".
10462 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10463 checks for supplementary target information.
10464 * configure: Regenerate.
10465 * Makefile.in (XML_TARGET): Remove.
10466 (target.xml): Remove rule.
10467 (clean): Do not clean up target.xml.
10468 (.PRECIOUS): Do not mention target.xml.
10469
10470 * target.h (struct target_ops): Remove arch_string member.
10471 * linux-low.c (linux_arch_string): Remove.
10472 (linux_target_ops): Remove arch_string initializer.
10473 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10474 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10475 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10476 * spu-low.c (spu_arch_string): Remove.
10477 (spu_target_ops): Remove arch_string initializer.
10478 * win32-low.c (win32_arch_string): Remove.
10479 (win32_target_ops): Remove arch_string initializer.
10480 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10481 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10482 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10483
ee1a7ae4
UW
104842008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10485
10486 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10487 by collect_ptrace_register and supply_ptrace_register hooks.
10488 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10489 instead of checking for the_low_target.left_pad_xfer.
10490 (usr_store_inferior_registers): Use collect_ptrace_register callback
10491 instead of checking for the_low_target.left_pad_xfer.
10492
10493 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10494 (s390_supply_ptrace_register): Likewise.
10495 (s390_fill_gregset): Call s390_collect_ptrace_register.
10496 (the_low_target): Update.
10497
10498 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10499 (ppc_supply_ptrace_register): Likewise.
10500 (the_low_target): Update.
10501
10502 * linux-i386-low.c (the_low_target): Update.
10503 * linux-x86-64-low.c (the_low_target): Update.
10504
d61ddec4
UW
105052008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10506
10507 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10508 reg-s390.o and reg-s390x.o.
10509
10510 * linux-low.c (new_inferior): New global variable.
10511 (linux_create_inferior, linux_attach): Set it.
10512 (linux_wait_for_process): Call the_low_target.arch_setup after the
10513 target has stopped for the first time.
10514 (initialize_low): Do not call the_low_target.arch_setup.
10515
10516 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10517 (s390_set_pc): Likewise.
10518 (s390_arch_setup): New function.
10519 (the_low_target): Use s390_arch_setup as arch_setup routine.
10520
10521 * regcache.c (realloc_register_cache): New function.
10522 (set_register_cache): Call it for each existing regcache.
10523
d05b4ac3
UW
105242008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10525
10526 * server.h (init_registers): Remove prototype.
10527
10528 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10529 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10530 instead of init_registers ().
10531 * linux-arm-low.c (init_registers_arm): Add prototype.
10532 (init_registers_arm_with_iwmmxt): Likewise.
10533 (the_low_target): Add initializer for arch_setup field.
10534 * linux-cris-low.c (init_registers_cris): Add prototype.
10535 (the_low_target): Add initializer for arch_setup field.
10536 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10537 (the_low_target): Add initializer for arch_setup field.
10538 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10539 (the_low_target): Add initializer for arch_setup field.
10540 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10541 (the_low_target): Add initializer for arch_setup field.
10542 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10543 (the_low_target): Add initializer for arch_setup field.
10544 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10545 (the_low_target): Add initializer for arch_setup field.
10546 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10547 (init_registers_mips64_linux): Likewise.
10548 (the_low_target): Add initializer for arch_setup field.
10549 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10550 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10551 (the_low_target): Add initializer for arch_setup field.
10552 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10553 (init_registers_powerpc_64): Likewise.
10554 (the_low_target): Add initializer for arch_setup field.
10555 * linux-s390-low.c (init_registers_s390): Add prototype.
10556 (init_registers_s390x): Likewise.
10557 (the_low_target): Add initializer for arch_setup field.
10558 * linux-sh-low.c (init_registers_sh): Add prototype.
10559 (the_low_target): Add initializer for arch_setup field.
10560 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10561 (the_low_target): Add initializer for arch_setup field.
10562 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10563 (the_low_target): Add initializer for arch_setup field.
10564
10565 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10566 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10567 instead of init_registers ().
10568 * win32-arm-low.c (init_registers_arm): Add prototype.
10569 (the_low_target): Add initializer for arch_setup field.
10570 * win32-i386-low.c (init_registers_i386): Add prototype.
10571 (the_low_target): Add initializer for arch_setup field.
10572
10573 * spu-low.c (init_registers_spu): Add prototype.
10574 (initialize_low): Call initialie_registers_spu () instead of
10575 initialize_registers ().
10576
fd96d250
PA
105772008-02-19 Pedro Alves <pedro@codesourcery.com>
10578
10579 * server.c (handle_v_requests): When handling the vRun and vAttach
10580 packets, if already debugging a process, don't kill it. Return an
10581 error instead.
10582
d41b6bb4
DJ
105832008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10584
10585 * server.c (handle_query): Correct length check.
10586
5ac588cf
PA
105872008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10588
10589 * win32-low.c (do_initial_child_stuff): Add process handle
10590 parameter. Set current_process_handle and current_process_id from the
10591 parameters. Clear globals.
10592 (win32_create_inferior): Don't set current_process_handle and
10593 current_process_id here. Instead pass them on the call to
10594 do_initial_child_stuff.
10595 (win32_attach): Likewise.
10596 (win32_clear_inferiors): New.
10597 (win32_kill): Don't close the current process handle or the
10598 current thread handle here. Instead call win32_clear_inferiors.
10599 (win32_detach): Don't open a new handle to the process. Call
10600 win32_clear_inferiors.
10601 (win32_join): Don't rely on current_process_handle; open a new
10602 handle using the process id.
10603 (win32_wait): Call win32_clear_inferiors when the inferior process
10604 has exited.
10605
ecd7ecbc
DJ
106062008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10607
10608 * server.c (monitor_show_help): Add "exit".
10609
1525d545
MG
106102008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10611
ecd7ecbc 10612 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
10613 (clean): Add reg-xtensa.c.
10614 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
10615 * configure.srv (xtensa*-*-linux*) New target.
10616 * linux-xtensa-low.c: New.
10617 * xtensa-xtregs.c: New.
1525d545 10618
59a016f0
PA
106192008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10620
10621 * hostio.c: Don't include errno.h.
10622 (errno_to_fileio_errno): Move to hostio-errno.
10623 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10624 error number outputting to the target->hostio_last_error callback.
10625 (hostio_packet_error): Use FILEIO_EINVAL directly.
10626 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10627 calls to hostio_error.
10628 * hostio-errno.c: New.
10629 * server.h (hostio_last_error_from_errno): Declare.
10630 * target.h (target_ops): Add hostio_last_error member.
10631 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10632 as hostio_last_error handler.
889bf7c5 10633 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
10634 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10635 (wince_hostio_last_error): New functions.
10636 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10637 as hostio_last_error handler.
10638 (win32_target_ops) [!_WIN32_WCE]: Register
10639 hostio_last_error_from_errno as hostio_last_error handler.
10640 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10641 (hostio-errno.o): New rule.
10642 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10643 * configure.srv (srv_hostio_err_objs): New variable. Default to
10644 hostio-errno.o.
10645 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10646 * configure: Regenerate.
10647
2d717e4f
DJ
106482008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10649
10650 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10651 (linux_kill, linux_detach): Clean up the process list.
10652 * remote-utils.c (remote_open): Improve port number parsing.
10653 (putpkt_binary, input_interrupt): Only send interrupts if the target
10654 is running.
10655 * server.c (extended_protocol): Make static.
10656 (attached): Define earlier.
10657 (exit_requested, response_needed, program_argv): New variables.
10658 (target_running): New.
10659 (start_inferior): Clear attached here.
10660 (attach_inferior): Set attached here.
10661 (require_running): Define.
10662 (handle_query): Use require_running and target_running. Implement
10663 "monitor exit".
10664 (handle_v_attach, handle_v_run): New.
10665 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10666 (gdbserver_usage): Update.
10667 (main): Redo argument parsing. Handle --debug and --multi. Handle
10668 --attach along with other options or after the port. Save
10669 program_argv. Support no initial program. Resynchronize
10670 communication with GDB after an error. Handle "monitor exit".
10671 Use require_running and target_running. Always allow the extended
10672 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10673 restart in extended mode.
10674 * README: Refer to the GDB manual. Update --attach usage.
10675
7407e2de
AS
106762007-12-20 Andreas Schwab <schwab@suse.de>
10677
10678 * linux-low.c (STACK_SIZE): Define.
10679 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10680 (linux_test_for_tracefork): Likewise.
10681
b65d95c5
DJ
106822007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10683
10684 * linux-low.c (linux_wait_for_event): Update messages. Do not
10685 reinsert auto-delete breakpoints.
10686 * mem-break.c (struct breakpoint): Change return type of handler to
10687 int.
10688 (set_breakpoint_at): Update handler type.
10689 (reinsert_breakpoint_handler): Return 1 instead of calling
10690 delete_breakpoint.
10691 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10692 setting a new one.
10693 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10694 * mem-break.h (set_breakpoint_at): Update handler type.
10695 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10696 * win32-low.c (auto_delete_breakpoint): New.
10697 (get_child_debug_event): Use it.
10698
4e799345
DJ
106992007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10700
10701 * configure.ac: Check for pread and pwrite.
10702 * hostio.c (handle_pread): Fall back to lseek and read.
10703 (handle_pwrite): Fall back to lseek and write.
10704 * config.in, configure: Regenerated.
10705
27524b67
DJ
107062007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10707
10708 * server.c (myresume): Add own_buf argument.
10709 (main): Update calls.
10710
a20d5e98
DJ
107112007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10712
10713 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10714 * remote-utils.c (remote_open): Do not call disable_async_io.
10715 (block_async_io): Delete.
10716 (unblock_async_io): Make static.
10717 (initialize_async_io): New.
10718 * server.c (handle_v_cont): Handle async I/O here.
10719 (myresume): Likewise. Move other common resume tasks here...
10720 (main): ... from here. Call initialize_async_io. Disable async
10721 I/O before the main loop.
10722 * server.h (initialize_async_io): Declare.
10723 (block_async_io, unblock_async_io): Delete prototypes.
10724 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10725
b79d787e
DJ
107262007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10727
10728 * remote-utils.c (readchar): Allow binary data in received messages.
10729
d97903b2
PA
107302007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10731
10732 * win32-low.c (attaching): New global.
10733 (win32_create_inferior): Clear the `attaching' global.
10734 (win32_attach): Set the `attaching' global.
10735 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10736 attaching. Only set a breakpoint at the entry point if not
10737 attaching.
10738
311de423
PA
107392007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10740
10741 * server.c (main): Don't report dll events on the initial
10742 connection on attaches.
10743
6c2d16d2
PA
107442007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10745
10746 * server.c (main): Relax numerical bases supported for the pid of
10747 the --attach command line argument.
10748
5ca906e6
PA
107492007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10750
10751 * win32-low.c (win32_attach): Call OpenProcess before
10752 DebugActiveProcess, not after. Add last error output to error
10753 call.
10754
9c6c8194
PA
107552007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10756
10757 * win32-low.c (win32_get_thread_context)
10758 (win32_set_thread_context): New functions.
10759 (thread_rec): Use win32_get_thread_context.
10760 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10761 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10762 field.
10763
4d5d1aaa
PA
107642007-12-03 Leo Zayas
10765 Pedro Alves <pedro_alves@portugalmail.pt>
10766
10767 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10768 global variables.
10769 (child_add_thread): Minor cleanup.
10770 (child_continue): Resume artificially suspended threads before
10771 calling ContinueDebugEvent.
10772 (suspend_one_thread): New.
10773 (fake_breakpoint_event): New.
10774 (get_child_debug_event): Change return type to int. Check here if
10775 gdb sent an interrupt request. If a soft interrupt was requested,
10776 fake a breakpoint event. Return 0 if there is no event to handle,
10777 and 1 otherwise.
10778 (win32_wait): Don't check here if gdb sent an interrupt request.
10779 Ensure there is a valid event to handle.
10780 (win32_request_interrupt): Add soft interruption method as last
10781 resort.
10782
c436e841
PA
107832007-12-03 Leo Zayas
10784 Pedro Alves <pedro_alves@portugalmail.pt>
10785
10786 * win32-low.h (win32_thread_info): Add descriptions to the
10787 structure members. Replace `suspend_count' counter by a
10788 `suspended' flag.
10789 * win32-low.c (thread_rec): Update condition of when to get the
10790 context from the inferior. Rely on ContextFlags being set if it
10791 has already been retrieved. Only suspend the inferior thread if
10792 we haven't already. Warn if that fails.
10793 (continue_one_thread): s/suspend_count/suspended/. Only call
10794 ResumeThread once. Warn if that fails.
10795
e7b5fa67
PA
107962007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10797
10798 * win32-low.c (win32_wait): Don't read from the inferior when it
10799 has already exited.
10800
a385171d
PA
108012007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10802
10803 * Makefile.in (win32_low_h): New variable.
10804 (win32-low.o): Add dependency on $(win32_low_h).
10805 (win32-arm-low.o, win32-i386-low.o): New rules.
10806
f80c84b3
DJ
108072007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10808
10809 * hostio.c: Correct copyright year.
10810
a6b151f1
DJ
108112007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10812
10813 * Makefile.in (OBS): Add hostio.o.
10814 (hostio.o): New rule.
10815 * server.h (handle_vFile): Declare.
10816 * hostio.c: New file.
10817 * server.c (handle_v_requests): Take packet_len and new_packet_len
10818 for binary packets. Call handle_vFile.
10819 (main): Update call to handle_v_requests.
10820
f9387fc3
DJ
108212007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10822
10823 * linux-low.c: Include <sched.h>.
10824
51c2684e
DJ
108252007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10826
10827 * linux-low.c (linux_tracefork_grandchild): New.
10828 (linux_tracefork_child): Use clone.
10829 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10830
75f83163
JB
108312007-10-31 Joel Brobecker <brobecker@adacore.com>
10832
10833 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10834
da5898ce
DJ
108352007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10836
10837 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10838
24a09b5f
DJ
108392007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10840
10841 * inferiors.c (change_inferior_id): Delete.
10842 (add_pid_to_list, pull_pid_from_list): New.
10843 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10844 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10845 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10846 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10847 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10848 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10849 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10850 (using_threads): Always set to 1.
10851 (handle_extended_wait): New.
10852 (add_process): Do not set TID.
10853 (linux_create_inferior): Set must_set_ptrace_flags.
10854 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10855 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10856 (linux_thread_alive): Rename TID argument to LWPID.
10857 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10858 (linux_wait_for_event): Do not use TID or check using_threads. Update
10859 call to dead_thread_notify. Call handle_extended_wait.
10860 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10861 (send_sigstop): Delete sigstop_sent.
10862 (wait_for_sigstop): Avoid TID.
10863 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10864 (linux_test_for_tracefork): New.
10865 (linux_lookup_signals): Use thread_db_active and
10866 linux_supports_tracefork_flag.
10867 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10868 * linux-low.h (get_process_thread): Avoid TID.
10869 (struct process_ifo): Move thread_known and tid to the end. Remove
10870 sigstop_sent.
10871 (linux_attach_lwp, thread_db_init): Update prototypes.
10872 * server.h (change_inferior_id): Delete prototype.
10873 (add_pid_to_list, pull_pid_from_list): New prototypes.
10874 * thread-db.c (thread_db_use_events): New.
10875 (find_first_thread): Rename to...
10876 (find_one_thread): ...this. Update callers and messages. Do not
10877 call fatal. Check thread_db_use_events. Do not call
10878 change_inferior_id or new_thread_notify.
10879 (maybe_attach_thread): Update. Do not call new_thread_notify.
10880 (thread_db_init): Set thread_db_use_events. Check use_events.
10881 * utils.c (fatal, warning): Correct message prefix.
10882
30ed0a8f
DJ
108832007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10884
10885 * Makefile.in (clean): Remove new files.
10886 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10887 (powerpc-64.o, powerpc-64.c): New rules.
10888 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10889 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10890 with SPE.
10891 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10892 SPE targets.
10893 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10894 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10895 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10896 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10897 (target_regsets): Add AltiVec and SPE register sets.
10898 * configure.ac: Check for AltiVec and SPE.
10899 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10900 (ppc_fill_vrregset, ppc_store_vrregset): New.
10901 (target_regsets): Add AltiVec register set.
10902 * configure: Regenerated.
10903
fd462a61
DJ
109042007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10905
10906 * linux-low.c (O_LARGEFILE): Define.
10907 (linux_read_memory): Use /proc/PID/mem.
10908 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10909 * configure, config.in: Regenerated.
10910
69f223ed
DJ
109112007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10912
10913 * linux-low.c (linux_wait_for_event): Do not pass signals while
10914 single-stepping.
10915
aec18585
PA
109162007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10917
10918 * win32-low.c (create_process): New.
10919 (win32_create_inferior): Use create_process instead of
10920 CreateProcess. If create_process failed retry appending an ".exe"
10921 suffix. Store the GetLastError result immediatelly after
10922 create_process calls and use it on the call to error.
10923
34d86ddd
PA
109242007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10925
10926 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10927
5a0e3bd0
JB
109282007-08-23 Joel Brobecker <brobecker@adacore.com>
10929
10930 * configure.ac: Switch license to GPLv3.
10931
f88c79e6
MS
109322007-08-01 Michael Snyder <msnyder@access-company.com>
10933
10934 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10935
6b3d9b83
PA
109362007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
10937
10938 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10939 typedef.
10940 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10941 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
10942 CloseToolhelp32Snapshot.
10943 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10944 CloseToolhelp32Snapshot.
10945
c588c53c
MS
109462007-07-27 Michael Snyder <michael.snyder@access-company.com>
10947
10948 * server.c (main): Check for inferior exit before main loop.
10949
aa0403d9
PA
109502007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
10951
10952 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
10953 instead of on tmp_desc.
10954
255e7678
DJ
109552007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
10956 Daniel Jacobowitz <dan@codesourcery.com>
10957
10958 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
10959 (add_thread): Minor cleanups.
10960 (clear_inferiors): Move lower in the file. Clear the DLL
10961 list.
10962 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
10963 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
10964 (xml_escape_text): New.
10965 * server.c (handle_query): Handle qXfer:libraries:read. Report it
10966 for qSupported.
10967 (handle_v_cont): Report errors.
10968 (gdbserver_version): Update.
10969 (main): Correct size of own_buf. Do not report initial DLL events.
10970 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
10971 (unloaded_dll, xml_escape_text): New.
10972 * win32-low.c (enum target_waitkind): Update comments.
10973 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
10974 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
10975 (win32_EnumProcessModules, win32_GetModuleInformation)
10976 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
10977 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
10978 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
10979 (win32_Module32First, win32_Module32Next, load_toolhelp)
10980 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
10981 (get_child_debug_event): Handle DLL events.
10982 (win32_wait): Likewise.
10983
0d37add9
DJ
109842007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10985
10986 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
10987 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
10988
45e2715e
PA
109892007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10990
10991 * win32-low.c (handle_output_debug_string): Ignore event if not
10992 waiting.
10993
c5674cf1
PA
109942007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10995
10996 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
10997
2bbe3cc1
DJ
109982007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
10999
11000 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11001
ae13219e
DJ
110022007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11003
11004 * inferiors.c (change_inferior_id): Add comment.
11005 * linux-low.c (check_removed_breakpoint): Add an early
11006 prototype. Improve debug output.
11007 (linux_attach): Doc update.
11008 (linux_detach_one_process, linux_detach): Clean up before releasing
11009 each process.
11010 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11011 * linux-low.h (struct process_info): Doc improvement.
11012 * mem-break.c (delete_all_breakpoints): New.
11013 * mem-break.h (delete_all_breakpoints): New prototype.
11014 * thread-db.c (find_first_thread): New.
11015 (thread_db_create_event): Call it instead of
11016 thread_db_find_new_threads. Clean up unused variables.
11017 (maybe_attach_thread): Remove first thread handling.
11018 (thread_db_find_new_threads): Use find_first_thread.
11019 (thread_db_get_tls_address): Likewise.
11020
4105de34
DJ
110212007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11022
11023 * thread-db.c (thread_db_find_new_threads): Add prototype.
11024 (thread_db_create_event): Check for the main thread before adding
11025 a new thread.
11026 (maybe_attach_thread): Only enable event reporting if TID == 0.
11027 (thread_db_get_tls_address): Check for new threads.
11028
2b876972
DJ
110292007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11030
11031 * linux-low.c (linux_create_inferior): Try execv before execvp.
11032 * spu-low.c (spu_create_inferior): Likewise.
11033
7a245884
DJ
110342007-06-13 Mike Frysinger <vapier@gentoo.org>
11035
11036 * linux-low.c (linux_create_inferior): Change execv to execvp.
11037 * spu-low.c (spu_create_inferior): Likewies.
11038
117ce543
DJ
110392007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11040
11041 * Makefile.in (clean): Clean new files instead of deleted ones.
11042 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11043 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11044 rules.
11045 * configure.srv: Specify XML files and new regformats for MIPS and
11046 MIPS64 GNU/Linux.
11047 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11048 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11049 an entry for the restart register.
11050 (mips_cannot_fetch_register, mips_cannot_store_register)
11051 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11052 register names to match the XML descriptions.
11053 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11054 restart register instead of $0.
11055
0e7f50da
UW
110562007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11057 Markus Deuling <deuling@de.ibm.com>
11058
11059 * remote-utils.c (decode_xfer_write): New function.
11060 * server.h (decode_xfer_write): Add prototype.
11061 * server.c (handle_query): Add PACKET_LEN argument. Support
11062 qXfer:spu:read and qXfer:spu:write packets.
11063 (main): Pass packet_len to handle_query.
11064 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11065 * target.h (target_ops): Add qxfer_spu.
11066
374c1d38
UW
110672007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11068
11069 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11070 accessing non-seekable spufs files.
11071
bb63802a
UW
110722007-05-16 Markus Deuling <deuling@de.ibm.com>
11073
889bf7c5 11074 * server.c (handle_query): Add reply for qC packet.
bb63802a 11075
7390519e
PA
110762007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11077 Leo Zayas <lerele@champenstudios@com>
11078
11079 * server.h (check_remote_input_interrupt_request): New function.
11080 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11081 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11082 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11083 (check_remote_input_interrupt_request): New function.
11084 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 11085 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
11086 winapi_GenerateConsoleCtrlEvent): New typedefs.
11087 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11088 to 250 ms.
11089 (win32_wait): Check for remote interrupt request
11090 with check_remote_input_interrupt_request.
11091 (win32_request_interrupt): New function.
11092 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11093
34b34921
PA
110942007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11095
11096 * win32-low.c (debug_registers_changed,
11097 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11098 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11099 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11100 (thread_rec): Get context using the low target.
11101 (child_add_thread): Call thread_added on the low target,
11102 which does the same thing.
11103 (regptr): Delete.
11104 (do_initial_child_stuff): Remove debug registers references.
11105 Set context using the low target. Resume threads after
11106 setting the contexts.
11107 (child_continue): Remove dead variable. Remove debug
11108 registers references.
11109 (child_fetch_inferior_registers): Go through the low target.
11110 (do_child_store_inferior_registers): Remove.
11111 (child_store_inferior_registers): Go through the low target.
11112 (win32_resume): Remove debug registers references.
11113 Set context using the low target.
11114 (handle_exception): Change return type to void. Don't record
11115 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11116 first chance exception.
889bf7c5 11117 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
11118 goto loop. Always return after waiting for debug event.
11119 (win32_wait): Convert to switch statement. Handle spurious
11120 events.
11121
11122 * win32-i386-low.c (debug_registers_changed,
11123 debug_registers_used): New.
11124 (initial_stuff): Rename to ...
11125 (i386_initial_stuff): ... this. Clear debug registers
11126 state variables.
11127 (store_debug_registers): Delete.
11128 (i386_get_thread_context): New.
11129 (load_debug_registers): Delete.
11130 (i386_set_thread_context): New.
11131 (i386_thread_added): New.
11132 (single_step): Rename to ...
11133 (i386_single_step): ... this.
11134 (do_fetch_inferior_registers): Rename to ...
11135 (i386_fetch_inferior_register): ... this.
11136 (i386_store_inferior_register): New.
11137 (the_low_target): Adapt to new interface.
11138
11139 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11140 (arm_get_thread_context): New.
11141 (arm_set_thread_context): New.
11142 (regptr): New.
11143 (do_fetch_inferior_registers): Rename to ...
11144 (arm_fetch_inferior_register): ... this.
11145 (arm_store_inferior_register): New.
11146 (arm_wince_breakpoint): Reimplement as unsigned long.
11147 (arm_wince_breakpoint_len): Define.
11148 (the_low_target): Adapt to new interface.
11149
11150 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11151 load_debug_registers. Add get_thread_context, set_thread_context,
11152 thread_added and store_inferior_register. Rename
11153 fetch_inferior_registers to fetch_inferior_register.
11154 (regptr): Remove declaration.
11155
dd6953e1
PA
111562007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11157
11158 * linux-low.c (linux_detach): Change return type to int. Return 0.
11159 * spu-low.c (spu_detach): Likewise.
11160
444d6139
PA
111612007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11162
11163 * target.h (target_ops): Change return type of detach to int.
11164 Add join.
11165 (join_inferior): New.
11166 * server.c (main): Don't skip detach support on mingw32.
11167 If the inferior doesn't support detaching return error.
11168 Call join_inferior instead of using waitpid.
11169 * linux-low.c (linux_join): New.
11170 (linux_target_op): Add linux_join.
11171 * spu-low.c (spu_join): New.
11172 (spu_target_ops): Add spu_join.
11173 * win32-low.c (win32_detach): Adapt to new interface.
11174 Reopen current_process_handle before detaching. Issue a child
11175 resume before detaching.
11176 (win32_join): New.
11177 (win32_target_op): Add win32_join.
11178
1d5315fe
PA
111792007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11180
11181 * win32-low.c (win32-attach): Fix return value.
11182 * target.h (target_ops): Describe ATTACH return values.
11183
bf914831
PA
111842007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11185
11186 * win32-low.c (GETPROCADDRESS): Define.
11187 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11188 (winapi_DebugSetProcessKillOnExit): Likewise.
11189 (win32_create_inferior): Force usage of ansi CreateProcessA.
11190 (win32_attach): Use GETPROCADDRESS.
11191 (win32_detach): Likewise.
11192
f72f3e60
PA
111932007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11194
11195 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11196
ed50f18f
PA
111972007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11198
11199 * win32-low.c: Commit leftover changes from 2007-03-29.
11200
0c2ead7e
DJ
112012007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11202
11203 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11204 fields short instead of int. Add explicit padding.
11205 (i387_cache_to_fsave): Remove unnecessary casts.
11206 (i387_fsave_to_cache): Doc fix.
11207 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11208
73725ff3
DJ
112092007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11210
11211 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11212 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11213
d99f33d8
PA
112142007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11215
11216 * configure.srv (arm*-*-mingw32ce*): Move near the other
11217 arm targets.
11218
68070c10
PA
112192007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11220
2482afc6 11221 * configure.ac: Add errno checking.
68070c10
PA
11222 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11223 sys/file.h and malloc.h.
11224 (AC_CHECK_DECLS): Add perror.
11225 (srv_mingwce): Handle.
2482afc6 11226 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
11227 win32-i386-low.o to srv_tgtobj.
11228 (i[34567]86-*-mingw*): Likewise.
11229 (arm*-*-mingw32ce*): Add case.
11230 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11231 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11232 [__MINGW32CE__] (strerror): New function.
11233 [__MINGW32CE__] (errno): Define to GetLastError.
11234 [__MINGW32CE__] (COUNTOF): New macro.
11235 (remote_open): Remove extra close call.
11236 * mem-break.c (delete_breakpoint_at): New function.
11237 * mem-break.h (delete_breakpoint_at): Declare.
11238 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11239 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11240 [USE_WIN32API] (read, write): Add char* casts.
11241 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11242 * server.h: Include wincecompat.h on Windows CE.
11243 [HAVE_ERRNO_H]: Check.
11244 (perror): Declare if not declared.
11245 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11246 (perror_with_name): Remove errno declaration.
11247 * wincecompat.h: New.
11248 * wincecompat.c: New.
11249 * win32-low.h: New.
11250 * win32-arm-low.c: New.
11251 * win32-i386-low.c: New.
11252 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11253 (OUTMSG2): Make it safe.
11254 (_T): New macro.
11255 (COUNTOF): New macro.
11256 (NUM_REGS): Get it from the low target.
11257 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11258 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11259 (thread_rec): Let low target handle debug registers.
11260 (child_add_thread): Likewise.
11261 (child_init_thread_list): Likewise.
11262 (continue_one_thread): Likewise.
11263 (regptr): New.
11264 (do_child_fetch_inferior_registers): Move to ...
11265 * win32-i386-low.c: ... here, and rename to ...
11266 (do_fetch_inferior_registers): ... this.
889bf7c5 11267 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
11268 Go through the low target.
11269 (do_child_store_inferior_registers): Use regptr.
11270 (strwinerror): New function.
11271 (win32_create_inferior): Handle Windows CE.
11272 Use strwinerror instead of strerror on Windows error
11273 codes. Add program to the error output.
11274 Don't close the main thread handle on Windows CE.
11275 (win32_attach): Use coredll.dll on Windows CE.
11276 (win32_kill): Close current process and current
11277 thread handles.
11278 (win32_detach): Use coredll.dll on Windows CE.
11279 (win32_resume): Let low target handle debug registers, and
11280 step request.
11281 (handle_exception): Add/Remove initial breakpoint. Avoid
11282 non-existant WSTOPSIG on Windows CE.
11283 (win32_read_inferior_memory): Cast to remove warning.
11284 (win32_arch_string): Go through the low target.
11285 (initialize_low): Call set_breakpoint_data with the low
11286 target's breakpoint.
11287 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11288 FOP_REGNUM, mappings): Move to ...
11289 * win32-i386-low.c: ... here.
11290 * win32-low.c (win32_thread_info): Move to ...
11291 * win32-low.h: ... here.
11292 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11293 win32-arm-low.c and wincecompat.c.
11294 (all:): Add $EXEEXT.
11295 (install-only:): Likewise.
11296 (gdbserver:): Likewise.
11297 (gdbreplay:): Likewise.
11298 * config.in: Regenerate.
11299 * configure: Regenerate.
11300
41093d81
PA
113012007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11302
11303 * win32-low.c: Rename typedef thread_info to
11304 win32_thread_info throughout.
11305
544afa54
PA
113062007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11307
11308 * win32-i386-low.c: Rename to ...
11309 * win32-low.c: ... this.
11310 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11311 * Makefile.in: Likewise.
11312
bce7165d
PA
113132007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11314
11315 * remote-utils.c (monitor_output): Constify msg parameter.
11316 * server.h (monitor_output): Likewise.
11317 * win32-i386-low.c (handle_output_debug_string): New.
11318 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11319 handle_output_debug_string.
11320 (get_child_debug_event): Likewise.
11321
506c7aa0
DJ
113222007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11323
11324 * server.c (main): Correct strtoul check.
11325
42c81e2a
DJ
113262007-03-27 Jon Ringle <jon@ringle.org>
11327
11328 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11329
9453113a
DJ
113302007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11331
11332 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11333
64a69107
DJ
113342007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11335
11336 * terminal.h: Check HAVE_SGTTY_H.
11337
113382007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
11339
11340 * remote-utils.c (remote_open): Print out the assigned port number.
11341
c74d0ad8
DJ
113422007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11343
11344 * remote-utils.c (monitor_output): New function.
11345 * server.c (debug_threads): Define here.
11346 (monitor_show_help): New function.
11347 (handle_query): Handle qRcmd.
11348 (main): Do not handle 'd' packet.
11349 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11350 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11351 of debug_threads.
11352
de7c3b4a
PA
113532007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11354
11355 * Makefile.in (EXEEXT): New.
11356 (clean): Use $(EXEEXT).
11357
ef57601b
PA
113582007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11359
11360 * target.h (target_ops): Rename send_signal to request_interrupt,
11361 and remove enum target_signal parameter.
11362 * linux-low.c (linux_request_interrupt): Rename from
11363 linux_send_signal, and always send SIGINT.
11364 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11365 and always send SIGINT.
11366 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11367 of send_signal.
11368 (input_interrupt): Likewise.
11369
820f2bda
PA
113702007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11371
11372 * server.c (get_features_xml): Check if target implemented
11373 arch_string.
11374 * win32-i386-low.c (win32_arch_string): New.
11375 (win32_target_ops): Add win32_arch_string as arch_string member.
11376
ab39bf24
UW
113772007-02-22 Markus Deuling <deuling@de.ibm.com>
11378
11379 * spu-low.c (spu_arch_string): New.
11380 (spu_target_ops): Add spu_arch_string.
11381
61ff6e04
DJ
113822007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11383
11384 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11385 * configure.ac: Do not check for terminal.h.
11386 * configure, config.in: Regenerated.
11387
fb1e4ffc
DJ
113882007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11389
11390 * Makefile.in (OBS): Add $(XML_BUILTIN).
11391 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11392 (clean): Update.
11393 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11394 (arm-with-iwmmxt.c): New.
11395 * config.in, configure: Regenerate.
11396 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11397 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11398 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11399 (arm*-*-linux*): Add iWMMXt and regset support.
11400 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11401 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11402 (arm_store_wmmxregset, target_regsets): New.
11403 * server.c (get_features_xml): Take annex argument. Check builtin
11404 XML documents.
11405 (handle_query): Handle multiple annexes.
11406
0f48aa01
DJ
114072007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11408
11409 * remote-utils.c [USE_WIN32API] (read, write): Define.
11410 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11411 write.
11412
23181151
DJ
114132007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11414
11415 * linux-i386-low.c (the_low_target): Set arch_string.
11416 * linux-x86-64-low.c (the_low_target): Likewise.
11417 * linux-low.c (linux_arch_string): New.
11418 (linux_target_ops): Add it.
11419 * linux-low.h (struct linux_target_ops): Add arch_string.
11420 * server.c (write_qxfer_response): Use const void * for DATA.
11421 (get_features_xml): New.
11422 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11423 * target.h (struct target_ops): Add arch_string method.
11424
9d606399
DJ
114252007-01-03 Denis Pilat <denis.pilat@st.com>
11426 Daniel Jacobowitz <dan@codesourcery.com>
11427
11428 * linux-low.c (linux_kill): Handle being called with no threads.
11429 * win32-i386-low.c (win32_kill): Likewise.
11430 (get_child_debug_event): Clear current_process_handle.
11431
114322006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
11433 Daniel Jacobowitz <dan@codesourcery.com>
11434
11435 * remote-utils.c (remote_open): Check the type of specified
11436 serial port devices before opening them.
11437 * server.c (main): Kill the inferior if an error occurs during
11438 the first remote_open.
11439
a5e13d24
DJ
114402006-12-05 Markus Deuling <deuling@de.ibm.com>
11441
11442 * README: Update supported targets.
11443
186947f7
DJ
114442006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11445
11446 * Makefile.in (clean): Remove reg-mips64.c.
11447 (reg-mips64.c, reg-mips64.o): New rules.
11448 * configure.srv: Handle mips64. Include regset support for mips.
11449 * linux-mips-low.c (union mips_register): New.
11450 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11451 (mips_breakpoint, mips_breakpoint_at): Use int.
11452 (mips_collect_register, mips_supply_register)
11453 (mips_collect_register_32bit, mips_supply_register_32bit)
11454 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11455 (mips_store_fpregset, target_regsets): New.
11456 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11457
a13e2c95
UW
114582006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11459
11460 * configure.srv: Add target "spu*-*-*".
11461 * Makefile.in (clean): Remove reg-spu.c.
11462 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11463 * spu-low.c: New file.
11464
cb7283db
DJ
114652006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11466
11467 * configure.ac: Correct td_thr_tls_get_addr test.
11468 * configure: Regenerated.
11469
89be2091
DJ
114702006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11471
11472 * linux-low.c (linux_wait_for_event): Reformat. Use the
11473 pass_signals array.
11474 * remote-utils.c (decode_address_to_semicolon): New.
11475 * server.c (pass_signals, handle_general_set): New.
11476 (handle_query): Mention QPassSignals for qSupported.
11477 (main): Call handle_general_set.
11478 * server.h (pass_signals, decode_address_to_semicolon): New.
11479
000ef4f0
DJ
114802006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11481
11482 * server.c (handle_query): Correct error handling for read_auxv.
11483
b7149293
UW
114842005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11485
11486 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11487 and srv_linux_thread_db to yes.
11488 * linux-s390-low.c (s390_fill_gregset): New function.
11489 (target_regsets): Define data structure.
11490
dae5f5cf
DJ
114912006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11492
11493 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11494 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11495 * config.in, configure: Regenerated.
11496 * inferiors.c (gdb_id_to_thread): New function.
11497 (gdb_id_to_thread_id): Use it.
11498 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11499 * linux-low.h (struct process_info): Add th member.
11500 (thread_db_get_tls_address): New prototype.
11501 * remote-utils.c (decode_address): Make non-static.
11502 * server.c (handle_query): Handle qGetTLSAddr.
11503 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11504 * target.h (struct target_ops): Add get_tls_address.
11505 * thread-db.c (maybe_attach_thread): Save the thread handle.
11506 (thread_db_get_tls_address): New.
11507
32ca6d61
DJ
115082006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11509
11510 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11511 (linux_resume_one_process): Take a siginfo_t *. Update all
11512 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11513 (struct pending_signals): Add a siginfo_t.
11514 (linux_wait_for_process): Always set last_status.
11515 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11516 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11517 * linux-low.h (struct process_info): Add last_status.
11518
5ffff7c1
DJ
115192006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11520
11521 * remote-utils.c (try_rle): New function.
11522 (putpkt_binary): Use it.
11523
8695c747
DJ
115242006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11525
11526 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11527 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11528 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11529 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11530 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11531 point registers.
11532
290fadea
RS
115332006-08-08 Richard Sandiford <richard@codesourcery.com>
11534
11535 * server.c (terminal_fd): New variable.
11536 (old_foreground_pgrp): Likewise.
11537 (restore_old_foreground_pgrp): New function.
11538 (start_inferior): Record the terminal file descriptor in terminal_fd
11539 and its original foreground group in old_foreground_pgrp. Register
11540 restore_old_foreground_pgrp with atexit().
11541
9f2e1e63
DJ
115422006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11543
11544 * server.c (handle_query): Correct qPart to qXfer.
11545
b80864fb
DJ
115462006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11547
11548 * configure.ac: Check for more headers which are missing on
11549 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11550 * configure.srv: Add Cygwin and mingw32.
11551 * remote-utils.c: Don't include headers unconditionally which
11552 are missing on mingw32. Include <winsock.h> for mingw32.
11553 (remote_open): Adjust for mingw32 support. Flush
11554 standard error after writing to it.
11555 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11556 (unblock_async_io, enable_async_io, disable_async_io)
11557 (readchar, getpkt): Update for Winsock support.
11558 (prepare_resume_reply): Expect a protocol signal number.
11559 * server.c: Disable <sys/wait.h> on mingw32.
11560 (start_inferior): Adjust for mingw32 support. Flush
11561 standard error after writing to it.
11562 (attach_inferior): Likewise. Use protocol signal
11563 numbers.
11564 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11565 and names.
11566 * win32-i386-low.c: New file.
11567 * Makefile.in (XM_CLIBS): Set.
11568 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11569 (win32-i386-low.o): New dependency rule.
11570 * linux-low.c (linux_wait): Use target signal numbers.
11571 * target.h (struct target_ops): Doc fix.
11572 * server.h (target_signal_to_name): New prototype.
11573 * gdbreplay.c: Don't include headers unconditionally which
11574 are missing on mingw32. Include <winsock.h> for mingw32.
11575 (remote_close, remote_open): Adjust for Winsock support.
11576 * configure, config.in: Regenerated.
11577
0876f84a
DJ
115782006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11579
11580 * server.c (decode_xfer_read, write_qxfer_response): New.
11581 (handle_query): Take a packet length argument. Handle
11582 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11583 the qSupported response.
11584 (main): Update call to handle_query.
11585
01f9e8fa
DJ
115862006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11587
11588 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11589 (putpkt_binary): Renamed from putpkt and adjusted for binary
11590 data.
11591 (putpkt): New wrapper for putpkt_binary.
11592 (readchar): Don't mask off the high bit.
11593 (decode_X_packet): New function.
11594 * server.c (main): Call putpkt_binary if a handler sets the packet
11595 length. Save the length of the incoming packet. Handle 'X'.
11596 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11597
be2a5f71
DJ
115982006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11599
11600 * server.c (handle_query): Handle qSupported.
11601
ea025f5f
DJ
116022006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11603
11604 * remote-utils.c (all_symbols_looked_up): New variable.
11605 (look_up_one_symbol): Check it.
11606 * server.h (look_up_one_symbol): New declaration.
11607 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11608
9308fc88
DJ
116092006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11610
11611 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 11612 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
11613 (PTRACE_GET_THREAD_AREA): Define.
11614 (ps_get_thread_area): New function.
11615
52fb6437
NS
116162006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11617
11618 * configure.srv (m68k*-*-uclinux*): New target.
11619 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11620 (linux_resume_one_process): Remove extraneous cast.
11621 (linux_read_offsets): New.
11622 (linux_target_op): Add linux_read_offsets on mmuless systems.
11623 * server.c (handle_query): Add qOffsets logic.
11624 * target.h (struct target_ops): Add read_offsets.
11625
21b0f40c
DJ
116262006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11627
11628 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11629 (PTRACE_GET_THREAD_AREA): Define.
11630 (ps_get_thread_area): New function.
11631 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11632 (linux-x86-64-low.o): Update.
11633
0050a760
DJ
116342006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11635
11636 * configure.ac: Remove checks for prfpregset_t.
11637 * gdb_proc_service.h: New file.
11638 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11639 new "gdb_proc_service.h".
11640 * proc-service.c: Likewise.
11641 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11642 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11643 * Makefile.in (gdb_proc_service_h): Updated.
11644 * configure, config.in: Regenerated.
11645
b92a518e
DJ
116462006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11647
11648 * remote-utils.c (prepare_resume_reply): Move declaration
11649 of gdb_id_from_wait to the top of the block.
11650
545587ee
DJ
116512006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11652
11653 * linux-low.c (regsets_store_inferior_registers): Read the regset
11654 from the target before filling it.
11655
9db87ebd
DJ
116562006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11657
11658 * server.c (attach_inferior): Return SIGTRAP for a successful
11659 attach.
11660
dd24457d
DJ
116612006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11662
11663 * Makefile.in (OBS): Add version.o.
11664 (STAGESTUFF): Delete.
11665 (version.o): Add dependencies.
11666 (version.c): Replace rule.
11667 (clean): Remove version.c.
11668 * server.c (gdbserver_version): New.
11669 (gdbserver_usage): Use printf.
11670 (main): Handle --version and --help.
11671 * server.h (version, host_name): Add declarations.
11672
6f0f660e
EZ
116732005-12-23 Eli Zaretskii <eliz@gnu.org>
11674
889bf7c5
PA
11675 * linux-arm-low.c:
11676 * linux-arm-low.c:
11677 * inferiors.c:
11678 * i387-fp.h:
11679 * i387-fp.c:
11680 * gdbreplay.c:
11681 * regcache.c:
11682 * proc-service.c:
11683 * mem-break.h:
11684 * mem-break.c:
11685 * linux-x86-64-low.c:
11686 * linux-sh-low.c:
11687 * linux-s390-low.c:
11688 * linux-ppc64-low.c:
11689 * linux-ppc-low.c:
11690 * linux-mips-low.c:
11691 * linux-m68k-low.c:
11692 * linux-m32r-low.c:
11693 * linux-low.h:
11694 * linux-low.c:
11695 * linux-ia64-low.c:
11696 * linux-i386-low.c:
11697 * linux-crisv32-low.c:
11698 * thread-db.c:
11699 * terminal.h:
11700 * target.h:
11701 * target.c:
11702 * server.h:
11703 * server.c:
11704 * remote-utils.c:
11705 * regcache.h:
11706 * utils.c:
11707 * Makefile.in:
11708 * configure.ac:
6f0f660e
EZ
11709 * gdbserver.1: Add (C) after Copyright. Update the FSF
11710 address.
11711
9d1fb177
DJ
117122005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11713
11714 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11715 (arm_breakpoint_at): Recognize both breakpoints.
11716 (the_low_target): Use the correct breakpoint instruction.
11717
011a70c2
DJ
117182005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11719
11720 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11721 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11722 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11723 (the_low_target): Update.
11724
7fb85e41
AS
117252005-10-25 Andreas Schwab <schwab@suse.de>
11726
11727 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11728
11729 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11730 (ia64_num_regs): Reduce to 462.
11731
3db0444b
DJ
117322005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11733
11734 * acinclude.m4: Correct quoting.
11735 * aclocal.m4: Regenerated.
11736
11737 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11738 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11739 (thread_db_init): Call thread_db_err_str.
11740 * configure.ac: Check for TD_VERSION.
11741 * config.in, configure: Regenerated.
11742
bee0189a
DJ
117432005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11744
11745 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11746
e9d25b98
DJ
117472005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11748
11749 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11750 is not available. Define HAVE_PTRACE_GETREGS if it is.
11751 * config.in, configure: Regenerated.
11752 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11753 * linux-i386-low.c, linux-m68k-low.c: Update to use
11754 HAVE_PTRACE_GETREGS.
11755 * linux-low.c (regsets_fetch_inferior_registers)
11756 (regsets_store_inferior_registers): Only return 0 if we processed
11757 GENERAL_REGS.
11758 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11759 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11760
a06660f7
DJ
117612005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11762
11763 * inferiors.c (struct thread_info): Add gdb_id.
11764 (add_thread): Add gdb_id argument.
11765 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11766 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11767 calls to add_thread.
11768 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11769 * server.c (handle_query): Use thread_to_gdb_id.
11770 (handle_v_cont, main): Use gdb_id_to_thread_id.
11771 * server.h (add_thread): Update prototype.
11772 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11773 prototypes.
11774
5a1f5858
DJ
117752005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11776
11777 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11778 left-padded registers.
11779 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11780 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11781
e122f1f5
SE
117822005-07-01 Steve Ellcey <sje@cup.hp.com>
11783
11784 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11785 * configure: Regenerate.
11786 * config.in: Regenerate.
11787 * server.h (NEED_DECLARATION_STRERROR):
11788 Replace with !HAVE_DECL_STRERROR.
11789
d592fa2f
DJ
117902005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11791
11792 * linux-low.c (linux_wait, linux_send_signal): Don't test
11793 an unsigned long variable for > 0 if it could be MAX_ULONG.
11794 * server.c (myresume): Likewise.
11795 * target.c (set_desired_inferior): Likewise.
11796
ccbd4912
MK
117972005-06-13 Mark Kettenis <kettenis@gnu.org>
11798
11799 * configure.ac: Simplify and improve check for socklen_t.
11800 * configure, config.in: Regenerate.
11801
f450004a
DJ
118022005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11803
11804 * acconfig.h: Remove.
11805 * configure.ac: Add a test for socklen_t. Use three-argument
11806 AC_DEFINE throughout.
11807 * config.in: Regenerated using autoheader 2.59.
11808 * configure: Regenerated.
11809
11810 * gdbreplay.c (socklen_t): Provide a default.
11811 (remote_open): Use socklen_t.
11812 * remote-utils.c (socklen_t): Provide a default.
11813 (remote_open): Use socklen_t.
11814 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11815 unsigned char.
11816
11817 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11818 char for buffers.
11819 * linux-low.c (linux_read_memory, linux_write_memory)
11820 (linux_read_auxv): Likewise.
11821 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11822 (check_mem_write): Likewise.
11823 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11824 Likewise.
11825 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11826 (registers_from_string, register_data): Likewise.
11827 * server.c (handle_query, main): Likewise.
11828 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11829 (decode_M_packet): Likewise.
11830 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11831 * target.h (struct target_ops): Update read_memory, write_memory,
11832 and read_auxv.
11833 (read_inferior_memory, write_inferior_memory): Update.
11834 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11835 to unsigned char *.
11836 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11837 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11838 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11839 linux-s390-low.c, linux-sh-low.c: Update for changes in
11840 read_inferior_memory and the_low_target->breakpoint.
11841
eee84df1
DJ
118422005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11843
11844 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11845 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11846 * configure.srv: Add powerpc64-*-linux*.
11847 * linux-ppc64-low.c: New file.
11848
45b134e5
OF
118492005-05-23 Orjan Friberg <orjanf@axis.com>
11850
11851 * linux-cris-low.c: New file with support for CRIS.
11852 * linux-crisv32-low.c: Ditto for CRISv32.
11853 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11854 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 11855 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
11856 reg-crisv32.o, and reg-crisv32.c to make rules.
11857 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11858 recognized targets.
11859
48d93c75
UW
118602005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11861
11862 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11863 of sizeof (PTRACE_XFER_TYPE).
11864 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11865
e013ee27
OF
118662005-05-12 Orjan Friberg <orjanf@axis.com>
11867
889bf7c5 11868 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
11869 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11870 pointers for hardware watchpoint support.
11871 * linux-low.h (struct linux_target_ops): Ditto.
11872 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11873 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11874 to linux_target_ops.
11875 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11876 reply packet.
11877 * server.c (main): Recognize 'Z' and 'z' packets.
11878
b0ded00b
UW
118792005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11880
11881 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11882 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11883 (the_low_target): Add new members.
11884
8643e2ad
DJ
118852005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11886
11887 * proc-service.c (ps_lgetregs): Search all_processes instead of
11888 all_threads.
11889
fc620387
DJ
118902005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11891
11892 * server.c (start_inferior): Change return type to int.
11893 (attach_inferior): Change sigptr to int *.
11894 (handle_v_cont, handle_v_requests): Change signal to int *.
11895 (main): Change signal to int.
11896
118972005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
11898
11899 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11900 * configure.srv: Add m32r*-*-linux*.
11901 * linux-m32r-low.c: New file.
11902
e0e76420
DJ
119032005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11904
11905 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11906
a1928bad
DJ
119072005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11908
11909 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11910 Take unsigned long arguments for PIDs.
11911 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11912 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11913 (wait_for_sigstop, linux_resume_one_process)
11914 (regsets_fetch_inferior_registers, linux_send_signal)
11915 (linux_read_auxv): Likewise. Update the types of variables holding
11916 PIDs. Update format string specifiers.
11917 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11918 * remote-utils.c (prepare_resume_reply): Likewise.
11919 * server.c (cont_thread, general_thread, step_thread)
11920 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11921 unsigned long.
11922 (handle_query): Update format specifiers.
11923 (handle_v_cont, main): Use strtoul for thread IDs.
11924 * server.h (struct inferior_list_entry): Use unsigned long for ID.
11925 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11926 (general_thread, step_thread, thread_from_wait)
11927 (old_thread_from_wait): Update.
11928 * target.h (struct thread_resume): Use unsigned long for THREAD.
11929 (struct target_ops): Use unsigned long for arguments to attach and
11930 thread_alive.
11931
dcdb98d2
DJ
119322005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
11933
11934 * acinclude.m4: Include bfd/bfd.m4 directly.
11935 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
11936 <agriffis@toolchain.org>.
11937 * aclocal.m4, configure: Regenerated.
11938
bec39cab
AC
119392005-01-07 Andrew Cagney <cagney@gnu.org>
11940
11941 * configure.ac: Rename configure.in, require autoconf 2.59.
11942 * configure: Re-generate.
11943
434c4c77
DJ
119442004-12-08 Daniel Jacobowitz <dan@debian.org>
11945
11946 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
11947 LIBS when finished.
11948 * aclocal.m4: Regenerated.
11949 * configure: Regenerated.
11950
db1d3e1b
AS
119512004-11-21 Andreas Schwab <schwab@suse.de>
11952
11953 * linux-m68k-low.c (m68k_num_gregs): Define.
11954 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
11955 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
11956 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
11957 (m68k_breakpoint_at): New. Add to the_low_target.
11958
11959 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
11960 srv_linux_thread_db to yes.
11961
43360365
JB
119622004-10-20 Joel Brobecker <brobecker@gnat.com>
11963
11964 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
11965 (ARCH_SET_FS): Likewise.
11966 (ARCH_GET_FS): Likewise.
11967 (ARCH_GET_GS): Likewise.
11968
fd500816
DJ
119692004-10-16 Daniel Jacobowitz <dan@debian.org>
11970
11971 * linux-i386-low.c (ps_get_thread_area): New.
11972 * linux-x86-64-low.c (ps_get_thread_area): New.
11973 * linux-low.c: Include <sys/syscall.h>.
11974 (linux_kill_one_process): Don't kill the first thread here.
11975 (linux_kill): Kill the first thread here.
11976 (kill_lwp): New function.
11977 (send_sigstop, linux_send_signal): Use it.
11978 * proc-service.c: Clean up #ifdefs.
11979 (fpregset_info): Delete.
11980 (ps_lgetregs): Update and enable implementation.
11981 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
11982 implementations.
11983 * remote-utils.c (struct sym_cache, symbol_cache): New.
11984 (input_interrupt): Print a clearer message.
11985 (async_io_enabled): New variable.
11986 (enable_async_io, disable_async_io): Use it. Update comments.
11987 (look_up_one_symbol): Use the symbol cache.
11988 * thread-db.c (thread_db_look_up_symbols): New function.
11989 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
11990
f6de3c42
DJ
119912004-10-16 Daniel Jacobowitz <dan@debian.org>
11992
11993 * configure.in: Test for -rdynamic.
11994 * configure: Regenerated.
11995 * Makefile (INTERNAL_LDFLAGS): New.
11996 (gdbserver, gdbreplay): Use it.
11997
2c0fc042
AC
119982004-09-02 Andrew Cagney <cagney@gnu.org>
11999
12000 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12001
075b3282
DJ
120022004-03-23 Daniel Jacobowitz <drow@mvista.com>
12003
12004 * linux-low.c (linux_wait): Clear all_processes list also.
12005
fa6a77dc
DJ
120062004-03-12 Daniel Jacobowitz <drow@mvista.com>
12007
12008 * linux-low.c: Include <errno.h>. Remove extern declaration of
12009 errno.
12010
6d782a97
DJ
120112004-03-12 Daniel Jacobowitz <drow@mvista.com>
12012
12013 * gdbreplay.c, server.h, utils.c: Update copyright years.
12014
3a7fb99b
DJ
120152004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12016
12017 * server.c (main): Print child status or termination signal from
12018 variable 'signal', not 'sig'.
12019
c3e735a6
DJ
120202004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12021
12022 * linux-low.c (linux_read_memory): Change return type to
12023 int. Check for and return error from ptrace().
12024 * target.c (read_inferior_memory): Change return type to int. Pass
12025 back return status from the_target->read_memory().
12026 * target.h (struct target_ops): Adapt *read_memory() prototype.
12027 Update comment.
12028 (read_inferior_memory): Adapt prototype.
12029 * server.c (main): Return an error packet if
12030 read_inferior_memory() returns an error.
12031
a59d1c82
DJ
120322004-03-04 Daniel Jacobowitz <drow@mvista.com>
12033
12034 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12035 Unify with other clean targets.
12036
dc3f8883
DJ
120372004-02-29 Daniel Jacobowitz <drow@mvista.com>
12038
12039 * server.c (handle_v_cont): Call set_desired_inferior.
12040
89a208da
DJ
120412004-02-29 Daniel Jacobowitz <drow@mvista.com>
12042
12043 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12044
62ea82f5
DJ
120452004-02-29 Daniel Jacobowitz <drow@mvista.com>
12046
12047 * linux-low.c (linux_wait): Unblock async I/O.
12048 (linux_resume): Block and enable async I/O.
12049 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12050 * server.h (block_async_io, unblock_async_io): Add prototypes.
12051
6910d122
DJ
120522004-02-29 Daniel Jacobowitz <drow@mvista.com>
12053
12054 * remote-utils.c (remote_open): Print a status notice after
12055 opening a TCP port.
12056 * server.c (attach_inferior): Print a status notice after
12057 attaching.
12058
120592004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
12060
12061 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12062
c89dc5d4
DJ
120632004-02-26 Daniel Jacobowitz <drow@mvista.com>
12064
12065 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12066 error packet.
12067 * server.c, target.h: Update copyright years.
12068
4b8dad4a
RM
120692004-02-25 Roland McGrath <roland@redhat.com>
12070
12071 * target.h (struct target_ops): New member `read_auxv'.
12072 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12073 * linux-low.c (linux_read_auxv): New function.
12074 (linux_target_ops): Initialize `read_auxv' member to that.
12075
d7446758
JB
120762004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12077
12078 Committed by Jim Blandy <jimb@redhat.com>.
12079
12080 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 12081 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
12082 instead of GPR_SIZE to distiguish s390 and s390x targets.
12083
5544ad89
DJ
120842004-01-31 Daniel Jacobowitz <drow@mvista.com>
12085
12086 * linux-low.c: Update copyright year.
12087 (check_removed_breakpoint): Clear pending_is_breakpoint.
12088 (linux_set_resume_request, linux_queue_one_thread)
12089 (resume_status_pending_p): New functions.
12090 (linux_continue_one_thread): Use process->resume.
12091 (linux_resume): Only resume threads if there are no pending events.
12092 * linux-low.h (struct process_info): Add resume request
12093 pointer.
12094
2a68b70e
DJ
120952004-01-30 Daniel Jacobowitz <drow@mvista.com>
12096
12097 * regcache.c (new_register_cache): Clear the allocated register
12098 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12099
64386c31
DJ
121002003-10-13 Daniel Jacobowitz <drow@mvista.com>
12101
12102 * linux-low.c (linux_resume): Take a struct thread_resume *
12103 argument.
12104 (linux_wait): Update call.
12105 (resume_ptr): New static variable.
12106 (linux_continue_one_thread): Renamed from
12107 linux_continue_one_process. Use resume_ptr.
12108 (linux_resume): Use linux_continue_one_thread.
12109 * server.c (handle_v_cont, handle_v_requests): New functions.
12110 (myresume): New function.
12111 (main): Handle 'v' case.
12112 * target.h (struct thread_resume): New type.
12113 (struct target_ops): Change argument of "resume" to struct
12114 thread_resume *.
12115 (myresume): Delete macro.
12116
c938e9b0
L
121172003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12118
12119 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12120 (uninstall): Support DESTDIR.
12121
7f313d07
BC
12122Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12123
12124 * configure.srv: Add xscale*linux copy of arm*linux entry.
12125
3b2fc2ea
DJ
121262003-07-24 Daniel Jacobowitz <drow@mvista.com>
12127
12128 * linux-arm-low.c (arm_reinsert_addr): New function.
12129 (the_low_target): Add arm_reinsert_addr.
12130
1c0a559e
MK
121312003-07-08 Mark Kettenis <kettenis@gnu.org>
12132
12133 * mem-break.c: Remove whitespace at end of file.
12134
43d5792c
DJ
121352003-06-28 Daniel Jacobowitz <drow@mvista.com>
12136
12137 * configure.in: Check whether we need to prototype strerror.
12138 * server.h: Optionally prototype strerror.
12139 * gdbreplay.c (perror_with_name): Use strerror.
12140 * linux-low.c (linux_attach_lwp): Use strerror.
12141 * utils.c (perror_with_name): Use strerror.
12142 * config.in, configure: Regenerated.
12143
c8a86edf
DJ
121442003-06-28 Daniel Jacobowitz <drow@mvista.com>
12145
12146 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12147 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12148
73d37363
DJ
121492003-06-20 Daniel Jacobowitz <drow@mvista.com>
12150
12151 * Makefile.in (SFILES): Update.
12152 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12153 low-sun3.c: Remove files.
12154
6ad8ae5c
DJ
121552003-06-17 Daniel Jacobowitz <drow@mvista.com>
12156
12157 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12158 (linux_detach_one_process, linux_detach): New functions.
12159 (linux_target_ops): Add linux_detach.
12160 * server.c (main): Handle 'D' packet.
12161 * target.h (struct target_ops): Add "detach" member.
12162 (detach_inferior): Define.
12163
1581182a
MK
121642003-06-13 Mark Kettenis <kettenis@gnu.org>
12165
12166 From Kelley Cook <kelleycook@wideopenwest.com>:
12167 * configure.srv: Accept i[34567]86 variants.
12168
e5379b03
DJ
121692003-06-05 Daniel Jacobowitz <drow@mvista.com>
12170
12171 * linux-low.c (linux_wait_for_event): Correct comment typos.
12172 (linux_resume_one_process): Call check_removed_breakpoint.
12173 (linux_send_signal): New function.
12174 (linux_target_ops): Add linux_send_signal.
12175 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12176 of kill.
12177 * target.h (struct target_ops): Add send_signal.
12178
2ff29de4
JB
121792003-05-29 Jim Blandy <jimb@redhat.com>
12180
12181 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12182 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12183 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12184 away part of the register's value.
12185
254787d4
DJ
121862003-03-26 Daniel Jacobowitz <drow@mvista.com>
12187
12188 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12189 (linux_wait_for_event, linux_init_signals): Likewise.
12190
94e10508
DJ
121912003-03-17 Daniel Jacobowitz <drow@mvista.com>
12192
12193 * configure.in: Check for stdlib.h.
12194 * configure: Regenerated.
12195 * config.in: Regenerated.
12196
4c0711e0
DJ
121972003-01-04 Andreas Schwab <schwab@suse.de>
12198
12199 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12200
ef66e766
AC
122012003-01-02 Andrew Cagney <ac131313@redhat.com>
12202
12203 * Makefile.in: Remove obsolete code.
12204
a1358604
DJ
122052002-11-20 Daniel Jacobowitz <drow@mvista.com>
12206
12207 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12208 defined(PT_FPR0_HI).
12209
23ce3b1c
DJ
122102002-11-17 Stuart Hughes <seh@zee2.com>
12211
12212 * linux-arm-low.c (arm_num_regs): Increase.
12213 (arm_regmap): Include status register.
12214
122152002-11-17 Daniel Jacobowitz <drow@mvista.com>
12216
12217 * linux-low.c (register_addr): Remove incorrect -1 check.
12218
a9fa9f7d
DJ
122192002-08-29 Daniel Jacobowitz <drow@mvista.com>
12220
12221 * linux-low.c (linux_create_inferior): Call setpgid. Return
12222 the new PID.
12223 (unstopped_p, linux_signal_pid): Remove.
12224 (linux_target_ops): Remove linux_signal_pid.
12225 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12226 global instead of target method.
12227 * target.h (struct target_ops): Remove signal_pid. Update comment
12228 for create_inferior.
12229 * server.c (signal_pid): New variable.
12230 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 12231 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
12232 (attach_inferior): Set signal_pid.
12233
17574093
DJ
122342002-08-23 Daniel Jacobowitz <drow@mvista.com>
12235
12236 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12237
122382002-08-20 Jim Blandy <jimb@redhat.com>
12239
12240 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12241 default for this.
12242
122432002-08-01 Andrew Cagney <cagney@redhat.com>
12244
12245 * Makefile.in: Make chill references obsolete.
12246
122472002-07-24 Kevin Buettner <kevinb@redhat.com>
12248
12249 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12250 * configure: Regenerate.
12251 * config.in: Regenerate.
12252
122532002-07-09 David O'Brien <obrien@FreeBSD.org>
12254
12255 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12256 (perror_with_name, remote_close, remote_open, expect, play): Static.
12257
122582002-07-04 Michal Ludvig <mludvig@suse.cz>
12259
4b8dad4a 12260 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
12261 byte offsets instead of an array of indexes.
12262 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12263
122642002-06-13 Daniel Jacobowitz <drow@mvista.com>
12265
12266 * regcache.c: Add comment.
12267
122682002-06-11 Daniel Jacobowitz <drow@mvista.com>
12269
12270 * thread-db.c: New file.
12271 * proc-service.c: New file.
12272 * acinclude.m4: New file.
12273 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12274 proc-service.o, and thread-db.o.
12275 (linux-low.o): Add USE_THREAD_DB.
12276 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12277 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12278 * aclocal.m4: Regenerated.
12279 * config.in: Regenerated.
12280 * configure: Regenerated.
12281 * configure.in: Check for proc_service.h, sys/procfs.h,
12282 thread_db.h, and linux/elf.h headrs.
12283 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12284 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12285 Check for -lthread_db and thread support.
12286 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12287 PowerPC, and SuperH.
12288 * i387-fp.c: Constify arguments.
12289 * i387-fp.h: Likewise.
12290 * inferiors.c: (struct thread_info): Renamed from
12291 `struct inferior_info'. Remove PID member. Use generic inferior
12292 list header. All uses updated.
12293 (inferiors, signal_pid): Removed.
12294 (all_threads): New variable.
12295 (get_thread): Define.
12296 (add_inferior_to_list): New function.
12297 (for_each_inferior): New function.
12298 (change_inferior_id): New function.
12299 (add_inferior): Removed.
12300 (remove_inferior): New function.
12301 (add_thread): New function.
12302 (free_one_thread): New function.
12303 (remove_thread): New function.
12304 (clear_inferiors): Use for_each_inferior and free_one_thread.
12305 (find_inferior): New function.
12306 (find_inferior_id): New function.
12307 (inferior_target_data): Update argument type.
12308 (set_inferior_target_data): Likewise.
12309 (inferior_regcache_data): Likewise.
12310 (set_inferior_regcache_data): Likewise.
12311 * linux-low.c (linux_bp_reinsert): Remove.
12312 (all_processes, stopping_threads, using_thrads)
12313 (struct pending_signals, debug_threads, pid_of): New.
12314 (inferior_pid): Replace with macro.
12315 (struct inferior_linux_data): Remove.
12316 (get_stop_pc, add_process): New functions.
12317 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12318 Use add_process and add_thread.
12319 (linux_attach_lwp): New function, based on old linux_attach. Use
12320 add_process and add_thread. Set stop_expected for new threads.
12321 (linux_attach): New function.
12322 (linux_kill_one_process): New function.
12323 (linux_kill): Kill all LWPs.
12324 (linux_thread_alive): Use find_inferior_id.
12325 (check_removed_breakpoints, status_pending_p): New functions.
12326 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12327 Update. Use WNOHANG. Wait for cloned processes also. Update process
12328 struct for the found process.
12329 (linux_wait_for_event): New function.
12330 (linux_wait): Use it. Support LWPs.
12331 (send_sigstop, wait_for_sigstop, stop_all_processes)
12332 (linux_resume_one_process, linux_continue_one_process): New functions.
12333 (linux_resume): Support LWPs.
12334 (REGISTER_RAW_SIZE): Remove.
12335 (fetch_register): Use register_size instead. Call supply_register.
12336 (usr_store_inferior_registers): Likewise. Call collect_register.
12337 Fix recursive case.
12338 (regsets_fetch_inferior_registers): Improve error message.
12339 (regsets_store_inferior_registers): Add debugging.
12340 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12341 (unstopped_p, linux_signal_pid): New functions.
12342 (linux_target_ops): Add linux_signal_pid.
12343 (linux_init_signals): New function.
12344 (initialize_low): Call it. Initialize using_threads.
12345 * regcache.c (inferior_regcache_data): Add valid
12346 flag.
12347 (get_regcache): Fetch registers lazily. Add fetch argument
12348 and update all callers.
12349 (regcache_invalidate_one, regcache_invalidate): New
12350 functions.
12351 (new_register_cache): Renamed from create_register_cache.
12352 Return the new regcache.
12353 (free_register_cache): Change argument to a void *.
12354 (registers_to_string, registers_from_string): Call get_regcache
12355 with fetch flag set.
12356 (register_data): Make static. Pass fetch flag to get_regcache.
12357 (supply_register): Call get_regcache with fetch flag clear.
12358 (collect_register): Call get_regcache with fetch flag set.
12359 (collect_register_as_string): New function.
12360 * regcache.h: Update.
12361 * remote-utils.c (putpkt): Flush after debug output and use
12362 stderr.
12363 Handle input interrupts while waiting for an ACK.
12364 (input_interrupt): Use signal_pid method.
12365 (getpkt): Flush after debug output and use stderr.
12366 (outreg): Use collect_register_as_string.
12367 (new_thread_notify, dead_thread_notify): New functions.
12368 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12369 and general_thread.
12370 (look_up_one_symbol): Flush after debug output.
12371 * server.c (step_thread, server_waiting): New variables.
12372 (start_inferior): Don't use signal_pid. Update call to mywait.
12373 (attach_inferior): Update call to mywait.
12374 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12375 (main): Don't fetch/store registers explicitly. Use
12376 set_desired_inferior. Support proposed ``Hs'' packet. Update
12377 calls to mywait.
12378 * server.h: Update.
12379 (struct inferior_list, struct_inferior_list_entry): New.
12380 * target.c (set_desired_inferior): New.
12381 (write_inferior_memory): Constify.
12382 (mywait): New function.
12383 * target.h: Update.
12384 (struct target_ops): New signal_pid method.
12385 (mywait): Removed macro, added prototype.
12386
12387 * linux-low.h (regset_func): Removed.
12388 (regset_fill_func, regset_store_func): New.
12389 (enum regset_type): New.
12390 (struct regset_info): Add type field. Use new operation types.
12391 (struct linux_target_ops): stop_pc renamed to get_pc.
12392 Add decr_pc_after_break and breakpoint_at.
12393 (get_process, get_thread_proess, get_process_thread)
12394 (strut process_info, all_processes, linux_attach_lwp)
12395 (thread_db_init): New.
12396
12397 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12398 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12399 (the_low_target): Add new members.
12400 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12401 (i386_store_fpxregset): Constify.
12402 (target_regsets): Add new kind identifier.
12403 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12404 (i386_set_pc): Add debugging.
12405 (i386_breakpoint_at): New function.
12406 (the_low_target): Add new members.
12407 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12408 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12409 (mips_breakpoint_at): New.
12410 (the_low_target): Add new members.
12411 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12412 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12413 (the_low_target): Add new members.
12414 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12415 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12416 (the_low_target): Add new members.
12417 * linux-x86-64-low.c (target_regsets): Add new kind
12418 identifier.
12419
124202002-05-15 Daniel Jacobowitz <drow@mvista.com>
12421
12422 From Martin Pool <mbp@samba.org>:
12423 * server.c (gdbserver_usage): New function.
12424 (main): Call it.
12425
124262002-05-14 Daniel Jacobowitz <drow@mvista.com>
12427
12428 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12429 stop_at -> stop_pc.
12430
124312002-05-04 Andrew Cagney <ac131313@redhat.com>
12432
12433 * Makefile.in: Remove obsolete code.
12434
124352002-04-24 Michal Ludvig <mludvig@suse.cz>
12436
12437 * linux-low.c (regsets_fetch_inferior_registers),
12438 (regsets_store_inferior_registers): Removed cast to int from
12439 ptrace() calls.
12440 * regcache.h: Added declaration of struct inferior_info.
12441
124422002-04-20 Daniel Jacobowitz <drow@mvista.com>
12443
12444 * inferiors.c (struct inferior_info): Add regcache_data.
12445 (add_inferior): Call create_register_cache.
12446 (clear_inferiors): Call free_register_cache.
12447 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12448 * regcache.c (struct inferior_regcache_data): New.
12449 (registers): Remove.
12450 (get_regcache): New function.
12451 (create_register_cache, free_register_cache): New functions.
12452 (set_register_cache): Don't initialize the register cache here.
12453 (registers_to_string, registers_from_string, register_data): Call
12454 get_regcache.
12455 * regcache.h: Add prototypes.
12456 * server.h: Likewise.
12457
124582002-04-20 Daniel Jacobowitz <drow@mvista.com>
12459
12460 * mem-break.c: New file.
12461 * mem-break.h: New file.
12462 * Makefile.in: Add mem-break.o rule; update server.h
12463 dependencies.
12464 * inferiors.c (struct inferior_info): Add target_data
12465 member.
12466 (clear_inferiors): Free target_data member if set.
12467 (inferior_target_data, set_inferior_target_data): New functions.
12468 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12469 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12470 * linux-low.c (linux_bp_reinsert): New variable.
12471 (struct inferior_linux_data): New.
12472 (linux_create_inferior): Use set_inferior_target_data.
12473 (linux_attach): Likewise. Call add_inferior.
12474 (linux_wait_for_one_inferior): New function.
12475 (linux_wait): Call it.
12476 (linux_write_memory): Add const.
12477 (initialize_low): Call set_breakpoint_data.
12478 * linux-low.h (struct linux_target_ops): Add breakpoint
12479 handling members.
12480 * server.c (attach_inferior): Remove extra add_inferior
12481 call.
12482 * server.h: Include mem-break.h. Update inferior.c
12483 prototypes.
12484 * target.c (read_inferior_memory)
12485 (write_inferior_memory): New functions.
12486 * target.h (read_inferior_memory)
12487 (write_inferior_memory): Change macros to prototypes.
12488 (struct target_ops): Update comments. Add const to write_memory
12489 definition.
12490
124912002-04-11 Daniel Jacobowitz <drow@mvista.com>
12492
12493 * linux-low.c (usr_store_inferior_registers): Support
12494 registers which are allowed to fail to store.
12495 * linux-low.h (linux_target_ops): Likewise.
12496 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12497 (ppc_cannot_store_register): FPSCR may not be storable.
12498
124992002-04-09 Daniel Jacobowitz <drow@mvista.com>
12500
12501 * server.h: Include <string.h> if HAVE_STRING_H.
12502 * ChangeLog: Correct paths in last ChangeLog entry.
12503
125042002-04-09 Daniel Jacobowitz <drow@mvista.com>
12505
12506 * linux-low.h: Remove obsolete prototypes.
12507 (struct linux_target_ops): New.
12508 (extern the_low_target): New.
12509 * linux-low.c (num_regs, regmap): Remove declarations.
12510 (register_addr): Use the_low_target explicitly.
12511 (fetch_register): Likewise.
12512 (usr_fetch_inferior_registers): Likewise.
12513 (usr_store_inferior_registers): Likewise.
12514 * linux-arm-low.c (num_regs): Remove.
12515 (arm_num_regs): Define.
12516 (arm_regmap): Renamed from regmap, made static.
12517 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12518 made static.
12519 (arm_cannot_store_register): Renamed from cannot_store_register,
12520 made static.
12521 (the_low_target): New.
12522 * linux-i386-low.c (num_regs): Remove.
12523 (i386_num_regs): Define.
12524 (i386_regmap): Renamed from regmap, made static.
12525 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12526 made static.
12527 (i386_cannot_store_register): Renamed from cannot_store_register,
12528 made static.
12529 (the_low_target): New.
12530 * linux-ia64-low.c (num_regs): Remove.
12531 (ia64_num_regs): Define.
12532 (ia64_regmap): Renamed from regmap, made static.
12533 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12534 made static.
12535 (ia64_cannot_store_register): Renamed from cannot_store_register,
12536 made static.
12537 (the_low_target): New.
12538 * linux-m68k-low.c (num_regs): Remove.
12539 (m68k_num_regs): Define.
12540 (m68k_regmap): Renamed from regmap, made static.
12541 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12542 made static.
12543 (m68k_cannot_store_register): Renamed from cannot_store_register,
12544 made static.
12545 (the_low_target): New.
12546 * linux-mips-low.c (num_regs): Remove.
12547 (mips_num_regs): Define.
12548 (mips_regmap): Renamed from regmap, made static.
12549 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12550 made static.
12551 (mips_cannot_store_register): Renamed from cannot_store_register,
12552 made static.
12553 (the_low_target): New.
12554 * linux-ppc-low.c (num_regs): Remove.
12555 (ppc_num_regs): Define.
12556 (ppc_regmap): Renamed from regmap, made static.
12557 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12558 made static.
12559 (ppc_cannot_store_register): Renamed from cannot_store_register,
12560 made static.
12561 (the_low_target): New.
12562 * linux-s390-low.c (num_regs): Remove.
12563 (s390_num_regs): Define.
12564 (s390_regmap): Renamed from regmap, made static.
12565 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12566 made static.
12567 (s390_cannot_store_register): Renamed from cannot_store_register,
12568 made static.
12569 (the_low_target): New.
12570 * linux-sh-low.c (num_regs): Remove.
12571 (sh_num_regs): Define.
12572 (sh_regmap): Renamed from regmap, made static.
12573 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12574 made static.
12575 (sh_cannot_store_register): Renamed from cannot_store_register,
12576 made static.
12577 (the_low_target): New.
12578 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12579 (the_low_target): New.
12580
125812002-04-09 Daniel Jacobowitz <drow@mvista.com>
12582
12583 * Makefile.in: Add stamp-h target.
12584 * configure.in: Create stamp-h.
12585 * configure: Regenerated.
12586
125872002-04-09 Daniel Jacobowitz <drow@mvista.com>
12588
12589 * inferiors.c: New file.
12590 * target.c: New file.
12591 * target.h: New file.
12592 * Makefile.in: Add target.o and inferiors.o. Update
12593 dependencies.
12594 * linux-low.c (inferior_pid): New static variable,
12595 moved from server.c.
12596 (linux_create_inferior): Renamed from create_inferior.
12597 Call add_inferior. Return 0 on success instead of a PID.
12598 (linux_attach): Renamed from myattach.
12599 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12600 (linux_thread_alive): Renamed from mythread_alive.
12601 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12602 child dies.
12603 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12604 (regsets_store_inferior_registers): Correct error message.
12605 Add missing ``return 0''.
12606 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12607 (linux_store_registers): Renamed from store_inferior_registers.
12608 (linux_read_memory): Renamed from read_inferior_memory.
12609 (linux_write_memory): Renamed from write_inferior_memory.
12610 (linux_target_ops): New structure.
12611 (initialize_low): Call set_target_ops ().
12612 * remote-utils.c (unhexify): New function.
12613 (hexify): New function.
12614 (input_interrupt): Send signals to ``signal_pid''.
12615 * server.c (inferior_pid): Remove.
12616 (start_inferior): Update create_inferior call.
12617 (attach_inferior): Call add_inferior.
12618 (handle_query): New function.
12619 (main): Call handle_query for `q' packets.
12620 * server.h: Include "target.h". Remove obsolete prototypes.
12621 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12622
126232002-04-09 Daniel Jacobowitz <drow@mvista.com>
12624
12625 * Makefile.in: Add WARN_CFLAGS. Update configury
12626 dependencies.
12627 * configure.in: Check for <string.h>
12628 * configure: Regenerate.
12629 * config.in: Regenerate.
12630 * gdbreplay.c: Include needed system headers.
12631 (remote_open): Remove strchr prototype.
12632 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12633 * regcache.c (supply_register): Change buf argument to const void *.
12634 (supply_register_by_name): Likewise.
12635 (collect_register): Change buf argument to void *.
12636 (collect_register_by_name): Likewise.
12637 * regcache.h: Add missing prototypes.
12638 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12639 * server.c (handle_query): New function.
12640 (attached): New static variable, moved out of main.
12641 (main): Quiet longjmp clobber warnings.
12642 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12643 * utils.c (error): Remove NORETURN.
12644 (fatal): Likewise.