gdbserver: enum gdb_signal casts
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
e053fbc4
PA
12015-10-29 Pedro Alves <palves@redhat.com>
2
3 * server.c (handle_v_cont, process_serial_event): Add enum
4 gdb_signal casts to signal parsing code.
5
add67df8
PA
62015-10-29 Pedro Alves <palves@redhat.com>
7
8 * linux-low.h (NULL_REGSET): Define.
9 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
10 * linux-arm-low.c (arm_regsets): Likewise.
11 * linux-crisv32-low.c (cris_regsets): Likewise.
12 * linux-m68k-low.c (m68k_regsets): Likewise.
13 * linux-mips-low.c (mips_regsets): Likewise.
14 * linux-nios2-low.c (nios2_regsets): Likewise.
15 * linux-ppc-low.c (ppc_regsets): Likewise.
16 * linux-s390-low.c (s390_regsets): Likewise.
17 * linux-sh-low.c (sh_regsets): Likewise.
18 * linux-sparc-low.c (sparc_regsets): Likewise.
19 * linux-tic6x-low.c (tic6x_regsets): Likewise.
20 * linux-tile-low.c (tile_regsets): Likewise.
21 * linux-x86-low.c (x86_regsets): Likewise.
22 * linux-xtensa-low.c (xtensa_regsets): Likewise.
23
50bc912a
PA
242015-10-29 Pedro Alves <palves@redhat.com>
25
26 * linux-low.h (NULL_REGSET): Define.
27 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
28 * linux-arm-low.c (arm_regsets): Likewise.
29 * linux-crisv32-low.c (cris_regsets): Likewise.
30 * linux-m68k-low.c (m68k_regsets): Likewise.
31 * linux-mips-low.c (mips_regsets): Likewise.
32 * linux-nios2-low.c (nios2_regsets): Likewise.
33 * linux-ppc-low.c (ppc_regsets): Likewise.
34 * linux-s390-low.c (s390_regsets): Likewise.
35 * linux-sh-low.c (sh_regsets): Likewise.
36 * linux-sparc-low.c (sparc_regsets): Likewise.
37 * linux-tic6x-low.c (tic6x_regsets): Likewise.
38 * linux-tile-low.c (tile_regsets): Likewise.
39 * linux-x86-low.c (x86_regsets): Likewise.
40 * linux-xtensa-low.c (xtensa_regsets): Likewise.
41
682b2546
DE
422015-10-26 Doug Evans <dje@google.com>
43
44 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
45
963843d4
DE
462015-10-26 Doug Evans <dje@google.com>
47
48 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
49
d41401ac
DE
502015-10-26 Doug Evans <dje@google.com>
51
52 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
53 for debug_printf.
54 (attach_thread, find_new_threads_callback): Ditto.
55
3db28855
AT
562015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
57
58 * mem-break.h (set_breakpoint_data): Remove.
59
fb78e89c
AT
602015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
61
62 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
63 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
64 (initialize_low): Remove set_breakpoint_data call.
65 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
66 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
67 (initialize_low): Remove set_breakpoint_data call.
68 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
69 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
70 (initialize_low): Remove set_breakpoint_data call.
71
2e6ee069
AT
722015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
73
74 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
75 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
76 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
77 * target.h (target_breakpoint_kind_from_pc): New macro.
78
1652a986
AT
792015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
80
81 * linux-low.c (default_breakpoint_kind_from_pc): New function.
82 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
83 the default breakpoint kind.
84
abeead09
AT
852015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
86
87 * linux-arm-low.c (arm_supports_z_point_type): Add software
88 breakpoint support.
89
b0b4b501
AT
902015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
91
92 * linux-arm-low.c: Refactor breakpoint definitions.
93 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
94 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
95
8689682c
AT
962015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
97
98 * Makefile.in: Add arm.c/o.
99 * configure.srv: Likewise.
100 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
101 (arm_breakpoint_kind_from_pc): New function.
102 (arm_sw_breakpoint_from_kind): Return proper kind.
103 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
104
27165294
AT
1052015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
106
107 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
108 removal.
109 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
110 (struct raw_breakpoint) <size>: Remove.
111 (struct raw_breakpoint) <kind>: Add.
112 (bp_size): New function.
113 (bp_opcode): Likewise.
114 (find_raw_breakpoint_at): Adjust for kind.
115 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
116 (remove_memory_breakpoint): Adjust for kind call bp_size.
117 (set_raw_breakpoint_at): Adjust for kind.
118 (set_breakpoint): Likewise.
119 (set_breakpoint_at): Call breakpoint_kind_from_pc.
120 (delete_raw_breakpoint): Adjust for kind.
121 (delete_breakpoint): Likewise.
122 (find_gdb_breakpoint): Likewise.
123 (set_gdb_breakpoint_1): Likewise.
124 (set_gdb_breakpoint): Likewise.
125 (delete_gdb_breakpoint_1): Likewise.
126 (delete_gdb_breakpoint): Likewise.
127 (uninsert_raw_breakpoint): Likewise.
128 (reinsert_raw_breakpoint): Likewise.
129 (set_breakpoint_data): Remove.
130 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
131 (check_mem_read): Adjust for kind call bp_size.
132 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
133 (clone_one_breakpoint): Adjust for kind.
134 * mem-break.h (set_gdb_breakpoint): Likewise.
135 (delete_gdb_breakpoint): Likewise.
136 * server.c (process_serial_event): Likewise.
137
dd373349
AT
1382015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
139
140 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
141 (struct linux_target_ops) <breakpoint>: Remove.
142 (struct linux_target_ops) <breakpoint_len>: Remove.
143 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
144 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
145 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
146 (arm_sw_breakpoint_from_kind): New function.
147 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
148 (struct linux_target_ops) <breakpoint>: Remove.
149 (struct linux_target_ops) <breakpoint_len>: Remove.
150 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
151 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
152 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
153 (struct linux_target_ops) <breakpoint>: Remove.
154 (struct linux_target_ops) <breakpoint_len>: Remove.
155 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
156 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
157 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
158 (struct linux_target_ops) <breakpoint>: Remove.
159 (struct linux_target_ops) <breakpoint_len>: Remove.
160 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
161 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
162 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
163 and sw_breakpoint_from_kind to increment the pc.
164 (linux_breakpoint_kind_from_pc): New function.
165 (linux_sw_breakpoint_from_kind): New function.
166 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
167 (initialize_low): Call breakpoint_kind_from_pc and
168 sw_breakpoint_from_kind to replace breakpoint_data/len.
169 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
170 New field.
171 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
172 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
173 (struct linux_target_ops) <breakpoint>: Remove.
174 (struct linux_target_ops) <breakpoint_len>: Remove.
175 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
176 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
177 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
178 (struct linux_target_ops) <breakpoint>: Remove.
179 (struct linux_target_ops) <breakpoint_len>: Remove.
180 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
181 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
182 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
183 (struct linux_target_ops) <breakpoint>: Remove.
184 (struct linux_target_ops) <breakpoint_len>: Remove.
185 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
186 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
187 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
188 (struct linux_target_ops) <breakpoint>: Remove.
189 (struct linux_target_ops) <breakpoint_len>: Remove.
190 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
191 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
192 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
193 (struct linux_target_ops) <breakpoint>: Remove.
194 (struct linux_target_ops) <breakpoint_len>: Remove.
195 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
196 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
197 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
198 (struct linux_target_ops) <breakpoint>: Remove.
199 (struct linux_target_ops) <breakpoint_len>: Remove.
200 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
201 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
202 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
203 (struct linux_target_ops) <breakpoint>: Remove.
204 (struct linux_target_ops) <breakpoint_len>: Remove.
205 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
206 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
207 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
208 (struct linux_target_ops) <breakpoint>: Remove.
209 (struct linux_target_ops) <breakpoint_len>: Remove.
210 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
211 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
212 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
213 (struct linux_target_ops) <breakpoint>: Remove.
214 (struct linux_target_ops) <breakpoint_len>: Remove.
215 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
216 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
217 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
218 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
219 (struct linux_target_ops) <breakpoint>: Remove.
220 (struct linux_target_ops) <breakpoint_len>: Remove.
221 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
222 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
223 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
224 (struct linux_target_ops) <breakpoint>: Remove.
225 (struct linux_target_ops) <breakpoint_len>: Remove.
226 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
227 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
228
4cd98a19
AT
2292015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
230
231 * linux-cris-low.c (cris_get_pc): Remove void arg.
232
774ee6d2
AR
2332015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
234
235 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
236 variable name.
237
833dcd29
AR
2382015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
239
240 * inferiors.c (thread_pid_matches_callback): New function.
241 (find_thread_process): New function.
242 (remove_thread): Reset current_thread.
243 (remove_process): Assert threads have been removed first.
244
8d689ee5
YQ
2452015-10-15 Yao Qi <yao.qi@linaro.org>
246
247 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
248 if it is 3.
249 (aarch64_remove_point): Likewise.
250 * regcache.c (regcache_register_size): New function.
251
1c2e1515
YQ
2522015-10-12 Yao Qi <yao.qi@linaro.org>
253
254 * linux-aarch64-low.c: Update all callers as emit_load_store
255 is renamed to aarch64_emit_load_store.
256
e1c587c3
YQ
2572015-10-12 Yao Qi <yao.qi@linaro.org>
258
259 * linux-aarch64-low.c: Update all callers of function renaming
260 from emit_insn to aarch64_emit_insn.
261
b6542f81
YQ
2622015-10-12 Yao Qi <yao.qi@linaro.org>
263
264 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
265 arch/aarch64-insn.h.
266 (struct aarch64_memory_operand): Likewise.
267 (ENCODE): Likewise.
268 (emit_insn): Move to arch/aarch64-insn.c.
269 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
270 (emit_load_store): Move to arch/aarch64-insn.c.
271 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
272 (can_encode_int32): Remove.
273
246994ce
YQ
2742015-10-12 Yao Qi <yao.qi@linaro.org>
275
276 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
277 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
278 (aarch64_relocate_instruction): Likewise.
279 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
280 (struct aarch64_insn_visitor): Likewise.
281
0badd99f
YQ
2822015-10-12 Yao Qi <yao.qi@linaro.org>
283
284 * linux-aarch64-low.c (struct aarch64_insn_data): New.
285 (struct aarch64_insn_visitor): New.
286 (struct aarch64_insn_relocation_data): New.
287 (aarch64_ftrace_insn_reloc_b): New function.
288 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
289 (aarch64_ftrace_insn_reloc_cb): Likewise.
290 (aarch64_ftrace_insn_reloc_tb): Likewise.
291 (aarch64_ftrace_insn_reloc_adr): Likewise.
292 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
293 (aarch64_ftrace_insn_reloc_others): Likewise.
294 (visitor): New.
295 (aarch64_relocate_instruction): Use visitor.
296
dfaffe9d
YQ
2972015-10-12 Yao Qi <yao.qi@linaro.org>
298
299 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
300 int. Add argument buf.
301 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
302 aarch64_relocate_instruction.
303
70b439f0
YQ
3042015-10-12 Yao Qi <yao.qi@linaro.org>
305
306 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
307 argument insn. Remove local variable insn. Don't call
308 target_read_uint32.
309 (aarch64_install_fast_tracepoint_jump_pad): Call
310 target_read_uint32.
311
7781c06f
YQ
3122015-09-30 Yao Qi <yao.qi@linaro.org>
313
314 * linux-aarch64-low.c (emit_movk): Shorten a long line.
315 (emit_load_store_pair): Likewise.
316
9a3c8263
SM
3172015-09-25 Simon Marchi <simon.marchi@ericsson.com>
318
319 * dll.c (match_dll): Add cast(s).
320 (unloaded_dll): Likewise.
321 * linux-low.c (second_thread_of_pid_p): Likewise.
322 (delete_lwp_callback): Likewise.
323 (count_events_callback): Likewise.
324 (select_event_lwp_callback): Likewise.
325 (linux_set_resume_request): Likewise.
326 * server.c (accumulate_file_name_length): Likewise.
327 (emit_dll_description): Likewise.
328 (handle_qxfer_threads_worker): Likewise.
329 (visit_actioned_threads): Likewise.
330 * thread-db.c (any_thread_of): Likewise.
331 * tracepoint.c (same_process_p): Likewise.
332 (match_blocktype): Likewise.
333 (build_traceframe_info_xml): Likewise.
334
224c3ddb
SM
3352015-09-25 Simon Marchi <simon.marchi@ericsson.com>
336
337 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
338 assignment.
339 (gdb_unparse_agent_expr): Likewise.
340 * hostio.c (require_data): Likewise.
341 (handle_pread): Likewise.
342 * linux-low.c (disable_regset): Likewise.
343 (fetch_register): Likewise.
344 (store_register): Likewise.
345 (get_dynamic): Likewise.
346 (linux_qxfer_libraries_svr4): Likewise.
347 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
348 (set_fast_tracepoint_jump): Likewise.
349 (uninsert_fast_tracepoint_jumps_at): Likewise.
350 (reinsert_fast_tracepoint_jumps_at): Likewise.
351 (validate_inserted_breakpoint): Likewise.
352 (clone_agent_expr): Likewise.
353 * regcache.c (init_register_cache): Likewise.
354 * remote-utils.c (putpkt_binary_1): Likewise.
355 (decode_M_packet): Likewise.
356 (decode_X_packet): Likewise.
357 (look_up_one_symbol): Likewise.
358 (relocate_instruction): Likewise.
359 (monitor_output): Likewise.
360 * server.c (handle_search_memory): Likewise.
361 (handle_qxfer_exec_file): Likewise.
362 (handle_qxfer_libraries): Likewise.
363 (handle_qxfer): Likewise.
364 (handle_query): Likewise.
365 (handle_v_cont): Likewise.
366 (handle_v_run): Likewise.
367 (captured_main): Likewise.
368 * target.c (write_inferior_memory): Likewise.
369 * thread-db.c (try_thread_db_load_from_dir): Likewise.
370 * tracepoint.c (init_trace_buffer): Likewise.
371 (add_tracepoint_action): Likewise.
372 (add_traceframe): Likewise.
373 (add_traceframe_block): Likewise.
374 (cmd_qtdpsrc): Likewise.
375 (cmd_qtdv): Likewise.
376 (cmd_qtstatus): Likewise.
377 (response_source): Likewise.
378 (response_tsv): Likewise.
379 (cmd_qtnotes): Likewise.
380 (gdb_collect): Likewise.
381 (initialize_tracepoint): Likewise.
382
afbe19f8
PL
3832015-09-21 Pierre Langlois <pierre.langlois@arm.com>
384
385 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
386 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
387 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
388 <NOP>: New.
389 (enum aarch64_condition_codes): New enum.
390 (w0): New static global.
391 (fp): Likewise.
392 (lr): Likewise.
393 (struct aarch64_memory_operand) <type>: New
394 MEMORY_OPERAND_POSTINDEX type.
395 (postindex_memory_operand): New helper function.
396 (emit_ret): New function.
397 (emit_load_store_pair): New function, factored out of emit_stp
398 with support for MEMORY_OPERAND_POSTINDEX.
399 (emit_stp): Rewrite using emit_load_store_pair.
400 (emit_ldp): New function.
401 (emit_load_store): Likewise.
402 (emit_ldr): Mention post-index instruction in comment.
403 (emit_ldrh): New function.
404 (emit_ldrb): New function.
405 (emit_ldrsw): Mention post-index instruction in comment.
406 (emit_str): Likewise.
407 (emit_subs): New function.
408 (emit_cmp): Likewise.
409 (emit_and): Likewise.
410 (emit_orr): Likewise.
411 (emit_orn): Likewise.
412 (emit_eor): Likewise.
413 (emit_mvn): Likewise.
414 (emit_lslv): Likewise.
415 (emit_lsrv): Likewise.
416 (emit_asrv): Likewise.
417 (emit_mul): Likewise.
418 (emit_sbfm): Likewise.
419 (emit_sbfx): Likewise.
420 (emit_ubfm): Likewise.
421 (emit_ubfx): Likewise.
422 (emit_csinc): Likewise.
423 (emit_cset): Likewise.
424 (emit_nop): Likewise.
425 (emit_ops_insns): New helper function.
426 (emit_pop): Likewise.
427 (emit_push): Likewise.
428 (aarch64_emit_prologue): New function.
429 (aarch64_emit_epilogue): Likewise.
430 (aarch64_emit_add): Likewise.
431 (aarch64_emit_sub): Likewise.
432 (aarch64_emit_mul): Likewise.
433 (aarch64_emit_lsh): Likewise.
434 (aarch64_emit_rsh_signed): Likewise.
435 (aarch64_emit_rsh_unsigned): Likewise.
436 (aarch64_emit_ext): Likewise.
437 (aarch64_emit_log_not): Likewise.
438 (aarch64_emit_bit_and): Likewise.
439 (aarch64_emit_bit_or): Likewise.
440 (aarch64_emit_bit_xor): Likewise.
441 (aarch64_emit_bit_not): Likewise.
442 (aarch64_emit_equal): Likewise.
443 (aarch64_emit_less_signed): Likewise.
444 (aarch64_emit_less_unsigned): Likewise.
445 (aarch64_emit_ref): Likewise.
446 (aarch64_emit_if_goto): Likewise.
447 (aarch64_emit_goto): Likewise.
448 (aarch64_write_goto_address): Likewise.
449 (aarch64_emit_const): Likewise.
450 (aarch64_emit_call): Likewise.
451 (aarch64_emit_reg): Likewise.
452 (aarch64_emit_pop): Likewise.
453 (aarch64_emit_stack_flush): Likewise.
454 (aarch64_emit_zero_ext): Likewise.
455 (aarch64_emit_swap): Likewise.
456 (aarch64_emit_stack_adjust): Likewise.
457 (aarch64_emit_int_call_1): Likewise.
458 (aarch64_emit_void_call_2): Likewise.
459 (aarch64_emit_eq_goto): Likewise.
460 (aarch64_emit_ne_goto): Likewise.
461 (aarch64_emit_lt_goto): Likewise.
462 (aarch64_emit_le_goto): Likewise.
463 (aarch64_emit_gt_goto): Likewise.
464 (aarch64_emit_ge_got): Likewise.
465 (aarch64_emit_ops_impl): New static global variable.
466 (aarch64_emit_ops): New target function, return
467 &aarch64_emit_ops_impl.
468 (struct linux_target_ops): Install it.
469
bb903df0
PL
4702015-09-21 Pierre Langlois <pierre.langlois@arm.com>
471
472 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
473 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
474 aarch64-ipa.o.
475 * linux-aarch64-ipa.c: New file.
476 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
477 and endian.h.
478 (aarch64_get_thread_area): New target method.
479 (extract_signed_bitfield): New helper function.
480 (aarch64_decode_ldr_literal): New function.
481 (enum aarch64_opcodes): New enum.
482 (struct aarch64_register): New struct.
483 (struct aarch64_operand): New struct.
484 (x0): New static global.
485 (x1): Likewise.
486 (x2): Likewise.
487 (x3): Likewise.
488 (x4): Likewise.
489 (w2): Likewise.
490 (ip0): Likewise.
491 (sp): Likewise.
492 (xzr): Likewise.
493 (aarch64_register): New helper function.
494 (register_operand): Likewise.
495 (immediate_operand): Likewise.
496 (struct aarch64_memory_operand): New struct.
497 (offset_memory_operand): New helper function.
498 (preindex_memory_operand): Likewise.
499 (enum aarch64_system_control_registers): New enum.
500 (ENCODE): New macro.
501 (emit_insn): New helper function.
502 (emit_b): New function.
503 (emit_bcond): Likewise.
504 (emit_cb): Likewise.
505 (emit_tb): Likewise.
506 (emit_blr): Likewise.
507 (emit_stp): Likewise.
508 (emit_ldp_q_offset): Likewise.
509 (emit_stp_q_offset): Likewise.
510 (emit_load_store): Likewise.
511 (emit_ldr): Likewise.
512 (emit_ldrsw): Likewise.
513 (emit_str): Likewise.
514 (emit_ldaxr): Likewise.
515 (emit_stxr): Likewise.
516 (emit_stlr): Likewise.
517 (emit_data_processing_reg): Likewise.
518 (emit_data_processing): Likewise.
519 (emit_add): Likewise.
520 (emit_sub): Likewise.
521 (emit_mov): Likewise.
522 (emit_movk): Likewise.
523 (emit_mov_addr): Likewise.
524 (emit_mrs): Likewise.
525 (emit_msr): Likewise.
526 (emit_sevl): Likewise.
527 (emit_wfe): Likewise.
528 (append_insns): Likewise.
529 (can_encode_int32_in): New helper function.
530 (aarch64_relocate_instruction): New function.
531 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
532 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
533 (struct linux_target_ops): Install aarch64_get_thread_area,
534 aarch64_install_fast_tracepoint_jump_pad and
535 aarch64_get_min_fast_tracepoint_insn_len.
536
787749ea
PL
5372015-09-21 Pierre Langlois <pierre.langlois@arm.com>
538
539 * Makefile.in (aarch64-insn.o): New rule.
540 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
541
9812b2e6
YQ
5422015-09-21 Yao Qi <yao.qi@linaro.org>
543
544 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
545
18fe412b
YQ
5462015-09-21 Yao Qi <yao.qi@linaro.org>
547
548 * tracepoint.c (max_jump_pad_size): Remove.
549
a0cc84cd
YQ
5502015-09-18 Yao Qi <yao.qi@linaro.org>
551
552 * linux-aarch64-low.c: Don't include sys/uio.h.
553 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
554
d78908cf
WW
5552015-09-16 Wei-cheng Wang <cole945@gmail.com>
556
557 * tracepoint.c (eval_result_type): Change prototype.
558 (condition_true_at_tracepoint): Fix argument to compiled_cond.
559
d57e0d50
PA
5602015-09-15 Pedro Alves <palves@redhat.com>
561
562 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
563 Check whether to report exec events instead of checking whether
564 multiprocess is enabled.
565
5a676acc
PA
5662015-09-15 Pedro Alves <palves@redhat.com>
567
568 PR remote/18965
569 * remote-utils.c (prepare_resume_reply): Merge
570 TARGET_WAITKIND_VFORK_DONE switch case with the
571 TARGET_WAITKIND_FORKED case.
572
7c5d0fad
YQ
5732015-09-15 Yao Qi <yao.qi@linaro.org>
574
575 * server.c (handle_query): Check string comparison using
576 "else if" instead of "if".
577
750ce8d1
YQ
5782015-09-15 Yao Qi <yao.qi@linaro.org>
579
580 * server.c (vCont_supported): New global variable.
581 (handle_query): Set vCont_supported to 1 if "vContSupported+"
582 matches. Append ";vContSupported+" to own_buf.
583 (handle_v_requests): Append ";s;S" to own_buf if target supports
584 hardware single step or vCont_supported is false.
585 (capture_main): Set vCont_supported to zero.
586
70b90b91
YQ
5872015-09-15 Yao Qi <yao.qi@linaro.org>
588
589 * linux-low.c (linux_supports_conditional_breakpoints): Rename
590 it to ...
591 (linux_supports_hardware_single_step): ... New function.
592 (linux_target_ops): Update.
593 * lynx-low.c (lynx_target_ops): Set field
594 supports_hardware_single_step to target_can_do_hardware_single_step.
595 * nto-low.c (nto_target_ops): Likewise.
596 * spu-low.c (spu_target_ops): Likewise.
597 * win32-low.c (win32_target_ops): Likewise.
598 * target.c (target_can_do_hardware_single_step): New function.
599 * target.h (struct target_ops) <supports_conditional_breakpoints>:
600 Remove. <supports_hardware_single_step>: New field.
601 (target_supports_conditional_breakpoints): Remove.
602 (target_supports_hardware_single_step): New macro.
603 (target_can_do_hardware_single_step): Declare.
604 * server.c (handle_query): Use target_supports_hardware_single_step
605 instead of target_supports_conditional_breakpoints.
606
ade90bde
YQ
6072015-09-15 Yao Qi <yao.qi@linaro.org>
608
609 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
610 function.
611 (struct linux_target_ops the_low_target): Install
612 aarch64_linux_siginfo_fixup.
613
94585166
DB
6142015-09-11 Don Breazeal <donb@codesourcery.com>
615 Luis Machado <lgustavo@codesourcery.com>
616
617 * linux-low.c (linux_mourn): Static declaration.
618 (linux_arch_setup): Move in front of
619 handle_extended_wait.
620 (linux_arch_setup_thread): New function.
621 (handle_extended_wait): Handle exec events. Call
622 linux_arch_setup_thread. Make event_lwp argument a
623 pointer-to-a-pointer.
624 (check_zombie_leaders): Do not check stopped threads.
625 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
626 (linux_low_filter_event): Add lwp and thread for exec'ing
627 non-leader thread if leader thread has been deleted.
628 Refactor code into linux_arch_setup_thread and call it.
629 Pass child lwp pointer by reference to handle_extended_wait.
630 (linux_wait_for_event_filtered): Update comment.
631 (linux_wait_1): Prevent clobbering exec event status.
632 (linux_supports_exec_events): New function.
633 (linux_target_ops) <supports_exec_events>: Initialize new member.
634 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
635 new member.
636 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
637 * server.c (report_exec_events): New global variable.
638 (handle_query): Handle qSupported query for exec-events feature.
639 (captured_main): Initialize report_exec_events.
640 * server.h (report_exec_events): Declare new global variable.
641 * target.h (struct target_ops) <supports_exec_events>: New
642 member.
643 (target_supports_exec_events): New macro.
644 * win32-low.c (win32_target_ops) <supports_exec_events>:
645 Initialize new member.
646
0568462b
MM
6472015-09-09 Markus Metzger <markus.t.metzger@intel.com>
648
649 * linux-low.c (linux_low_enable_btrace): Remove.
650 (linux_target_ops): Replace linux_low_enable_btrace with
651 linux_enable_btrace.
652
39edd165
YQ
6532015-09-03 Yao Qi <yao.qi@linaro.org>
654
655 * linux-aarch64-low.c (aarch64_insert_point): Call
656 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
657 returns true.
658
1db33b5a
UW
6592015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
660
661 * linux-low.c (check_stopped_by_breakpoint): Use
662 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
663
ab290430
PA
6642015-08-27 Pedro Alves <palves@redhat.com>
665
666 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
667
8d749320
SM
6682015-08-26 Simon Marchi <simon.marchi@ericsson.com>
669
6711b7f8
SM
670 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
671 the XNEW-family equivalent.
8d749320
SM
672 (compile_bytecodes): Likewise.
673 * dll.c (loaded_dll): Likewise.
674 * event-loop.c (append_callback_event): Likewise.
675 (create_file_handler): Likewise.
676 (create_file_event): Likewise.
677 * hostio.c (handle_open): Likewise.
678 * inferiors.c (add_thread): Likewise.
679 (add_process): Likewise.
680 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
681 * linux-arm-low.c (arm_new_process): Likewise.
682 (arm_new_thread): Likewise.
683 * linux-low.c (add_to_pid_list): Likewise.
684 (linux_add_process): Likewise.
685 (handle_extended_wait): Likewise.
686 (add_lwp): Likewise.
687 (enqueue_one_deferred_signal): Likewise.
688 (enqueue_pending_signal): Likewise.
689 (linux_resume_one_lwp_throw): Likewise.
690 (linux_resume_one_thread): Likewise.
691 (linux_read_memory): Likewise.
692 (linux_write_memory): Likewise.
693 * linux-mips-low.c (mips_linux_new_process): Likewise.
694 (mips_linux_new_thread): Likewise.
695 (mips_add_watchpoint): Likewise.
696 * linux-x86-low.c (initialize_low_arch): Likewise.
697 * lynx-low.c (lynx_add_process): Likewise.
698 * mem-break.c (set_raw_breakpoint_at): Likewise.
699 (set_breakpoint): Likewise.
700 (add_condition_to_breakpoint): Likewise.
701 (add_commands_to_breakpoint): Likewise.
702 (clone_agent_expr): Likewise.
703 (clone_one_breakpoint): Likewise.
704 * regcache.c (new_register_cache): Likewise.
705 * remote-utils.c (look_up_one_symbol): Likewise.
706 * server.c (queue_stop_reply): Likewise.
707 (start_inferior): Likewise.
708 (queue_stop_reply_callback): Likewise.
709 (handle_target_event): Likewise.
710 * spu-low.c (fetch_ppc_memory): Likewise.
711 (store_ppc_memory): Likewise.
712 * target.c (set_target_ops): Likewise.
713 * thread-db.c (thread_db_load_search): Likewise.
714 (try_thread_db_load_1): Likewise.
715 * tracepoint.c (add_tracepoint): Likewise.
716 (add_tracepoint_action): Likewise.
717 (create_trace_state_variable): Likewise.
718 (cmd_qtdpsrc): Likewise.
719 (cmd_qtro): Likewise.
720 (add_while_stepping_state): Likewise.
721 * win32-low.c (child_add_thread): Likewise.
722 (get_image_name): Likewise.
723
ed8b7b42
YQ
7242015-08-25 Yao Qi <yao.qi@linaro.org>
725
726 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
727
db3cb7cb
YQ
7282015-08-25 Yao Qi <yao.qi@linaro.org>
729
730 * Makefile.in (aarch64-linux.o): New rule.
731 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
732 srv_tgtobj.
733 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
734 (aarch64_init_debug_reg_state): Make it extern.
735 (aarch64_linux_prepare_to_resume): Remove.
736
f6011a1c
YQ
7372015-08-25 Yao Qi <yao.qi@linaro.org>
738
739 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
740 lwp_arch_private_info and ptid_of_lwp.
741
88e2cf7e
YQ
7422015-08-25 Yao Qi <yao.qi@linaro.org>
743
744 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
745 Find proc_info by find_process_pid. All callers updated.
746
5e35436e
YQ
7472015-08-25 Yao Qi <yao.qi@linaro.org>
748
749 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
750 Remove.
751 (debug_reg_change_callback): Remove.
752 (aarch64_notify_debug_reg_change): Remove.
753
4a8a7965
YQ
7542015-08-25 Yao Qi <yao.qi@linaro.org>
755
756 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
757 Call current_lwp_ptid.
758
32a271ee
YQ
7592015-08-25 Yao Qi <yao.qi@linaro.org>
760
761 * linux-aarch64-low.c (debug_reg_change_callback): Use
762 debug_printf.
763
0d51c8d7
YQ
7642015-08-25 Yao Qi <yao.qi@linaro.org>
765
766 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
767
31a43dd5
YQ
7682015-08-25 Yao Qi <yao.qi@linaro.org>
769
770 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
771
8ee52567
YQ
7722015-08-25 Yao Qi <yao.qi@linaro.org>
773
774 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
775 the code.
776
ff3f0f45
YQ
7772015-08-25 Yao Qi <yao.qi@linaro.org>
778
779 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
780 Remove.
781 (debug_reg_change_callback): Remove argument entry and add argument
782 lwp. Remove local variable thread. Don't print thread id in the
783 debugging output. Don't check whether pid of thread equals to pid.
784 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
785 iterate_over_lwps instead find_inferior.
786
3d40fbb5
PA
7872015-08-24 Pedro Alves <palves@redhat.com>
788
789 * inferiors.c (get_first_process): New function.
790 * inferiors.h (get_first_process): New declaration.
791 * remote-utils.c (read_ptid): Default to the first process in the
792 list, instead of to the current thread's process.
793
438e1e42
PA
7942015-08-24 Pedro Alves <palves@redhat.com>
795
796 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
797 * event-loop.c: Likewise.
798 * remote-utils.c: Likewise.
799 * tracepoint.c: Likewise.
800
a8c6d4fc
PA
8012015-08-24 Pedro Alves <palves@redhat.com>
802
803 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
804 ptid_get_lwp.
805
99b0bb12
PA
8062015-08-21 Pedro Alves <palves@redhat.com>
807
808 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
809 instead of literal 1.
810
f8904751
PA
8112015-08-21 Pedro Alves <palves@redhat.com>
812
813 * tdesc.c (default_description): Explicitly zero-initialize.
814
465a859e
PA
8152015-08-21 Pedro Alves <palves@redhat.com>
816
817 PR gdb/18749
818 * inferiors.c (remove_thread): Discard any pending stop reply for
819 this thread.
820 * server.c (remove_all_on_match_pid): Rename to ...
821 (remove_all_on_match_ptid): ... this. Work with a filter ptid
822 instead of a pid.
823 (discard_queued_stop_replies): Change parameter to a ptid. Now
824 extern.
825 (handle_v_kill, kill_inferior_callback, captured_main)
826 (process_serial_event): Adjust.
827 * server.h (discard_queued_stop_replies): Declare.
828
f0db101d
PA
8292015-08-21 Pedro Alves <palves@redhat.com>
830
831 * linux-low.c (wait_for_sigstop): Always switch to no thread
832 selected if the previously current thread dies.
833 * lynx-low.c (lynx_request_interrupt): Use the first thread's
834 process instead of the current thread's.
835 * remote-utils.c (input_interrupt): Don't check if there's no
836 current thread.
837 * server.c (gdb_read_memory, gdb_write_memory): If setting the
838 current thread to the general thread fails, error out.
839 (handle_qxfer_auxv, handle_qxfer_libraries)
840 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
841 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
842 (handle_query): Check if there's a thread selected instead of
843 checking whether there's any thread in the thread list.
844 (handle_qxfer_threads, handle_qxfer_btrace)
845 (handle_qxfer_btrace_conf): Don't error out early if there's no
846 thread in the thread list.
847 (handle_v_cont, myresume): Don't set the current thread to the
848 continue thread.
849 (process_serial_event) <Hg handling>: Also set thread_id if the
850 previous general thread is still alive.
851 (process_serial_event) <g/G handling>: If setting the current
852 thread to the general thread fails, error out.
853 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
854 thread's lwp instead of the current thread's.
855 * target.c (set_desired_thread): If the desired thread was not
856 found, leave the current thread pointing to NULL. Return an int
857 (boolean) indicating success.
858 * target.h (set_desired_thread): Change return type to int.
859
40045d91
MF
8602015-08-20 Max Filippov <jcmvbkbc@gmail.com>
861
862 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
863 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
864 #includes.
865 (ps_get_thread_area): New function.
866
45face3b
GB
8672015-08-19 Gary Benson <gbenson@redhat.com>
868
869 * hostio.c (handle_pread): Do not attempt to read more data
870 than hostio_reply_with_data can fit in a packet.
871
16d5f642
JB
8722015-08-18 Joel Brobecker <brobecker@adacore.com>
873
874 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
875
a738da3a
MF
8762015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
877
878 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
879
33ebda9d
PA
8802015-08-06 Pedro Alves <palves@redhat.com>
881
882 * tracepoint.c (expr_eval_result): Now an int.
883
a44892be
PA
8842015-08-06 Pedro Alves <palves@redhat.com>
885
886 * gdbthread.h (struct regcache): Forward declare.
887 (struct thread_info) <regcache_data>: Now a struct regcache
888 pointer.
889 * inferiors.c (inferior_regcache_data)
890 (set_inferior_regcache_data): Now work with struct regcache
891 pointers.
892 * inferiors.h (struct regcache): Forward declare.
893 (inferior_regcache_data, set_inferior_regcache_data): Now work
894 with struct regcache pointers.
895 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
896 (free_register_cache_thread): Remove struct regcache pointer
897 casts.
898
608a1e46
PA
8992015-08-06 Pedro Alves <palves@redhat.com>
900
901 * server.c (captured_main): On error, print the exception message
902 to stderr, and if run_once is set, throw a quit.
903
f0ce0d3a
PA
9042015-08-06 Pedro Alves <palves@redhat.com>
905
906 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
907 the current thread.
908
bf47e248
PA
9092015-08-06 Pedro Alves <palves@redhat.com>
910
911 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
912 reading beyond the passed in buffer length.
913
b6b9ffcc
PL
9142015-08-06 Pierre Langlois <pierre.langlois@arm.com>
915
916 * tracepoint.c (symbol_list) <required>: Remove.
917
863d01bd
PA
9182015-08-06 Pedro Alves <palves@redhat.com>
919
920 * linux-low.c (handle_extended_wait): Set the fork child's suspend
921 count if stopping and suspending threads.
922 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
923 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
924 (linux_detach): Complete an ongoing step-over.
925 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
926 throughout.
927 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
928 (linux_wait_1): If passing a signal to the inferior after
929 finishing a step-over, unsuspend and re-resume all lwps. If we
930 see a single-step event but the thread should be continuing, don't
931 pass the trap to gdb.
932 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
933 internal_error instead of gdb_assert.
934 (enqueue_pending_signal): New function.
935 (check_ptrace_stopped_lwp_gone): Add debug output.
936 (start_step_over): Use internal_error instead of gdb_assert.
937 (complete_ongoing_step_over): New function.
938 (linux_resume_one_thread): Don't resume a suspended thread.
939 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
940 it stepping.
941
00db26fa
PA
9422015-08-06 Pedro Alves <palves@redhat.com>
943
944 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
945 (linux_thread_alive): Use lwp_is_marked_dead.
946 (extended_event_reported): Delete.
947 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
948 instead of extended_event_reported.
949 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
950 as well.
951 (lwp_is_marked_dead): New function.
952 (lwp_running): Use lwp_is_marked_dead.
953 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
954 comment.
955
ad071a30
PA
9562015-08-06 Pedro Alves <palves@redhat.com>
957
958 * linux-low.c (linux_wait_1): Move fork event output out of the
959 !report_to_gdb check. Pass event_child->waitstatus to
960 target_waitstatus_to_string instead of ourstatus.
961
524b57e6
YQ
9622015-08-04 Yao Qi <yao.qi@linaro.org>
963
964 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
965 if current_thread is 32 bit.
966
6085d6f6
YQ
9672015-08-04 Yao Qi <yao.qi@linaro.org>
968
969 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
970 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
971 * server.c (extended_protocol): Remove "static".
972 * server.h (extended_protocol): Declare it.
973
8a7e4587
YQ
9742015-08-04 Yao Qi <yao.qi@linaro.org>
975
976 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
977 both aarch64 and aarch32.
978 (aarch64_set_pc): Likewise.
979
3b53ae99
YQ
9802015-08-04 Yao Qi <yao.qi@linaro.org>
981
982 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
983 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
984 arm-with-neon.xml to srv_xmlfiles.
985 * linux-aarch64-low.c: Include linux-aarch32-low.h.
986 (is_64bit_tdesc): New function.
987 (aarch64_linux_read_description): New function.
988 (aarch64_arch_setup): Call aarch64_linux_read_description.
989 (regs_info): Rename to regs_info_aarch64.
990 (aarch64_regs_info): Return right regs_info.
991 (initialize_low_arch): Call initialize_low_arch_aarch32.
992
bd9e6534
YQ
9932015-08-04 Yao Qi <yao.qi@linaro.org>
994
995 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
996 * linux-aarch32-low.c: New file.
997 * linux-aarch32-low.h: New file.
998 * linux-arm-low.c (arm_fill_gregset): Move it to
999 linux-aarch32-low.c.
1000 (arm_store_gregset): Likewise.
1001 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1002 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1003 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1004 (regs_info): Rename to regs_info_arm.
1005 (arm_regs_info): Return regs_info_aarch32 if
1006 have_ptrace_getregset is 1 and target description is
1007 arm_with_neon or arm_with_vfpv3.
1008 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1009 Call initialize_low_arch_aarch32 instead.
1010
ded48a5e
YQ
10112015-08-04 Yao Qi <yao.qi@linaro.org>
1012
1013 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1014 * linux-low.c: ... here.
1015 * linux-low.h (have_ptrace_getregset): Declare it.
1016
96e9210f
PA
10172015-08-04 Pedro Alves <palves@redhat.com>
1018
1019 * thread-db.c (struct thread_db): Use new typedefs.
1020 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1021 CHK calls.
1022 (disable_thread_event_reporting): Cast result of dlsym to
1023 destination function pointer type.
1024 (thread_db_mourn): Use td_ta_delete_ftype.
1025
af60a1ef
SL
10262015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1027
1028 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1029 arch variant.
1030 (CDX_BREAKPOINT): Define for R2.
1031 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1032 (the_low_target): Add comments.
1033
e8b41681
YQ
10342015-07-30 Yao Qi <yao.qi@linaro.org>
1035
1036 * linux-arm-low.c (arm_hwcap): Remove it.
1037 (arm_read_description): New local variable arm_hwcap. Don't
1038 set arm_hwcap to zero.
1039
89abb039
YQ
10402015-07-30 Yao Qi <yao.qi@linaro.org>
1041
1042 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1043 Use regcache->tdesc instead.
1044 (arm_store_wmmxregset): Likewise.
1045 (arm_fill_vfpregset): Likewise.
1046 (arm_store_vfpregset): Likewise.
1047
deca266c
YQ
10482015-07-30 Yao Qi <yao.qi@linaro.org>
1049
1050 * linux-arm-low.c: Include arch/arm.h.
1051 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1052 (arm_store_gregset): Likewise.
1053
aa58a496
SM
10542015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1055
1056 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1057 ptrace's 4th parameter.
1058
50904b25
YQ
10592015-07-27 Yao Qi <yao.qi@linaro.org>
1060
1061 * configure.srv (case aarch64*-*-linux*): Don't set
1062 srv_linux_usrregs.
1063
5826e159
PA
10642015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1065
1066 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1067 sys/ptrace.h.
1068 * linux-arm-low.c: Likewise.
1069 * linux-cris-low.c: Likewise.
1070 * linux-crisv32-low.c: Likewise.
1071 * linux-low.c: Likewise.
1072 * linux-m68k-low.c: Likewise.
1073 * linux-mips-low.c: Likewise.
1074 * linux-nios2-low.c: Likewise.
1075 * linux-s390-low.c: Likewise.
1076 * linux-sparc-low.c: Likewise.
1077 * linux-tic6x-low.c: Likewise.
1078 * linux-tile-low.c: Likewise.
1079 * linux-x86-low.c: Likewise.
1080
54019719
PA
10812015-07-24 Pedro Alves <palves@redhat.com>
1082
1083 * config.in: Regenerate.
1084 * configure: Regenerate.
1085
eb7aa561
PA
10862015-07-24 Pedro Alves <palves@redhat.com>
1087
1088 * acinclude.m4: Include ../ptrace.m4.
1089 * configure.ac: Call GDB_AC_PTRACE.
1090 * config.in, configure: Regenerate.
1091
55d7b841
YQ
10922015-07-24 Yao Qi <yao.qi@linaro.org>
1093
1094 * linux-low.c (linux_create_inferior): Remove setting to
1095 proc->priv->new_inferior.
1096 (linux_attach): Likewise.
1097 (linux_low_filter_event): Likewise.
1098 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1099
c06cbd92
YQ
11002015-07-24 Yao Qi <yao.qi@linaro.org>
1101
1102 * linux-low.c (linux_arch_setup): New function.
1103 (linux_low_filter_event): If proc->tdesc is NULL and
1104 proc->attached is true, call the_low_target.arch_setup.
1105 Otherwise, keep status pending, and return.
1106 (linux_resume_one_lwp_throw): Don't call get_pc if
1107 thread->while_stepping isn't NULL. Don't call
1108 get_thread_regcache if proc->tdesc is NULL.
1109 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1110 (linux_target_ops): Install arch_setup.
1111 * server.c (start_inferior): Call the_target->arch_setup.
1112 * target.h (struct target_ops) <arch_setup>: New field.
1113 (target_arch_setup): New marco.
1114 * lynx-low.c (lynx_target_ops): Update.
1115 * nto-low.c (nto_target_ops): Update.
1116 * spu-low.c (spu_target_ops): Update.
1117 * win32-low.c (win32_target_ops): Update.
1118
5ae3ebba
YQ
11192015-07-24 Yao Qi <yao.qi@linaro.org>
1120
1121 * linux-low.c (linux_add_process): Don't set
1122 proc->priv->new_inferior.
1123 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1124 (linux_attach): Likewise.
1125
eb97750b
YQ
11262015-07-24 Yao Qi <yao.qi@linaro.org>
1127
1128 * server.c (start_inferior): Code refactor.
1129
51aee833
YQ
11302015-07-24 Yao Qi <yao.qi@linaro.org>
1131
1132 * server.c (process_serial_event): Set general_thread.
1133
af1b22f3
YQ
11342015-07-21 Yao Qi <yao.qi@linaro.org>
1135
1136 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1137 aarch64_linux_get_debug_reg_capacity.
1138
554717a3
YQ
11392015-07-17 Yao Qi <yao.qi@linaro.org>
1140
1141 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1142 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1143 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1144 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1145 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1146 (AARCH64_HWP_ALIGNMENT): Likewise.
1147 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1148 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1149 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1150 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1151 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1152 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1153 (struct aarch64_debug_reg_state): Likewise.
1154 (struct arch_lwp_info): Likewise.
1155 (aarch64_align_watchpoint): Likewise.
1156 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1157 (aarch64_watchpoint_length): Likewise.
1158 (aarch64_point_encode_ctrl_reg): Likewise
1159 (aarch64_point_is_aligned): Likewise.
1160 (aarch64_align_watchpoint): Likewise.
1161 (aarch64_linux_set_debug_regs):
1162 (aarch64_dr_state_insert_one_point): Likewise.
1163 (aarch64_dr_state_remove_one_point): Likewise.
1164 (aarch64_handle_breakpoint): Likewise.
1165 (aarch64_handle_aligned_watchpoint): Likewise.
1166 (aarch64_handle_unaligned_watchpoint): Likewise.
1167 (aarch64_handle_watchpoint): Likewise.
1168
c67ca4de
YQ
11692015-07-17 Yao Qi <yao.qi@linaro.org>
1170
1171 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1172 and don't aarch64_get_debug_reg_state. All callers update.
1173 (aarch64_handle_aligned_watchpoint): Likewise.
1174 (aarch64_handle_unaligned_watchpoint): Likewise.
1175 (aarch64_handle_watchpoint): Likewise.
1176 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1177 (aarch64_remove_point): Likewise.
1178
25abf979
YQ
11792015-07-17 Yao Qi <yao.qi@linaro.org>
1180
1181 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1182 debug_printf.
1183 (aarch64_handle_unaligned_watchpoint): Likewise.
1184
db1ff28b
JK
11852015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1186
1187 Revert the previous 3 commits:
1188 Move gdb_regex* to common/
1189 Move linux_find_memory_regions_full & co.
1190 gdbserver build-id attribute generator
1191
700ca40f
JK
11922015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1193 Jan Kratochvil <jan.kratochvil@redhat.com>
1194
1195 gdbserver build-id attribute generator.
1196 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1197 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1198 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1199 (find_phdr): New.
1200 (get_dynamic): Use find_pdhr to traverse program headers.
1201 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1202 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1203 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1204 (get_hex_build_id): New.
1205 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1206 to reply XML document.
1207
9904185c
JK
12082015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1209 Jan Kratochvil <jan.kratochvil@redhat.com>
1210
1211 * target.c: Include target/target-utils.h and fcntl.h.
1212 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1213 (target_fileio_read_stralloc): New functions.
1214
6e5b4429
JK
12152015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1216
1217 * Makefile.in (OBS): Add gdb_regex.o.
1218 (gdb_regex.o): New.
1219 * config.in: Rebuilt.
1220 * configure: Rebuilt.
1221
ddc98fbf
JK
12222015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1223 Jan Kratochvil <jan.kratochvil@redhat.com>
1224
1225 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1226 * Makefile.in (OBS): Add target-utils.o.
1227 (linux-maps.o, target-utils.o): New.
1228 * configure.srv (srv_linux_obj): Add linux-maps.o.
1229
e57bb7a0
PL
12302015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1231
1232 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1233 function, return 1.
1234 (the_low_target): Install it.
1235
586b02a9
PA
12362015-07-14 Pedro Alves <palves@redhat.com>
1237
1238 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1239 Instead, ignore ECHILD, and throw an error for other errnos.
1240
58c1b36c
PA
12412015-07-10 Pedro Alves <palves@redhat.com>
1242
1243 * event-loop.c (struct callback_event) <data>: Change type to
1244 gdb_client_data instance instead of gdb_client_data pointer.
1245 (append_callback_event): Adjust.
1246
421530db
PL
12472015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1248
1249 * linux-aarch64-low.c: Add comments for each linux_target_ops
1250 method. Remove comments already covered in target_ops and
1251 linux_target_ops definitions.
1252 (the_low_target): Add comments for each unimplemented method.
1253
c2d65f38
YQ
12542015-07-09 Yao Qi <yao.qi@linaro.org>
1255
1256 * linux-aarch64-low.c (aarch64_regmap): Remove.
1257 (aarch64_usrregs_info): Remove.
1258 (regs_info): Set field usrregs to NULL.
1259
b20a6524
MM
12602015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1261
1262 * linux-low.c: Include "rsp-low.h"
1263 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1264 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1265 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1266 (handle_btrace_enable_pt): New.
1267 (handle_btrace_general_set): Support "pt".
1268 (handle_btrace_conf_general_set): Support "pt:size".
1269
96c97461
PL
12702015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1271
1272 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1273 Z_PACKET_SW_BP.
1274
37d66942
PL
12752015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1276
1277 * linux-aarch64-low.c: Remove comment about endianness.
1278 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1279 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1280 memcmp.
1281
dc06243f
GB
12822015-06-24 Gary Benson <gbenson@redhat.com>
1283
1284 * linux-i386-ipa.c (stdint.h): Do not include.
1285 * lynx-i386-low.c (stdint.h): Likewise.
1286 * lynx-ppc-low.c (stdint.h): Likewise.
1287 * mem-break.c (stdint.h): Likewise.
1288 * thread-db.c (stdint.h): Likewise.
1289 * tracepoint.c (stdint.h): Likewise.
1290 * win32-low.c (stdint.h): Likewise.
1291
124e13d9
SM
12922015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1293
1294 * server.c (write_qxfer_response): Update call to
1295 remote_escape_output.
1296
909c2cda
JK
12972015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1298 Jan Kratochvil <jan.kratochvil@redhat.com>
1299
1300 Merge multiple hex conversions.
1301 * gdbreplay.c (tohex): Rename to 'fromhex'.
1302 (logchar): Use fromhex.
1303
24c05f46
JK
13042015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1305
1306 * server.c (handle_qxfer_libraries): Set `version' attribute for
1307 <library-list>.
1308
14d2069a
GB
13092015-06-10 Gary Benson <gbenson@redhat.com>
1310
1311 * target.h (struct target_ops) <multifs_open>: New field.
1312 <multifs_unlink>: Likewise.
1313 <multifs_readlink>: Likewise.
1314 * linux-low.c (nat/linux-namespaces.h): New include.
1315 (linux_target_ops): Initialize the_target->multifs_open,
1316 the_target->multifs_unlink and the_target->multifs_readlink.
1317 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1318 * hostio.c (hostio_fs_pid): New static variable.
1319 (hostio_handle_new_gdb_connection): New function.
1320 (handle_setfs): Likewise.
1321 (handle_open): Use the_target->multifs_open as appropriate.
1322 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1323 (handle_readlink): Use the_target->multifs_readlink as
1324 appropriate.
1325 (handle_vFile): Handle vFile:setfs packets.
1326 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1327 after target_handle_new_gdb_connection.
1328
4b8b5e72
GB
13292015-06-10 Gary Benson <gbenson@redhat.com>
1330
1331 * configure.ac (AC_CHECK_FUNCS): Add setns.
1332 * config.in: Regenerate.
1333 * configure: Likewise.
1334 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1335 (linux-namespaces.o): New rule.
1336 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1337
3ac2e371
GB
13382015-06-09 Gary Benson <gbenson@redhat.com>
1339
1340 * hostio.c (handle_open): Process mode argument with
1341 fileio_to_host_mode.
1342
ca9b78ce
YQ
13432015-06-01 Yao Qi <yao.qi@linaro.org>
1344
1345 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1346 * linux-x86-low.c: Likewise.
1347
bfacd19d
DB
13482015-05-28 Don Breazeal <donb@codesourcery.com>
1349
1350 * linux-low.c (handle_extended_wait): Initialize
1351 thread_info.last_resume_kind for new fork children.
1352
452003ef
PA
13532015-05-15 Pedro Alves <palves@redhat.com>
1354
1355 * target.h (target_handle_new_gdb_connection): Rewrite using if
1356 wrapped in do/while.
1357
1041a03c
JB
13582015-05-14 Joel Brobecker <brobecker@adacore.com>
1359
1360 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1361 * configure, config.in: Regenerate.
1362 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1363 Declare typedef.
1364
c269dbdb
DB
13652015-05-12 Don Breazeal <donb@codesourcery.com>
1366
1367 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1368 PTRACE_EVENT_VFORK_DONE.
1369 (linux_low_ptrace_options, extended_event_reported): Add vfork
1370 events.
1371 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1372 and "vforkdone" for RSP 'T' Stop Reply Packet.
1373 * server.h (report_vfork_events): Declare
1374 global variable.
1375
3a8a0396
DB
13762015-05-12 Don Breazeal <donb@codesourcery.com>
1377
1378 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1379 (the_low_target) <new_fork>: Initialize new member.
1380 * linux-arm-low.c (arm_new_fork): New function.
1381 (the_low_target) <new_fork>: Initialize new member.
1382 * linux-low.c (handle_extended_wait): Call new target function
1383 new_fork.
1384 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1385 * linux-mips-low.c (mips_add_watchpoint): New function
1386 extracted from mips_insert_point.
1387 (the_low_target) <new_fork>: Initialize new member.
1388 (mips_linux_new_fork): New function.
1389 (mips_insert_point): Call mips_add_watchpoint.
1390 * linux-x86-low.c (x86_linux_new_fork): New function.
1391 (the_low_target) <new_fork>: Initialize new member.
1392
de0d863e
DB
13932015-05-12 Don Breazeal <donb@codesourcery.com>
1394
1395 * linux-low.c (handle_extended_wait): Implement return value,
1396 rename argument 'event_child' to 'event_lwp', handle
1397 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1398 (linux_low_ptrace_options): New function.
1399 (linux_low_filter_event): Call linux_low_ptrace_options,
1400 use different argument fo linux_enable_event_reporting,
1401 use return value from handle_extended_wait.
1402 (extended_event_reported): New function.
1403 (linux_wait_1): Call extended_event_reported and set
1404 status to report fork events.
1405 (linux_write_memory): Add pid to debug message.
1406 (reset_lwp_ptrace_options_callback): New function.
1407 (linux_handle_new_gdb_connection): New function.
1408 (linux_target_ops): Initialize new structure member.
1409 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1410 * lynx-low.c: Initialize new structure member.
1411 * remote-utils.c (prepare_resume_reply): Implement stop reason
1412 "fork" for "T" stop message.
1413 * server.c (handle_query): Call handle_new_gdb_connection.
1414 * server.h (report_fork_events): Declare global flag.
1415 * target.h (struct target_ops) <handle_new_gdb_connection>:
1416 New member.
1417 (target_handle_new_gdb_connection): New macro.
1418 * win32-low.c: Initialize new structure member.
1419
ddcbc397
DB
14202015-05-12 Don Breazeal <donb@codesourcery.com>
1421
1422 * mem-break.c (APPEND_TO_LIST): Define macro.
1423 (clone_agent_expr): New function.
1424 (clone_one_breakpoint): New function.
1425 (clone_all_breakpoints): New function.
1426 * mem-break.h: Declare new functions.
1427
89245bc0
DB
14282015-05-12 Don Breazeal <donb@codesourcery.com>
1429
1430 * linux-low.c (linux_supports_fork_events): New function.
1431 (linux_supports_vfork_events): New function.
1432 (linux_target_ops): Initialize new structure members.
1433 (initialize_low): Call linux_check_ptrace_features.
1434 * lynx-low.c (lynx_target_ops): Initialize new structure
1435 members.
1436 * server.c (report_fork_events, report_vfork_events):
1437 New global flags.
1438 (handle_query): Add new features to qSupported packet and
1439 response.
1440 (captured_main): Initialize new global variables.
1441 * target.h (struct target_ops) <supports_fork_events>:
1442 New member.
1443 <supports_vfork_events>: New member.
1444 (target_supports_fork_events): New macro.
1445 (target_supports_vfork_events): New macro.
1446 * win32-low.c (win32_target_ops): Initialize new structure
1447 members.
1448
835205d0
GB
14492015-05-12 Gary Benson <gbenson@redhat.com>
1450
1451 * server.c (handle_qxfer_exec_file): Use current process
1452 if annex is empty.
1453
21e94bd9
SL
14542015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1455
1456 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1457 Remove HAVE_PTRACE_GETREGS conditionals.
1458 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1459 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1460
45614f15
YQ
14612015-05-08 Yao Qi <yao.qi@linaro.org>
1462
1463 * linux-low.c (linux_supports_conditional_breakpoints): New
1464 function.
1465 (linux_target_ops): Install new target method.
1466 * lynx-low.c (lynx_target_ops): Install NULL hook for
1467 supports_conditional_breakpoints.
1468 * nto-low.c (nto_target_ops): Likewise.
1469 * spu-low.c (spu_target_ops): Likewise.
1470 * win32-low.c (win32_target_ops): Likewise.
1471 * server.c (handle_query): Check
1472 target_supports_conditional_breakpoints.
1473 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1474 New field.
1475 (target_supports_conditional_breakpoints): New macro.
1476
80ad801e
PA
14772015-05-06 Pedro Alves <palves@redhat.com>
1478
1479 PR server/18081
1480 * server.c (start_inferior): If the process exits, mourn it.
1481
819843c7
GB
14822015-04-21 Gary Benson <gbenson@redhat.com>
1483
1484 * hostio.c (fileio_open_flags_to_host): Factored out to
1485 fileio_to_host_openflags in common/fileio.c. Single use
1486 updated.
1487
a2d5a9d7
MF
14882015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1489
1490 * linux-xtensa-low.c (xtensa_fill_gregset)
1491 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1492 XCHAL_HAVE_LOOP.
1493
deb44829
MF
14942015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1495
1496 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1497 (regs_info): Replace usrregs pointer with NULL.
1498
e57f1de3
GB
14992015-04-17 Gary Benson <gbenson@redhat.com>
1500
1501 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1502 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1503 * server.c (handle_qxfer_exec_file): New function.
1504 (qxfer_packets): Add exec-file entry.
1505 (handle_query): Report qXfer:exec-file:read as supported packet.
1506
62828379
RN
15072015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1508
1509 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1510
b88bb450
GB
15112015-04-09 Gary Benson <gbenson@redhat.com>
1512
1513 * hostio-errno.c (errno_to_fileio_error): Remove function.
1514 Update caller to use remote_fileio_to_fio_error.
1515
c8f4bfdd
YQ
15162015-04-09 Yao Qi <yao.qi@linaro.org>
1517
1518 * linux-low.c (linux_insert_point): Call
1519 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1520 (linux_remove_point): Call remove_memory_breakpoint if type is
1521 raw_bkpt_type_sw.
1522 * linux-x86-low.c (x86_insert_point): Don't call
1523 insert_memory_breakpoint.
1524 (x86_remove_point): Don't call remove_memory_breakpoint.
1525
41f98f02
PA
15262015-04-01 Pedro Alves <palves@redhat.com>
1527 Cleber Rosa <crosa@redhat.com>
1528
1529 * server.c (gdbserver_usage): Reorganize and extend the usage
1530 message.
1531
2bf6fb9d
PA
15322015-03-24 Pedro Alves <palves@redhat.com>
1533
1534 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1535 output. Also dump TRAP_TRACE.
1536 (linux_low_filter_event): In debug output, distinguish a
1537 resume_stop SIGSTOP from a delayed SIGSTOP.
1538
369f6daa
GB
15392015-03-24 Gary Benson <gbenson@redhat.com>
1540
1541 * linux-x86-low.c (x86_linux_new_thread): Moved to
1542 nat/x86-linux.c.
1543 (x86_linux_prepare_to_resume): Likewise.
1544
8e5d4070
GB
15452015-03-24 Gary Benson <gbenson@redhat.com>
1546
1547 * Makefile.in (x86-linux-dregs.o): New rule.
1548 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1549 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1550 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1551 (x86_linux_dr_get): Likewise.
1552 (x86_linux_dr_set): Likewise.
1553 (update_debug_registers_callback): Likewise.
1554 (x86_linux_dr_set_addr): Likewise.
1555 (x86_linux_dr_get_addr): Likewise.
1556 (x86_linux_dr_set_control): Likewise.
1557 (x86_linux_dr_get_control): Likewise.
1558 (x86_linux_dr_get_status): Likewise.
1559 (x86_linux_update_debug_registers): Likewise.
1560
2b95d440
GB
15612015-03-24 Gary Benson <gbenson@redhat.com>
1562
1563 * linux-x86-low.c (x86_linux_update_debug_registers):
1564 New function, factored out from...
1565 (x86_linux_prepare_to_resume): ...this.
1566
14b0bc68
GB
15672015-03-24 Gary Benson <gbenson@redhat.com>
1568
1569 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1570 (x86_linux_dr_set): Likewise.
1571 (update_debug_registers_callback): Likewise.
1572 (x86_linux_dr_set_addr): Likewise.
1573 (x86_linux_dr_get_addr): Likewise.
1574 (x86_linux_dr_set_control): Likewise.
1575 (x86_linux_dr_get_control): Likewise.
1576 (x86_linux_dr_get_status): Likewise.
1577 (x86_linux_prepare_to_resume): Likewise.
1578
5dfe6ca8
GB
15792015-03-24 Gary Benson <gbenson@redhat.com>
1580
1581 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1582 Use perror_with_name. Pass string through gettext.
1583 (x86_linux_dr_set): Likewise.
1584
d33472ad
GB
15852015-03-24 Gary Benson <gbenson@redhat.com>
1586
1587 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1588 (x86_linux_dr_set_addr): ...this.
1589 (x86_dr_low_get_addr): Rename to...
1590 (x86_linux_dr_get_addr): ...this.
1591 (x86_dr_low_set_control): Rename to...
1592 (x86_linux_dr_set_control): ...this.
1593 (x86_dr_low_get_control): Rename to...
1594 (x86_linux_dr_get_control): ...this.
1595 (x86_dr_low_get_status): Rename to...
1596 (x86_linux_dr_get_status): ...this.
1597 (x86_dr_low): Update with new function names.
1598
4b134ca1
GB
15992015-03-24 Gary Benson <gbenson@redhat.com>
1600
1601 * Makefile.in (x86-linux.o): New rule.
1602 * configure.srv: Add x86-linux.o to relevant targets.
1603 * linux-low.c (lwp_set_arch_private_info): New function.
1604 (lwp_arch_private_info): Likewise.
1605 * linux-x86-low.c: Include nat/x86-linux.h.
1606 (arch_lwp_info): Removed structure.
1607 (update_debug_registers_callback):
1608 Use lwp_set_debug_registers_changed.
1609 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1610 and lwp_set_debug_registers_changed.
1611 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1612
34c703da
GB
16132015-03-24 Gary Benson <gbenson@redhat.com>
1614
1615 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1616 * linux-arm-low.c (arm_new_thread): Likewise.
1617 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1618 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1619 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1620 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1621
cff068da
GB
16222015-03-24 Gary Benson <gbenson@redhat.com>
1623
1624 * linux-low.c (ptid_of_lwp): New function.
1625 (lwp_is_stopped): Likewise.
1626 (lwp_stop_reason): Likewise.
1627 * linux-x86-low.c (update_debug_registers_callback):
1628 Use lwp_is_stopped.
1629 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1630 lwp_stop_reason.
1631
b2f7c7e8
GB
16322015-03-24 Gary Benson <gbenson@redhat.com>
1633
1634 * linux-low.h (linux_stop_lwp): Remove declaration.
1635
6d4ee8c6
GB
16362015-03-24 Gary Benson <gbenson@redhat.com>
1637
1638 * linux-low.h: Include nat/linux-nat.h.
1639 * linux-low.c (iterate_over_lwps_args): New structure.
1640 (iterate_over_lwps_filter): New function.
1641 (iterate_over_lwps): Likewise.
1642 * linux-x86-low.c (update_debug_registers_callback):
1643 Update signature to what iterate_over_lwps expects.
1644 Remove PID check that iterate_over_lwps now performs.
1645 (x86_dr_low_set_addr): Use iterate_over_lwps.
1646 (x86_dr_low_set_control): Likewise.
1647
70a0bb6b
GB
16482015-03-24 Gary Benson <gbenson@redhat.com>
1649
1650 * linux-x86-low.c (x86_debug_reg_state): New function.
1651 (x86_linux_prepare_to_resume): Use the above.
1652
7b669087
GB
16532015-03-24 Gary Benson <gbenson@redhat.com>
1654
1655 * linux-low.c (current_lwp_ptid): New function.
1656 * linux-x86-low.c: Include nat/linux-nat.h.
1657 (x86_dr_low_get_addr): Use current_lwp_ptid.
1658 (x86_dr_low_get_control): Likewise.
1659 (x86_dr_low_get_status): Likewise.
1660
eef49a3d
PA
16612015-03-20 Pedro Alves <palves@redhat.com>
1662
1663 * tracepoint.c (cmd_qtstatus): Make "str" const.
1664
b2333d22
PA
16652015-03-20 Pedro Alves <palves@redhat.com>
1666
1667 * server.c (handle_general_set): Make "req_str" const.
1668
23f238d3
PA
16692015-03-19 Pedro Alves <palves@redhat.com>
1670
1671 * linux-low.c (linux_resume_one_lwp): Rename to ...
1672 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1673 instead call perror_with_name.
1674 (check_ptrace_stopped_lwp_gone): New function.
1675 (linux_resume_one_lwp): Reimplement as wrapper around
1676 linux_resume_one_lwp_throw that swallows errors if the LWP is
1677 gone.
1678
91baf43f
PA
16792015-03-19 Pedro Alves <palves@redhat.com>
1680
1681 * linux-low.c (count_events_callback, select_event_lwp_callback):
1682 No longer check whether the thread has resume_stop as last resume
1683 kind.
1684
8bf3b159
PA
16852015-03-19 Pedro Alves <palves@redhat.com>
1686
1687 * linux-low.c (count_events_callback, select_event_lwp_callback):
1688 Use the lwp's status_pending_p field, not the thread's.
1689
b90fc188
PA
16902015-03-19 Pedro Alves <palves@redhat.com>
1691
1692 * linux-low.c (select_event_lwp_callback): Update comments to
1693 no longer mention SIGTRAP.
1694
464b0089
GB
16952015-03-18 Gary Benson <gbenson@redhat.com>
1696
1697 * server.c (handle_query): Do not report vFile:fstat as supported.
1698
aa9e327f
GB
16992015-03-11 Gary Benson <gbenson@redhat.com>
1700
1701 * hostio.c (sys/types.h): New include.
1702 (sys/stat.h): Likewise.
1703 (common-remote-fileio.h): Likewise.
1704 (handle_fstat): New function.
1705 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 1706
791c0056
GB
17072015-03-11 Gary Benson <gbenson@redhat.com>
1708
1709 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1710 struct stat.st_blocks and struct stat.st_blksize.
1711 * configure: Regenerate.
1712 * config.in: Likewise.
1713 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1714 (OBS): Add common-remote-fileio.o.
1715 (common-remote-fileio.o): New rule.
1716
9a9df970
PA
17172015-03-09 Pedro Alves <palves@redhat.com>
1718
1719 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1720 'struct sockaddr' pointer in 'accept' call.
1721
9eb1356e
PA
17222015-03-09 Pedro Alves <palves@redhat.com>
1723
1724 Revert:
1725 2015-03-07 Pedro Alves <palves@redhat.com>
1726 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1727 or <winsock2.h> here. Instead include "gdb_socket.h".
1728 (remote_open): Use union gdb_sockaddr_u.
1729 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1730 or <winsock2.h> here. Instead include "gdb_socket.h".
1731 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1732 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1733 or <sys/un.h>.
1734 (init_named_socket, gdb_agent_helper_thread): Use union
1735 gdb_sockaddr_u.
1736
aac331e4
PA
17372015-03-07 Pedro Alves <palves@redhat.com>
1738
1739 * configure.ac (build_warnings): Move
1740 -Wdeclaration-after-statement to the C-specific set.
1741 * configure: Regenerate.
1742
366c75fc
PA
17432015-03-07 Pedro Alves <palves@redhat.com>
1744
1745 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1746 or <winsock2.h> here. Instead include "gdb_socket.h".
1747 (remote_open): Use union gdb_sockaddr_u.
1748 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1749 or <winsock2.h> here. Instead include "gdb_socket.h".
1750 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1751 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1752 or <sys/un.h>.
1753 (init_named_socket, gdb_agent_helper_thread): Use union
1754 gdb_sockaddr_u.
1755
492d29ea
PA
17562015-03-07 Pedro Alves <palves@redhat.com>
1757
1758 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1759 instead.
1760
60a191ed
YQ
17612015-03-06 Yao Qi <yao.qi@linaro.org>
1762
1763 * linux-aarch64-low.c (aarch64_insert_point): Use
1764 show_debug_regs as a boolean.
1765 (aarch64_remove_point): Likewise.
1766
f5771b1d
PA
17672015-03-05 Pedro Alves <palves@redhat.com>
1768
1769 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1770 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1771 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1772 * nto-low.c (nto_target_ops): Likewise.
1773 * spu-low.c (spu_target_ops): Likewise.
1774 * win32-low.c (win32_target_ops): Likewise.
1775
3e572f71
PA
17762015-03-04 Pedro Alves <palves@redhat.com>
1777
72f4393d 1778 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
1779 Decide whether a breakpoint triggered based on the SIGTRAP's
1780 siginfo.si_code.
72f4393d
L
1781 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1782 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
1783 (linux_low_filter_event): Check for breakpoints before checking
1784 watchpoints.
1785 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1786 siginfo.si_code.
72f4393d
L
1787 (linux_stopped_by_sw_breakpoint)
1788 (linux_supports_stopped_by_sw_breakpoint)
1789 (linux_stopped_by_hw_breakpoint)
1790 (linux_supports_stopped_by_hw_breakpoint): New functions.
1791 (linux_target_ops): Install new target methods.
3e572f71 1792
1ec68e26
PA
17932015-03-04 Pedro Alves <palves@redhat.com>
1794
1795 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1796 * server.c (swbreak_feature, hwbreak_feature): New globals.
1797 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1798 (captured_main): Clear swbreak_feature and hwbreak_feature.
1799 * server.h (swbreak_feature, hwbreak_feature): Declare.
1800 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1801 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1802 supports_stopped_by_hw_breakpoint>: New fields.
1803 (target_supports_stopped_by_sw_breakpoint)
1804 (target_stopped_by_sw_breakpoint)
1805 (target_supports_stopped_by_hw_breakpoint)
1806 (target_stopped_by_hw_breakpoint): Declare.
1807
15c66dd6
PA
18082015-03-04 Pedro Alves <palves@redhat.com>
1809
1810 enum lwp_stop_reason -> enum target_stop_reason
1811 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1812 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1813 (linux_wait_1, stuck_in_jump_pad_callback)
1814 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1815 (linux_stopped_by_watchpoint):
1816 * linux-low.h (enum lwp_stop_reason): Delete.
1817 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1818 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1819
98fc70d6
YQ
18202015-03-04 Yao Qi <yao.qi@linaro.org>
1821
1822 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1823
dd2ac174
GB
18242015-03-03 Gary Benson <gbenson@redhat.com>
1825
1826 * hostio.c (handle_vFile): Fix prefix lengths.
1827
d68e53f4
MM
18282015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1829
1830 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1831 ptr_bits.
1832
bf2d68ab
AA
18332015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1834
1835 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1836 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1837 (clean): Add "rm -f" for above C files.
1838 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1839 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1840 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1841 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1842 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1843 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1844 (init_registers_s390x_vx_linux64)
1845 (init_registers_s390x_tevx_linux64)
1846 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1847 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1848 declarations.
1849 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1850 (s390_store_vxrs_high): New functions.
1851 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1852 NT_S390_VXRS_HIGH.
1853 (s390_arch_setup): Add logic for selecting one of the new target
1854 descriptions. Activate the new vector regsets if applicable.
1855 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1856 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1857 and init_registers_s390x_tevx_linux64.
1858
c966a859
PA
18592015-03-01 Pedro Alves <palves@redhat.com>
1860
1861 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1862 parameter.
1863
4180215b
PA
18642015-02-27 Pedro Alves <palves@redhat.com>
1865
1866 * linux-x86-low.c (u_debugreg_offset): New function.
1867 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1868
749bab01
PA
18692015-02-27 Pedro Alves <palves@redhat.com>
1870
1871 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1872 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1873 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1874 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1875 (ps_lsetfpregs, ps_getpid)
1876 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1877 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1878 (ps_lsetxregs, ps_plog): Declare.
1879
3c14e5a3
PA
18802015-02-27 Pedro Alves <palves@redhat.com>
1881
1882 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1883 IP_AGENT_EXPORT_FUNC.
1884 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1885 IP_AGENT_EXPORT_FUNC.
1886 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1887 (IP_AGENT_EXPORT): Delete.
1888 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1889 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1890 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1891 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1892 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1893 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1894 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1895 (traceframe_read_count, traceframe_write_count)
1896 (traceframes_created, trace_state_variables, get_raw_reg)
1897 (get_trace_state_variable_value, set_trace_state_variable_value)
1898 (ust_loaded, helper_thread_id, cmd_buf): Use
1899 IPA_SYM_EXPORTED_NAME.
1900 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1901 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1902 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1903 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1904 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1905 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1906 EXTERN_C_PUSH/EXTERN_C_POP.
1907 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1908 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1909 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1910 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1911 (traceframe_write_count, traceframe_read_count)
1912 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1913 (about_to_request_buffer_space, get_trace_state_variable_value)
1914 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1915 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1916 EXTERN_C_PUSH/EXTERN_C_POP.
1917 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1918 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1919 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1920 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1921 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1922 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1923 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1924 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1925 Define.
1926 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1927 (IP_AGENT_EXPORT_VAR_DECL): Define.
1928 (tracing): Declare.
1929 (gdb_agent_get_raw_reg): Declare.
1930
fe978cb0
PA
19312015-02-27 Tom Tromey <tromey@redhat.com>
1932 Pedro Alves <palves@redhat.com>
1933
1934 Rename symbols whose names are reserved C++ keywords throughout.
1935
3bc3d82a
PA
19362015-02-27 Pedro Alves <palves@redhat.com>
1937
1938 * Makefile.in (COMPILER): New, get it from autoconf.
1939 (CXX): Get from autoconf instead.
1940 (COMPILE.pre): Use COMPILER.
1941 (CC-LD): Rename to ...
1942 (CC_LD): ... this. Use COMPILER.
1943 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
1944 (CXX_FOR_TARGET): Default to g++ instead of gcc.
1945 * acinclude.m4: Include build-with-cxx.m4.
1946 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
1947 Disable -Werror by default if building in C++ mode.
1948 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
1949 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
1950 the C++ compiler. Save/restore CXXFLAGS too.
1951 * configure: Regenerate.
1952
07697489
PA
19532015-02-27 Pedro Alves <palves@redhat.com>
1954
1955 * acinclude.m4: Include libiberty.m4.
1956 * configure.ac: Call libiberty_INIT.
1957 * config.in, configure: Regenerate.
1958
9beb7c4e
PA
19592015-02-26 Pedro Alves <palves@redhat.com>
1960
1961 * linux-low.c (linux_wait_1): When incrementing the PC past a
1962 program breakpoint always use the_low_target.breakpoint_len as
1963 increment, rather than the maximum between that and
1964 the_low_target.decr_pc_after_break.
1965
8090aef2
PA
19662015-02-23 Pedro Alves <palves@redhat.com>
1967
1968 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
1969 thread was doing a step-over; always adjust the PC if
1970 we stepped over a permanent breakpoint.
1971 (linux_wait_1): If we stepped over breakpoint that was on top of a
1972 permanent breakpoint, manually advance the PC past it.
1973
bc9540e8
PA
19742015-02-23 Pedro Alves <palves@redhat.com>
1975
1976 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
1977 modes.
1978 (x86_fill_gregset, x86_store_gregset): Use it when handling
1979 $orig_eax.
1980
2db9a427
PA
19812015-02-20 Pedro Alves <palves@redhat.com>
1982
1983 * thread-db.c: Include "nat/linux-procfs.h".
1984 (thread_db_init): Skip listing new threads if the kernel supports
1985 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
1986
afa8d396
PA
19872015-02-20 Pedro Alves <palves@redhat.com>
1988
1989 * linux-low.c (status_pending_p_callback): Use ptid_match.
1990
c9587f88
AT
19912015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
1992
1993 PR breakpoints/16812
1994 * linux-low.c (wstatus_maybe_breakpoint): Remove.
1995 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
1996 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
1997
b05ec7a5
AT
19982015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
1999
2000 PR breakpoints/15956
2001 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2002
d33501a5
MM
20032015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2004
2005 * linux-low.c (linux_low_btrace_conf): Print size.
2006 * server.c (handle_btrace_conf_general_set): New.
2007 (hanle_general_set): Call handle_btrace_conf_general_set.
2008 (handle_query): Report Qbtrace-conf:bts:size as supported.
2009
f4abbc16
MM
20102015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2011
2012 * linux-low.c (linux_low_enable_btrace): Update parameters.
2013 (linux_low_btrace_conf): New.
2014 (linux_target_ops)<to_btrace_conf>: Initialize.
2015 * server.c (current_btrace_conf): New.
2016 (handle_btrace_enable): Rename to ...
2017 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
2018 to target_enable_btrace. Update comment. Update users.
2019 (handle_qxfer_btrace_conf): New.
2020 (qxfer_packets): Add btrace-conf entry.
2021 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2022 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2023 (target_ops)<read_btrace_conf>: New.
2024 (target_enable_btrace): Update parameters.
2025 (target_read_btrace_conf): New.
2026
043c3577
MM
20272015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2028
2029 * server.c (handle_btrace_general_set): Remove call to
2030 target_supports_btrace.
2031 (supported_btrace_packets): New.
2032 (handle_query): Call supported_btrace_packets.
2033 * target.h: include btrace-common.h.
2034 (btrace_target_info): Removed.
2035 (supports_btrace, target_supports_btrace): Update parameters.
2036
734b0e4b
MM
20372015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2038
2039 * Makefile.in (SFILES): Add common/btrace-common.c.
2040 (OBS): Add common/btrace-common.o.
2041 (btrace-common.o): Add build rules.
2042 * linux-low: Include btrace-common.h.
2043 (linux_low_read_btrace): Use struct btrace_data. Call
2044 btrace_data_init and btrace_data_fini.
2045
d6c146e9
PA
20462015-02-06 Pedro Alves <palves@redhat.com>
2047
2048 * thread-db.c (find_new_threads_callback): Add debug output.
2049
20ba1ce6
PA
20502015-02-04 Pedro Alves <palves@redhat.com>
2051
2052 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2053 (resume_stopped_resumed_lwps): New function.
2054 (linux_wait_for_event_filtered): Use it.
2055
8cc73a39
SDJ
20562015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2057
2058 * Makefile.in (SFILES): Add linux-personality.c.
2059 (linux-personality.o): New rule.
2060 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2061 list of objects to be built.
2062 * linux-low.c: Include nat/linux-personality.h.
2063 (linux_create_inferior): Remove code to disable address space
2064 randomization (moved to ../nat/linux-personality.c). Create
2065 cleanup to disable address space randomization.
2066
fb23d554
SDJ
20672015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2068
2069 * Makefile.in (posix-strerror.o): New rule.
2070 (mingw-strerror.o): Likewise.
2071 * configure: Regenerated.
2072 * configure.ac: Source file ../common/common.host. Initialize new
2073 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2074
cdf43629
YQ
20752015-01-14 Yao Qi <yao@codesourcery.com>
2076
2077 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2078 (ppc-linux.o): New rule.
2079 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2080 * configure.ac: AC_CHECK_FUNCS(getauxval).
2081 * config.in: Re-generated.
2082 * configure: Re-generated.
2083 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2084 ppc64_64bit_inferior_p
2085
514c5338
YQ
20862015-01-14 Yao Qi <yao@codesourcery.com>
2087
2088 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2089 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2090 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2091 (PT_ORIG_R3, PT_TRAP): Likewise.
2092 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2093 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2094 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2095
3368c1e5
JB
20962015-01-10 Joel Brobecker <brobecker@adacore.com>
2097
2098 * i387-fp.c (i387_cache_to_xsave): In look over
2099 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2100 zmmh_low_space field by use of zmmh_high_space.
2101
582511be
PA
21022015-01-09 Pedro Alves <palves@redhat.com>
2103
2104 * linux-low.c (step_over_bkpt): Move higher up in the file.
2105 (handle_extended_wait): Don't store the stop_pc here.
2106 (get_stop_pc): Adjust comments and rename to ...
2107 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2108 stopped for a software breakpoint or hardware breakpoint.
2109 (thread_still_has_status_pending_p): New function.
2110 (status_pending_p_callback): Use
2111 thread_still_has_status_pending_p. If the event is no longer
2112 interesting, resume the LWP.
2113 (handle_tracepoints): Add assert.
2114 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2115 (wstatus_maybe_breakpoint): New function.
2116 (cancel_breakpoint): Delete function.
2117 (check_stopped_by_watchpoint): New function, factored out from
2118 linux_low_filter_event.
2119 (lp_status_maybe_breakpoint): Delete function.
2120 (linux_low_filter_event): Remove filter_ptid argument.
2121 Leave thread group exits pending here. Store the LWP's stop PC.
2122 Always leave events pending.
2123 (linux_wait_for_event_filtered): Pull all events out of the
2124 kernel, and leave them all pending.
2125 (count_events_callback, select_event_lwp_callback): Consider all
2126 events.
2127 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2128 (select_event_lwp): Only give preference to the stepping LWP in
2129 all-stop mode. Adjust comments.
2130 (ignore_event): New function.
2131 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2132 references to cancel_breakpoints. Adjust to renames. Also give
2133 equal priority to all LWPs that have had events in non-stop mode.
2134 If reporting a software breakpoint event, unadjust the LWP's PC.
2135 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2136 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2137 Adjust.
2138 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2139 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2140 (linux_stopped_by_watchpoint): Adjust.
2141 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2142 * linux-low.h (enum lwp_stop_reason): New.
2143 (struct lwp_info) <stop_pc>: Adjust comment.
2144 <stopped_by_watchpoint>: Delete field.
2145 <stop_reason>: New field.
2146 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2147 * mem-break.c (software_breakpoint_inserted_here)
2148 (hardware_breakpoint_inserted_here): New function.
2149 * mem-break.h (software_breakpoint_inserted_here)
2150 (hardware_breakpoint_inserted_here): Declare.
2151 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2152 (cancel_breakpoints): Delete.
2153 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2154 (upload_fast_traceframes): Remove references to
2155 cancel_breakpoints.
2156
a33e3959
PA
21572015-01-09 Pedro Alves <palves@redhat.com>
2158
2159 * thread-db.c (find_new_threads_callback): Ignore thread if the
2160 kernel thread ID is -1.
2161
8784d563
PA
21622015-01-09 Pedro Alves <palves@redhat.com>
2163
2164 * linux-low.c (linux_attach_fail_reason_string): Move to
2165 nat/linux-ptrace.c, and rename.
2166 (linux_attach_lwp): Update comment.
2167 (attach_proc_task_lwp_callback): New function.
2168 (linux_attach): Adjust to rename and use
2169 linux_proc_attach_tgid_threads.
2170 (linux_attach_fail_reason_string): Delete declaration.
2171
76f2b779
JB
21722015-01-01 Joel Brobecker <brobecker@adacore.com>
2173
2174 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2175 * server.c (gdbserver_version): Likewise.
2176
fafcc06a
SDJ
21772014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2178
2179 * remote-utils.c: Include ctype.h.
2180 (input_interrupt): Explicitly handle the case when the char
2181 received is the NUL byte. Improve the printing of non-ASCII
2182 characters.
2183
beed38b8
JB
21842014-12-16 Joel Brobecker <brobecker@adacore.com>
2185
2186 * linux-low.c (linux_low_filter_event): Update call to
2187 linux_enable_event_reporting following the addition of
2188 a new parameter to that function.
2189
bf330350
CU
21902014-12-16 Catalin Udma <catalin.udma@freescale.com>
2191
2192 PR server/17457
2193 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2194 (AARCH64_FPCR_REGNO): Likewise.
2195 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2196 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2197 (aarch64_store_fpregset): Likewise.
2198
5227d625
JB
21992014-12-15 Joel Brobecker <brobecker@adacore.com>
2200
2201 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2202 Remove FIXME comment about assumption about N.
2203
f93b65a0
JB
22042014-12-13 Joel Brobecker <brobecker@adacore.com>
2205
2206 * configure.ac: If large-file support is disabled in GDBserver,
2207 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2208 * configure: Regenerate.
2209
e5a9158d
AA
22102014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2211
2212 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2213 warning upon ENODATA from ptrace.
2214 * linux-s390-low.c (s390_store_tdb): New.
2215 (s390_regsets): Add regset for NT_S390_TDB.
2216
feea5f36
AA
22172014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2218
2219 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2220 without a fill_function.
2221 * linux-s390-low.c (s390_fill_last_break): Remove.
2222 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2223 (s390_arch_setup): Use regset's size instead of fill_function for
2224 loop end condition.
2225
098dbe61
AA
22262014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2227
2228 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2229 the regset's store function when ptrace returned an error.
2230 * regcache.c (get_thread_regcache): Invalidate register cache
2231 before fetching inferior's registers.
2232
28eef672
AA
22332014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2234
2235 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2236 while-loop as for-loop.
2237 (regsets_store_inferior_registers): Likewise.
2238
bdca27a2
YQ
22392014-11-28 Yao Qi <yao@codesourcery.com>
2240
2241 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2242 * config.in, configure: Re-generate.
2243 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2244 is defined.
2245
9c232dda
YQ
22462014-11-21 Yao Qi <yao@codesourcery.com>
2247
2248 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2249 (AC_CHECK_HEADERS): Remove malloc.h.
2250 * configure: Re-generated.
2251 * config.in: Re-generated.
2252 * server.h: Don't include alloca.h and malloc.h.
2253 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2254 Don't include malloc.h.
2255
43968415
JB
22562014-11-17 Joel Brobecker <brobecker@adacore.com>
2257
2258 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2259 corresponding ERRNO check in same block.
2260
40e91bc7
PA
22612014-11-12 Pedro Alves <palves@redhat.com>
2262
2263 * server.c (cont_thread): Update comment.
2264 (start_inferior, attach_inferior): No longer clear cont_thread.
2265 (handle_v_cont): No longer set cont_thread.
2266 (captured_main): Clear cont_thread each time a GDB connects.
2267
c2c118cf
PA
22682014-11-12 Pedro Alves <palves@redhat.com>
2269
2270 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2271 thread, and don't resume all threads if the Hc thread has exited.
2272
78708b7c
PA
22732014-11-12 Pedro Alves <palves@redhat.com>
2274
2275 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2276 the process group instead of to a specific LWP.
2277
a2abc7de
PA
22782014-10-15 Pedro Alves <palves@redhat.com>
2279
2280 PR server/17487
2281 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2282 parameter.
2283 (arm_set_thread_context): Delete.
2284 (the_low_target): Adjust.
2285 * win32-i386-low.c (debug_registers_changed)
2286 (debug_registers_used): Delete.
2287 (update_debug_registers_callback): New function.
2288 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2289 needing to update their debug registers.
2290 (win32_get_current_dr): New function.
2291 (x86_dr_low_get_addr, x86_dr_low_get_control)
2292 (x86_dr_low_get_status): Fetch the debug register from the thread
2293 record's context.
2294 (i386_initial_stuff): Adjust.
2295 (i386_get_thread_context): Remove current_event parameter. Don't
2296 clear debug_registers_changed nor copy DR values to
2297 debug_reg_state.
2298 (i386_set_thread_context): Delete.
2299 (i386_prepare_to_resume): New function.
2300 (i386_thread_added): Mark the thread as needing to update irs
2301 debug registers.
2302 (the_low_target): Remove i386_set_thread_context and install
2303 i386_prepare_to_resume.
2304 * win32-low.c (win32_get_thread_context): Adjust.
2305 (win32_set_thread_context): Use SetThreadContext
2306 directly.
2307 (win32_prepare_to_resume): New function.
2308 (win32_require_context): New function, factored out from ...
2309 (thread_rec): ... this.
2310 (continue_one_thread): Call win32_prepare_to_resume on each thread
2311 we're about to continue.
2312 (win32_resume): Call win32_prepare_to_resume on the event thread.
2313 * win32-low.h (struct win32_thread_info)
2314 <debug_registers_changed>: New field.
2315 (struct win32_target_ops): Change prototype of set_thread_context,
2316 delete set_thread_context and add prepare_to_resume.
2317 (win32_require_context): New declaration.
2318
a442d071
GB
23192014-10-08 Gary Benson <gbenson@redhat.com>
2320
2321 * server.h: Do not include common-exceptions.h.
2322
6f1947e8
GB
23232014-10-08 Gary Benson <gbenson@redhat.com>
2324
2325 * server.h: Do not include cleanups.h.
2326
63b434a4
JH
23272014-09-30 James Hogan <james.hogan@imgtec.com>
2328
2329 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2330 mips64-dsp-linux.c.
2331
c4d9ceb6
YQ
23322014-09-23 Yao Qi <yao@codesourcery.com>
2333
2334 * linux-low.c (lp_status_maybe_breakpoint): New function.
2335 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2336 (count_events_callback): Likewise.
2337 (select_event_lwp_callback): Likewise.
2338 (cancel_breakpoints_callback): Likewise.
2339
89a5711c
DB
23402014-09-19 Don Breazeal <donb@codesourcery.com>
2341
2342 * linux-low.c (handle_extended_wait): Call
2343 linux_ptrace_get_extended_event.
2344 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2345 linux_is_extended_waitstatus.
2346
bffc0964
JB
23472014-09-16 Joel Brobecker <brobecker@adacore.com>
2348
2349 * Makefile.in (CPPFLAGS): Define.
2350 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2351 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2352
0bfdf32f
GB
23532014-09-16 Gary Benson <gbenson@redhat.com>
2354
2355 * inferiors.h (current_inferior): Renamed as...
2356 (current_thread): New variable. All uses updated.
2357 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2358 (maybe_move_out_of_jump_pad): Likewise.
2359 (cancel_breakpoint): Likewise.
2360 (linux_low_filter_event): Likewise.
2361 (wait_for_sigstop): Likewise.
2362 (linux_resume_one_lwp): Likewise.
2363 (need_step_over_p): Likewise.
2364 (start_step_over): Likewise.
2365 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2366 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2367 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2368 and save_inferior as saved_thread.
2369 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2370 saved_thread.
2371 (regcache_invalidate_thread): Likewise.
2372 * remote-utils.c (prepare_resume_reply): Likewise.
2373 * thread-db.c (thread_db_get_tls_address): Likewise.
2374 (disable_thread_event_reporting): Likewise.
2375 (remove_thread_event_breakpoints): Likewise.
2376 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2377 as saved_thread.
2378 * target.h (set_desired_inferior): Renamed as...
2379 (set_desired_thread): New declaration. All uses updated.
2380 * server.c (myresume): Updated comment to reference thread instead
2381 of inferior.
2382 (handle_serial_event): Likewise.
2383 (handle_target_event): Likewise.
2384
361c8ade
GB
23852014-09-12 Tom Tromey <tromey@redhat.com>
2386 Gary Benson <gbenson@redhat.com>
2387
2388 * regcache.h: Include common-regcache.h.
2389 (regcache_read_pc): Don't declare.
2390 * regcache.c (get_thread_regcache_for_ptid): New function.
2391
bd9269f7
GB
23922014-09-11 Tom Tromey <tromey@redhat.com>
2393 Gary Benson <gbenson@redhat.com>
2394
2395 * symbol.c: New file.
2396 * Makefile.in (SFILES): Add symbol.c.
2397 (OBS): Add symbol.o.
2398
f8c1d06b
GB
23992014-09-11 Gary Benson <gbenson@redhat.com>
2400
2401 * target.c (target_stop_ptid, target_continue_ptid): New
2402 functions.
2403
721ec300
GB
24042014-09-11 Tom Tromey <tromey@redhat.com>
2405 Gary Benson <gbenson@redhat.com>
2406
2407 * target.h: Include target/target.h.
2408 * target.c (target_read_memory, target_read_uint32)
2409 (target_write_memory): New functions.
2410
c5e92cca
GB
24112014-09-11 Gary Benson <gbenson@redhat.com>
2412
2413 * server.h (debug_hw_points): Don't declare.
2414 * server.c (debug_hw_points): Don't define. Replace all uses
2415 with show_debug_regs.
2416 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2417 all uses with show_debug_regs.
2418
2e4bb98a
EBM
24192014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2420
2421 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2422 endianness into account.
2423 (ppc_supply_ptrace_register): Likewise.
2424
ac740bc7
JH
24252014-09-03 James Hogan <james.hogan@imgtec.com>
2426
2427 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2428 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2429
97ea6506
GB
24302014-09-03 Gary Benson <gbenson@redhat.com>
2431
2432 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2433 ALL_DEBUG_ADDRESS_REGISTERS.
2434
df7e5265
GB
24352014-09-02 Gary Benson <gbenson@redhat.com>
2436
2437 * i386-low.h: Renamed as...
2438 * x86-low.h: New file. All type, function and variable name
2439 prefixes changed from "i386_" to "x86_". All references updated.
2440 * i386-low.c: Renamed as...
2441 * x86-low.c: New file. All type, function and variable name
2442 prefixes changed from "i386_" to "x86_". All references updated.
2443
ed859da7
GB
24442014-09-02 Gary Benson <gbenson@redhat.com>
2445
2446 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2447 (x86_linux_new_thread): Likewise.
2448
860789c7
GB
24492014-08-29 Gary Benson <gbenson@redhat.com>
2450
2451 * server.h (setjmp.h): Do not include.
2452 (toplevel): Do not declare.
2453 (common-exceptions.h): Include.
2454 (cleanups.h): Likewise.
2455 * server.c (toplevel): Do not define.
2456 (exit_code): New static global.
2457 (detach_or_kill_for_exit_cleanup): New function.
2458 (main): New function. Original main renamed to...
2459 (captured_main): New function.
2460 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2461
ff55e1b5
GB
24622014-08-29 Gary Benson <gbenson@redhat.com>
2463
2464 * Makefile.in (SFILES): Add common/common-exceptions.c.
2465 (OBS): Add common-exceptions.o.
2466 (common-exceptions.o): New rule.
2467 * utils.c (prepare_to_throw_exception): New function.
2468
e9bcb658
GB
24692014-08-29 Gary Benson <gbenson@redhat.com>
2470
2471 * config.in: Regenerate.
2472 * configure: Likewise.
2473
e3180625
GB
24742014-08-29 Gary Benson <gbenson@redhat.com>
2475
2476 * Makefile.in (SFILES): Add common/cleanups.c.
2477 (OBS): cleanups.o.
2478 (cleanups.o): New rule.
2479
e3d6ba5d
GB
24802014-08-29 Gary Benson <gbenson@redhat.com>
2481
2482 * utils.c (internal_vwarning): New function.
2483
7096e886
GB
24842014-08-28 Gary Benson <gbenson@redhat.com>
2485
2486 * utils.h (fatal): Remove declaration.
2487 * utils.c (fatal): Remove function.
2488
14ce3192
GB
24892014-08-28 Gary Benson <gbenson@redhat.com>
2490
2491 * tracepoint.c (gdb_agent_init): Replace fatal with
2492 perror_with_name.
2493 (initialize_tracepoint): Likewise.
2494
50278d59
GB
24952014-08-28 Gary Benson <gbenson@redhat.com>
2496
2497 * remote-utils.c (remote_prepare): Replace fatal with error.
2498
aa96c426
GB
24992014-08-28 Gary Benson <gbenson@redhat.com>
2500
2501 * linux-low.c (linux_async): Replace fatal with warning.
2502 Tidy up and return.
2503 (linux_start_non_stop): Return -1 if linux_async failed.
2504
f7160e97
GB
25052014-08-28 Gary Benson <gbenson@redhat.com>
2506
2507 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2508 gdb_assert.
2509 (i386_dr_low_get_addr): Remove vague comment.
2510 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2511 gdb_assert.
2512
38e08fca
GB
25132014-08-28 Gary Benson <gbenson@redhat.com>
2514
2515 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2516 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2517 internal_error.
2518 (linux_resume_one_lwp): Likewise.
2519 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2520 gdb_assert.
2521 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2522 with internal_error.
2523 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2524 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2525 (find_register_by_name): Replace fatal with internal_error.
2526 (find_regno): Likewise.
2527 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2528 * thread-db.c (thread_db_create_event): Likewise.
2529 (thread_db_load_search): Likewise.
2530 (try_thread_db_load_1): Likewise.
2531 * tracepoint.c (get_jump_space_head): Replace fatal with
2532 internal_error.
2533 (claim_trampoline_space): Likewise.
2534 (have_fast_tracepoint_trampoline_buffer): Likewise.
2535 (cmd_qtstart): Likewise.
2536 (stop_tracing): Likewise.
2537 (fast_tracepoint_collecting): Likewise.
2538 (target_malloc): Likewise.
2539 (download_tracepoint): Likewise.
2540 (download_trace_state_variables): Replace check with gdb_assert.
2541 (upload_fast_traceframes): Replace fatal with internal_error.
2542
34abf635
GB
25432014-08-19 Tom Tromey <tromey@redhat.com>
2544 Gary Benson <gbenson@redhat.com>
2545
2546 * Makefile.in (SFILES): Add common/common-debug.c.
2547 (OBS): Add common-debug.o.
2548 (common-debug.o): New rule.
2549 * debug.h (debug_printf): Don't declare.
2550 * debug.c (debug_printf): Renamed and rewritten as...
2551 (debug_vprintf): New function.
2552
f6e94d78
GB
25532014-08-19 Gary Benson <gbenson@redhat.com>
2554
2555 * utils.h: Do not include print-utils.h.
2556
9239eeab
GB
25572014-08-19 Tom Tromey <tromey@redhat.com>
2558 Gary Benson <gbenson@redhat.com>
2559
2560 * server.h: Add static assertion.
2561 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2562
ef87c8bb
GB
25632014-08-19 Tom Tromey <tromey@redhat.com>
2564 Gary Benson <gbenson@redhat.com>
2565
2566 * Makefile.in (SFILES): Add common/errors.c.
2567 (OBS): Add errors.o.
2568 (IPA_OBS): Add errors-ipa.o.
2569 (errors.o): New rule.
2570 (errors-ipa.o): Likewise.
2571 * utils.h (perror_with_name, error, warning): Don't declare.
2572 * utils.c (warning): Renamed and rewritten as...
2573 (vwarning): New function.
2574 (error): Renamed and rewritten as...
2575 (verror): New function.
2576 (internal_error): Renamed and rewritten as...
2577 (internal_verror): New function.
2578
bb974a24
GB
25792014-08-07 Gary Benson <gbenson@redhat.com>
2580
2581 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2582 * configure: Regenerate.
2583 * config.in: Likewise.
2584 * server.h: Do not include errno.h.
2585 * event-loop.c: Likewise.
2586 * hostio-errno.c: Likewise.
2587 * linux-low.c: Likewise.
2588 * remote-utils.c: Likewise.
2589 * spu-low.c: Likewise.
2590 * utils.c: Likewise.
2591 * gdbreplay.c: Unconditionally include errno.h.
2592
6d3d12eb
GB
25932014-08-07 Gary Benson <gbenson@redhat.com>
2594
2595 * server.h: Do not include string.h.
2596 * event-loop.c: Likewise.
2597 * linux-low.c: Likewise.
2598 * regcache.c: Likewise.
2599 * remote-utils.c: Likewise.
2600 * spu-low.c: Likewise.
2601 * utils.c: Likewise.
2602
dccbb609
GB
26032014-08-07 Gary Benson <gbenson@redhat.com>
2604
2605 * server.h: Do not include gdb_assert.h.
2606
e76df0d0
GB
26072014-08-07 Gary Benson <gbenson@redhat.com>
2608
2609 * server.h: Do not include common-utils.h.
2610
4cb9c816
GB
26112014-08-07 Gary Benson <gbenson@redhat.com>
2612
2613 * server.h: Do not include ptid.h.
2614 * notif.h: Likewise.
2615
3995eeee
GB
26162014-08-07 Gary Benson <gbenson@redhat.com>
2617
2618 * server.h: Do not include gdb_locale.h.
2619
cb9f1a9b
GB
26202014-08-07 Gary Benson <gbenson@redhat.com>
2621
2622 * server.h: Do not include gdb/signals.h.
2623 * win32-low.c: Likewise.
2624
a5fceff8
GB
26252014-08-07 Gary Benson <gbenson@redhat.com>
2626
2627 * server.h: Do not include pathmax.h.
2628
b9391142
GB
26292014-08-07 Gary Benson <gbenson@redhat.com>
2630
2631 * server.h: Do not include libiberty.h.
2632 * linux-bfin-low.c: Likewise.
2633
0e443c87
GB
26342014-08-07 Gary Benson <gbenson@redhat.com>
2635
2636 * server.h: Do not include ansidecl.h.
2637
8ebb3f56
GB
26382014-08-07 Gary Benson <gbenson@redhat.com>
2639
2640 * linux-x86-low.c: Do not include stddef.h.
2641 * lynx-ppc-low.c: Likewise.
2642 * tracepoint.c: Likewise.
2643
8980bdf6
GB
26442014-08-07 Gary Benson <gbenson@redhat.com>
2645
2646 * server.h: Do not include stdarg.h.
2647 * nto-low.c: Likewise.
2648
d7096f71
GB
26492014-08-07 Gary Benson <gbenson@redhat.com>
2650
2651 * server.h: Do not include stdlib.h.
2652 * inferiors.c: Likewise.
2653 * linux-low.c: Likewise.
2654 * regcache.c: Likewise.
2655 * spu-low.c: Likewise.
2656 * tracepoint.c: Likewise.
2657 * utils.c: Likewise.
2658
d02f550d
GB
26592014-08-07 Gary Benson <gbenson@redhat.com>
2660
2661 * server.h: Do not include stdio.h.
2662 * linux-low.c: Likewise.
2663 * remote-utils.c: Likewise.
2664 * spu-low.c: Likewise.
2665 * utils.c: Likewise.
2666 * wincecompat.c: Likewise.
2667
87f6c4e3
GB
26682014-08-06 Gary Benson <gbenson@redhat.com>
2669
2670 * regcache.c (init_register_cache): Move conditionals inside if.
2671
7089dca4
GB
26722014-08-06 Gary Benson <gbenson@redhat.com>
2673
2674 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2675
462f517e
GB
26762014-07-31 Gary Benson <gbenson@redhat.com>
2677
2678 * ax.h: Do not include server.h.
2679 * gdbthread.h: Likewise.
2680 * lynx-low.h: Likewise.
2681 * notif.h: Likewise.
2682
976411d6
GB
26832014-07-30 Gary Benson <gbenson@redhat.com>
2684
2685 * server.h: Include common-defs.h.
2686 Do not include config.h or build-gnulib-gdbserver/config.h.
2687
d41f6d8e
GB
26882014-07-30 Gary Benson <gbenson@redhat.com>
2689
2690 * hostio-errno.c: Move server.h to top of includes list.
2691 * inferiors.c: Likewise.
2692 * linux-x86-low.c: Likewise.
2693 * notif.c: Include server.h.
2694
314c6a35
TT
26952014-07-24 Tom Tromey <tromey@redhat.com>
2696 Gary Benson <gbenson@redhat.com>
2697
2698 * server.h (CORE_ADDR): Now unsigned.
2699
69ff6be5
PA
27002014-07-16 Pedro Alves <palves@redhat.com>
2701
2702 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2703
ce9e3fe7
PA
27042014-07-15 Pedro Alves <palves@redhat.com>
2705
2706 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2707 copy.
2708
e76126e8
PA
27092014-07-11 Pedro Alves <palves@redhat.com>
2710
2711 * linux-low.c (kill_wait_lwp): New function, based on
2712 kill_one_lwp_callback, but use my_waitpid directly.
2713 (kill_one_lwp_callback, linux_kill): Use it.
2714
8e9db26e
PA
27152014-06-23 Pedro Alves <palves@redhat.com>
2716
2717 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2718 before setting DR0..DR3.
2719
698b3e08
GB
27202014-06-20 Gary Benson <gbenson@redhat.com>
2721
2722 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2723 * configure: Regenerated.
2724 * config.in: Likewise.
2725
125f8a3d
GB
27262014-06-20 Gary Benson <gbenson@redhat.com>
2727
2728 * Makefile.in (SFILES): Update locations for files moved
2729 from common to nat.
2730 (object file files): Reordered.
2731
42995dbd
GB
27322014-06-20 Gary Benson <gbenson@redhat.com>
2733
2734 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2735 (i386_dr_low_set_addr): Likewise.
2736 (i386_dr_low_get_addr): Likewise.
2737 (i386_dr_low_can_set_control): Likewise.
2738 (i386_dr_low_set_control): Likewise.
2739 (i386_dr_low_get_control): Likewise.
2740 (i386_dr_low_get_status): Likewise.
2741 (i386_get_debug_register_length): Likewise.
2742 * linux-x86-low.c (i386_dr_low_set_addr):
2743 Changed signature. Made static.
2744 (i386_dr_low_get_addr): Likewise.
2745 (i386_dr_low_set_control): Likewise.
2746 (i386_dr_low_get_control): Likewise.
2747 (i386_dr_low_get_status): Likewise.
2748 (i386_dr_low): New global variable.
2749 * win32-i386-low.c (i386_dr_low_set_addr):
2750 Changed signature. Made static.
2751 (i386_dr_low_get_addr): Likewise.
2752 (i386_dr_low_set_control): Likewise.
2753 (i386_dr_low_get_control): Likewise.
2754 (i386_dr_low_get_status): Likewise.
2755 (i386_dr_low): New global variable.
2756
e1d2394b
MS
27572014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2758
2759 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2760 * Makefile.in (AR, AR_FLAGS): Define.
2761 * configure: Regenerate.
2762
3a8ee006
GB
27632014-06-19 Gary Benson <gbenson@redhat.com>
2764
2765 * Makefile.in (i386-dregs.o): New rule.
2766 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2767 * i386-low.c (target.h): Remove include.
2768 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2769 (DR_CONTROL_SHIFT): Likewise.
2770 (DR_CONTROL_SIZE): Likewise.
2771 (DR_RW_EXECUTE): Likewise.
2772 (DR_RW_WRITE): Likewise.
2773 (DR_RW_READ): Likewise.
2774 (DR_RW_IORW): Likewise.
2775 (DR_LEN_1): Likewise.
2776 (DR_LEN_2): Likewise.
2777 (DR_LEN_4): Likewise.
2778 (DR_LEN_8): Likewise.
2779 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2780 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2781 (DR_ENABLE_SIZE): Likewise.
2782 (DR_LOCAL_SLOWDOWN): Likewise.
2783 (DR_GLOBAL_SLOWDOWN): Likewise.
2784 (DR_CONTROL_RESERVED): Likewise.
2785 (I386_DR_CONTROL_MASK): Likewise.
2786 (I386_DR_VACANT): Likewise.
2787 (I386_DR_LOCAL_ENABLE): Likewise.
2788 (I386_DR_GLOBAL_ENABLE): Likewise.
2789 (I386_DR_DISABLE): Likewise.
2790 (I386_DR_SET_RW_LEN): Likewise.
2791 (I386_DR_GET_RW_LEN): Likewise.
2792 (I386_DR_WATCH_HIT): Likewise.
2793 (i386_wp_op_t): Likewise.
2794 (i386_show_dr): Likewise.
2795 (i386_length_and_rw_bits): Likewise.
2796 (i386_insert_aligned_watchpoint): Likewise.
2797 (i386_remove_aligned_watchpoint): Likewise.
2798 (i386_handle_nonaligned_watchpoint): Likewise.
2799 i386_update_inferior_debug_regs(): Likewise.
2800 (i386_dr_insert_watchpoint): Likewise.
2801 (i386_dr_remove_watchpoint): Likewise.
2802 (i386_dr_region_ok_for_watchpoint): Likewise.
2803 (i386_dr_stopped_data_address): Likewise.
2804 (i386_dr_stopped_by_watchpoint): Likewise.
2805
8f26655c
GB
28062014-06-19 Gary Benson <gbenson@redhat.com>
2807
2808 * i386-low.c (i386_dr_show): Renamed to
2809 i386_show_dr and made static. All uses updated.
2810 (i386_dr_length_and_rw_bits): Renamed to
2811 i386_length_and_rw_bits and made static.
2812 All uses updated.
2813 (i386_dr_insert_aligned_watchpoint): Renamed to
2814 i386_insert_aligned_watchpoint and made static.
2815 All uses updated.
2816 (i386_dr_remove_aligned_watchpoint): Renamed to
2817 i386_remove_aligned_watchpoint and made static.
2818 All uses updated.
2819 (i386_dr_update_inferior_debug_regs): Renamed to
2820 i386_update_inferior_debug_regs and made static.
2821 All uses updated.
2822
b9228891
GB
28232014-06-18 Gary Benson <gbenson@redhat.com>
2824
5171def3
GB
2825 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2826 (i386_dr_low_can_set_control): Likewise.
2827 (i386_get_debug_register_length): Likewise.
2828 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2829 (i386_dr_low_can_set_control): Likewise.
2830 (i386_get_debug_register_length): Likewise.
2831
28322014-06-17 Gary Benson <gbenson@redhat.com>
2833
b9228891
GB
2834 * i386-low.h (i386-dregs.h): New include.
2835 (DR_FIRSTADDR): Now in i386-dregs.h.
2836 (DR_LASTADDR): Likewise.
2837 (DR_NADDR): Likewise.
2838 (DR_STATUS): Likewise.
2839 (DR_CONTROL): Likewise.
2840 (i386_debug_reg_state): Likewise.
2841 (i386_dr_insert_watchpoint): Likewise.
2842 (i386_dr_remove_watchpoint): Likewise.
2843 (i386_dr_region_ok_for_watchpoint): Likewise.
2844 (i386_dr_stopped_data_address): Likewise.
2845 (i386_dr_stopped_by_watchpoint): Likewise.
2846 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2847
4be83cc2
GB
28482014-06-18 Gary Benson <gbenson@redhat.com>
2849
2850 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2851 i386_dr_insert_watchpoint.
2852 (i386_low_remove_watchpoint): Renamed to
2853 i386_dr_remove_watchpoint.
2854 (i386_low_region_ok_for_watchpoint): Renamed to
2855 i386_dr_region_ok_for_watchpoint.
2856 (i386_low_stopped_data_address): Renamed to
2857 i386_dr_stopped_data_address.
2858 (i386_low_stopped_by_watchpoint): Renamed to
2859 i386_dr_stopped_by_watchpoint.
2860 * i386-low.c (i386_show_dr): Renamed to
2861 i386_dr_show and made nonstatic. All uses updated.
2862 (i386_length_and_rw_bits): Renamed to
2863 i386_dr_length_and_rw_bits and made nonstatic.
2864 All uses updated.
2865 (i386_insert_aligned_watchpoint): Renamed to
2866 i386_dr_insert_aligned_watchpoint and made nonstatic.
2867 All uses updated.
2868 (i386_remove_aligned_watchpoint): Renamed to
2869 i386_dr_remove_aligned_watchpoint and made nonstatic.
2870 All uses updated.
2871 (i386_update_inferior_debug_regs): Renamed to
2872 i386_dr_update_inferior_debug_regs and made nonstatic.
2873 All uses updated.
2874 (i386_low_insert_watchpoint): Renamed to
2875 i386_dr_insert_watchpoint. All uses updated.
2876 (i386_low_remove_watchpoint): Renamed to
2877 i386_dr_remove_watchpoint. All uses updated.
2878 (i386_low_region_ok_for_watchpoint): Renamed to
2879 i386_dr_region_ok_for_watchpoint. All uses updated.
2880 (i386_low_stopped_data_address): Renamed to
2881 i386_dr_stopped_data_address. All uses updated.
2882 (i386_low_stopped_by_watchpoint): Renamed to
2883 i386_dr_stopped_by_watchpoint. All uses updated.
2884
131aa0d4
GB
28852014-06-18 Gary Benson <gbenson@redhat.com>
2886
2887 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2888 (i386_dr_low_can_set_control): Likewise.
2889 (i386_insert_aligned_watchpoint): New check.
2890
d9305f7f
GB
28912014-06-18 Gary Benson <gbenson@redhat.com>
2892
2893 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2894 Renamed to state.
2895
e927c9fc
GB
28962014-06-18 Gary Benson <gbenson@redhat.com>
2897
2898 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2899 instead of fatal and error.
2900 (i386_handle_nonaligned_watchpoint): Likewise.
2901
1b6d4134
GB
29022014-06-18 Gary Benson <gbenson@redhat.com>
2903
2904 * i386-low.c (i386_get_debug_register_length): New macro.
2905 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2906 (i386_show_dr): Use debug_printf instead of fprintf. Use
2907 phex to format values.
2908
6e62758f
GB
29092014-06-18 Gary Benson <gbenson@redhat.com>
2910
2911 * i386-low.h: Comment changes.
2912 * i386-low.c: Likewise.
2913
fc6e2f03
GB
29142014-06-18 Gary Benson <gbenson@redhat.com>
2915
2916 * i386-low.c: Whitespace changes.
2917
f9d1eeed
TT
29182014-06-12 Tom Tromey <tromey@redhat.com>
2919
2920 * utils.c (freeargv): Remove.
2921
0b04e523
TT
29222014-06-12 Tom Tromey <tromey@redhat.com>
2923
2924 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2925 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2926 (parse_debug_format_options): Likewise.
2927 (gdbserver_usage): Likewise.
2928 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2929 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2930 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2931 against libiberty.
2932 ($(LIBGNU)): Depend on libiberty.
2933 (all-lib): Recurse into all subdirs.
2934 (install-only): Invoke "install" target in subdirs.
2935 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2936 targets.
2937 * configure: Rebuild.
2938 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
2939 for vasprintf, vsnprintf, or gettimeofday.
2940 * configure.srv: Don't add safe-ctype.o or lbasename.o to
2941 srv_tgtobj.
2942
270c9937
JB
29432014-06-05 Joel Brobecker <brobecker@adacore.com>
2944
2945 * development.sh: Delete.
2946 * Makefile.in (config.status): Adjust dependency on development.sh.
2947 * configure.ac: Adjust development.sh source call.
2948 * configure: Regenerate.
2949
0a261ed8
PA
29502014-06-02 Pedro Alves <palves@redhat.com>
2951
2952 * ax.c (gdb_free_agent_expr): New function.
2953 * ax.h (gdb_free_agent_expr): New declaration.
2954 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
2955 list.
2956 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
2957 static.
2958 (clear_breakpoint_conditions_and_commands): New function.
2959 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
2960 (clear_breakpoint_conditions_and_commands): New declaration.
2961
e9dae05e
RR
29622014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2963
2964 * linux-aarch64-low.c (asm/ptrace.h): Include.
2965
5876f503
JK
29662014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2967
2968 Fix TLS access for -static -pthread.
2969 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
2970 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
2971 (thread_db_load_search, try_thread_db_load_1): Initialize it.
2972
802e8e6d
PA
29732014-05-20 Pedro Alves <palves@redhat.com>
2974
2975 * linux-aarch64-low.c (aarch64_insert_point)
2976 (aarch64_remove_point): No longer check whether the type is
2977 supported here. Adjust to new interface.
2978 (the_low_target): Install aarch64_supports_z_point_type as
2979 supports_z_point_type method.
2980 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
2981 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
2982 instead of a Z packet char. Adjust.
2983 (arm_supports_z_point_type): New function.
2984 (arm_insert_point, arm_remove_point): Adjust to new interface.
2985 (the_low_target): Install arm_supports_z_point_type.
2986 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
2987 (cris_insert_point, cris_remove_point): Adjust to new interface.
2988 Don't check whether the type is supported here.
2989 (the_low_target): Install cris_supports_z_point_type.
2990 * linux-low.c (linux_supports_z_point_type): New function.
2991 (linux_insert_point, linux_remove_point): Adjust to new interface.
2992 * linux-low.h (struct linux_target_ops) <insert_point,
2993 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
2994 raw_breakpoint pointer parameter.
2995 <supports_z_point_type>: New method.
2996 * linux-mips-low.c (mips_supports_z_point_type): New function.
2997 (mips_insert_point, mips_remove_point): Adjust to new interface.
2998 Use mips_supports_z_point_type.
2999 (the_low_target): Install mips_supports_z_point_type.
3000 * linux-ppc-low.c (the_low_target): Install NULL as
3001 supports_z_point_type method.
3002 * linux-s390-low.c (the_low_target): Install NULL as
3003 supports_z_point_type method.
3004 * linux-sparc-low.c (the_low_target): Install NULL as
3005 supports_z_point_type method.
3006 * linux-x86-low.c (x86_supports_z_point_type): New function.
3007 (x86_insert_point): Adjust to new insert_point interface. Use
3008 insert_memory_breakpoint. Adjust to new
3009 i386_low_insert_watchpoint interface.
3010 (x86_remove_point): Adjust to remove_point interface. Use
3011 remove_memory_breakpoint. Adjust to new
3012 i386_low_remove_watchpoint interface.
3013 (the_low_target): Install x86_supports_z_point_type.
3014 * lynx-low.c (lynx_target_ops): Install NULL as
3015 supports_z_point_type callback.
3016 * nto-low.c (nto_supports_z_point_type): New.
3017 (nto_insert_point, nto_remove_point): Adjust to new interface.
3018 (nto_target_ops): Install nto_supports_z_point_type.
3019 * mem-break.c: Adjust intro comment.
3020 (struct raw_breakpoint) <raw_type, size>: New fields.
3021 <inserted>: Update comment.
3022 <shlib_disabled>: Delete field.
3023 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3024 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3025 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3026 (raw_bkpt_type_to_target_hw_bp_type): New function.
3027 (find_enabled_raw_code_breakpoint_at): New function.
3028 (find_raw_breakpoint_at): New type and size parameters. Use them.
3029 (insert_memory_breakpoint): New function, based off
3030 set_raw_breakpoint_at.
3031 (remove_memory_breakpoint): New function.
3032 (set_raw_breakpoint_at): Reimplement.
3033 (set_breakpoint): New, based on set_breakpoint_at.
3034 (set_breakpoint_at): Reimplement.
3035 (delete_raw_breakpoint): Go through the_target->remove_point
3036 instead of assuming memory breakpoints.
3037 (find_gdb_breakpoint_at): Delete.
3038 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3039 (find_gdb_breakpoint): New function.
3040 (set_gdb_breakpoint_at): Delete.
3041 (z_type_supported): New function.
3042 (set_gdb_breakpoint_1): New function, loosely based off
3043 set_gdb_breakpoint_at.
3044 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3045 (delete_gdb_breakpoint_at): Delete.
3046 (delete_gdb_breakpoint_1): New function, loosely based off
3047 delete_gdb_breakpoint_at.
3048 (delete_gdb_breakpoint): New function.
3049 (clear_gdb_breakpoint_conditions): Rename to ...
3050 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3051 breakpoint.
3052 (add_condition_to_breakpoint): Make static.
3053 (add_breakpoint_condition): Take a struct breakpoint pointer
3054 instead of an address. Adjust.
3055 (gdb_condition_true_at_breakpoint): Rename to ...
3056 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3057 z_type parameter.
3058 (gdb_condition_true_at_breakpoint): Reimplement.
3059 (add_breakpoint_commands): Take a struct breakpoint pointer
3060 instead of an address. Adjust.
3061 (gdb_no_commands_at_breakpoint): Rename to ...
3062 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3063 parameter. Return true if no breakpoint was found. Change debug
3064 output.
3065 (gdb_no_commands_at_breakpoint): Reimplement.
3066 (run_breakpoint_commands): Rename to ...
3067 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3068 and change return type to boolean.
3069 (run_breakpoint_commands): New function.
3070 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3071 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3072 breakpoint. Go through the_target->remove_point instead of
3073 assuming memory breakpoint.
3074 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3075 software and hardware breakpoints.
3076 (reinsert_raw_breakpoint): Go through the_target->insert_point
3077 instead of assuming memory breakpoint.
3078 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3079 software and hardware breakpoints.
3080 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3081 Check both software and hardware breakpoints.
3082 (validate_inserted_breakpoint): Assert the breakpoint is a
3083 software breakpoint. Set the inserted flag to -1 instead of
3084 setting shlib_disabled.
3085 (delete_disabled_breakpoints): Adjust.
3086 (validate_breakpoints): Only validate software breakpoints.
3087 Adjust to inserted flag change.
3088 (check_mem_read, check_mem_write): Skip breakpoint types other
3089 than software breakpoints. Adjust to inserted flag change.
3090 * mem-break.h (enum raw_bkpt_type): New enum.
3091 (raw_breakpoint, struct process_info): Forward declare.
3092 (Z_packet_to_target_hw_bp_type): Delete declaration.
3093 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3094 (set_gdb_breakpoint, delete_gdb_breakpoint)
3095 (clear_breakpoint_conditions): New declarations.
3096 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3097 (breakpoint_inserted_here): Update comment.
3098 (add_breakpoint_condition, add_breakpoint_commands): Replace
3099 address parameter with a breakpoint pointer parameter.
3100 (gdb_breakpoint_here): Update comment.
3101 (delete_gdb_breakpoint_at): Delete.
3102 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3103 * server.c (process_point_options): Take a struct breakpoint
3104 pointer instead of an address. Adjust.
3105 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3106 delete_gdb_breakpoint.
3107 * spu-low.c (spu_target_ops): Install NULL as
3108 supports_z_point_type method.
3109 * target.h: Include mem-break.h.
3110 (struct target_ops) <prepare_to_access_memory>: Update comment.
3111 <supports_z_point_type>: New field.
3112 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3113 instead of a char. Also take a raw breakpoint pointer.
3114 * win32-arm-low.c (the_low_target): Install NULL as
3115 supports_z_point_type.
3116 * win32-i386-low.c (i386_supports_z_point_type): New function.
3117 (i386_insert_point, i386_remove_point): Adjust to new interface.
3118 (the_low_target): Install i386_supports_z_point_type.
3119 * win32-low.c (win32_supports_z_point_type): New function.
3120 (win32_insert_point, win32_remove_point): Adjust to new interface.
3121 (win32_target_ops): Install win32_supports_z_point_type.
3122 * win32-low.h (struct win32_target_ops):
3123 <supports_z_point_type>: New method.
3124 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3125 instead of a char. Also take a raw breakpoint pointer.
3126
932539e3
PA
31272014-05-20 Pedro Alves <palves@redhat.com>
3128
3129 * mem-break.h: Include break-common.h.
3130 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3131 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3132 (Z_packet_to_target_hw_bp_type): New declaration.
3133 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3134 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3135 (Z_PACKET_ACCESS_WP): Delete macros.
3136 (Z_packet_to_hw_type): Delete function.
3137 * i386-low.h: Don't include break-common.h here.
3138 (Z_packet_to_hw_type): Delete declaration.
3139 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3140 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3141 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3142 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3143 * linux-aarch64-low.c: Don't include break-common.h here.
3144 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3145 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3146 (Z_packet_to_target_hw_bp_type): Delete function.
3147 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3148 function.
3149 (mips_insert_point, mips_remove_point): Use
3150 Z_packet_to_target_hw_bp_type.
3151
4ff0d3d8
PA
31522014-05-20 Pedro Alves <palves@redhat.com>
3153
3154 * linux-aarch64-low.c: Include break-common.h.
3155 (enum target_point_type): Delete.
3156 (Z_packet_to_point_type): Rename to ...
3157 (Z_packet_to_target_hw_bp_type): ... this, and return a
3158 target_hw_bp_type instead.
3159 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3160 instead of an enum target_point_type.
3161 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3162 breakpoint type.
3163 (aarch64_dr_state_insert_one_point)
3164 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3165 (aarch64_handle_aligned_watchpoint)
3166 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3167 Take an enum target_hw_bp_type instead of an enum
3168 target_point_type.
3169 (aarch64_supports_z_point_type): New function.
3170 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3171 use Z_packet_to_target_hw_bp_type.
3172
786dc519
JB
31732014-05-20 Joel Brobecker <brobecker@adacore.com>
3174
3175 * configure.ac: Only use -Werror by default when DEVELOPMENT
3176 is true.
3177 * configure: Regenerate.
3178
9e0aa64f
JK
31792014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3180
3181 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3182 * linux-x86-low.c (X86_64_USER_REGS): New.
3183 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3184
2b577b92
YQ
31852014-04-28 Yao Qi <yao@codesourcery.com>
3186
3187 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3188 name.
3189
94611da2
PA
31902014-04-25 Pedro Alves <palves@redhat.com>
3191
3192 PR server/16255
3193 * linux-low.c (linux_attach_fail_reason_string): New function.
3194 (linux_attach_lwp): Delete.
3195 (linux_attach_lwp_1): Rename to ...
3196 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3197 argument. Remove "initial" parameter. Return int instead of
3198 void. Don't error or warn here.
3199 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3200 failure to attach to the tgid. Call warning when failing to
3201 attach to an lwp.
3202 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3203 argument. Remove "initial" parameter. Return int instead of
3204 void. Don't error or warn here.
3205 (linux_attach_fail_reason_string): New declaration.
3206 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3207 interface change. Use linux_attach_fail_reason_string.
3208
01f9f808
MS
32092014-04-24 Michael Sturm <michael.sturm@mintel.com>
3210 Walfred Tedeschi <walfred.tedeschi@intel.com>
3211
3212 * Makefile.in: Added rules to handle new files
3213 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3214 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3215 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3216 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3217 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3218 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3219 x32-avx512-linux.o.
3220 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3221 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3222 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3223 i386/x32-avx512.xml.
3224 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3225 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3226 i386/x32-avx512-linux.xml.
3227 * i387-fp.c (num_avx512_k_registers): New constant for number
3228 of K registers.
3229 (num_avx512_zmmh_low_registers): New constant for number of
3230 lower ZMM registers (0-15).
3231 (num_avx512_zmmh_high_registers): New constant for number of
3232 higher ZMM registers (16-31).
3233 (num_avx512_ymmh_registers): New contant for number of higher
3234 YMM registers (ymm16-31 added by avx521 on x86_64).
3235 (num_avx512_xmm_registers): New constant for number of higher
3236 XMM registers (xmm16-31 added by AVX512 on x86_64).
3237 (struct i387_xsave): Add space for AVX512 registers.
3238 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3239 Add code to handle AVX512 registers.
3240 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3241 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3242 prototypei from generated file.
3243 (tdesc_amd64_avx512_linux): Likewise.
3244 (init_registers_x32_avx512_linux): Likewise.
3245 (tdesc_x32_avx512_linux): Likewise.
3246 (init_registers_i386_avx512_linux): Likewise.
3247 (tdesc_i386_avx512_linux): Likewise.
3248 (x86_64_regmap): Add AVX512 registers.
3249 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3250 mask.
3251 (initialize_low_arch): Add code to initialize AVX512 registers.
3252
51aa91f9
PA
32532014-04-23 Pedro Alves <palves@redhat.com>
3254
3255 * mem-break.c (find_gdb_breakpoint_at): Make static.
3256 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3257
a4165e94
PA
32582014-04-23 Pedro Alves <palves@redhat.com>
3259
3260 * i386-low.c: Don't include break-common.h here.
3261 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3262 prototype to take target_hw_bp_type as argument instead of a Z
3263 packet char.
3264 * i386-low.h: Include break-common.h here.
3265 (Z_packet_to_hw_type): Declare.
3266 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3267 prototypes.
3268 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3269 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3270 (x86_remove_point): Convert the packet number to a
3271 target_hw_bp_type before calling i386_low_remove_watchpoint.
3272 * win32-i386-low.c (i386_insert_point): Convert the packet number
3273 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3274 (i386_remove_point): Convert the packet number to a
3275 target_hw_bp_type before calling i386_low_remove_watchpoint.
3276
b8acf843
PA
32772014-04-23 Pedro Alves <palves@redhat.com>
3278
3279 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3280
d708bcd1
PA
32812014-04-10 Pedro Alves <palves@redhat.com>
3282
3283 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3284 Check if the condition or command is NULL before checking if the
3285 breakpoint is known. On success, return true.
3286 * mem-break.h (add_breakpoint_condition): Document return.
3287 (add_breakpoint_commands): Add describing comment.
3288 * server.c (skip_to_semicolon): New function.
3289 (process_point_options): Use it.
3290
2eec7d5b
PA
32912014-04-09 Pedro Alves <palves@redhat.com>
3292
3293 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3294 to lwpid_of.
3295
fa96cb38
PA
32962014-02-27 Pedro Alves <palves@redhat.com>
3297
3298 PR 12702
3299 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3300 macros.
3301 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3302 output.
3303 (last_thread_of_process_p): Take a PID argument instead of a
3304 thread pointer.
3305 (linux_wait_for_lwp): Delete.
3306 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3307 functions.
3308 (linux_low_filter_event): New function, party factored out from
3309 linux_wait_for_event.
3310 (linux_wait_for_event): Rename to ...
3311 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3312 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3313 sigsuspend. Check for zombie leaders.
3314 (linux_wait_for_event): Reimplement as wrapper around
3315 linux_wait_for_event_filtered.
3316 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3317 a normal or signal exit is seen, it's the whole process exiting.
3318 (wait_for_sigstop): No longer a for_each_inferior callback.
3319 Rewrite on top of linux_wait_for_event_filtered.
3320 (stop_all_lwps): Call wait_for_sigstop directly.
3321 * server.c (resume, handle_target_event): Handle
3322 TARGET_WAITKIND_NO_RESUMED.
3323
d763de10
JB
33242014-02-26 Joel Brobecker <brobecker@adacore.com>
3325
3326 * win32-low.c (psapi_get_dll_name,
3327 * win32_CreateToolhelp32Snapshot): Delete.
3328 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3329 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3330 Delete.
3331 (handle_load_dll): Add function description.
3332 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3333
850a0f76
JB
33342014-02-26 Joel Brobecker <brobecker@adacore.com>
3335
3336 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3337 Add comment.
3338 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3339 base address when calling win32_add_one_solib.
3340 (handle_load_dll): Delete local variable load_addr.
3341 Remove 0x1000 offset applied to DLL base address when calling
3342 win32_add_one_solib.
3343 (handle_unload_dll): Add comment.
3344
f25b3fc3
JB
33452014-02-26 Joel Brobecker <brobecker@adacore.com>
3346
3347 * win32-low.c (win32_add_all_dlls): Renames
3348 win32_ensure_ntdll_loaded. Rewrite function documentation.
3349 Adjust implementation to always load all DLLs.
3350 Add 0x1000 offset to DLL base address when calling
3351 win32_add_one_solib.
3352 (child_initialization_done): New static global.
3353 (do_initial_child_stuff): Set child_initialization_done to
3354 zero during child initialization, and 1 after. Replace call
3355 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3356 Add comment.
3357 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3358 (handle_unload_dll): Add function documentation.
3359 (get_child_debug_event): Ignore load and unload DLL events
3360 during child initialization.
3361
d86d4aaf
DE
33622014-02-20 Doug Evans <dje@google.com>
3363
3bc32da3 3364 Remove global all_lwps.
d86d4aaf
DE
3365 * inferiors.h (ptid_of): Move here from linux-low.h.
3366 (pid_of, lwpid_of): Ditto.
3367 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3368 parameter is a struct thread_info * now.
3369 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3370 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3371 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3372 directly.
3373 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3374 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3375 * linux-arm-low.c (update_registers_callback): Update, "entry"
3376 parameter is a struct thread_info * now.
3377 Fetch lwpid from current_inferior directly.
3378 (arm_insert_point): Pass &all_threads to find_inferior instead of
3379 &all_lwps.
3380 (arm_remove_point): Ditto.
3381 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3382 (arm_prepare_to_resume): Fetch pid from thread.
3383 (arm_read_description): Fetch lwpid from current_inferior directly.
3384 * linux-low.c (all_lwps): Delete.
3385 (delete_lwp): Delete call to remove_inferior.
3386 (handle_extended_wait): Fetch lwpid from thread.
3387 (add_lwp): Don't set lwp->entry.id. Remove call to
3388 add_inferior_to_list.
3389 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3390 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3391 (kill_one_lwp_callback): Ditto.
3392 (linux_kill): Don't dereference NULL pointer.
3393 Fetch ptid,lwpid from thread.
3394 (get_detach_signal): Fetch ptid from thread.
3395 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3396 Simplify call to regcache_invalidate_thread.
3397 (delete_lwp_callback): Update, "entry" parameter is a
3398 struct thread_info * now. Fetch pid from thread.
3399 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3400 (status_pending_p_callback): Update, "entry" parameter is a
3401 struct thread_info * now. Fetch ptid from thread.
3402 (find_lwp_pid): Update, "entry" parameter is a
3403 struct thread_info * now.
3404 (linux_wait_for_lwp): Fetch pid from thread.
3405 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3406 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3407 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3408 (dequeue_one_deferred_signal): Ditto.
3409 (cancel_breakpoint): Fetch ptid from current_inferior.
3410 (linux_wait_for_event): Pass &all_threads to find_inferior,
3411 not &all_lwps. Fetch ptid, lwpid from thread.
3412 (count_events_callback): Update, "entry" parameter is a
3413 struct thread_info * now.
3414 (select_singlestep_lwp_callback): Ditto.
3415 (select_event_lwp_callback): Ditto.
3416 (cancel_breakpoints_callback): Ditto.
3417 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3418 not &all_lwps.
3419 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3420 (unsuspend_one_lwp): Update, "entry" parameter is a
3421 struct thread_info * now.
3422 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3423 not &all_lwps.
3424 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3425 Fetch lwpid from thread, not lwp.
3426 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3427 Pass &all_threads to find_inferior, not &all_lwps.
3428 (send_sigstop): Fetch lwpid from thread, not lwp.
3429 (send_sigstop_callback): Update, "entry" parameter is a
3430 struct thread_info * now.
3431 (suspend_and_send_sigstop_callback): Ditto.
3432 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3433 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3434 struct thread_info * now.
3435 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3436 from thread, lwp.
3437 (lwp_running): Update, "entry" parameter is a
3438 struct thread_info * now.
3439 (stop_all_lwps): Fetch ptid from thread.
3440 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3441 (linux_resume_one_lwp): Fetch lwpid from thread.
3442 (linux_set_resume_request): Update, "entry" parameter is a
3443 struct thread_info * now. Fetch pid, lwpid from thread.
3444 (resume_status_pending_p): Update, "entry" parameter is a
3445 struct thread_info * now.
3446 (need_step_over_p): Ditto. Fetch lwpid from thread.
3447 (start_step_over): Fetch lwpid from thread.
3448 (linux_resume_one_thread): Update, "entry" parameter is a
3449 struct thread_info * now. Fetch lwpid from thread.
3450 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3451 (proceed_one_lwp): Update, "entry" parameter is a
3452 struct thread_info * now. Fetch lwpid from thread.
3453 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3454 struct thread_info * now.
3455 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3456 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3457 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3458 directly.
3459 (regsets_store_inferior_registers): Ditto.
3460 (fetch_register, store_register): Ditto.
3461 (linux_read_memory, linux_write_memory): Ditto.
3462 (linux_request_interrupt): Ditto.
3463 (linux_read_auxv): Ditto.
3464 (linux_xfer_siginfo): Ditto.
3465 (linux_qxfer_spu): Ditto.
3466 (linux_qxfer_libraries_svr4): Ditto.
3467 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3468 moved to inferiors.h.
3469 (get_lwp): Delete.
3470 (get_thread_lwp): Update.
3471 (struct lwp_info): Delete member "entry". Simplify comment for
3472 member "thread".
3473 (all_lwps): Delete.
3474 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3475 current_inferior directly.
3476 (update_watch_registers_callback): Update, "entry" parameter is a
3477 struct thread_info * now. Fetch pid from thread.
3478 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3479 (mips_insert_point): Fetch lwpid from current_inferior.
3480 Pass &all_threads to find_inferior, not &all_lwps.
3481 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3482 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3483 directly.
3484 (mips_stopped_data_address): Ditto.
3485 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3486 directly.
3487 * linux-tile-low.c (tile_arch_setup): Ditto.
3488 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3489 (update_debug_registers_callback): Update, "entry" parameter is a
3490 struct thread_info * now. Fetch pid from thread.
3491 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3492 Pass &all_threads to find_inferior, not &all_lwps.
3493 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3494 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3495 Pass &all_threads to find_inferior, not &all_lwps.
3496 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3497 (i386_dr_low_get_status): Ditto.
3498 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3499 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3500 (x86_linux_read_description): Ditto.
3501 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3502
3b8361aa
DE
35032014-02-20 Doug Evans <dje@google.com>
3504
3505 * inferiors.c (get_first_inferior): Fix buglet.
3506
f7667f0d
DE
35072014-02-19 Doug Evans <dje@google.com>
3508
3509 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3510 * inferiors.c (add_thread): Change result type to struct thread_info *.
3511 All callers updated.
3512 (add_lwp): Call add_thread here instead of in callers.
3513 All callers updated.
3514 * linux-low.h (get_lwp_thread): Rewrite.
3515 (struct lwp_info): New member "thread".
3516
b3312d80
DE
35172014-02-19 Doug Evans <dje@google.com>
3518
3519 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3520 All callers updated.
3521
ecc6f45c
DE
35222014-02-19 Doug Evans <dje@google.com>
3523
3524 * inferiors.c (add_thread): Fix whitespace.
3525
649ebbca
DE
35262014-02-19 Doug Evans <dje@google.com>
3527
3528 * dll.c (clear_dlls): Replace accessing list implemention details
3529 with API function.
3530 * gdbthread.h (get_first_thread): Declare.
3531 * inferiors.c (for_each_inferior_with_data): New function.
3532 (get_first_thread): New function.
3533 (find_thread_ptid): Simplify.
3534 (get_first_inferior): New function.
3535 (clear_list): Delete.
3536 (one_inferior_p): New function.
3537 (clear_inferior_list): New function.
3538 (clear_inferiors): Update.
3539 * inferiors.h (for_each_inferior_with_data): Declare.
3540 (clear_inferior_list): Declare.
3541 (one_inferior_p): Declare.
3542 (get_first_inferior): Declare.
3543 * linux-low.c (linux_wait_for_event): Replace accessing list
3544 implemention details with API function.
3545 * server.c (target_running): Ditto.
3546 (accumulate_file_name_length): New function.
3547 (emit_dll_description): New function.
3548 (handle_qxfer_libraries): Replace accessing list implemention
3549 details with API function.
3550 (handle_qxfer_threads_worker): New function.
3551 (handle_qxfer_threads_proper): Replace accessing list implemention
3552 details with API function.
3553 (handle_query): Ditto.
3554 (visit_actioned_threads_callback_ftype): New typedef.
3555 (visit_actioned_threads_data): New struct.
3556 (visit_actioned_threads): Rewrite to be find_inferior callback.
3557 (resume): Call find_inferior.
3558 (handle_status): Replace accessing list implemention
3559 details with API function.
3560 (process_serial_event): Replace accessing list implemention details
3561 with API function.
3562 * target.c (set_desired_inferior): Replace accessing list implemention
3563 details with API function.
3564 * tracepoint.c (same_process_p): New function.
3565 (gdb_agent_about_to_close): Replace accessing list implemention
3566 details with API function.
3567 * win32-low.c (child_delete_thread): Replace accessing list
3568 implemention details with API function.
3569 (match_dll_by_basename): New function.
3570 (dll_is_loaded_by_basename): New function.
3571 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3572 details call to dll_is_loaded_by_basename.
3573
80894984
DE
35742014-02-19 Doug Evans <dje@google.com>
3575
3576 * dll.h (struct dll_info): Add comment.
3577 * gdbthread.h (struct thread_info): Add comment.
3578 (current_ptid): Simplify.
3579 * inferiors.c (add_process): Update.
3580 (remove_process): Update.
3581 * inferiors.h (struct process_info): Rename member "head" to "entry".
3582 * linux-low.c (delete_lwp): Update.
3583 (add_lwp): Update.
3584 (last_thread_of_process_p): Update.
3585 (kill_one_lwp_callback, linux_kill): Update.
3586 (status_pending_p_callback): Update.
3587 (wait_for_sigstop): Update. Simplify read of ptid.
3588 (start_step_over): Update.
3589 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3590 (get_lwp_thread): Update.
3591 (struct lwp_info): Rename member "head" to "entry".
3592 * regcache.h (inferior_list_entry): Delete.
3593 * server.c (kill_inferior_callback): Update.
3594 (detach_or_kill_inferior_callback): Update.
3595 (print_started_pid): Update.
3596 (print_attached_pid): Update.
3597 (process_serial_event): Simplify read of ptid.
3598 * thread-db.c (thread_db_create_event): Update.
3599 (thread_db_get_tls_address): Update.
3600 * win32-low.c (current_inferior_ptid): Simplify.
3601
46917d26
TT
36022014-02-19 Tom Tromey <tromey@redhat.com>
3603
3604 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3605 argument.
3606 (target_supports_btrace): Update.
3607
0759a81e
YQ
36082014-02-14 Yao Qi <yao@codesourcery.com>
3609
3610 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3611 (rsp-low-ipa.o): New target.
3612
a7191e8b
TT
36132014-02-12 Tom Tromey <tromey@redhat.com>
3614
3615 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3616 convert_ascii_to_int.
3617 * regcache.c (registers_to_string): Likewise.
3618 * remote-utils.c (decode_M_packet): Likewise.
3619 * server.c (process_serial_event): Likewise.
3620
ff0e980e
TT
36212014-02-12 Tom Tromey <tromey@redhat.com>
3622
3623 * server.c (handle_query, handle_v_run): Use hex2bin, not
3624 unhexify.
3625 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3626
e9371aff
TT
36272014-02-12 Tom Tromey <tromey@redhat.com>
3628
3629 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3630 convert_int_to_ascii.
3631 * regcache.c (registers_to_string, collect_register_as_string):
3632 Likewise.
3633 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3634 Likewise.
3635 * server.c (process_serial_event): Likewise.
3636 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3637 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3638
971dc0b8
TT
36392014-02-12 Tom Tromey <tromey@redhat.com>
3640
3641 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3642 bin2hex, not hexify.
3643 * tracepoint.c (cmd_qtstatus): Likewise.
3644
0a822afb
TT
36452014-02-12 Tom Tromey <tromey@redhat.com>
3646
3647 * remote-utils.c (monitor_output): Pass explicit length to
3648 hexify.
3649
9c3d6531
TT
36502014-02-12 Tom Tromey <tromey@redhat.com>
3651
3652 * tracepoint.c: Include rsp-low.h.
3653 * server.c: Include rsp-low.h.
3654 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3655 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3656 declare.
3657 * remote-utils.c: Include rsp-low.h.
3658 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3659 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3660 (convert_int_to_ascii, convert_ascii_to_int): Move to
3661 common/rsp-low.c.
3662 * regcache.c: Include rsp-low.h.
3663 * ax.c: Include rsp-low.h.
3664 * Makefile.in (SFILES): Add common/rsp-low.c.
3665 (OBS): Add rsp-low.o.
3666 (rsp-low.o): New target.
3667
01fd3ea5
TT
36682014-02-12 Tom Tromey <tromey@redhat.com>
3669
3670 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3671 Include print-utils.h.
3672 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3673 (plongest, thirty_two, phex_nz): Remove.
3674 * Makefile.in (SFILES): Add common/print-utils.c.
3675 (OBS): Add print-utils.o.
3676 (print-utils-ipa.o): New target.
3677 (print-utils.o): New target.
3678 (IPA_OBJS): Add print-utils-ipa.o.
3679
e99dc820
TT
36802014-02-06 Tom Tromey <tromey@redhat.com>
3681
3682 * Makefile.in (SFILES): Fix indentation.
3683
ee1e2d4f
DE
36842014-02-05 Doug Evans <dje@google.com>
3685
3686 * linux-low.c (linux_wait_for_event): Improve comment.
3687 (linux_wait_1): Keep current_inferior in sync with event_child.
3688
f5a02773
DE
36892014-01-22 Doug Evans <dje@google.com>
3690
3691 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3692
87ce2a04
DE
36932014-01-22 Doug Evans <dje@google.com>
3694
3695 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3696 * configure: Regenerate.
3697 * config.in: Regenerate.
3698 * Makefile.in (SFILES): Add debug.c.
3699 (OBS): Add debug.o.
3700 * debug.c: New file.
3701 * debug.h: New file.
3702 * linux-aarch64-low.c (*): Update all debugging printfs to use
3703 debug_printf instead of fprintf.
3704 * linux-arm-low.c (*): Ditto.
3705 * linux-cris-low.c (*): Ditto.
3706 * linux-crisv32-low.c (*): Ditto.
3707 * linux-m32r-low.c (*): Ditto.
3708 * linux-sparc-low.c (*): Ditto.
3709 * linux-x86.c (*): Ditto.
3710 * linux-low.c (*): Ditto.
3711 (linux_wait_1): Add calls to debug_enter, debug_exit.
3712 (linux_wait): Remove redundant debugging printf.
3713 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3714 (linux_resume, unstop_all_lwps): Ditto.
3715 * mem-break.c (*): Update all debugging printfs to use
3716 debug_printf instead of fprintf.
3717 * remote-utils.c (*): Ditto.
3718 * thread-db.c (*): Ditto.
3719 * server.c #include <ctype.h>, "gdb_vecs.h".
3720 (debug_threads): Moved to debug.c.
3721 (*): Update all debugging printfs to use debug_printf instead of
3722 fprintf.
3723 (start_inferior): Replace call to fflush with call to debug_flush.
3724 (monitor_show_help): Mention set debug-format.
3725 (parse_debug_format_options): New function.
3726 (handle_monitor_command): Handle "monitor set debug-format".
3727 (gdbserver_usage): Mention --debug-format.
3728 (main): Parse --debug-format.
3729 * server.h (debug_threads): Declaration moved to debug.h.
3730 #include "debug.h".
3731 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3732 trace_debug_1 that uses debug_printf.
3733 (tracepoint_look_up_symbols): Update all debugging printfs to use
3734 debug_printf instead of fprintf.
3735
e671835b
BS
37362014-01-20 Baruch Siach <baruch@tkos.co.il>
3737
3738 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3739 sys/ptrace.h.
3740
b5737fa9
PA
37412014-01-17 Pedro Alves <palves@redhat.com>
3742
ea38d2a9 3743 PR build/16445
c7faa97a
PA
3744 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3745 defined after including gdb_proc_service.h.
b5737fa9 3746
40ed484e
DE
37472014-01-16 Doug Evans <dje@google.com>
3748
3749 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3750 (match_dll): Use it.
3751
969c39fb
MM
37522014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3753
3754 * target.h (target_ops) <read_btrace>: Change parameters and
3755 return type to allow error reporting.
3756 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3757 trace reading errors on.
3758 * linux-low.c (linux_low_read_btrace): Pass trace reading
3759 errors on.
3760 (linux_low_disable_btrace): New.
3761
ab7f45ba
DE
37622014-01-15 Doug Evans <dje@google.com>
3763
3764 * inferiors.c (thread_id_to_gdb_id): Delete.
3765 * inferiors.h (thread_id_to_gdb_id): Delete.
3766
66af0f44
EZ
37672014-01-13 Eli Zaretskii <eliz@gnu.org>
3768
3769 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3770 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3771 versions.
3772
9939e131
PA
37732014-01-08 Pedro Alves <palves@redhat.com>
3774
3775 * server.c (handle_status): Don't discard previous queued stop
3776 replies or thread's pending status here.
3777 (main) <disconnection>: Do it here instead.
3778
b7ea362b
PA
37792014-01-08 Pedro Alves <palves@redhat.com>
3780
3781 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3782 * server.c (visit_actioned_threads, handle_pending_status): New
3783 function.
3784 (handle_v_cont): Factor out parts to ...
3785 (resume): ... this new function. If in all-stop, and a thread
3786 being resumed has a pending status, report it without actually
3787 resuming.
3788 (myresume): Adjust to use the new 'resume' function.
3789 (clear_pending_status_callback, set_pending_status_callback)
3790 (find_status_pending_thread_callback): New functions.
3791 (handle_status): Handle the case of multiple threads having
3792 interesting statuses to report. Report threads' real last signal
3793 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3794 with an interesting thread to report the status for, instead of
3795 always reporting the status of the first thread.
3796
28498c42
JB
37972014-01-01 Joel Brobecker <brobecker@adacore.com>
3798
3799 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3800 * gdbreplay.c (gdbreplay_version): Likewise.
3801
f45c82da
YZ
38022013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3803
3804 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3805 iov.iov_len with the real length in use.
3806
379a5e2d
JB
38072013-12-13 Joel Brobecker <brobecker@adacore.com>
3808
3809 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3810 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3811 for all targets that use win32-low.c.
3812 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3813 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3814
4210d83e
PA
38152013-12-13 Pedro Alves <palves@redhat.com>
3816
3817 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3818 if equal to TARGET_WAITKIND_LOADED.
3819 * win32-low.c (cached_status): New static global.
3820 (win32_wait): Add declaration.
3821 (do_initial_child_stuff): Flush all initial pending debug events
3822 up to the initial breakpoint.
3823 (win32_wait): If CACHED_STATUS was set, return that instead
3824 of doing a real wait. Remove the code resuming the execution
3825 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3826 during the initial phase. Also remove the code changing
3827 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3828 TARGET_WAITKIND_STOPPED.
3829
e7f0d979
YQ
38302013-12-11 Yao Qi <yao@codesourcery.com>
3831
3832 * notif.c (handle_notif_ack): Return 0 if no notification
3833 matches.
3834
ebcf782c
DE
38352013-11-20 Doug Evans <dje@google.com>
3836
3837 * linux-low.c (linux_set_resume_request): Fix comment.
3838
20ad9378
DE
38392013-11-20 Doug Evans <dje@google.com>
3840
3841 * linux-low.c (resume_status_pending_p): Tweak comment.
3842
a196ebeb
WT
38432013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3844
3845 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3846 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3847 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3848 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3849 (srv_amd64_regobj): Add amd64-mpx.o.
3850 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3851 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3852 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3853 * i387-fp.c (num_pl_bnd_register) Added constant.
3854 (num_pl_bnd_cfg_registers) Added constant.
3855 (struct i387_xsave) Added reserved area and MPX fields.
3856 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3857 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3858 function.
3859 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3860 (init_registers_amd64_mpx_linux): Declare new function.
3861 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3862 (x86_64_regmap): Add MPX registers.
3863 (x86_linux_read_description): Add MPX case.
3864 (initialize_low_arch): Initialize MPX targets.
3865
0080a2f6
TT
38662013-11-18 Tom Tromey <tromey@redhat.com>
3867
3868 * configure: Rebuild.
3869 * configure.ac: Don't check for stdlib.h.
3870 * gdbreplay.c: Unconditionally include stdlib.h.
3871
2978b111
TT
38722013-11-18 Tom Tromey <tromey@redhat.com>
3873
3874 * config.in: Rebuild.
3875 * configure: Rebuild.
3876 * configure.ac: Don't use AC_HEADER_DIRENT.
3877
a3d08894
TT
38782013-11-18 Tom Tromey <tromey@redhat.com>
3879
3880 * server.h: Don't check HAVE_STRING_H.
3881 * gdbreplay.c: Don't check HAVE_STRING_H.
3882 * configure: Rebuild.
3883
0a5dd17d
TT
38842013-11-18 Tom Tromey <tromey@redhat.com>
3885
3886 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3887 LIBGNU.
3888
1bd2f0ba
TT
38892013-11-08 Tom Tromey <tromey@redhat.com>
3890
3891 * configure, config.in: Rebuild.
3892 * configure.ac: Remove unused configury.
3893
3266f10b
TT
38942013-11-08 Tom Tromey <tromey@redhat.com>
3895
3896 * acinclude.m4: Include common.m4, codeset.m4.
3897 * configure, config.in: Rebuild.
3898 * configure.ac: Use GDB_AC_COMMON.
3899
6682d959
AA
39002013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3901
3902 * linux-s390-low.c (HWCAP_S390_TE): New define.
3903 (s390_arch_setup): Consider the TE field in the HWCAP for
3904 determining 'have_regset_tdb'.
3905
fd0a4d76
SDJ
39062013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3907
3908 PR gdb/16014
3909 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3910 call to sizeof.
3911
1a3d890b
PA
39122013-10-02 Pedro Alves <palves@redhat.com>
3913
3914 * server.c (process_serial_event): Don't output "GDBserver
3915 exiting" if GDB is connected through stdio.
3916 * target.c (mywait): Likewise, be silent if GDB is connected
3917 through stdio.
3918
97ad4581
JB
39192013-10-01 Joel Brobecker <brobecker@adacore.com>
3920
3921 * lynx-low.c (lynx_add_threads_after_attach): New function.
3922 (lynx_attach): Remove call to add_thread. Add call to
3923 lynx_add_threads_after_attach instead.
3924
5b4e221c
MF
39252013-09-28 Mike Frysinger <vapier@gentoo.org>
3926
3927 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3928 * config.in, configure: Regenerated.
3929
ee47b2f8
YQ
39302013-09-18 Yao Qi <yao@codesourcery.com>
3931
3932 PR server/15959
3933 * server.c (start_inferior): Clear 'resume_info'.
3934
d6707650 39352013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 3936
d6707650
JW
3937 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
3938 for each register.
3939
9243dd0e 39402013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 3941
9243dd0e
JW
3942 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
3943 linux-tile-low.o to srv_tgtobj.
3944
c623a6ef
WN
39452013-09-16 Will Newton <will.newton@linaro.org>
3946
3947 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
3948 out regs.
3949
fb71d39e
PA
39502013-09-06 Pedro Alves <palves@redhat.com>
3951
3952 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
3953 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
3954 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
3955 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
3956 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
3957 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
3958
8e7e9910
PA
39592013-09-06 Pedro Alves <palves@redhat.com>
3960
3961 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
3962 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
3963
7c3a12ca
PA
39642013-09-06 Pedro Alves <palves@redhat.com>
3965
3966 * linux-amd64-ipa.c: Include tracepoint.h.
3967 * linux-i386-ipa.c: Include tracepoint.h.
3968
8eb3d7b6
RW
39692013-09-06 Ricard Wanderlof <ricardw@axis.com>
3970
3971 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
3972 (ps_get_thread_area): New function.
3973
eddddb9d
RW
39742013-09-06 Ricard Wanderlof <ricardw@axis.com>
3975
3976 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
3977 (initialize_low_arch): Call init_registers_crisv32 rather than
3978 init_register_crisv32.
3979
533b0600
PA
39802013-09-05 Pedro Alves <palves@redhat.com>
3981
3982 * server.h (handle_vFile, hostio_last_error_from_errno): Move
3983 to ...
3984 * hostio.h: ... this new file.
3985 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
3986 win32-low.c: Include hostio.h.
3987
0ce3d3b5
PA
39882013-09-05 Pedro Alves <palves@redhat.com>
3989
3990 * server.h (gdb_client_data, handler_func, callback_handler_func)
3991 (delete_file_handler, add_file_handler, append_callback_event)
3992 (delete_callback_event, start_event_loop, initialize_event_loop):
3993 Move to event-loop.h and include it.
3994 * event-loop.h: New file.
3995
799cdc37
PA
39962013-09-05 Pedro Alves <palves@redhat.com>
3997
3998 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
3999 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4000 (loaded_dll, unloaded_dll): Move to ...
4001 * dll.h: ... this new file.
4002 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4003
6a6bbd9d
PA
40042013-09-05 Pedro Alves <palves@redhat.com>
4005
4006 * server.h (current_process, get_thread_process, all_processes)
4007 (add_inferior_to_list, for_each_inferior, current_inferior)
4008 (remove_inferior, add_process, remove_process, find_process_pid)
4009 (have_started_inferiors_p, have_attached_inferiors_p)
4010 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4011 (clear_inferiors, find_inferior, find_inferior_id)
4012 (inferior_target_data, set_inferior_target_data)
4013 (inferior_regcache_data, set_inferior_regcache_data): Move to
4014 inferiors.h, and include it.
4015 * inferiors.h: New file.
4016
f699aaba
PA
40172013-09-05 Pedro Alves <palves@redhat.com>
4018
4019 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4020 Move ...
72f4393d 4021 * ax.h: ... here.
f699aaba 4022
c144c7a0
PA
40232013-09-05 Pedro Alves <palves@redhat.com>
4024
4025 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4026 tracepoint.h.
4027 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4028 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4029 (handle_tracepoint_general_set, handle_tracepoint_query)
4030 (tracepoint_finished_step, tracepoint_was_hit)
4031 (release_while_stepping_state_list, current_traceframe)
4032 (in_readonly_region, traceframe_read_mem)
4033 (fetch_traceframe_registers, traceframe_read_sdata)
4034 (traceframe_read_info, struct fast_tpoint_collect_status)
4035 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4036 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4037 (supply_fast_tracepoint_registers)
4038 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4039 (ipa_tdesc, claim_trampoline_space)
4040 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4041 (agent_mem_read, agent_get_trace_state_variable_value)
4042 (agent_set_trace_state_variable_value, agent_tsv_read)
4043 (agent_mem_read_string, get_raw_reg_func_addr)
4044 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4045 * tracepoint.h: ... this new file.
4046
ff42e6ab
PA
40472013-09-05 Pedro Alves <palves@redhat.com>
4048
4049 * server.h (perror_with_name, error, fatal, warning, paddress)
4050 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4051 include it.
4052 * utils.h: New file.
4053
541af0f4
PA
40542013-09-05 Pedro Alves <palves@redhat.com>
4055
4056 * server.h (remote_debug, noack_mode, transport_is_reliable)
4057 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4058 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4059 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4060 (write_enn, initialize_async_io, enable_async_io)
4061 (disable_async_io, check_remote_input_interrupt_request)
4062 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4063 (dead_thread_notify, prepare_resume_reply)
4064 (decode_address_to_semicolon, decode_address, decode_m_packet)
4065 (decode_M_packet, decode_X_packet, decode_xfer_write)
4066 (decode_search_memory_packet, unhexify, hexify)
4067 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4068 (look_up_one_symbol, relocate_instruction)
4069 (monitor_output): Move to remote-utils.h, and include it.
4070 * remote-utils.h: New file.
4071
eebdf26b
PA
40722013-09-05 Pedro Alves <palves@redhat.com>
4073
4074 * server.h (_): Delete.
4075
3aafd2ff
PA
40762013-09-02 Pedro Alves <palves@redhat.com>
4077
4078 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4079 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4080 allocated.
4081 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4082
cee83bcb
PM
40832013-09-02 Pierre Muller <muller@sourceware.org>
4084
4085 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4086 or WriteProcessMemory complete successfully and handle
4087 ERROR_PARTIAL_COPY error.
4088
9a13b2fa
PA
40892013-09-02 Pedro Alves <palves@redhat.com>
4090
4091 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4092 error instead of EIO.
4093
602e3198
JK
40942013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4095
4096 PR server/15604
4097 * linux-low.c: Include filestuff.h.
4098 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4099 * lynx-low.c: Include filestuff.h.
4100 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4101 * server.c: Include filestuff.h.
4102 (main): Call notice_open_fds.
4103 * spu-low.c: Include filestuff.h.
4104 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4105
96d7229d
LM
41062013-08-22 Luis Machado <lgustavo@codesourcery.com>
4107
4108 * Makefile.in: Explain why ../target and ../nat are not
4109 listed as include file search paths.
4110 (linux-waitpid.o): New object file rule.
4111 * configure.srv (srv_native_linux_obj): New variable.
4112 Replace all occurrences of linux native object files with
4113 $srv_native_linux_obj.
4114 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4115 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4116 (linux_enable_event_reporting): Remove declaration.
4117 (my_waitpid): Moved to common/linux-waitpid.c.
4118 (linux_wait_for_event): Pass ptid when calling
4119 linux_enable_event_reporting.
4120 (linux_supports_tracefork_flag): Remove.
4121 (linux_enable_event_reporting): Likewise.
4122 (linux_tracefork_grandchild): Remove.
4123 (STACK_SIZE): Moved to common/linux-ptrace.c.
4124 (linux_tracefork_child): Remove.
4125 (linux_test_for_tracefork): Remove.
4126 (linux_look_up_symbols): Call linux_supports_traceclone.
4127 (initialize_low): Remove call to linux_test_for_tracefork.
4128 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4129 common/linux-ptrace.h.
4130 (PTRACE_TYPE_ARG4): Likewise.
4131 Include linux-ptrace.h.
4132
32940073
PA
41332013-08-21 Pedro Alves <palves@redhat.com>
4134
4135 * config.in: Renegerate.
4136
33b60d58 41372013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 4138
33b60d58
LM
4139 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4140 (SFILES): Remove $(srcdir)/common/target-common.c and
4141 add $(srcdir)/target/waitstatus.c.
4142 (OBS): Remove target-common.o and add waitstatus.o.
4143 (server_h): Remove $(srcdir)/../common/target-common.h and
4144 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4145 and $(srcdir)/../target/waitstatus.h.
4146 (target-common.o): Remove.
4147 (waitstatus.o): New target object file.
4148 * target.h: Do not include target-common.h and
4149 include target/resume.h, target/wait.h and
4150 target/waitstatus.h.
4151
b8e1b30e
LM
41522013-08-13 Luis Machado <lgustavo@codesourcery.com>
4153
4154 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4155 to PTRACE_TYPE_ARG3.
4156 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4157 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4158 PTRACE_TYPE_ARG4.
4159 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4160 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4161
7a60ad40
YQ
41622013-07-27 Jie Zhang <jie@codesourcery.com>
4163 Daniel Jacobowitz <dan@codesourcery.com>
4164 Yao Qi <yao@codesourcery.com>
4165
4166 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4167 (mips-linux-watch.o): New rule.
4168 (mips_linux_watch_h): New variable.
4169 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4170 srv_tgtobj.
4171 * linux-mips-low.c: Include mips-linux-watch.h.
4172 (struct arch_process_info, struct arch_lwp_info): New.
4173 (update_watch_registers_callback): New function.
4174 (mips_linux_new_process, mips_linux_new_thread) New functions.
4175 (mips_linux_prepare_to_resume, mips_insert_point): New
4176 functions.
4177 (mips_remove_point, mips_stopped_by_watchpoint): New
4178 functions.
4179 (rsp_bp_type_to_target_hw_bp_type): New function.
4180 (mips_stopped_data_address): New function.
4181 (the_low_target): Add watchpoint support functions.
4182
de6f69ad
YQ
41832013-07-27 Yao Qi <yao@codesourcery.com>
4184
4185 * i386-low.c: Include break-common.h.
4186 (enum target_hw_bp_type): Remove.
4187
3360c0bf
LM
41882013-07-24 Luis Machado <lgustavo@codesourcery.com>
4189
4190 * Makefile.in (SFILES): /common/target-common.c.
4191 (OBS): Add target-common.o.
4192 (server_h): Add $(srcdir)/../common/target-common.h.
4193 (target-common.o): New target.
4194 * server.c (queue_stop_reply_callback): Free
4195 status string after use.
4196 * target.c (target_waitstatus_to_string): Remove.
4197 * target.h: Include target-common.h.
4198 (resume_kind): Likewise.
4199 (target_waitkind): Likewise.
4200 (target_waitstatus): Likewise.
4201 (TARGET_WNOHANG): Likewise.
4202
bd885420
YQ
42032013-07-04 Yao Qi <yao@codesourcery.com>
4204
4205 * Makefile.in (host_alias): Use @host_noncanonical@.
4206 (target_alias): Use @target_noncanonical@.
4207 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4208 ACX_NONCANONICAL_HOST.
4209 * configure: Regenerated.
4210
4211 Revert:
4212 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4213
4214 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4215 * configure: Rebuild.
4216 * Makefile.in (version_host, version_target): Get from configure.
4217 (version.c): Use $(version_host) and $(version_target).
4218
17ef446e
PA
42192013-07-03 Pedro Alves <palves@redhat.com>
4220
4221 * Makefile.in (config.status): Depend on development.sh.
4222 * acinclude.m4: Include libmcheck.m4.
4223 * configure: Regenerate.
4224
7a9a7487
MG
42252013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4226
4227 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4228 attribute inside the parentheses.
4229 (winapi_DebugSetProcessKillOnExit): Ditto.
4230 (winapi_DebugBreakProcess): Ditto.
4231 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 4232
49b64de6
MG
42332013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4234
4235 * notif.h (notif_event): Add a dummy member to avoid compiler
4236 errors.
4237
d5749ee7
PA
42382013-07-01 Pedro Alves <palves@redhat.com>
4239
4240 * hostio.c (HOSTIO_PATH_MAX): Define.
4241 (require_filename, handle_open, handle_unlink, handle_readlink):
4242 Use it.
4243
d8d2a3ee
PA
42442013-07-01 Pedro Alves <palves@redhat.com>
4245
4246 * server.h: Include "pathmax.h".
4247 * linux-low.c: Don't include sys/param.h.
4248 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4249 MAXPATHLEN.
4250 * win32-low.c: Don't include sys/param.h.
4251 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4252
bc7dea8d
PA
42532013-07-01 Pedro Alves <palves@redhat.com>
4254
4255 * event-loop.c: Don't check HAVE_UNISTD_H before including
4256 <unistd.h>.
4257 * gdbreplay.c: Likewise.
4258 * remote-utils.c: Likewise.
4259 * server.c: Likewise.
4260 * configure.ac: Don't check for unistd.h.
4261 * configure: Regenerate.
4262
d6c2da54
TT
42632013-06-28 Tom Tromey <tromey@redhat.com>
4264
4265 * Makefile.in (version.c): Use version.in, not
4266 common/version.in.
4267
257b6bec
MG
42682013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4269
4270 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4271 * configure: Rebuild.
4272 * Makefile.in (version_host, version_target): Get from configure.
4273 (version.c): Use $(version_host) and $(version_target).
4274
86ebe149
DK
42752013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4276
4277 Fix trace-status to output user name without trailing colon.
4278 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4279
f30aa5af
DK
42802013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4281
4282 Fix trace-status to output proper start-time and stop-time.
4283 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4284 output start time and stop time in hex as gdb expects.
4285
28a93511
YQ
42862013-06-26 Pedro Alves <pedro@codesourcery.com>
4287
4288 * tracepoint.c (build_traceframe_info_xml): Output trace state
4289 variables present in the trace buffer.
4290
01208463
TT
42912013-06-24 Tom Tromey <tromey@redhat.com>
4292
4293 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4294 create-version.sh.
4295 (version.o): Remove.
4296 * gdbreplay.c: Include version.h.
4297 (version, host_name): Don't declare.
4298 * server.h: Include version.h.
4299 (version, host_name): Don't declare.
4300
760256f9
PA
43012013-06-12 Pedro Alves <palves@redhat.com>
4302
4303 * linux-x86-low.c (linux_is_elf64): Delete global.
4304 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4305 with local linux_pid_exe_is_elf_64_file use.
4306
030031ee
PA
43072013-06-11 Pedro Alves <palves@redhat.com>
4308
4309 * linux-low.c (regset_disabled, disable_regset): New functions.
4310 (regsets_fetch_inferior_registers)
4311 (regsets_store_inferior_registers): Use them.
4312 (initialize_regsets_info); Don't allocate the disabled_regsets
4313 array here.
4314 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4315 comment.
4316
5da6eb0a
PA
43172013-06-11 Pedro Alves <palves@redhat.com>
4318
4319 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4320 xmalloc.
4321
7e5aaa09
PA
43222013-06-11 Pedro Alves <palves@redhat.com>
4323
4324 * linux-x86-low.c (initialize_low_arch): Call
4325 init_registers_x32_avx_linux.
4326
d878444c
JK
43272013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4328
4329 Fix compatibility with Android Bionic.
4330 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4331 it is not empty.
4332
3aee8918
PA
43332013-06-07 Pedro Alves <palves@redhat.com>
4334
5f2b57b5 4335 PR server/14823
3aee8918
PA
4336 * Makefile.in (OBS): Add tdesc.o.
4337 (IPA_OBJS): Add tdesc-ipa.o.
4338 (tdesc-ipa.o): New rule.
4339 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4340 interface.
4341 * linux-low.c (new_inferior): Delete.
4342 (disabled_regsets, num_regsets): Delete.
4343 (linux_add_process): Adjust to set the new per-process
4344 new_inferior flag.
4345 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4346 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4347 was a stop. When calling arch_setup, switch the current inferior
4348 to the thread that got an event.
4349 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4350 (regsets_fetch_inferior_registers)
4351 (regsets_store_inferior_registers): New regsets_info parameter.
4352 Adjust to use it.
4353 (linux_register_in_regsets): New regs_info parameter. Adjust to
4354 use it.
4355 (register_addr, fetch_register, store_register): New usrregs_info
4356 parameter. Adjust to use it.
4357 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4358 parameter regs_info. Adjust to use it.
4359 (linux_fetch_registers): Get the current inferior's regs_info, and
4360 adjust to use it.
4361 (linux_store_registers): Ditto.
4362 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4363 (initialize_low): Don't initialize the target_regsets here. Call
4364 initialize_low_arch.
4365 * linux-low.h (target_regsets): Delete declaration.
4366 (struct regsets_info): New.
4367 (struct usrregs_info): New.
4368 (struct regs_info): New.
4369 (struct process_info_private) <new_inferior>: New field.
4370 (struct linux_target_ops): Delete the num_regs, regmap, and
4371 regset_bitmap fields. New field regs_info.
4372 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4373 * i387-fp.c (num_xmm_registers): Delete.
4374 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4375 calls to new interface.
4376 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4377 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4378 Infer the number of xmm registers from the regcache's target
4379 description.
4380 * i387-fp.h (num_xmm_registers): Delete.
4381 * inferiors.c (add_thread): Don't install the thread's regcache
4382 here.
4383 * proc-service.c (gregset_info): Fetch the current inferior's
4384 regs_info. Adjust to use it.
4385 * regcache.c: Include tdesc.h.
4386 (register_bytes, reg_defs, num_registers)
4387 (gdbserver_expedite_regs): Delete.
4388 (get_thread_regcache): If the thread doesn't have a regcache yet,
4389 create one, instead of aborting gdbserver.
4390 (regcache_invalidate_one): Rename to ...
4391 (regcache_invalidate_thread): ... this.
4392 (regcache_invalidate_one): New.
4393 (regcache_invalidate): Only invalidate registers of the current
4394 process.
4395 (init_register_cache): Add target_desc parameter, and use it.
4396 (new_register_cache): Ditto. Assert the target description has a
4397 non zero registers_size.
4398 (regcache_cpy): Add assertions. Adjust.
4399 (realloc_register_cache, set_register_cache): Delete.
4400 (registers_to_string, registers_from_string): Adjust.
4401 (find_register_by_name, find_regno, find_register_by_number)
4402 (register_cache_size): Add target_desc parameter, and use it.
4403 (free_register_cache_thread, free_register_cache_thread_one)
4404 (regcache_release, register_cache_size): New.
4405 (register_size): Add target_desc parameter, and use it.
4406 (register_data, supply_register, supply_register_zeroed)
4407 (supply_regblock, supply_register_by_name, collect_register)
4408 (collect_register_as_string, collect_register_by_name): Adjust.
4409 * regcache.h (struct target_desc): Forward declare.
4410 (struct regcache) <tdesc>: New field.
4411 (init_register_cache, new_register_cache): Add target_desc
4412 parameter.
4413 (regcache_invalidate_thread): Declare.
4414 (regcache_invalidate_one): Delete declaration.
4415 (regcache_release): Declare.
4416 (find_register_by_number, register_cache_size, register_size)
4417 (find_regno): Add target_desc parameter.
4418 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4419 declarations.
4420 * remote-utils.c: Include tdesc.h.
4421 (outreg, prepare_resume_reply): Adjust.
4422 * server.c: Include tdesc.h.
4423 (gdbserver_xmltarget): Delete declaration.
4424 (get_features_xml, process_serial_event): Adjust.
4425 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4426 declare.
4427 (struct process_info) <tdesc>: New field.
4428 (ipa_tdesc): Declare.
4429 * tdesc.c: New file.
4430 * tdesc.h: New file.
4431 * tracepoint.c: Include tdesc.h.
4432 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4433 (get_context_regcache): Adjust to pass ipa_tdesc down.
4434 (do_action_at_tracepoint): Adjust to get the register cache size
4435 from the context regcache's description.
4436 (traceframe_walk_blocks): Adjust to get the register cache size
4437 from the current trace frame's description.
4438 (traceframe_get_pc): Adjust to get current trace frame's
4439 description and pass it down.
4440 (gdb_collect): Adjust to get the register cache size from the
4441 IPA's description.
4442 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4443 (gdbserver_xmltarget): Delete.
4444 (initialize_low_tracepoint): Set the ipa's target description.
4445 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4446 (initialize_low_tracepoint): Set the ipa's target description.
4447 * linux-x86-low.c: Include tdesc.h.
4448 [__x86_64__] (is_64bit_tdesc): New.
4449 (ps_get_thread_area, x86_get_thread_area): Use it.
4450 (i386_cannot_store_register): Rename to ...
4451 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4452 (i386_cannot_fetch_register): Rename to ...
4453 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4454 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4455 to new interface.
4456 (target_regsets): Rename to ...
4457 (x86_regsets): ... this.
4458 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4459 interface.
4460 (x86_siginfo_fixup): Use is_64bit_tdesc.
4461 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4462 (tdesc_x32_avx_linux, tdesc_x32_linux)
4463 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4464 Declare.
4465 (x86_linux_update_xmltarget): Delete.
4466 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4467 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4468 (AMD64_LINUX_USER64_CS): New.
4469 (x86_linux_read_description): New, based on
4470 x86_linux_update_xmltarget.
4471 (same_process_callback): New.
4472 (x86_arch_setup_process_callback): New.
4473 (x86_linux_update_xmltarget): New.
4474 (x86_regsets_info): New.
4475 (amd64_linux_regs_info): New.
4476 (i386_linux_usrregs_info): New.
4477 (i386_linux_regs_info): New.
4478 (x86_linux_regs_info): New.
4479 (x86_arch_setup): Reimplement.
4480 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4481 (x86_emit_ops): Ditto.
4482 (the_low_target): Adjust. Install x86_linux_regs_info,
4483 x86_cannot_fetch_register, and x86_cannot_store_register.
4484 (initialize_low_arch): New.
4485 * linux-ia64-low.c (tdesc_ia64): Declare.
4486 (ia64_fetch_register): Adjust.
4487 (ia64_usrregs_info, regs_info): New globals.
4488 (ia64_regs_info): New function.
4489 (the_low_target): Adjust.
4490 (initialize_low_arch): New function.
4491 * linux-sparc-low.c (tdesc_sparc64): Declare.
4492 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4493 Adjust.
4494 (sparc_arch_setup): New function.
4495 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4496 (the_low_target): Adjust.
4497 (initialize_low_arch): New function.
4498 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4499 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4500 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4501 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4502 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4503 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4504 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4505 (tdesc_powerpc_isa205_vsx64l): Declare.
4506 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4507 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4508 (ppc_set_pc, ppc_get_hwcap): Adjust.
4509 (ppc_usrregs_info): Forward declare.
4510 (!__powerpc64__) ppc_regmap_adjusted: New global.
4511 (ppc_arch_setup): Adjust to the current process'es target
4512 description.
4513 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4514 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4515 (ppc_store_evrregset): Adjust.
4516 (target_regsets): Rename to ...
4517 (ppc_regsets): ... this, and make static.
4518 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4519 (ppc_regs_info): New function.
4520 (the_low_target): Adjust.
4521 (initialize_low_arch): New function.
4522 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4523 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4524 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4525 (tdesc_s390x_linux64v2): Declare.
4526 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4527 (s390_fill_gregset, s390_store_last_break): Adjust.
4528 (target_regsets): Rename to ...
4529 (s390_regsets): ... this, and make static.
4530 (s390_get_pc, s390_set_pc): Adjust.
4531 (s390_get_hwcap): New target_desc parameter, and use it.
4532 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4533 (s390_arch_setup): Adjust to set the current process'es target
4534 description. Don't adjust the regmap.
4535 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4536 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4537 (regs_info_3264): New globals.
4538 (s390_regs_info): New function.
4539 (the_low_target): Adjust.
4540 (initialize_low_arch): New function.
4541 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4542 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4543 [__mips64] (init_registers_mips_linux)
4544 (init_registers_mips_dsp_linux): Delete defines.
4545 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4546 (have_dsp): New global.
4547 (mips_read_description): New, based on mips_arch_setup.
4548 (mips_arch_setup): Reimplement.
4549 (get_usrregs_info): New function.
4550 (mips_cannot_fetch_register, mips_cannot_store_register)
4551 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4552 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4553 (target_regsets): Rename to ...
4554 (mips_regsets): ... this, and make static.
4555 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4556 (dsp_regs_info, regs_info): New globals.
4557 (mips_regs_info): New function.
4558 (the_low_target): Adjust.
4559 (initialize_low_arch): New function.
4560 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4561 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4562 Declare.
4563 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4564 (arm_read_description): New, with bits factored from
4565 arm_arch_setup.
4566 (arm_arch_setup): Reimplement.
4567 (target_regsets): Rename to ...
4568 (arm_regsets): ... this, and make static.
4569 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4570 (arm_regs_info): New function.
4571 (the_low_target): Adjust.
4572 (initialize_low_arch): New function.
4573 * linux-m68k-low.c (tdesc_m68k): Declare.
4574 (target_regsets): Rename to ...
4575 (m68k_regsets): ... this, and make static.
4576 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4577 (m68k_regs_info): New function.
4578 (m68k_arch_setup): New function.
4579 (the_low_target): Adjust.
4580 (initialize_low_arch): New function.
4581 * linux-sh-low.c (tdesc_sharch): Declare.
4582 (target_regsets): Rename to ...
4583 (sh_regsets): ... this, and make static.
4584 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4585 (sh_regs_info, sh_arch_setup): New functions.
4586 (the_low_target): Adjust.
4587 (initialize_low_arch): New function.
4588 * linux-bfin-low.c (tdesc_bfin): Declare.
4589 (bfin_arch_setup): New function.
4590 (bfin_usrregs_info, regs_info): New globals.
4591 (bfin_regs_info): New function.
4592 (the_low_target): Adjust.
4593 (initialize_low_arch): New function.
4594 * linux-cris-low.c (tdesc_cris): Declare.
4595 (cris_arch_setup): New function.
4596 (cris_usrregs_info, regs_info): New globals.
4597 (cris_regs_info): New function.
4598 (the_low_target): Adjust.
4599 (initialize_low_arch): New function.
4600 * linux-cris-low.c (tdesc_crisv32): Declare.
4601 (cris_arch_setup): New function.
4602 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4603 (cris_regs_info): New function.
4604 (the_low_target): Adjust.
4605 (initialize_low_arch): New function.
4606 * linux-m32r-low.c (tdesc_m32r): Declare.
4607 (m32r_arch_setup): New function.
4608 (m32r_usrregs_info, regs_info): New globals.
4609 (m32r_regs_info): Adjust.
4610 (initialize_low_arch): New function.
4611 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4612 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4613 (tic6x_usrregs_info): Forward declare.
4614 (tic6x_read_description): New function, based on ...
4615 (tic6x_arch_setup): ... this. Reimplement.
4616 (target_regsets): Rename to ...
4617 (tic6x_regsets): ... this, and make static.
4618 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4619 (tic6x_regs_info): New function.
4620 (the_low_target): Adjust.
4621 (initialize_low_arch): New function.
4622 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4623 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4624 (target_regsets): Rename to ...
4625 (xtensa_regsets): ... this, and make static.
4626 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4627 globals.
4628 (xtensa_arch_setup, xtensa_regs_info): New functions.
4629 (the_low_target): Adjust.
4630 (initialize_low_arch): New function.
4631 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4632 (nios2_arch_setup): Set the current process'es tdesc.
4633 (target_regsets): Rename to ...
4634 (nios2_regsets): ... this.
4635 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4636 (nios2_regs_info): New function.
4637 (the_low_target): Adjust.
4638 (initialize_low_arch): New function.
a261b8f5
PA
4639 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4640 (aarch64_arch_setup): Set the current process'es tdesc.
4641 (target_regsets): Rename to ...
4642 (aarch64_regsets): ... this.
4643 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4644 (aarch64_regs_info): New function.
4645 (the_low_target): Adjust.
4646 (initialize_low_arch): New function.
3aee8918
PA
4647 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4648 globals.
4649 (target_regsets): Rename to ...
4650 (tile_regsets): ... this.
4651 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4652 (tile_regs_info): New function.
4653 (tile_arch_setup): Set the current process'es tdesc.
4654 (the_low_target): Adjust.
4655 (initialize_low_arch): New function.
4656 * spu-low.c (tdesc_spu): Declare.
4657 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4658 * win32-arm-low.c (tdesc_arm): Declare.
4659 (arm_arch_setup): New function.
4660 (the_low_target): Install arm_arch_setup instead of
4661 init_registers_arm.
4662 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4663 (init_windows_x86): Rename to ...
4664 (i386_arch_setup): ... this. Set `win32_tdesc'.
4665 (the_low_target): Adjust.
4666 * win32-low.c (win32_tdesc): New global.
4667 (child_add_thread): Don't create the thread cache here.
4668 (do_initial_child_stuff): Set the new process'es tdesc.
4669 * win32-low.h (struct target_desc): Forward declare.
4670 (win32_tdesc): Declare.
4671 * lynx-i386-low.c (tdesc_i386): Declare global.
4672 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4673 * lynx-low.c (lynx_tdesc): New global.
4674 (lynx_add_process): Set the new process'es tdesc.
4675 * lynx-low.h (struct target_desc): Forward declare.
4676 (lynx_tdesc): Declare global.
4677 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4678 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4679 * nto-low.c (nto_tdesc): New global.
4680 (do_attach): Set the new process'es tdesc.
4681 * nto-low.h (struct target_desc): Forward declare.
4682 (nto_tdesc): Declare.
4683 * nto-x86-low.c (tdesc_i386): Declare.
4684 (nto_x86_arch_setup): Set `nto_tdesc'.
4685
b1fbec62
GB
46862013-06-04 Gary Benson <gbenson@redhat.com>
4687
4688 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4689 to qSupported response when appropriate.
4690 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4691 with nonzero-length annex.
4692 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4693 arguments supplied in annex.
4694
d1ec4ce7
DE
46952013-05-31 Doug Evans <dje@google.com>
4696
ac44adcb 4697 PR server/15594
d1ec4ce7
DE
4698 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4699 64 bits in 64-cross-32 environment.
4700
9b25f2d3
PA
47012013-05-28 Pedro Alves <palves@redhat.com>
4702
4703 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4704 (aarch64-without-fpu.c): Delete rule.
4705 * configure.srv (aarch64*-*-linux*): Remove references to
4706 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4707 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4708 declaration.
4709
6740dc9c
PA
47102013-05-24 Pedro Alves <palves@redhat.com>
4711
4712 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4713 instead of strchr/decode_address. Error if the range isn't split
4714 with a ','. Don't assume there's be a ':' in the action.
4715
c2d6af84
PA
47162013-05-23 Yao Qi <yao@codesourcery.com>
4717 Pedro Alves <palves@redhat.com>
4718
4719 * linux-low.c (lwp_in_step_range): New function.
4720 (linux_wait_1): If the thread was range stepping and stopped
4721 outside the stepping range, report the stop to GDB. Otherwise,
4722 continue stepping. Add range stepping debug output.
4723 (linux_set_resume_request): Copy the step range from the resume
4724 request to the lwp.
4725 (linux_supports_range_stepping): New.
4726 (linux_target_ops) <supports_range_stepping>: Set to
4727 linux_supports_range_stepping.
4728 * linux-low.h (struct linux_target_ops)
4729 <supports_range_stepping>: New field.
4730 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4731 * linux-x86-low.c (x86_supports_range_stepping): New.
4732 (the_low_target) <supports_range_stepping>: Set to
4733 x86_supports_range_stepping.
4734 * server.c (handle_v_cont): Handle 'r' action.
4735 (handle_v_requests): Append ";r" if the target supports range
4736 stepping.
4737 * target.h (struct thread_resume) <step_range_start,
4738 step_range_end>: New fields.
4739 (struct target_ops) <supports_range_stepping>:
4740 New field.
4741 (target_supports_range_stepping): New macro.
4742
58794e1a
JB
47432013-05-17 Joel Brobecker <brobecker@adacore.com>
4744
4745 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4746 confusion in comment.
4747
d631c5a7
JB
47482013-05-17 Joel Brobecker <brobecker@adacore.com>
4749
4750 * lynx-low.c (struct process_info_private): New type.
4751 (lynx_add_process): New function.
4752 (lynx_create_inferior, lynx_attach): Replace calls to
4753 add_process by calls to lynx_add_process.
4754 (lynx_resume): If PTID is null, then try using
4755 current_process()->private->last_wait_event_ptid.
4756 Add comments.
4757 (lynx_clear_inferiors): Delete. The contents of that function
4758 has been inlined in lynx_mourn;
4759 (lynx_wait_1): Save the ptid in the process's private data.
4760 (lynx_mourn): Free the process' private data. Replace call
4761 to lynx_clear_inferiors by call to clear_inferiors.
4762
96f7a20f
YQ
47632013-05-17 Yao Qi <yao@codesourcery.com>
4764
4765 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4766 the right place.
4767
db0dfaa0
LM
47682013-05-16 Luis Machado <lgustavo@codesourcery.com>
4769
4770 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4771 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4772 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4773 PT_TEXT_END_ADDR guards. Update comments.
4774 (linux_target_op) <read_offsets>: Conditionally define to
4775 linux_read_offsets if the target is UCLIBC and if it defines
4776 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4777
68f5f838
SL
47782013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4779 Andrew Jenner <andrew@codesourcery.com>
4780
4781 * Makefile.in (SFILES): Add linux-nios2-low.c.
4782 (clean): Add action to delete nios2-linux.c.
4783 (nios2-linux.c): New rule.
4784 * configure.srv: Add nios2*-*-linux*.
4785 * linux-nios2-low.c: New.
4786
1ebff1fd
HAQ
47872013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4788
4789 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4790
f6150862
HZ
47912013-04-25 Hui Zhu <hui@codesourcery.com>
4792
4793 PR gdb/15186
f6150862
HZ
4794 * ax.c (ax_printf): Add fflush.
4795
614c279d
TT
47962013-04-22 Tom Tromey <tromey@redhat.com>
4797
4798 * Makefile.in (SFILES): Add filestuff.c.
4799 (OBS): Add filestuff.o.
4800 (filestuff.o): New target.
4801 * config.in, configure: Rebuild.
4802 * configure.ac: Check for fdwalk, pipe2.
4803
7d4e5717
PA
48042013-04-17 Pedro Alves <palves@redhat.com>
4805
4806 * configure.ac (USE_THREAD_DB): Delete variable.
4807 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4808 Don't AC_SUBST USE_THREAD_DB.
4809 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4810 * config.in, configure: Regenerate.
4811
d5c93e41
PA
48122013-04-16 Pedro Alves <palves@redhat.com>
4813
4814 * linux-low.h (struct lwp_info) <thread_known>: Move under
4815 the USE_THREAD_DB #ifdef.
4816
04f5fe89
PA
48172013-04-16 Pedro Alves <palves@redhat.com>
4818
4819 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4820 (linux-low.o): Delete rule.
4821 * linux-low.h: Always include "gdb_thread_db.h" instead of
4822 conditionally including thread_db.h.
4823 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4824 HAVE_THREAD_DB_H.
4825
480b27bf
JK
48262013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4827
4828 * Makefile.in (install-only): Fix make install regression.
4829
43662968
JK
48302013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4831
4832 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4833 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4834 installation.
4835 * gdbserver.1: Remove.
4836
3e74e146
PA
48372013-03-22 Pedro Alves <palves@redhat.com>
4838
4839 * linux-low.c (handle_extended_wait): Don't call
4840 linux_enable_event_reporting.
4841
a8347a2a
TT
48422013-03-15 Tony Theodore <tonyt@logyst.com>
4843
4844 PR build/9098:
4845 * Makefile.in (SHELL): Use @SHELL@.
4846
eeb56fa7
SDJ
48472013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4848
4849 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4850 compiler warning.
4851
4fa7e2ff
JB
48522013-03-13 Joel Brobecker <brobecker@adacore.com>
4853
4854 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4855 Remove extraneous NULL element.
4856
8ddb1965
YQ
48572013-03-13 Yao Qi <yao@codesourcery.com>
4858
4859 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4860 'V' block in trace frame.
4861
9accd112
MM
48622013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4863
4864 * target.h (struct target_ops): Add btrace ops.
4865 (target_supports_btrace): New macro.
4866 (target_enable_btrace): New macro.
4867 (target_disable_btrace): New macro.
4868 (target_read_btrace): New macro.
4869 * gdbthread.h (struct thread_info): Add btrace field.
4870 * server.c: Include btrace-common.h.
4871 (handle_btrace_general_set): New function.
4872 (handle_btrace_enable): New function.
4873 (handle_btrace_disable): New function.
4874 (handle_general_set): Call handle_btrace_general_set.
4875 (handle_qxfer_btrace): New function.
4876 (struct qxfer qxfer_packets[]): Add btrace entry.
4877 * inferiors.c (remove_thread): Disable btrace.
4878 * linux-low: Include linux-btrace.h.
4879 (linux_low_enable_btrace): New function.
4880 (linux_low_read_btrace): New function.
4881 (linux_target_ops): Add btrace ops.
4882 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4883 Add srv_linux_btrace=yes.
4884 (x86_64-*-linux*): Add linux-btrace.o.
4885 Add srv_linux_btrace=yes.
4886 * configure.ac: Define HAVE_LINUX_BTRACE.
4887 * config.in: Regenerated.
4888 * configure: Regenerated.
4889
5cc22e4c
MM
48902013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4891
4892 * server.c (handle_qxfer): Preserve error message if -3 is
4893 returned.
4894 (qxfer): Document the -3 return value.
4895
7c97f91e
MM
48962013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4897
4898 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4899 (linux_btrace_h): New variable.
4900 (linux-btrace.o): New rule.
4901
be9a119c 49022013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
4903 Hafiz Abid Qadeer <abidh@codesourcery.com>
4904
4905 * tracepoint.c (trace_buffer_size): New global.
4906 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4907 (init_trace_buffer): Change to one-argument function. Allocate
4908 trace buffer memory.
4909 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4910 handle QTBuffer:size packet.
4911 (cmd_bigqtbuffer_size): New function.
4912 (initialize_tracepoint): Call init_trace_buffer with
4913 DEFAULT_TRACE_BUFFER_SIZE.
4914 * server.c (handle_query): Add QTBuffer:size in the
4915 supported packets.
4916
e64f7499
YQ
49172013-03-07 Yao Qi <yao@codesourcery.com>
4918
4919 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4920 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4921 of -1.
4922 (cmd_qtsp): Adjust condition. Do post increment.
4923 Set cur_action and cur_step_action back to 0.
4924
f0ae6fc3
PA
49252013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
4926
4927 PR server/15236
4928 * linux-low.c (linux_write_memory): Return early success if LEN is
4929 zero.
4930
b5b0b0af
CV
49312013-03-05 Corinna Vinschen <vinschen@redhat.de>
4932
334ad4a8 4933 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 4934
589bc927
TT
49352013-02-28 Tom Tromey <tromey@redhat.com>
4936
4937 * configure.ac: Invoke AC_SYS_LARGEFILE.
4938 * configure, config.in: Rebuild.
4939
dfe07582
CV
49402013-02-28 Corinna Vinschen <vinschen@redhat.com>
4941
4942 * win32-low.c: Throughout, fix format strings and casts of
4943 printf-like functions to avoid type related warnings on all
4944 platforms.
4945 (get_child_debug_event): Print dwDebugEventCode as hex since
4946 that's how it's usually documented.
4947
736cd585
YQ
49482013-02-28 Yao Qi <yao@codesourcery.com>
4949
4950 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
4951 pulongest.
4952
e1f58301
JW
49532013-02-27 Jiong Wang <jiwang@tilera.com>
4954
4955 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
4956 (reg-tilegx32.c): New rule.
4957 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
4958 * linux-tile-low.c (tile_arch_setup): New function. Invoke
4959 different register info initializer according to elf class.
4960 (init_registers_tilgx32): New function. The tilegx32 register info
4961 initializer.
4962 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
4963 (tile_store_gregset): Likewise.
4964
d171ca78
YQ
49652013-02-27 Yao Qi <yao@codesourcery.com>
4966
4967 * server.c (process_point_options): Print debug message when
4968 debug_threads is true.
4969
282bbdf3
YQ
49702013-02-26 Yao Qi <yao@codesourcery.com>
4971
4972 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
4973
aca22551
PA
49742013-02-19 Pedro Alves <palves@redhat.com>
4975 Kai Tietz <ktietz@redhat.com>
4976
4977 PR gdb/15161
4978
4979 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
4980 instead of strtoul to extract address from packet.
4981 (process_serial_event) <'z'>: Likewise.
4982
4f3cee1c
YQ
49832013-02-18 Yao Qi <yao@codesourcery.com>
4984
4985 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
4986
8e1d55a3
PA
49872013-02-14 Pedro Alves <palves@redhat.com>
4988
4989 Plug memory leak.
4990
4991 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
4992 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
4993
458820da
PA
49942013-02-14 Pedro Alves <palves@redhat.com>
4995
4996 * tracepoint.c (cmd_qtdpsrc): Use savestring.
4997
baea0dae
PA
49982013-02-14 Pedro Alves <palves@redhat.com>
4999
5000 * tracepoint.c (save_string): Delete.
5001 (add_tracepoint_action): Use savestring instead of save_string.
5002
0b1afbb3
PA
50032013-02-12 Pedro Alves <palves@redhat.com>
5004
5005 * linux-xtensa-low.c: Ditto.
5006 * xtensa-xtregs.c: Ditto.
5007
8a4ac37e
PA
50082013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5009
5010 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5011 thread_db.
5012
148de6bb
MS
50132013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5014
5015 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5016 aarch64_num_wp_regs and aarch64_num_bp_regs to
5017 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5018
55fac6e0
MS
50192013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5020
5021 * linux-aarch64-low.c (ps_get_thread_area): Replace
5022 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5023
176eb98c
MS
50242013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5025 Marcus Shawcroft <marcus.shawcroft@arm.com>
5026 Nigel Stephens <nigel.stephens@arm.com>
5027 Yufeng Zhang <yufeng.zhang@arm.com>
5028
5029 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5030 (aarch64.c, aarch64-without-fpu.c): New targets.
5031 * configure.srv (aarch64*-*-linux*): New.
5032 * linux-aarch64-low.c: New file.
5033
56f7af9c
MS
50342013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5035
43aaf8b6 5036 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
5037 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5038 (dequeue_one_deferred_signal, linux_resume_one_thread)
5039 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5040 (linux_tracefork_grandchild, linux_test_for_tracefork)
5041 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5042 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5043 where the argument is 0.
5044
60f662b0
YQ
50452013-01-25 Yao Qi <yao@codesourcery.com>
5046
5047 * event-loop.c: Include "queue.h".
5048 (gdb_event_p): New typedef.
5049 (struct gdb_event) <next_event>: Remove.
5050 (event_queue): Change to QUEUE(gdb_event_p).
5051 (async_queue_event): Remove.
5052 (gdb_event_xfree): New.
5053 (initialize_event_loop): New.
5054 (process_event): Use API from QUEUE.
5055 (wait_for_event): Likewise.
5056 * server.c (main): Call initialize_event_loop.
5057 * server.h (initialize_event_loop): Declare.
5058
5ae4861a
YQ
50592013-01-18 Yao Qi <yao@codesourcery.com>
5060
5061 * ax.h (struct eval_agent_expr_context): New.
5062 (gdb_eval_agent_expr): Update declaration.
5063 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5064 TFRAME. Add new argument CTX.
5065 * server.h (struct eval_agent_expr_context): Declare.
5066 (agent_mem_read, agent_tsv_read): Update declaration.
5067 (agent_mem_read_string): Likewise.
5068 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5069 (add_traceframe_block): Add new argument TPOINT.
5070 Increase TPOINT->traceframe_usage.
5071 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5072 eval_tracepoint_agent_expr.
5073 (condition_true_at_tracepoint): Likewise.
5074 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5075 (agent_mem_read_string, agent_tsv_read): Likewise.
5076
85e00e85
YQ
50772013-01-16 Yao Qi <yao@codesourcery.com>
5078
5079 * linux-low.c (linux_resume_one_lwp): Don't check
5080 'lwp->bp_reinsert != 0'.
5081
4039cf45
JB
50822013-01-07 Joel Brobecker <brobecker@adacore.com>
5083 Pedro Alves <palves@redhat.com>
5084
5085 * lynx-low.c (ptrace_request_to_str): Define a temporary
5086 macro and use it to simplify this function's implementation.
5087
9044dee2
JB
50882013-01-07 Joel Brobecker <brobecker@adacore.com>
5089
5090 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5091 sets errno.
5092
e6352c8f
JB
50932013-01-07 Joel Brobecker <brobecker@adacore.com>
5094
5095 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5096
50681a27
JB
50972013-01-07 Joel Brobecker <brobecker@adacore.com>
5098
5099 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5100
3f6e77ef
JB
51012013-01-07 Joel Brobecker <brobecker@adacore.com>
5102
5103 * lynx-low.c (lynx_resume): Use the resume_info parameter
5104 to determine the ptid for the lynx_ptrace call, unless
5105 it is equal to minus_one_ptid, in which case we use the
5106 ptid of the current_inferior.
5107 (lynx_wait_1): After having received a thread create/exit
5108 event, resume the inferior's execution using the signaling
5109 thread's ptid, rather than the old ptid.
5110
7fda33ae
JB
51112013-01-07 Joel Brobecker <brobecker@adacore.com>
5112
5113 * lynx-low.c (lynx_resume): Delete variable ret.
5114
b9786c74
JB
51152013-01-01 Joel Brobecker <brobecker@adacore.com>
5116
5117 * gdbreplay.c (gdbreplay_version): Update copyright year.
5118 * server.c (gdbserver_version): Likewise.
5119
8b93d60f
JB
51202012-12-17 Joel Brobecker <brobecker@adacore.com>
5121
5122 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5123 new thread.
5124
037335a7
JB
51252012-12-17 Joel Brobecker <brobecker@adacore.com>
5126
5127 * lynx-low.c (ptrace_request_to_str): Add handling for
5128 PTRACE_GETTRACESIG.
5129
52d4cbd8
JB
51302012-12-17 Joel Brobecker <brobecker@adacore.com>
5131
5132 * lynx-low.c (lynx_attach): Delete variable new_process.
5133
ab8f6ca9
JB
51342012-12-17 Joel Brobecker <brobecker@adacore.com>
5135
5136 * lynx-low.c (lynx_create_inferior): Delete variable
5137 new_process.
5138
78cbc024
JB
51392012-12-17 Joel Brobecker <brobecker@adacore.com>
5140
5141 * lynx-low.c (ptrace_request_to_str): Do not handle
5142 PTRACE_GETTHREADLIST if this macro does not exist.
5143
14a00470
YQ
51442012-12-15 Yao Qi <yao@codesourcery.com>
5145
5146 * Makefile.in (OBS): Add notif.o.
5147 * notif.c, notif.h: New.
5148 * server.c: Include "notif.h".
5149 (struct vstop_notif) <next>: Remove.
5150 <base>: New field.
5151 (queue_stop_reply): Update.
5152 (push_event, send_next_stop_reply): Remove.
5153 (discard_queued_stop_replies): Update.
5154 (notif_stop): New variable.
5155 (handle_v_stopped): Remove.
5156 (handle_v_requests): Don't call handle_v_stopped. Call
5157 handle_ack_notif instead.
5158 (queue_stop_reply_callback): Call notif_event_enque instead
5159 of queue_stop_reply.
5160 (handle_status): Don't call send_next_stop_reply, call
5161 notif_write_event instead.
5162 (kill_inferior_callback): Likewise.
5163 (detach_or_kill_inferior_callback): Likewise.
5164 (main): Call initialize_notif.
5165 (process_serial_event): Call QUEUE_is_empty.
5166 (handle_target_event): Call notif_push instead of push event.
5167 * server.h (push_event): Remove declaration.
5168
61c125b9
TT
51692012-12-10 Tom Tromey <tromey@redhat.com>
5170
5171 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5172 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5173 macros.
5174 (.c.o): Rewrite.
5175 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5176 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5177 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5178 (amd64-linux-ipa.o, ax.o): Rewrite.
5179 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5180 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5181 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5182 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5183 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5184 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5185 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5186 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5187 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5188 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5189 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5190 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5191 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5192 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5193 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5194 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5195 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5196 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5197 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5198 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5199 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5200 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5201 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5202 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5203 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5204 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5205 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5206 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5207 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5208 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5209 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5210 (reg-tilegx.o): Remove.
5211 (all_object_files): New macro.
5212 Include .deps files.
5213 * aclocal.m4, configure: Rebuild.
5214 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5215 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5216 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5217
e90e9ad9
TT
52182012-12-05 Tom Tromey <tromey@redhat.com>
5219
5220 PR gdb/14917:
5221 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5222
02d403bf 52232012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
5224
5225 * configure.ac: Check for linux/perf_event.h.
5226 * config.in: Regenerated.
5227 * configure: Regenerated.
5228
0270a750
PA
52292012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5230
5231 * hostio.c (handle_readlink): Decrease buffer size
5232 parameter passed to readlink by one byte.
5233
8c29b58e
YQ
52342012-11-26 Yao Qi <yao@codesourcery.com>
5235
5236 * configure.ac (build_warnings): Append '-Wempty-body'.
5237 * configure: Regenerated.
5238 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5239 body.
5240
8bdce1ff
PM
52412012-11-15 Pierre Muller <muller@sourceware.org>
5242
5243 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5244 * config.in: Regenerate.
5245 * configure: Regenerate.
5246 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5247 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5248 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5249 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5250 header.
5251 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5252 instead of <sys/wait.h> header.
5253 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5254
02d403bf 52552012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
5256
5257 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5258 (various make rules): Remove -DGDBSERVER
5259
fbd5db48
YQ
52602012-11-09 Yao Qi <yao@codesourcery.com>
5261
5262 * spu-low.c (current_ptid): Move it to ..
5263 * gdbthread.h: ... here. New.
5264 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5265 * server.c (myresume, process_serial_event): Likewise.
5266 * thread-db.c (thread_db_find_new_threads): Likewise.
5267 * tracepoint.c (run_inferior_command): Likewise.
5268
b3dc46ff
AB
52692012-10-01 Andrew Burgess <aburgess@broadcom.com>
5270
5271 * server.c (handle_search_memory_1): Include access length in
5272 warning message.
5273
07c04788
HPN
52742012-09-05 Michael Brandt <michael.brandt@axis.com>
5275
5276 * linux-crisv32-low.c: Fix compile errors.
5277
918d227b
YQ
52782012-09-04 Yao Qi <yao@codesourcery.com>
5279
5280 * tracepoint.c (cmd_qtsv): Adjust debug message.
5281 Don't check CUR_TPOINT.
5282
18c1b81a
YQ
52832012-08-28 Yao Qi <yao@codesourcery.com>
5284
5285 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5286 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5287 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5288 Remove declarations of xmalloc, xreallloc, xstrdup and
5289 freeargv.
5290 * Makefile.in (libiberty_h): New.
5291 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5292 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5293
dc82f37b
YQ
52942012-08-23 Yao Qi <yao@codesourcery.com>
5295
5296 * server.h: Remove declaration of 'xsnprintf'.
5297
406b1477
KS
52982012-08-22 Keith Seitz <keiths@redhat.com>
5299
5300 * server.h: Include build-gnulib-gbserver/config.h.
5301 * gdbreplay.c: Likewise.
5302
e6712ff1
DE
53032012-08-08 Doug Evans <dje@google.com>
5304
5305 * Makefile.in (SFILES): Add gdb_vecs.c.
5306 (OBS): Add gdb_vecs.o.
5307 (gdb_vecs_h, host_defs_h): New variables.
5308 (thread-db.o): Add $(gdb_vecs_h) dependency.
5309 (gdb_vecs.o): New rule.
5310 * thread-db.c: #include "gdb_vecs.h".
5311 (thread_db_load_search): Use a vector to iterate over path elements.
5312 Handle text appearing after "$pdir".
5313
5314 * configure.ac: Add check for strstr.
5315 * config.in: Regenerate.
5316 * configure: Regenerate.
5317
7c3270ae
UW
53182012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5319
5320 * hostio.c (handle_pread): If pread fails, fall back to attempting
5321 lseek/read.
5322 (handle_pwrite): Likewise for pwrite.
5323
b62e2b27
UW
53242012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5325
5326 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5327 between unsupported TYPE and unimplementable ADDR/LEN combination.
5328 (arm_insert_point): Act on new return value.
5329
78a99e91
PA
53302012-07-31 Pedro Alves <palves@redhat.com>
5331
5332 * server.c (process_point_options): Only skip tokens if we find
5333 one that is unrecognized. Don't treat 'X' specially while
5334 skipping unrecognized tokens.
5335
fcf303ab
UW
53362012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5337
5338 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5339 to 4-byte-align HW breakpoint addresses for Thumb.
5340
7255706c
YQ
53412012-07-27 Yao Qi <yao@codesourcery.com>
5342
5343 PR remote/14161.
5344
5345 * server.h: Declare gdb_agent_about_to_close.
5346 * target.c (kill_inferior): Include "agent.h".
5347 New. Send command 'kill'.
5348 * target.h (kill_inferior): Removed macro.
5349 * tracepoint.c (gdb_agent_about_to_close): New.
5350 (gdb_agent_helper_thread): Handle command 'close'.
5351 Wait endlessly until the inferior stops.
5352 Install gdb_agent_remove_socket to atexit hook.
5353 (agent_socket_name): New static variable.
5354 (gdb_agent_socket_init): Replace local variable 'name' with
5355 'agent_socket_name'.
5356 (gdb_agent_remove_socket): New.
5357
5a3f286f
YQ
53582012-07-27 Yao Qi <yao@codesourcery.com>
5359
5360 * server.c (process_point_options): Stop at 'X' when parsing.
5361
961bd387
ME
53622012-07-19 Michael Eager <eager@eagercon.com>
5363
a261b8f5 5364 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
5365 to hw_execute.
5366 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5367 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5368 hardware breakpoint.
5369
aa7c7447
JK
53702012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5371
5372 * gdbserver/linux-low.c (initialize_low): Call
5373 linux_ptrace_init_warnings.
5374
7f216e7c
DE
53752012-07-02 Doug Evans <dje@google.com>
5376
5377 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5378 pointer to int.
5379
d3ce09f5
SS
53802012-07-02 Stan Shebs <stan@codesourcery.com>
5381
5382 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5383 (ax.o): Add it to build rule.
5384 (ax-ipa.o): Ditto.
5385 (OBS): Add format.o.
5386 (IPA_OBS): Add format.o.
5387 * server.c (handle_query): Claim support for breakpoint commands.
5388 (process_point_options): Add command case.
5389 (process_serial_event): Leave running if there are printfs in
5390 effect.
5391 * mem-break.h (any_persistent_commands): Declare.
5392 (add_breakpoint_commands): Declare.
5393 (gdb_no_commands_at_breakpoint): Declare.
5394 (run_breakpoint_commands): Declare.
5395 * mem-break.c (struct point_command_list): New struct.
5396 (struct breakpoint): New field command_list.
5397 (any_persistent_commands): New function.
5398 (add_commands_to_breakpoint): New function.
5399 (add_breakpoint_commands): New function.
5400 (gdb_no_commands_at_breakpoint): New function.
5401 (run_breakpoint_commands): New function.
5402 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5403 locally.
5404 * ax.c: Include format.h.
5405 (ax_printf): New function.
5406 (gdb_eval_agent_expr): Add printf opcode.
5407
2f8f6aed
YQ
54082012-06-13 Yao Qi <yao@codesourcery.com>
5409
5410 * server.c (start_inferior): Remove duplicated writes to fields
5411 'last_resume_kind' and 'last_status' of 'current_inferior'.
5412
0c9070b3
YQ
54132012-06-12 Yao Qi <yao@codesourcery.com>
5414 Pedro Alves <palves@redhat.com>
5415
5416 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5417 comment.
5418 * server.c (handle_v_cont): Extend comment.
5419
c52daf70
YQ
54202012-06-11 Yao Qi <yao@codesourcery.com>
5421
5422 * linux-low.c (linux_attach): Add 'static'.
5423
d38bbb0a
YQ
54242012-06-06 Yao Qi <yao@codesourcery.com>
5425
5426 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5427
89dc0afd
JK
54282012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5429
5430 Fix gcc -flto compilation warning.
5431 * server.c (main): Make variable multi_mode and attach volatile.
5432
75f62ce7
TJB
54332012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5434
5435 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5436 if the platform doesn't know about it.
5437
65f479b6
PA
54382012-05-30 Jeff Kenton <jkenton@tilera.com>
5439
5440 * Makefile.in (SFILES): Add linux-tile-low.c.
5441 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5442 * configure.srv: Handle tilegx-*-linux*.
5443 * linux-tile-low.c: New file.
5444
0c5bf5a9
JK
54452012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5446
5447 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5448
a493e3e2
PA
54492012-05-24 Pedro Alves <palves@redhat.com>
5450
5451 PR gdb/7205
5452
43aaf8b6 5453 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 5454
2ea28649
PA
54552012-05-24 Pedro Alves <palves@redhat.com>
5456
5457 PR gdb/7205
5458
5459 Replace target_signal with gdb_signal throughout.
5460
8d409d16
MR
54612012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5462
5463 * linux-low.c (linux_store_registers): Avoid the copying sequence
5464 when no data has been retrieved by ptrace.
5465
23512c01
MGD
54662012-05-22 Will Deacon <will.deacon@arm.com>
5467
5468 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5469 Include asm/ptrace.h.
5470 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5471 already defined.
5472
4934b29e
MR
54732012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5474
5475 * linux-low.c (linux_store_registers): Don't re-retrieve data
5476 with ptrace that has already been obtained from /proc. Always
5477 copy any data retrieved with ptrace to the buffer supplied.
5478
bde24c0a
PA
54792012-05-11 Yao Qi <yao@codesourcery.com>
5480 Pedro Alves <palves@redhat.com>
5481
5482 * linux-low.c (enum stopping_threads_kind): New.
5483 (stopping_threads): Change type to `enum stopping_threads_kind'.
5484 (handle_extended_wait): If stopping and suspending threads, leave
5485 the new_lwp suspended too.
5486 (linux_wait_for_event): Adjust.
5487 (stop_all_lwps): Set `stopping_threads' to
5488 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5489 whether we're suspending threads or just stopping them. Assert no
5490 recursion happens.
5491
623b6bdf
YQ
54922012-04-29 Yao Qi <yao@codesourcery.com>
5493
5494 * server.h: Move some code to ...
5495 * gdbthread.h: ... here. New.
5496 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5497 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5498 (nto-low.o, win32-low.o): Likewise.
5499 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5500 * regcache.c, remote-utils.c, server.c: Likewise.
5501 * target.c, tracepoint.c, win32-low.c: Likewise.
5502
f15f9948
TJB
55032012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5504
5505 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5506 (PTRACE_ARG4_TYPE): Likewise.
5507 (PTRACE_XFER_TYPE): Likewise.
5508 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5509 ptrace to PTRACE_ARG3_TYPE.
5510 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5511 (PTRACE_ARG4_TYPE): Likewise.
5512 (PTRACE_XFER_TYPE): Likewise.
5513 (linux_detach_one_lwp): Cast fourth argument of
5514 ptrace to long then PTRACE_ARG4_TYPE.
5515 (regsets_fetch_inferior_registers): Cast third argument of
5516 ptrace to long then PTRACE_ARG3_TYPE.
5517 (regsets_store_inferior_registers): Likewise.
5518
38ea300a
PA
55192012-04-20 Pedro Alves <palves@redhat.com>
5520
5521 * configure: Regenerate.
5522
c971b7fa
PA
55232012-04-19 Pedro Alves <palves@redhat.com>
5524
43aaf8b6 5525 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 5526 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
5527 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5528 (all, install-only, uninstall, clean-info, all-lib, clean): No
5529 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5530 (maintainer-clean realclean distclean): Use subdir_do.
5531 (subdir_do): New.
5532 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 5533 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
5534 * acinclude.m4: Include acx_configure_dir.m4.
5535 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5536 calls. Call AC_PROG_RANLIB. Configure gnulib using
5537 ACX_CONFIGURE_DIR.
5538 (GNULIB): New.
5539 (GNULIB_STDINT_H): Adjust.
5540 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5541 * gdbreplay.c: Include build-gnulib/config.h.
5542 * server.h: Likewise.
5543 * aclocal.m4: Regenerate.
5544 * config.in: Regenerate.
5545 * configure: Regenerate.
c971b7fa 5546
809277f8
PA
55472012-04-19 Pedro Alves <palves@redhat.com>
5548
5549 * Makefile.in (LIBGNU, INCGNU): Adjust.
5550 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5551 (all, install-only, uninstall, clean-info, all-lib, clean)
5552 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5553 * configure.ac: Adjust AC_OUTPUT output.
5554 * aclocal.m4: Regenerate.
5555 * configure: Regenerate.
5556
fd9bb8b8
PA
55572012-04-19 Pedro Alves <palves@redhat.com>
5558
5559 * Makefile.in (generated_files): New.
5560 (server_h): Remove the explicit dependency on config.h, and depend
5561 on $generated_files.
5562
1c298c66
PA
55632012-04-19 Pedro Alves <palves@redhat.com>
5564
5565 * Makefile.in (INCGNU): Add -Ignulib.
5566
57c4b50b
PA
55672012-04-19 Pedro Alves <palves@redhat.com>
5568
5569 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5570 (INCGNU): ... this, and spell out -I here.
5571 (GNULIB_LIB): Rename to ...
5572 (LIBGNU): ... this.
5573 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5574
1030e047
PA
55752012-04-19 Pedro Alves <palves@redhat.com>
5576
5577 * config.in: Regenerate.
5578
447d4319
PA
55792012-04-19 Pedro Alves <palves@redhat.com>
5580
5581 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5582 * server.h (memmem): Remove declaration.
5583 * config.in: Regenerate.
5584 * configure: Regenerate.
5585
aad9eab9
YQ
55862012-04-19 Yao Qi <yao@codesourcery.com>
5587
5588 * Makefile.in (SFILES): Add common/vec.c.
5589 (OBS): Add vec.o.
5590 (vec.o): New rule.
5591
3e10640f
YQ
55922012-04-19 Yao Qi <yao@codesourcery.com>
5593
5594 * remote-utils.c (prepare_resume_reply): Replace with macro
5595 target_core_of_thread.
5596 * server.c (handle_qxfer_threads_proper): Likewise.
5597 * target.h (traget_core_of_thread): New macro.
5598
71622373
PA
55992012-04-18 Pedro Alves <palves@redhat.com>
5600
5601 * aclocal.m4: Regenerate.
5602 * configure: Regenerate.
5603
80d26939
YQ
56042012-04-16 Yao Qi <yao@codesourcery.com>
5605
5606 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5607 duplicated on address.
5608
42476b70
YQ
56092012-04-16 Yao Qi <yao@codesourcery.com>
5610
5611 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5612 (struct tracepoint_action_ops) <send>: New field.
5613 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5614 (agent_expr_send, x_tracepoint_action_send): New.
5615 (l_tracepoint_action_send): New.
5616 (cmd_qtdp): Download and install tracepoint
5617 according to `use_agent'.
5618 (run_inferior_command): Add one more parameter `len'.
5619 Update callers.
5620 (tracepoint_send_agent): New.
5621 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5622
7bc83639
YQ
56232012-04-16 Yao Qi <yao@codesourcery.com>
5624
5625 * tracepoint.c (download_tracepoints): Moved to ...
5626 (cmd_qtstart): ... here.
5627
5f18041e
YQ
56282012-04-14 Yao Qi <yao@codesourcery.com>
5629
5630 * tracepoint.c: Include inttypes.h.
5631 (struct collect_memory_action): Use sized types.
5632 (struct tracepoint): Likewise.
5633 (cmd_qtdp, stop_tracing): Update print specifiers.
5634 (cmd_qtp, response_tracepoint): Likewise.
5635 (collect_data_at_tracepoint): Likewise.
5636 (collect_data_at_step): Likewise.
5637
55a8c076
YQ
56382012-04-14 Yao Qi <yao@codesourcery.com>
5639
5640 Import gnulib module inttypes.
5641 * aclocal.m4, config.in, configure: Regenerated.
5642
dc750257
YQ
56432012-04-14 Yao Qi <yao@codesourcery.com>
5644
5645 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5646 Makefile and config.status at last.
5647
0ab5faf9
YQ
56482012-04-13 Yao Qi <yao@codesourcery.com>
5649
5650 * tracepoint.c: Include stdint.h unconditionally.
5651
18f5fd81
TJB
56522012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5653
5654 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5655 on BFD_HAVE_SYS_PROCFS_TYPE.
5656 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5657 * configure: Regenerate.
5658 * config.in: Likewise.
5659
4d47af5c
L
56602012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5661
5662 * Makefile.in (clean): Also remove x32.c x32-linux.c
5663 x32-avx.c x32-avx-linux.c.
5664 (x32.o): New target.
5665 (x32.c): Likewise.
5666 (x32-linux.o): Likewise.
5667 (x32-linux.c): Likewise.
5668 (x32-avx.o): Likewise.
5669 (x32-avx.c): Likewise.
5670 (x32-avx-linux.o): Likewise.
5671 (x32-avx-linux.c): Likewise.
5672
5673 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5674 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5675 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5676 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5677 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5678 i386/x32-avx-linux.xml.
5679
5680 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5681 (init_registers_x32_avx_linux): Likwise.
5682 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5683 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5684
ecedbe58
PA
56852012-04-13 Pedro Alves <palves@redhat.com>
5686
5687 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5688 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5689 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5690 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5691 the sub-make.
5692
c92b5177
L
56932012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5694
5695 * linux-x86-low.c (compat_x32_clock_t): New.
5696 (compat_x32_siginfo_t): Likewise.
5697 (compat_x32_siginfo_from_siginfo): Likewise.
5698 (siginfo_from_compat_x32_siginfo): Likewise.
5699 (linux_is_elf64): Likewise.
5700 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5701 and siginfo_from_compat_x32_siginfo for x32.
5702 (x86_arch_setup): Set linux_is_elf64.
5703
214d508e
L
57042012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5705
5706 PR gdb/13969
5707 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5708 e_machine field.
5709 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5710 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5711 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5712 compatible with process.
5713
c9a1864a
YQ
57142012-04-12 Yao Qi <yao@codesourcery.com>
5715
5716 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5717 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5718 (install-only, install-info, clean): Handle sub dir gnulib.
5719 (all-lib, am--refresh): New targets.
5720 (memmem.o): Remove target.
5721 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5722 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5723 (AC_REPLACE_FUNCS): Remove memmem.
5724 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5725 (AC_OUTPUT): Generate Makefile in gnulib/.
5726 * aclocal.m4, config.in, configure: Regenerated.
5727
367ba2c2
MR
57282012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5729
5730 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5731
9d236627
PA
57322012-04-05 Pedro Alves <palves@redhat.com>
5733
5734 -Werror=strict-aliasing
5735
5736 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5737 pointer.
5738
111217b3
PA
57392012-04-04 Pedro Alves <palves@redhat.com>
5740
5741 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5742 (sparc_store_gregset_from_stack, sparc_store_gregset)
5743 (sparc_breakpoint_at): Fix formatting.
5744
8365dcf5
TJB
57452012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5746
5747 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5748 are available.
5749 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5750 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5751 * config.in: Regenerate.
5752 * configure: Likewise.
5753
689cc2ae
PA
57542012-03-29 Pedro Alves <palves@redhat.com>
5755
5756 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5757 Correct ptrace arguments.
5758
c14dfd32
PA
57592012-03-28 Pedro Alves <palves@redhat.com>
5760
5761 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5762 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5763 (IA64_FR1_REGNUM): New defines.
5764 (ia64_fetch_register): New.
5765 (the_low_target): Install it.
5766 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5767 field.
5768 * linux-low.c (linux_fetch_registers): Try the
5769 the_low_target.fetch_register hook first.
5770
5771 * linux-arm-low.c (the_low_target): Adjust.
5772 * linux-bfin-low.c (the_low_target): Adjust.
5773 * linux-cris-low.c (the_low_target): Adjust.
5774 * linux-crisv32-low.c (the_low_target): Adjust.
5775 * linux-m32r-low.c (the_low_target): Adjust.
5776 * linux-m68k-low.c (the_low_target): Adjust.
5777 * linux-mips-low.c (the_low_target): Adjust.
5778 * linux-ppc-low.c (the_low_target): Adjust.
5779 * linux-s390-low.c (the_low_target): Adjust.
5780 * linux-sh-low.c (the_low_target): Adjust.
5781 * linux-sparc-low.c (the_low_target): Adjust.
5782 * linux-tic6x-low.c (the_low_target): Adjust.
5783 * linux-x86-low.c (the_low_target): Adjust.
5784 * linux-xtensa-low.c (the_low_target): Adjust.
5785
63c88e13
PA
57862012-03-26 Pedro Alves <palves@redhat.com>
5787
5788 * server.c (handle_qxfer_libraries): Don't bail early if
5789 the_target->qxfer_libraries_svr4 is not NULL.
5790
fb723180
PA
57912012-03-26 Pedro Alves <palves@redhat.com>
5792
5793 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5794
0afae3cf
PA
57952012-03-23 Pedro Alves <palves@redhat.com>
5796
5797 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5798 "library-list-svr4" element's start tag when the the DSO list is
5799 empty.
5800
485f1ee4
PA
58012012-03-23 Pedro Alves <palves@redhat.com>
5802
5803 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5804 a variable whose type size is the same as the inferior's pointer
5805 size.
5806
a5362b9a
TS
58072012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5808
5809 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5810 struct siginfo.
5811 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5812 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5813 * linux-low.h: Include <signal.h>.
5814 (struct siginfo): Remove forward declaration.
5815 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5816 struct siginfo.
5817
d226c142
MF
58182012-03-21 Mike Frysinger <vapier@gentoo.org>
5819
5820 * .gitignore: Ignore more files.
5821
122f36ef
PA
58222012-03-19 Pedro Alves <palves@redhat.com>
5823 Jan Kratochvil <jan.kratochvil@redhat.com>
5824
5825 * server.c (cont_thread, general_thread): Add describing comments.
5826 (start_inferior): Clear `cont_thread'.
5827 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5828 of a process.
5829
fc3e5175
YQ
58302012-03-15 Yao Qi <yao@codesourcery.com>
5831
5832 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5833 handling to ...
5834 (cmd_qtdp): ... here.
5835
8d0d92cd
YQ
58362012-03-15 Yao Qi <yao@codesourcery.com>
5837
5838 * tracepoint.c (struct tracepoint_action_ops): New.
5839 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5840 (m_tracepoint_action_download): New.
5841 (r_tracepoint_action_download): New.
5842 (x_tracepoint_action_download): New.
5843 (l_tracepoint_action_download): New.
5844 (add_tracepoint_action): Install `action->ops' according type.
5845 (download_tracepoint_1): Move code `download' function pointer
5846 of various tracepoint_action_ops.
5847
87b0bb13
JK
58482012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5849
5850 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5851 linux_ptrace_attach_warnings.
5852
5f572dec
JK
58532012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5854
5855 * Makefile.in (linux-ptrace.o): New.
5856 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5857 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5858 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5859 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5860 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5861 of these targets.
5862 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5863
f4647387
YQ
58642012-03-08 Yao Qi <yao@codesourcery.com>
5865 Pedro Alves <palves@redhat.com>
5866
5867 Fix PR server/13392.
5868 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5869 offset of JMP insn.
5870 * tracepoint.c (remove_tracepoint): New.
5871 (cmd_qtdp): Call remove_tracepoint when failed to install.
5872
9b224c5e
PA
58732012-03-07 Pedro Alves <palves@redhat.com>
5874
5875 * linux-low.c (get_detach_signal): New.
5876 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5877 Pass on pending signals to PTRACE_DETACH. Check the result of the
5878 ptrace call.
5879 * server.c (program_signals, program_signals_p): New.
5880 (handle_general_set): Handle QProgramSignals.
5881 * server.h (program_signals, program_signals_p): Declare.
5882
e237a7e2
JK
58832012-03-05 Pedro Alves <palves@redhat.com>
5884 Jan Kratochvil <jan.kratochvil@redhat.com>
5885
5886 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5887 New comment why.
5888
5808517f
YQ
58892012-03-03 Yao Qi <yao@codesourcery.com>
5890
5891 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5892 agent_look_up_symbols.
5893
58b4daa5
YQ
58942012-03-03 Yao Qi <yao@codesourcery.com>
5895
5896 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5897 (linux-x86-low.o): Likewise.
5898 * server.h: Remove in_process_agent_loaded.
5899 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5900 common/agent.c.
5901 Update callers.
5902
8ffcbaaf
YQ
59032012-03-03 Yao Qi <yao@codesourcery.com>
5904
5905 * tracepoint.c (gdb_agent_capability): New global.
5906 (in_process_agent_loaded_ust): Renamed to
5907 `in_process_agent_supports_ust'.
5908 Update callers.
5909 (in_process_agent_supports_ust): Call agent_capability_check.
5910 (clear_installed_tracepoints): Assert that agent supports
5911 agent.
5912
d1feda86
YQ
59132012-03-03 Yao Qi <yao@codesourcery.com>
5914
5915 * linux-low.c (linux_supports_agent): New.
5916 (linux_target_ops): Initialize field `supports_agent' with
5917 linux_supports_agent.
5918 * target.h (struct target_ops) <supports_agent>: New.
5919 (target_supports_agent): New macro.
5920 * server.c (handle_general_set): Handle packet 'QAgent'.
5921 (handle_query): Send `QAgent+'.
5922 * Makefile.in (server.o): Depends on agent.h.
5923
2fa291ac
YQ
59242012-03-03 Yao Qi <yao@codesourcery.com>
5925
5926 * Makefile.in (OBS): Add agent.o.
5927 Add new rule for agent.o.
5928 Track dependence of tracepoint.c on agent.h.
5929 * tracepoint.c (run_inferior_command_1):
5930 (run_inferior_command): Call agent_run_command.
5931 (gdb_ust_connect_sync_socket): Deleted. Move it to
5932 common/agent.c.
5933 (resume_thread, stop_thread): Likewise.
5934 (gdb_ust_socket_init): Renamed to ...
5935 (gdb_agent_socket_init): ... New.
5936 (gdb_ust_thread): Renamed to ...
5937 (gdb_agent_helper_thread): ... New.
5938 (gdb_ust_init): Move some code to ...
5939 (gdb_agent_init): ... here. New.
5940 [HAVE_UST]: Call gdb_ust_init.
5941 (initialize_tracepoint_ftlib): Call gdb_agent_init.
5942 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
5943 * config.in, configure: Regenerated.
5944
05044653
PA
59452012-03-02 Pedro Alves <palves@redhat.com>
5946
5947 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
5948 * linux-low.c (struct simple_pid_list): New.
5949 (stopped_pids): New a struct simple_pid_list pointer.
5950 (add_to_pid_list, pull_pid_from_list): New.
5951 (handle_extended_wait): Don't assume the first signal new children
5952 report is SIGSTOP. Adjust call to pull_pid_from_list.
5953 (linux_wait_for_lwp): Adjust.
5954
8d00225b
YQ
59552012-03-02 Yao Qi <yao@codesourcery.com>
5956
5957 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
5958 debug log.
5959
19560ba5
YQ
59602012-03-02 Yao Qi <yao@codesourcery.com>
5961
5962 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
5963 `stop_pc' and `tpoint'. Update caller.
5964
1faeff08
MR
59652012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
5966
5967 * linux-low.h (linux_target_ops): Add regset_bitmap member.
5968 * linux-low.c (use_linux_regsets): New macro.
5969 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
5970 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
5971 (linux_register_in_regsets): New function.
5972 (usr_fetch_inferior_registers): Skip registers covered by
5973 regsets.
5974 (usr_store_inferior_registers): Likewise.
5975 (usr_fetch_inferior_registers): New macro.
5976 (usr_store_inferior_registers): Likewise.
5977 (linux_fetch_registers): Handle mixed regset/non-regset targets.
5978 (linux_store_registers): Likewise.
5979 * linux-mips-low.c (init_registers_mips_dsp_linux): New
5980 prototype.
5981 (init_registers_mips64_dsp_linux): Likewise.
5982 (init_registers_mips_linux): New macro.
5983 (init_registers_mips_dsp_linux): Likewise.
5984 (mips_dsp_num_regs): Likewise.
5985 (DSP_BASE, DSP_CONTROL): New fallback macros.
5986 (mips_base_regs): New macro.
5987 (mips_regmap): Use it. Fix the size.
5988 (mips_dsp_regmap): New variable.
5989 (mips_dsp_regset_bitmap): Likewise.
5990 (mips_arch_setup): New function.
5991 (mips_cannot_fetch_register): Use the_low_target.regmap rather
5992 than mips_regmap.
5993 (mips_cannot_store_register): Likewise.
5994 (the_low_target): Update .arch_setup, .num_regs and .regmap
5995 initializers. Add .regset_bitmap initializer.
5996 * linux-arm-low.c (the_low_target): Add .regset_bitmap
5997 initializer.
5998 * linux-bfin-low.c (the_low_target): Likewise.
5999 * linux-cris-low.c (the_low_target): Likewise.
6000 * linux-crisv32-low.c (the_low_target): Likewise.
6001 * linux-ia64-low.c (the_low_target): Likewise.
6002 * linux-m32r-low.c (the_low_target): Likewise.
6003 * linux-m68k-low.c (the_low_target): Likewise.
6004 * linux-ppc-low.c (the_low_target): Likewise.
6005 * linux-s390-low.c (the_low_target): Likewise.
6006 * linux-sh-low.c (the_low_target): Likewise.
6007 * linux-sparc-low.c (the_low_target): Likewise.
6008 * linux-tic6x-low.c (the_low_target): Likewise.
6009 * linux-x86-low.c (the_low_target): Likewise.
6010 * linux-xtensa-low.c (the_low_target): Likewise.
6011 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6012 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6013 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6014 srv_xmlfiles.
6015 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6016 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6017
c03e6ccc
YQ
60182012-02-29 Yao Qi <yao@codesourcery.com>
6019 Pedro Alves <palves@redhat.com>
6020
6021 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6022 `step_over_finished' is true.
6023
644cebc9
PA
60242012-02-27 Pedro Alves <palves@redhat.com>
6025
6026 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6027 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6028
c14d7ab2
PA
60292012-02-27 Pedro Alves <palves@redhat.com>
6030
6031 PR server/9684
6032 * linux-low.c (pid_is_stopped): New.
6033 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6034
412c89dd
LM
60352012-02-25 Luis Machado <lgustavo@codesourcery.com>
6036
6037 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6038 of conditions.
6039
b745defe
MR
60402012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6041
6042 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6043
9f3a5c85
LM
60442012-02-24 Luis Machado <lgustavo@codesourcery>
6045
6046 * server.c (handle_query): Advertise support for target-side
6047 breakpoint condition evaluation.
6048 (process_point_options): New function.
6049 (process_serial_event): When inserting a breakpoint, check for
6050 a target-side condition that should be evaluated.
6051
6052 * mem-break.c: Include regcache.h and ax.h.
6053 (point_cond_list_t): New data structure.
6054 (breakpoint) <cond_list>: New field.
6055 (find_gdb_breakpoint_at): Make non-static.
6056 (delete_gdb_breakpoint_at): Clear any target-side
6057 conditions.
6058 (clear_gdb_breakpoint_conditions): New function.
6059 (add_condition_to_breakpoint): Likewise.
6060 (add_breakpoint_condition): Likewise.
6061 (gdb_condition_true_at_breakpoint): Likewise.
6062 (gdb_breakpoint_here): Return result directly instead
6063 of going through a local variable.
6064
6065 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6066 (clear_gdb_breakpoint_conditions): Likewise.
6067 (add_breakpoint_condition): Likewise.
6068 (gdb_condition_true_at_breakpoint): Likewise.
6069
6070 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6071 (need_step_over_p): Take target-side breakpoint condition into
6072 consideration.
6073
5e1dc496
LM
60742012-02-24 Luis Machado <lgustavo@codesourcery>
6075
6076 * server.h: Include tracepoint.h.
6077 (agent_mem_read, agent_get_trace_state_variable_value,
6078 agent_set_trace_state_variable_value,
6079 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6080 get_set_tsv_func_addr): New prototypes.
6081
6082 * ax.h: New include file.
6083 * ax.c: New source file.
6084
6085 * tracepoint.c: Include ax.h.
6086 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6087 agent_expr, eval_result_type): Move to ax.h.
6088 (parse_agent_expr): Rename to ...
6089 (gdb_parse_agent_expr): ... this, make it non-static and move
6090 to ax.h.
6091 (unparse_agent_expr) Rename to ...
6092 (gdb_unparse_agent_expr): ... this, make it non-static and move
6093 to ax.h.
6094 (eval_agent_expr): Rename to ...
6095 (eval_tracepoint_agent_expr): ... this.
6096 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6097 forward declarations.
6098 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6099 (agent_get_trace_state_variable_value): New function.
6100 (agent_set_trace_state_variable_value): New function.
6101 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6102 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6103 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6104 (condition_true_at_tracepoint): Likewise.
6105 (parse_agent_expr): Rename to ...
6106 (gdb_parse_agent_expr): ... this and move to ax.c.
6107 (unparse_agent_expr): Rename to ...
6108 (gdb_unparse_agent_expr): ... this and move to ax.c.
6109 (gdb_agent_op_name): Move to ax.c.
6110 (eval_agent_expr): Rename to ...
6111 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6112 and move to ax.c.
6113 (eval_tracepoint_agent_expr): New function.
6114 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 6115 non-static.
5e1dc496
LM
6116 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6117 ax.c.
6118 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6119 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6120 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6121 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6122 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6123 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6124 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6125 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6126 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6127 (compile_bytecodes): Remove forward declaration.
6128 (is_goto_target): Move to ax.c.
6129 (compile_bytecodes): Move to ax.c and call
6130 agent_get_trace_state_variable_value (...) and
6131 agent_set_trace_state_variable_value (...).
6132
6133 * Makefile.in: Update ax.c and IPA dependencies.
6134
277e4e52
PA
61352012-02-24 Pedro Alves <palves@redhat.com>
6136
6137 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6138 (cmd_bigqtbuffer_circular): ... this. Only handle
6139 'QTBuffer:circular:'.
6140 (handle_tracepoint_general_set): Adjust.
6141
bf4c19f7
YQ
61422012-02-16 Yao Qi <yao@codesourcery.com>
6143
6144 * inferiors.c: Move code to ...
6145 * dll.c: .... here. New.
6146 * server.h: Declare clear_dlls.
6147 * Makefile.in (SFILES): Add dll.c.
6148 (OBS): Add dll.o
6149 (dll.o): New rule.
6150
d73f2619
YQ
61512012-02-11 Yao Qi <yao@codesourcery.com>
6152
6153 * server.c: (handle_monitor_command): Add a new parameter
6154 `own_buf'.
6155 (handle_query): Update caller.
6156
f8255c2a
JB
61572012-02-09 Joel Brobecker <brobecker@adacore.com>
6158
6159 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6160 * configure, config.in: Regenerate.
6161 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6162 is not defined.
6163
da84f473
PA
61642012-02-02 Pedro Alves <palves@redhat.com>
6165
6166 Try SIGKILL first, then PTRACE_KILL.
6167 * linux-low.c (linux_kill_one_lwp): New.
6168 (linux_kill_one_lwp): Rename to ...
6169 (kill_one_lwp_callback): ... this. Use the new
6170 linux_kill_one_lwp.
6171
e886a173
PA
61722012-02-02 Pedro Alves <palves@redhat.com>
6173
6174 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6175 inferior.
6176
be07f1a2
PA
61772012-01-27 Pedro Alves <palves@redhat.com>
6178
6179 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6180 (elf_64_file_p): Make static.
6181 (linux_pid_exe_is_elf_64_file): New.
6182 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6183 Delete declarations.
6184 (linux_pid_exe_is_elf_64_file): Declare.
6185 * linux-x86-low.c (x86_arch_setup): Use
6186 linux_pid_exe_is_elf_64_file.
6187
d8301ad1
JK
61882012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6189
6190 * linux-low.c (linux_wait_for_event_1): Rename to ...
6191 (linux_wait_for_event): ... here and merge it with former
6192 linux_wait_for_event - new variable wait_ptid, use it.
6193 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6194
01b17894
PA
61952012-01-23 Pedro Alves <palves@redhat.com>
6196
6197 * server.c (main): Avoid yet another case of infinite loop while
6198 detaching/killing after a longjmp.
6199
e825046f
JK
62002012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6201
6202 Code cleanup.
6203 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6204
b9e7b9c3
UW
62052012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6206
6207 * hostio.c (handle_readlink): New function.
6208 (handle_vFile): Call it to handle "vFile:readlink" packets.
6209
901f9912
UW
62102012-01-20 Pedro Alves <palves@redhat.com>
6211 Ulrich Weigand <ulrich.weigand@linaro.org>
6212
6213 * server.c (handle_v_requests): Only support vAttach and vRun to
6214 start multiple processes when in extended protocol mode.
6215
fc1ab1a0
PA
62162012-01-17 Pedro Alves <palves@redhat.com>
6217
6218 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6219 memalign plus mprotect to allocate the scratch buffer.
6220
7d5d4e98
PA
62212012-01-13 Pedro Alves <palves@redhat.com>
6222
6223 * server.c (attach_inferior): Clear `cont_thread'.
6224
f128d5e9
PA
62252012-01-13 Pedro Alves <palves@redhat.com>
6226
6227 * server.c (main): Avoid infinite loop while detaching/killing
6228 after a longjmp.
6229
06db92f0
DE
62302012-01-09 Doug Evans <dje@google.com>
6231
6232 * server.c (start_inferior): Set last_ptid in --wrapper case.
6233
32d92999
YQ
62342012-01-06 Yao Qi <yao@codesourcery.com>
6235
6236 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6237 defined.
6238 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6239
5e0a92a9
YQ
62402012-01-04 Yao Qi <yao@codesourcery.com>
6241
6242 * tracepoint.c (cmd_qtdp): Print debug message
6243 for static tracepoint.
6244
ae639e8c
YQ
62452012-01-04 Yao Qi <yao@codesourcery.com>
6246
6247 * tracepoint.c (trace_vdebug): Differentiate debug message
6248 between gdbserver and IPA.
6249
f72429c5
YQ
62502012-01-03 Yao Qi <yao@codesourcery.com>
6251
6252 * tracepoint.c (tracepoint_was_hit): Don't collect for
6253 static tracepoint.
6254
12c3e59c
JB
62552012-01-02 Joel Brobecker <brobecker@adacore.com>
6256
6257 * terminal.h: Reformat copyright header.
6258
67827812
JB
62592012-01-02 Joel Brobecker <brobecker@adacore.com>
6260
6261 * server.c (gdbserver_version): Update copyright year.
6262 * gdbreplay.c (gdbreplay_version): Likewise.
6263
3e52c33d
JK
62642011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6265
6266 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6267
6268 Revert:
6269 2011-12-18 Hui Zhu <teawater@gmail.com>
6270 * linux-low.c (linux_create_inferior): Save return value to ret.
6271
66f1260e
HZ
62722011-12-18 Hui Zhu <teawater@gmail.com>
6273
6274 * linux-low.c (linux_create_inferior): Save return value to ret.
6275
e77616d7
DE
62762011-12-16 Doug Evans <dje@google.com>
6277
e7b06c57
DE
6278 * linux-low.c (linux_create_inferior): If stdio connection,
6279 redirect stdin from /dev/null, stdout to stderr.
6280 * remote-utils.c (remote_is_stdio): New static global.
6281 (remote_connection_is_stdio): New function.
6282 (remote_prepare): Handle stdio connection.
6283 (remote_open): Ditto.
6284 (remote_close): Don't close stdin for stdio connections.
6285 (read_prim,write_prim): New functions. Replace all calls to
6286 read/write to these.
6287 * server.c (main): Watch for "-" argument. Move call to
6288 remote_prepare before start_inferior.
6289 * server.h (STDIO_CONNECTION_NAME): New macro.
6290 (remote_connection_is_stdio): Declare.
6291
e77616d7
DE
6292 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6293 in debugging output.
6294
82067193
YQ
62952011-12-15 Yao Qi <yao@codesourcery.com>
6296
6297 * tracepoint.c: Include sys/syscall.h.
6298 (gdb_ust_thread): Remove preprocessor conditional.
6299
82bfbe7e
PA
63002011-12-14 Pedro Alves <pedro@codesourcery.com>
6301
6302 * linux-low.c (linux_detach_one_lwp): Call
6303 the_low_target.prepare_to_resume before detaching.
6304
712c6575
YQ
63052011-12-14 Yao Qi <yao@codesourcery.com>
6306
6307 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6308 of write.
6309
d54d1edf
YQ
63102011-12-14 Yao Qi <yao@codesourcery.com>
6311
6312 * i386-low.c (i386_low_stopped_data_address): Initialize local
6313 variable `control'.
6314
6210a125
PA
63152011-12-13 Pedro Alves <pedro@codesourcery.com>
6316
6317 PR remote/13492
6318
6319 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6320 DR_CONTROL unless necessary. Extend comments.
6321 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6322 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6323
2ece8244
YQ
63242011-12-13 Yao Qi <yao@codesourcery.com>
6325
6326 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6327 macros.
6328 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6329
784867a5
JK
63302011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6331
6332 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6333 Print new debug message for such case.
6334
6bf36717
JK
63352011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6336
6337 Fix overlapping memcpy.
6338 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6339 the read_inferior_memory transfer.
6340 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6341 write_inferior_memory transfer.
6342 (set_fast_tracepoint_jump): New variable buf. Use it for the
6343 read_inferior_memory and write_inferior_memory transfers.
6344 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6345 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6346 Use it for the write_inferior_memory transfer.
6347 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6348 buffers.
6349
50275556
MR
63502011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6351
6352 * linux-low.c (fetch_register, store_register): Make code
6353 consistent, fix formatting.
6354
7325beb4
MR
63552011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6356
6357 * linux-low.c (usr_store_inferior_registers): Factor out code
6358 to handle individual registers into...
6359 (store_register): ... this new function.
6360
c642a434
UW
63612011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6362
6363 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6364 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6365 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6366 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6367 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6368 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6369 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6370 (srv_xmlfiles): Add new XML files.
6371
6372 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6373 and <sys/uio.h>.
6374 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6375 (init_registers_s390_linux32v1): Add prototype.
6376 (init_registers_s390_linux32v2): Likewise.
6377 (init_registers_s390_linux64v1): Likewise.
6378 (init_registers_s390_linux64v2): Likewise.
6379 (init_registers_s390x_linux64v1): Likewise.
6380 (init_registers_s390x_linux64v2): Likewise.
6381 (s390_num_regs): Increment to 52.
6382 (s390_regmap): Add orig_r2 register.
6383 (s390_num_regs_3264): Increment to 68.
6384 (s390_regmap_3264): Add orig_r2 register.
6385 (s390_collect_ptrace_register): Handle orig_r2 register.
6386 (s390_supply_ptrace_register): Likewise.
6387 (s390_fill_last_break): New function.
6388 (s390_store_last_break): Likewise.
6389 (s390_fill_system_call): New function.
6390 (s390_store_system_call): Likewise.
6391 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6392 register sets.
6393 (s390_check_regset): New function.
6394 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6395 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6396 Update target_regsets for available register sets.
6397
2268b414
JK
63982011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6399 Jan Kratochvil <jan.kratochvil@redhat.com>
6400
6401 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6402 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6403 New.
6404 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6405 * linux-low.h (struct process_info_private): New member r_debug.
6406 * server.c (handle_qxfer_libraries): Call
6407 the_target->qxfer_libraries_svr4.
6408 (handle_qxfer_libraries_svr4): New function.
6409 (qxfer_packets): New entry "libraries-svr4".
6410 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6411 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6412 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6413 PACKET_qXfer_libraries_svr4.
6414
d6db1fab
UW
64152011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6416
6417 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6418 PSW address/mask between 8-byte and 16-byte formats.
6419 (s390_supply_ptrace_register): Likewise.
6420 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6421 basic addressing mode bit.
6422
242f5f1c
SS
64232011-11-24 Stan Shebs <stan@codesourcery.com>
6424
6425 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6426
f196051f
SS
64272011-11-17 Stan Shebs <stan@codesourcery.com>
6428
6429 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6430 (tracing_start_time): New global.
6431 (tracing_stop_time): New global.
6432 (tracing_user_name): New global.
6433 (tracing_notes): New global.
6434 (tracing_stop_note): New global.
6435 (cmd_qtstart): Set traceframe_usage, start_time.
6436 (stop_tracing): Set stop_time.
6437 (cmd_qtstatus): Report additional status.
6438 (cmd_qtp): New function.
6439 (handle_tracepoint_query): Call it.
6440 (cmd_qtnotes): New function.
6441 (handle_tracepoint_general_set): Call it.
6442 (get_timestamp): Rename from tsv_get_timestamp.
6443
405f8e94
SS
64442011-11-14 Stan Shebs <stan@codesourcery.com>
6445 Kwok Cheung Yeung <kcy@codesourcery.com>
6446
6447 * linux-x86-low.c (small_jump_insn): New.
6448 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6449 trampoline and error message, build a trampoline and issue a small
6450 jump instruction to it.
6451 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6452 trampoline and error message.
6453 (x86_get_min_fast_tracepoint_insn_len): New.
6454 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6455 * linux-low.h (struct linux_target_ops): Add arguments to
6456 install_fast_tracepoint_jump_pad operation, add new operation.
6457 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6458 arguments.
6459 (linux_get_min_fast_tracepoint_insn_len): New function.
6460 (linux_target_op): Add new operation.
6461 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6462 (gdb_trampoline_buffer_end): Ditto.
6463 (gdb_trampoline_buffer_error): Ditto.
6464 (struct ipa_sym_addresses): Add fields for new IPA variables.
6465 (symbol_list): Add entries for new IPA variables.
6466 (struct tracepoint): Add fields to hold the address range of the
6467 trampoline used by the tracepoint.
6468 (trampoline_buffer_head): New static variable.
6469 (trampoline_buffer_tail): Ditto.
6470 (claim_trampoline_space): New function.
6471 (have_fast_tracepoint_trampoline_buffer): New function.
6472 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6473 structure.
6474 (install_fast_tracepoint): Ditto, also add error buffer argument.
6475 (cmd_qtminftpilen): New function.
6476 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6477 (fast_tracepoint_from_trampoline_address): New function.
6478 (fast_tracepoint_collecting): Handle trampoline as part of jump
6479 pad space.
6480 (set_trampoline_buffer_space): New function.
6481 (initialize_tracepoint): Initialize new IPA variables.
6482 * target.h (struct target_ops): Add arguments to
6483 install_fast_tracepoint_jump_pad operation, add new
6484 get_min_fast_tracepoint_insn_len operation.
6485 (target_get_min_fast_tracepoint_insn_len): New.
6486 (install_fast_tracepoint_jump_pad): Add arguments.
6487 * server.h (IPA_BUFSIZ): Define.
6488 * linux-i386-ipa.c: Include extra header files.
6489 (initialize_fast_tracepoint_trampoline_buffer): New function.
6490 (initialize_low_tracepoint): Call it.
6491 * server.h (set_trampoline_buffer_space): Declare.
6492 (claim_trampoline_space): Ditto.
6493 (have_fast_tracepoint_trampoline_buffer): Ditto.
6494
1e4d1764
YQ
64952011-11-14 Yao Qi <yao@codesourcery.com>
6496
6497 * server.c (handle_query): Handle InstallInTrace for qSupported.
6498 * tracepoint.c (add_tracepoint): Sort list.
6499 (install_tracepoint, download_tracepoint): New.
6500 (cmd_qtdp): Call them to install and download tracepoints.
6501 (sort_tracepoints): Removed.
6502 (cmd_qtstart): Update.
6503
5c73ff4e
YQ
65042011-11-14 Yao Qi <yao@codesourcery.com>
6505
6506 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6507 * mem-break.h: Declare.
6508 * tracepoint.c (cmd_qtstart): Move some code to ...
6509 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6510 New.
6511 (download_tracepoints): Move some code to ...
6512 (download_tracepoint_1): ... here. New.
6513
86a30030
YQ
65142011-11-08 Yao Qi <yao@codesourcery.com>
6515
6516 * remote-utils.c (relocate_instruction): A comment fix.
6517
8d26e50c
JB
65182011-11-07 Joel Brobecker <brobecker@adacore.com>
6519
6520 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6521 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6522 dr_status_mirror and dr_control_mirror from debug_reg_state.
6523 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6524 (i386_initial_stuff): Remove use of deleted globals.
6525 (i386_get_thread_context, i386_set_thread_context,
6526 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6527 from debug_reg_state.
6528
a59306a3
YQ
65292011-11-05 Yao Qi <yao@codesourcery.com>
6530
6531 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6532 address as TPOINT's.
6533
3065dfb6
SS
65342011-11-02 Stan Shebs <stan@codesourcery.com>
6535
6536 * tracepoint.c (agent_mem_read_string): New function.
6537 (eval_agent_expr): Call it for tracenz.
6538 * server.c (handle_query): Report support for tracenz.
6539
fd0d8c7c
YQ
65402011-11-02 Yao Qi <yao@codesourcery.com>
6541
6542 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6543
609086b1
YQ
65442011-11-02 Yao Qi <yao@codesourcery.com>
6545
6546 * target.h: Fix a typo in comment.
6547
b9fd1791
PA
65482011-10-31 Pedro Alves <pedro@codesourcery.com>
6549
6550 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6551 clobber the breakpoints' shadows with fast tracepoint jumps.
6552 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6553 * target.c (write_inferior_memory): Also pass MYADDR down to
6554 check_mem_write.
6555
03583c20
UW
65562011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6557
6558 * configure.ac: Check support for personality routine.
6559 * configure: Regenerate.
6560 * config.in: Likewise.
6561 * linux-low.c: Include <sys/personality.h>.
6562 Define ADDR_NO_RANDOMIZE if necessary.
6563 (linux_create_inferior): Disable address space randomization when
6564 forking inferior, if requested.
6565 (linux_supports_disable_randomization): New function.
6566 (linux_target_ops): Install it.
6567 * server.h (disable_randomization): Declare.
6568 * server.c (disable_randomization): New global variable.
6569 (handle_general_set): Handle QDisableRandomization.
6570 (handle_query): Likewise for qSupported.
6571 (main): Support --disable-randomization and --no-disable-randomization
6572 command line arguments.
6573 * target.h (struct target_ops): Add supports_disable_randomization.
6574 (target_supports_disable_randomization): New macro.
6575
723b724b
MF
65762011-09-29 Mike Frysinger <vapier@gentoo.org>
6577
6578 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6579 ifdef check.
6580 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6581 [!PT_GETDSBT] (target_loadmap): New definition.
6582 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6583 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6584 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6585 and PT_GETDSBT to LINUX_LOADMAP.
6586 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6587 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6588
55329a5c 65892011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
6590
6591 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6592 (arm_linux_hwbp_cap): New static variable.
6593 (arm_linux_get_hwbp_cap): Replace by ...
6594 (arm_linux_init_hwbp_cap): ... this new function.
6595 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6596 (arm_linux_get_hw_watchpoint_count): Likewise.
6597 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6598 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6599 (arm_prepare_to_resume): Use perror_with_name instead of error.
6600
55329a5c 66012011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
6602
6603 * linux-arm-low.c: Include <signal.h>.
6604 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6605 (struct arm_linux_hwbp_cap): New data type.
6606 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6607 (struct arm_linux_hw_breakpoint): New data type.
6608 (MAX_BPTS, MAX_WPTS): Define.
6609 (struct arch_process_info, struct arch_lwp_info): New data types.
6610 (arm_linux_get_hwbp_cap): New function.
6611 (arm_linux_get_hw_breakpoint_count): Likewise.
6612 (arm_linux_get_hw_watchpoint_count): Likewise.
6613 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6614 (arm_hwbp_control_initialize): Likewise.
6615 (arm_hwbp_control_is_enabled): Likewise.
6616 (arm_hwbp_control_is_initialized): Likewise.
6617 (arm_hwbp_control_disable): Likewise.
6618 (arm_linux_hw_breakpoint_equal): Likewise.
6619 (arm_linux_hw_point_initialize): Likewise.
6620 (struct update_registers_data): New data structure.
6621 (update_registers_callback: New function.
6622 (arm_insert_point): Likewise.
6623 (arm_remove_point): Likewise.
6624 (arm_stopped_by_watchpoint): Likewise.
6625 (arm_stopped_data_address): Likewise.
6626 (arm_new_process): Likewise.
6627 (arm_new_thread): Likewise.
6628 (arm_prepare_to_resume): Likewise.
6629 (the_low_target): Register arm_insert_point, arm_remove_point,
6630 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6631 arm_new_thread, and arm_prepare_to_resume.
6632
6b9801d4
SS
66332011-09-15 Stan Shebs <stan@codesourcery.com>
6634
6635 * server.h (struct emit_ops): Add compare-goto fields.
6636 * tracepoint.c (gdb_agent_op_sizes): New table.
6637 (emit_eq_goto): New function.
6638 (emit_ne_goto): New function.
6639 (emit_lt_goto): New function.
6640 (emit_le_goto): New function.
6641 (emit_gt_goto): New function.
6642 (emit_ge_goto): New function.
6643 (is_goto_target): New function.
6644 (compile_bytecodes): Recognize special cases of compare-goto
6645 combinations and call specialized emitters for them.
6646 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6647 (amd64_emit_ne_goto): New function.
6648 (amd64_emit_lt_goto): New function.
6649 (amd64_emit_le_goto): New function.
6650 (amd64_emit_gt_goto): New function.
6651 (amd64_emit_ge_goto): New function.
6652 (amd64_emit_ops): Add the new functions.
6653 (i386_emit_eq_goto): New function.
6654 (i386_emit_ne_goto): New function.
6655 (i386_emit_lt_goto): New function.
6656 (i386_emit_le_goto): New function.
6657 (i386_emit_gt_goto): New function.
6658 (i386_emit_ge_goto): New function.
6659 (i386_emit_ops): Add the new functions.
6660
bf15cbda
SS
66612011-09-08 Stan Shebs <stan@codesourcery.com>
6662
6663 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6664 (i386_emit_epilogue): Restore %ebx.
6665
943ca1dd
JZ
66662011-08-31 Jie Zhang <jzhang918@gmail.com>
6667
6668 * server.c (step_thread): Remove definition.
6669 (process_serial_event): Don't handle Hs.
6670 * server.h (step_thread): Remove declaration.
6671 * target.c (set_desired_inferior): Remove use of step_thread.
6672
e3deef73
LM
66732011-08-24 Luis Machado <lgustavo@codesourcery.com>
6674
6675 * linux-low.c: Include linux-procfs.h.
6676 (linux_attach_lwp_1): Update comments.
6677 (linux_attach): Scan for existing threads when attaching to a
6678 process that is the tgid.
6679 * Makefile.in: Update dependencies.
6680
13da1c97
LM
66812011-08-24 Luis Machado <lgustavo@codesourcery.com>
6682
6683 * configure.srv: Add linux-procfs.o dependencies.
6684
881127c9
YQ
66852011-08-14 Yao Qi <yao@codesourcery.com>
6686
6687 * target.h (struct target_ops): Fix indent.
6688 * win32-low.c (win32_target_ops): Fix comment.
6689
58dbd541
YQ
66902011-08-14 Andrew Jenner <andrew@codesourcery.com>
6691 Yao Qi <yao@codesourcery.com>
6692
6693 * Makefile.in (clean): Remove tic6x-*.c files.
6694 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6695 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6696 (tic6x-c64xp-linux.c): Likewise.
6697 * configure.srv: Add support for tic6x-*-uclinux.
6698 * linux-tic6x-low.c: New.
6699 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6700
78d85199
YQ
67012011-08-14 Andrew Stubbs <ams@codesourcery.com>
6702 Yao Qi <yao@codesourcery.com>
6703
6704 * target.h (struct target_ops): Add read_loadmap.
6705 * linux-low.c (struct target_loadseg): New type.
6706 (struct target_loadmap): New type.
6707 (linux_read_loadmap): New function.
6708 (linux_target_ops): Add linux_read_loadmap.
6709 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
6710 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6711 to NULL.
78d85199 6712
a959a88d
EZ
67132011-08-05 Eli Zaretskii <eliz@gnu.org>
6714
6715 * win32-low.c: Include <stdint.h>.
6716
1ced966e
PA
67172011-07-22 Pedro Alves <pedro@codesourcery.com>
6718
6719 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6720 to the inferior here.
6721 (i386_remove_aligned_watchpoint): Ditto.
6722 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6723 fit part of the watchpoint in the debug registers.
6724 (i386_update_inferior_debug_regs): New.
6725 (i386_low_insert_watchpoint): Work on a local mirror of the debug
6726 registers, and only update the inferior on success.
6727 (i386_low_remove_watchpoint): Ditto.
6728
d26e3629
KY
67292011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6730
6731 * linux-low.c (compare_ints, unique, list_threads, show_process,
6732 linux_core_of_thread): Delete.
6733 (linux_target_ops): Change linux_core_of_thread to
6734 linux_common_core_of_thread.
6735 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6736 * utils.c (malloc_failure): Change type of argument.
6737 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6738 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6739 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6740 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6741 (IPA_OBJS): Add common-utils-ipa.o.
6742 (ptid_h, linux_osdata_h): New macros.
6743 (server_h): Add common/common-utils.h, common/xml-utils.h,
6744 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6745 common/ptid.h.
6746 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6747 ptid.o, buffer.o): New rules.
6748 (linux-low.o): Add common/linux-osdata.h as a dependency.
6749 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6750 * configure.ac: Add AC_HEADER_DIRENT check.
6751 * config.in: Regenerate.
6752 * configure: Regenerate.
6753 * remote-utils.c (xml_escape_text): Delete.
6754 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6755 buffer_xml_printf): Move to common/buffer.c.
6756 * server.c (main): Remove call to initialize_inferiors.
6757 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6758 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6759 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6760 internal_error, gdb_assert, gdb_assert_fail): Delete.
6761 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6762 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6763 common/buffer.h.
6764 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6765 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6766 initialize_inferiors): Delete.
6767
2275a1a7
PA
67682011-07-20 Pedro Alves <pedro@codesourcery.com>
6769
6770 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6771 symbol error.
6772
0a5b1e09
PA
67732011-05-31 Pedro Alves <pedro@codesourcery.com>
6774
6775 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6776 assertion.
6777 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6778
6938fd34
YQ
67792011-05-26 Yao Qi <yao@codesourcery.com>
6780
6781 * Makefile.in (thread-db.o): Track dependence to
6782 common/gdb_thread_db.h.
6783 * thread-db.c: include gdb_thread_db.h from right place.
6784
b481f9e0
TT
67852011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6786
6787 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6788 __FILE__ and __LINE__ to internal_error.
6789
98a5dd13
DE
67902011-05-13 Doug Evans <dje@google.com>
6791
6792 * thread-db.c (try_thread_db_load_from_sdir): New function.
6793 (try_thread_db_load_from_dir): New function.
6794 (thread_db_load_search): Handle $sdir, ignore $pdir.
6795 Remove trying of system directories if search of
6796 libthread-db-search-path fails, that is now done via $sdir.
6797
d248b706
KY
67982011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6799
6800 * server.c (handle_query): Add EnableDisableTracepoints to the list
6801 of supported features.
43aaf8b6 6802 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 6803 tracepoints.
43aaf8b6
PA
6804 (cmd_qtenable_disable): New.
6805 (cmd_qtstart): Install tracepoints even if disabled.
6806 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6807 receiving a QTEnable or QTDisable packet.
6808 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6809 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6810 tracepoints.
6811 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 6812
84e578fb
DE
68132011-05-10 Doug Evans <dje@google.com>
6814
6815 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6816
71f55dd8
DE
68172011-05-04 Doug Evans <dje@google.com>
6818
6819 * linux-low.c (linux_join): Skip process lookup.
6820 * spu-low.c (spu_join): Ditto.
6821 * server.c (join_inferiors_callback): Delete.
6822 (process_serial_event): For 'D' packet (detach) call join_inferior
6823 directly.
6824
4d393d60
JM
68252011-05-04 Joseph Myers <joseph@codesourcery.com>
6826
6827 * README: Don't mention xscale*-*-linux*.
6828 * configure.srv (xscale*-*-linux*): Don't handle target.
6829
b00ad6ff
NF
68302011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6831
6832 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6833 casting pointers.
6834 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6835 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6836 (i386_emit_void_call_2): Likewise.
6837
af96c192
YQ
68382011-04-26 Yao Qi <yao@codesourcery.com>
6839
43aaf8b6
PA
6840 * linux-low.c: Move common macros to linux-ptrace.h.
6841 Include linux-ptrace.h.
af96c192
YQ
6842 * Makefile.in (linux_ptrace_h): New.
6843 (linux-low.o): Depends on linux-ptrace.h.
6844
03f2bd59
JK
68452011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6846
6847 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6848 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6849 (remote_prepare): New function with most of the TCP code from ...
6850 (remote_open): ... here. Detect PORT here unconditionally. Move also
6851 setting transport_is_reliable.
6852 * server.c (run_once): New variable.
6853 (gdbserver_usage): Document it.
6854 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6855 the first run if RUN_ONCE.
6856 * server.h (run_once, remote_prepare): New declarations.
6857
7a9dd1b2
TT
68582011-04-19 Tom Tromey <tromey@redhat.com>
6859
6860 * win32-low.c (handle_load_dll): Remove duplicate "the".
6861
81239425
PM
68622011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6863
6864 Remove support for old Cygwin 1.5 versions.
6865 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6866 function to avoid warning.
6867 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6868 warning.
6869
9e0627f1
PM
68702011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6871
6872 * gdbserver/server.h (Macro _): Define it if not available.
6873
588eebee
MS
68742011-03-14 Michael Snyder <msnyder@vmware.com>
6875
348af9f7 6876 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 6877
43f70d4c
JB
68782011-03-10 Joel Brobecker <brobecker@adacore.com>
6879
6880 * Makefile.in (maintainer-clean realclean distclean): Remove
6881 "make ... subdir_do" command.
6882
348af9f7
MS
68832011-03-10 Michael Snyder <msnyder@vmware.com>
6884
6885 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6886
6887 * server.c (handle_v_run): Free alloced buffer on early return.
6888
e637a4f5
YQ
68892011-03-09 Yao Qi <yao@codesourcery.com>
6890
6891 Revert:
6892 2011-03-04 Yao Qi <yao@codesourcery.com>
6893
6894 * Makefile.in: Remove GNU make feature --directory.
6895
6896 2011-03-05 Yao Qi <yao@codesourcery.com>
6897
6898 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6899 (subdir_do): New make target. Copied from gdb/Makefile.
6900 (maintainer-clean, realclean, distclean, clean): Call corresponding
6901 make targets in common/Makefile.
6902
6903 2011-02-11 Yao Qi <yao@codesourcery.com>
6904
6905 * configure.ac: Call AC_PROG_RANLIB.
6906 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6907 * configure: Regenerate.
6908
e6edda56
JK
69092011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6910
6911 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6912
e5141119
JB
69132011-03-06 Yao Qi <yao@codesourcery.com>
6914
6915 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6916
64794aa4
JB
69172011-03-05 Yao Qi <yao@codesourcery.com>
6918
6919 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6920 (subdir_do): New make target. Copied from gdb/Makefile.
6921 (maintainer-clean, realclean, distclean, clean): Call corresponding
6922 make targets in common/Makefile.
6923
7a762829
YQ
69242011-03-04 Yao Qi <yao@codesourcery.com>
6925
6926 * Makefile.in: Remove GNU make feature --directory.
6927
348af9f7
MS
69282011-03-04 Michael Snyder <msnyder@vmware.com>
6929
6930 * server.c (queue_stop_reply): Call xmalloc not malloc.
6931
69322011-03-02 Michael Snyder <msnyder@vmware.com>
6933
6934 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6935
9f72fee2
MS
69362011-02-28 Michael Snyder <msnyder@vmware.com>
6937
588eebee
MS
6938 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6939 (cmd_qtframe): Ditto.
6940 (cmd_qtbuffer): Ditto.
6941 (cmd_bigqtbuffer): Ditto.
6942
9f72fee2
MS
6943 * utils.c (decimal2str): Initialize 'width' to nine, then
6944 don't mess with it.
6945
8040bd49
UW
69462011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6947
6948 * hostio.c (require_data): Free *data, not data.
6949
7e52cbd0
JK
69502011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6951
6952 * hostio.c (require_data): Use free, not xfree.
6953
9130f83e
MS
69542011-02-27 Michael Snyder <msnyder@vmware.com>
6955
4b812f4e
MS
6956 * server.c (handle_query): Discard unused value.
6957
9130f83e
MS
6958 * hostio.c (require_data): Free malloc memory before returning
6959 error.
6960
69d37113
MS
69612011-02-26 Michael Snyder <msnyder@vmware.com>
6962
6963 * linux-low.c (list_threads): Call closedir for dirent.
6964
35f5825a
MS
69652011-02-27 Michael Snyder <msnyder@vmware.com>
6966
2a589cef
MS
6967 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
6968 a case statement falls through.
6969
0adea5f7
MS
6970 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
6971
35f5825a
MS
6972 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
6973 in comparison.
6974
238f1c74
MS
69752011-02-26 Michael Snyder <msnyder@vmware.com>
6976
6977 * utils.c (decimal2str): Eliminate dead code and dead param.
6978 (pulongest): Drop dead param from call to decimal2str.
6979 (plongest): Ditto.
6980
633ff500
JB
69812011-02-24 Joel Brobecker <brobecker@adacore.com>
6982
6983 Revert the following patch (not approved yet):
6984 2011-02-21 Hui Zhu <teawater@gmail.com>
6985 * tracepoint.c (tp_printf): New function.
6986 (eval_agent_expr): Handle gdb_agent_op_printf.
6987
f9c6ff72
HZ
69882011-02-21 Hui Zhu <teawater@gmail.com>
6989
6990 * tracepoint.c (tp_printf): New function.
6991 (eval_agent_expr): Handle gdb_agent_op_printf.
6992
94d5e490
TT
69932011-02-18 Tom Tromey <tromey@redhat.com>
6994
6995 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
6996 (tracepoint.o): Likewise.
6997 * tracepoint.c (enum gdb_agent_op): Use ax.def.
6998 (gdb_agent_op_names): Likewise.
6999
c7f96d2b
TT
70002011-02-18 Tom Tromey <tromey@redhat.com>
7001
7002 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7003 gdb_agent_op_rot>: New constants.
7004 (gdb_agent_op_names): Add pick and roll.
7005 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7006 cases.
7007
0feedb2c
JK
70082011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7009
7010 * aclocal.m4: Regenerated with aclocal-1.11.1.
7011
b3b9301e
PA
70122011-02-14 Pedro Alves <pedro@codesourcery.com>
7013
7014 * server.c (handle_qxfer_traceframe_info): New.
7015 (qxfer_packets): Register "traceframe-info".
7016 (handle_query): Report support for qXfer:traceframe-info:read+.
7017 * tracepoint.c (match_blocktype): New.
7018 (traceframe_find_block_type): Rename to ...
7019 (traceframe_walk_blocks): ... this. Add callback filter argument,
7020 and use it.
7021 (traceframe_find_block_type): New, reimplemented on top of
7022 traceframe_walk_blocks.
7023 (build_traceframe_info_xml): New.
7024 (traceframe_read_info): New.
7025 * server.h (traceframe_read_info): Declare.
7026
4f3e6fb7
YQ
70272011-02-11 Yao Qi <yao@codesourcery.com>
7028
7029 * configure.ac: Call AC_PROG_RANLIB.
7030 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7031 * configure: Regenerate.
7032
764880b7
PA
70332011-02-07 Pedro Alves <pedro@codesourcery.com>
7034
7035 * server.c (gdb_read_memory): Change return semantics to allow
7036 partial transfers.
7037 (handle_search_memory_1): Adjust.
7038 (process_serial_event) <'m' packet>: Handle partial transfers.
7039 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7040
1c79eb8a
PA
70412011-01-28 Pedro Alves <pedro@codesourcery.com>
7042
7043 * regcache.c (init_register_cache): Initialize
7044 regcache->register_status.
7045 (free_register_cache): Release regcache->register_status.
7046 (regcache_cpy): Copy register_status.
7047 (registers_to_string): Print 'x's for unavailable registers.
7048 (supply_register): Mark the register's status valid or
7049 unavailable, depending on whether a buffer was passed in or not.
7050 (supply_register_zeroed): New.
7051 (supply_regblock): Mark the registers' status valid or
7052 unavailable, depending on whether a buffer was passed in or not.
7053 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7054 (struct regcache): New `register_status' field.
7055 (supply_register_zeroed): Declare.
7056 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7057 supply_register_zeroed, rather than passing a NULL buffer to
7058 supply_register.
7059 * tracepoint.c (fetch_traceframe_registers): Update comment.
7060
85724a0e
PA
70612011-01-28 Pedro Alves <pedro@codesourcery.com>
7062
7063 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7064 buffer explicit.
7065
d08aafef
PA
70662011-01-25 Pedro Alves <pedro@codesourcery.com>
7067
7068 * server.h (decode_xfer_write): Change prototype.
7069 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7070 and don't extract the annex here.
7071 * server.c (decode_xfer_read): Remove `annex' parameter,
7072 and don't extract the annex here.
7073 (decode_xfer): New.
7074 (struct qxfer): New.
7075 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7076 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7077 (handle_qxfer_statictrace): New functions, abstracted out from
7078 handle_query, and made to use the struct qxfer interface.
7079 (handle_threads_qxfer_proper): Rename to ...
7080 (handle_qxfer_threads_proper): ... this.
7081 (handle_threads_qxfer): Rename to ...
7082 (handle_qxfer_threads): ... this. Adjust.
7083 (qxfer_packets): New array.
7084 (handle_qxfer): New function.
7085 (handle_query): Use handle_qxfer.
7086
493e2a69
MS
70872011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7088
7089 * gdbreplay.c: Shorten lines of >= 80 columns.
7090 * linux-low.c: Ditto.
7091 * linux-ppc-low.c: Ditto.
7092 * linux-s390-low.c: Ditto.
7093 * linux-sparc-low.c: Ditto.
7094 * linux-x86-low.c: Ditto.
7095 * linux-xtensa-low.c: Ditto.
7096 * mem-break.c: Ditto.
7097 * nto-low.c: Ditto.
7098 * regcache.h: Ditto.
7099 * remote-utils.c: Ditto.
7100 * server.c: Ditto.
7101 * server.h: Ditto.
7102 * thread-db.c: Ditto.
7103 * tracepoint.c: Ditto.
7104 * utils.c: Ditto.
7105 * win32-low.h: Ditto.
7106
44944448
JB
71072011-01-05 Joel Brobecker <brobecker@adacore.com>
7108
7109 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7110 update.
7111
71ce852c
JB
71122011-01-01 Joel Brobecker <brobecker@adacore.com>
7113
7114 * server.c (gdbserver_version): Update copyright year in version
7115 output.
7116 * gdbreplay.c (gdbreplay_version): Ditto.
7117
eb826dc6
MF
71182010-12-29 Jie Zhang <jie.zhang@analog.com>
7119
7120 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7121 * linux-bfin-low.c: New file.
7122 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7123 PT_DATA_ADDR for BFIN targets.
7124 * Makefile.in (SFILES): Add linux-bfin-low.c.
7125 (clean): Remove reg-bfin.c.
7126 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7127 * README: Mention supported Blackfin targets.
7128
39ab222a
MF
71292010-12-23 Mike Frysinger <vapier@gentoo.org>
7130
7131 * .gitignore: New file.
7132
a1f2ce7d
MF
71332010-11-16 Mike Frysinger <vapier@gentoo.org>
7134
7135 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7136
f474844c
JZ
71372010-10-22 Jie Zhang <jie@codesourcery.com>
7138
7139 * Makefile.in: Add FLAGS_TO_PASS variable.
7140 (install): Remove dependency of install-only and recursively
7141 invoke make for install-only.
7142
f1048712
DE
71432010-10-04 Doug Evans <dje@google.com>
7144
7145 * Makefile.in (uninstall): Use $(DESTDIR).
7146
b53a1623
PA
71472010-09-24 Pedro Alves <pedro@codesourcery.com>
7148
e6ee044d
PA
7149 PR gdb/11842
7150
b53a1623
PA
7151 * linux-x86-low.c (compat_siginfo_from_siginfo)
7152 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7153 si_code is < 0. Check for si_code == SI_TIMER before checking for
7154 si_code < 0.
7155
fa1bd1e4
JB
71562010-09-13 Joel Brobecker <brobecker@adacore.com>
7157
7158 * lynx-i386-low.c: New file.
7159 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7160
47fac8f8
JB
71612010-09-13 Joel Brobecker <brobecker@adacore.com>
7162
7163 * lynx-low.c (ptrace_request_to_str): Remove handling for
7164 request values that have been removed in LynxOS 5.x.
7165
1adfc54d
JB
71662010-09-13 Joel Brobecker <brobecker@adacore.com>
7167
7168 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7169 <ptrace.h>
7170
c2a66c29
NS
71712010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7172
7173 * configure.ac: Add --enable-inprocess-agent option.
7174 * configure: Rebuilt.
7175
32fcada3
YQ
71762010-09-06 Yao Qi <yao@codesourcery.com>
7177
7178 * linux-low.c (linux_kill): Remove unused variable.
7179 (linux_stabilize_threads): Likewise.
7180 * server.c (start_inferior): Likewise.
7181 (queue_stop_reply_callback): Likewise.
7182 * tracepoint.c (do_action_at_tracepoint): Likewise.
7183
0cccb683
YQ
71842010-09-06 Yao Qi <yao@codesourcery.com>
7185
7186 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7187 on return.
7188
423ec54c
JK
71892010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7190
7191 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7192
12ac6819
PA
71932010-09-06 Pedro Alves <pedro@codesourcery.com>
7194
7195 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7196 "$(IPA_DEPFILES)".
7197
8ed54b31
JB
71982010-09-01 Joel Brobecker <brobecker@adacore.com>
7199
7200 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7201 gdbserver/lynx-ppc-low.c: New files.
7202 * Makefile.in (lynx_low_h): New variable.
7203 (lynx-low.o, lynx-ppc-low.o): New rules.
7204 * configure.ac: On LynxOS, link with -lnetinet.
7205 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7206 * configure: regenerate.
7207
bb0116a4
JB
72082010-09-01 Joel Brobecker <brobecker@adacore.com>
7209
7210 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7211 * configure.ac: Add check for vasprintf and vsnprintf.
7212 * configure, config.in: Regenerate.
7213 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7214
a778ab81 72152010-09-01 Joel Brobecker <brobecker@adacore.com>
7216
7217 * gdbreplay.c: Move include of alloca.h up, next to include of
7218 malloc.h.
7219 * server.h: Add include of malloc.h.
7220 * mem-break.c: Remove include of malloc.h.
7221 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7222
8b034a19 72232010-09-01 Joel Brobecker <brobecker@adacore.com>
7224
7225 * Makefile.in (memmem.o): Build with -Wno-error.
7226
72272010-09-01 Joel Brobecker <brobecker@adacore.com>
7228
7229 * utils.c (xsnprintf): Make non-static.
7230 * server.h: Add xsnprintf declaration.
7231 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7232 replace calls to snprintf by calls to xsnprintf throughout.
7233
72342010-09-01 Joel Brobecker <brobecker@adacore.com>
7235
7236 * configure.ac: Add configure check for alloca.
7237 * configure, config.in: Regenerate.
7238 * server.h: Include alloca.h if it exists.
7239 * gdbreplay.c: Include alloca.h if it exists.
7240
1a981360
PA
72412010-08-28 Pedro Alves <pedro@codesourcery.com>
7242
7243 * linux-low.c (__SIGRTMIN): Define if not already defined.
7244 (linux_create_inferior): Check for __ANDROID__ rather than
7245 __SIGRTMIN.
7246 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7247 are already deferred.
7248 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7249 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7250 stopped and already has a pending signal to report.
7251 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7252 a pending signal to report or is moving out of a jump pad.
7253 (linux_init_signals): Check for __ANDROID__ rather than
7254 __SIGRTMIN.
7255
b4d51a55
PA
72562010-08-28 Pedro Alves <pedro@codesourcery.com>
7257
7258 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7259 debug_threads check. Avoid a linear search when not doing debug
7260 output.
7261
ec48365d
PA
72622010-08-27 Pedro Alves <pedro@codesourcery.com>
7263
7264 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7265 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7266 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7267 (process_event): Change local fd's type to gdb_fildes_t.
7268 (create_file_handler): Adjust prototype.
7269 (delete_file_handler): Adjust prototype.
7270 (handle_file_event): Adjust prototype. Use pfildes.
7271 (create_file_event): Adjsut prototype.
7272 * remote-utils.c (remote_desc, listen_desc): Change type to
7273 gdb_fildes_t.
7274 * server.h: New gdb_fildes_t typedef.
7275 [USE_WIN32API]: Include winsock2.h.
7276 (delete_file_handler, add_file_handler): Adjust prototypes.
7277 (pfildes): Declare.
7278 * utils.c (pfildes): New.
7279
854d88f0
PA
72802010-08-27 Pedro Alves <pedro@codesourcery.com>
7281
7282 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7283 * configure: Regenerate.
7284
0146f85b
PA
72852010-08-27 Pedro Alves <pedro@codesourcery.com>
7286
7287 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7288 (linux_done_accessing_memory): ... this.
7289 (linux_target_ops): Adjust.
7290 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7291 * nto-low.c (nto_target_ops): Adjust comment.
7292 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7293 * spu-low.c (spu_target_ops): Adjust comment.
7294 * target.h (target_ops): Rename unprepare_to_access_memory field
7295 to done_accessing_memory.
7296 (unprepare_to_access_memory): Rename to ...
7297 (done_accessing_memory): ... this.
7298
90d74c30
PA
72992010-08-26 Pedro Alves <pedro@codesourcery.com>
7300
7301 * linux-low.c (linux_prepare_to_access_memory): New.
7302 (linux_unprepare_to_access_memory): New.
7303 (linux_target_ops): Install them.
7304 * server.c (read_memory): Rename to ...
7305 (gdb_read_memory): ... this. Use
7306 prepare_to_access_memory/prepare_to_access_memory.
7307 (write_memory): Rename to ...
7308 (gdb_write_memory): ... this. Use
7309 prepare_to_access_memory/prepare_to_access_memory.
7310 (handle_search_memory_1): Adjust.
7311 (process_serial_event): Adjust.
7312 * target.h (struct target_ops): New fields
7313 prepare_to_access_memory and unprepare_to_access_memory.
7314 (prepare_to_access_memory, unprepare_to_access_memory): New.
7315 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7316 prepare_to_access_memory/prepare_to_access_memory.
7317 * nto-low.c (nto_target_ops): Adjust.
7318 * spu-low.c (spu_target_ops): Adjust.
7319 * win32-low.c (win32_target_ops): Adjust.
7320
fd467969
PA
73212010-08-26 Pedro Alves <pedro@codesourcery.com>
7322
7323 * Makefile.in (WARN_CFLAGS): Get it from configure.
7324 (WERROR_CFLAGS): New.
7325 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7326 * configure.ac: Introduce --enable-werror, which adds -Werror to
7327 the compiler command line. Enabled by default. Disable with
7328 --disable-werror. Add -Wdeclaration-after-statement
7329 Wpointer-arith and -Wformat-nonliteral to warning flags.
7330 * configure: Regenerate.
7331
331e2f5f
PA
73322010-08-26 Pedro Alves <pedro@codesourcery.com>
7333
7334 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7335
e581f2b4
PA
73362010-08-26 Pedro Alves <pedro@codesourcery.com>
7337
7338 * gdbreplay.c (remote_error): New.
7339 (gdbchar): New.
7340 (expect): Use gdbchar. Check for error reading from GDB.
7341 Clarify sync error output.
7342 (play): Check for errors writing to GDB.
7343 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7344 * remote-utils.c (getpkt): Check for errors writing to the remote
7345 descriptor.
7346
3c11dd79
PA
73472010-08-25 Pedro Alves <pedro@codesourcery.com>
7348
7349 * linux-low.c (linux_wait_1): Move non-debugging code out of
7350 `debug_threads' control.
7351
d20a8ad9
PA
73522010-08-25 Pedro Alves <pedro@codesourcery.com>
7353
7354 * linux-low.c (linux_wait_1): Don't set last_status here.
7355 * server.c (push_event, queue_stop_reply_callback): Assert we're
7356 not pushing a TARGET_WAITKIND_IGNORE event.
7357 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7358 (myresume, handle_target_event): Set the thread's last_resume_kind
7359 and last_status from the target returned status.
7360
964e4306
PA
73612010-08-25 Pedro Alves <pedro@codesourcery.com>
7362
7363 PR threads/10729
7364
7365 * linux-x86-low.c (update_debug_registers_callback): New.
7366 (i386_dr_low_set_addr): Use it.
7367 (i386_dr_low_get_addr): New.
7368 (i386_dr_low_set_control): Use update_debug_registers_callback.
7369 (i386_dr_low_get_control): New.
7370 (i386_dr_low_get_status): Adjust.
7371 * linux-low.c (linux_stop_lwp): New.
7372 * linux-low.h (linux_stop_lwp): Declare.
7373
7374 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7375 argument instead of a i386_debug_reg_state.
7376 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7377 a i386_debug_reg_state.
7378 (i386_insert_aligned_watchpoint): Adjust.
7379 (i386_remove_aligned_watchpoint): Adjust.
7380 (i386_low_stopped_data_address): Read the debug registers from the
7381 inferior instead of from the mirrors.
7382 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7383 (i386_dr_low_get_addr): Declare.
7384 (i386_dr_low_get_control): Declare.
7385 (i386_dr_low_get_status): Change prototype.
7386
7387 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7388 (i386_dr_low_get_addr): New.
7389 (i386_dr_low_get_control): New.
7390 (i386_dr_low_get_status): Adjust prototype. Return
7391 dr_status_mirror.
7392 (i386_initial_stuff): Clear dr_status_mirror and
7393 dr_control_mirror.
7394 (i386_get_thread_context): Adjust.
7395 (i386_set_thread_context): Adjust.
7396 (i386_thread_added): Adjust.
7397
5f21a75b
PA
73982010-08-24 Pedro Alves <pedro@codesourcery.com>
7399
7400 * linux-low.h (linux_thread_area): Delete declaration.
7401
3e4c1235
TS
74022010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7403
7404 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7405 after its termination.
7406
1971b033
PA
74072010-08-09 Pedro Alves <pedro@codesourcery.com>
7408
7409 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7410 (gdb_wants_all_stopped): Delete.
7411 (linux_wait_1): Don't call them.
7412 * server.c (handle_v_cont): Tag all threads as want-stopped.
7413 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7414 stopped as "client-wants-stopped".
7415
310444ac
PA
74162010-07-31 Pedro Alves <pedro@codesourcery.com>
7417
7418 * Makefile.in (signals_h): New.
7419 (server_h): Depend on it.
7420 (server.o): Don't depend on $(signals_def).
7421 (signals.o): Depend on $(signals_def).
7422
a19cae16
JK
74232010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7424
7425 * Makefile.in (signals_def): New.
7426 (server_h): Append include/gdb/signals.h and signals_def.
7427 (server.o): Append signals_def.
7428
30d50328
JK
74292010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7430
7431 * server.c (handle_target_event): Use target_signal_to_host for
7432 resume_info.sig initialization.
7433 * target.h (struct thread_resume) <sig>: New comment.
7434
5c3216e2
OS
74352010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7436
c6f46ca0
OS
7437 * server.c (handle_query): strcpy() the returned string from paddress()
7438 instead of sprintf().
5c3216e2
OS
7439 * utils.c (paddress): Return phex_nz().
7440
6bd31874
JB
74412010-07-07 Joel Brobecker <brobecker@adacore.com>
7442
7443 * server.c (handle_v_cont): Call mourn_inferior if process
7444 just exited.
7445 (myresume): Likewise.
7446
0fb4aa4b
PA
74472010-07-01 Pedro Alves <pedro@codesourcery.com>
7448
7449 Static tracepoints, and integration with UST.
7450
7451 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7452 * mem-break.c (uninsert_all_breakpoints)
7453 (reinsert_all_breakpoints): New.
7454 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7455 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7456 (gdb_agent_ust_loaded, helper_thread_id)
7457 (gdb_agent_helper_thread_id): New macros.
7458 (struct ipa_sym_addresses): Add addr_ust_loaded,
7459 addr_helper_thread_id, addr_cmd_buf.
7460 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7461 (in_process_agent_loaded_ust): New.
7462 (write_e_ust_not_loaded): New.
7463 (maybe_write_ipa_ust_not_loaded): New.
7464 (struct collect_static_trace_data_action): New.
7465 (enum tracepoint_type) <static_tracepoint>: New.
7466 (struct tracepoint) <handle>: Mention static tracepoints.
7467 (struct static_tracepoint_ctx): New.
7468 (CMD_BUF_SIZE): New.
7469 (add_tracepoint_action): Handle static tracepoint actions.
7470 (unprobe_marker_at): New.
7471 (clear_installed_tracepoints): Handle static tracepoints.
7472 (cmd_qtdp): Handle static tracepoints.
7473 (probe_marker_at): New.
7474 (cmd_qtstart): Handle static tracepoints.
7475 (response_tracepoint): Handle static tracepoints.
7476 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7477 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7478 (get_context_regcache): Handle static tracepoints.
7479 (do_action_at_tracepoint): Handle static tracepoint actions.
7480 (traceframe_find_block_type): Handle static trace data blocks.
7481 (traceframe_read_sdata): New.
7482 (download_tracepoints): Download static tracepoint actions.
7483 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7484 (GDB_PROBE_NAME): New.
7485 (ust_ops): New.
7486 (GET_UST_SYM): New.
7487 (USTF): New.
7488 (dlsym_ust): New.
7489 (ust_marker_to_static_tracepoint): New.
7490 (gdb_probe): New.
7491 (collect_ust_data_at_tracepoint): New.
7492 (gdb_ust_probe): New.
7493 (UNIX_PATH_MAX, SOCK_DIR): New.
7494 (gdb_ust_connect_sync_socket): New.
7495 (resume_thread, stop_thread): New.
7496 (run_inferior_command): New.
7497 (init_named_socket): New.
7498 (gdb_ust_socket_init): New.
7499 (cstr_to_hexstr): New.
7500 (next_st): New.
7501 (first_marker, next_marker): New.
7502 (response_ust_marker): New.
7503 (cmd_qtfstm, cmd_qtsstm): New.
7504 (unprobe_marker_at, probe_marker_at): New.
7505 (cmd_qtstmat, gdb_ust_thread): New.
7506 (gdb_ust_init): New.
7507 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7508 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7509 (ST_REGENTRY): New.
7510 (x86_64_st_collect_regmap): New.
7511 (X86_64_NUM_ST_COLLECT_GREGS): New.
7512 (AMD64_RIP_REGNUM): New.
7513 (supply_static_tracepoint_registers): New.
7514 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7515 (ST_REGENTRY): New.
7516 (i386_st_collect_regmap): New.
7517 (i386_NUM_ST_COLLECT_GREGS): New.
7518 (supply_static_tracepoint_registers): New.
7519 * server.c (handle_query): Handle qXfer:statictrace:read.
7520 <qSupported>: Report support for StaticTracepoints, and
7521 qXfer:statictrace:read features.
7522 * server.h (traceframe_read_sdata)
7523 (supply_static_tracepoint_registers): Declare.
7524 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7525 (unpack_varlen_hex): Include in IPA build.
7526 * Makefile.in (ustlibs, ustinc): New.
7527 (IPA_OBJS): Add remote-utils-ipa.o.
7528 ($(IPA_LIB)): Link -ldl and -lpthread.
7529 (UST_CFLAGS): New.
7530 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7531 * config.in, configure: Regenerate.
7532
9e4344e5
PA
75332010-06-20 Ian Lance Taylor <iant@google.com>
7534 Pedro Alves <pedro@codesourcery.com>
7535
7536 * linux-x86-low.c (always_true): Delete.
7537 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7538 trying to fool the compiler with always_true.
7539
c6beb2cb
PA
75402010-06-20 Pedro Alves <pedro@codesourcery.com>
7541
7542 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7543 conditions in gdbserver.
7544
d2ed6730
UW
75452010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7546
7547 * spu-low.c (spu_read_memory): Wrap around local store limit.
7548 (spu_write_memory): Likewise.
7549
4e29fb54
PA
75502010-06-15 Pedro Alves <pedro@codesourcery.com>
7551
7552 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7553 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7554 LONGEST uses.
7555 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7556 uses.
7557 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7558 uses with LONGEST uses.
7559
6a271cae
PA
75602010-06-14 Stan Shebs <stan@codesourcery.com>
7561 Pedro Alves <pedro@codesourcery.com>
7562
7563 Bytecode compiler.
7564
7565 * linux-x86-low.c: Include limits.h.
7566 (add_insns): New.
7567 (always_true): New.
7568 (EMIT_ASM): New.
7569 (EMIT_ASM32): New.
7570 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7571 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7572 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7573 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7574 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7575 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7576 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7577 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7578 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7579 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7580 (amd64_emit_void_call_2): New.
7581 (amd64_emit_ops): New.
7582 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7583 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7584 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7585 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7586 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7587 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7588 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7589 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7590 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7591 (i386_emit_stack_adjust, i386_emit_int_call_1)
7592 (i386_emit_void_call_2): New.
7593 (i386_emit_ops): New.
7594 (x86_emit_ops): New.
7595 (the_low_target): Install x86_emit_ops.
7596 * server.h (struct emit_ops): New.
7597 (get_raw_reg_func_addr): Declare.
7598 (current_insn_ptr, emit_error): Declare.
7599 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7600 (set_trace_state_variable_value): New defines.
7601 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7602 addr_get_trace_state_variable_value and
7603 addr_set_trace_state_variable_value.
7604 (symbol_list): New fields for get_raw_reg,
7605 get_trace_state_variable_value and set_trace_state_variable_value.
7606 (condfn): New typedef.
7607 (struct tracepoint): New field `compiled_cond'.
7608 (do_action_at_tracepoint): Clear compiled_cond.
7609 (get_trace_state_variable_value, set_trace_state_variable_value):
7610 Export in the IPA.
7611 (condition_true_at_tracepoint): If there's a compiled condition,
7612 run that.
7613 (current_insn_ptr, emit_error): New globals.
7614 (struct bytecode_address): New.
7615 (get_raw_reg_func_addr): New.
7616 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7617 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7618 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7619 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7620 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7621 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7622 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7623 (compile_tracepoint_condition, compile_bytecodes): New.
7624 * target.h (emit_ops): Forward declare.
7625 (struct target_ops): New field emit_ops.
7626 (target_emit_ops): New.
7627 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7628 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7629 * linux-low.c (linux_emit_ops): New.
7630 (linux_target_ops): Install it.
7631 * linux-low.h (struct linux_target_ops): New field emit_ops.
7632
92b72907
UW
76332010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7634
7635 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7636 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7637
fa593d66
PA
76382010-06-01 Pedro Alves <pedro@codesourcery.com>
7639 Stan Shebs <stan@codesourcery.com>
7640
7641 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7642 (all): Depend on $(extra_libraries).
7643 (install-only): Install the IPA.
7644 (IPA_OBJS, IPA_LIB): New.
7645 (clean): Remove the IPA lib.
7646 (IPAGENT_CFLAGS): New.
7647 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7648 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7649 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7650 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7651 * configure.ac: Check for atomic builtins support in the compiler.
7652 (IPA_DEPFILES, extra_libraries): Define.
7653 * configure.srv (ipa_obj): Add description.
7654 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7655 (i[34567]86-*-linux*): Set ipa_obj.
7656 (x86_64-*-linux*): Set ipa_obj.
7657 * linux-low.c (stabilizing_threads): New.
7658 (supports_fast_tracepoints): New.
7659 (linux_detach): Stabilize threads before detaching.
7660 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7661 the lwp is either not stabilizing, or is moving out of a jump pad.
7662 (linux_fast_tracepoint_collecting): New.
7663 (maybe_move_out_of_jump_pad): New.
7664 (enqueue_one_deferred_signal): New.
7665 (dequeue_one_deferred_signal): New.
7666 (linux_wait_for_event_1): If moving out of a jump pad, defer
7667 pending signals to later.
7668 (linux_stabilize_threads): New.
7669 (linux_wait_1): Check if threads need moving out of jump pads, and
7670 do it if so.
7671 (stuck_in_jump_pad_callback): New.
7672 (move_out_of_jump_pad_callback): New.
7673 (lwp_running): New.
7674 (linux_resume_one_lwp): Handle moving out of jump pads.
7675 (linux_set_resume_request): Dequeue deferred signals.
7676 (need_step_over_p): Also step over fast tracepoint jumps.
7677 (start_step_over): Also uninsert fast tracepoint jumps.
7678 (finish_step_over): Also reinsert fast tracepoint jumps.
7679 (linux_install_fast_tracepoint_jump): New.
7680 (linux_target_ops): Install linux_stabilize_threads and
7681 linux_install_fast_tracepoint_jump_pad.
7682 * linux-low.h (linux_target_ops) <get_thread_area,
7683 install_fast_tracepoint_jump_pad>: New fields.
7684 (struct lwp_info) <collecting_fast_tracepoint,
7685 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7686 (linux_get_thread_area): Declare.
7687 * linux-x86-low.c (jump_insn): New.
7688 (x86_get_thread_area): New.
7689 (append_insns): New.
7690 (push_opcode): New.
7691 (amd64_install_fast_tracepoint_jump_pad): New.
7692 (i386_install_fast_tracepoint_jump_pad): New.
7693 (x86_install_fast_tracepoint_jump_pad): New.
7694 (the_low_target): Install x86_get_thread_area and
7695 x86_install_fast_tracepoint_jump_pad.
7696 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7697 (struct fast_tracepoint_jump): New.
7698 (fast_tracepoint_jump_insn): New.
7699 (fast_tracepoint_jump_shadow): New.
7700 (find_fast_tracepoint_jump_at): New.
7701 (fast_tracepoint_jump_here): New.
7702 (delete_fast_tracepoint_jump): New.
7703 (set_fast_tracepoint_jump): New.
7704 (uninsert_fast_tracepoint_jumps_at): New.
7705 (reinsert_fast_tracepoint_jumps_at): New.
7706 (set_breakpoint_at): Use write_inferior_memory.
7707 (uninsert_raw_breakpoint): Use write_inferior_memory.
7708 (check_mem_read): Mask out fast tracepoint jumps.
7709 (check_mem_write): Mask out fast tracepoint jumps.
7710 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7711 (set_fast_tracepoint_jump): Declare.
7712 (delete_fast_tracepoint_jump)
7713 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7714 (reinsert_fast_tracepoint_jumps_at): Declare.
7715 * regcache.c: Don't compile many functions when building the
7716 in-process agent library.
7717 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7718 the register buffer in the heap.
7719 (free_register_cache): If the register buffer isn't owned by the
7720 regcache, don't free it.
7721 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7722 pre-existing register caches.
7723 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7724 type.
7725 (convert_ascii_to_int): : Constify `from' parameter type.
7726 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7727 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7728 the needed buffer in-place.
7729 (relocate_instruction): New.
7730 * server.c (handle_query) <qSymbols>: If the target supports
7731 tracepoints, give it a chance of looking up symbols. Report
7732 support for fast tracepoints.
7733 (handle_status): Stabilize threads.
7734 (process_serial_event): Adjust.
7735 * server.h (struct fast_tracepoint_jump): Forward declare.
7736 (struct process_info) <fast_tracepoint_jumps>: New field.
7737 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7738 (decode_X_packet, decode_M_packet): Adjust.
7739 (relocate_instruction): Declare.
7740 (in_process_agent_loaded): Declare.
7741 (tracepoint_look_up_symbols): Declare.
7742 (struct fast_tpoint_collect_status): Declare.
7743 (fast_tracepoint_collecting): Declare.
7744 (force_unlock_trace_buffer): Declare.
7745 (handle_tracepoint_bkpts): Declare.
7746 (initialize_low_tracepoint)
7747 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7748 * target.h (struct target_ops) <stabilize_threads,
7749 install_fast_tracepoint_jump_pad>: New fields.
7750 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7751 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7752 [HAVE_STDINT_H]: Include stdint.h.
7753 (trace_debug_1): Rename to ...
7754 (trace_vdebug): ... this.
7755 (trace_debug): Rename to ...
7756 (trace_debug_1): ... this. Add `level' parameter.
7757 (trace_debug): New.
7758 (ATTR_USED, ATTR_NOINLINE): New.
7759 (IP_AGENT_EXPORT): New.
7760 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7761 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7762 (about_to_request_buffer_space, trace_buffer_is_full)
7763 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7764 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7765 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7766 (traceframe_write_count, traceframes_created)
7767 (trace_state_variables)
7768 New renaming defines.
7769 (struct ipa_sym_addresses): New.
7770 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7771 (symbol_list): New.
7772 (ipa_sym_addrs): New.
7773 (all_tracepoint_symbols_looked_up): New.
7774 (in_process_agent_loaded): New.
7775 (write_e_ipa_not_loaded): New.
7776 (maybe_write_ipa_not_loaded): New.
7777 (tracepoint_look_up_symbols): New.
7778 (debug_threads) [IN_PROCESS_AGENT]: New.
7779 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7780 (UNKNOWN_SIDE_EFFECTS): New.
7781 (stop_tracing): New.
7782 (flush_trace_buffer): New.
7783 (stop_tracing_bkpt): New.
7784 (flush_trace_buffer_bkpt): New.
7785 (read_inferior_integer): New.
7786 (read_inferior_uinteger): New.
7787 (read_inferior_data_pointer): New.
7788 (write_inferior_data_pointer): New.
7789 (write_inferior_integer): New.
7790 (write_inferior_uinteger): New.
7791 (struct collect_static_trace_data_action): Delete.
7792 (enum tracepoint_type): New.
7793 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
7794 <actions_str, step_actions, step_actions_str>: Only include in
7795 GDBserver.
fa593d66
PA
7796 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7797 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7798 (tracepoints): Use IP_AGENT_EXPORT.
7799 (last_tracepoint): Don't include in the IPA.
7800 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7801 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7802 (alloced_trace_state_variables): New.
7803 (trace_state_variables): Use IP_AGENT_EXPORT.
7804 (traceframe_t): Delete unused variable.
7805 (circular_trace_buffer): Don't include in the IPA.
7806 (trace_buffer_start): Delete.
7807 (struct trace_buffer_control): New.
7808 (trace_buffer_free): Delete.
7809 (struct ipa_trace_buffer_control): New.
7810 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7811 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7812 New.
7813 (trace_buffer_ctrl): New.
7814 (TRACE_BUFFER_CTRL_CURR): New.
7815 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7816 Reimplement as macros.
7817 (trace_buffer_wrap): Delete.
7818 (traceframe_write_count, traceframe_read_count)
7819 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7820 (struct tracepoint_hit_ctx) <type>: New field.
7821 (struct fast_tracepoint_ctx): New.
7822 (memory_barrier): New.
7823 (cmpxchg): New.
7824 (record_tracepoint_error): Update atomically in the IPA.
7825 (clear_inferior_trace_buffer): New.
7826 (about_to_request_buffer_space): New.
7827 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7828 updating the same buffer.
7829 (add_tracepoint): Default the tracepoint's type to trap
7830 tracepoint, and orig_size to -1.
7831 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7832 internal variables.
7833 (create_trace_state_variable): New parameter `gdb'. Handle it.
7834 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7835 (cmd_qtdp): Handle fast tracepoints.
7836 (cmd_qtdv): Adjust.
7837 (max_jump_pad_size): New.
7838 (gdb_jump_pad_head): New.
7839 (get_jump_space_head): New.
7840 (claim_jump_space): New.
7841 (sort_tracepoints): New.
7842 (MAX_JUMP_SIZE): New.
7843 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7844 IPA.
7845 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7846 support. Upload fast traceframes, and delete internal IPA
7847 breakpoints.
7848 (stop_tracing_handler): New.
7849 (flush_trace_buffer_handler): New.
7850 (cmd_qtstop): Upload fast tracepoints.
7851 (response_tracepoint): Handle fast tracepoints.
7852 (tracepoint_finished_step): Upload fast traceframes. Set the
7853 tracepoint hit context's tracepoint type.
7854 (handle_tracepoint_bkpts): New.
7855 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7856 type. Add comment about fast tracepoints.
7857 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7858 non-existing action_str field.
7859 (get_context_regcache): Handle fast tracepoints.
7860 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7861 to the regcache.
7862 (fast_tracepoint_from_jump_pad_address): New.
7863 (fast_tracepoint_from_ipa_tpoint_address): New.
7864 (collecting_t): New.
7865 (force_unlock_trace_buffer): New.
7866 (fast_tracepoint_collecting): New.
7867 (collecting): New.
7868 (gdb_collect): New.
7869 (write_inferior_data_ptr): New.
7870 (target_tp_heap): New.
7871 (target_malloc): New.
7872 (download_agent_expr): New.
7873 (UALIGN): New.
7874 (download_tracepoints): New.
7875 (download_trace_state_variables): New.
7876 (upload_fast_traceframes): New.
7877 (IPA_FIRST_TRACEFRAME): New.
7878 (IPA_NEXT_TRACEFRAME_1): New.
7879 (IPA_NEXT_TRACEFRAME): New.
7880 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7881 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7882 (gdb_jump_pad_buffer_end): New.
7883 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7884 (initialize_tracepoint): Adjust.
7885 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7886 buffer. Initialize the low module.
7887 * utils.c (PREFIX, TOOLNAME): New.
7888 (malloc_failure): Use PREFIX.
7889 (error): In the IPA, an error causes an exit.
7890 (fatal, warning): Use PREFIX.
7891 (internal_error): Use TOOLNAME.
7892 (NUMCELLS): Increase to 10.
7893 * configure, config.in: Regenerate.
7894
d149dd1d
PA
78952010-06-01 Pedro Alves <pedro@codesourcery.com>
7896
7897 * server.c (handle_query) <qSupported>: Do two passes over the
7898 qSupported string to avoid nesting strtok.
7899
f6528abd
JK
79002010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7901
7902 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7903 (CDEPS): New.
7904 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7905 -Wl,--dynamic-list.
7906 * configure: Regenerate.
7907 * proc-service.list: New.
7908
ca2a87a0
JK
79092010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7910
7911 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7912 New comment.
7913
363a6e9f
OS
79142010-05-26 Ozkan Sezer <sezeroz@gmail.com>
7915
7916 * gdbreplay.c (remote_open): Check error return from socket() call by
7917 its equality to -1 not by it being negative.
7918 * remote-utils.c (remote_open): Likewise.
7919
d23b6cb1
PA
79202010-05-23 Pedro Alves <pedro@codesourcery.com>
7921
7922 * config.h: Regenerate.
7923
28d3cf85
MK
79242010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7925
7926 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7927 doesn't provide PTRACE_GET_THREAD_AREA.
7928
fea36a59
MK
79292010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7930
7931 * linux-m68k-low.c: Include <asm/ptrace.h>
7932 (ps_get_thread_area): Implement.
7933
24b066ba
DE
79342010-05-03 Doug Evans <dje@google.com>
7935
7936 * event-loop.c (struct callback_event): New struct.
7937 (callback_list): New global.
7938 (append_callback_event, delete_callback_event): New functions.
7939 (process_callback): New function.
7940 (start_event_loop): Call it.
7941 * remote-utils.c (NOT_SCHEDULED): Define.
7942 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
7943 moved out of readchar.
7944 (readchar): Rewrite. Call reschedule before returning.
7945 (reset_readchar): New function.
7946 (remote_close): Call it.
7947 (process_remaining, reschedule): New functions.
7948 * server.h (callback_handler_func): New typedef.
7949 (append_callback_event, delete_callback_event): Declare.
7950
9836d6ea
PA
79512010-05-03 Pedro Alves <pedro@codesourcery.com>
7952
7953 * proc-service.c (ps_pglobal_lookup): Use
7954 thread_db_look_up_one_symbol.
7955 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
7956 parameter. Use it instead of all_symbols_looked_up.
7957 * server.h (struct process_info) <all_symbols_looked_up>: Delete
7958 field.
7959 (all_symbols_looked_up): Don't declare.
7960 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
7961 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
7962 field.
7963 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
7964 Set all_symbols_looked_up here.
7965 (thread_db_look_up_one_symbol): New.
7966 (thread_db_get_tls_address): Adjust.
7967 (thread_db_load_search, try_thread_db_load_1): Always allocate the
7968 thread_db object on the heap, and tentatively set it in the
7969 process structure.
7970 (thread_db_init): Don't set all_symbols_looked_up here.
7971 * linux-low.h (thread_db_look_up_one_symbol): Declare.
7972
7984d532
PA
79732010-05-03 Pedro Alves <pedro@codesourcery.com>
7974
7975 * linux-low.c (linux_kill, linux_detach): Adjust.
7976 (status_pending_p_callback): Remove redundant statement. Check
7977 for !TARGET_WAITIKIND_IGNORE, instead of
7978 TARGET_WAITKIND_STOPPED.
7979 (handle_tracepoints): Make sure LWP is locked. Adjust.
7980 (linux_wait_for_event_1): Adjust.
7981 (linux_cancel_breakpoints): New.
7982 (unsuspend_one_lwp): New.
7983 (unsuspend_all_lwps): New.
7984 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
7985 (send_sigstop_callback): Change return type to int, add new
7986 `except' parameter and handle it.
7987 (suspend_and_send_sigstop_callback): New.
7988 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
7989 pass them down. If SUSPEND, also increment the lwp's suspend
7990 count.
7991 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
7992 (need_step_over_p): Don't consider suspended LWPs.
7993 (start_step_over): Adjust.
7994 (proceed_one_lwp): Change return type to int, add new `except'
7995 parameter and handle it.
7996 (unsuspend_and_proceed_one_lwp): New.
7997 (proceed_all_lwps): Use find_inferior instead of
7998 for_each_inferior.
7999 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8000 also decrement the suspend count of LWPs. Pass `except' down,
8001 instead of hacking its suspend count.
8002 (linux_pause_all): Add `freeze' parameter. Adjust.
8003 (linux_unpause_all): New.
8004 (linux_target_ops): Install linux_unpause_all.
8005 * server.c (handle_status): Adjust.
8006 * target.h (struct target_ops): New fields `unpause_all' and
8007 `cancel_breakpoints'. Add new parameter to `pause_all'.
8008 (pause_all): Add new `freeze' parameter.
8009 (unpause_all): New.
8010 (cancel_breakpoints): New.
8011 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8012 cancel breakpoints.
8013 (cmd_qtstart): Pause threads.
8014 (stop_tracing): Pause threads, and cancel breakpoints.
8015 * win32-low.c (win32_target_ops): Adjust.
8016
e471f25b
PA
80172010-05-03 Pedro Alves <pedro@codesourcery.com>
8018
8019 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8020 the inferior right away from here...
8021 (linux_wait_1): ... to here, and adjust to check the thread's
8022 last_resume_kind instead of the lwp's step or stop_expected flags.
8023
1915ef4f
PA
80242010-05-02 Pedro Alves <pedro@codesourcery.com>
8025
8026 * README: Use consistent `GDB' and `GDBserver' spellings.
8027
f9e39928
PA
80282010-05-02 Pedro Alves <pedro@codesourcery.com>
8029
8030 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8031 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8032 (linux_detach_one_lwp): Assume the lwp is stopped.
8033 (any_thread_of): Delete.
8034 (linux_detach): Stop all lwps here. Don't blindly delete all
8035 breakpoints.
8036 (delete_lwp_callback): New.
8037 (linux_mourn): Delete all lwps of the process that is gone.
8038 (linux_wait_1): Don't delete the last lwp of the process here.
8039 * mem-break.h (mark_breakpoints_out): Declare.
8040 * mem-break.c (mark_breakpoints_out): New.
8041 (free_all_breakpoints): Use it.
8042 * server.c (handle_target_event): If the process is gone, mark
8043 breakpoints out.
8044 * thread-db.c (struct thread_db) <create_bp>: New field.
8045 (thread_db_enable_reporting): Fix prototype. Store a thread event
8046 breakpoint reference in the thread_db struct.
8047 (thread_db_load_search): Clear the thread_db object.
8048 (try_thread_db_load_1): Ditto.
8049 (switch_to_process): New.
8050 (disable_thread_event_reporting): Use it.
8051 (remove_thread_event_breakpoints): New.
8052 (thread_db_detach, thread_db_mourn): Use it.
8053
1e7fc18c
PA
80542010-05-01 Pedro Alves <pedro@codesourcery.com>
8055
8056 * linux-low.c (linux_enable_event_reporting): New.
8057 (linux_wait_for_event_1, handle_extended_wait): Use it.
8058
02fc4de7
PA
80592010-04-30 Pedro Alves <pedro@codesourcery.com>
8060
8061 * linux-low.c (linux_kill_one_lwp, linux_kill)
8062 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8063 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8064 SIGSTOP even if the LWP is stopped.
8065 (send_sigstop_callback): New.
8066 (stop_all_lwps): Use send_sigstop_callback instead.
8067 (linux_resume_one_thread): Adjust.
8068 (proceed_one_lwp): Still proceed an LWP that the client has
8069 requested to stop, if we haven't reported it as stopped yet. Make
8070 sure that LWPs the client want stopped, have a pending SIGSTOP.
8071
bc3b5632
DE
80722010-04-26 Doug Evans <dje@google.com>
8073
ae1ada35
DE
8074 * server.c (handle_general_set): Make static.
8075
bc3b5632
DE
8076 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8077 Print received char after testing for error/eof instead of before.
8078 (input_interrupt): Tweak comment.
8079
65730243
DE
80802010-04-23 Doug Evans <dje@google.com>
8081
8082 * server.c (start_inferior): Print inferior argv if --debug.
8083
a8ae7dc0
AR
80842010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8085
8086 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8087 * nto-x86-low.c: Include server.h
8088
1c07cc19
PM
80892010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8090
8091 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8092 be consistent with other sources of this directory.
8093 (init_registers_amd64): Correct name of source file of this function
8094 in the comment.
8095
e0a61e09
PM
80962010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8097
8098 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8099 64-bit executables.
8100
54709339
PM
81012010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8102
8103 * win32-i386-low.c: Add 64-bit support.
8104 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8105 (init_registers_amd64): Declare.
8106 (mappings): Add 64-bit version of array.
8107 (init_windows_x86): New function.
8108 (the_low_target): Change init_arch field to init_windows_x86.
8109
e8f0053d
PM
81102010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8111
8112 * win32-low.c: Adapt to support also 64-bit architecture.
8113 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8114 (get_image_name): Use SIZE_T type for local variable `done'.
8115 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8116 (toolhelp_get_dll_name): Idem.
8117 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8118 Use uintptr_t typecast to avoid warning.
8119 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8120 (handle_exception): Use phex_nz to avoid warning.
8121 (win32_wait): Remove unused local variable `process'.
8122
c481e77e
PM
81232010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8124
8125 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8126 `amd64-avx.o'.
8127
12ea4b69
PM
81282010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8129
8130 * configure.ac: Use `ws2_32' library for srv_mingw.
8131 * configure: Regenerate.
8132 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8133 * remote-utils.c: Likewise.
8134
f6d1620c
L
81352010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8136
8137 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8138 if __x86_64__ is defined.
8139
8e642873
PM
81402010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8141
8142 * configure: Regenerate.
8143
711e434b
PM
81442010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8145
8146 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8147 * target.h (target_ops): New get_tib_address field.
8148 * win32-low.h (win32_thread_info): Add thread_local_base field.
8149 * win32-low.c (child_add_thread): Add tlb argument.
8150 Set thread_local_base field to TLB.
8151 (get_child_debug_event): Adapt to child_add_thread change.
8152 (win32_get_tib_address): New function.
8153 (win32_target_ops): Set get_tib_address field to
8154 win32_get_tib_address.
8155 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8156
505106cd
PA
81572010-04-12 Pedro Alves <pedro@codesourcery.com>
8158
505106cd
PA
8159 * linux-low.c (linux_mourn): Also remove the process.
8160 * server.c (handle_target_event): Don't remove the process here.
8161 * nto-low.c (nto_mourn): New.
8162 (nto_target_ops): Install it.
8163 * spu-low.c (spu_mourn): New.
8164 (spu_target_ops): Install it.
8165 * win32-low.c (win32_mourn): New.
8166 (win32_target_ops): Install it.
8167
e8470a06
PA
81682010-04-12 Pedro Alves <pedro@codesourcery.com>
8169
8170 * server.h (buffer_xml_printf): Remove redundant `;'.
8171
45ba0d02
PA
81722010-04-12 Pedro Alves <pedro@codesourcery.com>
8173
8174 * regcache.c (set_register_cache): Invalidate regcaches before
8175 changing the register cache layout.
8176 (regcache_invalidate_one): Allow a NULL regcache.
8177 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8178 regcaches before changing the register cache layout or the target
8179 regsets.
8180
59e04013
L
81812010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8182
8183 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8184 variable warning on Linux/x86-64.
8185
8336d594
PA
81862010-04-11 Pedro Alves <pedro@codesourcery.com>
8187
8188 GDBserver disconnected tracing support.
8189
8190 * linux-low.c (linux_remove_process): Delete.
8191 (add_lwp): Don't set last_resume_kind here.
8192 (linux_kill): Use `mourn'.
8193 (linux_detach): Use `thread_db_detach', and `mourn'.
8194 (linux_mourn): New.
8195 (linux_attach_lwp_1): Adjust comment.
8196 (linux_attach): last_resume_kind moved the thread_info; adjust.
8197 (status_pending_p_callback): Adjust.
8198 (linux_wait_for_event_1): Adjust.
8199 (count_events_callback, select_singlestep_lwp_callback)
8200 (select_event_lwp_callback, cancel_breakpoints_callback)
8201 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8202 (proceed_one_lwp): Adjust.
8203 (linux_async): Add debug output.
8204 (linux_thread_stopped): New.
8205 (linux_pause_all): New.
8206 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8207 linux_pause_all.
8208 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8209 (thread_db_free): Delete declaration.
8210 (thread_db_detach, thread_db_mourn): Declare.
8211 * thread-db.c (thread_db_init): Use thread_db_mourn.
8212 (thread_db_free): Delete, split in two.
8213 (disable_thread_event_reporting): New.
8214 (thread_db_detach): New.
8215 (thread_db_mourn): New.
8216
8217 * server.h (struct thread_info) <last_resume_kind>: New field.
8218 <attached>: Add comment.
8219 <gdb_detached>: New field.
8220 (handler_func): Change return type to int.
8221 (handle_serial_event, handle_target_event): Ditto.
8222 (gdb_connected): Declare.
8223 (tracing): Delete.
8224 (disconnected_tracing): Declare.
8225 (stop_tracing): Declare.
8226
8227 * server.c (handle_query) <qSupported>: Report support for
8228 disconnected tracing.
8229 (queue_stop_reply_callback): Account for running threads.
8230 (gdb_wants_thread_stopped): New.
8231 (gdb_wants_all_threads_stopped): New.
8232 (gdb_reattached_process): New.
8233 (handle_status): Clear the `gdb_detached' flag of all processes.
8234 In all-stop, stop all threads.
8235 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8236 (process_serial_event): If the remote connection breaks, or if an
8237 exit was forced with "monitor exit", force an event loop exit.
8238 Handle disconnected tracing on detach.
8239 (handle_serial_event): Adjust.
8240 (handle_target_event): If GDB isn't connected, forward events back
8241 to the inferior, unless the last process exited, in which case,
8242 exit gdbserver. Adjust interface.
8243
8244 * remote-utils.c (remote_open): Don't block in accept. Instead
8245 register an event loop source on the listen socket file
8246 descriptor. Refactor bits into ...
8247 (listen_desc): ... this new global.
8248 (gdb_connected): ... this new function.
8249 (enable_async_notification): ... this new function.
8250 (handle_accept_event): ... this new function.
8251 (remote_close): Clear remote_desc.
8252
8253 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8254
8255 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8256 New fields.
8257 (mourn_inferior): Define.
8258 (target_process_qsupported): Avoid the dangling else problem.
8259 (thread_stopped): Define.
8260 (pause_all): Define.
8261 (target_waitstatus_to_string): Declare.
8262 * target.c (target_waitstatus_to_string): New.
8263
8264 * tracepoint.c (tracing): Make extern.
8265 (disconnected_tracing): New.
8266 (stop_tracing): Make extern. Handle tracing stops due to GDB
8267 disconnecting.
8268 (cmd_qtdisconnected): New.
8269 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8270 (handle_tracepoint_general_set): Handle QTDisconnected.
8271
8272 * event-loop.c (event_handler_func): Change return type to int.
8273 (process_event): Bail out if the event handler wants the event
8274 loop to stop.
8275 (handle_file_event): Ditto.
8276 (start_event_loop): Bail out if the event handler wants the event
8277 loop to stop.
8278
8279 * nto-low.c (nto_target_ops): Adjust.
8280 * spu-low.c (spu_wait): Don't remove the process here.
8281 (spu_target_ops): Adjust.
8282 * win32-low.c (win32_wait): Don't remove the process here.
8283 (win32_target_ops): Adjust.
8284
5d267c4c
PA
82852010-04-11 Pedro Alves <pedro@codesourcery.com>
8286
8287 * regcache.c (realloc_register_cache): Invalidate inferior's
8288 regcache before recreating it.
8289
623ccd72
PA
82902010-04-09 Pedro Alves <pedro@codesourcery.com>
8291
8292 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8293
219f2f23
PA
82942010-04-09 Stan Shebs <stan@codesourcery.com>
8295 Pedro Alves <pedro@codesourcery.com>
8296
8297 * server.h (LONGEST): New.
8298 (struct thread_info) <while_stepping>: New field.
8299 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8300 Declare.
8301 (initialize_tracepoint, handle_tracepoint_general_set)
8302 (handle_tracepoint_query, tracepoint_finished_step)
8303 (tracepoint_was_hit, release_while_stepping_state_list):
8304 (current_traceframe): Declare.
8305 * server.c (handle_general_set): Handle tracepoint packets.
8306 (read_memory): New.
8307 (write_memory): New.
8308 (handle_search_memory_1): Use read_memory.
8309 (handle_query): Report support for conditional tracepoints, trace
8310 state variables, and tracepoint sources. Handle tracepoint
8311 queries.
8312 (main): Initialize the tracepoints module.
8313 (process_serial_event): Handle traceframe reads/writes.
8314
8315 * linux-low.c (handle_tracepoints): New.
8316 (linux_wait_1): Call it.
8317 (linux_resume_one_lwp): Handle while-stepping.
8318 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8319 (linux_target_ops): Install them.
8320 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8321 New field.
8322 * linux-x86-low.c (x86_supports_tracepoints): New.
8323 (the_low_target). Install it.
8324
8325 * mem-break.h (delete_breakpoint): Declare.
8326 * mem-break.c (delete_breakpoint): Make external.
8327
8328 * target.h (struct target_ops): Add `supports_tracepoints',
8329 `read_pc', and `write_pc' fields.
8330 (target_supports_tracepoints): Define.
8331 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8332 (phex_nz): New.
8333
8334 * regcache.h (struct regcache) <registers_owned>: New field.
8335 (init_register_cache, regcache_cpy): Declare.
8336 (regcache_read_pc, regcache_write_pc): Declare.
8337 (register_cache_size): Declare.
8338 (supply_regblock): Declare.
8339 * regcache.c (init_register_cache): New.
8340 (new_register_cache): Use it.
8341 (regcache_cpy): New.
8342 (register_cache_size): New.
8343 (supply_regblock): New.
8344 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 8345
219f2f23
PA
8346 * tracepoint.c: New.
8347
8348 * Makefile.in (OBS): Add tracepoint.o.
8349 (tracepoint.o): New rule.
8350
3a13a53b
L
83512010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8352
8353 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8354 (i386-mmx.o): New.
8355 (i386-mmx.c): Likewise.
8356 (i386-mmx-linux.o): Likewise.
8357 (i386-mmx-linux.c): Likewise.
8358
8359 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8360 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8361 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8362 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8363
8364 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8365 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8366 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8367
1570b33e
L
83682010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8369
8370 * Makefile.in (clean): Updated.
8371 (i386-avx.o): New.
8372 (i386-avx.c): Likewise.
8373 (i386-avx-linux.o): Likewise.
8374 (i386-avx-linux.c): Likewise.
8375 (amd64-avx.o): Likewise.
8376 (amd64-avx.c): Likewise.
8377 (amd64-avx-linux.o): Likewise.
8378 (amd64-avx-linux.c): Likewise.
8379
8380 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8381 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8382 (srv_amd64_regobj): Add amd64-avx.o.
8383 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8384 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8385 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8386 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8387 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8388 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8389 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8390
8391 * i387-fp.c: Include "i386-xstate.h".
8392 (i387_xsave): New.
8393 (i387_cache_to_xsave): Likewise.
8394 (i387_xsave_to_cache): Likewise.
8395 (x86_xcr0): Likewise.
8396
8397 * i387-fp.h (i387_cache_to_xsave): Likewise.
8398 (i387_xsave_to_cache): Likewise.
8399 (x86_xcr0): Likewise.
8400
8401 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8402 * linux-crisv32-low.c (target_regsets): Likewise.
8403 * linux-m68k-low.c (target_regsets): Likewise.
8404 * linux-mips-low.c (target_regsets): Likewise.
8405 * linux-ppc-low.c (target_regsets): Likewise.
8406 * linux-s390-low.c (target_regsets): Likewise.
8407 * linux-sh-low.c (target_regsets): Likewise.
8408 * linux-sparc-low.c (target_regsets): Likewise.
8409 * linux-xtensa-low.c (target_regsets): Likewise.
8410
8411 * linux-low.c: Include <sys/uio.h>.
8412 (regsets_fetch_inferior_registers): Support nt_type.
8413 (regsets_store_inferior_registers): Likewise.
8414 (linux_process_qsupported): New.
8415 (linux_target_ops): Add linux_process_qsupported.
8416
8417 * linux-low.h (regset_info): Add nt_type.
8418 (linux_target_ops): Add process_qsupported.
8419
8420 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8421 and <sys/uio.h>.
8422 (init_registers_i386_avx_linux): New.
8423 (init_registers_amd64_avx_linux): Likewise.
8424 (xmltarget_i386_linux_no_xml): Likewise.
8425 (xmltarget_amd64_linux_no_xml): Likewise.
8426 (PTRACE_GETREGSET): Likewise.
8427 (PTRACE_SETREGSET): Likewise.
8428 (x86_fill_xstateregset): Likewise.
8429 (x86_store_xstateregset): Likewise.
8430 (use_xml): Likewise.
8431 (x86_linux_update_xmltarget): Likewise.
8432 (x86_linux_process_qsupported): Likewise.
8433 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8434 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8435 init_registers_i386_linux here. Call
8436 x86_linux_update_xmltarget.
8437 (the_low_target): Add x86_linux_process_qsupported.
8438
8439 * server.c (handle_query): Call target_process_qsupported.
8440
8441 * target.h (target_ops): Add process_qsupported.
8442 (target_process_qsupported): New.
8443
fc7238bb
PA
84442010-04-03 Pedro Alves <pedro@codesourcery.com>
8445
8446 * inferiors.c (add_thread): Set last_status kind to
8447 TARGET_WAITKIND_IGNORE.
8448 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8449 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8450 (linux_wait_1): Move `thread' local definition to block that uses
8451 it. Don't NULL initialize `event_child'.
8452 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8453 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8454 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8455
bdabb078
PA
84562010-04-01 Pedro Alves <pedro@codesourcery.com>
8457
8458 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8459 an extended waitstatus, or by a watchpoint.
8460 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8461 thread was stepping or has been stopped by a watchpoint.
8462
d3bbe7a0
PA
84632010-04-01 Pedro Alves <pedro@codesourcery.com>
8464
8465 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8466 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8467 of another, then delete the previous, and validate all
8468 breakpoints.
8469 (validate_inserted_breakpoint): New.
8470 (delete_disabled_breakpoints): New.
8471 (validate_breakpoints): New.
8472 (check_mem_read): Validate breakpoints before trusting their
8473 shadow. Delete disabled breakpoints.
8474 (check_mem_write): Validate breakpoints before trusting they
8475 should be inserted. Delete disabled breakpoints.
8476 * mem-break.h (validate_breakpoints):
8477 * server.c (handle_query): Validate breakpoints when we see a
8478 qSymbol query.
8479
8b07ae33
PA
84802010-04-01 Pedro Alves <pedro@codesourcery.com>
8481
8482 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8483 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8484 if we could tell there's a GDB breakpoint at stop_pc.
8485 (need_step_over_p): Don't do a step over if we find a GDB
8486 breakpoint at the resume PC.
8487
8488 * mem-break.c (struct raw_breakpoint): New.
8489 (enum bkpt_type): New type `gdb_breakpoint'.
8490 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8491 fields. New field `raw'.
8492 (find_raw_breakpoint_at): New.
8493 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8494 breakpoint instead.
8495 (set_breakpoint_at): Adjust.
8496 (delete_raw_breakpoint): New.
8497 (release_breakpoint): New.
8498 (delete_breakpoint): Rename to...
8499 (delete_breakpoint_1): ... this. Add proc parameter. Use
8500 release_breakpoint. Return ENOENT.
8501 (delete_breakpoint): Reimplement.
8502 (find_breakpoint_at): Delete.
8503 (find_gdb_breakpoint_at): New.
8504 (delete_breakpoint_at): Delete.
8505 (set_gdb_breakpoint_at): New.
8506 (delete_gdb_breakpoint_at): New.
8507 (gdb_breakpoint_here): New.
8508 (set_reinsert_breakpoint): Use release_breakpoint.
8509 (uninsert_breakpoint): Rename to ...
8510 (uninsert_raw_breakpoint): ... this.
8511 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8512 (reinsert_raw_breakpoint): Change parameter type to
8513 raw_breakpoint.
8514 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8515 instead.
8516 (check_breakpoints): Adjust. Use release_breakpoint.
8517 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8518 (breakpoint_inserted_here): Ditto.
8519 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8520 Don't trust the breakpoint's shadow if it is not inserted.
8521 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8522 (delete_all_breakpoints): Adjust.
8523 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8524 use delete_breakpoint_1.
8525
8526 * mem-break.h (breakpoints_supported): Delete declaration.
8527 (set_gdb_breakpoint_at): Declare.
8528 (gdb_breakpoint_here): Declare.
8529 (delete_breakpoint_at): Delete.
8530 (delete_gdb_breakpoint_at): Declare.
8531
8532 * server.h (struct raw_breakpoint): Forward declare.
8533 (struct process_info): New field `raw_breakpoints'.
8534
8535 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8536 breakpoints.
8537
6bf5e0ba
PA
85382010-03-24 Pedro Alves <pedro@codesourcery.com>
8539
8540 * linux-low.c (status_pending_p_callback): Fix comment.
8541 (linux_wait_for_event_1): Move most of the internal breakpoint
8542 handling from here...
8543 (linux_wait_1): ... to here.
8544 (count_events_callback): New.
8545 (select_singlestep_lwp_callback): New.
8546 (select_event_lwp_callback): New.
8547 (cancel_breakpoints_callback): New.
8548 (select_event_lwp): New.
8549 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8550 priority to all LWPs that have had events that should be reported
8551 to the client. Cancel breakpoints when about to reporting the
8552 event to the client, not while stopping lwps. No longer cancel
8553 finished single-steps here.
8554 (cancel_finished_single_step): Delete.
8555 (cancel_finished_single_steps): Delete.
8556
414a389f
PA
85572010-03-24 Pedro Alves <pedro@codesourcery.com>
8558
8559 * mem-break.c (enum bkpt_type): New.
8560 (struct breakpoint): New field `type'.
8561 (set_breakpoint_at): Change return type to struct breakpoint
8562 pointer. Set type to `other_breakpoint' by default.
8563 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8564 in the breakpoint list.
8565 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8566 (reinsert_breakpoint): Rename to ...
8567 (reinsert_raw_breakpoint): ... this.
8568 (reinsert_breakpoints_at): Adjust.
8569 * mem-break.h (struct breakpoint): Declare.
8570 (set_breakpoint_at): Change return type to struct breakpoint
8571 pointer.
8572
2280c721
PA
85732010-03-24 Pedro Alves <pedro@codesourcery.com>
8574
8575 * server.c (handle_query): Assign, not compare.
8576
d50171e4
PA
85772010-03-24 Pedro Alves <pedro@codesourcery.com>
8578
8579 Teach linux gdbserver to step-over-breakpoints.
8580
8581 * linux-low.c (can_hardware_single_step): New.
8582 (supports_breakpoints): New.
8583 (handle_extended_wait): If stopping threads, read the stop pc of
8584 the new cloned LWP.
8585 (get_pc): New.
8586 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8587 low target doesn't support retrieving the PC.
8588 (add_lwp): Set last_resume_kind to resume_continue.
8589 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8590 (linux_attach): Don't clear stop_expected. Set the lwp's
8591 last_resume_kind to resume_stop.
8592 (linux_detach_one_lwp): Don't check for removed breakpoints.
8593 (check_removed_breakpoint): Delete.
8594 (status_pending_p): Rename to ...
8595 (status_pending_p_callback): ... this. Don't check for removed
8596 breakpoints. Don't consider threads that are stopped from GDB's
8597 perspective.
8598 (linux_wait_for_lwp): Always read the stop_pc here.
8599 (cancel_breakpoint): New.
8600 (step_over_bkpt): New global.
8601 (linux_wait_for_event_1): Implement stepping over breakpoints.
8602 (gdb_wants_lwp_stopped): New.
8603 (gdb_wants_all_stopped): New.
8604 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8605 single-step traps here. Store the thread's last reported target
8606 wait status.
8607 (send_sigstop): Don't clear stop_expected. Always set it,
8608 instead.
8609 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8610 (cancel_finished_single_step): New.
8611 (cancel_finished_single_steps): New.
8612 (wait_for_sigstop): Don't cancel finished single-step traps here.
8613 (linux_resume_one_lwp): Don't check for removed breakpoints.
8614 Don't set `step' on non-hardware step archs.
8615 (linux_set_resume_request): Ignore resume_stop requests if already
8616 stopping or stopped. Set the lwp's last_resume_kind.
8617 (resume_status_pending_p): Don't check for removed breakpoints.
8618 (need_step_over_p): New.
8619 (start_step_over): New.
8620 (finish_step_over): New.
8621 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8622 requests. Clear the thread's last reported target waitstatus.
8623 Don't use the `suspended' flag. Don't consider pending breakpoints.
8624 (linux_resume): Start a step-over if necessary.
8625 (proceed_one_lwp): New.
8626 (proceed_all_lwps): New.
8627 (unstop_all_lwps): New.
8628 * linux-low.h (struct lwp_info): Rewrite comment for the
8629 `suspended' flag. Add the `stop_pc' field. Delete the
8630 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8631 Add `'last_resume_kind' and `need_step_over' fields.
8632 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8633 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8634 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8635 (set_raw_breakpoint_at): New.
8636 (set_breakpoint_at): Rewrite to use it.
8637 (reinsert_breakpoint_handler): Delete.
8638 (set_reinsert_breakpoint): New.
8639 (reinsert_breakpoint_by_bp): Delete.
8640 (delete_reinsert_breakpoints): New.
8641 (uninsert_breakpoint): Rewrite.
8642 (uninsert_breakpoints_at): New.
8643 (reinsert_breakpoint): Rewrite.
8644 (reinsert_breakpoints_at): New.
8645 (check_breakpoints): Rewrite.
8646 (breakpoint_here): New.
8647 (breakpoint_inserted_here): New.
8648 (check_mem_read): Adjust.
8649 * mem-break.h (breakpoints_supported, breakpoint_here)
8650 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8651 (reinsert_breakpoint_by_bp): Delete declaration.
8652 (delete_reinsert_breakpoints): Declare.
8653 (reinsert_breakpoint): Delete declaration.
8654 (reinsert_breakpoints_at): Declare.
8655 (uninsert_breakpoint): Delete declaration.
8656 (uninsert_breakpoints_at): Declare.
8657 (check_breakpoints): Adjust prototype.
8658 * server.h: Adjust include order.
8659 (struct thread_info): Declare here. Add a `last_status' field.
8660
30ba68cb
MS
86612010-03-23 Michael Snyder <msnyder@vmware.com>
8662
8663 * server.c (crc32): New function.
8664 (handle_query): Add handling for 'qCRC:' request.
8665
b9a881c2
PA
86662010-03-23 Pedro Alves <pedro@codesourcery.com>
8667
8668 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8669 lwp had been stopped by a watchpoint.
8670
e92d13d5
PA
86712010-03-16 Pedro Alves <pedro@codesourcery.com>
8672
8673 * server.h (internal_error): Declare.
8674 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8675 * utils.c (internal_error): New function.
8676
64daa791
AS
86772010-03-15 Andreas Schwab <schwab@redhat.com>
8678
8679 * configure.srv: Fix typo setting srv_regobj.
8680
f52cd8cd
PA
86812010-03-15 Pedro Alves <pedro@codesourcery.com>
8682
8683 * linux-low.c (fetch_register): Avoid passing a non string literal
8684 format to `error'.
8685 (usr_store_inferior_registers): Ditto.
8686
93ae6fdc
PA
86872010-03-14 Pedro Alves <pedro@codesourcery.com>
8688
8689 * linux-low.c (linux_write_memory): Bail out early if peeking
8690 memory failed.
8691
c3adc08c
PA
86922010-03-14 Pedro Alves <pedro@codesourcery.com>
8693
8694 * linux-low.h (struct lwp_info): New fields
8695 `stopped_by_watchpoint' and `stopped_data_address'.
8696 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8697 here, and cache them in the lwp object.
8698 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8699 directly.
8700 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8701 field.
8702 (linux_stopped_by_watchpoint): Rewrite.
8703 (linux_stopped_data_address): Rewrite.
8704
bce522a2
PA
87052010-03-06 Simo Melenius <simo.melenius@iki.fi>
8706
8707 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8708 switching the current inferior, not before.
8709
90884b2b
L
87102010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8711
8712 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8713 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8714 i386-linux.c and amd64-linux.c.
8715 (reg-i386.o): Removed.
8716 (reg-i386.c): Likewise.
8717 (reg-i386-linux.o): Likewise.
8718 (reg-i386-linux.c): Likewise.
8719 (reg-x86-64.o): Likewise.
8720 (reg-x86-64.c): Likewise.
8721 (reg-x86-64-linux.o): Likewise.
8722 (reg-x86-64-linux.c): Likewise.
8723 (i386.o): New.
8724 (i386.c): Likewise.
8725 (i386-linux.o): Likewise.
8726 (i386-linux.c): Likewise.
8727 (amd64.o): Likewise.
8728 (amd64.c): Likewise.
8729 (amd64-linux.o): Likewise.
8730 (amd64-linux.c): Likewise.
8731
8732 * configure.srv (srv_i386_regobj): New.
8733 (srv_i386_linux_regobj): Likewise.
8734 (srv_amd64_regobj): Likewise.
8735 (srv_amd64_linux_regobj): Likewise.
8736 (srv_i386_32bit_xmlfiles): Likewise.
8737 (srv_i386_64bit_xmlfiles): Likewise.
8738 (srv_i386_xmlfiles): Likewise.
8739 (srv_amd64_xmlfiles): Likewise.
8740 (srv_i386_linux_xmlfiles): Likewise.
8741 (srv_amd64_linux_xmlfiles): Likewise.
8742 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8743 srv_xmlfiles to $srv_i386_xmlfiles.
8744 (i[34567]86-*-mingw32ce*): Likewise.
8745 (i[34567]86-*-mingw*): Likewise.
8746 (i[34567]86-*-nto*): Likewise.
8747 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8748 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8749 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8750 (x86_64-*-linux*): Likewise.
8751
8752 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8753 (init_registers_amd64_linux): New.
8754 (x86_arch_setup): Replace init_registers_x86_64_linux with
8755 init_registers_amd64_linux.
8756
193f13e6
MK
87572010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8758
8759 * configure.ac: Check for libdl. If it is not available link against
8760 static libthread_db.
8761 * configure: Regenerate.
8762
85d721b8
PA
87632010-02-22 Pedro Alves <pedro@codesourcery.com>
8764
8765 PR9605
8766
8767 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8768 handing a read watchpoint.
8769 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8770
6076632b
DE
87712010-02-12 Doug Evans <dje@google.com>
8772
8773 * linux-low.c (linux_supports_tracefork_flag): Document.
8774 (linux_look_up_symbols): Add comment.
8775
3327ccf7
L
87762010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8777
8778 * regcache.c (supply_register): Clear regcache if buf is NULL.
8779
0718675c 87802010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 8781 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
8782
8783 * inferiors.c (find_inferior): Add function documentation.
8784 (unloaded_dll): Handle the case where the unloaded dll has not
8785 been previously registered in the dll list.
8786
177321bd
DJ
87872010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8788
8789 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8790 (thumb2_breakpoint): New.
8791 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8792
2b009048
DJ
87932010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8794
8795 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8796 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8797 breakpoints.
8798
3be029c7
PA
87992010-01-21 Pedro Alves <pedro@codesourcery.com>
8800
8801 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8802
18f5de3b
JK
88032010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8804
8805 * linux-s390-low.c (s390_collect_ptrace_register)
8806 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8807
3743bb4f
DE
88082010-01-21 Doug Evans <dje@google.com>
8809
14ce3065
DE
8810 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8811 (PTRACE_ARG4_TYPE): New macro.
8812 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8813 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8814 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8815 (usr_store_inferior_registers): Ditto.
8816 (linux_read_memory, linux_write_memory): Ditto.
8817 (linux_test_for_tracefork): Ditto.
8818
3743bb4f
DE
8819 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8820 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8821
8b315be5
PA
88222010-01-21 Pedro Alves <pedro@codesourcery.com>
8823
8824 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8825 target.
8826
85492558
PA
88272010-01-21 Pedro Alves <pedro@codesourcery.com>
8828
8829 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8830 prototype to take a regcache. Adjust.
8831
442ea881
PA
88322010-01-20 Pedro Alves <pedro@codesourcery.com>
8833
8834 * regcache.h (struct thread_info): Forward declare.
8835 (struct regcache): New.
8836 (new_register_cache): Adjust prototype.
8837 (get_thread_regcache): Declare.
8838 (free_register_cache): Adjust prototype.
8839 (registers_to_string, registers_from_string): Ditto.
8840 (supply_register, supply_register_by_name, collect_register)
8841 (collect_register_as_string, collect_register_by_name): Ditto.
8842 * regcache.c (struct inferior_regcache_data): Delete.
8843 (get_regcache): Rename to ...
8844 (get_thread_regcache): ... this. Adjust. Switch inferior before
8845 fetching registers.
8846 (regcache_invalidate_one): Adjust.
8847 (regcache_invalidate): Fix prototype.
8848 (new_register_cache): Return the new register cache.
8849 (free_register_cache): Change prototype.
8850 (realloc_register_cache): Adjust.
8851 (registers_to_string): Change prototype to take a regcache. Adjust.
8852 (registers_from_string): Ditto.
8853 (register_data): Ditto.
8854 (supply_register): Ditto.
8855 (supply_register_by_name): Ditto.
8856 (collect_register): Ditto.
8857 (collect_register_as_string): Ditto.
8858 (collect_register_by_name): Ditto.
8859 * server.c (process_serial_event): Adjust.
8860 * linux-low.h (regset_fill_func, regset_store_func): Change
8861 prototype.
8862 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8863 Change prototype.
8864 * linux-low.c (get_stop_pc): Adjust.
8865 (check_removed_breakpoint): Adjust.
8866 (linux_wait_for_event): Adjust.
8867 (linux_resume_one_lwp): Adjust.
8868 (fetch_register): Add regcache parameter. Adjust.
8869 (usr_store_inferior_registers): Ditto.
8870 (regsets_fetch_inferior_registers): Ditto.
8871 (regsets_store_inferior_registers): Ditto.
8872 (linux_fetch_registers, linux_store_registers): Ditto.
8873 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8874 regcache. Adjust.
43aaf8b6
PA
8875 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8876 Ditto.
442ea881
PA
8877 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8878 prototype to take a regcache.
8879 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8880 * remote-utils.c (convert_ascii_to_int, outreg)
8881 (prepare_resume_reply): Change prototype to take a regcache.
8882 Adjust.
8883 * target.h (struct target_ops) <fetch_registers, store_registers>:
8884 Change prototype to take a regcache.
8885 (fetch_inferior_registers, store_inferior_registers): Change
8886 prototype to take a regcache. Adjust.
8887 * proc-service.c (ps_lgetregs): Adjust.
8888 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8889 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8890 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8891 take a regcache. Adjust.
8892 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8893 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8894 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8895 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8896 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8897 (cris_cannot_fetch_register):
8898 (cris_breakpoint_at): Change prototype to take a regcache.
8899 Adjust.
8900 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8901 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8902 to take a regcache. Adjust.
8903 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8904 Adjust.
8905 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8906 take a regcache. Adjust.
8907 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8908 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8909 (m68k_set_pc): Change prototype to take a regcache. Adjust.
8910 * linux-mips-low.c (mips_get_pc):
8911 (mips_set_pc): Change prototype to take a regcache. Adjust.
8912 (mips_reinsert_addr): Adjust.
8913 (mips_collect_register): Change prototype to take a regcache.
8914 Adjust.
8915 (mips_supply_register):
8916 (mips_collect_register_32bit, mips_supply_register_32bit)
8917 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8918 (mips_store_fpregset): Ditto.
43aaf8b6
PA
8919 * linux-ppc-low.c (ppc_supply_ptrace_register)
8920 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
8921 (parse_spufs_run): Adjust.
8922 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8923 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8924 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8925 take a regcache. Adjust.
8926 * linux-s390-low.c (s390_collect_ptrace_register)
8927 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8928 (s390_set_pc): Change prototype to take a regcache. Adjust.
8929 (s390_arch_setup): Adjust.
8930 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8931 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
8932 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8933 (sparc_fill_gregset, sparc_store_gregset_from_stack)
8934 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8935 regcache. Adjust.
8936 (sparc_breakpoint_at): Adjust.
8937 * linux-xtensa-low.c (xtensa_fill_gregset):
8938 (xtensa_store_gregset):
8939 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
8940 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
8941 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
8942 prototype to take a regcache. Adjust.
8943 * win32-arm-low.c (arm_fetch_inferior_register)
8944 (arm_store_inferior_register): Change prototype to take a
8945 regcache. Adjust.
8946 * win32-i386-low.c (i386_fetch_inferior_register)
8947 (i386_store_inferior_register): Change prototype to take a
8948 regcache. Adjust.
8949 * win32-low.c (child_fetch_inferior_registers)
8950 (child_store_inferior_registers): Change prototype to take a
8951 regcache. Adjust.
8952 (win32_wait): Adjust.
8953 (win32_fetch_inferior_registers): Change prototype to take a
8954 regcache. Adjust.
8955 (win32_store_inferior_registers): Adjust.
8956 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
8957 store_inferior_register>: Change prototype to take a regcache.
8958
60c3d7b0
DE
89592010-01-20 Doug Evans <dje@google.com>
8960
8961 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
8962 #ifdef.
8963 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 8964 (W_STOPCODE): Provide definition if missing.
60c3d7b0 8965
dc146f7c
VP
89662010-01-13 Vladimir Prus <vladimir@codesourcery.com>
8967
8968 * linux-low.c (linux_core_of_thread): New.
8969 (compare_ints, show_process, list_threads): New.
8970 (linux_qxfer_osdata): Report threads and cores.
8971 (linux_target_op): Register linux_core_of_thread.
8972 * remote-utils.c (prepare_resume_reply): Report the core.
8973 (buffer_xml_printf): Support %d specifier.
8974 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
8975 New.
8976 (handle_query): Handle qXfer:threads. Announce availability
8977 thereof.
8978 * target.h (struct target_ops): New field core_of_thread.
8979
7803799a
UW
89802010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
8981
8982 * Makefile.in (clean): Remove new generated files.
8983 (reg-s390.o, reg-s390.c): Remove rules.
8984 (reg-s390x.o, reg-s390x.c): Likewise.
8985 (s390-linux32.o, s390-linux32.c): Add rules.
8986 (s390-linux64.o, s390-linux64.c): Likewise.
8987 (s390x-linux64.o, s390x-linux64.c): Likewise.
8988 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
8989 * linux-s390-low.c: Include <elf.h>.
8990 (HWCAP_S390_HIGH_GPRS): Define if undefined.
8991 (init_registers_s390): Remove prototype.
8992 (init_registers_s390x): Likewise.
8993 (init_registers_s390_linux32): Add prototype.
8994 (init_registers_s390_linux64): Likewise.
8995 (init_registers_s390x_linux64): Likewise.
8996 (s390_num_regs_3264): New define.
8997 (s390_regmap_3264): New global variable.
8998 (s390_cannot_fetch_register): Remove obsolete check.
8999 (s390_cannot_store_register): Likewise.
9000 (s390_collect_ptrace_register): Handle upper/lower register halves.
9001 (s390_supply_ptrace_register): Likewise.
9002 (s390_fill_gregset): Update to register number changes.
9003 (s390_get_hwcap): New routine.
9004 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9005 Install appropriate regmap and register set.
9006
6e7ffa39
JB
90072010-01-01 Joel Brobecker <brobecker@adacore.com>
9008
9009 * server.c (gdbserver_version): Update copyright year to 2010.
9010 * gdbreplay.c (gdbreplay_version): Likewise.
9011
957f3f49
DE
90122009-12-28 Doug Evans <dje@google.com>
9013
9014 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9015 elf/external.h. Include <elf.h> instead but only if necessary.
9016
ca5c370d
PA
90172009-12-28 Pedro Alves <pedro@codesourcery.com>
9018
9019 * linux-low.c (linux_remove_process): Remove `detaching'
9020 parameter. Don't release/detach from thread_db here.
9021 (linux_kill): Release/detach from thread_db here, ...
9022 (linux_detach): ... and here, before actually detaching.
9023 (linux_wait_1): ... and here, when a process exits.
9024 * thread-db.c (any_thread_of): New.
9025 (thread_db_free): Switch the current inferior to a thread of the
9026 passed in process.
9027
4ee62156
DE
90282009-12-21 Doug Evans <dje@google.com>
9029
d90e6a88
DE
9030 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9031
c5f62d5f
DE
9032 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9033 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9034 warning ifndef __NR_tkill. Move setting of errno there too.
9035 Delete unnecessary resetting of errno after syscall.
9036 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9037
10e86dd7
DE
9038 * configure.ac: Check for dladdr.
9039 * config.in: Regenerate.
9040 * configure: Regenerate.
9041 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9042 (try_thread_db_load): Update.
9043
4ee62156
DE
9044 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9045
00f515da
DE
90462009-12-18 Doug Evans <dje@google.com>
9047
e9464885
DE
9048 * event-loop.c: Include unistd.h if it exists.
9049
07d4f67e
DE
9050 * linux-low.c (my_waitpid): Move definition away from being in
9051 between linux_tracefork_child/linux_test_for_tracefork.
9052
00f515da
DE
9053 * gdb_proc_service.h (psaddr_t): Fix type.
9054 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9055 signature to match glibc.
9056
1de1badb
DE
90572009-12-16 Doug Evans <dje@google.com>
9058
9059 * linux-low.c (linux_read_memory): Fix argument to read.
9060
aeeb81d1
PA
90612009-11-26 Pedro Alves <pedro@codesourcery.com>
9062
9063 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9064 events, don't leave current_inferior pointing at null.
9065
10357975
PA
90662009-11-26 Pedro Alves <pedro@codesourcery.com>
9067
9068 * win32-low.c (LOG): Delete.
9069 (OUTMSG): Output to stderr.
9070 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9071 on compile time LOG macro.
9072 (win32_wait): Fix debug output.
9073
cf6e3471
PA
90742009-11-26 Pedro Alves <pedro@codesourcery.com>
9075
9076 * win32-low.c (win32_add_one_solib): If the dll name is
9077 "ntdll.dll", prepend the system directory to the dll path.
9078
0c85e18e
MK
90792009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9080
9081 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9082
9ac544ce 90832009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 9084 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
9085
9086 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9087 * configure.ac: Check for __mcoldfire__ and set
9088 gdb_cv_m68k_is_coldfire.
9089 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9090 reg-cf.o and reg-m68k.o.
9091 * configure: Regenerated.
9092
fd7dd3e6
PA
90932009-11-16 Pedro Alves <pedro@codesourcery.com>
9094
9095 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9096 Pass it to thread_db_free.
9097 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9098 proper `detaching' argument to linux_remove_process.
9099 * linux-low.h (thread_db_free): Add `detaching' parameter.
9100 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9101 to thread_db_free.
9102 (thread_db_free): Add `detaching' parameter. Only
9103 call td_ta_clear_event if detaching from process.
9104
75aa492e
MK
91052009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9106
9107 * thread-db.c (thread_db_free): Fix typo.
9108
21e1bee4
PP
91092009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9110
9111 PR gdb/10838
9112 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9113
8838b45e
NS
91142009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9115
9116 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9117 with an i686 compiler.
9118 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9119 needed.
9120 * configure: Rebuilt.
9121
8a35fb51
SL
91222009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9123
9124 PR gdb/10783
9125
9126 * server.c (handle_search_memory_1): Correct read_addr initialization
9127 in loop for searching subsequent chunks.
9128
96f15937
PP
91292009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9130
9131 * configure.ac: New --with-libthread-db option.
9132 * thread-db.c: Allow direct dependence on libthread_db.
9133 (thread_db_free): Adjust.
9134 * config.in: Regenerate.
9135 * configure: Likewise.
889bf7c5 9136
5f7d1694
PP
91372009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9138
9139 PR gdb/10757
9140 * thread-db.c (attach_thread): New function.
9141 (maybe_attach_thread): Return success/failure.
9142 (find_new_threads_callback): Adjust.
889bf7c5
PA
9143 (thread_db_find_new_threads): Loop until no new threads.
9144
88e3b899
PA
91452009-10-13 Pedro Alves <pedro@codesourcery.com>
9146
9147 * proc-service.c (ps_lgetregs): Formatting.
9148
cdbfd419
PP
91492009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9150
9151 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9152 * configure.ac: Adjust.
9153 * linux-low.h (struct process_info_private): Move members to struct
9154 thread_db.
9155 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9156 * linux-low.c (linux_remove_process): Adjust.
9157 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9158 * server.c (handle_query): Move code ...
9159 (handle_monitor_command): ... here. New function.
9160 * target.h (struct target_ops): New member.
9161 * thread-db.c (struct thread_db): New.
9162 (libthread_db_search_path): New variable.
9163 (thread_db_create_event, thread_db_enable_reporting)
9164 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9165 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9166 (try_thread_db_load_1, dladdr_to_soname): New functions.
9167 (try_thread_db_load, thread_db_load_search): New functions.
9168 (thread_db_init): Search for libthread_db.
9169 (thread_db_free): New function.
9170 (thread_db_handle_monitor_command): Likewise.
9171 * config.in: Regenerate.
9172 * configure: Regenerate.
889bf7c5 9173
4168d2d6
UW
91742009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9175
9176 * spu-low.c (spu_kill): Wait for inferior to terminate.
9177 Call clear_inferiors.
9178 (spu_detach): Call clear_inferiors.
9179
81ecdfbb
RW
91802009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9181
9182 * aclocal.m4: Regenerate.
9183 * config.in: Likewise.
9184 * configure: Likewise.
9185
0b9ff2c0
UW
91862009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9187
9188 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9189 (parse_spufs_run): New function.
9190 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9191 (ppc_breakpoint_at): Handle SPU breakpoints.
9192
efcbbd14
UW
91932009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9194
9195 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9196 (SPUFS_MAGIC): Define.
9197 (spu_enumerate_spu_ids): New function.
9198 (linux_qxfer_spu): New function.
9199 (linux_target_ops): Install linux_qxfer_spu.
9200
f4d9bade
UW
92012009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9202
9203 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9204 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9205 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9206 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9207 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9208 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9209 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9210 (init_registers_powerpc_cell32l): Add prototype.
9211 (init_registers_powerpc_cell64l): Likewise.
9212 (ppc_arch_setup): Detect Cell/B.E. architecture.
9213
96e946ca
RW
92142009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9215
9216 * Makefile.in (datarootdir): New variable.
9217
58d6951d
DJ
92182009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9219
9220 * linux-low.c (linux_write_memory): Update debugging output.
9221 * Makefile.in (clean): Add new descriptions.
9222 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9223 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9224 * configure.srv: Add new files for arm*-*-linux*.
9225 * linux-arm-low.c: Add new declarations.
9226 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9227 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9228 (HWCAP_VFPv3D16): New.
9229 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9230 instead of __IWMMXT__.
9231 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9232 (arm_arch_setup): New.
9233 (target_regsets): Remove #ifdef. Add VFP regset.
9234 (the_low_target): Use arm_arch_setup.
9235
12b42a12
DJ
92362009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9237
9238 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9239 the main thread again.
9240
ac8c974e
AR
92412009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9242
9243 Adding Neutrino gdbserver.
9244 * configure: Regenerated.
9245 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9246 * configure.srv (i[34567]86-*-nto*): New target.
9247 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9248 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9249 (nto_comctrl) [__QNX__]: New function.
9250 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9251
4424e0c3 92522009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
9253
9254 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9255 srv_tgtobj.
9256
912cf4ba
PA
92572009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9258 Pedro Alves <pedro@codesourcery.com>
9259
9260 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9261 don't support CONTEXT_EXTENDED_REGISTERS.
9262 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9263 (the_low_target): Install them.
9264 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9265 failing with ERROR_PIPE_NOT_CONNECTED.
9266
aa5ca48f
DE
92672009-06-30 Doug Evans <dje@google.com>
9268 Pierre Muller <muller@ics.u-strasbg.fr>
9269
9270 Add h/w watchpoint support to x86-linux, win32-i386.
9271 * Makefile.in (SFILES): Add i386-low.c
9272 (i386_low_h): Define.
9273 (i386-low.o): Add dependencies.
9274 (linux-x86-low.o): Add i386-low.h dependency.
9275 (win32-i386-low.o): Ditto.
9276 * i386-low.c: New file.
9277 * i386-low.h: New file.
9278 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9279 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9280 * linux-low.c (linux_add_process): Initialize arch_private.
9281 (linux_remove_process): Free arch_private.
9282 (add_lwp): Initialize arch_private.
9283 (delete_lwp): Free arch_private.
9284 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9285 provided.
9286 * linux-low.h (process_info_private): New member arch_private.
9287 (lwp_info): New member arch_private.
9288 (linux_target_ops): New members new_process, new_thread,
9289 prepare_to_resume.
9290 (ptid_of): New macro.
9291 * linux-x86-low.c: Include stddef.h, i386-low.h.
9292 (arch_process_info): New struct.
9293 (arch_lwp_info): New struct.
9294 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9295 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9296 (i386_dr_low_get_status): New function.
9297 (x86_insert_point, x86_remove_point): New functions.
9298 (x86_stopped_by_watchpoint): New function.
9299 (x86_stopped_data_address): New function.
9300 (x86_linux_new_process, x86_linux_new_thread): New functions.
9301 (x86_linux_prepare_to_resume): New function.
9302 (the_low_target): Add entries for insert_point, remove_point,
9303 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9304 prepare_to_resume.
9305 * server.c (debug_hw_points): New global.
9306 (monitor_show_help): Document set debug-hw-points.
9307 (handle_query): Process "set debug-hw-points".
9308 * server.h (debug_hw_points): Declare.
9309 (paddress): Declare.
9310 * utils.c (NUMCELLS, CELLSIZE): New macros.
9311 (get_sell, xsnprintf, paddress): New functions.
9312 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9313 remove_point, stopped_by_watchpoint, stopped_data_address.
9314 * win32-i386-low.c: Include i386-low.h.
9315 (debug_reg_state): Replaces dr.
9316 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9317 (i386_dr_low_get_status): New function.
9318 (i386_insert_point, i386_remove_point): New functions.
9319 (i386_stopped_by_watchpoint): New function.
9320 (i386_stopped_data_address): New function.
9321 (i386_initial_stuff): Update.
9322 (get_thread_context,set_thread_context,i386_thread_added): Update.
9323 (the_low_target): Add entries for insert_point,
9324 remove_point, stopped_by_watchpoint, stopped_data_address.
9325 * win32-low.c (win32_insert_watchpoint): New function.
9326 (win32_remove_watchpoint): New function.
9327 (win32_stopped_by_watchpoint): New function.
9328 (win32_stopped_data_address): New function.
9329 (win32_target_ops): Add entries for insert_watchpoint,
9330 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9331 * win32-low.h (win32_target_ops): New members insert_point,
9332 remove_point, stopped_by_watchpoint, stopped_data_address.
9333
d993e290
PA
93342009-06-25 Pedro Alves <pedro@codesourcery.com>
9335
9336 * server.c (process_serial_event): Re-return unsupported, not
9337 error, if the type isn't recognized. Re-allow supporting only
9338 insert or remove packets. Also call require_running for
9339 breakpoints. Add missing break statement to default case. Tidy.
9340 * target.h (struct target_ops): Rename insert_watchpoint to
9341 insert_point, and remove_watchpoint to remove_point.
9342
9343 * linux-low.h (struct linux_target_ops): Likewise.
9344 * linux-low.c (linux_insert_watchpoint): Rename to ...
9345 (linux_insert_point): ... this. Adjust.
9346 (linux_remove_watchpoint): Rename to ...
9347 (linux_remove_point): ... this. Adjust.
9348 (linux_target_ops): Adjust.
9349 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9350 (cris_insert_point): ... this.
9351 (cris_remove_watchpoint): Rename to ...
9352 (cris_remove_point): ... this.
9353 (the_low_target): Adjust.
9354
0f54c268
PM
93552009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9356
9357 * server.c (handle_v_kill): Pass signal_pid to
9358 kill_inferior if multi_process is zero.
9359
c6314022
AR
93602009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9361
9362 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9363 * target.h (target_ops): Comment for *_watchpoint to make it clear
9364 the functions can get types '0' and '1'.
9365
4463ce24
AR
93662009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9367
9368 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9369 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9370 * regcache.c (get_regcache): Likewise.
9371 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9372 * win32-low.c (child_fetch_inferior_registers): Remove check for
9373 regno 0.
9374
cf8fd78b
PA
93752009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9376 Pedro Alves <pedro@codesourcery.com>
9377
9378 * target.h (struct target_ops) <supports_multi_process>: New
9379 callback.
9380 (target_supports_multi_process): New.
9381 * server.c (handle_query): Even if GDB reports support, only
9382 enable multi-process if the target also supports it. Report
9383 multi-process support only if the target backend supports it.
9384 * linux-low.c (linux_supports_multi_process): New function.
9385 (linux_target_ops): Install it as target_supports_multi_process
9386 callback.
9387
47c0c975
DE
93882009-05-24 Doug Evans <dje@google.com>
9389
e09875d4
DE
9390 Global renaming of find_thread_pid to find_thread_ptid.
9391 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9392 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9393 All callers updated.
9394
e27d73f6
DE
9395 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9396 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9397 directly.
9398
47c0c975
DE
9399 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9400 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9401 (linux_resume_one_lwp): Ditto.
9402
2acc282a
DE
94032009-05-23 Doug Evans <dje@google.com>
9404
9405 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9406 from struct inferior_list_entry * to struct lwp_info *.
9407 All callers updated.
9408
9f1036c1
DE
94092009-05-13 Doug Evans <dje@google.com>
9410
9411 * linux-x86-low.c: Don't include assert.h.
9412 (x86_siginfo_fixup): Use fatal, not assert.
9413 (x86_arch_setup): Fix comment.
9414
d0722149
DE
94152009-05-12 Doug Evans <dje@google.com>
9416
9417 Biarch support for i386/amd64 gdbserver.
9418 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9419 Add linux-x86-low.c.
9420 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9421 (linux-x86-low.o): Add.
9422 * linux-x86-64-low.c: Delete.
9423 * linux-i386-low.c: Delete.
9424 * linux-x86-low.c: New file.
9425 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9426 linux-x86-low.o.
9427 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9428 linux-x86-low.o.
9429 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9430 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9431 (linux_child_pid_to_exec_file): New function.
9432 (elf_64_header_p, elf_64_file_p): New functions.
9433 (siginfo_fixup): New function.
9434 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9435 give target a chance to convert layout.
9436 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9437 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9438
fdeb2a12
DE
94392009-05-07 Doug Evans <dje@google.com>
9440
9441 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9442 (regsets_store_inferior_registers): Ditto.
9443
a6dbe5df
PA
94442009-05-06 Pedro Alves <pedro@codesourcery.com>
9445
9446 PR server/10048
9447
9448 * linux-low.c (must_set_ptrace_flags): Delete.
9449 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9450 of the global.
9451 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9452 `lwp->must_set_ptrace_flags' instead.
ba42693b 9453 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
9454 (linux_wait_1): ... not here.
9455
5091eb23
DE
94562009-04-30 Doug Evans <dje@google.com>
9457
9f767825
DE
9458 * inferiors.c (started_inferior_callback): New function.
9459 (attached_inferior_callback): New function.
9460 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9461 * server.c (print_started_pid, print_attached_pid): New functions.
9462 (detach_or_kill_for_exit): New function.
9463 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9464 * server.h (have_started_inferiors_p): Declare.
9465 (have_attached_inferiors_p): Declare.
9466
5091eb23
DE
9467 * inferiors.c (remove_process): Fix memory leak, free process.
9468 * linux-low.c (linux_remove_process): New function.
9469 (linux_kill): Call it instead of remove_process.
9470 (linux_detach, linux_wait_1): Ditto.
9471
155c8968
PA
94722009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9473
9474 * configure.srv: Add x86 Windows CE target.
9475
7fe519cb
UW
94762009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9477
9478 * inferiors.c (get_thread_process): Make global.
9479 * server.h (get_thread_process): Add prototype.
9480 * thread-db.c (find_one_thread): Use get_thread_process
9481 instead of current_process.
9482 (thread_db_get_tls_address): Do not crash if called when
9483 thread layer is not yet initialized.
9484
5472f405
UW
94852009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9486
9487 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9488 * spu-low.c (current_tid): Rename to ...
9489 (current_ptid): ... this.
9490 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9491 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9492 ptid_get_lwp (current_ptid) instead of current_tid.
9493 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9494 instead of current_tid. Use find_process_pid to verify pid
9495 argument is valid. Pass proper argument to remove_process.
9496 (spu_thread_alive): Compare current_ptid instead of current_tid.
9497 (spu_resume): Likewise.
9498
55ac2b99
PA
94992009-04-02 Pedro Alves <pedro@codesourcery.com>
9500
9501 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9502 variable.
9503
95954743
PA
95042009-04-01 Pedro Alves <pedro@codesourcery.com>
9505
9506 Implement the multiprocess extensions, and add linux multiprocess
9507 support.
9508
9509 * server.h (ULONGEST): Declare.
9510 (struct ptid, ptid_t): New.
9511 (minus_one_ptid, null_ptid): Declare.
9512 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9513 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9514 (struct inferior_list_entry): Change `id' type from unsigned from
9515 to ptid_t.
9516 (struct sym_cache, struct breakpoint, struct
9517 process_info_private): Forward declare.
9518 (struct process_info): Declare.
9519 (current_process): Declare.
9520 (all_processes): Declare.
9521 (initialize_inferiors): Declare.
9522 (add_thread): Adjust to use ptid_t.
9523 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9524 (add_process, remove_process, find_thread_pid): Declare.
9525 (find_inferior_id): Adjust to use ptid_t.
9526 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9527 (multi_process): Declare.
9528 (push_event): Adjust to use ptid_t.
9529 (read_ptid, write_ptid): Declare.
9530 (prepare_resume_reply): Adjust to use ptid_t.
9531 (clear_symbol_cache): Declare.
9532 * inferiors.c (all_processes): New.
9533 (null_ptid, minus_one_ptid): New.
9534 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9535 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9536 (add_thread): Change unsigned long to ptid. Remove gdb_id
9537 parameter. Adjust.
9538 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9539 (gdb_id_to_thread): Rename to ...
9540 (find_thread_pid): ... this. Change unsigned long to ptid.
9541 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9542 (loaded_dll, pull_pid_from_list): Adjust.
9543 (add_process, remove_process, find_process_pid)
9544 (get_thread_process, current_process, initialize_inferiors): New.
9545 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9546 (struct target_waitstatus) <related_pid>: Ditto.
9547 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9548 return type to int.
9549 (struct target_ops) <join>: Add `pid' argument.
9550 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9551 (struct target_ops) <wait>: Add `ptid' field. Change return type
9552 to ptid.
9553 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9554 (mywait): Add `ptid' argument. Change return type to ptid_t.
9555 (target_pid_to_str): Declare.
9556 * target.c (set_desired_inferior): Adjust to use ptids.
9557 (mywait): Add new `ptid' argument. Adjust.
9558 (target_pid_to_str): New.
9559 * mem-break.h (free_all_breakpoints): Declare.
9560 * mem-break.c (breakpoints): Delelete.
9561 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9562 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9563 to use per-process breakpoint list.
9564 (free_all_breakpoints): New.
9565 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9566 (symbol_cache, all_symbols_looked_up): Delete.
9567 (hexchars): New.
9568 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9569 read_ptid): New.
9570 (prepare_resume_reply): Change ptid argument's type from unsigned
9571 long to ptid_t. Adjust. Implement W;process and X;process.
9572 (free_sym_cache, clear_symbol_cache): New.
9573 (look_up_one_symbol): Adjust to per-process symbol cache. *
9574 * server.c (cont_thread, general_thread, step_thread): Change type
9575 to ptid_t.
9576 (attached): Delete.
9577 (multi_process): New.
9578 (last_ptid): Change type to ptid_t.
9579 (struct vstop_notif) <ptid>: Change type to ptid_t.
9580 (queue_stop_reply, push_event): Change `ptid' argument's type to
9581 ptid_t.
9582 (discard_queued_stop_replies): Add `pid' argument.
9583 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9584 changes. Don't reference the `attached' global.
9585 (attach_inferior): Adjust to mywait interface changes.
9586 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9587 features. Handle and report "multiprocess+". Handle
9588 "qAttached:PID".
9589 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9590 changes.
9591 (handle_v_kill): New.
9592 (handle_v_stopped): Adjust to use target_pid_to_str.
9593 (handle_v_requests): Allow multiple attaches and runs when
9594 multiprocess extensions are in effect. Handle "vKill".
9595 (myresume): Adjust to use ptids.
9596 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9597 (handle_status): Adjust to discard_queued_stop_replies interface
9598 change.
9599 (first_thread_of, kill_inferior_callback)
9600 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9601 (main): Call initialize_inferiors. Adjust to use ptids, killing
9602 and detaching from all inferiors. Handle multiprocess packet
9603 variants.
9604 * linux-low.h: Include gdb_proc_service.h.
9605 (struct process_info_private): New.
9606 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9607 <lwpid_of>: Use ptid_get_lwp.
9608 (get_lwp_thread): Adjust.
9609 (struct lwp_info): Add `dead' member.
9610 (find_lwp_pid): Declare.
9611 * linux-low.c (thread_db_active): Delete.
9612 (new_inferior): Adjust comment.
9613 (inferior_pid): Delete.
9614 (linux_add_process): New.
9615 (handle_extended_wait): Adjust.
9616 (add_lwp): Change unsigned long to ptid.
9617 (linux_create_inferior): Add process to processes table. Adjust
9618 to use ptids. Don't set new_inferior here.
9619 (linux_attach_lwp): Rename to ...
9620 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9621 it. Adjust to use ptids.
9622 (linux_attach_lwp): New.
9623 (linux_attach): Add process to processes table. Don't set
9624 new_inferior here.
9625 (struct counter): New.
9626 (second_thread_of_pid_p, last_thread_of_process_p): New.
9627 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9628 multiple processes.
9629 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9630 processes. Remove process from process table.
9631 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9632 to multiple processes.
9633 (any_thread_of): New.
9634 (linux_detach): Add `pid' argument, and handle it. Remove process
9635 from processes table.
9636 (linux_join): Add `pid' argument. Handle it.
9637 (linux_thread_alive): Change unsighed long argument to ptid_t.
9638 Consider dead lwps as not being alive.
9639 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9640 threads we're not interested in.
9641 (same_lwp, find_lwp_pid): New.
9642 (linux_wait_for_lwp): Change `pid' argument's type from int to
9643 ptid_t. Adjust.
9644 (linux_wait_for_event): Rename to ...
9645 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9646 from int to ptid_t. Adjust.
9647 (linux_wait_for_event): New.
9648 (linux_wait_1): Add `ptid' argument. Change return type to
9649 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9650 that exit from the process table.
9651 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9652 Adjust.
9653 (mark_lwp_dead): New.
9654 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9655 stopping all threads, mark its main lwp as dead.
9656 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9657 ptids.
9658 (fetch_register, usr_store_inferior_registers)
9659 (regsets_fetch_inferior_registers)
9660 (regsets_store_inferior_registers, linux_read_memory)
9661 (linux_write_memory): Inline `inferior_pid'.
9662 (linux_look_up_symbols): Adjust to use per-process
9663 `thread_db_active'.
9664 (linux_request_interrupt): Adjust to use ptids.
9665 (linux_read_auxv): Inline `inferior_pid'.
9666 (initialize_low): Don't reference thread_db_active.
9667 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9668 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9669 (ps_getpid): Return the pid of the current inferior.
9670 * thread-db.c (proc_handle, thread_agent): Delete.
9671 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9672 per-process data.
9673 (find_one_thread): Change argument type to ptid_t. Adjust to
9674 per-process data.
9675 (maybe_attach_thread): Adjust to per-process data and ptids.
9676 (thread_db_find_new_threads): Ditto.
9677 (thread_db_init): Ditto.
9678 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9679 processes table. Adjust to use ptids.
9680 (spu_kill, spu_detach): Adjust interface. Remove process from
9681 processes table.
9682 (spu_join, spu_thread_alive): Adjust interface.
9683 (spu_wait): Adjust interface. Remove process from processes
9684 table. Adjust to use ptids.
9685 * win32-low.c (current_inferior_tid): Delete.
9686 (current_inferior_ptid): New.
9687 (debug_event_ptid): New.
9688 (thread_rec): Take a ptid. Adjust.
9689 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9690 (child_delete_thread): Ditto.
9691 (do_initial_child_stuff): Add `attached' argument. Add process to
9692 processes table.
9693 (child_fetch_inferior_registers, child_store_inferior_registers):
9694 Adjust.
9695 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9696 (win32_attach): Pass 1 to do_initial_child_stuff.
9697 (win32_kill): Adjust interface. Remove process from processes
9698 table.
9699 (win32_detach): Ditto.
9700 (win32_join): Adjust interface.
9701 (win32_thread_alive): Take a ptid.
9702 (win32_resume): Adjust to use ptids.
9703 (get_child_debug_event): Ditto.
9704 (win32_wait): Adjust interface. Remove exiting process from
9705 processes table.
9706
bd99dc85
PA
97072009-04-01 Pedro Alves <pedro@codesourcery.com>
9708
9709 Non-stop mode support.
9710
9711 * server.h (non_stop): Declare.
9712 (gdb_client_data, handler_func): Declare.
9713 (delete_file_handler, add_file_handler, start_event_loop):
9714 Declare.
9715 (handle_serial_event, handle_target_event, push_event)
9716 (putpkt_notif): Declare.
9717 * target.h (enum resume_kind): New.
9718 (struct thread_resume): Replace `step' field by `kind' field.
9719 (TARGET_WNOHANG): Define.
9720 (struct target_ops) <wait>: Add `options' argument.
9721 <supports_non_stop, async, start_non_stop>: New fields.
9722 (target_supports_non_stop, target_async): New.
9723 (start_non_stop): Declare.
9724 (mywait): Add `options' argument.
9725 * target.c (mywait): Add `options' argument. Print child exit
9726 notifications here.
9727 (start_non_stop): New.
9728 * server.c (non_stop, own_buf, mem_buf): New globals.
9729 (struct vstop_notif): New.
9730 (notif_queue): New global.
9731 (queue_stop_reply, push_event, discard_queued_stop_replies)
9732 (send_next_stop_reply): New.
9733 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9734 interface changes.
9735 (attach_inferior): In non-stop mode, don't wait for the target
9736 here.
9737 (handle_general_set): Handle QNonStop.
9738 (handle_query): When handling qC, return the current general
9739 thread, instead of the first thread of the list.
9740 (handle_query): If the backend supports non-stop mode, include
9741 QNonStop+ in the qSupported query response.
9742 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9743 and non-stop mode.
9744 (handle_v_attach, handle_v_run): Handle non-stop mode.
9745 (handle_v_stopped): New.
9746 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9747 (myresume): Adjust to use resume_kind. Handle non-stop.
9748 (queue_stop_reply_callback): New.
9749 (handle_status): Handle non-stop mode.
9750 (main): Clear non_stop flag on reconnection. Use the event-loop.
9751 Refactor serial protocol handling from here ...
9752 (process_serial_event): ... to this new function. When GDB
9753 selects any thread, select one here. In non-stop mode, wait until
9754 GDB acks all pending events before exiting.
9755 (handle_serial_event, handle_target_event): New.
9756 * remote-utils.c (remote_open): Install remote_desc in the event
9757 loop.
9758 (remote_close): Remove remote_desc from the event loop.
9759 (putpkt_binary): Rename to...
9760 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9761 (putpkt_binary): New as wrapper around putpkt_binary_1.
9762 (putpkt_notif): New.
9763 (prepare_resume_reply): In non-stop mode, don't change the
9764 general_thread.
9765 * event-loop.c: New.
9766 * Makefile.in (OBJ): Add event-loop.o.
9767 (event-loop.o): New rule.
9768
9769 * linux-low.h (pid_of): Moved here.
9770 (lwpid_of): New.
9771 (get_lwp_thread): Use lwpid_of.
9772 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9773 * linux-low.c (pid_of): Delete.
9774 (inferior_pid): Use lwpid_of.
9775 (linux_event_pipe): New.
9776 (target_is_async_p): New.
9777 (delete_lwp): New.
9778 (handle_extended_wait): Use lwpid_of.
9779 (add_lwp): Don't set lwpid field.
9780 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9781 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9782 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9783 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9784 first. Adjust to linux_wait_for_event interface changes. Use
9785 lwpid_of.
9786 (linux_detach): Don't delete the main lwp here.
9787 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9788 (status_pending_p): Don't consider explicitly suspended lwps.
9789 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9790 pointer. Add OPTIONS argument. Change return type to int. Use
9791 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9792 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9793 pointer. Add status pointer argument. Return a pid instead of a
9794 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9795 changes. In non-stop mode, don't switch to a random thread.
9796 (linux_wait): Rename to...
9797 (linux_wait_1): ... this. Add target_options argument, and handle
9798 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9799 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9800 clean exit and signal exit code. Don't stop all threads in
9801 non-stop mode. In all-stop mode, only stop all threads when
9802 reporting a stop to GDB. Handle explicit thread stop requests.
9803 (async_file_flush, async_file_mark): New.
9804 (linux_wait): New.
9805 (send_sigstop): Use lwpid_of.
9806 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9807 interface changes. In non-stop mode, don't switch to a random
9808 thread.
9809 (linux_resume_one_lwp): Use lwpid_of.
9810 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9811 (linux_resume_one_thread): ... this. Handle resume_stop. In
9812 non-stop mode, don't look for pending flag in all threads.
9813 (resume_status_pending_p): Don't consider explicitly suspended
9814 threads.
9815 (my_waitpid): Reimplement. Emulate __WALL.
9816 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9817 Use lwpid_of.
9818 (sigchld_handler, linux_supports_non_stop, linux_async)
9819 (linux_start_non_stop): New.
9820 (linux_target_ops): Register linux_supports_non_stop, linux_async
9821 and linux_start_non_stop.
9822 (initialize_low): Install SIGCHLD handler.
9823 * thread-db.c (thread_db_create_event, find_one_thread)
9824 (thread_db_get_tls_address): Use lwpid_of.
9825 * win32-low.c (win32_detach): Adjust to use resume_kind.
9826 (win32_wait): Add `options' argument.
9827 * spu-low.c (spu_resume): Adjust to use resume_kind.
9828 (spu_wait): Add `options' argument.
9829
5b1c542e
PA
98302009-04-01 Pedro Alves <pedro@codesourcery.com>
9831
9832 Decouple target code from remote protocol.
9833
9834 * target.h (enum target_waitkind): New.
9835 (struct target_waitstatus): New.
9836 (struct target_ops) <wait>: Return an unsigned long. Take a
9837 target_waitstatus pointer instead of a char pointer.
9838 (mywait): Likewise.
9839 * target.c (mywait): Change prototype to return an unsigned long.
9840 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9841 * server.h (thread_from_wait, old_thread_from_wait): Delete
9842 declarations.
9843 (prepare_resume_reply): Change prototype to take a
9844 target_waitstatus.
9845 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9846 (last_status, last_ptid): New.
9847 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9848 pid instead of a signal.
9849 (attach_inferior): Remove "status" and "signal" parameters.
9850 Adjust.
9851 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9852 not as an address.
9853 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9854 (handle_v_requests, myresume): Remove "status" and "signal"
9855 parameters. Adjust.
9856 (handle_status): New.
9857 (main): Delete local `status'. Adjust.
9858 * remote-utils.c: Include target.h.
9859 (prepare_resume_reply): Change prototype to take a
9860 target_waitstatus. Adjust.
9861
9862 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9863 interface.
9864 * spu-low.c (spu_wait): Adjust.
9865 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9866 Delete.
9867 (win32_wait): Adjust.
9868
2bd7c093
PA
98692009-04-01 Pedro Alves <pedro@codesourcery.com>
9870
9871 * target.h (struct thread_resume): Delete leave_stopped member.
9872 (struct target_ops): Add a `n' argument to the `resume' callback.
9873 * server.c (start_inferior): Adjust.
9874 (handle_v_cont, myresume): Adjust.
9875 * linux-low.c (check_removed_breakpoint): Adjust to resume
9876 interface change, and to removed leave_stopped field.
9877 (resume_ptr): Delete.
9878 (struct thread_resume_array): New.
9879 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9880 resume interface change.
9881 (linux_continue_one_thread, linux_queue_one_thread)
9882 (resume_status_pending_p): Check if the resume field is NULL
9883 instead of checking the leave_stopped member.
9884 (linux_resume): Adjust to the target resume interface change.
9885 * spu-low.c (spu_resume): Adjust to the target resume interface
9886 change.
9887 * win32-low.c (win32_detach, win32_resume): Ditto.
9888
c35fafde
PA
98892009-04-01 Pedro Alves <pedro@codesourcery.com>
9890
9891 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9892 flag.
9893 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9894 pending.
9895 (linux_continue_one_thread): Only preserve the stepping flag if
9896 there's a pending breakpoint.
9897
0a59d50b
PA
98982009-03-31 Pedro Alves <pedro@codesourcery.com>
9899
9900 * server.c (main): After the inferior having exited, call
9901 remote_close before exiting gdbserver.
9902
f04c6d38
TJB
99032009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9904
9905 Fix size of FPSCR in Power 7 processors.
9906 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9907 (PPC_FEATURE_HAS_DFP): New #define.
9908 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9909 size of the FPSCR.
9910
78e5cee6
PA
99112009-03-23 Pedro Alves <pedro@codesourcery.com>
9912
9913 * server.c (handle_query) Whitespace and formatting.
9914
1b3f6016
PA
99152009-03-22 Pedro Alves <pedro@codesourcery.com>
9916
9917 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9918 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9919 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9920 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9921 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9922 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9923 Makefile.in, configure.ac: Fix whitespace throughout.
9924 * configure: Regenerate.
9925
a07b2135
PA
99262009-03-22 Pedro Alves <pedro@codesourcery.com>
9927
9928 * inferiors.c (find_inferior): Make it safe for the callback
9929 function to delete the currently iterated inferior.
9930
67cc2626
PA
99312009-03-22 Pedro Alves <pedro@codesourcery.com>
9932
9933 * Makefile.in (linuw_low_h): Move higher.
9934 (thread-db.o): Depend on $(linux_low_h).
9935
54a0b537
PA
99362009-03-17 Pedro Alves <pedro@codesourcery.com>
9937
9938 Rename "process" to "lwp" throughout.
9939
9940 * linux-low.c (all_processes): Rename to...
9941 (all_lwps): ... this.
9942 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
9943 (add_process): Rename to ...
9944 (add_lwp): ... this. Adjust.
9945 (linux_create_inferior): Adjust.
9946 (linux_attach_lwp): Adjust.
9947 (linux_attach): Adjust.
9948 (linux_kill_one_process): Rename to ...
9949 (linux_kill_one_lwp): ... this. Adjust.
9950 (linux_kill): Adjust.
9951 (linux_detach_one_process): Rename to ...
9952 (linux_detach_one_lwp): ... this. Adjust.
9953 (linux_detach): Adjust.
9954 (check_removed_breakpoint): Adjust.
9955 (status_pending_p): Adjust.
9956 (linux_wait_for_process): Rename to ...
9957 (linux_wait_for_lwp): ... this. Adjust.
9958 (linux_wait_for_event): Adjust.
9959 (send_sigstop): Adjust.
9960 (wait_for_sigstop): Adjust.
9961 (stop_all_processes): Rename to ...
9962 (stop_all_lwps): ... this.
9963 (linux_resume_one_process): Rename to ...
9964 (linux_resume_one_lwp): ... this. Adjust.
9965 (linux_set_resume_request, linux_continue_one_thread)
9966 (linux_queue_one_thread, resume_status_pending_p)
9967 (usr_store_inferior_registers, regsets_store_inferior_registers)
9968 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9969 Adjust.
9970 * linux-low.h (get_process): Rename to ...
9971 (get_lwp): ... this. Adjust.
9972 (get_thread_process): Rename to ...
9973 (get_thread_lwp): ... this. Adjust.
9974 (get_process_thread): Rename to ...
9975 (get_lwp_thread): ... this. Adjust.
9976 (struct process_info): Rename to ...
9977 (struct lwp_info): ... this.
9978 (all_processes): Rename to ...
9979 (all_lwps): ... this.
9980 * proc-service.c (ps_lgetregs): Adjust.
9981 * thread-db.c (thread_db_create_event, find_one_thread)
9982 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
9983
0b16c5cf
PA
99842009-03-14 Pedro Alves <pedro@codesourcery.com>
9985
9986 * server.c (handle_query): Handle "qAttached".
9987
32de4b9d
NS
99882009-03-13 Nathan Sidwell <nathan@codesourcery.com>
9989
9990 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
9991 GPLv3, update license URL.
9992
2aecd87f
DE
99932009-03-01 Doug Evans <dje@google.com>
9994
93efd302 9995 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
9996 (server_h): Add gdb_signals.h.
9997 (signals.o): Update.
9998 * server.h (target_signal_from_host,target_signal_to_host_p)
9999 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10000
86b1f9c5
PM
100012009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10002
10003 * remote-utils.c (getpkt): Also generate remote-debug
10004 information if noack_mode is set.
10005
4aa995e1
PA
100062009-02-06 Pedro Alves <pedro@codesourcery.com>
10007
10008 * server.c (handle_query): Report qXfer:siginfo:read and
10009 qXfer:siginfo:write as supported and handle them.
10010 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10011 * linux-low.c (linux_xfer_siginfo): New.
10012 (linux_target_ops): Set it.
10013
62709adf
PA
100142009-01-26 Pedro Alves <pedro@codesourcery.com>
10015
10016 * server.c (gdbserver_usage): Mention --remote-debug.
10017 (main): Accept '--remote-debug' switch.
10018
aef93bd7
DE
100192009-01-18 Doug Evans <dje@google.com>
10020
10021 * regcache.c (new_register_cache): No need to check result of xcalloc.
10022 * server.c (handle_search_memory): Back out calls to xmalloc,
10023 result is checked and error is returned to user upon failure.
10024 (handle_query): Ditto. Add more checks for result of malloc.
10025 (handle_v_cont): Check result of malloc, report error back to
10026 user upon failure.
10027 (handle_v_run): Ditto. Call freeargv.
10028 * server.h (freeargv): Declare.
10029 * utils.c (freeargv): New fn.
10030
54363045
DE
100312009-01-15 Doug Evans <dje@google.com>
10032
f626972c
DE
10033 * gdbreplay.c (perror_with_name): Make arg const char *.
10034 * server.h (target_signal_to_name): Make return type const char *.
0842e787 10035 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 10036 * utils.c (perror_with_name): Make arg const char *.
54363045 10037
18aae699
PA
100382009-01-14 Pedro Alves <pedro@codesourcery.com>
10039
10040 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10041 when handling a EXIT_PROCESS_DEBUG_EVENT.
10042
ff703abe
JB
100432009-01-06 Joel Brobecker <brobecker@adacore.com>
10044
10045 * gdbreplay.c (gdbreplay_version): Update copyright year.
10046 * server.c (gdbserver_version): Likewise.
10047
f21cc1a2 100482009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
10049
10050 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 10051 (handle_extended_wait): Improve comment.
0e21c1ec 10052
bca929d3
DE
100532008-12-13 Doug Evans <dje@google.com>
10054
10055 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10056 * server.h (ATTR_MALLOC): New macro.
10057 (xmalloc,xcalloc,xstrdup): Declare.
10058 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10059 * inferiors.c: Ditto.
10060 * linux-low.c: Ditto.
10061 * mem-break.c: Ditto.
10062 * regcache.c: Ditto.
10063 * remote-utils.c: Ditto.
10064 * server.c: Ditto.
10065 * target.c: Ditto.
10066 * win32-low.c: Ditto.
10067
97438e3f
DE
100682008-12-12 Doug Evans <dje@google.com>
10069
896c7fbb
DE
10070 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10071 in debugging printf.
10072
97438e3f
DE
10073 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10074
e3b886f8
DE
100752008-12-09 Doug Evans <dje@google.com>
10076
10077 * linux-low.h (struct process_info): Delete member tid, unused.
10078 * thread-db.c (find_one_thread): Update.
10079 (maybe_attach_thread): Update.
10080
07e059b5
VP
100812008-12-02 Pedro Alves <pedro@codesourcery.com>
10082
889bf7c5
PA
10083 * target.h (struct target_ops): Add qxfer_osdata member.
10084 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10085 and dirent.h.
10086 (linux_qxfer_osdata): New functions.
10087 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10088 callback.
10089 * server.c (handle_query): Handle "qXfer:osdata:read:".
10090 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10091 (buffer_xml_printf): New functions.
10092 * server.h (struct buffer): New.
10093 (buffer_grow_str, buffer_grow_str0): New macros.
10094 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10095 (buffer_xml_printf): Declare.
07e059b5 10096
4cab47ab
DE
100972008-11-24 Doug Evans <dje@google.com>
10098
10099 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10100
f142445f
DJ
101012008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10102
10103 * server.c (handle_v_run): Always use the supplied argument list.
10104
d0107bb6 101052008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 10106
d0107bb6
BW
10107 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10108 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 10109
2c4ad781
TJB
101102008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10111
10112 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10113 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10114 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10115 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10116 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10117 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10118 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10119 XML target descriptions.
10120 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10121 when inferior is running on an ISA 2.05 or later processor. Add
10122 special case to return offset for full 64-bit slot of FPSCR when
10123 in 32-bits.
10124
dfb64f85
DJ
101252008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10126
10127 * Makefile.in (SFILES, clean): Added sparc64 files.
10128 (reg-sparc64.o, reg-sparc64.c): New.
10129 * configure.srv (sparc*-*-linux*): New configuration.
10130 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10131 syscall arguments for SPARC.
10132 (regsets_store_inferior_registers): Likewise.
10133 * linux-sparc-low.c: New file.
10134
66b6e1dd
DE
101352008-10-21 Doug Evans <dje@google.com>
10136
10137 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10138 (READLINE_DIR,READLINE_DEP): Delete.
10139 (INTERNAL_CFLAGS): Update.
10140 (LINTFLAGS): Update.
10141
9b710a42
PA
101422008-10-10 Pedro Alves <pedro@codesourcery.com>
10143
10144 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10145 whole argv from the last run, not just argv[0].
10146
5822d809
PA
101472008-09-08 Pedro Alves <pedro@codesourcery.com>
10148
10149 * regcache.c (new_register_cache): Return NULL if the register
10150 cache size isn't known yet.
10151 (free_register_cache): Avoid dereferencing a NULL regcache.
10152
74aac56f
DJ
101532008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10154
10155 * configure.srv: Merge MIPS and MIPS64.
10156
400b20f5
MR
101572008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10158
10159 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10160
677c5bb1
LM
101612008-08-18 Luis Machado <luisgpm@br.ibm.com>
10162
10163 * Makefile.in: Add required vsx dependencies.
10164
10165 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10166 Declare init_registers_powerpc_vsx32l.
10167 Declare init_registers_powerpc_vsx64l.
10168 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10169 (ppc_arch_setup): Check for VSX in hwcap.
10170 (ppc_fill_vsxregset): New function.
10171 (ppc_store_vsxregset): New function.
10172 Add new VSX entry in regset_info target_regsets.
10173
10174 * configure.srv: Add new VSX dependencies.
10175
a6f3e723
SL
101762008-08-12 Pedro Alves <pedro@codesourcery.com>
10177
10178 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10179 (remote_open): Set or clear transport_is_reliable.
10180 (putpkt_binary): Don't expect acks in noack mode.
10181 (getpkt): Don't send ack/nac in noack mode.
10182 * server.c (handle_general_set): Handle QStartNoAckMode.
10183 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10184 qSupported.
10185 (main): Reset noack_mode on every connection.
10186 * server.h (noack_mode): Declare.
10187
a417dc56
RW
101882008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10189
10190 * Makefile.in (GDBREPLAY_OBS): New variable.
10191 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10192
3221518c
UW
101932008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10194 Daniel Jacobowitz <dan@codesourcery.com>
10195
10196 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10197 (usr_store_inferior_registers): Likewise.
10198 (regsets_store_inferior_registers): Likewise.
10199
ec56be1b
PA
102002008-07-31 Rolf Jansen <rj@surtec.com>
10201 Pedro Alves <pedro@codesourcery.com>
10202
10203 * configure.ac: Check for memmem declaration.
10204 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10205 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10206 (disable_packet_qfThreadInfo): Unconditionally compile.
10207 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10208 * configure, config.in: Regenerate.
10209
2fe5e3ff
DE
102102008-07-28 Doug Kwan <dougkwan@google.com>
10211
10212 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10213 (linux_write_memory): Remove declaration of errno.
10214
836acd6d
UW
102152008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10216
10217 * linux-low.c (handle_extended_wait): Do not use "status"
10218 variable uninitialized.
10219
aeba519e
PA
102202008-07-07 Pedro Alves <pedro@codesourcery.com>
10221
10222 * server.c (handle_v_attach): Inhibit reporting dll changes.
10223
db42f210
PA
102242008-06-27 Pedro Alves <pedro@codesourcery.com>
10225
10226 * remote-utils.c (prepare_resume_reply): If requested, don't
10227 output "thread:TID" in the T stop reply.
10228
10229 * server.c (disable_packet_vCont, disable_packet_Tthread)
10230 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10231 (handle_query): If requested, disable support for qC, qfThreadInfo
10232 and qsThreadInfo.
10233 (handle_v_requests): If requested, disable support for vCont.
10234 (gdbserver_show_disableable): New.
10235 (main): Handle --disable-packet and --disable-packet=LIST.
10236
10237 * server.h (disable_packet_vCont, disable_packet_Tthread)
10238 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10239
8e4c5421
CD
102402008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10241
10242 * server.c (gdbserver_usage): Mention --version.
10243
6e23a804
DJ
102442008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10245
10246 * Makefile.in (gdbreplay.o): New rule.
10247
90aa6a40
JM
102482008-06-06 Joseph Myers <joseph@codesourcery.com>
10249
10250 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10251 message, not gdbserver.
10252
c16158bc 102532008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
10254 Nathan Sidwell <nathan@codesourcery.com>
10255 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
10256
10257 * acinclude.m4: Include ../../config/acx.m4.
10258 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10259 * configure, config.in: Regenerate.
10260 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10261 * server.c (gdbserver_version): Print PKGVERSION.
10262 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10263 (main): Adjust gdbserver_usage calls.
10264 * gdbreplay.c (version, host_name): Add declarations.
10265 (gdbreplay_version, gdbreplay_usage): New.
10266 (main): Accept --version and --help options.
10267
aeb75bf5
DJ
102682008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10269
10270 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10271 (arm_breakpoint_at): Handle Thumb.
10272 (the_low_target): Add comment.
10273
76b233dd
UW
102742008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10275
10276 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10277
08388c79
DE
102782008-05-09 Doug Evans <dje@google.com>
10279
a3c83fae
DE
10280 * server.h (decode_search_memory_packet): Declare.
10281 * remote-utils.c (decode_search_memory_packet): New fn.
10282 * server.c (handle_search_memory_1): New fn.
08388c79
DE
10283 (handle_search_memory): New fn.
10284 (handle_query): Process qSearch:memory packets.
10285
bb9c3d36
UW
102862008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10287
10288 * regcache.c (registers_length): Remove.
10289 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10290 full register packet.
10291 * regcache.h (registers_length): Remove prototype.
10292 * server.h (PBUFSIZ): Define to 16384.
10293
7284e1be
UW
102942008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10295
10296 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10297 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10298 powerpc-64l.o, and powerpc-altivec64l.o.
10299 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10300 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10301 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10302 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10303 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10304 to srv_xmlfiles.
10305
10306 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10307 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10308 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10309 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10310 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10311 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10312 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10313 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10314 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10315 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10316 (clean): Update.
10317
10318 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10319 (init_registers_powerpc_32l): ... this new prototype.
10320 (init_registers_powerpc_32): Remove, replace by ...
10321 (init_registers_powerpc_altivec32l): ... this new prototype.
10322 (init_registers_powerpc_e500): Remove, replace by ...
10323 (init_registers_powerpc_e500l): ... this new prototype.
10324 (init_registers_ppc64): Remove, replace by ...
10325 (init_registers_powerpc_64l): ... this new prototype.
10326 (init_registers_powerpc_64): Remove, replace by ...
10327 (init_registers_powerpc_altivec64l): ... this new prototype.
10328 (ppc_num_regs): Set to 73.
10329 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10330 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10331 (ppc_cannot_store_register): Handle orig_r3 and trap.
10332 (ppc_arch_setup): Update init_registers_... calls.
10333 (ppc_fill_gregset): Handle orig_r3 and trap.
10334
10335 * inferiors.c (clear_inferiors): Reset current_inferior.
10336
fdc59709
PB
103372008-04-23 Paolo Bonzini <bonzini@gnu.org>
10338
889bf7c5
PA
10339 * acinclude.m4: Add override.m4.
10340 * configure: Regenerate.
fdc59709 10341
c9b2f845
UW
103422008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10343
10344 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10345 initial call to init_register_ppc64.
10346
550512b8
UW
103472008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10348
43aaf8b6
PA
10349 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10350 single powerpc*-*-linux* case.
550512b8
UW
10351 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10352
b6430ec3
UW
103532008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10354
10355 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 10356 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
10357 from reg_xmlfiles.
10358 * linux-ppc-low.c: Include <elf.h>.
10359 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10360 (ppc_hwcap): New global variable.
10361 (ppc_regmap): Remove __SPE__ #ifdef sections.
10362 (ppc_regmap_e500): New global variable.
10363 (ppc_cannot_store_register): Update __SPE__ special case.
10364 (ppc_get_hwcap): New function.
10365 (ppc_arch_setup): Use it to determine whether inferior supports
10366 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10367 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10368 Do not access registers if target does not support AltiVec.
10369 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10370 Do not access registers if target does not support SPE.
10371 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10372
52fa2412
UW
103732008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10374
10375 * linux-low.c (disabled_regsets, num_regsets): New.
10376 (use_regsets_p): Delete.
10377 (linux_wait_for_process): Clear disabled_regsets.
10378 (regsets_fetch_inferior_registers): Check and set it.
10379 (regsets_store_inferior_registers): Likewise.
10380 (linux_fetch_registers, linux_store_registers): Do not use
10381 use_regsets_p.
10382 (initialize_low): Allocate disabled_regsets.
10383
e28b3332
DJ
103842008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10385
10386 * Makefile.in (LIBOBJS): New.
10387 (OBS): Use LIBOBJS.
10388 (memmem.o): New rule.
10389 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10390 * configure: Regenerated.
10391
4536995d
UW
103922008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10393
10394 * server.c (handle_query): Never return "unsupported" for
10395 qXfer:features:read queries.
10396
221c031f
UW
103972008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10398
10399 * server.c (get_features_xml): Fix inverted condition.
10400 (handle_query): Always support qXfer:feature:read.
10401
ccd213ac
DJ
104022008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10403
10404 * server.c (wrapper_argv): New.
10405 (start_inferior): Handle wrapper_argv. If set, expect an extra
10406 trap.
10407 (gdbserver_usage): Document --wrapper.
10408 (main): Parse --wrapper.
10409
6fe305f7
UW
104102008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10411
10412 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10413 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10414 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10415 (ppc_set_pc): Likewise.
10416 (ppc_arch_setup): New function.
10417 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10418 of collect_register.
889bf7c5 10419 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 10420
5b0a002e
UW
104212008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10422
10423 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10424 instead of linux-ppc64-low.o.
10425 * linux-ppc64-low.c: Remove file.
10426 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10427 (linux-ppc64-low.o): Remove rule.
10428
10429 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10430 (init_registers_powerpc_64): Likewise.
10431 (ppc_regmap): Conditionally define depending on __powerpc64__.
10432 (ppc_cannot_store_register): Do not special-case "fpscr" when
10433 compiled on __powerpc64__.
10434 (ppc_collect_ptrace_register): New function.
10435 (ppc_supply_ptrace_register): New function.
10436 (ppc_breakpoint): Change type to "unsigned int".
10437 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10438 (the_low_target): Conditionally provide initializers for the
889bf7c5 10439 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
10440 collect_ptrace_register and supply_ptrace_register members.
10441
9b4b61c8
UW
104422008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10443
10444 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10445 * server.c (gdbserver_xmltarget): Define.
10446 (get_features_xml): Use it to replace "target.xml" and arch_string.
10447
10448 * configure.srv: Remove srv_xmltarget. Add XML files that were
10449 mentioned there to srv_xmlfiles instead. Remove conditional tests
10450 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10451 srv_xmlfiles and srv_regobj to include all possible choices.
10452 * configure.ac (srv_xmltarget): Remove.
10453 (srv_xmlfiles): Do not add "target.xml".
10454 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10455 checks for supplementary target information.
10456 * configure: Regenerate.
10457 * Makefile.in (XML_TARGET): Remove.
10458 (target.xml): Remove rule.
10459 (clean): Do not clean up target.xml.
10460 (.PRECIOUS): Do not mention target.xml.
10461
10462 * target.h (struct target_ops): Remove arch_string member.
10463 * linux-low.c (linux_arch_string): Remove.
10464 (linux_target_ops): Remove arch_string initializer.
10465 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10466 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10467 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10468 * spu-low.c (spu_arch_string): Remove.
10469 (spu_target_ops): Remove arch_string initializer.
10470 * win32-low.c (win32_arch_string): Remove.
10471 (win32_target_ops): Remove arch_string initializer.
10472 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10473 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10474 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10475
ee1a7ae4
UW
104762008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10477
10478 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10479 by collect_ptrace_register and supply_ptrace_register hooks.
10480 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10481 instead of checking for the_low_target.left_pad_xfer.
10482 (usr_store_inferior_registers): Use collect_ptrace_register callback
10483 instead of checking for the_low_target.left_pad_xfer.
10484
10485 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10486 (s390_supply_ptrace_register): Likewise.
10487 (s390_fill_gregset): Call s390_collect_ptrace_register.
10488 (the_low_target): Update.
10489
10490 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10491 (ppc_supply_ptrace_register): Likewise.
10492 (the_low_target): Update.
10493
10494 * linux-i386-low.c (the_low_target): Update.
10495 * linux-x86-64-low.c (the_low_target): Update.
10496
d61ddec4
UW
104972008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10498
10499 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10500 reg-s390.o and reg-s390x.o.
10501
10502 * linux-low.c (new_inferior): New global variable.
10503 (linux_create_inferior, linux_attach): Set it.
10504 (linux_wait_for_process): Call the_low_target.arch_setup after the
10505 target has stopped for the first time.
10506 (initialize_low): Do not call the_low_target.arch_setup.
10507
10508 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10509 (s390_set_pc): Likewise.
10510 (s390_arch_setup): New function.
10511 (the_low_target): Use s390_arch_setup as arch_setup routine.
10512
10513 * regcache.c (realloc_register_cache): New function.
10514 (set_register_cache): Call it for each existing regcache.
10515
d05b4ac3
UW
105162008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10517
10518 * server.h (init_registers): Remove prototype.
10519
10520 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10521 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10522 instead of init_registers ().
10523 * linux-arm-low.c (init_registers_arm): Add prototype.
10524 (init_registers_arm_with_iwmmxt): Likewise.
10525 (the_low_target): Add initializer for arch_setup field.
10526 * linux-cris-low.c (init_registers_cris): Add prototype.
10527 (the_low_target): Add initializer for arch_setup field.
10528 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10529 (the_low_target): Add initializer for arch_setup field.
10530 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10531 (the_low_target): Add initializer for arch_setup field.
10532 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10533 (the_low_target): Add initializer for arch_setup field.
10534 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10535 (the_low_target): Add initializer for arch_setup field.
10536 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10537 (the_low_target): Add initializer for arch_setup field.
10538 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10539 (init_registers_mips64_linux): Likewise.
10540 (the_low_target): Add initializer for arch_setup field.
10541 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10542 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10543 (the_low_target): Add initializer for arch_setup field.
10544 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10545 (init_registers_powerpc_64): Likewise.
10546 (the_low_target): Add initializer for arch_setup field.
10547 * linux-s390-low.c (init_registers_s390): Add prototype.
10548 (init_registers_s390x): Likewise.
10549 (the_low_target): Add initializer for arch_setup field.
10550 * linux-sh-low.c (init_registers_sh): Add prototype.
10551 (the_low_target): Add initializer for arch_setup field.
10552 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10553 (the_low_target): Add initializer for arch_setup field.
10554 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10555 (the_low_target): Add initializer for arch_setup field.
10556
10557 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10558 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10559 instead of init_registers ().
10560 * win32-arm-low.c (init_registers_arm): Add prototype.
10561 (the_low_target): Add initializer for arch_setup field.
10562 * win32-i386-low.c (init_registers_i386): Add prototype.
10563 (the_low_target): Add initializer for arch_setup field.
10564
10565 * spu-low.c (init_registers_spu): Add prototype.
10566 (initialize_low): Call initialie_registers_spu () instead of
10567 initialize_registers ().
10568
fd96d250
PA
105692008-02-19 Pedro Alves <pedro@codesourcery.com>
10570
10571 * server.c (handle_v_requests): When handling the vRun and vAttach
10572 packets, if already debugging a process, don't kill it. Return an
10573 error instead.
10574
d41b6bb4
DJ
105752008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10576
10577 * server.c (handle_query): Correct length check.
10578
5ac588cf
PA
105792008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10580
10581 * win32-low.c (do_initial_child_stuff): Add process handle
10582 parameter. Set current_process_handle and current_process_id from the
10583 parameters. Clear globals.
10584 (win32_create_inferior): Don't set current_process_handle and
10585 current_process_id here. Instead pass them on the call to
10586 do_initial_child_stuff.
10587 (win32_attach): Likewise.
10588 (win32_clear_inferiors): New.
10589 (win32_kill): Don't close the current process handle or the
10590 current thread handle here. Instead call win32_clear_inferiors.
10591 (win32_detach): Don't open a new handle to the process. Call
10592 win32_clear_inferiors.
10593 (win32_join): Don't rely on current_process_handle; open a new
10594 handle using the process id.
10595 (win32_wait): Call win32_clear_inferiors when the inferior process
10596 has exited.
10597
ecd7ecbc
DJ
105982008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10599
10600 * server.c (monitor_show_help): Add "exit".
10601
1525d545
MG
106022008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10603
ecd7ecbc 10604 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
10605 (clean): Add reg-xtensa.c.
10606 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
10607 * configure.srv (xtensa*-*-linux*) New target.
10608 * linux-xtensa-low.c: New.
10609 * xtensa-xtregs.c: New.
1525d545 10610
59a016f0
PA
106112008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10612
10613 * hostio.c: Don't include errno.h.
10614 (errno_to_fileio_errno): Move to hostio-errno.
10615 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10616 error number outputting to the target->hostio_last_error callback.
10617 (hostio_packet_error): Use FILEIO_EINVAL directly.
10618 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10619 calls to hostio_error.
10620 * hostio-errno.c: New.
10621 * server.h (hostio_last_error_from_errno): Declare.
10622 * target.h (target_ops): Add hostio_last_error member.
10623 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10624 as hostio_last_error handler.
889bf7c5 10625 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
10626 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10627 (wince_hostio_last_error): New functions.
10628 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10629 as hostio_last_error handler.
10630 (win32_target_ops) [!_WIN32_WCE]: Register
10631 hostio_last_error_from_errno as hostio_last_error handler.
10632 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10633 (hostio-errno.o): New rule.
10634 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10635 * configure.srv (srv_hostio_err_objs): New variable. Default to
10636 hostio-errno.o.
10637 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10638 * configure: Regenerate.
10639
2d717e4f
DJ
106402008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10641
10642 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10643 (linux_kill, linux_detach): Clean up the process list.
10644 * remote-utils.c (remote_open): Improve port number parsing.
10645 (putpkt_binary, input_interrupt): Only send interrupts if the target
10646 is running.
10647 * server.c (extended_protocol): Make static.
10648 (attached): Define earlier.
10649 (exit_requested, response_needed, program_argv): New variables.
10650 (target_running): New.
10651 (start_inferior): Clear attached here.
10652 (attach_inferior): Set attached here.
10653 (require_running): Define.
10654 (handle_query): Use require_running and target_running. Implement
10655 "monitor exit".
10656 (handle_v_attach, handle_v_run): New.
10657 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10658 (gdbserver_usage): Update.
10659 (main): Redo argument parsing. Handle --debug and --multi. Handle
10660 --attach along with other options or after the port. Save
10661 program_argv. Support no initial program. Resynchronize
10662 communication with GDB after an error. Handle "monitor exit".
10663 Use require_running and target_running. Always allow the extended
10664 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10665 restart in extended mode.
10666 * README: Refer to the GDB manual. Update --attach usage.
10667
7407e2de
AS
106682007-12-20 Andreas Schwab <schwab@suse.de>
10669
10670 * linux-low.c (STACK_SIZE): Define.
10671 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10672 (linux_test_for_tracefork): Likewise.
10673
b65d95c5
DJ
106742007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10675
10676 * linux-low.c (linux_wait_for_event): Update messages. Do not
10677 reinsert auto-delete breakpoints.
10678 * mem-break.c (struct breakpoint): Change return type of handler to
10679 int.
10680 (set_breakpoint_at): Update handler type.
10681 (reinsert_breakpoint_handler): Return 1 instead of calling
10682 delete_breakpoint.
10683 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10684 setting a new one.
10685 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10686 * mem-break.h (set_breakpoint_at): Update handler type.
10687 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10688 * win32-low.c (auto_delete_breakpoint): New.
10689 (get_child_debug_event): Use it.
10690
4e799345
DJ
106912007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10692
10693 * configure.ac: Check for pread and pwrite.
10694 * hostio.c (handle_pread): Fall back to lseek and read.
10695 (handle_pwrite): Fall back to lseek and write.
10696 * config.in, configure: Regenerated.
10697
27524b67
DJ
106982007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10699
10700 * server.c (myresume): Add own_buf argument.
10701 (main): Update calls.
10702
a20d5e98
DJ
107032007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10704
10705 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10706 * remote-utils.c (remote_open): Do not call disable_async_io.
10707 (block_async_io): Delete.
10708 (unblock_async_io): Make static.
10709 (initialize_async_io): New.
10710 * server.c (handle_v_cont): Handle async I/O here.
10711 (myresume): Likewise. Move other common resume tasks here...
10712 (main): ... from here. Call initialize_async_io. Disable async
10713 I/O before the main loop.
10714 * server.h (initialize_async_io): Declare.
10715 (block_async_io, unblock_async_io): Delete prototypes.
10716 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10717
b79d787e
DJ
107182007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10719
10720 * remote-utils.c (readchar): Allow binary data in received messages.
10721
d97903b2
PA
107222007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10723
10724 * win32-low.c (attaching): New global.
10725 (win32_create_inferior): Clear the `attaching' global.
10726 (win32_attach): Set the `attaching' global.
10727 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10728 attaching. Only set a breakpoint at the entry point if not
10729 attaching.
10730
311de423
PA
107312007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10732
10733 * server.c (main): Don't report dll events on the initial
10734 connection on attaches.
10735
6c2d16d2
PA
107362007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10737
10738 * server.c (main): Relax numerical bases supported for the pid of
10739 the --attach command line argument.
10740
5ca906e6
PA
107412007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10742
10743 * win32-low.c (win32_attach): Call OpenProcess before
10744 DebugActiveProcess, not after. Add last error output to error
10745 call.
10746
9c6c8194
PA
107472007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10748
10749 * win32-low.c (win32_get_thread_context)
10750 (win32_set_thread_context): New functions.
10751 (thread_rec): Use win32_get_thread_context.
10752 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10753 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10754 field.
10755
4d5d1aaa
PA
107562007-12-03 Leo Zayas
10757 Pedro Alves <pedro_alves@portugalmail.pt>
10758
10759 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10760 global variables.
10761 (child_add_thread): Minor cleanup.
10762 (child_continue): Resume artificially suspended threads before
10763 calling ContinueDebugEvent.
10764 (suspend_one_thread): New.
10765 (fake_breakpoint_event): New.
10766 (get_child_debug_event): Change return type to int. Check here if
10767 gdb sent an interrupt request. If a soft interrupt was requested,
10768 fake a breakpoint event. Return 0 if there is no event to handle,
10769 and 1 otherwise.
10770 (win32_wait): Don't check here if gdb sent an interrupt request.
10771 Ensure there is a valid event to handle.
10772 (win32_request_interrupt): Add soft interruption method as last
10773 resort.
10774
c436e841
PA
107752007-12-03 Leo Zayas
10776 Pedro Alves <pedro_alves@portugalmail.pt>
10777
10778 * win32-low.h (win32_thread_info): Add descriptions to the
10779 structure members. Replace `suspend_count' counter by a
10780 `suspended' flag.
10781 * win32-low.c (thread_rec): Update condition of when to get the
10782 context from the inferior. Rely on ContextFlags being set if it
10783 has already been retrieved. Only suspend the inferior thread if
10784 we haven't already. Warn if that fails.
10785 (continue_one_thread): s/suspend_count/suspended/. Only call
10786 ResumeThread once. Warn if that fails.
10787
e7b5fa67
PA
107882007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10789
10790 * win32-low.c (win32_wait): Don't read from the inferior when it
10791 has already exited.
10792
a385171d
PA
107932007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10794
10795 * Makefile.in (win32_low_h): New variable.
10796 (win32-low.o): Add dependency on $(win32_low_h).
10797 (win32-arm-low.o, win32-i386-low.o): New rules.
10798
f80c84b3
DJ
107992007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10800
10801 * hostio.c: Correct copyright year.
10802
a6b151f1
DJ
108032007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10804
10805 * Makefile.in (OBS): Add hostio.o.
10806 (hostio.o): New rule.
10807 * server.h (handle_vFile): Declare.
10808 * hostio.c: New file.
10809 * server.c (handle_v_requests): Take packet_len and new_packet_len
10810 for binary packets. Call handle_vFile.
10811 (main): Update call to handle_v_requests.
10812
f9387fc3
DJ
108132007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10814
10815 * linux-low.c: Include <sched.h>.
10816
51c2684e
DJ
108172007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10818
10819 * linux-low.c (linux_tracefork_grandchild): New.
10820 (linux_tracefork_child): Use clone.
10821 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10822
75f83163
JB
108232007-10-31 Joel Brobecker <brobecker@adacore.com>
10824
10825 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10826
da5898ce
DJ
108272007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10828
10829 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10830
24a09b5f
DJ
108312007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10832
10833 * inferiors.c (change_inferior_id): Delete.
10834 (add_pid_to_list, pull_pid_from_list): New.
10835 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10836 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10837 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10838 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10839 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10840 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10841 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10842 (using_threads): Always set to 1.
10843 (handle_extended_wait): New.
10844 (add_process): Do not set TID.
10845 (linux_create_inferior): Set must_set_ptrace_flags.
10846 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10847 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10848 (linux_thread_alive): Rename TID argument to LWPID.
10849 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10850 (linux_wait_for_event): Do not use TID or check using_threads. Update
10851 call to dead_thread_notify. Call handle_extended_wait.
10852 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10853 (send_sigstop): Delete sigstop_sent.
10854 (wait_for_sigstop): Avoid TID.
10855 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10856 (linux_test_for_tracefork): New.
10857 (linux_lookup_signals): Use thread_db_active and
10858 linux_supports_tracefork_flag.
10859 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10860 * linux-low.h (get_process_thread): Avoid TID.
10861 (struct process_ifo): Move thread_known and tid to the end. Remove
10862 sigstop_sent.
10863 (linux_attach_lwp, thread_db_init): Update prototypes.
10864 * server.h (change_inferior_id): Delete prototype.
10865 (add_pid_to_list, pull_pid_from_list): New prototypes.
10866 * thread-db.c (thread_db_use_events): New.
10867 (find_first_thread): Rename to...
10868 (find_one_thread): ...this. Update callers and messages. Do not
10869 call fatal. Check thread_db_use_events. Do not call
10870 change_inferior_id or new_thread_notify.
10871 (maybe_attach_thread): Update. Do not call new_thread_notify.
10872 (thread_db_init): Set thread_db_use_events. Check use_events.
10873 * utils.c (fatal, warning): Correct message prefix.
10874
30ed0a8f
DJ
108752007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10876
10877 * Makefile.in (clean): Remove new files.
10878 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10879 (powerpc-64.o, powerpc-64.c): New rules.
10880 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10881 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10882 with SPE.
10883 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10884 SPE targets.
10885 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10886 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10887 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10888 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10889 (target_regsets): Add AltiVec and SPE register sets.
10890 * configure.ac: Check for AltiVec and SPE.
10891 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10892 (ppc_fill_vrregset, ppc_store_vrregset): New.
10893 (target_regsets): Add AltiVec register set.
10894 * configure: Regenerated.
10895
fd462a61
DJ
108962007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10897
10898 * linux-low.c (O_LARGEFILE): Define.
10899 (linux_read_memory): Use /proc/PID/mem.
10900 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10901 * configure, config.in: Regenerated.
10902
69f223ed
DJ
109032007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10904
10905 * linux-low.c (linux_wait_for_event): Do not pass signals while
10906 single-stepping.
10907
aec18585
PA
109082007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10909
10910 * win32-low.c (create_process): New.
10911 (win32_create_inferior): Use create_process instead of
10912 CreateProcess. If create_process failed retry appending an ".exe"
10913 suffix. Store the GetLastError result immediatelly after
10914 create_process calls and use it on the call to error.
10915
34d86ddd
PA
109162007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10917
10918 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10919
5a0e3bd0
JB
109202007-08-23 Joel Brobecker <brobecker@adacore.com>
10921
10922 * configure.ac: Switch license to GPLv3.
10923
f88c79e6
MS
109242007-08-01 Michael Snyder <msnyder@access-company.com>
10925
10926 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10927
6b3d9b83
PA
109282007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
10929
10930 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10931 typedef.
10932 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10933 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
10934 CloseToolhelp32Snapshot.
10935 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10936 CloseToolhelp32Snapshot.
10937
c588c53c
MS
109382007-07-27 Michael Snyder <michael.snyder@access-company.com>
10939
10940 * server.c (main): Check for inferior exit before main loop.
10941
aa0403d9
PA
109422007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
10943
10944 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
10945 instead of on tmp_desc.
10946
255e7678
DJ
109472007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
10948 Daniel Jacobowitz <dan@codesourcery.com>
10949
10950 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
10951 (add_thread): Minor cleanups.
10952 (clear_inferiors): Move lower in the file. Clear the DLL
10953 list.
10954 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
10955 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
10956 (xml_escape_text): New.
10957 * server.c (handle_query): Handle qXfer:libraries:read. Report it
10958 for qSupported.
10959 (handle_v_cont): Report errors.
10960 (gdbserver_version): Update.
10961 (main): Correct size of own_buf. Do not report initial DLL events.
10962 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
10963 (unloaded_dll, xml_escape_text): New.
10964 * win32-low.c (enum target_waitkind): Update comments.
10965 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
10966 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
10967 (win32_EnumProcessModules, win32_GetModuleInformation)
10968 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
10969 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
10970 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
10971 (win32_Module32First, win32_Module32Next, load_toolhelp)
10972 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
10973 (get_child_debug_event): Handle DLL events.
10974 (win32_wait): Likewise.
10975
0d37add9
DJ
109762007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10977
10978 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
10979 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
10980
45e2715e
PA
109812007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10982
10983 * win32-low.c (handle_output_debug_string): Ignore event if not
10984 waiting.
10985
c5674cf1
PA
109862007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10987
10988 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
10989
2bbe3cc1
DJ
109902007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
10991
10992 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
10993
ae13219e
DJ
109942007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
10995
10996 * inferiors.c (change_inferior_id): Add comment.
10997 * linux-low.c (check_removed_breakpoint): Add an early
10998 prototype. Improve debug output.
10999 (linux_attach): Doc update.
11000 (linux_detach_one_process, linux_detach): Clean up before releasing
11001 each process.
11002 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11003 * linux-low.h (struct process_info): Doc improvement.
11004 * mem-break.c (delete_all_breakpoints): New.
11005 * mem-break.h (delete_all_breakpoints): New prototype.
11006 * thread-db.c (find_first_thread): New.
11007 (thread_db_create_event): Call it instead of
11008 thread_db_find_new_threads. Clean up unused variables.
11009 (maybe_attach_thread): Remove first thread handling.
11010 (thread_db_find_new_threads): Use find_first_thread.
11011 (thread_db_get_tls_address): Likewise.
11012
4105de34
DJ
110132007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11014
11015 * thread-db.c (thread_db_find_new_threads): Add prototype.
11016 (thread_db_create_event): Check for the main thread before adding
11017 a new thread.
11018 (maybe_attach_thread): Only enable event reporting if TID == 0.
11019 (thread_db_get_tls_address): Check for new threads.
11020
2b876972
DJ
110212007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11022
11023 * linux-low.c (linux_create_inferior): Try execv before execvp.
11024 * spu-low.c (spu_create_inferior): Likewise.
11025
7a245884
DJ
110262007-06-13 Mike Frysinger <vapier@gentoo.org>
11027
11028 * linux-low.c (linux_create_inferior): Change execv to execvp.
11029 * spu-low.c (spu_create_inferior): Likewies.
11030
117ce543
DJ
110312007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11032
11033 * Makefile.in (clean): Clean new files instead of deleted ones.
11034 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11035 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11036 rules.
11037 * configure.srv: Specify XML files and new regformats for MIPS and
11038 MIPS64 GNU/Linux.
11039 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11040 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11041 an entry for the restart register.
11042 (mips_cannot_fetch_register, mips_cannot_store_register)
11043 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11044 register names to match the XML descriptions.
11045 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11046 restart register instead of $0.
11047
0e7f50da
UW
110482007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11049 Markus Deuling <deuling@de.ibm.com>
11050
11051 * remote-utils.c (decode_xfer_write): New function.
11052 * server.h (decode_xfer_write): Add prototype.
11053 * server.c (handle_query): Add PACKET_LEN argument. Support
11054 qXfer:spu:read and qXfer:spu:write packets.
11055 (main): Pass packet_len to handle_query.
11056 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11057 * target.h (target_ops): Add qxfer_spu.
11058
374c1d38
UW
110592007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11060
11061 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11062 accessing non-seekable spufs files.
11063
bb63802a
UW
110642007-05-16 Markus Deuling <deuling@de.ibm.com>
11065
889bf7c5 11066 * server.c (handle_query): Add reply for qC packet.
bb63802a 11067
7390519e
PA
110682007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11069 Leo Zayas <lerele@champenstudios@com>
11070
11071 * server.h (check_remote_input_interrupt_request): New function.
11072 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11073 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11074 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11075 (check_remote_input_interrupt_request): New function.
11076 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 11077 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
11078 winapi_GenerateConsoleCtrlEvent): New typedefs.
11079 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11080 to 250 ms.
11081 (win32_wait): Check for remote interrupt request
11082 with check_remote_input_interrupt_request.
11083 (win32_request_interrupt): New function.
11084 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11085
34b34921
PA
110862007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11087
11088 * win32-low.c (debug_registers_changed,
11089 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11090 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11091 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11092 (thread_rec): Get context using the low target.
11093 (child_add_thread): Call thread_added on the low target,
11094 which does the same thing.
11095 (regptr): Delete.
11096 (do_initial_child_stuff): Remove debug registers references.
11097 Set context using the low target. Resume threads after
11098 setting the contexts.
11099 (child_continue): Remove dead variable. Remove debug
11100 registers references.
11101 (child_fetch_inferior_registers): Go through the low target.
11102 (do_child_store_inferior_registers): Remove.
11103 (child_store_inferior_registers): Go through the low target.
11104 (win32_resume): Remove debug registers references.
11105 Set context using the low target.
11106 (handle_exception): Change return type to void. Don't record
11107 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11108 first chance exception.
889bf7c5 11109 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
11110 goto loop. Always return after waiting for debug event.
11111 (win32_wait): Convert to switch statement. Handle spurious
11112 events.
11113
11114 * win32-i386-low.c (debug_registers_changed,
11115 debug_registers_used): New.
11116 (initial_stuff): Rename to ...
11117 (i386_initial_stuff): ... this. Clear debug registers
11118 state variables.
11119 (store_debug_registers): Delete.
11120 (i386_get_thread_context): New.
11121 (load_debug_registers): Delete.
11122 (i386_set_thread_context): New.
11123 (i386_thread_added): New.
11124 (single_step): Rename to ...
11125 (i386_single_step): ... this.
11126 (do_fetch_inferior_registers): Rename to ...
11127 (i386_fetch_inferior_register): ... this.
11128 (i386_store_inferior_register): New.
11129 (the_low_target): Adapt to new interface.
11130
11131 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11132 (arm_get_thread_context): New.
11133 (arm_set_thread_context): New.
11134 (regptr): New.
11135 (do_fetch_inferior_registers): Rename to ...
11136 (arm_fetch_inferior_register): ... this.
11137 (arm_store_inferior_register): New.
11138 (arm_wince_breakpoint): Reimplement as unsigned long.
11139 (arm_wince_breakpoint_len): Define.
11140 (the_low_target): Adapt to new interface.
11141
11142 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11143 load_debug_registers. Add get_thread_context, set_thread_context,
11144 thread_added and store_inferior_register. Rename
11145 fetch_inferior_registers to fetch_inferior_register.
11146 (regptr): Remove declaration.
11147
dd6953e1
PA
111482007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11149
11150 * linux-low.c (linux_detach): Change return type to int. Return 0.
11151 * spu-low.c (spu_detach): Likewise.
11152
444d6139
PA
111532007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11154
11155 * target.h (target_ops): Change return type of detach to int.
11156 Add join.
11157 (join_inferior): New.
11158 * server.c (main): Don't skip detach support on mingw32.
11159 If the inferior doesn't support detaching return error.
11160 Call join_inferior instead of using waitpid.
11161 * linux-low.c (linux_join): New.
11162 (linux_target_op): Add linux_join.
11163 * spu-low.c (spu_join): New.
11164 (spu_target_ops): Add spu_join.
11165 * win32-low.c (win32_detach): Adapt to new interface.
11166 Reopen current_process_handle before detaching. Issue a child
11167 resume before detaching.
11168 (win32_join): New.
11169 (win32_target_op): Add win32_join.
11170
1d5315fe
PA
111712007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11172
11173 * win32-low.c (win32-attach): Fix return value.
11174 * target.h (target_ops): Describe ATTACH return values.
11175
bf914831
PA
111762007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11177
11178 * win32-low.c (GETPROCADDRESS): Define.
11179 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11180 (winapi_DebugSetProcessKillOnExit): Likewise.
11181 (win32_create_inferior): Force usage of ansi CreateProcessA.
11182 (win32_attach): Use GETPROCADDRESS.
11183 (win32_detach): Likewise.
11184
f72f3e60
PA
111852007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11186
11187 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11188
ed50f18f
PA
111892007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11190
11191 * win32-low.c: Commit leftover changes from 2007-03-29.
11192
0c2ead7e
DJ
111932007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11194
11195 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11196 fields short instead of int. Add explicit padding.
11197 (i387_cache_to_fsave): Remove unnecessary casts.
11198 (i387_fsave_to_cache): Doc fix.
11199 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11200
73725ff3
DJ
112012007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11202
11203 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11204 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11205
d99f33d8
PA
112062007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11207
11208 * configure.srv (arm*-*-mingw32ce*): Move near the other
11209 arm targets.
11210
68070c10
PA
112112007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11212
2482afc6 11213 * configure.ac: Add errno checking.
68070c10
PA
11214 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11215 sys/file.h and malloc.h.
11216 (AC_CHECK_DECLS): Add perror.
11217 (srv_mingwce): Handle.
2482afc6 11218 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
11219 win32-i386-low.o to srv_tgtobj.
11220 (i[34567]86-*-mingw*): Likewise.
11221 (arm*-*-mingw32ce*): Add case.
11222 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11223 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11224 [__MINGW32CE__] (strerror): New function.
11225 [__MINGW32CE__] (errno): Define to GetLastError.
11226 [__MINGW32CE__] (COUNTOF): New macro.
11227 (remote_open): Remove extra close call.
11228 * mem-break.c (delete_breakpoint_at): New function.
11229 * mem-break.h (delete_breakpoint_at): Declare.
11230 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11231 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11232 [USE_WIN32API] (read, write): Add char* casts.
11233 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11234 * server.h: Include wincecompat.h on Windows CE.
11235 [HAVE_ERRNO_H]: Check.
11236 (perror): Declare if not declared.
11237 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11238 (perror_with_name): Remove errno declaration.
11239 * wincecompat.h: New.
11240 * wincecompat.c: New.
11241 * win32-low.h: New.
11242 * win32-arm-low.c: New.
11243 * win32-i386-low.c: New.
11244 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11245 (OUTMSG2): Make it safe.
11246 (_T): New macro.
11247 (COUNTOF): New macro.
11248 (NUM_REGS): Get it from the low target.
11249 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11250 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11251 (thread_rec): Let low target handle debug registers.
11252 (child_add_thread): Likewise.
11253 (child_init_thread_list): Likewise.
11254 (continue_one_thread): Likewise.
11255 (regptr): New.
11256 (do_child_fetch_inferior_registers): Move to ...
11257 * win32-i386-low.c: ... here, and rename to ...
11258 (do_fetch_inferior_registers): ... this.
889bf7c5 11259 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
11260 Go through the low target.
11261 (do_child_store_inferior_registers): Use regptr.
11262 (strwinerror): New function.
11263 (win32_create_inferior): Handle Windows CE.
11264 Use strwinerror instead of strerror on Windows error
11265 codes. Add program to the error output.
11266 Don't close the main thread handle on Windows CE.
11267 (win32_attach): Use coredll.dll on Windows CE.
11268 (win32_kill): Close current process and current
11269 thread handles.
11270 (win32_detach): Use coredll.dll on Windows CE.
11271 (win32_resume): Let low target handle debug registers, and
11272 step request.
11273 (handle_exception): Add/Remove initial breakpoint. Avoid
11274 non-existant WSTOPSIG on Windows CE.
11275 (win32_read_inferior_memory): Cast to remove warning.
11276 (win32_arch_string): Go through the low target.
11277 (initialize_low): Call set_breakpoint_data with the low
11278 target's breakpoint.
11279 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11280 FOP_REGNUM, mappings): Move to ...
11281 * win32-i386-low.c: ... here.
11282 * win32-low.c (win32_thread_info): Move to ...
11283 * win32-low.h: ... here.
11284 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11285 win32-arm-low.c and wincecompat.c.
11286 (all:): Add $EXEEXT.
11287 (install-only:): Likewise.
11288 (gdbserver:): Likewise.
11289 (gdbreplay:): Likewise.
11290 * config.in: Regenerate.
11291 * configure: Regenerate.
11292
41093d81
PA
112932007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11294
11295 * win32-low.c: Rename typedef thread_info to
11296 win32_thread_info throughout.
11297
544afa54
PA
112982007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11299
11300 * win32-i386-low.c: Rename to ...
11301 * win32-low.c: ... this.
11302 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11303 * Makefile.in: Likewise.
11304
bce7165d
PA
113052007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11306
11307 * remote-utils.c (monitor_output): Constify msg parameter.
11308 * server.h (monitor_output): Likewise.
11309 * win32-i386-low.c (handle_output_debug_string): New.
11310 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11311 handle_output_debug_string.
11312 (get_child_debug_event): Likewise.
11313
506c7aa0
DJ
113142007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11315
11316 * server.c (main): Correct strtoul check.
11317
42c81e2a
DJ
113182007-03-27 Jon Ringle <jon@ringle.org>
11319
11320 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11321
9453113a
DJ
113222007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11323
11324 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11325
64a69107
DJ
113262007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11327
11328 * terminal.h: Check HAVE_SGTTY_H.
11329
113302007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
11331
11332 * remote-utils.c (remote_open): Print out the assigned port number.
11333
c74d0ad8
DJ
113342007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11335
11336 * remote-utils.c (monitor_output): New function.
11337 * server.c (debug_threads): Define here.
11338 (monitor_show_help): New function.
11339 (handle_query): Handle qRcmd.
11340 (main): Do not handle 'd' packet.
11341 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11342 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11343 of debug_threads.
11344
de7c3b4a
PA
113452007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11346
11347 * Makefile.in (EXEEXT): New.
11348 (clean): Use $(EXEEXT).
11349
ef57601b
PA
113502007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11351
11352 * target.h (target_ops): Rename send_signal to request_interrupt,
11353 and remove enum target_signal parameter.
11354 * linux-low.c (linux_request_interrupt): Rename from
11355 linux_send_signal, and always send SIGINT.
11356 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11357 and always send SIGINT.
11358 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11359 of send_signal.
11360 (input_interrupt): Likewise.
11361
820f2bda
PA
113622007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11363
11364 * server.c (get_features_xml): Check if target implemented
11365 arch_string.
11366 * win32-i386-low.c (win32_arch_string): New.
11367 (win32_target_ops): Add win32_arch_string as arch_string member.
11368
ab39bf24
UW
113692007-02-22 Markus Deuling <deuling@de.ibm.com>
11370
11371 * spu-low.c (spu_arch_string): New.
11372 (spu_target_ops): Add spu_arch_string.
11373
61ff6e04
DJ
113742007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11375
11376 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11377 * configure.ac: Do not check for terminal.h.
11378 * configure, config.in: Regenerated.
11379
fb1e4ffc
DJ
113802007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11381
11382 * Makefile.in (OBS): Add $(XML_BUILTIN).
11383 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11384 (clean): Update.
11385 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11386 (arm-with-iwmmxt.c): New.
11387 * config.in, configure: Regenerate.
11388 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11389 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11390 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11391 (arm*-*-linux*): Add iWMMXt and regset support.
11392 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11393 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11394 (arm_store_wmmxregset, target_regsets): New.
11395 * server.c (get_features_xml): Take annex argument. Check builtin
11396 XML documents.
11397 (handle_query): Handle multiple annexes.
11398
0f48aa01
DJ
113992007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11400
11401 * remote-utils.c [USE_WIN32API] (read, write): Define.
11402 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11403 write.
11404
23181151
DJ
114052007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11406
11407 * linux-i386-low.c (the_low_target): Set arch_string.
11408 * linux-x86-64-low.c (the_low_target): Likewise.
11409 * linux-low.c (linux_arch_string): New.
11410 (linux_target_ops): Add it.
11411 * linux-low.h (struct linux_target_ops): Add arch_string.
11412 * server.c (write_qxfer_response): Use const void * for DATA.
11413 (get_features_xml): New.
11414 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11415 * target.h (struct target_ops): Add arch_string method.
11416
9d606399
DJ
114172007-01-03 Denis Pilat <denis.pilat@st.com>
11418 Daniel Jacobowitz <dan@codesourcery.com>
11419
11420 * linux-low.c (linux_kill): Handle being called with no threads.
11421 * win32-i386-low.c (win32_kill): Likewise.
11422 (get_child_debug_event): Clear current_process_handle.
11423
114242006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
11425 Daniel Jacobowitz <dan@codesourcery.com>
11426
11427 * remote-utils.c (remote_open): Check the type of specified
11428 serial port devices before opening them.
11429 * server.c (main): Kill the inferior if an error occurs during
11430 the first remote_open.
11431
a5e13d24
DJ
114322006-12-05 Markus Deuling <deuling@de.ibm.com>
11433
11434 * README: Update supported targets.
11435
186947f7
DJ
114362006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11437
11438 * Makefile.in (clean): Remove reg-mips64.c.
11439 (reg-mips64.c, reg-mips64.o): New rules.
11440 * configure.srv: Handle mips64. Include regset support for mips.
11441 * linux-mips-low.c (union mips_register): New.
11442 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11443 (mips_breakpoint, mips_breakpoint_at): Use int.
11444 (mips_collect_register, mips_supply_register)
11445 (mips_collect_register_32bit, mips_supply_register_32bit)
11446 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11447 (mips_store_fpregset, target_regsets): New.
11448 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11449
a13e2c95
UW
114502006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11451
11452 * configure.srv: Add target "spu*-*-*".
11453 * Makefile.in (clean): Remove reg-spu.c.
11454 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11455 * spu-low.c: New file.
11456
cb7283db
DJ
114572006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11458
11459 * configure.ac: Correct td_thr_tls_get_addr test.
11460 * configure: Regenerated.
11461
89be2091
DJ
114622006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11463
11464 * linux-low.c (linux_wait_for_event): Reformat. Use the
11465 pass_signals array.
11466 * remote-utils.c (decode_address_to_semicolon): New.
11467 * server.c (pass_signals, handle_general_set): New.
11468 (handle_query): Mention QPassSignals for qSupported.
11469 (main): Call handle_general_set.
11470 * server.h (pass_signals, decode_address_to_semicolon): New.
11471
000ef4f0
DJ
114722006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11473
11474 * server.c (handle_query): Correct error handling for read_auxv.
11475
b7149293
UW
114762005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11477
11478 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11479 and srv_linux_thread_db to yes.
11480 * linux-s390-low.c (s390_fill_gregset): New function.
11481 (target_regsets): Define data structure.
11482
dae5f5cf
DJ
114832006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11484
11485 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11486 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11487 * config.in, configure: Regenerated.
11488 * inferiors.c (gdb_id_to_thread): New function.
11489 (gdb_id_to_thread_id): Use it.
11490 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11491 * linux-low.h (struct process_info): Add th member.
11492 (thread_db_get_tls_address): New prototype.
11493 * remote-utils.c (decode_address): Make non-static.
11494 * server.c (handle_query): Handle qGetTLSAddr.
11495 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11496 * target.h (struct target_ops): Add get_tls_address.
11497 * thread-db.c (maybe_attach_thread): Save the thread handle.
11498 (thread_db_get_tls_address): New.
11499
32ca6d61
DJ
115002006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11501
11502 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11503 (linux_resume_one_process): Take a siginfo_t *. Update all
11504 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11505 (struct pending_signals): Add a siginfo_t.
11506 (linux_wait_for_process): Always set last_status.
11507 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11508 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11509 * linux-low.h (struct process_info): Add last_status.
11510
5ffff7c1
DJ
115112006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11512
11513 * remote-utils.c (try_rle): New function.
11514 (putpkt_binary): Use it.
11515
8695c747
DJ
115162006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11517
11518 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11519 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11520 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11521 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11522 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11523 point registers.
11524
290fadea
RS
115252006-08-08 Richard Sandiford <richard@codesourcery.com>
11526
11527 * server.c (terminal_fd): New variable.
11528 (old_foreground_pgrp): Likewise.
11529 (restore_old_foreground_pgrp): New function.
11530 (start_inferior): Record the terminal file descriptor in terminal_fd
11531 and its original foreground group in old_foreground_pgrp. Register
11532 restore_old_foreground_pgrp with atexit().
11533
9f2e1e63
DJ
115342006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11535
11536 * server.c (handle_query): Correct qPart to qXfer.
11537
b80864fb
DJ
115382006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11539
11540 * configure.ac: Check for more headers which are missing on
11541 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11542 * configure.srv: Add Cygwin and mingw32.
11543 * remote-utils.c: Don't include headers unconditionally which
11544 are missing on mingw32. Include <winsock.h> for mingw32.
11545 (remote_open): Adjust for mingw32 support. Flush
11546 standard error after writing to it.
11547 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11548 (unblock_async_io, enable_async_io, disable_async_io)
11549 (readchar, getpkt): Update for Winsock support.
11550 (prepare_resume_reply): Expect a protocol signal number.
11551 * server.c: Disable <sys/wait.h> on mingw32.
11552 (start_inferior): Adjust for mingw32 support. Flush
11553 standard error after writing to it.
11554 (attach_inferior): Likewise. Use protocol signal
11555 numbers.
11556 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11557 and names.
11558 * win32-i386-low.c: New file.
11559 * Makefile.in (XM_CLIBS): Set.
11560 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11561 (win32-i386-low.o): New dependency rule.
11562 * linux-low.c (linux_wait): Use target signal numbers.
11563 * target.h (struct target_ops): Doc fix.
11564 * server.h (target_signal_to_name): New prototype.
11565 * gdbreplay.c: Don't include headers unconditionally which
11566 are missing on mingw32. Include <winsock.h> for mingw32.
11567 (remote_close, remote_open): Adjust for Winsock support.
11568 * configure, config.in: Regenerated.
11569
0876f84a
DJ
115702006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11571
11572 * server.c (decode_xfer_read, write_qxfer_response): New.
11573 (handle_query): Take a packet length argument. Handle
11574 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11575 the qSupported response.
11576 (main): Update call to handle_query.
11577
01f9e8fa
DJ
115782006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11579
11580 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11581 (putpkt_binary): Renamed from putpkt and adjusted for binary
11582 data.
11583 (putpkt): New wrapper for putpkt_binary.
11584 (readchar): Don't mask off the high bit.
11585 (decode_X_packet): New function.
11586 * server.c (main): Call putpkt_binary if a handler sets the packet
11587 length. Save the length of the incoming packet. Handle 'X'.
11588 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11589
be2a5f71
DJ
115902006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11591
11592 * server.c (handle_query): Handle qSupported.
11593
ea025f5f
DJ
115942006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11595
11596 * remote-utils.c (all_symbols_looked_up): New variable.
11597 (look_up_one_symbol): Check it.
11598 * server.h (look_up_one_symbol): New declaration.
11599 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11600
9308fc88
DJ
116012006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11602
11603 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 11604 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
11605 (PTRACE_GET_THREAD_AREA): Define.
11606 (ps_get_thread_area): New function.
11607
52fb6437
NS
116082006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11609
11610 * configure.srv (m68k*-*-uclinux*): New target.
11611 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11612 (linux_resume_one_process): Remove extraneous cast.
11613 (linux_read_offsets): New.
11614 (linux_target_op): Add linux_read_offsets on mmuless systems.
11615 * server.c (handle_query): Add qOffsets logic.
11616 * target.h (struct target_ops): Add read_offsets.
11617
21b0f40c
DJ
116182006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11619
11620 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11621 (PTRACE_GET_THREAD_AREA): Define.
11622 (ps_get_thread_area): New function.
11623 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11624 (linux-x86-64-low.o): Update.
11625
0050a760
DJ
116262006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11627
11628 * configure.ac: Remove checks for prfpregset_t.
11629 * gdb_proc_service.h: New file.
11630 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11631 new "gdb_proc_service.h".
11632 * proc-service.c: Likewise.
11633 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11634 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11635 * Makefile.in (gdb_proc_service_h): Updated.
11636 * configure, config.in: Regenerated.
11637
b92a518e
DJ
116382006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11639
11640 * remote-utils.c (prepare_resume_reply): Move declaration
11641 of gdb_id_from_wait to the top of the block.
11642
545587ee
DJ
116432006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11644
11645 * linux-low.c (regsets_store_inferior_registers): Read the regset
11646 from the target before filling it.
11647
9db87ebd
DJ
116482006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11649
11650 * server.c (attach_inferior): Return SIGTRAP for a successful
11651 attach.
11652
dd24457d
DJ
116532006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11654
11655 * Makefile.in (OBS): Add version.o.
11656 (STAGESTUFF): Delete.
11657 (version.o): Add dependencies.
11658 (version.c): Replace rule.
11659 (clean): Remove version.c.
11660 * server.c (gdbserver_version): New.
11661 (gdbserver_usage): Use printf.
11662 (main): Handle --version and --help.
11663 * server.h (version, host_name): Add declarations.
11664
6f0f660e
EZ
116652005-12-23 Eli Zaretskii <eliz@gnu.org>
11666
889bf7c5
PA
11667 * linux-arm-low.c:
11668 * linux-arm-low.c:
11669 * inferiors.c:
11670 * i387-fp.h:
11671 * i387-fp.c:
11672 * gdbreplay.c:
11673 * regcache.c:
11674 * proc-service.c:
11675 * mem-break.h:
11676 * mem-break.c:
11677 * linux-x86-64-low.c:
11678 * linux-sh-low.c:
11679 * linux-s390-low.c:
11680 * linux-ppc64-low.c:
11681 * linux-ppc-low.c:
11682 * linux-mips-low.c:
11683 * linux-m68k-low.c:
11684 * linux-m32r-low.c:
11685 * linux-low.h:
11686 * linux-low.c:
11687 * linux-ia64-low.c:
11688 * linux-i386-low.c:
11689 * linux-crisv32-low.c:
11690 * thread-db.c:
11691 * terminal.h:
11692 * target.h:
11693 * target.c:
11694 * server.h:
11695 * server.c:
11696 * remote-utils.c:
11697 * regcache.h:
11698 * utils.c:
11699 * Makefile.in:
11700 * configure.ac:
6f0f660e
EZ
11701 * gdbserver.1: Add (C) after Copyright. Update the FSF
11702 address.
11703
9d1fb177
DJ
117042005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11705
11706 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11707 (arm_breakpoint_at): Recognize both breakpoints.
11708 (the_low_target): Use the correct breakpoint instruction.
11709
011a70c2
DJ
117102005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11711
11712 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11713 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11714 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11715 (the_low_target): Update.
11716
7fb85e41
AS
117172005-10-25 Andreas Schwab <schwab@suse.de>
11718
11719 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11720
11721 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11722 (ia64_num_regs): Reduce to 462.
11723
3db0444b
DJ
117242005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11725
11726 * acinclude.m4: Correct quoting.
11727 * aclocal.m4: Regenerated.
11728
11729 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11730 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11731 (thread_db_init): Call thread_db_err_str.
11732 * configure.ac: Check for TD_VERSION.
11733 * config.in, configure: Regenerated.
11734
bee0189a
DJ
117352005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11736
11737 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11738
e9d25b98
DJ
117392005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11740
11741 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11742 is not available. Define HAVE_PTRACE_GETREGS if it is.
11743 * config.in, configure: Regenerated.
11744 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11745 * linux-i386-low.c, linux-m68k-low.c: Update to use
11746 HAVE_PTRACE_GETREGS.
11747 * linux-low.c (regsets_fetch_inferior_registers)
11748 (regsets_store_inferior_registers): Only return 0 if we processed
11749 GENERAL_REGS.
11750 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11751 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11752
a06660f7
DJ
117532005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11754
11755 * inferiors.c (struct thread_info): Add gdb_id.
11756 (add_thread): Add gdb_id argument.
11757 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11758 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11759 calls to add_thread.
11760 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11761 * server.c (handle_query): Use thread_to_gdb_id.
11762 (handle_v_cont, main): Use gdb_id_to_thread_id.
11763 * server.h (add_thread): Update prototype.
11764 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11765 prototypes.
11766
5a1f5858
DJ
117672005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11768
11769 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11770 left-padded registers.
11771 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11772 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11773
e122f1f5
SE
117742005-07-01 Steve Ellcey <sje@cup.hp.com>
11775
11776 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11777 * configure: Regenerate.
11778 * config.in: Regenerate.
11779 * server.h (NEED_DECLARATION_STRERROR):
11780 Replace with !HAVE_DECL_STRERROR.
11781
d592fa2f
DJ
117822005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11783
11784 * linux-low.c (linux_wait, linux_send_signal): Don't test
11785 an unsigned long variable for > 0 if it could be MAX_ULONG.
11786 * server.c (myresume): Likewise.
11787 * target.c (set_desired_inferior): Likewise.
11788
ccbd4912
MK
117892005-06-13 Mark Kettenis <kettenis@gnu.org>
11790
11791 * configure.ac: Simplify and improve check for socklen_t.
11792 * configure, config.in: Regenerate.
11793
f450004a
DJ
117942005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11795
11796 * acconfig.h: Remove.
11797 * configure.ac: Add a test for socklen_t. Use three-argument
11798 AC_DEFINE throughout.
11799 * config.in: Regenerated using autoheader 2.59.
11800 * configure: Regenerated.
11801
11802 * gdbreplay.c (socklen_t): Provide a default.
11803 (remote_open): Use socklen_t.
11804 * remote-utils.c (socklen_t): Provide a default.
11805 (remote_open): Use socklen_t.
11806 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11807 unsigned char.
11808
11809 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11810 char for buffers.
11811 * linux-low.c (linux_read_memory, linux_write_memory)
11812 (linux_read_auxv): Likewise.
11813 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11814 (check_mem_write): Likewise.
11815 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11816 Likewise.
11817 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11818 (registers_from_string, register_data): Likewise.
11819 * server.c (handle_query, main): Likewise.
11820 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11821 (decode_M_packet): Likewise.
11822 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11823 * target.h (struct target_ops): Update read_memory, write_memory,
11824 and read_auxv.
11825 (read_inferior_memory, write_inferior_memory): Update.
11826 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11827 to unsigned char *.
11828 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11829 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11830 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11831 linux-s390-low.c, linux-sh-low.c: Update for changes in
11832 read_inferior_memory and the_low_target->breakpoint.
11833
eee84df1
DJ
118342005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11835
11836 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11837 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11838 * configure.srv: Add powerpc64-*-linux*.
11839 * linux-ppc64-low.c: New file.
11840
45b134e5
OF
118412005-05-23 Orjan Friberg <orjanf@axis.com>
11842
11843 * linux-cris-low.c: New file with support for CRIS.
11844 * linux-crisv32-low.c: Ditto for CRISv32.
11845 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11846 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 11847 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
11848 reg-crisv32.o, and reg-crisv32.c to make rules.
11849 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11850 recognized targets.
11851
48d93c75
UW
118522005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11853
11854 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11855 of sizeof (PTRACE_XFER_TYPE).
11856 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11857
e013ee27
OF
118582005-05-12 Orjan Friberg <orjanf@axis.com>
11859
889bf7c5 11860 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
11861 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11862 pointers for hardware watchpoint support.
11863 * linux-low.h (struct linux_target_ops): Ditto.
11864 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11865 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11866 to linux_target_ops.
11867 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11868 reply packet.
11869 * server.c (main): Recognize 'Z' and 'z' packets.
11870
b0ded00b
UW
118712005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11872
11873 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11874 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11875 (the_low_target): Add new members.
11876
8643e2ad
DJ
118772005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11878
11879 * proc-service.c (ps_lgetregs): Search all_processes instead of
11880 all_threads.
11881
fc620387
DJ
118822005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11883
11884 * server.c (start_inferior): Change return type to int.
11885 (attach_inferior): Change sigptr to int *.
11886 (handle_v_cont, handle_v_requests): Change signal to int *.
11887 (main): Change signal to int.
11888
118892005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
11890
11891 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11892 * configure.srv: Add m32r*-*-linux*.
11893 * linux-m32r-low.c: New file.
11894
e0e76420
DJ
118952005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11896
11897 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11898
a1928bad
DJ
118992005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11900
11901 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11902 Take unsigned long arguments for PIDs.
11903 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11904 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11905 (wait_for_sigstop, linux_resume_one_process)
11906 (regsets_fetch_inferior_registers, linux_send_signal)
11907 (linux_read_auxv): Likewise. Update the types of variables holding
11908 PIDs. Update format string specifiers.
11909 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11910 * remote-utils.c (prepare_resume_reply): Likewise.
11911 * server.c (cont_thread, general_thread, step_thread)
11912 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11913 unsigned long.
11914 (handle_query): Update format specifiers.
11915 (handle_v_cont, main): Use strtoul for thread IDs.
11916 * server.h (struct inferior_list_entry): Use unsigned long for ID.
11917 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11918 (general_thread, step_thread, thread_from_wait)
11919 (old_thread_from_wait): Update.
11920 * target.h (struct thread_resume): Use unsigned long for THREAD.
11921 (struct target_ops): Use unsigned long for arguments to attach and
11922 thread_alive.
11923
dcdb98d2
DJ
119242005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
11925
11926 * acinclude.m4: Include bfd/bfd.m4 directly.
11927 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
11928 <agriffis@toolchain.org>.
11929 * aclocal.m4, configure: Regenerated.
11930
bec39cab
AC
119312005-01-07 Andrew Cagney <cagney@gnu.org>
11932
11933 * configure.ac: Rename configure.in, require autoconf 2.59.
11934 * configure: Re-generate.
11935
434c4c77
DJ
119362004-12-08 Daniel Jacobowitz <dan@debian.org>
11937
11938 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
11939 LIBS when finished.
11940 * aclocal.m4: Regenerated.
11941 * configure: Regenerated.
11942
db1d3e1b
AS
119432004-11-21 Andreas Schwab <schwab@suse.de>
11944
11945 * linux-m68k-low.c (m68k_num_gregs): Define.
11946 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
11947 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
11948 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
11949 (m68k_breakpoint_at): New. Add to the_low_target.
11950
11951 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
11952 srv_linux_thread_db to yes.
11953
43360365
JB
119542004-10-20 Joel Brobecker <brobecker@gnat.com>
11955
11956 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
11957 (ARCH_SET_FS): Likewise.
11958 (ARCH_GET_FS): Likewise.
11959 (ARCH_GET_GS): Likewise.
11960
fd500816
DJ
119612004-10-16 Daniel Jacobowitz <dan@debian.org>
11962
11963 * linux-i386-low.c (ps_get_thread_area): New.
11964 * linux-x86-64-low.c (ps_get_thread_area): New.
11965 * linux-low.c: Include <sys/syscall.h>.
11966 (linux_kill_one_process): Don't kill the first thread here.
11967 (linux_kill): Kill the first thread here.
11968 (kill_lwp): New function.
11969 (send_sigstop, linux_send_signal): Use it.
11970 * proc-service.c: Clean up #ifdefs.
11971 (fpregset_info): Delete.
11972 (ps_lgetregs): Update and enable implementation.
11973 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
11974 implementations.
11975 * remote-utils.c (struct sym_cache, symbol_cache): New.
11976 (input_interrupt): Print a clearer message.
11977 (async_io_enabled): New variable.
11978 (enable_async_io, disable_async_io): Use it. Update comments.
11979 (look_up_one_symbol): Use the symbol cache.
11980 * thread-db.c (thread_db_look_up_symbols): New function.
11981 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
11982
f6de3c42
DJ
119832004-10-16 Daniel Jacobowitz <dan@debian.org>
11984
11985 * configure.in: Test for -rdynamic.
11986 * configure: Regenerated.
11987 * Makefile (INTERNAL_LDFLAGS): New.
11988 (gdbserver, gdbreplay): Use it.
11989
2c0fc042
AC
119902004-09-02 Andrew Cagney <cagney@gnu.org>
11991
11992 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
11993
075b3282
DJ
119942004-03-23 Daniel Jacobowitz <drow@mvista.com>
11995
11996 * linux-low.c (linux_wait): Clear all_processes list also.
11997
fa6a77dc
DJ
119982004-03-12 Daniel Jacobowitz <drow@mvista.com>
11999
12000 * linux-low.c: Include <errno.h>. Remove extern declaration of
12001 errno.
12002
6d782a97
DJ
120032004-03-12 Daniel Jacobowitz <drow@mvista.com>
12004
12005 * gdbreplay.c, server.h, utils.c: Update copyright years.
12006
3a7fb99b
DJ
120072004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12008
12009 * server.c (main): Print child status or termination signal from
12010 variable 'signal', not 'sig'.
12011
c3e735a6
DJ
120122004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12013
12014 * linux-low.c (linux_read_memory): Change return type to
12015 int. Check for and return error from ptrace().
12016 * target.c (read_inferior_memory): Change return type to int. Pass
12017 back return status from the_target->read_memory().
12018 * target.h (struct target_ops): Adapt *read_memory() prototype.
12019 Update comment.
12020 (read_inferior_memory): Adapt prototype.
12021 * server.c (main): Return an error packet if
12022 read_inferior_memory() returns an error.
12023
a59d1c82
DJ
120242004-03-04 Daniel Jacobowitz <drow@mvista.com>
12025
12026 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12027 Unify with other clean targets.
12028
dc3f8883
DJ
120292004-02-29 Daniel Jacobowitz <drow@mvista.com>
12030
12031 * server.c (handle_v_cont): Call set_desired_inferior.
12032
89a208da
DJ
120332004-02-29 Daniel Jacobowitz <drow@mvista.com>
12034
12035 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12036
62ea82f5
DJ
120372004-02-29 Daniel Jacobowitz <drow@mvista.com>
12038
12039 * linux-low.c (linux_wait): Unblock async I/O.
12040 (linux_resume): Block and enable async I/O.
12041 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12042 * server.h (block_async_io, unblock_async_io): Add prototypes.
12043
6910d122
DJ
120442004-02-29 Daniel Jacobowitz <drow@mvista.com>
12045
12046 * remote-utils.c (remote_open): Print a status notice after
12047 opening a TCP port.
12048 * server.c (attach_inferior): Print a status notice after
12049 attaching.
12050
120512004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
12052
12053 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12054
c89dc5d4
DJ
120552004-02-26 Daniel Jacobowitz <drow@mvista.com>
12056
12057 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12058 error packet.
12059 * server.c, target.h: Update copyright years.
12060
4b8dad4a
RM
120612004-02-25 Roland McGrath <roland@redhat.com>
12062
12063 * target.h (struct target_ops): New member `read_auxv'.
12064 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12065 * linux-low.c (linux_read_auxv): New function.
12066 (linux_target_ops): Initialize `read_auxv' member to that.
12067
d7446758
JB
120682004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12069
12070 Committed by Jim Blandy <jimb@redhat.com>.
12071
12072 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 12073 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
12074 instead of GPR_SIZE to distiguish s390 and s390x targets.
12075
5544ad89
DJ
120762004-01-31 Daniel Jacobowitz <drow@mvista.com>
12077
12078 * linux-low.c: Update copyright year.
12079 (check_removed_breakpoint): Clear pending_is_breakpoint.
12080 (linux_set_resume_request, linux_queue_one_thread)
12081 (resume_status_pending_p): New functions.
12082 (linux_continue_one_thread): Use process->resume.
12083 (linux_resume): Only resume threads if there are no pending events.
12084 * linux-low.h (struct process_info): Add resume request
12085 pointer.
12086
2a68b70e
DJ
120872004-01-30 Daniel Jacobowitz <drow@mvista.com>
12088
12089 * regcache.c (new_register_cache): Clear the allocated register
12090 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12091
64386c31
DJ
120922003-10-13 Daniel Jacobowitz <drow@mvista.com>
12093
12094 * linux-low.c (linux_resume): Take a struct thread_resume *
12095 argument.
12096 (linux_wait): Update call.
12097 (resume_ptr): New static variable.
12098 (linux_continue_one_thread): Renamed from
12099 linux_continue_one_process. Use resume_ptr.
12100 (linux_resume): Use linux_continue_one_thread.
12101 * server.c (handle_v_cont, handle_v_requests): New functions.
12102 (myresume): New function.
12103 (main): Handle 'v' case.
12104 * target.h (struct thread_resume): New type.
12105 (struct target_ops): Change argument of "resume" to struct
12106 thread_resume *.
12107 (myresume): Delete macro.
12108
c938e9b0
L
121092003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12110
12111 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12112 (uninstall): Support DESTDIR.
12113
7f313d07
BC
12114Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12115
12116 * configure.srv: Add xscale*linux copy of arm*linux entry.
12117
3b2fc2ea
DJ
121182003-07-24 Daniel Jacobowitz <drow@mvista.com>
12119
12120 * linux-arm-low.c (arm_reinsert_addr): New function.
12121 (the_low_target): Add arm_reinsert_addr.
12122
1c0a559e
MK
121232003-07-08 Mark Kettenis <kettenis@gnu.org>
12124
12125 * mem-break.c: Remove whitespace at end of file.
12126
43d5792c
DJ
121272003-06-28 Daniel Jacobowitz <drow@mvista.com>
12128
12129 * configure.in: Check whether we need to prototype strerror.
12130 * server.h: Optionally prototype strerror.
12131 * gdbreplay.c (perror_with_name): Use strerror.
12132 * linux-low.c (linux_attach_lwp): Use strerror.
12133 * utils.c (perror_with_name): Use strerror.
12134 * config.in, configure: Regenerated.
12135
c8a86edf
DJ
121362003-06-28 Daniel Jacobowitz <drow@mvista.com>
12137
12138 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12139 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12140
73d37363
DJ
121412003-06-20 Daniel Jacobowitz <drow@mvista.com>
12142
12143 * Makefile.in (SFILES): Update.
12144 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12145 low-sun3.c: Remove files.
12146
6ad8ae5c
DJ
121472003-06-17 Daniel Jacobowitz <drow@mvista.com>
12148
12149 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12150 (linux_detach_one_process, linux_detach): New functions.
12151 (linux_target_ops): Add linux_detach.
12152 * server.c (main): Handle 'D' packet.
12153 * target.h (struct target_ops): Add "detach" member.
12154 (detach_inferior): Define.
12155
1581182a
MK
121562003-06-13 Mark Kettenis <kettenis@gnu.org>
12157
12158 From Kelley Cook <kelleycook@wideopenwest.com>:
12159 * configure.srv: Accept i[34567]86 variants.
12160
e5379b03
DJ
121612003-06-05 Daniel Jacobowitz <drow@mvista.com>
12162
12163 * linux-low.c (linux_wait_for_event): Correct comment typos.
12164 (linux_resume_one_process): Call check_removed_breakpoint.
12165 (linux_send_signal): New function.
12166 (linux_target_ops): Add linux_send_signal.
12167 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12168 of kill.
12169 * target.h (struct target_ops): Add send_signal.
12170
2ff29de4
JB
121712003-05-29 Jim Blandy <jimb@redhat.com>
12172
12173 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12174 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12175 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12176 away part of the register's value.
12177
254787d4
DJ
121782003-03-26 Daniel Jacobowitz <drow@mvista.com>
12179
12180 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12181 (linux_wait_for_event, linux_init_signals): Likewise.
12182
94e10508
DJ
121832003-03-17 Daniel Jacobowitz <drow@mvista.com>
12184
12185 * configure.in: Check for stdlib.h.
12186 * configure: Regenerated.
12187 * config.in: Regenerated.
12188
4c0711e0
DJ
121892003-01-04 Andreas Schwab <schwab@suse.de>
12190
12191 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12192
ef66e766
AC
121932003-01-02 Andrew Cagney <ac131313@redhat.com>
12194
12195 * Makefile.in: Remove obsolete code.
12196
a1358604
DJ
121972002-11-20 Daniel Jacobowitz <drow@mvista.com>
12198
12199 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12200 defined(PT_FPR0_HI).
12201
23ce3b1c
DJ
122022002-11-17 Stuart Hughes <seh@zee2.com>
12203
12204 * linux-arm-low.c (arm_num_regs): Increase.
12205 (arm_regmap): Include status register.
12206
122072002-11-17 Daniel Jacobowitz <drow@mvista.com>
12208
12209 * linux-low.c (register_addr): Remove incorrect -1 check.
12210
a9fa9f7d
DJ
122112002-08-29 Daniel Jacobowitz <drow@mvista.com>
12212
12213 * linux-low.c (linux_create_inferior): Call setpgid. Return
12214 the new PID.
12215 (unstopped_p, linux_signal_pid): Remove.
12216 (linux_target_ops): Remove linux_signal_pid.
12217 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12218 global instead of target method.
12219 * target.h (struct target_ops): Remove signal_pid. Update comment
12220 for create_inferior.
12221 * server.c (signal_pid): New variable.
12222 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 12223 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
12224 (attach_inferior): Set signal_pid.
12225
17574093
DJ
122262002-08-23 Daniel Jacobowitz <drow@mvista.com>
12227
12228 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12229
122302002-08-20 Jim Blandy <jimb@redhat.com>
12231
12232 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12233 default for this.
12234
122352002-08-01 Andrew Cagney <cagney@redhat.com>
12236
12237 * Makefile.in: Make chill references obsolete.
12238
122392002-07-24 Kevin Buettner <kevinb@redhat.com>
12240
12241 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12242 * configure: Regenerate.
12243 * config.in: Regenerate.
12244
122452002-07-09 David O'Brien <obrien@FreeBSD.org>
12246
12247 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12248 (perror_with_name, remote_close, remote_open, expect, play): Static.
12249
122502002-07-04 Michal Ludvig <mludvig@suse.cz>
12251
4b8dad4a 12252 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
12253 byte offsets instead of an array of indexes.
12254 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12255
122562002-06-13 Daniel Jacobowitz <drow@mvista.com>
12257
12258 * regcache.c: Add comment.
12259
122602002-06-11 Daniel Jacobowitz <drow@mvista.com>
12261
12262 * thread-db.c: New file.
12263 * proc-service.c: New file.
12264 * acinclude.m4: New file.
12265 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12266 proc-service.o, and thread-db.o.
12267 (linux-low.o): Add USE_THREAD_DB.
12268 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12269 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12270 * aclocal.m4: Regenerated.
12271 * config.in: Regenerated.
12272 * configure: Regenerated.
12273 * configure.in: Check for proc_service.h, sys/procfs.h,
12274 thread_db.h, and linux/elf.h headrs.
12275 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12276 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12277 Check for -lthread_db and thread support.
12278 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12279 PowerPC, and SuperH.
12280 * i387-fp.c: Constify arguments.
12281 * i387-fp.h: Likewise.
12282 * inferiors.c: (struct thread_info): Renamed from
12283 `struct inferior_info'. Remove PID member. Use generic inferior
12284 list header. All uses updated.
12285 (inferiors, signal_pid): Removed.
12286 (all_threads): New variable.
12287 (get_thread): Define.
12288 (add_inferior_to_list): New function.
12289 (for_each_inferior): New function.
12290 (change_inferior_id): New function.
12291 (add_inferior): Removed.
12292 (remove_inferior): New function.
12293 (add_thread): New function.
12294 (free_one_thread): New function.
12295 (remove_thread): New function.
12296 (clear_inferiors): Use for_each_inferior and free_one_thread.
12297 (find_inferior): New function.
12298 (find_inferior_id): New function.
12299 (inferior_target_data): Update argument type.
12300 (set_inferior_target_data): Likewise.
12301 (inferior_regcache_data): Likewise.
12302 (set_inferior_regcache_data): Likewise.
12303 * linux-low.c (linux_bp_reinsert): Remove.
12304 (all_processes, stopping_threads, using_thrads)
12305 (struct pending_signals, debug_threads, pid_of): New.
12306 (inferior_pid): Replace with macro.
12307 (struct inferior_linux_data): Remove.
12308 (get_stop_pc, add_process): New functions.
12309 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12310 Use add_process and add_thread.
12311 (linux_attach_lwp): New function, based on old linux_attach. Use
12312 add_process and add_thread. Set stop_expected for new threads.
12313 (linux_attach): New function.
12314 (linux_kill_one_process): New function.
12315 (linux_kill): Kill all LWPs.
12316 (linux_thread_alive): Use find_inferior_id.
12317 (check_removed_breakpoints, status_pending_p): New functions.
12318 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12319 Update. Use WNOHANG. Wait for cloned processes also. Update process
12320 struct for the found process.
12321 (linux_wait_for_event): New function.
12322 (linux_wait): Use it. Support LWPs.
12323 (send_sigstop, wait_for_sigstop, stop_all_processes)
12324 (linux_resume_one_process, linux_continue_one_process): New functions.
12325 (linux_resume): Support LWPs.
12326 (REGISTER_RAW_SIZE): Remove.
12327 (fetch_register): Use register_size instead. Call supply_register.
12328 (usr_store_inferior_registers): Likewise. Call collect_register.
12329 Fix recursive case.
12330 (regsets_fetch_inferior_registers): Improve error message.
12331 (regsets_store_inferior_registers): Add debugging.
12332 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12333 (unstopped_p, linux_signal_pid): New functions.
12334 (linux_target_ops): Add linux_signal_pid.
12335 (linux_init_signals): New function.
12336 (initialize_low): Call it. Initialize using_threads.
12337 * regcache.c (inferior_regcache_data): Add valid
12338 flag.
12339 (get_regcache): Fetch registers lazily. Add fetch argument
12340 and update all callers.
12341 (regcache_invalidate_one, regcache_invalidate): New
12342 functions.
12343 (new_register_cache): Renamed from create_register_cache.
12344 Return the new regcache.
12345 (free_register_cache): Change argument to a void *.
12346 (registers_to_string, registers_from_string): Call get_regcache
12347 with fetch flag set.
12348 (register_data): Make static. Pass fetch flag to get_regcache.
12349 (supply_register): Call get_regcache with fetch flag clear.
12350 (collect_register): Call get_regcache with fetch flag set.
12351 (collect_register_as_string): New function.
12352 * regcache.h: Update.
12353 * remote-utils.c (putpkt): Flush after debug output and use
12354 stderr.
12355 Handle input interrupts while waiting for an ACK.
12356 (input_interrupt): Use signal_pid method.
12357 (getpkt): Flush after debug output and use stderr.
12358 (outreg): Use collect_register_as_string.
12359 (new_thread_notify, dead_thread_notify): New functions.
12360 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12361 and general_thread.
12362 (look_up_one_symbol): Flush after debug output.
12363 * server.c (step_thread, server_waiting): New variables.
12364 (start_inferior): Don't use signal_pid. Update call to mywait.
12365 (attach_inferior): Update call to mywait.
12366 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12367 (main): Don't fetch/store registers explicitly. Use
12368 set_desired_inferior. Support proposed ``Hs'' packet. Update
12369 calls to mywait.
12370 * server.h: Update.
12371 (struct inferior_list, struct_inferior_list_entry): New.
12372 * target.c (set_desired_inferior): New.
12373 (write_inferior_memory): Constify.
12374 (mywait): New function.
12375 * target.h: Update.
12376 (struct target_ops): New signal_pid method.
12377 (mywait): Removed macro, added prototype.
12378
12379 * linux-low.h (regset_func): Removed.
12380 (regset_fill_func, regset_store_func): New.
12381 (enum regset_type): New.
12382 (struct regset_info): Add type field. Use new operation types.
12383 (struct linux_target_ops): stop_pc renamed to get_pc.
12384 Add decr_pc_after_break and breakpoint_at.
12385 (get_process, get_thread_proess, get_process_thread)
12386 (strut process_info, all_processes, linux_attach_lwp)
12387 (thread_db_init): New.
12388
12389 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12390 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12391 (the_low_target): Add new members.
12392 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12393 (i386_store_fpxregset): Constify.
12394 (target_regsets): Add new kind identifier.
12395 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12396 (i386_set_pc): Add debugging.
12397 (i386_breakpoint_at): New function.
12398 (the_low_target): Add new members.
12399 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12400 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12401 (mips_breakpoint_at): New.
12402 (the_low_target): Add new members.
12403 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12404 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12405 (the_low_target): Add new members.
12406 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12407 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12408 (the_low_target): Add new members.
12409 * linux-x86-64-low.c (target_regsets): Add new kind
12410 identifier.
12411
124122002-05-15 Daniel Jacobowitz <drow@mvista.com>
12413
12414 From Martin Pool <mbp@samba.org>:
12415 * server.c (gdbserver_usage): New function.
12416 (main): Call it.
12417
124182002-05-14 Daniel Jacobowitz <drow@mvista.com>
12419
12420 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12421 stop_at -> stop_pc.
12422
124232002-05-04 Andrew Cagney <ac131313@redhat.com>
12424
12425 * Makefile.in: Remove obsolete code.
12426
124272002-04-24 Michal Ludvig <mludvig@suse.cz>
12428
12429 * linux-low.c (regsets_fetch_inferior_registers),
12430 (regsets_store_inferior_registers): Removed cast to int from
12431 ptrace() calls.
12432 * regcache.h: Added declaration of struct inferior_info.
12433
124342002-04-20 Daniel Jacobowitz <drow@mvista.com>
12435
12436 * inferiors.c (struct inferior_info): Add regcache_data.
12437 (add_inferior): Call create_register_cache.
12438 (clear_inferiors): Call free_register_cache.
12439 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12440 * regcache.c (struct inferior_regcache_data): New.
12441 (registers): Remove.
12442 (get_regcache): New function.
12443 (create_register_cache, free_register_cache): New functions.
12444 (set_register_cache): Don't initialize the register cache here.
12445 (registers_to_string, registers_from_string, register_data): Call
12446 get_regcache.
12447 * regcache.h: Add prototypes.
12448 * server.h: Likewise.
12449
124502002-04-20 Daniel Jacobowitz <drow@mvista.com>
12451
12452 * mem-break.c: New file.
12453 * mem-break.h: New file.
12454 * Makefile.in: Add mem-break.o rule; update server.h
12455 dependencies.
12456 * inferiors.c (struct inferior_info): Add target_data
12457 member.
12458 (clear_inferiors): Free target_data member if set.
12459 (inferior_target_data, set_inferior_target_data): New functions.
12460 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12461 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12462 * linux-low.c (linux_bp_reinsert): New variable.
12463 (struct inferior_linux_data): New.
12464 (linux_create_inferior): Use set_inferior_target_data.
12465 (linux_attach): Likewise. Call add_inferior.
12466 (linux_wait_for_one_inferior): New function.
12467 (linux_wait): Call it.
12468 (linux_write_memory): Add const.
12469 (initialize_low): Call set_breakpoint_data.
12470 * linux-low.h (struct linux_target_ops): Add breakpoint
12471 handling members.
12472 * server.c (attach_inferior): Remove extra add_inferior
12473 call.
12474 * server.h: Include mem-break.h. Update inferior.c
12475 prototypes.
12476 * target.c (read_inferior_memory)
12477 (write_inferior_memory): New functions.
12478 * target.h (read_inferior_memory)
12479 (write_inferior_memory): Change macros to prototypes.
12480 (struct target_ops): Update comments. Add const to write_memory
12481 definition.
12482
124832002-04-11 Daniel Jacobowitz <drow@mvista.com>
12484
12485 * linux-low.c (usr_store_inferior_registers): Support
12486 registers which are allowed to fail to store.
12487 * linux-low.h (linux_target_ops): Likewise.
12488 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12489 (ppc_cannot_store_register): FPSCR may not be storable.
12490
124912002-04-09 Daniel Jacobowitz <drow@mvista.com>
12492
12493 * server.h: Include <string.h> if HAVE_STRING_H.
12494 * ChangeLog: Correct paths in last ChangeLog entry.
12495
124962002-04-09 Daniel Jacobowitz <drow@mvista.com>
12497
12498 * linux-low.h: Remove obsolete prototypes.
12499 (struct linux_target_ops): New.
12500 (extern the_low_target): New.
12501 * linux-low.c (num_regs, regmap): Remove declarations.
12502 (register_addr): Use the_low_target explicitly.
12503 (fetch_register): Likewise.
12504 (usr_fetch_inferior_registers): Likewise.
12505 (usr_store_inferior_registers): Likewise.
12506 * linux-arm-low.c (num_regs): Remove.
12507 (arm_num_regs): Define.
12508 (arm_regmap): Renamed from regmap, made static.
12509 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12510 made static.
12511 (arm_cannot_store_register): Renamed from cannot_store_register,
12512 made static.
12513 (the_low_target): New.
12514 * linux-i386-low.c (num_regs): Remove.
12515 (i386_num_regs): Define.
12516 (i386_regmap): Renamed from regmap, made static.
12517 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12518 made static.
12519 (i386_cannot_store_register): Renamed from cannot_store_register,
12520 made static.
12521 (the_low_target): New.
12522 * linux-ia64-low.c (num_regs): Remove.
12523 (ia64_num_regs): Define.
12524 (ia64_regmap): Renamed from regmap, made static.
12525 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12526 made static.
12527 (ia64_cannot_store_register): Renamed from cannot_store_register,
12528 made static.
12529 (the_low_target): New.
12530 * linux-m68k-low.c (num_regs): Remove.
12531 (m68k_num_regs): Define.
12532 (m68k_regmap): Renamed from regmap, made static.
12533 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12534 made static.
12535 (m68k_cannot_store_register): Renamed from cannot_store_register,
12536 made static.
12537 (the_low_target): New.
12538 * linux-mips-low.c (num_regs): Remove.
12539 (mips_num_regs): Define.
12540 (mips_regmap): Renamed from regmap, made static.
12541 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12542 made static.
12543 (mips_cannot_store_register): Renamed from cannot_store_register,
12544 made static.
12545 (the_low_target): New.
12546 * linux-ppc-low.c (num_regs): Remove.
12547 (ppc_num_regs): Define.
12548 (ppc_regmap): Renamed from regmap, made static.
12549 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12550 made static.
12551 (ppc_cannot_store_register): Renamed from cannot_store_register,
12552 made static.
12553 (the_low_target): New.
12554 * linux-s390-low.c (num_regs): Remove.
12555 (s390_num_regs): Define.
12556 (s390_regmap): Renamed from regmap, made static.
12557 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12558 made static.
12559 (s390_cannot_store_register): Renamed from cannot_store_register,
12560 made static.
12561 (the_low_target): New.
12562 * linux-sh-low.c (num_regs): Remove.
12563 (sh_num_regs): Define.
12564 (sh_regmap): Renamed from regmap, made static.
12565 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12566 made static.
12567 (sh_cannot_store_register): Renamed from cannot_store_register,
12568 made static.
12569 (the_low_target): New.
12570 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12571 (the_low_target): New.
12572
125732002-04-09 Daniel Jacobowitz <drow@mvista.com>
12574
12575 * Makefile.in: Add stamp-h target.
12576 * configure.in: Create stamp-h.
12577 * configure: Regenerated.
12578
125792002-04-09 Daniel Jacobowitz <drow@mvista.com>
12580
12581 * inferiors.c: New file.
12582 * target.c: New file.
12583 * target.h: New file.
12584 * Makefile.in: Add target.o and inferiors.o. Update
12585 dependencies.
12586 * linux-low.c (inferior_pid): New static variable,
12587 moved from server.c.
12588 (linux_create_inferior): Renamed from create_inferior.
12589 Call add_inferior. Return 0 on success instead of a PID.
12590 (linux_attach): Renamed from myattach.
12591 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12592 (linux_thread_alive): Renamed from mythread_alive.
12593 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12594 child dies.
12595 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12596 (regsets_store_inferior_registers): Correct error message.
12597 Add missing ``return 0''.
12598 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12599 (linux_store_registers): Renamed from store_inferior_registers.
12600 (linux_read_memory): Renamed from read_inferior_memory.
12601 (linux_write_memory): Renamed from write_inferior_memory.
12602 (linux_target_ops): New structure.
12603 (initialize_low): Call set_target_ops ().
12604 * remote-utils.c (unhexify): New function.
12605 (hexify): New function.
12606 (input_interrupt): Send signals to ``signal_pid''.
12607 * server.c (inferior_pid): Remove.
12608 (start_inferior): Update create_inferior call.
12609 (attach_inferior): Call add_inferior.
12610 (handle_query): New function.
12611 (main): Call handle_query for `q' packets.
12612 * server.h: Include "target.h". Remove obsolete prototypes.
12613 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12614
126152002-04-09 Daniel Jacobowitz <drow@mvista.com>
12616
12617 * Makefile.in: Add WARN_CFLAGS. Update configury
12618 dependencies.
12619 * configure.in: Check for <string.h>
12620 * configure: Regenerate.
12621 * config.in: Regenerate.
12622 * gdbreplay.c: Include needed system headers.
12623 (remote_open): Remove strchr prototype.
12624 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12625 * regcache.c (supply_register): Change buf argument to const void *.
12626 (supply_register_by_name): Likewise.
12627 (collect_register): Change buf argument to void *.
12628 (collect_register_by_name): Likewise.
12629 * regcache.h: Add missing prototypes.
12630 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12631 * server.c (handle_query): New function.
12632 (attached): New static variable, moved out of main.
12633 (main): Quiet longjmp clobber warnings.
12634 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12635 * utils.c (error): Remove NORETURN.
12636 (fatal): Likewise.
This page took 2.192357 seconds and 4 git commands to generate.