]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
linux-aarch32-low.c: Use NULL_REGSET
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
04b3479c
SM
12015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2
3 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4
2bc84e8a
SM
52015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6
7 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
8 (ppc_fill_vsxregset): Likewise.
9 (ppc_store_vsxregset): Likewise.
10 (ppc_fill_vrregset): Likewise.
11 (ppc_store_vrregset): Likewise.
12 (ppc_fill_evrregset): Likewise.
13 (ppc_store_evrregset): Likewise.
14
e6c5bb05
SM
152015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
16
17 * linux-ppc-low.c (ppc_usrregs_info): Remove
18 forward-declaration.
19 (ppc_arch_setup): Move lower in file.
20
7ea45d72
SM
212015-10-30 Simon Marchi <simon.marchi@ericsson.com>
22
23 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
24 (ps_pdwrite): Likewise.
25
69291610
HW
262015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
27
28 * linux-arm-low.c (arm_new_thread): Move pointer dereference
29 to after assert checks.
30
b42945fd
SM
312015-10-29 Simon Marchi <simon.marchi@ericsson.com>
32
33 * proc-service.c (ps_pdread): Add/adjust casts.
34 (ps_pdwrite): Add/adjust casts.
35
d6f85c84
SM
362015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
37
38 * server.c (handle_search_memory_1): Cast return value of
39 memmem.
40
f98cd059
SM
412015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
42
43 * server.c (write_qxfer_response): Change type of data to
44 gdb_byte *.
45
d2412fa5
PA
462015-10-29 Pedro Alves <palves@redhat.com>
47
48 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
49
c17414a2
PA
502015-10-29 Pedro Alves <palves@redhat.com>
51
52 * tracepoint.c (clear_installed_tracepoints): Add casts.
53
e053fbc4
PA
542015-10-29 Pedro Alves <palves@redhat.com>
55
56 * server.c (handle_v_cont, process_serial_event): Add enum
57 gdb_signal casts to signal parsing code.
58
add67df8
PA
592015-10-29 Pedro Alves <palves@redhat.com>
60
61 * linux-low.h (NULL_REGSET): Define.
62 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
63 * linux-arm-low.c (arm_regsets): Likewise.
64 * linux-crisv32-low.c (cris_regsets): Likewise.
65 * linux-m68k-low.c (m68k_regsets): Likewise.
66 * linux-mips-low.c (mips_regsets): Likewise.
67 * linux-nios2-low.c (nios2_regsets): Likewise.
68 * linux-ppc-low.c (ppc_regsets): Likewise.
69 * linux-s390-low.c (s390_regsets): Likewise.
70 * linux-sh-low.c (sh_regsets): Likewise.
71 * linux-sparc-low.c (sparc_regsets): Likewise.
72 * linux-tic6x-low.c (tic6x_regsets): Likewise.
73 * linux-tile-low.c (tile_regsets): Likewise.
74 * linux-x86-low.c (x86_regsets): Likewise.
75 * linux-xtensa-low.c (xtensa_regsets): Likewise.
76
50bc912a
PA
772015-10-29 Pedro Alves <palves@redhat.com>
78
79 * linux-low.h (NULL_REGSET): Define.
80 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
81 * linux-arm-low.c (arm_regsets): Likewise.
82 * linux-crisv32-low.c (cris_regsets): Likewise.
83 * linux-m68k-low.c (m68k_regsets): Likewise.
84 * linux-mips-low.c (mips_regsets): Likewise.
85 * linux-nios2-low.c (nios2_regsets): Likewise.
86 * linux-ppc-low.c (ppc_regsets): Likewise.
87 * linux-s390-low.c (s390_regsets): Likewise.
88 * linux-sh-low.c (sh_regsets): Likewise.
89 * linux-sparc-low.c (sparc_regsets): Likewise.
90 * linux-tic6x-low.c (tic6x_regsets): Likewise.
91 * linux-tile-low.c (tile_regsets): Likewise.
92 * linux-x86-low.c (x86_regsets): Likewise.
93 * linux-xtensa-low.c (xtensa_regsets): Likewise.
94
682b2546
DE
952015-10-26 Doug Evans <dje@google.com>
96
97 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
98
963843d4
DE
992015-10-26 Doug Evans <dje@google.com>
100
101 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
102
d41401ac
DE
1032015-10-26 Doug Evans <dje@google.com>
104
105 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
106 for debug_printf.
107 (attach_thread, find_new_threads_callback): Ditto.
108
3db28855
AT
1092015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
110
111 * mem-break.h (set_breakpoint_data): Remove.
112
fb78e89c
AT
1132015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
114
115 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
116 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
117 (initialize_low): Remove set_breakpoint_data call.
118 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
119 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
120 (initialize_low): Remove set_breakpoint_data call.
121 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
122 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
123 (initialize_low): Remove set_breakpoint_data call.
124
2e6ee069
AT
1252015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
126
127 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
128 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
129 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
130 * target.h (target_breakpoint_kind_from_pc): New macro.
131
1652a986
AT
1322015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
133
134 * linux-low.c (default_breakpoint_kind_from_pc): New function.
135 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
136 the default breakpoint kind.
137
abeead09
AT
1382015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
139
140 * linux-arm-low.c (arm_supports_z_point_type): Add software
141 breakpoint support.
142
b0b4b501
AT
1432015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
144
145 * linux-arm-low.c: Refactor breakpoint definitions.
146 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
147 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
148
8689682c
AT
1492015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
150
151 * Makefile.in: Add arm.c/o.
152 * configure.srv: Likewise.
153 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
154 (arm_breakpoint_kind_from_pc): New function.
155 (arm_sw_breakpoint_from_kind): Return proper kind.
156 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
157
27165294
AT
1582015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
159
160 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
161 removal.
162 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
163 (struct raw_breakpoint) <size>: Remove.
164 (struct raw_breakpoint) <kind>: Add.
165 (bp_size): New function.
166 (bp_opcode): Likewise.
167 (find_raw_breakpoint_at): Adjust for kind.
168 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
169 (remove_memory_breakpoint): Adjust for kind call bp_size.
170 (set_raw_breakpoint_at): Adjust for kind.
171 (set_breakpoint): Likewise.
172 (set_breakpoint_at): Call breakpoint_kind_from_pc.
173 (delete_raw_breakpoint): Adjust for kind.
174 (delete_breakpoint): Likewise.
175 (find_gdb_breakpoint): Likewise.
176 (set_gdb_breakpoint_1): Likewise.
177 (set_gdb_breakpoint): Likewise.
178 (delete_gdb_breakpoint_1): Likewise.
179 (delete_gdb_breakpoint): Likewise.
180 (uninsert_raw_breakpoint): Likewise.
181 (reinsert_raw_breakpoint): Likewise.
182 (set_breakpoint_data): Remove.
183 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
184 (check_mem_read): Adjust for kind call bp_size.
185 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
186 (clone_one_breakpoint): Adjust for kind.
187 * mem-break.h (set_gdb_breakpoint): Likewise.
188 (delete_gdb_breakpoint): Likewise.
189 * server.c (process_serial_event): Likewise.
190
dd373349
AT
1912015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
192
193 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
194 (struct linux_target_ops) <breakpoint>: Remove.
195 (struct linux_target_ops) <breakpoint_len>: Remove.
196 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
197 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
198 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
199 (arm_sw_breakpoint_from_kind): New function.
200 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
201 (struct linux_target_ops) <breakpoint>: Remove.
202 (struct linux_target_ops) <breakpoint_len>: Remove.
203 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
204 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
205 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
206 (struct linux_target_ops) <breakpoint>: Remove.
207 (struct linux_target_ops) <breakpoint_len>: Remove.
208 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
209 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
210 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
211 (struct linux_target_ops) <breakpoint>: Remove.
212 (struct linux_target_ops) <breakpoint_len>: Remove.
213 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
214 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
215 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
216 and sw_breakpoint_from_kind to increment the pc.
217 (linux_breakpoint_kind_from_pc): New function.
218 (linux_sw_breakpoint_from_kind): New function.
219 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
220 (initialize_low): Call breakpoint_kind_from_pc and
221 sw_breakpoint_from_kind to replace breakpoint_data/len.
222 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
223 New field.
224 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
225 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
226 (struct linux_target_ops) <breakpoint>: Remove.
227 (struct linux_target_ops) <breakpoint_len>: Remove.
228 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
229 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
230 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
231 (struct linux_target_ops) <breakpoint>: Remove.
232 (struct linux_target_ops) <breakpoint_len>: Remove.
233 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
234 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
235 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
236 (struct linux_target_ops) <breakpoint>: Remove.
237 (struct linux_target_ops) <breakpoint_len>: Remove.
238 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
239 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
240 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
241 (struct linux_target_ops) <breakpoint>: Remove.
242 (struct linux_target_ops) <breakpoint_len>: Remove.
243 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
244 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
245 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
246 (struct linux_target_ops) <breakpoint>: Remove.
247 (struct linux_target_ops) <breakpoint_len>: Remove.
248 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
249 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
250 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
251 (struct linux_target_ops) <breakpoint>: Remove.
252 (struct linux_target_ops) <breakpoint_len>: Remove.
253 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
254 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
255 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
256 (struct linux_target_ops) <breakpoint>: Remove.
257 (struct linux_target_ops) <breakpoint_len>: Remove.
258 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
259 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
260 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
261 (struct linux_target_ops) <breakpoint>: Remove.
262 (struct linux_target_ops) <breakpoint_len>: Remove.
263 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
264 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
265 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
266 (struct linux_target_ops) <breakpoint>: Remove.
267 (struct linux_target_ops) <breakpoint_len>: Remove.
268 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
269 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
270 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
271 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
272 (struct linux_target_ops) <breakpoint>: Remove.
273 (struct linux_target_ops) <breakpoint_len>: Remove.
274 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
275 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
276 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
277 (struct linux_target_ops) <breakpoint>: Remove.
278 (struct linux_target_ops) <breakpoint_len>: Remove.
279 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
280 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
281
4cd98a19
AT
2822015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
283
284 * linux-cris-low.c (cris_get_pc): Remove void arg.
285
774ee6d2
AR
2862015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
287
288 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
289 variable name.
290
833dcd29
AR
2912015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
292
293 * inferiors.c (thread_pid_matches_callback): New function.
294 (find_thread_process): New function.
295 (remove_thread): Reset current_thread.
296 (remove_process): Assert threads have been removed first.
297
8d689ee5
YQ
2982015-10-15 Yao Qi <yao.qi@linaro.org>
299
300 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
301 if it is 3.
302 (aarch64_remove_point): Likewise.
303 * regcache.c (regcache_register_size): New function.
304
1c2e1515
YQ
3052015-10-12 Yao Qi <yao.qi@linaro.org>
306
307 * linux-aarch64-low.c: Update all callers as emit_load_store
308 is renamed to aarch64_emit_load_store.
309
e1c587c3
YQ
3102015-10-12 Yao Qi <yao.qi@linaro.org>
311
312 * linux-aarch64-low.c: Update all callers of function renaming
313 from emit_insn to aarch64_emit_insn.
314
b6542f81
YQ
3152015-10-12 Yao Qi <yao.qi@linaro.org>
316
317 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
318 arch/aarch64-insn.h.
319 (struct aarch64_memory_operand): Likewise.
320 (ENCODE): Likewise.
321 (emit_insn): Move to arch/aarch64-insn.c.
322 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
323 (emit_load_store): Move to arch/aarch64-insn.c.
324 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
325 (can_encode_int32): Remove.
326
246994ce
YQ
3272015-10-12 Yao Qi <yao.qi@linaro.org>
328
329 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
330 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
331 (aarch64_relocate_instruction): Likewise.
332 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
333 (struct aarch64_insn_visitor): Likewise.
334
0badd99f
YQ
3352015-10-12 Yao Qi <yao.qi@linaro.org>
336
337 * linux-aarch64-low.c (struct aarch64_insn_data): New.
338 (struct aarch64_insn_visitor): New.
339 (struct aarch64_insn_relocation_data): New.
340 (aarch64_ftrace_insn_reloc_b): New function.
341 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
342 (aarch64_ftrace_insn_reloc_cb): Likewise.
343 (aarch64_ftrace_insn_reloc_tb): Likewise.
344 (aarch64_ftrace_insn_reloc_adr): Likewise.
345 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
346 (aarch64_ftrace_insn_reloc_others): Likewise.
347 (visitor): New.
348 (aarch64_relocate_instruction): Use visitor.
349
dfaffe9d
YQ
3502015-10-12 Yao Qi <yao.qi@linaro.org>
351
352 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
353 int. Add argument buf.
354 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
355 aarch64_relocate_instruction.
356
70b439f0
YQ
3572015-10-12 Yao Qi <yao.qi@linaro.org>
358
359 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
360 argument insn. Remove local variable insn. Don't call
361 target_read_uint32.
362 (aarch64_install_fast_tracepoint_jump_pad): Call
363 target_read_uint32.
364
7781c06f
YQ
3652015-09-30 Yao Qi <yao.qi@linaro.org>
366
367 * linux-aarch64-low.c (emit_movk): Shorten a long line.
368 (emit_load_store_pair): Likewise.
369
9a3c8263
SM
3702015-09-25 Simon Marchi <simon.marchi@ericsson.com>
371
372 * dll.c (match_dll): Add cast(s).
373 (unloaded_dll): Likewise.
374 * linux-low.c (second_thread_of_pid_p): Likewise.
375 (delete_lwp_callback): Likewise.
376 (count_events_callback): Likewise.
377 (select_event_lwp_callback): Likewise.
378 (linux_set_resume_request): Likewise.
379 * server.c (accumulate_file_name_length): Likewise.
380 (emit_dll_description): Likewise.
381 (handle_qxfer_threads_worker): Likewise.
382 (visit_actioned_threads): Likewise.
383 * thread-db.c (any_thread_of): Likewise.
384 * tracepoint.c (same_process_p): Likewise.
385 (match_blocktype): Likewise.
386 (build_traceframe_info_xml): Likewise.
387
224c3ddb
SM
3882015-09-25 Simon Marchi <simon.marchi@ericsson.com>
389
390 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
391 assignment.
392 (gdb_unparse_agent_expr): Likewise.
393 * hostio.c (require_data): Likewise.
394 (handle_pread): Likewise.
395 * linux-low.c (disable_regset): Likewise.
396 (fetch_register): Likewise.
397 (store_register): Likewise.
398 (get_dynamic): Likewise.
399 (linux_qxfer_libraries_svr4): Likewise.
400 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
401 (set_fast_tracepoint_jump): Likewise.
402 (uninsert_fast_tracepoint_jumps_at): Likewise.
403 (reinsert_fast_tracepoint_jumps_at): Likewise.
404 (validate_inserted_breakpoint): Likewise.
405 (clone_agent_expr): Likewise.
406 * regcache.c (init_register_cache): Likewise.
407 * remote-utils.c (putpkt_binary_1): Likewise.
408 (decode_M_packet): Likewise.
409 (decode_X_packet): Likewise.
410 (look_up_one_symbol): Likewise.
411 (relocate_instruction): Likewise.
412 (monitor_output): Likewise.
413 * server.c (handle_search_memory): Likewise.
414 (handle_qxfer_exec_file): Likewise.
415 (handle_qxfer_libraries): Likewise.
416 (handle_qxfer): Likewise.
417 (handle_query): Likewise.
418 (handle_v_cont): Likewise.
419 (handle_v_run): Likewise.
420 (captured_main): Likewise.
421 * target.c (write_inferior_memory): Likewise.
422 * thread-db.c (try_thread_db_load_from_dir): Likewise.
423 * tracepoint.c (init_trace_buffer): Likewise.
424 (add_tracepoint_action): Likewise.
425 (add_traceframe): Likewise.
426 (add_traceframe_block): Likewise.
427 (cmd_qtdpsrc): Likewise.
428 (cmd_qtdv): Likewise.
429 (cmd_qtstatus): Likewise.
430 (response_source): Likewise.
431 (response_tsv): Likewise.
432 (cmd_qtnotes): Likewise.
433 (gdb_collect): Likewise.
434 (initialize_tracepoint): Likewise.
435
afbe19f8
PL
4362015-09-21 Pierre Langlois <pierre.langlois@arm.com>
437
438 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
439 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
440 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
441 <NOP>: New.
442 (enum aarch64_condition_codes): New enum.
443 (w0): New static global.
444 (fp): Likewise.
445 (lr): Likewise.
446 (struct aarch64_memory_operand) <type>: New
447 MEMORY_OPERAND_POSTINDEX type.
448 (postindex_memory_operand): New helper function.
449 (emit_ret): New function.
450 (emit_load_store_pair): New function, factored out of emit_stp
451 with support for MEMORY_OPERAND_POSTINDEX.
452 (emit_stp): Rewrite using emit_load_store_pair.
453 (emit_ldp): New function.
454 (emit_load_store): Likewise.
455 (emit_ldr): Mention post-index instruction in comment.
456 (emit_ldrh): New function.
457 (emit_ldrb): New function.
458 (emit_ldrsw): Mention post-index instruction in comment.
459 (emit_str): Likewise.
460 (emit_subs): New function.
461 (emit_cmp): Likewise.
462 (emit_and): Likewise.
463 (emit_orr): Likewise.
464 (emit_orn): Likewise.
465 (emit_eor): Likewise.
466 (emit_mvn): Likewise.
467 (emit_lslv): Likewise.
468 (emit_lsrv): Likewise.
469 (emit_asrv): Likewise.
470 (emit_mul): Likewise.
471 (emit_sbfm): Likewise.
472 (emit_sbfx): Likewise.
473 (emit_ubfm): Likewise.
474 (emit_ubfx): Likewise.
475 (emit_csinc): Likewise.
476 (emit_cset): Likewise.
477 (emit_nop): Likewise.
478 (emit_ops_insns): New helper function.
479 (emit_pop): Likewise.
480 (emit_push): Likewise.
481 (aarch64_emit_prologue): New function.
482 (aarch64_emit_epilogue): Likewise.
483 (aarch64_emit_add): Likewise.
484 (aarch64_emit_sub): Likewise.
485 (aarch64_emit_mul): Likewise.
486 (aarch64_emit_lsh): Likewise.
487 (aarch64_emit_rsh_signed): Likewise.
488 (aarch64_emit_rsh_unsigned): Likewise.
489 (aarch64_emit_ext): Likewise.
490 (aarch64_emit_log_not): Likewise.
491 (aarch64_emit_bit_and): Likewise.
492 (aarch64_emit_bit_or): Likewise.
493 (aarch64_emit_bit_xor): Likewise.
494 (aarch64_emit_bit_not): Likewise.
495 (aarch64_emit_equal): Likewise.
496 (aarch64_emit_less_signed): Likewise.
497 (aarch64_emit_less_unsigned): Likewise.
498 (aarch64_emit_ref): Likewise.
499 (aarch64_emit_if_goto): Likewise.
500 (aarch64_emit_goto): Likewise.
501 (aarch64_write_goto_address): Likewise.
502 (aarch64_emit_const): Likewise.
503 (aarch64_emit_call): Likewise.
504 (aarch64_emit_reg): Likewise.
505 (aarch64_emit_pop): Likewise.
506 (aarch64_emit_stack_flush): Likewise.
507 (aarch64_emit_zero_ext): Likewise.
508 (aarch64_emit_swap): Likewise.
509 (aarch64_emit_stack_adjust): Likewise.
510 (aarch64_emit_int_call_1): Likewise.
511 (aarch64_emit_void_call_2): Likewise.
512 (aarch64_emit_eq_goto): Likewise.
513 (aarch64_emit_ne_goto): Likewise.
514 (aarch64_emit_lt_goto): Likewise.
515 (aarch64_emit_le_goto): Likewise.
516 (aarch64_emit_gt_goto): Likewise.
517 (aarch64_emit_ge_got): Likewise.
518 (aarch64_emit_ops_impl): New static global variable.
519 (aarch64_emit_ops): New target function, return
520 &aarch64_emit_ops_impl.
521 (struct linux_target_ops): Install it.
522
bb903df0
PL
5232015-09-21 Pierre Langlois <pierre.langlois@arm.com>
524
525 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
526 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
527 aarch64-ipa.o.
528 * linux-aarch64-ipa.c: New file.
529 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
530 and endian.h.
531 (aarch64_get_thread_area): New target method.
532 (extract_signed_bitfield): New helper function.
533 (aarch64_decode_ldr_literal): New function.
534 (enum aarch64_opcodes): New enum.
535 (struct aarch64_register): New struct.
536 (struct aarch64_operand): New struct.
537 (x0): New static global.
538 (x1): Likewise.
539 (x2): Likewise.
540 (x3): Likewise.
541 (x4): Likewise.
542 (w2): Likewise.
543 (ip0): Likewise.
544 (sp): Likewise.
545 (xzr): Likewise.
546 (aarch64_register): New helper function.
547 (register_operand): Likewise.
548 (immediate_operand): Likewise.
549 (struct aarch64_memory_operand): New struct.
550 (offset_memory_operand): New helper function.
551 (preindex_memory_operand): Likewise.
552 (enum aarch64_system_control_registers): New enum.
553 (ENCODE): New macro.
554 (emit_insn): New helper function.
555 (emit_b): New function.
556 (emit_bcond): Likewise.
557 (emit_cb): Likewise.
558 (emit_tb): Likewise.
559 (emit_blr): Likewise.
560 (emit_stp): Likewise.
561 (emit_ldp_q_offset): Likewise.
562 (emit_stp_q_offset): Likewise.
563 (emit_load_store): Likewise.
564 (emit_ldr): Likewise.
565 (emit_ldrsw): Likewise.
566 (emit_str): Likewise.
567 (emit_ldaxr): Likewise.
568 (emit_stxr): Likewise.
569 (emit_stlr): Likewise.
570 (emit_data_processing_reg): Likewise.
571 (emit_data_processing): Likewise.
572 (emit_add): Likewise.
573 (emit_sub): Likewise.
574 (emit_mov): Likewise.
575 (emit_movk): Likewise.
576 (emit_mov_addr): Likewise.
577 (emit_mrs): Likewise.
578 (emit_msr): Likewise.
579 (emit_sevl): Likewise.
580 (emit_wfe): Likewise.
581 (append_insns): Likewise.
582 (can_encode_int32_in): New helper function.
583 (aarch64_relocate_instruction): New function.
584 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
585 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
586 (struct linux_target_ops): Install aarch64_get_thread_area,
587 aarch64_install_fast_tracepoint_jump_pad and
588 aarch64_get_min_fast_tracepoint_insn_len.
589
787749ea
PL
5902015-09-21 Pierre Langlois <pierre.langlois@arm.com>
591
592 * Makefile.in (aarch64-insn.o): New rule.
593 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
594
9812b2e6
YQ
5952015-09-21 Yao Qi <yao.qi@linaro.org>
596
597 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
598
18fe412b
YQ
5992015-09-21 Yao Qi <yao.qi@linaro.org>
600
601 * tracepoint.c (max_jump_pad_size): Remove.
602
a0cc84cd
YQ
6032015-09-18 Yao Qi <yao.qi@linaro.org>
604
605 * linux-aarch64-low.c: Don't include sys/uio.h.
606 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
607
d78908cf
WW
6082015-09-16 Wei-cheng Wang <cole945@gmail.com>
609
610 * tracepoint.c (eval_result_type): Change prototype.
611 (condition_true_at_tracepoint): Fix argument to compiled_cond.
612
d57e0d50
PA
6132015-09-15 Pedro Alves <palves@redhat.com>
614
615 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
616 Check whether to report exec events instead of checking whether
617 multiprocess is enabled.
618
5a676acc
PA
6192015-09-15 Pedro Alves <palves@redhat.com>
620
621 PR remote/18965
622 * remote-utils.c (prepare_resume_reply): Merge
623 TARGET_WAITKIND_VFORK_DONE switch case with the
624 TARGET_WAITKIND_FORKED case.
625
7c5d0fad
YQ
6262015-09-15 Yao Qi <yao.qi@linaro.org>
627
628 * server.c (handle_query): Check string comparison using
629 "else if" instead of "if".
630
750ce8d1
YQ
6312015-09-15 Yao Qi <yao.qi@linaro.org>
632
633 * server.c (vCont_supported): New global variable.
634 (handle_query): Set vCont_supported to 1 if "vContSupported+"
635 matches. Append ";vContSupported+" to own_buf.
636 (handle_v_requests): Append ";s;S" to own_buf if target supports
637 hardware single step or vCont_supported is false.
638 (capture_main): Set vCont_supported to zero.
639
70b90b91
YQ
6402015-09-15 Yao Qi <yao.qi@linaro.org>
641
642 * linux-low.c (linux_supports_conditional_breakpoints): Rename
643 it to ...
644 (linux_supports_hardware_single_step): ... New function.
645 (linux_target_ops): Update.
646 * lynx-low.c (lynx_target_ops): Set field
647 supports_hardware_single_step to target_can_do_hardware_single_step.
648 * nto-low.c (nto_target_ops): Likewise.
649 * spu-low.c (spu_target_ops): Likewise.
650 * win32-low.c (win32_target_ops): Likewise.
651 * target.c (target_can_do_hardware_single_step): New function.
652 * target.h (struct target_ops) <supports_conditional_breakpoints>:
653 Remove. <supports_hardware_single_step>: New field.
654 (target_supports_conditional_breakpoints): Remove.
655 (target_supports_hardware_single_step): New macro.
656 (target_can_do_hardware_single_step): Declare.
657 * server.c (handle_query): Use target_supports_hardware_single_step
658 instead of target_supports_conditional_breakpoints.
659
ade90bde
YQ
6602015-09-15 Yao Qi <yao.qi@linaro.org>
661
662 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
663 function.
664 (struct linux_target_ops the_low_target): Install
665 aarch64_linux_siginfo_fixup.
666
94585166
DB
6672015-09-11 Don Breazeal <donb@codesourcery.com>
668 Luis Machado <lgustavo@codesourcery.com>
669
670 * linux-low.c (linux_mourn): Static declaration.
671 (linux_arch_setup): Move in front of
672 handle_extended_wait.
673 (linux_arch_setup_thread): New function.
674 (handle_extended_wait): Handle exec events. Call
675 linux_arch_setup_thread. Make event_lwp argument a
676 pointer-to-a-pointer.
677 (check_zombie_leaders): Do not check stopped threads.
678 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
679 (linux_low_filter_event): Add lwp and thread for exec'ing
680 non-leader thread if leader thread has been deleted.
681 Refactor code into linux_arch_setup_thread and call it.
682 Pass child lwp pointer by reference to handle_extended_wait.
683 (linux_wait_for_event_filtered): Update comment.
684 (linux_wait_1): Prevent clobbering exec event status.
685 (linux_supports_exec_events): New function.
686 (linux_target_ops) <supports_exec_events>: Initialize new member.
687 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
688 new member.
689 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
690 * server.c (report_exec_events): New global variable.
691 (handle_query): Handle qSupported query for exec-events feature.
692 (captured_main): Initialize report_exec_events.
693 * server.h (report_exec_events): Declare new global variable.
694 * target.h (struct target_ops) <supports_exec_events>: New
695 member.
696 (target_supports_exec_events): New macro.
697 * win32-low.c (win32_target_ops) <supports_exec_events>:
698 Initialize new member.
699
0568462b
MM
7002015-09-09 Markus Metzger <markus.t.metzger@intel.com>
701
702 * linux-low.c (linux_low_enable_btrace): Remove.
703 (linux_target_ops): Replace linux_low_enable_btrace with
704 linux_enable_btrace.
705
39edd165
YQ
7062015-09-03 Yao Qi <yao.qi@linaro.org>
707
708 * linux-aarch64-low.c (aarch64_insert_point): Call
709 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
710 returns true.
711
1db33b5a
UW
7122015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
713
714 * linux-low.c (check_stopped_by_breakpoint): Use
715 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
716
ab290430
PA
7172015-08-27 Pedro Alves <palves@redhat.com>
718
719 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
720
8d749320
SM
7212015-08-26 Simon Marchi <simon.marchi@ericsson.com>
722
6711b7f8
SM
723 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
724 the XNEW-family equivalent.
8d749320
SM
725 (compile_bytecodes): Likewise.
726 * dll.c (loaded_dll): Likewise.
727 * event-loop.c (append_callback_event): Likewise.
728 (create_file_handler): Likewise.
729 (create_file_event): Likewise.
730 * hostio.c (handle_open): Likewise.
731 * inferiors.c (add_thread): Likewise.
732 (add_process): Likewise.
733 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
734 * linux-arm-low.c (arm_new_process): Likewise.
735 (arm_new_thread): Likewise.
736 * linux-low.c (add_to_pid_list): Likewise.
737 (linux_add_process): Likewise.
738 (handle_extended_wait): Likewise.
739 (add_lwp): Likewise.
740 (enqueue_one_deferred_signal): Likewise.
741 (enqueue_pending_signal): Likewise.
742 (linux_resume_one_lwp_throw): Likewise.
743 (linux_resume_one_thread): Likewise.
744 (linux_read_memory): Likewise.
745 (linux_write_memory): Likewise.
746 * linux-mips-low.c (mips_linux_new_process): Likewise.
747 (mips_linux_new_thread): Likewise.
748 (mips_add_watchpoint): Likewise.
749 * linux-x86-low.c (initialize_low_arch): Likewise.
750 * lynx-low.c (lynx_add_process): Likewise.
751 * mem-break.c (set_raw_breakpoint_at): Likewise.
752 (set_breakpoint): Likewise.
753 (add_condition_to_breakpoint): Likewise.
754 (add_commands_to_breakpoint): Likewise.
755 (clone_agent_expr): Likewise.
756 (clone_one_breakpoint): Likewise.
757 * regcache.c (new_register_cache): Likewise.
758 * remote-utils.c (look_up_one_symbol): Likewise.
759 * server.c (queue_stop_reply): Likewise.
760 (start_inferior): Likewise.
761 (queue_stop_reply_callback): Likewise.
762 (handle_target_event): Likewise.
763 * spu-low.c (fetch_ppc_memory): Likewise.
764 (store_ppc_memory): Likewise.
765 * target.c (set_target_ops): Likewise.
766 * thread-db.c (thread_db_load_search): Likewise.
767 (try_thread_db_load_1): Likewise.
768 * tracepoint.c (add_tracepoint): Likewise.
769 (add_tracepoint_action): Likewise.
770 (create_trace_state_variable): Likewise.
771 (cmd_qtdpsrc): Likewise.
772 (cmd_qtro): Likewise.
773 (add_while_stepping_state): Likewise.
774 * win32-low.c (child_add_thread): Likewise.
775 (get_image_name): Likewise.
776
ed8b7b42
YQ
7772015-08-25 Yao Qi <yao.qi@linaro.org>
778
779 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
780
db3cb7cb
YQ
7812015-08-25 Yao Qi <yao.qi@linaro.org>
782
783 * Makefile.in (aarch64-linux.o): New rule.
784 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
785 srv_tgtobj.
786 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
787 (aarch64_init_debug_reg_state): Make it extern.
788 (aarch64_linux_prepare_to_resume): Remove.
789
f6011a1c
YQ
7902015-08-25 Yao Qi <yao.qi@linaro.org>
791
792 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
793 lwp_arch_private_info and ptid_of_lwp.
794
88e2cf7e
YQ
7952015-08-25 Yao Qi <yao.qi@linaro.org>
796
797 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
798 Find proc_info by find_process_pid. All callers updated.
799
5e35436e
YQ
8002015-08-25 Yao Qi <yao.qi@linaro.org>
801
802 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
803 Remove.
804 (debug_reg_change_callback): Remove.
805 (aarch64_notify_debug_reg_change): Remove.
806
4a8a7965
YQ
8072015-08-25 Yao Qi <yao.qi@linaro.org>
808
809 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
810 Call current_lwp_ptid.
811
32a271ee
YQ
8122015-08-25 Yao Qi <yao.qi@linaro.org>
813
814 * linux-aarch64-low.c (debug_reg_change_callback): Use
815 debug_printf.
816
0d51c8d7
YQ
8172015-08-25 Yao Qi <yao.qi@linaro.org>
818
819 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
820
31a43dd5
YQ
8212015-08-25 Yao Qi <yao.qi@linaro.org>
822
823 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
824
8ee52567
YQ
8252015-08-25 Yao Qi <yao.qi@linaro.org>
826
827 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
828 the code.
829
ff3f0f45
YQ
8302015-08-25 Yao Qi <yao.qi@linaro.org>
831
832 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
833 Remove.
834 (debug_reg_change_callback): Remove argument entry and add argument
835 lwp. Remove local variable thread. Don't print thread id in the
836 debugging output. Don't check whether pid of thread equals to pid.
837 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
838 iterate_over_lwps instead find_inferior.
839
3d40fbb5
PA
8402015-08-24 Pedro Alves <palves@redhat.com>
841
842 * inferiors.c (get_first_process): New function.
843 * inferiors.h (get_first_process): New declaration.
844 * remote-utils.c (read_ptid): Default to the first process in the
845 list, instead of to the current thread's process.
846
438e1e42
PA
8472015-08-24 Pedro Alves <palves@redhat.com>
848
849 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
850 * event-loop.c: Likewise.
851 * remote-utils.c: Likewise.
852 * tracepoint.c: Likewise.
853
a8c6d4fc
PA
8542015-08-24 Pedro Alves <palves@redhat.com>
855
856 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
857 ptid_get_lwp.
858
99b0bb12
PA
8592015-08-21 Pedro Alves <palves@redhat.com>
860
861 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
862 instead of literal 1.
863
f8904751
PA
8642015-08-21 Pedro Alves <palves@redhat.com>
865
866 * tdesc.c (default_description): Explicitly zero-initialize.
867
465a859e
PA
8682015-08-21 Pedro Alves <palves@redhat.com>
869
870 PR gdb/18749
871 * inferiors.c (remove_thread): Discard any pending stop reply for
872 this thread.
873 * server.c (remove_all_on_match_pid): Rename to ...
874 (remove_all_on_match_ptid): ... this. Work with a filter ptid
875 instead of a pid.
876 (discard_queued_stop_replies): Change parameter to a ptid. Now
877 extern.
878 (handle_v_kill, kill_inferior_callback, captured_main)
879 (process_serial_event): Adjust.
880 * server.h (discard_queued_stop_replies): Declare.
881
f0db101d
PA
8822015-08-21 Pedro Alves <palves@redhat.com>
883
884 * linux-low.c (wait_for_sigstop): Always switch to no thread
885 selected if the previously current thread dies.
886 * lynx-low.c (lynx_request_interrupt): Use the first thread's
887 process instead of the current thread's.
888 * remote-utils.c (input_interrupt): Don't check if there's no
889 current thread.
890 * server.c (gdb_read_memory, gdb_write_memory): If setting the
891 current thread to the general thread fails, error out.
892 (handle_qxfer_auxv, handle_qxfer_libraries)
893 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
894 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
895 (handle_query): Check if there's a thread selected instead of
896 checking whether there's any thread in the thread list.
897 (handle_qxfer_threads, handle_qxfer_btrace)
898 (handle_qxfer_btrace_conf): Don't error out early if there's no
899 thread in the thread list.
900 (handle_v_cont, myresume): Don't set the current thread to the
901 continue thread.
902 (process_serial_event) <Hg handling>: Also set thread_id if the
903 previous general thread is still alive.
904 (process_serial_event) <g/G handling>: If setting the current
905 thread to the general thread fails, error out.
906 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
907 thread's lwp instead of the current thread's.
908 * target.c (set_desired_thread): If the desired thread was not
909 found, leave the current thread pointing to NULL. Return an int
910 (boolean) indicating success.
911 * target.h (set_desired_thread): Change return type to int.
912
40045d91
MF
9132015-08-20 Max Filippov <jcmvbkbc@gmail.com>
914
915 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
916 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
917 #includes.
918 (ps_get_thread_area): New function.
919
45face3b
GB
9202015-08-19 Gary Benson <gbenson@redhat.com>
921
922 * hostio.c (handle_pread): Do not attempt to read more data
923 than hostio_reply_with_data can fit in a packet.
924
16d5f642
JB
9252015-08-18 Joel Brobecker <brobecker@adacore.com>
926
927 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
928
a738da3a
MF
9292015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
930
931 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
932
33ebda9d
PA
9332015-08-06 Pedro Alves <palves@redhat.com>
934
935 * tracepoint.c (expr_eval_result): Now an int.
936
a44892be
PA
9372015-08-06 Pedro Alves <palves@redhat.com>
938
939 * gdbthread.h (struct regcache): Forward declare.
940 (struct thread_info) <regcache_data>: Now a struct regcache
941 pointer.
942 * inferiors.c (inferior_regcache_data)
943 (set_inferior_regcache_data): Now work with struct regcache
944 pointers.
945 * inferiors.h (struct regcache): Forward declare.
946 (inferior_regcache_data, set_inferior_regcache_data): Now work
947 with struct regcache pointers.
948 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
949 (free_register_cache_thread): Remove struct regcache pointer
950 casts.
951
608a1e46
PA
9522015-08-06 Pedro Alves <palves@redhat.com>
953
954 * server.c (captured_main): On error, print the exception message
955 to stderr, and if run_once is set, throw a quit.
956
f0ce0d3a
PA
9572015-08-06 Pedro Alves <palves@redhat.com>
958
959 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
960 the current thread.
961
bf47e248
PA
9622015-08-06 Pedro Alves <palves@redhat.com>
963
964 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
965 reading beyond the passed in buffer length.
966
b6b9ffcc
PL
9672015-08-06 Pierre Langlois <pierre.langlois@arm.com>
968
969 * tracepoint.c (symbol_list) <required>: Remove.
970
863d01bd
PA
9712015-08-06 Pedro Alves <palves@redhat.com>
972
973 * linux-low.c (handle_extended_wait): Set the fork child's suspend
974 count if stopping and suspending threads.
975 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
976 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
977 (linux_detach): Complete an ongoing step-over.
978 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
979 throughout.
980 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
981 (linux_wait_1): If passing a signal to the inferior after
982 finishing a step-over, unsuspend and re-resume all lwps. If we
983 see a single-step event but the thread should be continuing, don't
984 pass the trap to gdb.
985 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
986 internal_error instead of gdb_assert.
987 (enqueue_pending_signal): New function.
988 (check_ptrace_stopped_lwp_gone): Add debug output.
989 (start_step_over): Use internal_error instead of gdb_assert.
990 (complete_ongoing_step_over): New function.
991 (linux_resume_one_thread): Don't resume a suspended thread.
992 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
993 it stepping.
994
00db26fa
PA
9952015-08-06 Pedro Alves <palves@redhat.com>
996
997 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
998 (linux_thread_alive): Use lwp_is_marked_dead.
999 (extended_event_reported): Delete.
1000 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1001 instead of extended_event_reported.
1002 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1003 as well.
1004 (lwp_is_marked_dead): New function.
1005 (lwp_running): Use lwp_is_marked_dead.
1006 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1007 comment.
1008
ad071a30
PA
10092015-08-06 Pedro Alves <palves@redhat.com>
1010
1011 * linux-low.c (linux_wait_1): Move fork event output out of the
1012 !report_to_gdb check. Pass event_child->waitstatus to
1013 target_waitstatus_to_string instead of ourstatus.
1014
524b57e6
YQ
10152015-08-04 Yao Qi <yao.qi@linaro.org>
1016
1017 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1018 if current_thread is 32 bit.
1019
6085d6f6
YQ
10202015-08-04 Yao Qi <yao.qi@linaro.org>
1021
1022 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1023 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1024 * server.c (extended_protocol): Remove "static".
1025 * server.h (extended_protocol): Declare it.
1026
8a7e4587
YQ
10272015-08-04 Yao Qi <yao.qi@linaro.org>
1028
1029 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1030 both aarch64 and aarch32.
1031 (aarch64_set_pc): Likewise.
1032
3b53ae99
YQ
10332015-08-04 Yao Qi <yao.qi@linaro.org>
1034
1035 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1036 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1037 arm-with-neon.xml to srv_xmlfiles.
1038 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1039 (is_64bit_tdesc): New function.
1040 (aarch64_linux_read_description): New function.
1041 (aarch64_arch_setup): Call aarch64_linux_read_description.
1042 (regs_info): Rename to regs_info_aarch64.
1043 (aarch64_regs_info): Return right regs_info.
1044 (initialize_low_arch): Call initialize_low_arch_aarch32.
1045
bd9e6534
YQ
10462015-08-04 Yao Qi <yao.qi@linaro.org>
1047
1048 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1049 * linux-aarch32-low.c: New file.
1050 * linux-aarch32-low.h: New file.
1051 * linux-arm-low.c (arm_fill_gregset): Move it to
1052 linux-aarch32-low.c.
1053 (arm_store_gregset): Likewise.
1054 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1055 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1056 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1057 (regs_info): Rename to regs_info_arm.
1058 (arm_regs_info): Return regs_info_aarch32 if
1059 have_ptrace_getregset is 1 and target description is
1060 arm_with_neon or arm_with_vfpv3.
1061 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1062 Call initialize_low_arch_aarch32 instead.
1063
ded48a5e
YQ
10642015-08-04 Yao Qi <yao.qi@linaro.org>
1065
1066 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1067 * linux-low.c: ... here.
1068 * linux-low.h (have_ptrace_getregset): Declare it.
1069
96e9210f
PA
10702015-08-04 Pedro Alves <palves@redhat.com>
1071
1072 * thread-db.c (struct thread_db): Use new typedefs.
1073 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1074 CHK calls.
1075 (disable_thread_event_reporting): Cast result of dlsym to
1076 destination function pointer type.
1077 (thread_db_mourn): Use td_ta_delete_ftype.
1078
af60a1ef
SL
10792015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1080
1081 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1082 arch variant.
1083 (CDX_BREAKPOINT): Define for R2.
1084 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1085 (the_low_target): Add comments.
1086
e8b41681
YQ
10872015-07-30 Yao Qi <yao.qi@linaro.org>
1088
1089 * linux-arm-low.c (arm_hwcap): Remove it.
1090 (arm_read_description): New local variable arm_hwcap. Don't
1091 set arm_hwcap to zero.
1092
89abb039
YQ
10932015-07-30 Yao Qi <yao.qi@linaro.org>
1094
1095 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1096 Use regcache->tdesc instead.
1097 (arm_store_wmmxregset): Likewise.
1098 (arm_fill_vfpregset): Likewise.
1099 (arm_store_vfpregset): Likewise.
1100
deca266c
YQ
11012015-07-30 Yao Qi <yao.qi@linaro.org>
1102
1103 * linux-arm-low.c: Include arch/arm.h.
1104 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1105 (arm_store_gregset): Likewise.
1106
aa58a496
SM
11072015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1108
1109 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1110 ptrace's 4th parameter.
1111
50904b25
YQ
11122015-07-27 Yao Qi <yao.qi@linaro.org>
1113
1114 * configure.srv (case aarch64*-*-linux*): Don't set
1115 srv_linux_usrregs.
1116
5826e159
PA
11172015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1118
1119 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1120 sys/ptrace.h.
1121 * linux-arm-low.c: Likewise.
1122 * linux-cris-low.c: Likewise.
1123 * linux-crisv32-low.c: Likewise.
1124 * linux-low.c: Likewise.
1125 * linux-m68k-low.c: Likewise.
1126 * linux-mips-low.c: Likewise.
1127 * linux-nios2-low.c: Likewise.
1128 * linux-s390-low.c: Likewise.
1129 * linux-sparc-low.c: Likewise.
1130 * linux-tic6x-low.c: Likewise.
1131 * linux-tile-low.c: Likewise.
1132 * linux-x86-low.c: Likewise.
1133
54019719
PA
11342015-07-24 Pedro Alves <palves@redhat.com>
1135
1136 * config.in: Regenerate.
1137 * configure: Regenerate.
1138
eb7aa561
PA
11392015-07-24 Pedro Alves <palves@redhat.com>
1140
1141 * acinclude.m4: Include ../ptrace.m4.
1142 * configure.ac: Call GDB_AC_PTRACE.
1143 * config.in, configure: Regenerate.
1144
55d7b841
YQ
11452015-07-24 Yao Qi <yao.qi@linaro.org>
1146
1147 * linux-low.c (linux_create_inferior): Remove setting to
1148 proc->priv->new_inferior.
1149 (linux_attach): Likewise.
1150 (linux_low_filter_event): Likewise.
1151 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1152
c06cbd92
YQ
11532015-07-24 Yao Qi <yao.qi@linaro.org>
1154
1155 * linux-low.c (linux_arch_setup): New function.
1156 (linux_low_filter_event): If proc->tdesc is NULL and
1157 proc->attached is true, call the_low_target.arch_setup.
1158 Otherwise, keep status pending, and return.
1159 (linux_resume_one_lwp_throw): Don't call get_pc if
1160 thread->while_stepping isn't NULL. Don't call
1161 get_thread_regcache if proc->tdesc is NULL.
1162 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1163 (linux_target_ops): Install arch_setup.
1164 * server.c (start_inferior): Call the_target->arch_setup.
1165 * target.h (struct target_ops) <arch_setup>: New field.
1166 (target_arch_setup): New marco.
1167 * lynx-low.c (lynx_target_ops): Update.
1168 * nto-low.c (nto_target_ops): Update.
1169 * spu-low.c (spu_target_ops): Update.
1170 * win32-low.c (win32_target_ops): Update.
1171
5ae3ebba
YQ
11722015-07-24 Yao Qi <yao.qi@linaro.org>
1173
1174 * linux-low.c (linux_add_process): Don't set
1175 proc->priv->new_inferior.
1176 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1177 (linux_attach): Likewise.
1178
eb97750b
YQ
11792015-07-24 Yao Qi <yao.qi@linaro.org>
1180
1181 * server.c (start_inferior): Code refactor.
1182
51aee833
YQ
11832015-07-24 Yao Qi <yao.qi@linaro.org>
1184
1185 * server.c (process_serial_event): Set general_thread.
1186
af1b22f3
YQ
11872015-07-21 Yao Qi <yao.qi@linaro.org>
1188
1189 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1190 aarch64_linux_get_debug_reg_capacity.
1191
554717a3
YQ
11922015-07-17 Yao Qi <yao.qi@linaro.org>
1193
1194 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1195 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1196 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1197 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1198 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1199 (AARCH64_HWP_ALIGNMENT): Likewise.
1200 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1201 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1202 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1203 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1204 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1205 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1206 (struct aarch64_debug_reg_state): Likewise.
1207 (struct arch_lwp_info): Likewise.
1208 (aarch64_align_watchpoint): Likewise.
1209 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1210 (aarch64_watchpoint_length): Likewise.
1211 (aarch64_point_encode_ctrl_reg): Likewise
1212 (aarch64_point_is_aligned): Likewise.
1213 (aarch64_align_watchpoint): Likewise.
1214 (aarch64_linux_set_debug_regs):
1215 (aarch64_dr_state_insert_one_point): Likewise.
1216 (aarch64_dr_state_remove_one_point): Likewise.
1217 (aarch64_handle_breakpoint): Likewise.
1218 (aarch64_handle_aligned_watchpoint): Likewise.
1219 (aarch64_handle_unaligned_watchpoint): Likewise.
1220 (aarch64_handle_watchpoint): Likewise.
1221
c67ca4de
YQ
12222015-07-17 Yao Qi <yao.qi@linaro.org>
1223
1224 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1225 and don't aarch64_get_debug_reg_state. All callers update.
1226 (aarch64_handle_aligned_watchpoint): Likewise.
1227 (aarch64_handle_unaligned_watchpoint): Likewise.
1228 (aarch64_handle_watchpoint): Likewise.
1229 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1230 (aarch64_remove_point): Likewise.
1231
25abf979
YQ
12322015-07-17 Yao Qi <yao.qi@linaro.org>
1233
1234 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1235 debug_printf.
1236 (aarch64_handle_unaligned_watchpoint): Likewise.
1237
db1ff28b
JK
12382015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1239
1240 Revert the previous 3 commits:
1241 Move gdb_regex* to common/
1242 Move linux_find_memory_regions_full & co.
1243 gdbserver build-id attribute generator
1244
700ca40f
JK
12452015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1246 Jan Kratochvil <jan.kratochvil@redhat.com>
1247
1248 gdbserver build-id attribute generator.
1249 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1250 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1251 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1252 (find_phdr): New.
1253 (get_dynamic): Use find_pdhr to traverse program headers.
1254 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1255 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1256 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1257 (get_hex_build_id): New.
1258 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1259 to reply XML document.
1260
9904185c
JK
12612015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1262 Jan Kratochvil <jan.kratochvil@redhat.com>
1263
1264 * target.c: Include target/target-utils.h and fcntl.h.
1265 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1266 (target_fileio_read_stralloc): New functions.
1267
6e5b4429
JK
12682015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1269
1270 * Makefile.in (OBS): Add gdb_regex.o.
1271 (gdb_regex.o): New.
1272 * config.in: Rebuilt.
1273 * configure: Rebuilt.
1274
ddc98fbf
JK
12752015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1276 Jan Kratochvil <jan.kratochvil@redhat.com>
1277
1278 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1279 * Makefile.in (OBS): Add target-utils.o.
1280 (linux-maps.o, target-utils.o): New.
1281 * configure.srv (srv_linux_obj): Add linux-maps.o.
1282
e57bb7a0
PL
12832015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1284
1285 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1286 function, return 1.
1287 (the_low_target): Install it.
1288
586b02a9
PA
12892015-07-14 Pedro Alves <palves@redhat.com>
1290
1291 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1292 Instead, ignore ECHILD, and throw an error for other errnos.
1293
58c1b36c
PA
12942015-07-10 Pedro Alves <palves@redhat.com>
1295
1296 * event-loop.c (struct callback_event) <data>: Change type to
1297 gdb_client_data instance instead of gdb_client_data pointer.
1298 (append_callback_event): Adjust.
1299
421530db
PL
13002015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1301
1302 * linux-aarch64-low.c: Add comments for each linux_target_ops
1303 method. Remove comments already covered in target_ops and
1304 linux_target_ops definitions.
1305 (the_low_target): Add comments for each unimplemented method.
1306
c2d65f38
YQ
13072015-07-09 Yao Qi <yao.qi@linaro.org>
1308
1309 * linux-aarch64-low.c (aarch64_regmap): Remove.
1310 (aarch64_usrregs_info): Remove.
1311 (regs_info): Set field usrregs to NULL.
1312
b20a6524
MM
13132015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1314
1315 * linux-low.c: Include "rsp-low.h"
1316 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1317 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1318 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1319 (handle_btrace_enable_pt): New.
1320 (handle_btrace_general_set): Support "pt".
1321 (handle_btrace_conf_general_set): Support "pt:size".
1322
96c97461
PL
13232015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1324
1325 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1326 Z_PACKET_SW_BP.
1327
37d66942
PL
13282015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1329
1330 * linux-aarch64-low.c: Remove comment about endianness.
1331 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1332 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1333 memcmp.
1334
dc06243f
GB
13352015-06-24 Gary Benson <gbenson@redhat.com>
1336
1337 * linux-i386-ipa.c (stdint.h): Do not include.
1338 * lynx-i386-low.c (stdint.h): Likewise.
1339 * lynx-ppc-low.c (stdint.h): Likewise.
1340 * mem-break.c (stdint.h): Likewise.
1341 * thread-db.c (stdint.h): Likewise.
1342 * tracepoint.c (stdint.h): Likewise.
1343 * win32-low.c (stdint.h): Likewise.
1344
124e13d9
SM
13452015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1346
1347 * server.c (write_qxfer_response): Update call to
1348 remote_escape_output.
1349
909c2cda
JK
13502015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1351 Jan Kratochvil <jan.kratochvil@redhat.com>
1352
1353 Merge multiple hex conversions.
1354 * gdbreplay.c (tohex): Rename to 'fromhex'.
1355 (logchar): Use fromhex.
1356
24c05f46
JK
13572015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1358
1359 * server.c (handle_qxfer_libraries): Set `version' attribute for
1360 <library-list>.
1361
14d2069a
GB
13622015-06-10 Gary Benson <gbenson@redhat.com>
1363
1364 * target.h (struct target_ops) <multifs_open>: New field.
1365 <multifs_unlink>: Likewise.
1366 <multifs_readlink>: Likewise.
1367 * linux-low.c (nat/linux-namespaces.h): New include.
1368 (linux_target_ops): Initialize the_target->multifs_open,
1369 the_target->multifs_unlink and the_target->multifs_readlink.
1370 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1371 * hostio.c (hostio_fs_pid): New static variable.
1372 (hostio_handle_new_gdb_connection): New function.
1373 (handle_setfs): Likewise.
1374 (handle_open): Use the_target->multifs_open as appropriate.
1375 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1376 (handle_readlink): Use the_target->multifs_readlink as
1377 appropriate.
1378 (handle_vFile): Handle vFile:setfs packets.
1379 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1380 after target_handle_new_gdb_connection.
1381
4b8b5e72
GB
13822015-06-10 Gary Benson <gbenson@redhat.com>
1383
1384 * configure.ac (AC_CHECK_FUNCS): Add setns.
1385 * config.in: Regenerate.
1386 * configure: Likewise.
1387 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1388 (linux-namespaces.o): New rule.
1389 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1390
3ac2e371
GB
13912015-06-09 Gary Benson <gbenson@redhat.com>
1392
1393 * hostio.c (handle_open): Process mode argument with
1394 fileio_to_host_mode.
1395
ca9b78ce
YQ
13962015-06-01 Yao Qi <yao.qi@linaro.org>
1397
1398 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1399 * linux-x86-low.c: Likewise.
1400
bfacd19d
DB
14012015-05-28 Don Breazeal <donb@codesourcery.com>
1402
1403 * linux-low.c (handle_extended_wait): Initialize
1404 thread_info.last_resume_kind for new fork children.
1405
452003ef
PA
14062015-05-15 Pedro Alves <palves@redhat.com>
1407
1408 * target.h (target_handle_new_gdb_connection): Rewrite using if
1409 wrapped in do/while.
1410
1041a03c
JB
14112015-05-14 Joel Brobecker <brobecker@adacore.com>
1412
1413 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1414 * configure, config.in: Regenerate.
1415 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1416 Declare typedef.
1417
c269dbdb
DB
14182015-05-12 Don Breazeal <donb@codesourcery.com>
1419
1420 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1421 PTRACE_EVENT_VFORK_DONE.
1422 (linux_low_ptrace_options, extended_event_reported): Add vfork
1423 events.
1424 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1425 and "vforkdone" for RSP 'T' Stop Reply Packet.
1426 * server.h (report_vfork_events): Declare
1427 global variable.
1428
3a8a0396
DB
14292015-05-12 Don Breazeal <donb@codesourcery.com>
1430
1431 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1432 (the_low_target) <new_fork>: Initialize new member.
1433 * linux-arm-low.c (arm_new_fork): New function.
1434 (the_low_target) <new_fork>: Initialize new member.
1435 * linux-low.c (handle_extended_wait): Call new target function
1436 new_fork.
1437 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1438 * linux-mips-low.c (mips_add_watchpoint): New function
1439 extracted from mips_insert_point.
1440 (the_low_target) <new_fork>: Initialize new member.
1441 (mips_linux_new_fork): New function.
1442 (mips_insert_point): Call mips_add_watchpoint.
1443 * linux-x86-low.c (x86_linux_new_fork): New function.
1444 (the_low_target) <new_fork>: Initialize new member.
1445
de0d863e
DB
14462015-05-12 Don Breazeal <donb@codesourcery.com>
1447
1448 * linux-low.c (handle_extended_wait): Implement return value,
1449 rename argument 'event_child' to 'event_lwp', handle
1450 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1451 (linux_low_ptrace_options): New function.
1452 (linux_low_filter_event): Call linux_low_ptrace_options,
1453 use different argument fo linux_enable_event_reporting,
1454 use return value from handle_extended_wait.
1455 (extended_event_reported): New function.
1456 (linux_wait_1): Call extended_event_reported and set
1457 status to report fork events.
1458 (linux_write_memory): Add pid to debug message.
1459 (reset_lwp_ptrace_options_callback): New function.
1460 (linux_handle_new_gdb_connection): New function.
1461 (linux_target_ops): Initialize new structure member.
1462 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1463 * lynx-low.c: Initialize new structure member.
1464 * remote-utils.c (prepare_resume_reply): Implement stop reason
1465 "fork" for "T" stop message.
1466 * server.c (handle_query): Call handle_new_gdb_connection.
1467 * server.h (report_fork_events): Declare global flag.
1468 * target.h (struct target_ops) <handle_new_gdb_connection>:
1469 New member.
1470 (target_handle_new_gdb_connection): New macro.
1471 * win32-low.c: Initialize new structure member.
1472
ddcbc397
DB
14732015-05-12 Don Breazeal <donb@codesourcery.com>
1474
1475 * mem-break.c (APPEND_TO_LIST): Define macro.
1476 (clone_agent_expr): New function.
1477 (clone_one_breakpoint): New function.
1478 (clone_all_breakpoints): New function.
1479 * mem-break.h: Declare new functions.
1480
89245bc0
DB
14812015-05-12 Don Breazeal <donb@codesourcery.com>
1482
1483 * linux-low.c (linux_supports_fork_events): New function.
1484 (linux_supports_vfork_events): New function.
1485 (linux_target_ops): Initialize new structure members.
1486 (initialize_low): Call linux_check_ptrace_features.
1487 * lynx-low.c (lynx_target_ops): Initialize new structure
1488 members.
1489 * server.c (report_fork_events, report_vfork_events):
1490 New global flags.
1491 (handle_query): Add new features to qSupported packet and
1492 response.
1493 (captured_main): Initialize new global variables.
1494 * target.h (struct target_ops) <supports_fork_events>:
1495 New member.
1496 <supports_vfork_events>: New member.
1497 (target_supports_fork_events): New macro.
1498 (target_supports_vfork_events): New macro.
1499 * win32-low.c (win32_target_ops): Initialize new structure
1500 members.
1501
835205d0
GB
15022015-05-12 Gary Benson <gbenson@redhat.com>
1503
1504 * server.c (handle_qxfer_exec_file): Use current process
1505 if annex is empty.
1506
21e94bd9
SL
15072015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1508
1509 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1510 Remove HAVE_PTRACE_GETREGS conditionals.
1511 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1512 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1513
45614f15
YQ
15142015-05-08 Yao Qi <yao.qi@linaro.org>
1515
1516 * linux-low.c (linux_supports_conditional_breakpoints): New
1517 function.
1518 (linux_target_ops): Install new target method.
1519 * lynx-low.c (lynx_target_ops): Install NULL hook for
1520 supports_conditional_breakpoints.
1521 * nto-low.c (nto_target_ops): Likewise.
1522 * spu-low.c (spu_target_ops): Likewise.
1523 * win32-low.c (win32_target_ops): Likewise.
1524 * server.c (handle_query): Check
1525 target_supports_conditional_breakpoints.
1526 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1527 New field.
1528 (target_supports_conditional_breakpoints): New macro.
1529
80ad801e
PA
15302015-05-06 Pedro Alves <palves@redhat.com>
1531
1532 PR server/18081
1533 * server.c (start_inferior): If the process exits, mourn it.
1534
819843c7
GB
15352015-04-21 Gary Benson <gbenson@redhat.com>
1536
1537 * hostio.c (fileio_open_flags_to_host): Factored out to
1538 fileio_to_host_openflags in common/fileio.c. Single use
1539 updated.
1540
a2d5a9d7
MF
15412015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1542
1543 * linux-xtensa-low.c (xtensa_fill_gregset)
1544 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1545 XCHAL_HAVE_LOOP.
1546
deb44829
MF
15472015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1548
1549 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1550 (regs_info): Replace usrregs pointer with NULL.
1551
e57f1de3
GB
15522015-04-17 Gary Benson <gbenson@redhat.com>
1553
1554 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1555 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1556 * server.c (handle_qxfer_exec_file): New function.
1557 (qxfer_packets): Add exec-file entry.
1558 (handle_query): Report qXfer:exec-file:read as supported packet.
1559
62828379
RN
15602015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1561
1562 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1563
b88bb450
GB
15642015-04-09 Gary Benson <gbenson@redhat.com>
1565
1566 * hostio-errno.c (errno_to_fileio_error): Remove function.
1567 Update caller to use remote_fileio_to_fio_error.
1568
c8f4bfdd
YQ
15692015-04-09 Yao Qi <yao.qi@linaro.org>
1570
1571 * linux-low.c (linux_insert_point): Call
1572 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1573 (linux_remove_point): Call remove_memory_breakpoint if type is
1574 raw_bkpt_type_sw.
1575 * linux-x86-low.c (x86_insert_point): Don't call
1576 insert_memory_breakpoint.
1577 (x86_remove_point): Don't call remove_memory_breakpoint.
1578
41f98f02
PA
15792015-04-01 Pedro Alves <palves@redhat.com>
1580 Cleber Rosa <crosa@redhat.com>
1581
1582 * server.c (gdbserver_usage): Reorganize and extend the usage
1583 message.
1584
2bf6fb9d
PA
15852015-03-24 Pedro Alves <palves@redhat.com>
1586
1587 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1588 output. Also dump TRAP_TRACE.
1589 (linux_low_filter_event): In debug output, distinguish a
1590 resume_stop SIGSTOP from a delayed SIGSTOP.
1591
369f6daa
GB
15922015-03-24 Gary Benson <gbenson@redhat.com>
1593
1594 * linux-x86-low.c (x86_linux_new_thread): Moved to
1595 nat/x86-linux.c.
1596 (x86_linux_prepare_to_resume): Likewise.
1597
8e5d4070
GB
15982015-03-24 Gary Benson <gbenson@redhat.com>
1599
1600 * Makefile.in (x86-linux-dregs.o): New rule.
1601 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1602 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1603 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1604 (x86_linux_dr_get): Likewise.
1605 (x86_linux_dr_set): Likewise.
1606 (update_debug_registers_callback): Likewise.
1607 (x86_linux_dr_set_addr): Likewise.
1608 (x86_linux_dr_get_addr): Likewise.
1609 (x86_linux_dr_set_control): Likewise.
1610 (x86_linux_dr_get_control): Likewise.
1611 (x86_linux_dr_get_status): Likewise.
1612 (x86_linux_update_debug_registers): Likewise.
1613
2b95d440
GB
16142015-03-24 Gary Benson <gbenson@redhat.com>
1615
1616 * linux-x86-low.c (x86_linux_update_debug_registers):
1617 New function, factored out from...
1618 (x86_linux_prepare_to_resume): ...this.
1619
14b0bc68
GB
16202015-03-24 Gary Benson <gbenson@redhat.com>
1621
1622 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1623 (x86_linux_dr_set): Likewise.
1624 (update_debug_registers_callback): Likewise.
1625 (x86_linux_dr_set_addr): Likewise.
1626 (x86_linux_dr_get_addr): Likewise.
1627 (x86_linux_dr_set_control): Likewise.
1628 (x86_linux_dr_get_control): Likewise.
1629 (x86_linux_dr_get_status): Likewise.
1630 (x86_linux_prepare_to_resume): Likewise.
1631
5dfe6ca8
GB
16322015-03-24 Gary Benson <gbenson@redhat.com>
1633
1634 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1635 Use perror_with_name. Pass string through gettext.
1636 (x86_linux_dr_set): Likewise.
1637
d33472ad
GB
16382015-03-24 Gary Benson <gbenson@redhat.com>
1639
1640 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1641 (x86_linux_dr_set_addr): ...this.
1642 (x86_dr_low_get_addr): Rename to...
1643 (x86_linux_dr_get_addr): ...this.
1644 (x86_dr_low_set_control): Rename to...
1645 (x86_linux_dr_set_control): ...this.
1646 (x86_dr_low_get_control): Rename to...
1647 (x86_linux_dr_get_control): ...this.
1648 (x86_dr_low_get_status): Rename to...
1649 (x86_linux_dr_get_status): ...this.
1650 (x86_dr_low): Update with new function names.
1651
4b134ca1
GB
16522015-03-24 Gary Benson <gbenson@redhat.com>
1653
1654 * Makefile.in (x86-linux.o): New rule.
1655 * configure.srv: Add x86-linux.o to relevant targets.
1656 * linux-low.c (lwp_set_arch_private_info): New function.
1657 (lwp_arch_private_info): Likewise.
1658 * linux-x86-low.c: Include nat/x86-linux.h.
1659 (arch_lwp_info): Removed structure.
1660 (update_debug_registers_callback):
1661 Use lwp_set_debug_registers_changed.
1662 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1663 and lwp_set_debug_registers_changed.
1664 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1665
34c703da
GB
16662015-03-24 Gary Benson <gbenson@redhat.com>
1667
1668 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1669 * linux-arm-low.c (arm_new_thread): Likewise.
1670 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1671 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1672 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1673 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1674
cff068da
GB
16752015-03-24 Gary Benson <gbenson@redhat.com>
1676
1677 * linux-low.c (ptid_of_lwp): New function.
1678 (lwp_is_stopped): Likewise.
1679 (lwp_stop_reason): Likewise.
1680 * linux-x86-low.c (update_debug_registers_callback):
1681 Use lwp_is_stopped.
1682 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1683 lwp_stop_reason.
1684
b2f7c7e8
GB
16852015-03-24 Gary Benson <gbenson@redhat.com>
1686
1687 * linux-low.h (linux_stop_lwp): Remove declaration.
1688
6d4ee8c6
GB
16892015-03-24 Gary Benson <gbenson@redhat.com>
1690
1691 * linux-low.h: Include nat/linux-nat.h.
1692 * linux-low.c (iterate_over_lwps_args): New structure.
1693 (iterate_over_lwps_filter): New function.
1694 (iterate_over_lwps): Likewise.
1695 * linux-x86-low.c (update_debug_registers_callback):
1696 Update signature to what iterate_over_lwps expects.
1697 Remove PID check that iterate_over_lwps now performs.
1698 (x86_dr_low_set_addr): Use iterate_over_lwps.
1699 (x86_dr_low_set_control): Likewise.
1700
70a0bb6b
GB
17012015-03-24 Gary Benson <gbenson@redhat.com>
1702
1703 * linux-x86-low.c (x86_debug_reg_state): New function.
1704 (x86_linux_prepare_to_resume): Use the above.
1705
7b669087
GB
17062015-03-24 Gary Benson <gbenson@redhat.com>
1707
1708 * linux-low.c (current_lwp_ptid): New function.
1709 * linux-x86-low.c: Include nat/linux-nat.h.
1710 (x86_dr_low_get_addr): Use current_lwp_ptid.
1711 (x86_dr_low_get_control): Likewise.
1712 (x86_dr_low_get_status): Likewise.
1713
eef49a3d
PA
17142015-03-20 Pedro Alves <palves@redhat.com>
1715
1716 * tracepoint.c (cmd_qtstatus): Make "str" const.
1717
b2333d22
PA
17182015-03-20 Pedro Alves <palves@redhat.com>
1719
1720 * server.c (handle_general_set): Make "req_str" const.
1721
23f238d3
PA
17222015-03-19 Pedro Alves <palves@redhat.com>
1723
1724 * linux-low.c (linux_resume_one_lwp): Rename to ...
1725 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1726 instead call perror_with_name.
1727 (check_ptrace_stopped_lwp_gone): New function.
1728 (linux_resume_one_lwp): Reimplement as wrapper around
1729 linux_resume_one_lwp_throw that swallows errors if the LWP is
1730 gone.
1731
91baf43f
PA
17322015-03-19 Pedro Alves <palves@redhat.com>
1733
1734 * linux-low.c (count_events_callback, select_event_lwp_callback):
1735 No longer check whether the thread has resume_stop as last resume
1736 kind.
1737
8bf3b159
PA
17382015-03-19 Pedro Alves <palves@redhat.com>
1739
1740 * linux-low.c (count_events_callback, select_event_lwp_callback):
1741 Use the lwp's status_pending_p field, not the thread's.
1742
b90fc188
PA
17432015-03-19 Pedro Alves <palves@redhat.com>
1744
1745 * linux-low.c (select_event_lwp_callback): Update comments to
1746 no longer mention SIGTRAP.
1747
464b0089
GB
17482015-03-18 Gary Benson <gbenson@redhat.com>
1749
1750 * server.c (handle_query): Do not report vFile:fstat as supported.
1751
aa9e327f
GB
17522015-03-11 Gary Benson <gbenson@redhat.com>
1753
1754 * hostio.c (sys/types.h): New include.
1755 (sys/stat.h): Likewise.
1756 (common-remote-fileio.h): Likewise.
1757 (handle_fstat): New function.
1758 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 1759
791c0056
GB
17602015-03-11 Gary Benson <gbenson@redhat.com>
1761
1762 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1763 struct stat.st_blocks and struct stat.st_blksize.
1764 * configure: Regenerate.
1765 * config.in: Likewise.
1766 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1767 (OBS): Add common-remote-fileio.o.
1768 (common-remote-fileio.o): New rule.
1769
9a9df970
PA
17702015-03-09 Pedro Alves <palves@redhat.com>
1771
1772 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1773 'struct sockaddr' pointer in 'accept' call.
1774
9eb1356e
PA
17752015-03-09 Pedro Alves <palves@redhat.com>
1776
1777 Revert:
1778 2015-03-07 Pedro Alves <palves@redhat.com>
1779 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1780 or <winsock2.h> here. Instead include "gdb_socket.h".
1781 (remote_open): Use union gdb_sockaddr_u.
1782 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1783 or <winsock2.h> here. Instead include "gdb_socket.h".
1784 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1785 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1786 or <sys/un.h>.
1787 (init_named_socket, gdb_agent_helper_thread): Use union
1788 gdb_sockaddr_u.
1789
aac331e4
PA
17902015-03-07 Pedro Alves <palves@redhat.com>
1791
1792 * configure.ac (build_warnings): Move
1793 -Wdeclaration-after-statement to the C-specific set.
1794 * configure: Regenerate.
1795
366c75fc
PA
17962015-03-07 Pedro Alves <palves@redhat.com>
1797
1798 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1799 or <winsock2.h> here. Instead include "gdb_socket.h".
1800 (remote_open): Use union gdb_sockaddr_u.
1801 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1802 or <winsock2.h> here. Instead include "gdb_socket.h".
1803 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1804 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1805 or <sys/un.h>.
1806 (init_named_socket, gdb_agent_helper_thread): Use union
1807 gdb_sockaddr_u.
1808
492d29ea
PA
18092015-03-07 Pedro Alves <palves@redhat.com>
1810
1811 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1812 instead.
1813
60a191ed
YQ
18142015-03-06 Yao Qi <yao.qi@linaro.org>
1815
1816 * linux-aarch64-low.c (aarch64_insert_point): Use
1817 show_debug_regs as a boolean.
1818 (aarch64_remove_point): Likewise.
1819
f5771b1d
PA
18202015-03-05 Pedro Alves <palves@redhat.com>
1821
1822 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1823 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1824 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1825 * nto-low.c (nto_target_ops): Likewise.
1826 * spu-low.c (spu_target_ops): Likewise.
1827 * win32-low.c (win32_target_ops): Likewise.
1828
3e572f71
PA
18292015-03-04 Pedro Alves <palves@redhat.com>
1830
72f4393d 1831 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
1832 Decide whether a breakpoint triggered based on the SIGTRAP's
1833 siginfo.si_code.
72f4393d
L
1834 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1835 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
1836 (linux_low_filter_event): Check for breakpoints before checking
1837 watchpoints.
1838 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1839 siginfo.si_code.
72f4393d
L
1840 (linux_stopped_by_sw_breakpoint)
1841 (linux_supports_stopped_by_sw_breakpoint)
1842 (linux_stopped_by_hw_breakpoint)
1843 (linux_supports_stopped_by_hw_breakpoint): New functions.
1844 (linux_target_ops): Install new target methods.
3e572f71 1845
1ec68e26
PA
18462015-03-04 Pedro Alves <palves@redhat.com>
1847
1848 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1849 * server.c (swbreak_feature, hwbreak_feature): New globals.
1850 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1851 (captured_main): Clear swbreak_feature and hwbreak_feature.
1852 * server.h (swbreak_feature, hwbreak_feature): Declare.
1853 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1854 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1855 supports_stopped_by_hw_breakpoint>: New fields.
1856 (target_supports_stopped_by_sw_breakpoint)
1857 (target_stopped_by_sw_breakpoint)
1858 (target_supports_stopped_by_hw_breakpoint)
1859 (target_stopped_by_hw_breakpoint): Declare.
1860
15c66dd6
PA
18612015-03-04 Pedro Alves <palves@redhat.com>
1862
1863 enum lwp_stop_reason -> enum target_stop_reason
1864 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1865 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1866 (linux_wait_1, stuck_in_jump_pad_callback)
1867 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1868 (linux_stopped_by_watchpoint):
1869 * linux-low.h (enum lwp_stop_reason): Delete.
1870 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1871 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1872
98fc70d6
YQ
18732015-03-04 Yao Qi <yao.qi@linaro.org>
1874
1875 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1876
dd2ac174
GB
18772015-03-03 Gary Benson <gbenson@redhat.com>
1878
1879 * hostio.c (handle_vFile): Fix prefix lengths.
1880
d68e53f4
MM
18812015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1882
1883 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1884 ptr_bits.
1885
bf2d68ab
AA
18862015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1887
1888 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1889 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1890 (clean): Add "rm -f" for above C files.
1891 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1892 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1893 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1894 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1895 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1896 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1897 (init_registers_s390x_vx_linux64)
1898 (init_registers_s390x_tevx_linux64)
1899 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1900 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1901 declarations.
1902 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1903 (s390_store_vxrs_high): New functions.
1904 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1905 NT_S390_VXRS_HIGH.
1906 (s390_arch_setup): Add logic for selecting one of the new target
1907 descriptions. Activate the new vector regsets if applicable.
1908 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1909 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1910 and init_registers_s390x_tevx_linux64.
1911
c966a859
PA
19122015-03-01 Pedro Alves <palves@redhat.com>
1913
1914 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1915 parameter.
1916
4180215b
PA
19172015-02-27 Pedro Alves <palves@redhat.com>
1918
1919 * linux-x86-low.c (u_debugreg_offset): New function.
1920 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1921
749bab01
PA
19222015-02-27 Pedro Alves <palves@redhat.com>
1923
1924 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1925 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1926 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1927 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1928 (ps_lsetfpregs, ps_getpid)
1929 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1930 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1931 (ps_lsetxregs, ps_plog): Declare.
1932
3c14e5a3
PA
19332015-02-27 Pedro Alves <palves@redhat.com>
1934
1935 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1936 IP_AGENT_EXPORT_FUNC.
1937 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1938 IP_AGENT_EXPORT_FUNC.
1939 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1940 (IP_AGENT_EXPORT): Delete.
1941 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1942 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1943 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1944 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1945 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1946 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1947 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1948 (traceframe_read_count, traceframe_write_count)
1949 (traceframes_created, trace_state_variables, get_raw_reg)
1950 (get_trace_state_variable_value, set_trace_state_variable_value)
1951 (ust_loaded, helper_thread_id, cmd_buf): Use
1952 IPA_SYM_EXPORTED_NAME.
1953 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1954 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1955 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1956 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1957 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1958 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1959 EXTERN_C_PUSH/EXTERN_C_POP.
1960 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1961 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1962 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1963 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1964 (traceframe_write_count, traceframe_read_count)
1965 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1966 (about_to_request_buffer_space, get_trace_state_variable_value)
1967 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1968 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1969 EXTERN_C_PUSH/EXTERN_C_POP.
1970 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1971 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1972 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1973 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1974 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1975 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1976 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1977 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1978 Define.
1979 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1980 (IP_AGENT_EXPORT_VAR_DECL): Define.
1981 (tracing): Declare.
1982 (gdb_agent_get_raw_reg): Declare.
1983
fe978cb0
PA
19842015-02-27 Tom Tromey <tromey@redhat.com>
1985 Pedro Alves <palves@redhat.com>
1986
1987 Rename symbols whose names are reserved C++ keywords throughout.
1988
3bc3d82a
PA
19892015-02-27 Pedro Alves <palves@redhat.com>
1990
1991 * Makefile.in (COMPILER): New, get it from autoconf.
1992 (CXX): Get from autoconf instead.
1993 (COMPILE.pre): Use COMPILER.
1994 (CC-LD): Rename to ...
1995 (CC_LD): ... this. Use COMPILER.
1996 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
1997 (CXX_FOR_TARGET): Default to g++ instead of gcc.
1998 * acinclude.m4: Include build-with-cxx.m4.
1999 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2000 Disable -Werror by default if building in C++ mode.
2001 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2002 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2003 the C++ compiler. Save/restore CXXFLAGS too.
2004 * configure: Regenerate.
2005
07697489
PA
20062015-02-27 Pedro Alves <palves@redhat.com>
2007
2008 * acinclude.m4: Include libiberty.m4.
2009 * configure.ac: Call libiberty_INIT.
2010 * config.in, configure: Regenerate.
2011
9beb7c4e
PA
20122015-02-26 Pedro Alves <palves@redhat.com>
2013
2014 * linux-low.c (linux_wait_1): When incrementing the PC past a
2015 program breakpoint always use the_low_target.breakpoint_len as
2016 increment, rather than the maximum between that and
2017 the_low_target.decr_pc_after_break.
2018
8090aef2
PA
20192015-02-23 Pedro Alves <palves@redhat.com>
2020
2021 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2022 thread was doing a step-over; always adjust the PC if
2023 we stepped over a permanent breakpoint.
2024 (linux_wait_1): If we stepped over breakpoint that was on top of a
2025 permanent breakpoint, manually advance the PC past it.
2026
bc9540e8
PA
20272015-02-23 Pedro Alves <palves@redhat.com>
2028
2029 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2030 modes.
2031 (x86_fill_gregset, x86_store_gregset): Use it when handling
2032 $orig_eax.
2033
2db9a427
PA
20342015-02-20 Pedro Alves <palves@redhat.com>
2035
2036 * thread-db.c: Include "nat/linux-procfs.h".
2037 (thread_db_init): Skip listing new threads if the kernel supports
2038 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2039
afa8d396
PA
20402015-02-20 Pedro Alves <palves@redhat.com>
2041
2042 * linux-low.c (status_pending_p_callback): Use ptid_match.
2043
c9587f88
AT
20442015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2045
2046 PR breakpoints/16812
2047 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2048 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2049 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2050
b05ec7a5
AT
20512015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2052
2053 PR breakpoints/15956
2054 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2055
d33501a5
MM
20562015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2057
2058 * linux-low.c (linux_low_btrace_conf): Print size.
2059 * server.c (handle_btrace_conf_general_set): New.
2060 (hanle_general_set): Call handle_btrace_conf_general_set.
2061 (handle_query): Report Qbtrace-conf:bts:size as supported.
2062
f4abbc16
MM
20632015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2064
2065 * linux-low.c (linux_low_enable_btrace): Update parameters.
2066 (linux_low_btrace_conf): New.
2067 (linux_target_ops)<to_btrace_conf>: Initialize.
2068 * server.c (current_btrace_conf): New.
2069 (handle_btrace_enable): Rename to ...
2070 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
2071 to target_enable_btrace. Update comment. Update users.
2072 (handle_qxfer_btrace_conf): New.
2073 (qxfer_packets): Add btrace-conf entry.
2074 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2075 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2076 (target_ops)<read_btrace_conf>: New.
2077 (target_enable_btrace): Update parameters.
2078 (target_read_btrace_conf): New.
2079
043c3577
MM
20802015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2081
2082 * server.c (handle_btrace_general_set): Remove call to
2083 target_supports_btrace.
2084 (supported_btrace_packets): New.
2085 (handle_query): Call supported_btrace_packets.
2086 * target.h: include btrace-common.h.
2087 (btrace_target_info): Removed.
2088 (supports_btrace, target_supports_btrace): Update parameters.
2089
734b0e4b
MM
20902015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2091
2092 * Makefile.in (SFILES): Add common/btrace-common.c.
2093 (OBS): Add common/btrace-common.o.
2094 (btrace-common.o): Add build rules.
2095 * linux-low: Include btrace-common.h.
2096 (linux_low_read_btrace): Use struct btrace_data. Call
2097 btrace_data_init and btrace_data_fini.
2098
d6c146e9
PA
20992015-02-06 Pedro Alves <palves@redhat.com>
2100
2101 * thread-db.c (find_new_threads_callback): Add debug output.
2102
20ba1ce6
PA
21032015-02-04 Pedro Alves <palves@redhat.com>
2104
2105 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2106 (resume_stopped_resumed_lwps): New function.
2107 (linux_wait_for_event_filtered): Use it.
2108
8cc73a39
SDJ
21092015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2110
2111 * Makefile.in (SFILES): Add linux-personality.c.
2112 (linux-personality.o): New rule.
2113 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2114 list of objects to be built.
2115 * linux-low.c: Include nat/linux-personality.h.
2116 (linux_create_inferior): Remove code to disable address space
2117 randomization (moved to ../nat/linux-personality.c). Create
2118 cleanup to disable address space randomization.
2119
fb23d554
SDJ
21202015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2121
2122 * Makefile.in (posix-strerror.o): New rule.
2123 (mingw-strerror.o): Likewise.
2124 * configure: Regenerated.
2125 * configure.ac: Source file ../common/common.host. Initialize new
2126 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2127
cdf43629
YQ
21282015-01-14 Yao Qi <yao@codesourcery.com>
2129
2130 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2131 (ppc-linux.o): New rule.
2132 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2133 * configure.ac: AC_CHECK_FUNCS(getauxval).
2134 * config.in: Re-generated.
2135 * configure: Re-generated.
2136 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2137 ppc64_64bit_inferior_p
2138
514c5338
YQ
21392015-01-14 Yao Qi <yao@codesourcery.com>
2140
2141 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2142 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2143 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2144 (PT_ORIG_R3, PT_TRAP): Likewise.
2145 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2146 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2147 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2148
3368c1e5
JB
21492015-01-10 Joel Brobecker <brobecker@adacore.com>
2150
2151 * i387-fp.c (i387_cache_to_xsave): In look over
2152 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2153 zmmh_low_space field by use of zmmh_high_space.
2154
582511be
PA
21552015-01-09 Pedro Alves <palves@redhat.com>
2156
2157 * linux-low.c (step_over_bkpt): Move higher up in the file.
2158 (handle_extended_wait): Don't store the stop_pc here.
2159 (get_stop_pc): Adjust comments and rename to ...
2160 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2161 stopped for a software breakpoint or hardware breakpoint.
2162 (thread_still_has_status_pending_p): New function.
2163 (status_pending_p_callback): Use
2164 thread_still_has_status_pending_p. If the event is no longer
2165 interesting, resume the LWP.
2166 (handle_tracepoints): Add assert.
2167 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2168 (wstatus_maybe_breakpoint): New function.
2169 (cancel_breakpoint): Delete function.
2170 (check_stopped_by_watchpoint): New function, factored out from
2171 linux_low_filter_event.
2172 (lp_status_maybe_breakpoint): Delete function.
2173 (linux_low_filter_event): Remove filter_ptid argument.
2174 Leave thread group exits pending here. Store the LWP's stop PC.
2175 Always leave events pending.
2176 (linux_wait_for_event_filtered): Pull all events out of the
2177 kernel, and leave them all pending.
2178 (count_events_callback, select_event_lwp_callback): Consider all
2179 events.
2180 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2181 (select_event_lwp): Only give preference to the stepping LWP in
2182 all-stop mode. Adjust comments.
2183 (ignore_event): New function.
2184 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2185 references to cancel_breakpoints. Adjust to renames. Also give
2186 equal priority to all LWPs that have had events in non-stop mode.
2187 If reporting a software breakpoint event, unadjust the LWP's PC.
2188 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2189 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2190 Adjust.
2191 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2192 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2193 (linux_stopped_by_watchpoint): Adjust.
2194 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2195 * linux-low.h (enum lwp_stop_reason): New.
2196 (struct lwp_info) <stop_pc>: Adjust comment.
2197 <stopped_by_watchpoint>: Delete field.
2198 <stop_reason>: New field.
2199 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2200 * mem-break.c (software_breakpoint_inserted_here)
2201 (hardware_breakpoint_inserted_here): New function.
2202 * mem-break.h (software_breakpoint_inserted_here)
2203 (hardware_breakpoint_inserted_here): Declare.
2204 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2205 (cancel_breakpoints): Delete.
2206 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2207 (upload_fast_traceframes): Remove references to
2208 cancel_breakpoints.
2209
a33e3959
PA
22102015-01-09 Pedro Alves <palves@redhat.com>
2211
2212 * thread-db.c (find_new_threads_callback): Ignore thread if the
2213 kernel thread ID is -1.
2214
8784d563
PA
22152015-01-09 Pedro Alves <palves@redhat.com>
2216
2217 * linux-low.c (linux_attach_fail_reason_string): Move to
2218 nat/linux-ptrace.c, and rename.
2219 (linux_attach_lwp): Update comment.
2220 (attach_proc_task_lwp_callback): New function.
2221 (linux_attach): Adjust to rename and use
2222 linux_proc_attach_tgid_threads.
2223 (linux_attach_fail_reason_string): Delete declaration.
2224
76f2b779
JB
22252015-01-01 Joel Brobecker <brobecker@adacore.com>
2226
2227 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2228 * server.c (gdbserver_version): Likewise.
2229
fafcc06a
SDJ
22302014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2231
2232 * remote-utils.c: Include ctype.h.
2233 (input_interrupt): Explicitly handle the case when the char
2234 received is the NUL byte. Improve the printing of non-ASCII
2235 characters.
2236
beed38b8
JB
22372014-12-16 Joel Brobecker <brobecker@adacore.com>
2238
2239 * linux-low.c (linux_low_filter_event): Update call to
2240 linux_enable_event_reporting following the addition of
2241 a new parameter to that function.
2242
bf330350
CU
22432014-12-16 Catalin Udma <catalin.udma@freescale.com>
2244
2245 PR server/17457
2246 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2247 (AARCH64_FPCR_REGNO): Likewise.
2248 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2249 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2250 (aarch64_store_fpregset): Likewise.
2251
5227d625
JB
22522014-12-15 Joel Brobecker <brobecker@adacore.com>
2253
2254 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2255 Remove FIXME comment about assumption about N.
2256
f93b65a0
JB
22572014-12-13 Joel Brobecker <brobecker@adacore.com>
2258
2259 * configure.ac: If large-file support is disabled in GDBserver,
2260 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2261 * configure: Regenerate.
2262
e5a9158d
AA
22632014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2264
2265 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2266 warning upon ENODATA from ptrace.
2267 * linux-s390-low.c (s390_store_tdb): New.
2268 (s390_regsets): Add regset for NT_S390_TDB.
2269
feea5f36
AA
22702014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2271
2272 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2273 without a fill_function.
2274 * linux-s390-low.c (s390_fill_last_break): Remove.
2275 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2276 (s390_arch_setup): Use regset's size instead of fill_function for
2277 loop end condition.
2278
098dbe61
AA
22792014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2280
2281 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2282 the regset's store function when ptrace returned an error.
2283 * regcache.c (get_thread_regcache): Invalidate register cache
2284 before fetching inferior's registers.
2285
28eef672
AA
22862014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2287
2288 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2289 while-loop as for-loop.
2290 (regsets_store_inferior_registers): Likewise.
2291
bdca27a2
YQ
22922014-11-28 Yao Qi <yao@codesourcery.com>
2293
2294 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2295 * config.in, configure: Re-generate.
2296 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2297 is defined.
2298
9c232dda
YQ
22992014-11-21 Yao Qi <yao@codesourcery.com>
2300
2301 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2302 (AC_CHECK_HEADERS): Remove malloc.h.
2303 * configure: Re-generated.
2304 * config.in: Re-generated.
2305 * server.h: Don't include alloca.h and malloc.h.
2306 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2307 Don't include malloc.h.
2308
43968415
JB
23092014-11-17 Joel Brobecker <brobecker@adacore.com>
2310
2311 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2312 corresponding ERRNO check in same block.
2313
40e91bc7
PA
23142014-11-12 Pedro Alves <palves@redhat.com>
2315
2316 * server.c (cont_thread): Update comment.
2317 (start_inferior, attach_inferior): No longer clear cont_thread.
2318 (handle_v_cont): No longer set cont_thread.
2319 (captured_main): Clear cont_thread each time a GDB connects.
2320
c2c118cf
PA
23212014-11-12 Pedro Alves <palves@redhat.com>
2322
2323 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2324 thread, and don't resume all threads if the Hc thread has exited.
2325
78708b7c
PA
23262014-11-12 Pedro Alves <palves@redhat.com>
2327
2328 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2329 the process group instead of to a specific LWP.
2330
a2abc7de
PA
23312014-10-15 Pedro Alves <palves@redhat.com>
2332
2333 PR server/17487
2334 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2335 parameter.
2336 (arm_set_thread_context): Delete.
2337 (the_low_target): Adjust.
2338 * win32-i386-low.c (debug_registers_changed)
2339 (debug_registers_used): Delete.
2340 (update_debug_registers_callback): New function.
2341 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2342 needing to update their debug registers.
2343 (win32_get_current_dr): New function.
2344 (x86_dr_low_get_addr, x86_dr_low_get_control)
2345 (x86_dr_low_get_status): Fetch the debug register from the thread
2346 record's context.
2347 (i386_initial_stuff): Adjust.
2348 (i386_get_thread_context): Remove current_event parameter. Don't
2349 clear debug_registers_changed nor copy DR values to
2350 debug_reg_state.
2351 (i386_set_thread_context): Delete.
2352 (i386_prepare_to_resume): New function.
2353 (i386_thread_added): Mark the thread as needing to update irs
2354 debug registers.
2355 (the_low_target): Remove i386_set_thread_context and install
2356 i386_prepare_to_resume.
2357 * win32-low.c (win32_get_thread_context): Adjust.
2358 (win32_set_thread_context): Use SetThreadContext
2359 directly.
2360 (win32_prepare_to_resume): New function.
2361 (win32_require_context): New function, factored out from ...
2362 (thread_rec): ... this.
2363 (continue_one_thread): Call win32_prepare_to_resume on each thread
2364 we're about to continue.
2365 (win32_resume): Call win32_prepare_to_resume on the event thread.
2366 * win32-low.h (struct win32_thread_info)
2367 <debug_registers_changed>: New field.
2368 (struct win32_target_ops): Change prototype of set_thread_context,
2369 delete set_thread_context and add prepare_to_resume.
2370 (win32_require_context): New declaration.
2371
a442d071
GB
23722014-10-08 Gary Benson <gbenson@redhat.com>
2373
2374 * server.h: Do not include common-exceptions.h.
2375
6f1947e8
GB
23762014-10-08 Gary Benson <gbenson@redhat.com>
2377
2378 * server.h: Do not include cleanups.h.
2379
63b434a4
JH
23802014-09-30 James Hogan <james.hogan@imgtec.com>
2381
2382 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2383 mips64-dsp-linux.c.
2384
c4d9ceb6
YQ
23852014-09-23 Yao Qi <yao@codesourcery.com>
2386
2387 * linux-low.c (lp_status_maybe_breakpoint): New function.
2388 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2389 (count_events_callback): Likewise.
2390 (select_event_lwp_callback): Likewise.
2391 (cancel_breakpoints_callback): Likewise.
2392
89a5711c
DB
23932014-09-19 Don Breazeal <donb@codesourcery.com>
2394
2395 * linux-low.c (handle_extended_wait): Call
2396 linux_ptrace_get_extended_event.
2397 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2398 linux_is_extended_waitstatus.
2399
bffc0964
JB
24002014-09-16 Joel Brobecker <brobecker@adacore.com>
2401
2402 * Makefile.in (CPPFLAGS): Define.
2403 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2404 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2405
0bfdf32f
GB
24062014-09-16 Gary Benson <gbenson@redhat.com>
2407
2408 * inferiors.h (current_inferior): Renamed as...
2409 (current_thread): New variable. All uses updated.
2410 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2411 (maybe_move_out_of_jump_pad): Likewise.
2412 (cancel_breakpoint): Likewise.
2413 (linux_low_filter_event): Likewise.
2414 (wait_for_sigstop): Likewise.
2415 (linux_resume_one_lwp): Likewise.
2416 (need_step_over_p): Likewise.
2417 (start_step_over): Likewise.
2418 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2419 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2420 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2421 and save_inferior as saved_thread.
2422 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2423 saved_thread.
2424 (regcache_invalidate_thread): Likewise.
2425 * remote-utils.c (prepare_resume_reply): Likewise.
2426 * thread-db.c (thread_db_get_tls_address): Likewise.
2427 (disable_thread_event_reporting): Likewise.
2428 (remove_thread_event_breakpoints): Likewise.
2429 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2430 as saved_thread.
2431 * target.h (set_desired_inferior): Renamed as...
2432 (set_desired_thread): New declaration. All uses updated.
2433 * server.c (myresume): Updated comment to reference thread instead
2434 of inferior.
2435 (handle_serial_event): Likewise.
2436 (handle_target_event): Likewise.
2437
361c8ade
GB
24382014-09-12 Tom Tromey <tromey@redhat.com>
2439 Gary Benson <gbenson@redhat.com>
2440
2441 * regcache.h: Include common-regcache.h.
2442 (regcache_read_pc): Don't declare.
2443 * regcache.c (get_thread_regcache_for_ptid): New function.
2444
bd9269f7
GB
24452014-09-11 Tom Tromey <tromey@redhat.com>
2446 Gary Benson <gbenson@redhat.com>
2447
2448 * symbol.c: New file.
2449 * Makefile.in (SFILES): Add symbol.c.
2450 (OBS): Add symbol.o.
2451
f8c1d06b
GB
24522014-09-11 Gary Benson <gbenson@redhat.com>
2453
2454 * target.c (target_stop_ptid, target_continue_ptid): New
2455 functions.
2456
721ec300
GB
24572014-09-11 Tom Tromey <tromey@redhat.com>
2458 Gary Benson <gbenson@redhat.com>
2459
2460 * target.h: Include target/target.h.
2461 * target.c (target_read_memory, target_read_uint32)
2462 (target_write_memory): New functions.
2463
c5e92cca
GB
24642014-09-11 Gary Benson <gbenson@redhat.com>
2465
2466 * server.h (debug_hw_points): Don't declare.
2467 * server.c (debug_hw_points): Don't define. Replace all uses
2468 with show_debug_regs.
2469 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2470 all uses with show_debug_regs.
2471
2e4bb98a
EBM
24722014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2473
2474 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2475 endianness into account.
2476 (ppc_supply_ptrace_register): Likewise.
2477
ac740bc7
JH
24782014-09-03 James Hogan <james.hogan@imgtec.com>
2479
2480 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2481 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2482
97ea6506
GB
24832014-09-03 Gary Benson <gbenson@redhat.com>
2484
2485 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2486 ALL_DEBUG_ADDRESS_REGISTERS.
2487
df7e5265
GB
24882014-09-02 Gary Benson <gbenson@redhat.com>
2489
2490 * i386-low.h: Renamed as...
2491 * x86-low.h: New file. All type, function and variable name
2492 prefixes changed from "i386_" to "x86_". All references updated.
2493 * i386-low.c: Renamed as...
2494 * x86-low.c: New file. All type, function and variable name
2495 prefixes changed from "i386_" to "x86_". All references updated.
2496
ed859da7
GB
24972014-09-02 Gary Benson <gbenson@redhat.com>
2498
2499 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2500 (x86_linux_new_thread): Likewise.
2501
860789c7
GB
25022014-08-29 Gary Benson <gbenson@redhat.com>
2503
2504 * server.h (setjmp.h): Do not include.
2505 (toplevel): Do not declare.
2506 (common-exceptions.h): Include.
2507 (cleanups.h): Likewise.
2508 * server.c (toplevel): Do not define.
2509 (exit_code): New static global.
2510 (detach_or_kill_for_exit_cleanup): New function.
2511 (main): New function. Original main renamed to...
2512 (captured_main): New function.
2513 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2514
ff55e1b5
GB
25152014-08-29 Gary Benson <gbenson@redhat.com>
2516
2517 * Makefile.in (SFILES): Add common/common-exceptions.c.
2518 (OBS): Add common-exceptions.o.
2519 (common-exceptions.o): New rule.
2520 * utils.c (prepare_to_throw_exception): New function.
2521
e9bcb658
GB
25222014-08-29 Gary Benson <gbenson@redhat.com>
2523
2524 * config.in: Regenerate.
2525 * configure: Likewise.
2526
e3180625
GB
25272014-08-29 Gary Benson <gbenson@redhat.com>
2528
2529 * Makefile.in (SFILES): Add common/cleanups.c.
2530 (OBS): cleanups.o.
2531 (cleanups.o): New rule.
2532
e3d6ba5d
GB
25332014-08-29 Gary Benson <gbenson@redhat.com>
2534
2535 * utils.c (internal_vwarning): New function.
2536
7096e886
GB
25372014-08-28 Gary Benson <gbenson@redhat.com>
2538
2539 * utils.h (fatal): Remove declaration.
2540 * utils.c (fatal): Remove function.
2541
14ce3192
GB
25422014-08-28 Gary Benson <gbenson@redhat.com>
2543
2544 * tracepoint.c (gdb_agent_init): Replace fatal with
2545 perror_with_name.
2546 (initialize_tracepoint): Likewise.
2547
50278d59
GB
25482014-08-28 Gary Benson <gbenson@redhat.com>
2549
2550 * remote-utils.c (remote_prepare): Replace fatal with error.
2551
aa96c426
GB
25522014-08-28 Gary Benson <gbenson@redhat.com>
2553
2554 * linux-low.c (linux_async): Replace fatal with warning.
2555 Tidy up and return.
2556 (linux_start_non_stop): Return -1 if linux_async failed.
2557
f7160e97
GB
25582014-08-28 Gary Benson <gbenson@redhat.com>
2559
2560 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2561 gdb_assert.
2562 (i386_dr_low_get_addr): Remove vague comment.
2563 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2564 gdb_assert.
2565
38e08fca
GB
25662014-08-28 Gary Benson <gbenson@redhat.com>
2567
2568 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2569 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2570 internal_error.
2571 (linux_resume_one_lwp): Likewise.
2572 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2573 gdb_assert.
2574 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2575 with internal_error.
2576 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2577 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2578 (find_register_by_name): Replace fatal with internal_error.
2579 (find_regno): Likewise.
2580 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2581 * thread-db.c (thread_db_create_event): Likewise.
2582 (thread_db_load_search): Likewise.
2583 (try_thread_db_load_1): Likewise.
2584 * tracepoint.c (get_jump_space_head): Replace fatal with
2585 internal_error.
2586 (claim_trampoline_space): Likewise.
2587 (have_fast_tracepoint_trampoline_buffer): Likewise.
2588 (cmd_qtstart): Likewise.
2589 (stop_tracing): Likewise.
2590 (fast_tracepoint_collecting): Likewise.
2591 (target_malloc): Likewise.
2592 (download_tracepoint): Likewise.
2593 (download_trace_state_variables): Replace check with gdb_assert.
2594 (upload_fast_traceframes): Replace fatal with internal_error.
2595
34abf635
GB
25962014-08-19 Tom Tromey <tromey@redhat.com>
2597 Gary Benson <gbenson@redhat.com>
2598
2599 * Makefile.in (SFILES): Add common/common-debug.c.
2600 (OBS): Add common-debug.o.
2601 (common-debug.o): New rule.
2602 * debug.h (debug_printf): Don't declare.
2603 * debug.c (debug_printf): Renamed and rewritten as...
2604 (debug_vprintf): New function.
2605
f6e94d78
GB
26062014-08-19 Gary Benson <gbenson@redhat.com>
2607
2608 * utils.h: Do not include print-utils.h.
2609
9239eeab
GB
26102014-08-19 Tom Tromey <tromey@redhat.com>
2611 Gary Benson <gbenson@redhat.com>
2612
2613 * server.h: Add static assertion.
2614 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2615
ef87c8bb
GB
26162014-08-19 Tom Tromey <tromey@redhat.com>
2617 Gary Benson <gbenson@redhat.com>
2618
2619 * Makefile.in (SFILES): Add common/errors.c.
2620 (OBS): Add errors.o.
2621 (IPA_OBS): Add errors-ipa.o.
2622 (errors.o): New rule.
2623 (errors-ipa.o): Likewise.
2624 * utils.h (perror_with_name, error, warning): Don't declare.
2625 * utils.c (warning): Renamed and rewritten as...
2626 (vwarning): New function.
2627 (error): Renamed and rewritten as...
2628 (verror): New function.
2629 (internal_error): Renamed and rewritten as...
2630 (internal_verror): New function.
2631
bb974a24
GB
26322014-08-07 Gary Benson <gbenson@redhat.com>
2633
2634 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2635 * configure: Regenerate.
2636 * config.in: Likewise.
2637 * server.h: Do not include errno.h.
2638 * event-loop.c: Likewise.
2639 * hostio-errno.c: Likewise.
2640 * linux-low.c: Likewise.
2641 * remote-utils.c: Likewise.
2642 * spu-low.c: Likewise.
2643 * utils.c: Likewise.
2644 * gdbreplay.c: Unconditionally include errno.h.
2645
6d3d12eb
GB
26462014-08-07 Gary Benson <gbenson@redhat.com>
2647
2648 * server.h: Do not include string.h.
2649 * event-loop.c: Likewise.
2650 * linux-low.c: Likewise.
2651 * regcache.c: Likewise.
2652 * remote-utils.c: Likewise.
2653 * spu-low.c: Likewise.
2654 * utils.c: Likewise.
2655
dccbb609
GB
26562014-08-07 Gary Benson <gbenson@redhat.com>
2657
2658 * server.h: Do not include gdb_assert.h.
2659
e76df0d0
GB
26602014-08-07 Gary Benson <gbenson@redhat.com>
2661
2662 * server.h: Do not include common-utils.h.
2663
4cb9c816
GB
26642014-08-07 Gary Benson <gbenson@redhat.com>
2665
2666 * server.h: Do not include ptid.h.
2667 * notif.h: Likewise.
2668
3995eeee
GB
26692014-08-07 Gary Benson <gbenson@redhat.com>
2670
2671 * server.h: Do not include gdb_locale.h.
2672
cb9f1a9b
GB
26732014-08-07 Gary Benson <gbenson@redhat.com>
2674
2675 * server.h: Do not include gdb/signals.h.
2676 * win32-low.c: Likewise.
2677
a5fceff8
GB
26782014-08-07 Gary Benson <gbenson@redhat.com>
2679
2680 * server.h: Do not include pathmax.h.
2681
b9391142
GB
26822014-08-07 Gary Benson <gbenson@redhat.com>
2683
2684 * server.h: Do not include libiberty.h.
2685 * linux-bfin-low.c: Likewise.
2686
0e443c87
GB
26872014-08-07 Gary Benson <gbenson@redhat.com>
2688
2689 * server.h: Do not include ansidecl.h.
2690
8ebb3f56
GB
26912014-08-07 Gary Benson <gbenson@redhat.com>
2692
2693 * linux-x86-low.c: Do not include stddef.h.
2694 * lynx-ppc-low.c: Likewise.
2695 * tracepoint.c: Likewise.
2696
8980bdf6
GB
26972014-08-07 Gary Benson <gbenson@redhat.com>
2698
2699 * server.h: Do not include stdarg.h.
2700 * nto-low.c: Likewise.
2701
d7096f71
GB
27022014-08-07 Gary Benson <gbenson@redhat.com>
2703
2704 * server.h: Do not include stdlib.h.
2705 * inferiors.c: Likewise.
2706 * linux-low.c: Likewise.
2707 * regcache.c: Likewise.
2708 * spu-low.c: Likewise.
2709 * tracepoint.c: Likewise.
2710 * utils.c: Likewise.
2711
d02f550d
GB
27122014-08-07 Gary Benson <gbenson@redhat.com>
2713
2714 * server.h: Do not include stdio.h.
2715 * linux-low.c: Likewise.
2716 * remote-utils.c: Likewise.
2717 * spu-low.c: Likewise.
2718 * utils.c: Likewise.
2719 * wincecompat.c: Likewise.
2720
87f6c4e3
GB
27212014-08-06 Gary Benson <gbenson@redhat.com>
2722
2723 * regcache.c (init_register_cache): Move conditionals inside if.
2724
7089dca4
GB
27252014-08-06 Gary Benson <gbenson@redhat.com>
2726
2727 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2728
462f517e
GB
27292014-07-31 Gary Benson <gbenson@redhat.com>
2730
2731 * ax.h: Do not include server.h.
2732 * gdbthread.h: Likewise.
2733 * lynx-low.h: Likewise.
2734 * notif.h: Likewise.
2735
976411d6
GB
27362014-07-30 Gary Benson <gbenson@redhat.com>
2737
2738 * server.h: Include common-defs.h.
2739 Do not include config.h or build-gnulib-gdbserver/config.h.
2740
d41f6d8e
GB
27412014-07-30 Gary Benson <gbenson@redhat.com>
2742
2743 * hostio-errno.c: Move server.h to top of includes list.
2744 * inferiors.c: Likewise.
2745 * linux-x86-low.c: Likewise.
2746 * notif.c: Include server.h.
2747
314c6a35
TT
27482014-07-24 Tom Tromey <tromey@redhat.com>
2749 Gary Benson <gbenson@redhat.com>
2750
2751 * server.h (CORE_ADDR): Now unsigned.
2752
69ff6be5
PA
27532014-07-16 Pedro Alves <palves@redhat.com>
2754
2755 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2756
ce9e3fe7
PA
27572014-07-15 Pedro Alves <palves@redhat.com>
2758
2759 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2760 copy.
2761
e76126e8
PA
27622014-07-11 Pedro Alves <palves@redhat.com>
2763
2764 * linux-low.c (kill_wait_lwp): New function, based on
2765 kill_one_lwp_callback, but use my_waitpid directly.
2766 (kill_one_lwp_callback, linux_kill): Use it.
2767
8e9db26e
PA
27682014-06-23 Pedro Alves <palves@redhat.com>
2769
2770 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2771 before setting DR0..DR3.
2772
698b3e08
GB
27732014-06-20 Gary Benson <gbenson@redhat.com>
2774
2775 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2776 * configure: Regenerated.
2777 * config.in: Likewise.
2778
125f8a3d
GB
27792014-06-20 Gary Benson <gbenson@redhat.com>
2780
2781 * Makefile.in (SFILES): Update locations for files moved
2782 from common to nat.
2783 (object file files): Reordered.
2784
42995dbd
GB
27852014-06-20 Gary Benson <gbenson@redhat.com>
2786
2787 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2788 (i386_dr_low_set_addr): Likewise.
2789 (i386_dr_low_get_addr): Likewise.
2790 (i386_dr_low_can_set_control): Likewise.
2791 (i386_dr_low_set_control): Likewise.
2792 (i386_dr_low_get_control): Likewise.
2793 (i386_dr_low_get_status): Likewise.
2794 (i386_get_debug_register_length): Likewise.
2795 * linux-x86-low.c (i386_dr_low_set_addr):
2796 Changed signature. Made static.
2797 (i386_dr_low_get_addr): Likewise.
2798 (i386_dr_low_set_control): Likewise.
2799 (i386_dr_low_get_control): Likewise.
2800 (i386_dr_low_get_status): Likewise.
2801 (i386_dr_low): New global variable.
2802 * win32-i386-low.c (i386_dr_low_set_addr):
2803 Changed signature. Made static.
2804 (i386_dr_low_get_addr): Likewise.
2805 (i386_dr_low_set_control): Likewise.
2806 (i386_dr_low_get_control): Likewise.
2807 (i386_dr_low_get_status): Likewise.
2808 (i386_dr_low): New global variable.
2809
e1d2394b
MS
28102014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2811
2812 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2813 * Makefile.in (AR, AR_FLAGS): Define.
2814 * configure: Regenerate.
2815
3a8ee006
GB
28162014-06-19 Gary Benson <gbenson@redhat.com>
2817
2818 * Makefile.in (i386-dregs.o): New rule.
2819 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2820 * i386-low.c (target.h): Remove include.
2821 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2822 (DR_CONTROL_SHIFT): Likewise.
2823 (DR_CONTROL_SIZE): Likewise.
2824 (DR_RW_EXECUTE): Likewise.
2825 (DR_RW_WRITE): Likewise.
2826 (DR_RW_READ): Likewise.
2827 (DR_RW_IORW): Likewise.
2828 (DR_LEN_1): Likewise.
2829 (DR_LEN_2): Likewise.
2830 (DR_LEN_4): Likewise.
2831 (DR_LEN_8): Likewise.
2832 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2833 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2834 (DR_ENABLE_SIZE): Likewise.
2835 (DR_LOCAL_SLOWDOWN): Likewise.
2836 (DR_GLOBAL_SLOWDOWN): Likewise.
2837 (DR_CONTROL_RESERVED): Likewise.
2838 (I386_DR_CONTROL_MASK): Likewise.
2839 (I386_DR_VACANT): Likewise.
2840 (I386_DR_LOCAL_ENABLE): Likewise.
2841 (I386_DR_GLOBAL_ENABLE): Likewise.
2842 (I386_DR_DISABLE): Likewise.
2843 (I386_DR_SET_RW_LEN): Likewise.
2844 (I386_DR_GET_RW_LEN): Likewise.
2845 (I386_DR_WATCH_HIT): Likewise.
2846 (i386_wp_op_t): Likewise.
2847 (i386_show_dr): Likewise.
2848 (i386_length_and_rw_bits): Likewise.
2849 (i386_insert_aligned_watchpoint): Likewise.
2850 (i386_remove_aligned_watchpoint): Likewise.
2851 (i386_handle_nonaligned_watchpoint): Likewise.
2852 i386_update_inferior_debug_regs(): Likewise.
2853 (i386_dr_insert_watchpoint): Likewise.
2854 (i386_dr_remove_watchpoint): Likewise.
2855 (i386_dr_region_ok_for_watchpoint): Likewise.
2856 (i386_dr_stopped_data_address): Likewise.
2857 (i386_dr_stopped_by_watchpoint): Likewise.
2858
8f26655c
GB
28592014-06-19 Gary Benson <gbenson@redhat.com>
2860
2861 * i386-low.c (i386_dr_show): Renamed to
2862 i386_show_dr and made static. All uses updated.
2863 (i386_dr_length_and_rw_bits): Renamed to
2864 i386_length_and_rw_bits and made static.
2865 All uses updated.
2866 (i386_dr_insert_aligned_watchpoint): Renamed to
2867 i386_insert_aligned_watchpoint and made static.
2868 All uses updated.
2869 (i386_dr_remove_aligned_watchpoint): Renamed to
2870 i386_remove_aligned_watchpoint and made static.
2871 All uses updated.
2872 (i386_dr_update_inferior_debug_regs): Renamed to
2873 i386_update_inferior_debug_regs and made static.
2874 All uses updated.
2875
b9228891
GB
28762014-06-18 Gary Benson <gbenson@redhat.com>
2877
5171def3
GB
2878 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2879 (i386_dr_low_can_set_control): Likewise.
2880 (i386_get_debug_register_length): Likewise.
2881 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2882 (i386_dr_low_can_set_control): Likewise.
2883 (i386_get_debug_register_length): Likewise.
2884
28852014-06-17 Gary Benson <gbenson@redhat.com>
2886
b9228891
GB
2887 * i386-low.h (i386-dregs.h): New include.
2888 (DR_FIRSTADDR): Now in i386-dregs.h.
2889 (DR_LASTADDR): Likewise.
2890 (DR_NADDR): Likewise.
2891 (DR_STATUS): Likewise.
2892 (DR_CONTROL): Likewise.
2893 (i386_debug_reg_state): Likewise.
2894 (i386_dr_insert_watchpoint): Likewise.
2895 (i386_dr_remove_watchpoint): Likewise.
2896 (i386_dr_region_ok_for_watchpoint): Likewise.
2897 (i386_dr_stopped_data_address): Likewise.
2898 (i386_dr_stopped_by_watchpoint): Likewise.
2899 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2900
4be83cc2
GB
29012014-06-18 Gary Benson <gbenson@redhat.com>
2902
2903 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2904 i386_dr_insert_watchpoint.
2905 (i386_low_remove_watchpoint): Renamed to
2906 i386_dr_remove_watchpoint.
2907 (i386_low_region_ok_for_watchpoint): Renamed to
2908 i386_dr_region_ok_for_watchpoint.
2909 (i386_low_stopped_data_address): Renamed to
2910 i386_dr_stopped_data_address.
2911 (i386_low_stopped_by_watchpoint): Renamed to
2912 i386_dr_stopped_by_watchpoint.
2913 * i386-low.c (i386_show_dr): Renamed to
2914 i386_dr_show and made nonstatic. All uses updated.
2915 (i386_length_and_rw_bits): Renamed to
2916 i386_dr_length_and_rw_bits and made nonstatic.
2917 All uses updated.
2918 (i386_insert_aligned_watchpoint): Renamed to
2919 i386_dr_insert_aligned_watchpoint and made nonstatic.
2920 All uses updated.
2921 (i386_remove_aligned_watchpoint): Renamed to
2922 i386_dr_remove_aligned_watchpoint and made nonstatic.
2923 All uses updated.
2924 (i386_update_inferior_debug_regs): Renamed to
2925 i386_dr_update_inferior_debug_regs and made nonstatic.
2926 All uses updated.
2927 (i386_low_insert_watchpoint): Renamed to
2928 i386_dr_insert_watchpoint. All uses updated.
2929 (i386_low_remove_watchpoint): Renamed to
2930 i386_dr_remove_watchpoint. All uses updated.
2931 (i386_low_region_ok_for_watchpoint): Renamed to
2932 i386_dr_region_ok_for_watchpoint. All uses updated.
2933 (i386_low_stopped_data_address): Renamed to
2934 i386_dr_stopped_data_address. All uses updated.
2935 (i386_low_stopped_by_watchpoint): Renamed to
2936 i386_dr_stopped_by_watchpoint. All uses updated.
2937
131aa0d4
GB
29382014-06-18 Gary Benson <gbenson@redhat.com>
2939
2940 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2941 (i386_dr_low_can_set_control): Likewise.
2942 (i386_insert_aligned_watchpoint): New check.
2943
d9305f7f
GB
29442014-06-18 Gary Benson <gbenson@redhat.com>
2945
2946 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2947 Renamed to state.
2948
e927c9fc
GB
29492014-06-18 Gary Benson <gbenson@redhat.com>
2950
2951 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2952 instead of fatal and error.
2953 (i386_handle_nonaligned_watchpoint): Likewise.
2954
1b6d4134
GB
29552014-06-18 Gary Benson <gbenson@redhat.com>
2956
2957 * i386-low.c (i386_get_debug_register_length): New macro.
2958 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2959 (i386_show_dr): Use debug_printf instead of fprintf. Use
2960 phex to format values.
2961
6e62758f
GB
29622014-06-18 Gary Benson <gbenson@redhat.com>
2963
2964 * i386-low.h: Comment changes.
2965 * i386-low.c: Likewise.
2966
fc6e2f03
GB
29672014-06-18 Gary Benson <gbenson@redhat.com>
2968
2969 * i386-low.c: Whitespace changes.
2970
f9d1eeed
TT
29712014-06-12 Tom Tromey <tromey@redhat.com>
2972
2973 * utils.c (freeargv): Remove.
2974
0b04e523
TT
29752014-06-12 Tom Tromey <tromey@redhat.com>
2976
2977 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2978 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2979 (parse_debug_format_options): Likewise.
2980 (gdbserver_usage): Likewise.
2981 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2982 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2983 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2984 against libiberty.
2985 ($(LIBGNU)): Depend on libiberty.
2986 (all-lib): Recurse into all subdirs.
2987 (install-only): Invoke "install" target in subdirs.
2988 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2989 targets.
2990 * configure: Rebuild.
2991 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
2992 for vasprintf, vsnprintf, or gettimeofday.
2993 * configure.srv: Don't add safe-ctype.o or lbasename.o to
2994 srv_tgtobj.
2995
270c9937
JB
29962014-06-05 Joel Brobecker <brobecker@adacore.com>
2997
2998 * development.sh: Delete.
2999 * Makefile.in (config.status): Adjust dependency on development.sh.
3000 * configure.ac: Adjust development.sh source call.
3001 * configure: Regenerate.
3002
0a261ed8
PA
30032014-06-02 Pedro Alves <palves@redhat.com>
3004
3005 * ax.c (gdb_free_agent_expr): New function.
3006 * ax.h (gdb_free_agent_expr): New declaration.
3007 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3008 list.
3009 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3010 static.
3011 (clear_breakpoint_conditions_and_commands): New function.
3012 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3013 (clear_breakpoint_conditions_and_commands): New declaration.
3014
e9dae05e
RR
30152014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3016
3017 * linux-aarch64-low.c (asm/ptrace.h): Include.
3018
5876f503
JK
30192014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3020
3021 Fix TLS access for -static -pthread.
3022 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3023 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3024 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3025
802e8e6d
PA
30262014-05-20 Pedro Alves <palves@redhat.com>
3027
3028 * linux-aarch64-low.c (aarch64_insert_point)
3029 (aarch64_remove_point): No longer check whether the type is
3030 supported here. Adjust to new interface.
3031 (the_low_target): Install aarch64_supports_z_point_type as
3032 supports_z_point_type method.
3033 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3034 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3035 instead of a Z packet char. Adjust.
3036 (arm_supports_z_point_type): New function.
3037 (arm_insert_point, arm_remove_point): Adjust to new interface.
3038 (the_low_target): Install arm_supports_z_point_type.
3039 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3040 (cris_insert_point, cris_remove_point): Adjust to new interface.
3041 Don't check whether the type is supported here.
3042 (the_low_target): Install cris_supports_z_point_type.
3043 * linux-low.c (linux_supports_z_point_type): New function.
3044 (linux_insert_point, linux_remove_point): Adjust to new interface.
3045 * linux-low.h (struct linux_target_ops) <insert_point,
3046 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3047 raw_breakpoint pointer parameter.
3048 <supports_z_point_type>: New method.
3049 * linux-mips-low.c (mips_supports_z_point_type): New function.
3050 (mips_insert_point, mips_remove_point): Adjust to new interface.
3051 Use mips_supports_z_point_type.
3052 (the_low_target): Install mips_supports_z_point_type.
3053 * linux-ppc-low.c (the_low_target): Install NULL as
3054 supports_z_point_type method.
3055 * linux-s390-low.c (the_low_target): Install NULL as
3056 supports_z_point_type method.
3057 * linux-sparc-low.c (the_low_target): Install NULL as
3058 supports_z_point_type method.
3059 * linux-x86-low.c (x86_supports_z_point_type): New function.
3060 (x86_insert_point): Adjust to new insert_point interface. Use
3061 insert_memory_breakpoint. Adjust to new
3062 i386_low_insert_watchpoint interface.
3063 (x86_remove_point): Adjust to remove_point interface. Use
3064 remove_memory_breakpoint. Adjust to new
3065 i386_low_remove_watchpoint interface.
3066 (the_low_target): Install x86_supports_z_point_type.
3067 * lynx-low.c (lynx_target_ops): Install NULL as
3068 supports_z_point_type callback.
3069 * nto-low.c (nto_supports_z_point_type): New.
3070 (nto_insert_point, nto_remove_point): Adjust to new interface.
3071 (nto_target_ops): Install nto_supports_z_point_type.
3072 * mem-break.c: Adjust intro comment.
3073 (struct raw_breakpoint) <raw_type, size>: New fields.
3074 <inserted>: Update comment.
3075 <shlib_disabled>: Delete field.
3076 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3077 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3078 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3079 (raw_bkpt_type_to_target_hw_bp_type): New function.
3080 (find_enabled_raw_code_breakpoint_at): New function.
3081 (find_raw_breakpoint_at): New type and size parameters. Use them.
3082 (insert_memory_breakpoint): New function, based off
3083 set_raw_breakpoint_at.
3084 (remove_memory_breakpoint): New function.
3085 (set_raw_breakpoint_at): Reimplement.
3086 (set_breakpoint): New, based on set_breakpoint_at.
3087 (set_breakpoint_at): Reimplement.
3088 (delete_raw_breakpoint): Go through the_target->remove_point
3089 instead of assuming memory breakpoints.
3090 (find_gdb_breakpoint_at): Delete.
3091 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3092 (find_gdb_breakpoint): New function.
3093 (set_gdb_breakpoint_at): Delete.
3094 (z_type_supported): New function.
3095 (set_gdb_breakpoint_1): New function, loosely based off
3096 set_gdb_breakpoint_at.
3097 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3098 (delete_gdb_breakpoint_at): Delete.
3099 (delete_gdb_breakpoint_1): New function, loosely based off
3100 delete_gdb_breakpoint_at.
3101 (delete_gdb_breakpoint): New function.
3102 (clear_gdb_breakpoint_conditions): Rename to ...
3103 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3104 breakpoint.
3105 (add_condition_to_breakpoint): Make static.
3106 (add_breakpoint_condition): Take a struct breakpoint pointer
3107 instead of an address. Adjust.
3108 (gdb_condition_true_at_breakpoint): Rename to ...
3109 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3110 z_type parameter.
3111 (gdb_condition_true_at_breakpoint): Reimplement.
3112 (add_breakpoint_commands): Take a struct breakpoint pointer
3113 instead of an address. Adjust.
3114 (gdb_no_commands_at_breakpoint): Rename to ...
3115 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3116 parameter. Return true if no breakpoint was found. Change debug
3117 output.
3118 (gdb_no_commands_at_breakpoint): Reimplement.
3119 (run_breakpoint_commands): Rename to ...
3120 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3121 and change return type to boolean.
3122 (run_breakpoint_commands): New function.
3123 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3124 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3125 breakpoint. Go through the_target->remove_point instead of
3126 assuming memory breakpoint.
3127 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3128 software and hardware breakpoints.
3129 (reinsert_raw_breakpoint): Go through the_target->insert_point
3130 instead of assuming memory breakpoint.
3131 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3132 software and hardware breakpoints.
3133 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3134 Check both software and hardware breakpoints.
3135 (validate_inserted_breakpoint): Assert the breakpoint is a
3136 software breakpoint. Set the inserted flag to -1 instead of
3137 setting shlib_disabled.
3138 (delete_disabled_breakpoints): Adjust.
3139 (validate_breakpoints): Only validate software breakpoints.
3140 Adjust to inserted flag change.
3141 (check_mem_read, check_mem_write): Skip breakpoint types other
3142 than software breakpoints. Adjust to inserted flag change.
3143 * mem-break.h (enum raw_bkpt_type): New enum.
3144 (raw_breakpoint, struct process_info): Forward declare.
3145 (Z_packet_to_target_hw_bp_type): Delete declaration.
3146 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3147 (set_gdb_breakpoint, delete_gdb_breakpoint)
3148 (clear_breakpoint_conditions): New declarations.
3149 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3150 (breakpoint_inserted_here): Update comment.
3151 (add_breakpoint_condition, add_breakpoint_commands): Replace
3152 address parameter with a breakpoint pointer parameter.
3153 (gdb_breakpoint_here): Update comment.
3154 (delete_gdb_breakpoint_at): Delete.
3155 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3156 * server.c (process_point_options): Take a struct breakpoint
3157 pointer instead of an address. Adjust.
3158 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3159 delete_gdb_breakpoint.
3160 * spu-low.c (spu_target_ops): Install NULL as
3161 supports_z_point_type method.
3162 * target.h: Include mem-break.h.
3163 (struct target_ops) <prepare_to_access_memory>: Update comment.
3164 <supports_z_point_type>: New field.
3165 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3166 instead of a char. Also take a raw breakpoint pointer.
3167 * win32-arm-low.c (the_low_target): Install NULL as
3168 supports_z_point_type.
3169 * win32-i386-low.c (i386_supports_z_point_type): New function.
3170 (i386_insert_point, i386_remove_point): Adjust to new interface.
3171 (the_low_target): Install i386_supports_z_point_type.
3172 * win32-low.c (win32_supports_z_point_type): New function.
3173 (win32_insert_point, win32_remove_point): Adjust to new interface.
3174 (win32_target_ops): Install win32_supports_z_point_type.
3175 * win32-low.h (struct win32_target_ops):
3176 <supports_z_point_type>: New method.
3177 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3178 instead of a char. Also take a raw breakpoint pointer.
3179
932539e3
PA
31802014-05-20 Pedro Alves <palves@redhat.com>
3181
3182 * mem-break.h: Include break-common.h.
3183 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3184 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3185 (Z_packet_to_target_hw_bp_type): New declaration.
3186 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3187 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3188 (Z_PACKET_ACCESS_WP): Delete macros.
3189 (Z_packet_to_hw_type): Delete function.
3190 * i386-low.h: Don't include break-common.h here.
3191 (Z_packet_to_hw_type): Delete declaration.
3192 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3193 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3194 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3195 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3196 * linux-aarch64-low.c: Don't include break-common.h here.
3197 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3198 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3199 (Z_packet_to_target_hw_bp_type): Delete function.
3200 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3201 function.
3202 (mips_insert_point, mips_remove_point): Use
3203 Z_packet_to_target_hw_bp_type.
3204
4ff0d3d8
PA
32052014-05-20 Pedro Alves <palves@redhat.com>
3206
3207 * linux-aarch64-low.c: Include break-common.h.
3208 (enum target_point_type): Delete.
3209 (Z_packet_to_point_type): Rename to ...
3210 (Z_packet_to_target_hw_bp_type): ... this, and return a
3211 target_hw_bp_type instead.
3212 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3213 instead of an enum target_point_type.
3214 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3215 breakpoint type.
3216 (aarch64_dr_state_insert_one_point)
3217 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3218 (aarch64_handle_aligned_watchpoint)
3219 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3220 Take an enum target_hw_bp_type instead of an enum
3221 target_point_type.
3222 (aarch64_supports_z_point_type): New function.
3223 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3224 use Z_packet_to_target_hw_bp_type.
3225
786dc519
JB
32262014-05-20 Joel Brobecker <brobecker@adacore.com>
3227
3228 * configure.ac: Only use -Werror by default when DEVELOPMENT
3229 is true.
3230 * configure: Regenerate.
3231
9e0aa64f
JK
32322014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3233
3234 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3235 * linux-x86-low.c (X86_64_USER_REGS): New.
3236 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3237
2b577b92
YQ
32382014-04-28 Yao Qi <yao@codesourcery.com>
3239
3240 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3241 name.
3242
94611da2
PA
32432014-04-25 Pedro Alves <palves@redhat.com>
3244
3245 PR server/16255
3246 * linux-low.c (linux_attach_fail_reason_string): New function.
3247 (linux_attach_lwp): Delete.
3248 (linux_attach_lwp_1): Rename to ...
3249 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3250 argument. Remove "initial" parameter. Return int instead of
3251 void. Don't error or warn here.
3252 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3253 failure to attach to the tgid. Call warning when failing to
3254 attach to an lwp.
3255 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3256 argument. Remove "initial" parameter. Return int instead of
3257 void. Don't error or warn here.
3258 (linux_attach_fail_reason_string): New declaration.
3259 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3260 interface change. Use linux_attach_fail_reason_string.
3261
01f9f808
MS
32622014-04-24 Michael Sturm <michael.sturm@mintel.com>
3263 Walfred Tedeschi <walfred.tedeschi@intel.com>
3264
3265 * Makefile.in: Added rules to handle new files
3266 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3267 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3268 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3269 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3270 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3271 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3272 x32-avx512-linux.o.
3273 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3274 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3275 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3276 i386/x32-avx512.xml.
3277 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3278 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3279 i386/x32-avx512-linux.xml.
3280 * i387-fp.c (num_avx512_k_registers): New constant for number
3281 of K registers.
3282 (num_avx512_zmmh_low_registers): New constant for number of
3283 lower ZMM registers (0-15).
3284 (num_avx512_zmmh_high_registers): New constant for number of
3285 higher ZMM registers (16-31).
3286 (num_avx512_ymmh_registers): New contant for number of higher
3287 YMM registers (ymm16-31 added by avx521 on x86_64).
3288 (num_avx512_xmm_registers): New constant for number of higher
3289 XMM registers (xmm16-31 added by AVX512 on x86_64).
3290 (struct i387_xsave): Add space for AVX512 registers.
3291 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3292 Add code to handle AVX512 registers.
3293 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3294 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3295 prototypei from generated file.
3296 (tdesc_amd64_avx512_linux): Likewise.
3297 (init_registers_x32_avx512_linux): Likewise.
3298 (tdesc_x32_avx512_linux): Likewise.
3299 (init_registers_i386_avx512_linux): Likewise.
3300 (tdesc_i386_avx512_linux): Likewise.
3301 (x86_64_regmap): Add AVX512 registers.
3302 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3303 mask.
3304 (initialize_low_arch): Add code to initialize AVX512 registers.
3305
51aa91f9
PA
33062014-04-23 Pedro Alves <palves@redhat.com>
3307
3308 * mem-break.c (find_gdb_breakpoint_at): Make static.
3309 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3310
a4165e94
PA
33112014-04-23 Pedro Alves <palves@redhat.com>
3312
3313 * i386-low.c: Don't include break-common.h here.
3314 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3315 prototype to take target_hw_bp_type as argument instead of a Z
3316 packet char.
3317 * i386-low.h: Include break-common.h here.
3318 (Z_packet_to_hw_type): Declare.
3319 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3320 prototypes.
3321 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3322 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3323 (x86_remove_point): Convert the packet number to a
3324 target_hw_bp_type before calling i386_low_remove_watchpoint.
3325 * win32-i386-low.c (i386_insert_point): Convert the packet number
3326 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3327 (i386_remove_point): Convert the packet number to a
3328 target_hw_bp_type before calling i386_low_remove_watchpoint.
3329
b8acf843
PA
33302014-04-23 Pedro Alves <palves@redhat.com>
3331
3332 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3333
d708bcd1
PA
33342014-04-10 Pedro Alves <palves@redhat.com>
3335
3336 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3337 Check if the condition or command is NULL before checking if the
3338 breakpoint is known. On success, return true.
3339 * mem-break.h (add_breakpoint_condition): Document return.
3340 (add_breakpoint_commands): Add describing comment.
3341 * server.c (skip_to_semicolon): New function.
3342 (process_point_options): Use it.
3343
2eec7d5b
PA
33442014-04-09 Pedro Alves <palves@redhat.com>
3345
3346 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3347 to lwpid_of.
3348
fa96cb38
PA
33492014-02-27 Pedro Alves <palves@redhat.com>
3350
3351 PR 12702
3352 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3353 macros.
3354 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3355 output.
3356 (last_thread_of_process_p): Take a PID argument instead of a
3357 thread pointer.
3358 (linux_wait_for_lwp): Delete.
3359 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3360 functions.
3361 (linux_low_filter_event): New function, party factored out from
3362 linux_wait_for_event.
3363 (linux_wait_for_event): Rename to ...
3364 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3365 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3366 sigsuspend. Check for zombie leaders.
3367 (linux_wait_for_event): Reimplement as wrapper around
3368 linux_wait_for_event_filtered.
3369 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3370 a normal or signal exit is seen, it's the whole process exiting.
3371 (wait_for_sigstop): No longer a for_each_inferior callback.
3372 Rewrite on top of linux_wait_for_event_filtered.
3373 (stop_all_lwps): Call wait_for_sigstop directly.
3374 * server.c (resume, handle_target_event): Handle
3375 TARGET_WAITKIND_NO_RESUMED.
3376
d763de10
JB
33772014-02-26 Joel Brobecker <brobecker@adacore.com>
3378
3379 * win32-low.c (psapi_get_dll_name,
3380 * win32_CreateToolhelp32Snapshot): Delete.
3381 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3382 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3383 Delete.
3384 (handle_load_dll): Add function description.
3385 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3386
850a0f76
JB
33872014-02-26 Joel Brobecker <brobecker@adacore.com>
3388
3389 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3390 Add comment.
3391 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3392 base address when calling win32_add_one_solib.
3393 (handle_load_dll): Delete local variable load_addr.
3394 Remove 0x1000 offset applied to DLL base address when calling
3395 win32_add_one_solib.
3396 (handle_unload_dll): Add comment.
3397
f25b3fc3
JB
33982014-02-26 Joel Brobecker <brobecker@adacore.com>
3399
3400 * win32-low.c (win32_add_all_dlls): Renames
3401 win32_ensure_ntdll_loaded. Rewrite function documentation.
3402 Adjust implementation to always load all DLLs.
3403 Add 0x1000 offset to DLL base address when calling
3404 win32_add_one_solib.
3405 (child_initialization_done): New static global.
3406 (do_initial_child_stuff): Set child_initialization_done to
3407 zero during child initialization, and 1 after. Replace call
3408 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3409 Add comment.
3410 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3411 (handle_unload_dll): Add function documentation.
3412 (get_child_debug_event): Ignore load and unload DLL events
3413 during child initialization.
3414
d86d4aaf
DE
34152014-02-20 Doug Evans <dje@google.com>
3416
3bc32da3 3417 Remove global all_lwps.
d86d4aaf
DE
3418 * inferiors.h (ptid_of): Move here from linux-low.h.
3419 (pid_of, lwpid_of): Ditto.
3420 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3421 parameter is a struct thread_info * now.
3422 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3423 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3424 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3425 directly.
3426 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3427 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3428 * linux-arm-low.c (update_registers_callback): Update, "entry"
3429 parameter is a struct thread_info * now.
3430 Fetch lwpid from current_inferior directly.
3431 (arm_insert_point): Pass &all_threads to find_inferior instead of
3432 &all_lwps.
3433 (arm_remove_point): Ditto.
3434 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3435 (arm_prepare_to_resume): Fetch pid from thread.
3436 (arm_read_description): Fetch lwpid from current_inferior directly.
3437 * linux-low.c (all_lwps): Delete.
3438 (delete_lwp): Delete call to remove_inferior.
3439 (handle_extended_wait): Fetch lwpid from thread.
3440 (add_lwp): Don't set lwp->entry.id. Remove call to
3441 add_inferior_to_list.
3442 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3443 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3444 (kill_one_lwp_callback): Ditto.
3445 (linux_kill): Don't dereference NULL pointer.
3446 Fetch ptid,lwpid from thread.
3447 (get_detach_signal): Fetch ptid from thread.
3448 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3449 Simplify call to regcache_invalidate_thread.
3450 (delete_lwp_callback): Update, "entry" parameter is a
3451 struct thread_info * now. Fetch pid from thread.
3452 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3453 (status_pending_p_callback): Update, "entry" parameter is a
3454 struct thread_info * now. Fetch ptid from thread.
3455 (find_lwp_pid): Update, "entry" parameter is a
3456 struct thread_info * now.
3457 (linux_wait_for_lwp): Fetch pid from thread.
3458 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3459 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3460 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3461 (dequeue_one_deferred_signal): Ditto.
3462 (cancel_breakpoint): Fetch ptid from current_inferior.
3463 (linux_wait_for_event): Pass &all_threads to find_inferior,
3464 not &all_lwps. Fetch ptid, lwpid from thread.
3465 (count_events_callback): Update, "entry" parameter is a
3466 struct thread_info * now.
3467 (select_singlestep_lwp_callback): Ditto.
3468 (select_event_lwp_callback): Ditto.
3469 (cancel_breakpoints_callback): Ditto.
3470 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3471 not &all_lwps.
3472 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3473 (unsuspend_one_lwp): Update, "entry" parameter is a
3474 struct thread_info * now.
3475 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3476 not &all_lwps.
3477 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3478 Fetch lwpid from thread, not lwp.
3479 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3480 Pass &all_threads to find_inferior, not &all_lwps.
3481 (send_sigstop): Fetch lwpid from thread, not lwp.
3482 (send_sigstop_callback): Update, "entry" parameter is a
3483 struct thread_info * now.
3484 (suspend_and_send_sigstop_callback): Ditto.
3485 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3486 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3487 struct thread_info * now.
3488 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3489 from thread, lwp.
3490 (lwp_running): Update, "entry" parameter is a
3491 struct thread_info * now.
3492 (stop_all_lwps): Fetch ptid from thread.
3493 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3494 (linux_resume_one_lwp): Fetch lwpid from thread.
3495 (linux_set_resume_request): Update, "entry" parameter is a
3496 struct thread_info * now. Fetch pid, lwpid from thread.
3497 (resume_status_pending_p): Update, "entry" parameter is a
3498 struct thread_info * now.
3499 (need_step_over_p): Ditto. Fetch lwpid from thread.
3500 (start_step_over): Fetch lwpid from thread.
3501 (linux_resume_one_thread): Update, "entry" parameter is a
3502 struct thread_info * now. Fetch lwpid from thread.
3503 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3504 (proceed_one_lwp): Update, "entry" parameter is a
3505 struct thread_info * now. Fetch lwpid from thread.
3506 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3507 struct thread_info * now.
3508 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3509 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3510 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3511 directly.
3512 (regsets_store_inferior_registers): Ditto.
3513 (fetch_register, store_register): Ditto.
3514 (linux_read_memory, linux_write_memory): Ditto.
3515 (linux_request_interrupt): Ditto.
3516 (linux_read_auxv): Ditto.
3517 (linux_xfer_siginfo): Ditto.
3518 (linux_qxfer_spu): Ditto.
3519 (linux_qxfer_libraries_svr4): Ditto.
3520 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3521 moved to inferiors.h.
3522 (get_lwp): Delete.
3523 (get_thread_lwp): Update.
3524 (struct lwp_info): Delete member "entry". Simplify comment for
3525 member "thread".
3526 (all_lwps): Delete.
3527 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3528 current_inferior directly.
3529 (update_watch_registers_callback): Update, "entry" parameter is a
3530 struct thread_info * now. Fetch pid from thread.
3531 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3532 (mips_insert_point): Fetch lwpid from current_inferior.
3533 Pass &all_threads to find_inferior, not &all_lwps.
3534 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3535 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3536 directly.
3537 (mips_stopped_data_address): Ditto.
3538 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3539 directly.
3540 * linux-tile-low.c (tile_arch_setup): Ditto.
3541 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3542 (update_debug_registers_callback): Update, "entry" parameter is a
3543 struct thread_info * now. Fetch pid from thread.
3544 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3545 Pass &all_threads to find_inferior, not &all_lwps.
3546 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3547 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3548 Pass &all_threads to find_inferior, not &all_lwps.
3549 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3550 (i386_dr_low_get_status): Ditto.
3551 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3552 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3553 (x86_linux_read_description): Ditto.
3554 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3555
3b8361aa
DE
35562014-02-20 Doug Evans <dje@google.com>
3557
3558 * inferiors.c (get_first_inferior): Fix buglet.
3559
f7667f0d
DE
35602014-02-19 Doug Evans <dje@google.com>
3561
3562 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3563 * inferiors.c (add_thread): Change result type to struct thread_info *.
3564 All callers updated.
3565 (add_lwp): Call add_thread here instead of in callers.
3566 All callers updated.
3567 * linux-low.h (get_lwp_thread): Rewrite.
3568 (struct lwp_info): New member "thread".
3569
b3312d80
DE
35702014-02-19 Doug Evans <dje@google.com>
3571
3572 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3573 All callers updated.
3574
ecc6f45c
DE
35752014-02-19 Doug Evans <dje@google.com>
3576
3577 * inferiors.c (add_thread): Fix whitespace.
3578
649ebbca
DE
35792014-02-19 Doug Evans <dje@google.com>
3580
3581 * dll.c (clear_dlls): Replace accessing list implemention details
3582 with API function.
3583 * gdbthread.h (get_first_thread): Declare.
3584 * inferiors.c (for_each_inferior_with_data): New function.
3585 (get_first_thread): New function.
3586 (find_thread_ptid): Simplify.
3587 (get_first_inferior): New function.
3588 (clear_list): Delete.
3589 (one_inferior_p): New function.
3590 (clear_inferior_list): New function.
3591 (clear_inferiors): Update.
3592 * inferiors.h (for_each_inferior_with_data): Declare.
3593 (clear_inferior_list): Declare.
3594 (one_inferior_p): Declare.
3595 (get_first_inferior): Declare.
3596 * linux-low.c (linux_wait_for_event): Replace accessing list
3597 implemention details with API function.
3598 * server.c (target_running): Ditto.
3599 (accumulate_file_name_length): New function.
3600 (emit_dll_description): New function.
3601 (handle_qxfer_libraries): Replace accessing list implemention
3602 details with API function.
3603 (handle_qxfer_threads_worker): New function.
3604 (handle_qxfer_threads_proper): Replace accessing list implemention
3605 details with API function.
3606 (handle_query): Ditto.
3607 (visit_actioned_threads_callback_ftype): New typedef.
3608 (visit_actioned_threads_data): New struct.
3609 (visit_actioned_threads): Rewrite to be find_inferior callback.
3610 (resume): Call find_inferior.
3611 (handle_status): Replace accessing list implemention
3612 details with API function.
3613 (process_serial_event): Replace accessing list implemention details
3614 with API function.
3615 * target.c (set_desired_inferior): Replace accessing list implemention
3616 details with API function.
3617 * tracepoint.c (same_process_p): New function.
3618 (gdb_agent_about_to_close): Replace accessing list implemention
3619 details with API function.
3620 * win32-low.c (child_delete_thread): Replace accessing list
3621 implemention details with API function.
3622 (match_dll_by_basename): New function.
3623 (dll_is_loaded_by_basename): New function.
3624 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3625 details call to dll_is_loaded_by_basename.
3626
80894984
DE
36272014-02-19 Doug Evans <dje@google.com>
3628
3629 * dll.h (struct dll_info): Add comment.
3630 * gdbthread.h (struct thread_info): Add comment.
3631 (current_ptid): Simplify.
3632 * inferiors.c (add_process): Update.
3633 (remove_process): Update.
3634 * inferiors.h (struct process_info): Rename member "head" to "entry".
3635 * linux-low.c (delete_lwp): Update.
3636 (add_lwp): Update.
3637 (last_thread_of_process_p): Update.
3638 (kill_one_lwp_callback, linux_kill): Update.
3639 (status_pending_p_callback): Update.
3640 (wait_for_sigstop): Update. Simplify read of ptid.
3641 (start_step_over): Update.
3642 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3643 (get_lwp_thread): Update.
3644 (struct lwp_info): Rename member "head" to "entry".
3645 * regcache.h (inferior_list_entry): Delete.
3646 * server.c (kill_inferior_callback): Update.
3647 (detach_or_kill_inferior_callback): Update.
3648 (print_started_pid): Update.
3649 (print_attached_pid): Update.
3650 (process_serial_event): Simplify read of ptid.
3651 * thread-db.c (thread_db_create_event): Update.
3652 (thread_db_get_tls_address): Update.
3653 * win32-low.c (current_inferior_ptid): Simplify.
3654
46917d26
TT
36552014-02-19 Tom Tromey <tromey@redhat.com>
3656
3657 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3658 argument.
3659 (target_supports_btrace): Update.
3660
0759a81e
YQ
36612014-02-14 Yao Qi <yao@codesourcery.com>
3662
3663 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3664 (rsp-low-ipa.o): New target.
3665
a7191e8b
TT
36662014-02-12 Tom Tromey <tromey@redhat.com>
3667
3668 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3669 convert_ascii_to_int.
3670 * regcache.c (registers_to_string): Likewise.
3671 * remote-utils.c (decode_M_packet): Likewise.
3672 * server.c (process_serial_event): Likewise.
3673
ff0e980e
TT
36742014-02-12 Tom Tromey <tromey@redhat.com>
3675
3676 * server.c (handle_query, handle_v_run): Use hex2bin, not
3677 unhexify.
3678 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3679
e9371aff
TT
36802014-02-12 Tom Tromey <tromey@redhat.com>
3681
3682 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3683 convert_int_to_ascii.
3684 * regcache.c (registers_to_string, collect_register_as_string):
3685 Likewise.
3686 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3687 Likewise.
3688 * server.c (process_serial_event): Likewise.
3689 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3690 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3691
971dc0b8
TT
36922014-02-12 Tom Tromey <tromey@redhat.com>
3693
3694 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3695 bin2hex, not hexify.
3696 * tracepoint.c (cmd_qtstatus): Likewise.
3697
0a822afb
TT
36982014-02-12 Tom Tromey <tromey@redhat.com>
3699
3700 * remote-utils.c (monitor_output): Pass explicit length to
3701 hexify.
3702
9c3d6531
TT
37032014-02-12 Tom Tromey <tromey@redhat.com>
3704
3705 * tracepoint.c: Include rsp-low.h.
3706 * server.c: Include rsp-low.h.
3707 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3708 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3709 declare.
3710 * remote-utils.c: Include rsp-low.h.
3711 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3712 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3713 (convert_int_to_ascii, convert_ascii_to_int): Move to
3714 common/rsp-low.c.
3715 * regcache.c: Include rsp-low.h.
3716 * ax.c: Include rsp-low.h.
3717 * Makefile.in (SFILES): Add common/rsp-low.c.
3718 (OBS): Add rsp-low.o.
3719 (rsp-low.o): New target.
3720
01fd3ea5
TT
37212014-02-12 Tom Tromey <tromey@redhat.com>
3722
3723 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3724 Include print-utils.h.
3725 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3726 (plongest, thirty_two, phex_nz): Remove.
3727 * Makefile.in (SFILES): Add common/print-utils.c.
3728 (OBS): Add print-utils.o.
3729 (print-utils-ipa.o): New target.
3730 (print-utils.o): New target.
3731 (IPA_OBJS): Add print-utils-ipa.o.
3732
e99dc820
TT
37332014-02-06 Tom Tromey <tromey@redhat.com>
3734
3735 * Makefile.in (SFILES): Fix indentation.
3736
ee1e2d4f
DE
37372014-02-05 Doug Evans <dje@google.com>
3738
3739 * linux-low.c (linux_wait_for_event): Improve comment.
3740 (linux_wait_1): Keep current_inferior in sync with event_child.
3741
f5a02773
DE
37422014-01-22 Doug Evans <dje@google.com>
3743
3744 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3745
87ce2a04
DE
37462014-01-22 Doug Evans <dje@google.com>
3747
3748 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3749 * configure: Regenerate.
3750 * config.in: Regenerate.
3751 * Makefile.in (SFILES): Add debug.c.
3752 (OBS): Add debug.o.
3753 * debug.c: New file.
3754 * debug.h: New file.
3755 * linux-aarch64-low.c (*): Update all debugging printfs to use
3756 debug_printf instead of fprintf.
3757 * linux-arm-low.c (*): Ditto.
3758 * linux-cris-low.c (*): Ditto.
3759 * linux-crisv32-low.c (*): Ditto.
3760 * linux-m32r-low.c (*): Ditto.
3761 * linux-sparc-low.c (*): Ditto.
3762 * linux-x86.c (*): Ditto.
3763 * linux-low.c (*): Ditto.
3764 (linux_wait_1): Add calls to debug_enter, debug_exit.
3765 (linux_wait): Remove redundant debugging printf.
3766 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3767 (linux_resume, unstop_all_lwps): Ditto.
3768 * mem-break.c (*): Update all debugging printfs to use
3769 debug_printf instead of fprintf.
3770 * remote-utils.c (*): Ditto.
3771 * thread-db.c (*): Ditto.
3772 * server.c #include <ctype.h>, "gdb_vecs.h".
3773 (debug_threads): Moved to debug.c.
3774 (*): Update all debugging printfs to use debug_printf instead of
3775 fprintf.
3776 (start_inferior): Replace call to fflush with call to debug_flush.
3777 (monitor_show_help): Mention set debug-format.
3778 (parse_debug_format_options): New function.
3779 (handle_monitor_command): Handle "monitor set debug-format".
3780 (gdbserver_usage): Mention --debug-format.
3781 (main): Parse --debug-format.
3782 * server.h (debug_threads): Declaration moved to debug.h.
3783 #include "debug.h".
3784 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3785 trace_debug_1 that uses debug_printf.
3786 (tracepoint_look_up_symbols): Update all debugging printfs to use
3787 debug_printf instead of fprintf.
3788
e671835b
BS
37892014-01-20 Baruch Siach <baruch@tkos.co.il>
3790
3791 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3792 sys/ptrace.h.
3793
b5737fa9
PA
37942014-01-17 Pedro Alves <palves@redhat.com>
3795
ea38d2a9 3796 PR build/16445
c7faa97a
PA
3797 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3798 defined after including gdb_proc_service.h.
b5737fa9 3799
40ed484e
DE
38002014-01-16 Doug Evans <dje@google.com>
3801
3802 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3803 (match_dll): Use it.
3804
969c39fb
MM
38052014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3806
3807 * target.h (target_ops) <read_btrace>: Change parameters and
3808 return type to allow error reporting.
3809 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3810 trace reading errors on.
3811 * linux-low.c (linux_low_read_btrace): Pass trace reading
3812 errors on.
3813 (linux_low_disable_btrace): New.
3814
ab7f45ba
DE
38152014-01-15 Doug Evans <dje@google.com>
3816
3817 * inferiors.c (thread_id_to_gdb_id): Delete.
3818 * inferiors.h (thread_id_to_gdb_id): Delete.
3819
66af0f44
EZ
38202014-01-13 Eli Zaretskii <eliz@gnu.org>
3821
3822 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3823 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3824 versions.
3825
9939e131
PA
38262014-01-08 Pedro Alves <palves@redhat.com>
3827
3828 * server.c (handle_status): Don't discard previous queued stop
3829 replies or thread's pending status here.
3830 (main) <disconnection>: Do it here instead.
3831
b7ea362b
PA
38322014-01-08 Pedro Alves <palves@redhat.com>
3833
3834 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3835 * server.c (visit_actioned_threads, handle_pending_status): New
3836 function.
3837 (handle_v_cont): Factor out parts to ...
3838 (resume): ... this new function. If in all-stop, and a thread
3839 being resumed has a pending status, report it without actually
3840 resuming.
3841 (myresume): Adjust to use the new 'resume' function.
3842 (clear_pending_status_callback, set_pending_status_callback)
3843 (find_status_pending_thread_callback): New functions.
3844 (handle_status): Handle the case of multiple threads having
3845 interesting statuses to report. Report threads' real last signal
3846 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3847 with an interesting thread to report the status for, instead of
3848 always reporting the status of the first thread.
3849
28498c42
JB
38502014-01-01 Joel Brobecker <brobecker@adacore.com>
3851
3852 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3853 * gdbreplay.c (gdbreplay_version): Likewise.
3854
f45c82da
YZ
38552013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3856
3857 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3858 iov.iov_len with the real length in use.
3859
379a5e2d
JB
38602013-12-13 Joel Brobecker <brobecker@adacore.com>
3861
3862 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3863 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3864 for all targets that use win32-low.c.
3865 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3866 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3867
4210d83e
PA
38682013-12-13 Pedro Alves <palves@redhat.com>
3869
3870 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3871 if equal to TARGET_WAITKIND_LOADED.
3872 * win32-low.c (cached_status): New static global.
3873 (win32_wait): Add declaration.
3874 (do_initial_child_stuff): Flush all initial pending debug events
3875 up to the initial breakpoint.
3876 (win32_wait): If CACHED_STATUS was set, return that instead
3877 of doing a real wait. Remove the code resuming the execution
3878 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3879 during the initial phase. Also remove the code changing
3880 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3881 TARGET_WAITKIND_STOPPED.
3882
e7f0d979
YQ
38832013-12-11 Yao Qi <yao@codesourcery.com>
3884
3885 * notif.c (handle_notif_ack): Return 0 if no notification
3886 matches.
3887
ebcf782c
DE
38882013-11-20 Doug Evans <dje@google.com>
3889
3890 * linux-low.c (linux_set_resume_request): Fix comment.
3891
20ad9378
DE
38922013-11-20 Doug Evans <dje@google.com>
3893
3894 * linux-low.c (resume_status_pending_p): Tweak comment.
3895
a196ebeb
WT
38962013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3897
3898 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3899 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3900 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3901 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3902 (srv_amd64_regobj): Add amd64-mpx.o.
3903 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3904 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3905 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3906 * i387-fp.c (num_pl_bnd_register) Added constant.
3907 (num_pl_bnd_cfg_registers) Added constant.
3908 (struct i387_xsave) Added reserved area and MPX fields.
3909 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3910 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3911 function.
3912 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3913 (init_registers_amd64_mpx_linux): Declare new function.
3914 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3915 (x86_64_regmap): Add MPX registers.
3916 (x86_linux_read_description): Add MPX case.
3917 (initialize_low_arch): Initialize MPX targets.
3918
0080a2f6
TT
39192013-11-18 Tom Tromey <tromey@redhat.com>
3920
3921 * configure: Rebuild.
3922 * configure.ac: Don't check for stdlib.h.
3923 * gdbreplay.c: Unconditionally include stdlib.h.
3924
2978b111
TT
39252013-11-18 Tom Tromey <tromey@redhat.com>
3926
3927 * config.in: Rebuild.
3928 * configure: Rebuild.
3929 * configure.ac: Don't use AC_HEADER_DIRENT.
3930
a3d08894
TT
39312013-11-18 Tom Tromey <tromey@redhat.com>
3932
3933 * server.h: Don't check HAVE_STRING_H.
3934 * gdbreplay.c: Don't check HAVE_STRING_H.
3935 * configure: Rebuild.
3936
0a5dd17d
TT
39372013-11-18 Tom Tromey <tromey@redhat.com>
3938
3939 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3940 LIBGNU.
3941
1bd2f0ba
TT
39422013-11-08 Tom Tromey <tromey@redhat.com>
3943
3944 * configure, config.in: Rebuild.
3945 * configure.ac: Remove unused configury.
3946
3266f10b
TT
39472013-11-08 Tom Tromey <tromey@redhat.com>
3948
3949 * acinclude.m4: Include common.m4, codeset.m4.
3950 * configure, config.in: Rebuild.
3951 * configure.ac: Use GDB_AC_COMMON.
3952
6682d959
AA
39532013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3954
3955 * linux-s390-low.c (HWCAP_S390_TE): New define.
3956 (s390_arch_setup): Consider the TE field in the HWCAP for
3957 determining 'have_regset_tdb'.
3958
fd0a4d76
SDJ
39592013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3960
3961 PR gdb/16014
3962 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3963 call to sizeof.
3964
1a3d890b
PA
39652013-10-02 Pedro Alves <palves@redhat.com>
3966
3967 * server.c (process_serial_event): Don't output "GDBserver
3968 exiting" if GDB is connected through stdio.
3969 * target.c (mywait): Likewise, be silent if GDB is connected
3970 through stdio.
3971
97ad4581
JB
39722013-10-01 Joel Brobecker <brobecker@adacore.com>
3973
3974 * lynx-low.c (lynx_add_threads_after_attach): New function.
3975 (lynx_attach): Remove call to add_thread. Add call to
3976 lynx_add_threads_after_attach instead.
3977
5b4e221c
MF
39782013-09-28 Mike Frysinger <vapier@gentoo.org>
3979
3980 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3981 * config.in, configure: Regenerated.
3982
ee47b2f8
YQ
39832013-09-18 Yao Qi <yao@codesourcery.com>
3984
3985 PR server/15959
3986 * server.c (start_inferior): Clear 'resume_info'.
3987
d6707650 39882013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 3989
d6707650
JW
3990 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
3991 for each register.
3992
9243dd0e 39932013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 3994
9243dd0e
JW
3995 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
3996 linux-tile-low.o to srv_tgtobj.
3997
c623a6ef
WN
39982013-09-16 Will Newton <will.newton@linaro.org>
3999
4000 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4001 out regs.
4002
fb71d39e
PA
40032013-09-06 Pedro Alves <palves@redhat.com>
4004
4005 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4006 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4007 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4008 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4009 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4010 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4011
8e7e9910
PA
40122013-09-06 Pedro Alves <palves@redhat.com>
4013
4014 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4015 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4016
7c3a12ca
PA
40172013-09-06 Pedro Alves <palves@redhat.com>
4018
4019 * linux-amd64-ipa.c: Include tracepoint.h.
4020 * linux-i386-ipa.c: Include tracepoint.h.
4021
8eb3d7b6
RW
40222013-09-06 Ricard Wanderlof <ricardw@axis.com>
4023
4024 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4025 (ps_get_thread_area): New function.
4026
eddddb9d
RW
40272013-09-06 Ricard Wanderlof <ricardw@axis.com>
4028
4029 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4030 (initialize_low_arch): Call init_registers_crisv32 rather than
4031 init_register_crisv32.
4032
533b0600
PA
40332013-09-05 Pedro Alves <palves@redhat.com>
4034
4035 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4036 to ...
4037 * hostio.h: ... this new file.
4038 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4039 win32-low.c: Include hostio.h.
4040
0ce3d3b5
PA
40412013-09-05 Pedro Alves <palves@redhat.com>
4042
4043 * server.h (gdb_client_data, handler_func, callback_handler_func)
4044 (delete_file_handler, add_file_handler, append_callback_event)
4045 (delete_callback_event, start_event_loop, initialize_event_loop):
4046 Move to event-loop.h and include it.
4047 * event-loop.h: New file.
4048
799cdc37
PA
40492013-09-05 Pedro Alves <palves@redhat.com>
4050
4051 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4052 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4053 (loaded_dll, unloaded_dll): Move to ...
4054 * dll.h: ... this new file.
4055 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4056
6a6bbd9d
PA
40572013-09-05 Pedro Alves <palves@redhat.com>
4058
4059 * server.h (current_process, get_thread_process, all_processes)
4060 (add_inferior_to_list, for_each_inferior, current_inferior)
4061 (remove_inferior, add_process, remove_process, find_process_pid)
4062 (have_started_inferiors_p, have_attached_inferiors_p)
4063 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4064 (clear_inferiors, find_inferior, find_inferior_id)
4065 (inferior_target_data, set_inferior_target_data)
4066 (inferior_regcache_data, set_inferior_regcache_data): Move to
4067 inferiors.h, and include it.
4068 * inferiors.h: New file.
4069
f699aaba
PA
40702013-09-05 Pedro Alves <palves@redhat.com>
4071
4072 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4073 Move ...
72f4393d 4074 * ax.h: ... here.
f699aaba 4075
c144c7a0
PA
40762013-09-05 Pedro Alves <palves@redhat.com>
4077
4078 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4079 tracepoint.h.
4080 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4081 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4082 (handle_tracepoint_general_set, handle_tracepoint_query)
4083 (tracepoint_finished_step, tracepoint_was_hit)
4084 (release_while_stepping_state_list, current_traceframe)
4085 (in_readonly_region, traceframe_read_mem)
4086 (fetch_traceframe_registers, traceframe_read_sdata)
4087 (traceframe_read_info, struct fast_tpoint_collect_status)
4088 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4089 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4090 (supply_fast_tracepoint_registers)
4091 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4092 (ipa_tdesc, claim_trampoline_space)
4093 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4094 (agent_mem_read, agent_get_trace_state_variable_value)
4095 (agent_set_trace_state_variable_value, agent_tsv_read)
4096 (agent_mem_read_string, get_raw_reg_func_addr)
4097 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4098 * tracepoint.h: ... this new file.
4099
ff42e6ab
PA
41002013-09-05 Pedro Alves <palves@redhat.com>
4101
4102 * server.h (perror_with_name, error, fatal, warning, paddress)
4103 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4104 include it.
4105 * utils.h: New file.
4106
541af0f4
PA
41072013-09-05 Pedro Alves <palves@redhat.com>
4108
4109 * server.h (remote_debug, noack_mode, transport_is_reliable)
4110 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4111 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4112 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4113 (write_enn, initialize_async_io, enable_async_io)
4114 (disable_async_io, check_remote_input_interrupt_request)
4115 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4116 (dead_thread_notify, prepare_resume_reply)
4117 (decode_address_to_semicolon, decode_address, decode_m_packet)
4118 (decode_M_packet, decode_X_packet, decode_xfer_write)
4119 (decode_search_memory_packet, unhexify, hexify)
4120 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4121 (look_up_one_symbol, relocate_instruction)
4122 (monitor_output): Move to remote-utils.h, and include it.
4123 * remote-utils.h: New file.
4124
eebdf26b
PA
41252013-09-05 Pedro Alves <palves@redhat.com>
4126
4127 * server.h (_): Delete.
4128
3aafd2ff
PA
41292013-09-02 Pedro Alves <palves@redhat.com>
4130
4131 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4132 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4133 allocated.
4134 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4135
cee83bcb
PM
41362013-09-02 Pierre Muller <muller@sourceware.org>
4137
4138 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4139 or WriteProcessMemory complete successfully and handle
4140 ERROR_PARTIAL_COPY error.
4141
9a13b2fa
PA
41422013-09-02 Pedro Alves <palves@redhat.com>
4143
4144 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4145 error instead of EIO.
4146
602e3198
JK
41472013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4148
4149 PR server/15604
4150 * linux-low.c: Include filestuff.h.
4151 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4152 * lynx-low.c: Include filestuff.h.
4153 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4154 * server.c: Include filestuff.h.
4155 (main): Call notice_open_fds.
4156 * spu-low.c: Include filestuff.h.
4157 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4158
96d7229d
LM
41592013-08-22 Luis Machado <lgustavo@codesourcery.com>
4160
4161 * Makefile.in: Explain why ../target and ../nat are not
4162 listed as include file search paths.
4163 (linux-waitpid.o): New object file rule.
4164 * configure.srv (srv_native_linux_obj): New variable.
4165 Replace all occurrences of linux native object files with
4166 $srv_native_linux_obj.
4167 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4168 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4169 (linux_enable_event_reporting): Remove declaration.
4170 (my_waitpid): Moved to common/linux-waitpid.c.
4171 (linux_wait_for_event): Pass ptid when calling
4172 linux_enable_event_reporting.
4173 (linux_supports_tracefork_flag): Remove.
4174 (linux_enable_event_reporting): Likewise.
4175 (linux_tracefork_grandchild): Remove.
4176 (STACK_SIZE): Moved to common/linux-ptrace.c.
4177 (linux_tracefork_child): Remove.
4178 (linux_test_for_tracefork): Remove.
4179 (linux_look_up_symbols): Call linux_supports_traceclone.
4180 (initialize_low): Remove call to linux_test_for_tracefork.
4181 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4182 common/linux-ptrace.h.
4183 (PTRACE_TYPE_ARG4): Likewise.
4184 Include linux-ptrace.h.
4185
32940073
PA
41862013-08-21 Pedro Alves <palves@redhat.com>
4187
4188 * config.in: Renegerate.
4189
33b60d58 41902013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 4191
33b60d58
LM
4192 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4193 (SFILES): Remove $(srcdir)/common/target-common.c and
4194 add $(srcdir)/target/waitstatus.c.
4195 (OBS): Remove target-common.o and add waitstatus.o.
4196 (server_h): Remove $(srcdir)/../common/target-common.h and
4197 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4198 and $(srcdir)/../target/waitstatus.h.
4199 (target-common.o): Remove.
4200 (waitstatus.o): New target object file.
4201 * target.h: Do not include target-common.h and
4202 include target/resume.h, target/wait.h and
4203 target/waitstatus.h.
4204
b8e1b30e
LM
42052013-08-13 Luis Machado <lgustavo@codesourcery.com>
4206
4207 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4208 to PTRACE_TYPE_ARG3.
4209 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4210 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4211 PTRACE_TYPE_ARG4.
4212 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4213 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4214
7a60ad40
YQ
42152013-07-27 Jie Zhang <jie@codesourcery.com>
4216 Daniel Jacobowitz <dan@codesourcery.com>
4217 Yao Qi <yao@codesourcery.com>
4218
4219 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4220 (mips-linux-watch.o): New rule.
4221 (mips_linux_watch_h): New variable.
4222 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4223 srv_tgtobj.
4224 * linux-mips-low.c: Include mips-linux-watch.h.
4225 (struct arch_process_info, struct arch_lwp_info): New.
4226 (update_watch_registers_callback): New function.
4227 (mips_linux_new_process, mips_linux_new_thread) New functions.
4228 (mips_linux_prepare_to_resume, mips_insert_point): New
4229 functions.
4230 (mips_remove_point, mips_stopped_by_watchpoint): New
4231 functions.
4232 (rsp_bp_type_to_target_hw_bp_type): New function.
4233 (mips_stopped_data_address): New function.
4234 (the_low_target): Add watchpoint support functions.
4235
de6f69ad
YQ
42362013-07-27 Yao Qi <yao@codesourcery.com>
4237
4238 * i386-low.c: Include break-common.h.
4239 (enum target_hw_bp_type): Remove.
4240
3360c0bf
LM
42412013-07-24 Luis Machado <lgustavo@codesourcery.com>
4242
4243 * Makefile.in (SFILES): /common/target-common.c.
4244 (OBS): Add target-common.o.
4245 (server_h): Add $(srcdir)/../common/target-common.h.
4246 (target-common.o): New target.
4247 * server.c (queue_stop_reply_callback): Free
4248 status string after use.
4249 * target.c (target_waitstatus_to_string): Remove.
4250 * target.h: Include target-common.h.
4251 (resume_kind): Likewise.
4252 (target_waitkind): Likewise.
4253 (target_waitstatus): Likewise.
4254 (TARGET_WNOHANG): Likewise.
4255
bd885420
YQ
42562013-07-04 Yao Qi <yao@codesourcery.com>
4257
4258 * Makefile.in (host_alias): Use @host_noncanonical@.
4259 (target_alias): Use @target_noncanonical@.
4260 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4261 ACX_NONCANONICAL_HOST.
4262 * configure: Regenerated.
4263
4264 Revert:
4265 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4266
4267 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4268 * configure: Rebuild.
4269 * Makefile.in (version_host, version_target): Get from configure.
4270 (version.c): Use $(version_host) and $(version_target).
4271
17ef446e
PA
42722013-07-03 Pedro Alves <palves@redhat.com>
4273
4274 * Makefile.in (config.status): Depend on development.sh.
4275 * acinclude.m4: Include libmcheck.m4.
4276 * configure: Regenerate.
4277
7a9a7487
MG
42782013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4279
4280 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4281 attribute inside the parentheses.
4282 (winapi_DebugSetProcessKillOnExit): Ditto.
4283 (winapi_DebugBreakProcess): Ditto.
4284 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 4285
49b64de6
MG
42862013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4287
4288 * notif.h (notif_event): Add a dummy member to avoid compiler
4289 errors.
4290
d5749ee7
PA
42912013-07-01 Pedro Alves <palves@redhat.com>
4292
4293 * hostio.c (HOSTIO_PATH_MAX): Define.
4294 (require_filename, handle_open, handle_unlink, handle_readlink):
4295 Use it.
4296
d8d2a3ee
PA
42972013-07-01 Pedro Alves <palves@redhat.com>
4298
4299 * server.h: Include "pathmax.h".
4300 * linux-low.c: Don't include sys/param.h.
4301 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4302 MAXPATHLEN.
4303 * win32-low.c: Don't include sys/param.h.
4304 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4305
bc7dea8d
PA
43062013-07-01 Pedro Alves <palves@redhat.com>
4307
4308 * event-loop.c: Don't check HAVE_UNISTD_H before including
4309 <unistd.h>.
4310 * gdbreplay.c: Likewise.
4311 * remote-utils.c: Likewise.
4312 * server.c: Likewise.
4313 * configure.ac: Don't check for unistd.h.
4314 * configure: Regenerate.
4315
d6c2da54
TT
43162013-06-28 Tom Tromey <tromey@redhat.com>
4317
4318 * Makefile.in (version.c): Use version.in, not
4319 common/version.in.
4320
257b6bec
MG
43212013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4322
4323 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4324 * configure: Rebuild.
4325 * Makefile.in (version_host, version_target): Get from configure.
4326 (version.c): Use $(version_host) and $(version_target).
4327
86ebe149
DK
43282013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4329
4330 Fix trace-status to output user name without trailing colon.
4331 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4332
f30aa5af
DK
43332013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4334
4335 Fix trace-status to output proper start-time and stop-time.
4336 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4337 output start time and stop time in hex as gdb expects.
4338
28a93511
YQ
43392013-06-26 Pedro Alves <pedro@codesourcery.com>
4340
4341 * tracepoint.c (build_traceframe_info_xml): Output trace state
4342 variables present in the trace buffer.
4343
01208463
TT
43442013-06-24 Tom Tromey <tromey@redhat.com>
4345
4346 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4347 create-version.sh.
4348 (version.o): Remove.
4349 * gdbreplay.c: Include version.h.
4350 (version, host_name): Don't declare.
4351 * server.h: Include version.h.
4352 (version, host_name): Don't declare.
4353
760256f9
PA
43542013-06-12 Pedro Alves <palves@redhat.com>
4355
4356 * linux-x86-low.c (linux_is_elf64): Delete global.
4357 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4358 with local linux_pid_exe_is_elf_64_file use.
4359
030031ee
PA
43602013-06-11 Pedro Alves <palves@redhat.com>
4361
4362 * linux-low.c (regset_disabled, disable_regset): New functions.
4363 (regsets_fetch_inferior_registers)
4364 (regsets_store_inferior_registers): Use them.
4365 (initialize_regsets_info); Don't allocate the disabled_regsets
4366 array here.
4367 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4368 comment.
4369
5da6eb0a
PA
43702013-06-11 Pedro Alves <palves@redhat.com>
4371
4372 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4373 xmalloc.
4374
7e5aaa09
PA
43752013-06-11 Pedro Alves <palves@redhat.com>
4376
4377 * linux-x86-low.c (initialize_low_arch): Call
4378 init_registers_x32_avx_linux.
4379
d878444c
JK
43802013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4381
4382 Fix compatibility with Android Bionic.
4383 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4384 it is not empty.
4385
3aee8918
PA
43862013-06-07 Pedro Alves <palves@redhat.com>
4387
5f2b57b5 4388 PR server/14823
3aee8918
PA
4389 * Makefile.in (OBS): Add tdesc.o.
4390 (IPA_OBJS): Add tdesc-ipa.o.
4391 (tdesc-ipa.o): New rule.
4392 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4393 interface.
4394 * linux-low.c (new_inferior): Delete.
4395 (disabled_regsets, num_regsets): Delete.
4396 (linux_add_process): Adjust to set the new per-process
4397 new_inferior flag.
4398 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4399 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4400 was a stop. When calling arch_setup, switch the current inferior
4401 to the thread that got an event.
4402 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4403 (regsets_fetch_inferior_registers)
4404 (regsets_store_inferior_registers): New regsets_info parameter.
4405 Adjust to use it.
4406 (linux_register_in_regsets): New regs_info parameter. Adjust to
4407 use it.
4408 (register_addr, fetch_register, store_register): New usrregs_info
4409 parameter. Adjust to use it.
4410 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4411 parameter regs_info. Adjust to use it.
4412 (linux_fetch_registers): Get the current inferior's regs_info, and
4413 adjust to use it.
4414 (linux_store_registers): Ditto.
4415 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4416 (initialize_low): Don't initialize the target_regsets here. Call
4417 initialize_low_arch.
4418 * linux-low.h (target_regsets): Delete declaration.
4419 (struct regsets_info): New.
4420 (struct usrregs_info): New.
4421 (struct regs_info): New.
4422 (struct process_info_private) <new_inferior>: New field.
4423 (struct linux_target_ops): Delete the num_regs, regmap, and
4424 regset_bitmap fields. New field regs_info.
4425 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4426 * i387-fp.c (num_xmm_registers): Delete.
4427 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4428 calls to new interface.
4429 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4430 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4431 Infer the number of xmm registers from the regcache's target
4432 description.
4433 * i387-fp.h (num_xmm_registers): Delete.
4434 * inferiors.c (add_thread): Don't install the thread's regcache
4435 here.
4436 * proc-service.c (gregset_info): Fetch the current inferior's
4437 regs_info. Adjust to use it.
4438 * regcache.c: Include tdesc.h.
4439 (register_bytes, reg_defs, num_registers)
4440 (gdbserver_expedite_regs): Delete.
4441 (get_thread_regcache): If the thread doesn't have a regcache yet,
4442 create one, instead of aborting gdbserver.
4443 (regcache_invalidate_one): Rename to ...
4444 (regcache_invalidate_thread): ... this.
4445 (regcache_invalidate_one): New.
4446 (regcache_invalidate): Only invalidate registers of the current
4447 process.
4448 (init_register_cache): Add target_desc parameter, and use it.
4449 (new_register_cache): Ditto. Assert the target description has a
4450 non zero registers_size.
4451 (regcache_cpy): Add assertions. Adjust.
4452 (realloc_register_cache, set_register_cache): Delete.
4453 (registers_to_string, registers_from_string): Adjust.
4454 (find_register_by_name, find_regno, find_register_by_number)
4455 (register_cache_size): Add target_desc parameter, and use it.
4456 (free_register_cache_thread, free_register_cache_thread_one)
4457 (regcache_release, register_cache_size): New.
4458 (register_size): Add target_desc parameter, and use it.
4459 (register_data, supply_register, supply_register_zeroed)
4460 (supply_regblock, supply_register_by_name, collect_register)
4461 (collect_register_as_string, collect_register_by_name): Adjust.
4462 * regcache.h (struct target_desc): Forward declare.
4463 (struct regcache) <tdesc>: New field.
4464 (init_register_cache, new_register_cache): Add target_desc
4465 parameter.
4466 (regcache_invalidate_thread): Declare.
4467 (regcache_invalidate_one): Delete declaration.
4468 (regcache_release): Declare.
4469 (find_register_by_number, register_cache_size, register_size)
4470 (find_regno): Add target_desc parameter.
4471 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4472 declarations.
4473 * remote-utils.c: Include tdesc.h.
4474 (outreg, prepare_resume_reply): Adjust.
4475 * server.c: Include tdesc.h.
4476 (gdbserver_xmltarget): Delete declaration.
4477 (get_features_xml, process_serial_event): Adjust.
4478 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4479 declare.
4480 (struct process_info) <tdesc>: New field.
4481 (ipa_tdesc): Declare.
4482 * tdesc.c: New file.
4483 * tdesc.h: New file.
4484 * tracepoint.c: Include tdesc.h.
4485 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4486 (get_context_regcache): Adjust to pass ipa_tdesc down.
4487 (do_action_at_tracepoint): Adjust to get the register cache size
4488 from the context regcache's description.
4489 (traceframe_walk_blocks): Adjust to get the register cache size
4490 from the current trace frame's description.
4491 (traceframe_get_pc): Adjust to get current trace frame's
4492 description and pass it down.
4493 (gdb_collect): Adjust to get the register cache size from the
4494 IPA's description.
4495 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4496 (gdbserver_xmltarget): Delete.
4497 (initialize_low_tracepoint): Set the ipa's target description.
4498 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4499 (initialize_low_tracepoint): Set the ipa's target description.
4500 * linux-x86-low.c: Include tdesc.h.
4501 [__x86_64__] (is_64bit_tdesc): New.
4502 (ps_get_thread_area, x86_get_thread_area): Use it.
4503 (i386_cannot_store_register): Rename to ...
4504 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4505 (i386_cannot_fetch_register): Rename to ...
4506 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4507 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4508 to new interface.
4509 (target_regsets): Rename to ...
4510 (x86_regsets): ... this.
4511 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4512 interface.
4513 (x86_siginfo_fixup): Use is_64bit_tdesc.
4514 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4515 (tdesc_x32_avx_linux, tdesc_x32_linux)
4516 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4517 Declare.
4518 (x86_linux_update_xmltarget): Delete.
4519 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4520 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4521 (AMD64_LINUX_USER64_CS): New.
4522 (x86_linux_read_description): New, based on
4523 x86_linux_update_xmltarget.
4524 (same_process_callback): New.
4525 (x86_arch_setup_process_callback): New.
4526 (x86_linux_update_xmltarget): New.
4527 (x86_regsets_info): New.
4528 (amd64_linux_regs_info): New.
4529 (i386_linux_usrregs_info): New.
4530 (i386_linux_regs_info): New.
4531 (x86_linux_regs_info): New.
4532 (x86_arch_setup): Reimplement.
4533 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4534 (x86_emit_ops): Ditto.
4535 (the_low_target): Adjust. Install x86_linux_regs_info,
4536 x86_cannot_fetch_register, and x86_cannot_store_register.
4537 (initialize_low_arch): New.
4538 * linux-ia64-low.c (tdesc_ia64): Declare.
4539 (ia64_fetch_register): Adjust.
4540 (ia64_usrregs_info, regs_info): New globals.
4541 (ia64_regs_info): New function.
4542 (the_low_target): Adjust.
4543 (initialize_low_arch): New function.
4544 * linux-sparc-low.c (tdesc_sparc64): Declare.
4545 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4546 Adjust.
4547 (sparc_arch_setup): New function.
4548 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4549 (the_low_target): Adjust.
4550 (initialize_low_arch): New function.
4551 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4552 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4553 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4554 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4555 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4556 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4557 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4558 (tdesc_powerpc_isa205_vsx64l): Declare.
4559 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4560 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4561 (ppc_set_pc, ppc_get_hwcap): Adjust.
4562 (ppc_usrregs_info): Forward declare.
4563 (!__powerpc64__) ppc_regmap_adjusted: New global.
4564 (ppc_arch_setup): Adjust to the current process'es target
4565 description.
4566 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4567 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4568 (ppc_store_evrregset): Adjust.
4569 (target_regsets): Rename to ...
4570 (ppc_regsets): ... this, and make static.
4571 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4572 (ppc_regs_info): New function.
4573 (the_low_target): Adjust.
4574 (initialize_low_arch): New function.
4575 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4576 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4577 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4578 (tdesc_s390x_linux64v2): Declare.
4579 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4580 (s390_fill_gregset, s390_store_last_break): Adjust.
4581 (target_regsets): Rename to ...
4582 (s390_regsets): ... this, and make static.
4583 (s390_get_pc, s390_set_pc): Adjust.
4584 (s390_get_hwcap): New target_desc parameter, and use it.
4585 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4586 (s390_arch_setup): Adjust to set the current process'es target
4587 description. Don't adjust the regmap.
4588 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4589 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4590 (regs_info_3264): New globals.
4591 (s390_regs_info): New function.
4592 (the_low_target): Adjust.
4593 (initialize_low_arch): New function.
4594 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4595 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4596 [__mips64] (init_registers_mips_linux)
4597 (init_registers_mips_dsp_linux): Delete defines.
4598 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4599 (have_dsp): New global.
4600 (mips_read_description): New, based on mips_arch_setup.
4601 (mips_arch_setup): Reimplement.
4602 (get_usrregs_info): New function.
4603 (mips_cannot_fetch_register, mips_cannot_store_register)
4604 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4605 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4606 (target_regsets): Rename to ...
4607 (mips_regsets): ... this, and make static.
4608 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4609 (dsp_regs_info, regs_info): New globals.
4610 (mips_regs_info): New function.
4611 (the_low_target): Adjust.
4612 (initialize_low_arch): New function.
4613 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4614 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4615 Declare.
4616 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4617 (arm_read_description): New, with bits factored from
4618 arm_arch_setup.
4619 (arm_arch_setup): Reimplement.
4620 (target_regsets): Rename to ...
4621 (arm_regsets): ... this, and make static.
4622 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4623 (arm_regs_info): New function.
4624 (the_low_target): Adjust.
4625 (initialize_low_arch): New function.
4626 * linux-m68k-low.c (tdesc_m68k): Declare.
4627 (target_regsets): Rename to ...
4628 (m68k_regsets): ... this, and make static.
4629 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4630 (m68k_regs_info): New function.
4631 (m68k_arch_setup): New function.
4632 (the_low_target): Adjust.
4633 (initialize_low_arch): New function.
4634 * linux-sh-low.c (tdesc_sharch): Declare.
4635 (target_regsets): Rename to ...
4636 (sh_regsets): ... this, and make static.
4637 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4638 (sh_regs_info, sh_arch_setup): New functions.
4639 (the_low_target): Adjust.
4640 (initialize_low_arch): New function.
4641 * linux-bfin-low.c (tdesc_bfin): Declare.
4642 (bfin_arch_setup): New function.
4643 (bfin_usrregs_info, regs_info): New globals.
4644 (bfin_regs_info): New function.
4645 (the_low_target): Adjust.
4646 (initialize_low_arch): New function.
4647 * linux-cris-low.c (tdesc_cris): Declare.
4648 (cris_arch_setup): New function.
4649 (cris_usrregs_info, regs_info): New globals.
4650 (cris_regs_info): New function.
4651 (the_low_target): Adjust.
4652 (initialize_low_arch): New function.
4653 * linux-cris-low.c (tdesc_crisv32): Declare.
4654 (cris_arch_setup): New function.
4655 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4656 (cris_regs_info): New function.
4657 (the_low_target): Adjust.
4658 (initialize_low_arch): New function.
4659 * linux-m32r-low.c (tdesc_m32r): Declare.
4660 (m32r_arch_setup): New function.
4661 (m32r_usrregs_info, regs_info): New globals.
4662 (m32r_regs_info): Adjust.
4663 (initialize_low_arch): New function.
4664 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4665 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4666 (tic6x_usrregs_info): Forward declare.
4667 (tic6x_read_description): New function, based on ...
4668 (tic6x_arch_setup): ... this. Reimplement.
4669 (target_regsets): Rename to ...
4670 (tic6x_regsets): ... this, and make static.
4671 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4672 (tic6x_regs_info): New function.
4673 (the_low_target): Adjust.
4674 (initialize_low_arch): New function.
4675 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4676 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4677 (target_regsets): Rename to ...
4678 (xtensa_regsets): ... this, and make static.
4679 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4680 globals.
4681 (xtensa_arch_setup, xtensa_regs_info): New functions.
4682 (the_low_target): Adjust.
4683 (initialize_low_arch): New function.
4684 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4685 (nios2_arch_setup): Set the current process'es tdesc.
4686 (target_regsets): Rename to ...
4687 (nios2_regsets): ... this.
4688 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4689 (nios2_regs_info): New function.
4690 (the_low_target): Adjust.
4691 (initialize_low_arch): New function.
a261b8f5
PA
4692 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4693 (aarch64_arch_setup): Set the current process'es tdesc.
4694 (target_regsets): Rename to ...
4695 (aarch64_regsets): ... this.
4696 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4697 (aarch64_regs_info): New function.
4698 (the_low_target): Adjust.
4699 (initialize_low_arch): New function.
3aee8918
PA
4700 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4701 globals.
4702 (target_regsets): Rename to ...
4703 (tile_regsets): ... this.
4704 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4705 (tile_regs_info): New function.
4706 (tile_arch_setup): Set the current process'es tdesc.
4707 (the_low_target): Adjust.
4708 (initialize_low_arch): New function.
4709 * spu-low.c (tdesc_spu): Declare.
4710 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4711 * win32-arm-low.c (tdesc_arm): Declare.
4712 (arm_arch_setup): New function.
4713 (the_low_target): Install arm_arch_setup instead of
4714 init_registers_arm.
4715 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4716 (init_windows_x86): Rename to ...
4717 (i386_arch_setup): ... this. Set `win32_tdesc'.
4718 (the_low_target): Adjust.
4719 * win32-low.c (win32_tdesc): New global.
4720 (child_add_thread): Don't create the thread cache here.
4721 (do_initial_child_stuff): Set the new process'es tdesc.
4722 * win32-low.h (struct target_desc): Forward declare.
4723 (win32_tdesc): Declare.
4724 * lynx-i386-low.c (tdesc_i386): Declare global.
4725 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4726 * lynx-low.c (lynx_tdesc): New global.
4727 (lynx_add_process): Set the new process'es tdesc.
4728 * lynx-low.h (struct target_desc): Forward declare.
4729 (lynx_tdesc): Declare global.
4730 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4731 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4732 * nto-low.c (nto_tdesc): New global.
4733 (do_attach): Set the new process'es tdesc.
4734 * nto-low.h (struct target_desc): Forward declare.
4735 (nto_tdesc): Declare.
4736 * nto-x86-low.c (tdesc_i386): Declare.
4737 (nto_x86_arch_setup): Set `nto_tdesc'.
4738
b1fbec62
GB
47392013-06-04 Gary Benson <gbenson@redhat.com>
4740
4741 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4742 to qSupported response when appropriate.
4743 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4744 with nonzero-length annex.
4745 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4746 arguments supplied in annex.
4747
d1ec4ce7
DE
47482013-05-31 Doug Evans <dje@google.com>
4749
ac44adcb 4750 PR server/15594
d1ec4ce7
DE
4751 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4752 64 bits in 64-cross-32 environment.
4753
9b25f2d3
PA
47542013-05-28 Pedro Alves <palves@redhat.com>
4755
4756 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4757 (aarch64-without-fpu.c): Delete rule.
4758 * configure.srv (aarch64*-*-linux*): Remove references to
4759 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4760 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4761 declaration.
4762
6740dc9c
PA
47632013-05-24 Pedro Alves <palves@redhat.com>
4764
4765 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4766 instead of strchr/decode_address. Error if the range isn't split
4767 with a ','. Don't assume there's be a ':' in the action.
4768
c2d6af84
PA
47692013-05-23 Yao Qi <yao@codesourcery.com>
4770 Pedro Alves <palves@redhat.com>
4771
4772 * linux-low.c (lwp_in_step_range): New function.
4773 (linux_wait_1): If the thread was range stepping and stopped
4774 outside the stepping range, report the stop to GDB. Otherwise,
4775 continue stepping. Add range stepping debug output.
4776 (linux_set_resume_request): Copy the step range from the resume
4777 request to the lwp.
4778 (linux_supports_range_stepping): New.
4779 (linux_target_ops) <supports_range_stepping>: Set to
4780 linux_supports_range_stepping.
4781 * linux-low.h (struct linux_target_ops)
4782 <supports_range_stepping>: New field.
4783 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4784 * linux-x86-low.c (x86_supports_range_stepping): New.
4785 (the_low_target) <supports_range_stepping>: Set to
4786 x86_supports_range_stepping.
4787 * server.c (handle_v_cont): Handle 'r' action.
4788 (handle_v_requests): Append ";r" if the target supports range
4789 stepping.
4790 * target.h (struct thread_resume) <step_range_start,
4791 step_range_end>: New fields.
4792 (struct target_ops) <supports_range_stepping>:
4793 New field.
4794 (target_supports_range_stepping): New macro.
4795
58794e1a
JB
47962013-05-17 Joel Brobecker <brobecker@adacore.com>
4797
4798 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4799 confusion in comment.
4800
d631c5a7
JB
48012013-05-17 Joel Brobecker <brobecker@adacore.com>
4802
4803 * lynx-low.c (struct process_info_private): New type.
4804 (lynx_add_process): New function.
4805 (lynx_create_inferior, lynx_attach): Replace calls to
4806 add_process by calls to lynx_add_process.
4807 (lynx_resume): If PTID is null, then try using
4808 current_process()->private->last_wait_event_ptid.
4809 Add comments.
4810 (lynx_clear_inferiors): Delete. The contents of that function
4811 has been inlined in lynx_mourn;
4812 (lynx_wait_1): Save the ptid in the process's private data.
4813 (lynx_mourn): Free the process' private data. Replace call
4814 to lynx_clear_inferiors by call to clear_inferiors.
4815
96f7a20f
YQ
48162013-05-17 Yao Qi <yao@codesourcery.com>
4817
4818 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4819 the right place.
4820
db0dfaa0
LM
48212013-05-16 Luis Machado <lgustavo@codesourcery.com>
4822
4823 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4824 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4825 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4826 PT_TEXT_END_ADDR guards. Update comments.
4827 (linux_target_op) <read_offsets>: Conditionally define to
4828 linux_read_offsets if the target is UCLIBC and if it defines
4829 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4830
68f5f838
SL
48312013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4832 Andrew Jenner <andrew@codesourcery.com>
4833
4834 * Makefile.in (SFILES): Add linux-nios2-low.c.
4835 (clean): Add action to delete nios2-linux.c.
4836 (nios2-linux.c): New rule.
4837 * configure.srv: Add nios2*-*-linux*.
4838 * linux-nios2-low.c: New.
4839
1ebff1fd
HAQ
48402013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4841
4842 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4843
f6150862
HZ
48442013-04-25 Hui Zhu <hui@codesourcery.com>
4845
4846 PR gdb/15186
f6150862
HZ
4847 * ax.c (ax_printf): Add fflush.
4848
614c279d
TT
48492013-04-22 Tom Tromey <tromey@redhat.com>
4850
4851 * Makefile.in (SFILES): Add filestuff.c.
4852 (OBS): Add filestuff.o.
4853 (filestuff.o): New target.
4854 * config.in, configure: Rebuild.
4855 * configure.ac: Check for fdwalk, pipe2.
4856
7d4e5717
PA
48572013-04-17 Pedro Alves <palves@redhat.com>
4858
4859 * configure.ac (USE_THREAD_DB): Delete variable.
4860 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4861 Don't AC_SUBST USE_THREAD_DB.
4862 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4863 * config.in, configure: Regenerate.
4864
d5c93e41
PA
48652013-04-16 Pedro Alves <palves@redhat.com>
4866
4867 * linux-low.h (struct lwp_info) <thread_known>: Move under
4868 the USE_THREAD_DB #ifdef.
4869
04f5fe89
PA
48702013-04-16 Pedro Alves <palves@redhat.com>
4871
4872 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4873 (linux-low.o): Delete rule.
4874 * linux-low.h: Always include "gdb_thread_db.h" instead of
4875 conditionally including thread_db.h.
4876 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4877 HAVE_THREAD_DB_H.
4878
480b27bf
JK
48792013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4880
4881 * Makefile.in (install-only): Fix make install regression.
4882
43662968
JK
48832013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4884
4885 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4886 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4887 installation.
4888 * gdbserver.1: Remove.
4889
3e74e146
PA
48902013-03-22 Pedro Alves <palves@redhat.com>
4891
4892 * linux-low.c (handle_extended_wait): Don't call
4893 linux_enable_event_reporting.
4894
a8347a2a
TT
48952013-03-15 Tony Theodore <tonyt@logyst.com>
4896
4897 PR build/9098:
4898 * Makefile.in (SHELL): Use @SHELL@.
4899
eeb56fa7
SDJ
49002013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4901
4902 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4903 compiler warning.
4904
4fa7e2ff
JB
49052013-03-13 Joel Brobecker <brobecker@adacore.com>
4906
4907 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4908 Remove extraneous NULL element.
4909
8ddb1965
YQ
49102013-03-13 Yao Qi <yao@codesourcery.com>
4911
4912 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4913 'V' block in trace frame.
4914
9accd112
MM
49152013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4916
4917 * target.h (struct target_ops): Add btrace ops.
4918 (target_supports_btrace): New macro.
4919 (target_enable_btrace): New macro.
4920 (target_disable_btrace): New macro.
4921 (target_read_btrace): New macro.
4922 * gdbthread.h (struct thread_info): Add btrace field.
4923 * server.c: Include btrace-common.h.
4924 (handle_btrace_general_set): New function.
4925 (handle_btrace_enable): New function.
4926 (handle_btrace_disable): New function.
4927 (handle_general_set): Call handle_btrace_general_set.
4928 (handle_qxfer_btrace): New function.
4929 (struct qxfer qxfer_packets[]): Add btrace entry.
4930 * inferiors.c (remove_thread): Disable btrace.
4931 * linux-low: Include linux-btrace.h.
4932 (linux_low_enable_btrace): New function.
4933 (linux_low_read_btrace): New function.
4934 (linux_target_ops): Add btrace ops.
4935 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4936 Add srv_linux_btrace=yes.
4937 (x86_64-*-linux*): Add linux-btrace.o.
4938 Add srv_linux_btrace=yes.
4939 * configure.ac: Define HAVE_LINUX_BTRACE.
4940 * config.in: Regenerated.
4941 * configure: Regenerated.
4942
5cc22e4c
MM
49432013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4944
4945 * server.c (handle_qxfer): Preserve error message if -3 is
4946 returned.
4947 (qxfer): Document the -3 return value.
4948
7c97f91e
MM
49492013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4950
4951 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4952 (linux_btrace_h): New variable.
4953 (linux-btrace.o): New rule.
4954
be9a119c 49552013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
4956 Hafiz Abid Qadeer <abidh@codesourcery.com>
4957
4958 * tracepoint.c (trace_buffer_size): New global.
4959 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4960 (init_trace_buffer): Change to one-argument function. Allocate
4961 trace buffer memory.
4962 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4963 handle QTBuffer:size packet.
4964 (cmd_bigqtbuffer_size): New function.
4965 (initialize_tracepoint): Call init_trace_buffer with
4966 DEFAULT_TRACE_BUFFER_SIZE.
4967 * server.c (handle_query): Add QTBuffer:size in the
4968 supported packets.
4969
e64f7499
YQ
49702013-03-07 Yao Qi <yao@codesourcery.com>
4971
4972 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4973 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4974 of -1.
4975 (cmd_qtsp): Adjust condition. Do post increment.
4976 Set cur_action and cur_step_action back to 0.
4977
f0ae6fc3
PA
49782013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
4979
4980 PR server/15236
4981 * linux-low.c (linux_write_memory): Return early success if LEN is
4982 zero.
4983
b5b0b0af
CV
49842013-03-05 Corinna Vinschen <vinschen@redhat.de>
4985
334ad4a8 4986 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 4987
589bc927
TT
49882013-02-28 Tom Tromey <tromey@redhat.com>
4989
4990 * configure.ac: Invoke AC_SYS_LARGEFILE.
4991 * configure, config.in: Rebuild.
4992
dfe07582
CV
49932013-02-28 Corinna Vinschen <vinschen@redhat.com>
4994
4995 * win32-low.c: Throughout, fix format strings and casts of
4996 printf-like functions to avoid type related warnings on all
4997 platforms.
4998 (get_child_debug_event): Print dwDebugEventCode as hex since
4999 that's how it's usually documented.
5000
736cd585
YQ
50012013-02-28 Yao Qi <yao@codesourcery.com>
5002
5003 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5004 pulongest.
5005
e1f58301
JW
50062013-02-27 Jiong Wang <jiwang@tilera.com>
5007
5008 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5009 (reg-tilegx32.c): New rule.
5010 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5011 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5012 different register info initializer according to elf class.
5013 (init_registers_tilgx32): New function. The tilegx32 register info
5014 initializer.
5015 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5016 (tile_store_gregset): Likewise.
5017
d171ca78
YQ
50182013-02-27 Yao Qi <yao@codesourcery.com>
5019
5020 * server.c (process_point_options): Print debug message when
5021 debug_threads is true.
5022
282bbdf3
YQ
50232013-02-26 Yao Qi <yao@codesourcery.com>
5024
5025 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5026
aca22551
PA
50272013-02-19 Pedro Alves <palves@redhat.com>
5028 Kai Tietz <ktietz@redhat.com>
5029
5030 PR gdb/15161
5031
5032 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5033 instead of strtoul to extract address from packet.
5034 (process_serial_event) <'z'>: Likewise.
5035
4f3cee1c
YQ
50362013-02-18 Yao Qi <yao@codesourcery.com>
5037
5038 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5039
8e1d55a3
PA
50402013-02-14 Pedro Alves <palves@redhat.com>
5041
5042 Plug memory leak.
5043
5044 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5045 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5046
458820da
PA
50472013-02-14 Pedro Alves <palves@redhat.com>
5048
5049 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5050
baea0dae
PA
50512013-02-14 Pedro Alves <palves@redhat.com>
5052
5053 * tracepoint.c (save_string): Delete.
5054 (add_tracepoint_action): Use savestring instead of save_string.
5055
0b1afbb3
PA
50562013-02-12 Pedro Alves <palves@redhat.com>
5057
5058 * linux-xtensa-low.c: Ditto.
5059 * xtensa-xtregs.c: Ditto.
5060
8a4ac37e
PA
50612013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5062
5063 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5064 thread_db.
5065
148de6bb
MS
50662013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5067
5068 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5069 aarch64_num_wp_regs and aarch64_num_bp_regs to
5070 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5071
55fac6e0
MS
50722013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5073
5074 * linux-aarch64-low.c (ps_get_thread_area): Replace
5075 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5076
176eb98c
MS
50772013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5078 Marcus Shawcroft <marcus.shawcroft@arm.com>
5079 Nigel Stephens <nigel.stephens@arm.com>
5080 Yufeng Zhang <yufeng.zhang@arm.com>
5081
5082 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5083 (aarch64.c, aarch64-without-fpu.c): New targets.
5084 * configure.srv (aarch64*-*-linux*): New.
5085 * linux-aarch64-low.c: New file.
5086
56f7af9c
MS
50872013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5088
43aaf8b6 5089 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
5090 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5091 (dequeue_one_deferred_signal, linux_resume_one_thread)
5092 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5093 (linux_tracefork_grandchild, linux_test_for_tracefork)
5094 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5095 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5096 where the argument is 0.
5097
60f662b0
YQ
50982013-01-25 Yao Qi <yao@codesourcery.com>
5099
5100 * event-loop.c: Include "queue.h".
5101 (gdb_event_p): New typedef.
5102 (struct gdb_event) <next_event>: Remove.
5103 (event_queue): Change to QUEUE(gdb_event_p).
5104 (async_queue_event): Remove.
5105 (gdb_event_xfree): New.
5106 (initialize_event_loop): New.
5107 (process_event): Use API from QUEUE.
5108 (wait_for_event): Likewise.
5109 * server.c (main): Call initialize_event_loop.
5110 * server.h (initialize_event_loop): Declare.
5111
5ae4861a
YQ
51122013-01-18 Yao Qi <yao@codesourcery.com>
5113
5114 * ax.h (struct eval_agent_expr_context): New.
5115 (gdb_eval_agent_expr): Update declaration.
5116 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5117 TFRAME. Add new argument CTX.
5118 * server.h (struct eval_agent_expr_context): Declare.
5119 (agent_mem_read, agent_tsv_read): Update declaration.
5120 (agent_mem_read_string): Likewise.
5121 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5122 (add_traceframe_block): Add new argument TPOINT.
5123 Increase TPOINT->traceframe_usage.
5124 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5125 eval_tracepoint_agent_expr.
5126 (condition_true_at_tracepoint): Likewise.
5127 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5128 (agent_mem_read_string, agent_tsv_read): Likewise.
5129
85e00e85
YQ
51302013-01-16 Yao Qi <yao@codesourcery.com>
5131
5132 * linux-low.c (linux_resume_one_lwp): Don't check
5133 'lwp->bp_reinsert != 0'.
5134
4039cf45
JB
51352013-01-07 Joel Brobecker <brobecker@adacore.com>
5136 Pedro Alves <palves@redhat.com>
5137
5138 * lynx-low.c (ptrace_request_to_str): Define a temporary
5139 macro and use it to simplify this function's implementation.
5140
9044dee2
JB
51412013-01-07 Joel Brobecker <brobecker@adacore.com>
5142
5143 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5144 sets errno.
5145
e6352c8f
JB
51462013-01-07 Joel Brobecker <brobecker@adacore.com>
5147
5148 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5149
50681a27
JB
51502013-01-07 Joel Brobecker <brobecker@adacore.com>
5151
5152 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5153
3f6e77ef
JB
51542013-01-07 Joel Brobecker <brobecker@adacore.com>
5155
5156 * lynx-low.c (lynx_resume): Use the resume_info parameter
5157 to determine the ptid for the lynx_ptrace call, unless
5158 it is equal to minus_one_ptid, in which case we use the
5159 ptid of the current_inferior.
5160 (lynx_wait_1): After having received a thread create/exit
5161 event, resume the inferior's execution using the signaling
5162 thread's ptid, rather than the old ptid.
5163
7fda33ae
JB
51642013-01-07 Joel Brobecker <brobecker@adacore.com>
5165
5166 * lynx-low.c (lynx_resume): Delete variable ret.
5167
b9786c74
JB
51682013-01-01 Joel Brobecker <brobecker@adacore.com>
5169
5170 * gdbreplay.c (gdbreplay_version): Update copyright year.
5171 * server.c (gdbserver_version): Likewise.
5172
8b93d60f
JB
51732012-12-17 Joel Brobecker <brobecker@adacore.com>
5174
5175 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5176 new thread.
5177
037335a7
JB
51782012-12-17 Joel Brobecker <brobecker@adacore.com>
5179
5180 * lynx-low.c (ptrace_request_to_str): Add handling for
5181 PTRACE_GETTRACESIG.
5182
52d4cbd8
JB
51832012-12-17 Joel Brobecker <brobecker@adacore.com>
5184
5185 * lynx-low.c (lynx_attach): Delete variable new_process.
5186
ab8f6ca9
JB
51872012-12-17 Joel Brobecker <brobecker@adacore.com>
5188
5189 * lynx-low.c (lynx_create_inferior): Delete variable
5190 new_process.
5191
78cbc024
JB
51922012-12-17 Joel Brobecker <brobecker@adacore.com>
5193
5194 * lynx-low.c (ptrace_request_to_str): Do not handle
5195 PTRACE_GETTHREADLIST if this macro does not exist.
5196
14a00470
YQ
51972012-12-15 Yao Qi <yao@codesourcery.com>
5198
5199 * Makefile.in (OBS): Add notif.o.
5200 * notif.c, notif.h: New.
5201 * server.c: Include "notif.h".
5202 (struct vstop_notif) <next>: Remove.
5203 <base>: New field.
5204 (queue_stop_reply): Update.
5205 (push_event, send_next_stop_reply): Remove.
5206 (discard_queued_stop_replies): Update.
5207 (notif_stop): New variable.
5208 (handle_v_stopped): Remove.
5209 (handle_v_requests): Don't call handle_v_stopped. Call
5210 handle_ack_notif instead.
5211 (queue_stop_reply_callback): Call notif_event_enque instead
5212 of queue_stop_reply.
5213 (handle_status): Don't call send_next_stop_reply, call
5214 notif_write_event instead.
5215 (kill_inferior_callback): Likewise.
5216 (detach_or_kill_inferior_callback): Likewise.
5217 (main): Call initialize_notif.
5218 (process_serial_event): Call QUEUE_is_empty.
5219 (handle_target_event): Call notif_push instead of push event.
5220 * server.h (push_event): Remove declaration.
5221
61c125b9
TT
52222012-12-10 Tom Tromey <tromey@redhat.com>
5223
5224 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5225 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5226 macros.
5227 (.c.o): Rewrite.
5228 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5229 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5230 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5231 (amd64-linux-ipa.o, ax.o): Rewrite.
5232 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5233 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5234 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5235 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5236 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5237 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5238 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5239 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5240 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5241 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5242 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5243 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5244 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5245 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5246 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5247 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5248 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5249 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5250 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5251 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5252 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5253 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5254 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5255 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5256 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5257 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5258 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5259 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5260 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5261 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5262 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5263 (reg-tilegx.o): Remove.
5264 (all_object_files): New macro.
5265 Include .deps files.
5266 * aclocal.m4, configure: Rebuild.
5267 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5268 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5269 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5270
e90e9ad9
TT
52712012-12-05 Tom Tromey <tromey@redhat.com>
5272
5273 PR gdb/14917:
5274 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5275
02d403bf 52762012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
5277
5278 * configure.ac: Check for linux/perf_event.h.
5279 * config.in: Regenerated.
5280 * configure: Regenerated.
5281
0270a750
PA
52822012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5283
5284 * hostio.c (handle_readlink): Decrease buffer size
5285 parameter passed to readlink by one byte.
5286
8c29b58e
YQ
52872012-11-26 Yao Qi <yao@codesourcery.com>
5288
5289 * configure.ac (build_warnings): Append '-Wempty-body'.
5290 * configure: Regenerated.
5291 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5292 body.
5293
8bdce1ff
PM
52942012-11-15 Pierre Muller <muller@sourceware.org>
5295
5296 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5297 * config.in: Regenerate.
5298 * configure: Regenerate.
5299 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5300 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5301 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5302 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5303 header.
5304 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5305 instead of <sys/wait.h> header.
5306 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5307
02d403bf 53082012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
5309
5310 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5311 (various make rules): Remove -DGDBSERVER
5312
fbd5db48
YQ
53132012-11-09 Yao Qi <yao@codesourcery.com>
5314
5315 * spu-low.c (current_ptid): Move it to ..
5316 * gdbthread.h: ... here. New.
5317 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5318 * server.c (myresume, process_serial_event): Likewise.
5319 * thread-db.c (thread_db_find_new_threads): Likewise.
5320 * tracepoint.c (run_inferior_command): Likewise.
5321
b3dc46ff
AB
53222012-10-01 Andrew Burgess <aburgess@broadcom.com>
5323
5324 * server.c (handle_search_memory_1): Include access length in
5325 warning message.
5326
07c04788
HPN
53272012-09-05 Michael Brandt <michael.brandt@axis.com>
5328
5329 * linux-crisv32-low.c: Fix compile errors.
5330
918d227b
YQ
53312012-09-04 Yao Qi <yao@codesourcery.com>
5332
5333 * tracepoint.c (cmd_qtsv): Adjust debug message.
5334 Don't check CUR_TPOINT.
5335
18c1b81a
YQ
53362012-08-28 Yao Qi <yao@codesourcery.com>
5337
5338 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5339 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5340 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5341 Remove declarations of xmalloc, xreallloc, xstrdup and
5342 freeargv.
5343 * Makefile.in (libiberty_h): New.
5344 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5345 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5346
dc82f37b
YQ
53472012-08-23 Yao Qi <yao@codesourcery.com>
5348
5349 * server.h: Remove declaration of 'xsnprintf'.
5350
406b1477
KS
53512012-08-22 Keith Seitz <keiths@redhat.com>
5352
5353 * server.h: Include build-gnulib-gbserver/config.h.
5354 * gdbreplay.c: Likewise.
5355
e6712ff1
DE
53562012-08-08 Doug Evans <dje@google.com>
5357
5358 * Makefile.in (SFILES): Add gdb_vecs.c.
5359 (OBS): Add gdb_vecs.o.
5360 (gdb_vecs_h, host_defs_h): New variables.
5361 (thread-db.o): Add $(gdb_vecs_h) dependency.
5362 (gdb_vecs.o): New rule.
5363 * thread-db.c: #include "gdb_vecs.h".
5364 (thread_db_load_search): Use a vector to iterate over path elements.
5365 Handle text appearing after "$pdir".
5366
5367 * configure.ac: Add check for strstr.
5368 * config.in: Regenerate.
5369 * configure: Regenerate.
5370
7c3270ae
UW
53712012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5372
5373 * hostio.c (handle_pread): If pread fails, fall back to attempting
5374 lseek/read.
5375 (handle_pwrite): Likewise for pwrite.
5376
b62e2b27
UW
53772012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5378
5379 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5380 between unsupported TYPE and unimplementable ADDR/LEN combination.
5381 (arm_insert_point): Act on new return value.
5382
78a99e91
PA
53832012-07-31 Pedro Alves <palves@redhat.com>
5384
5385 * server.c (process_point_options): Only skip tokens if we find
5386 one that is unrecognized. Don't treat 'X' specially while
5387 skipping unrecognized tokens.
5388
fcf303ab
UW
53892012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5390
5391 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5392 to 4-byte-align HW breakpoint addresses for Thumb.
5393
7255706c
YQ
53942012-07-27 Yao Qi <yao@codesourcery.com>
5395
5396 PR remote/14161.
5397
5398 * server.h: Declare gdb_agent_about_to_close.
5399 * target.c (kill_inferior): Include "agent.h".
5400 New. Send command 'kill'.
5401 * target.h (kill_inferior): Removed macro.
5402 * tracepoint.c (gdb_agent_about_to_close): New.
5403 (gdb_agent_helper_thread): Handle command 'close'.
5404 Wait endlessly until the inferior stops.
5405 Install gdb_agent_remove_socket to atexit hook.
5406 (agent_socket_name): New static variable.
5407 (gdb_agent_socket_init): Replace local variable 'name' with
5408 'agent_socket_name'.
5409 (gdb_agent_remove_socket): New.
5410
5a3f286f
YQ
54112012-07-27 Yao Qi <yao@codesourcery.com>
5412
5413 * server.c (process_point_options): Stop at 'X' when parsing.
5414
961bd387
ME
54152012-07-19 Michael Eager <eager@eagercon.com>
5416
a261b8f5 5417 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
5418 to hw_execute.
5419 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5420 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5421 hardware breakpoint.
5422
aa7c7447
JK
54232012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5424
5425 * gdbserver/linux-low.c (initialize_low): Call
5426 linux_ptrace_init_warnings.
5427
7f216e7c
DE
54282012-07-02 Doug Evans <dje@google.com>
5429
5430 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5431 pointer to int.
5432
d3ce09f5
SS
54332012-07-02 Stan Shebs <stan@codesourcery.com>
5434
5435 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5436 (ax.o): Add it to build rule.
5437 (ax-ipa.o): Ditto.
5438 (OBS): Add format.o.
5439 (IPA_OBS): Add format.o.
5440 * server.c (handle_query): Claim support for breakpoint commands.
5441 (process_point_options): Add command case.
5442 (process_serial_event): Leave running if there are printfs in
5443 effect.
5444 * mem-break.h (any_persistent_commands): Declare.
5445 (add_breakpoint_commands): Declare.
5446 (gdb_no_commands_at_breakpoint): Declare.
5447 (run_breakpoint_commands): Declare.
5448 * mem-break.c (struct point_command_list): New struct.
5449 (struct breakpoint): New field command_list.
5450 (any_persistent_commands): New function.
5451 (add_commands_to_breakpoint): New function.
5452 (add_breakpoint_commands): New function.
5453 (gdb_no_commands_at_breakpoint): New function.
5454 (run_breakpoint_commands): New function.
5455 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5456 locally.
5457 * ax.c: Include format.h.
5458 (ax_printf): New function.
5459 (gdb_eval_agent_expr): Add printf opcode.
5460
2f8f6aed
YQ
54612012-06-13 Yao Qi <yao@codesourcery.com>
5462
5463 * server.c (start_inferior): Remove duplicated writes to fields
5464 'last_resume_kind' and 'last_status' of 'current_inferior'.
5465
0c9070b3
YQ
54662012-06-12 Yao Qi <yao@codesourcery.com>
5467 Pedro Alves <palves@redhat.com>
5468
5469 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5470 comment.
5471 * server.c (handle_v_cont): Extend comment.
5472
c52daf70
YQ
54732012-06-11 Yao Qi <yao@codesourcery.com>
5474
5475 * linux-low.c (linux_attach): Add 'static'.
5476
d38bbb0a
YQ
54772012-06-06 Yao Qi <yao@codesourcery.com>
5478
5479 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5480
89dc0afd
JK
54812012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5482
5483 Fix gcc -flto compilation warning.
5484 * server.c (main): Make variable multi_mode and attach volatile.
5485
75f62ce7
TJB
54862012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5487
5488 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5489 if the platform doesn't know about it.
5490
65f479b6
PA
54912012-05-30 Jeff Kenton <jkenton@tilera.com>
5492
5493 * Makefile.in (SFILES): Add linux-tile-low.c.
5494 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5495 * configure.srv: Handle tilegx-*-linux*.
5496 * linux-tile-low.c: New file.
5497
0c5bf5a9
JK
54982012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5499
5500 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5501
a493e3e2
PA
55022012-05-24 Pedro Alves <palves@redhat.com>
5503
5504 PR gdb/7205
5505
43aaf8b6 5506 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 5507
2ea28649
PA
55082012-05-24 Pedro Alves <palves@redhat.com>
5509
5510 PR gdb/7205
5511
5512 Replace target_signal with gdb_signal throughout.
5513
8d409d16
MR
55142012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5515
5516 * linux-low.c (linux_store_registers): Avoid the copying sequence
5517 when no data has been retrieved by ptrace.
5518
23512c01
MGD
55192012-05-22 Will Deacon <will.deacon@arm.com>
5520
5521 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5522 Include asm/ptrace.h.
5523 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5524 already defined.
5525
4934b29e
MR
55262012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5527
5528 * linux-low.c (linux_store_registers): Don't re-retrieve data
5529 with ptrace that has already been obtained from /proc. Always
5530 copy any data retrieved with ptrace to the buffer supplied.
5531
bde24c0a
PA
55322012-05-11 Yao Qi <yao@codesourcery.com>
5533 Pedro Alves <palves@redhat.com>
5534
5535 * linux-low.c (enum stopping_threads_kind): New.
5536 (stopping_threads): Change type to `enum stopping_threads_kind'.
5537 (handle_extended_wait): If stopping and suspending threads, leave
5538 the new_lwp suspended too.
5539 (linux_wait_for_event): Adjust.
5540 (stop_all_lwps): Set `stopping_threads' to
5541 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5542 whether we're suspending threads or just stopping them. Assert no
5543 recursion happens.
5544
623b6bdf
YQ
55452012-04-29 Yao Qi <yao@codesourcery.com>
5546
5547 * server.h: Move some code to ...
5548 * gdbthread.h: ... here. New.
5549 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5550 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5551 (nto-low.o, win32-low.o): Likewise.
5552 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5553 * regcache.c, remote-utils.c, server.c: Likewise.
5554 * target.c, tracepoint.c, win32-low.c: Likewise.
5555
f15f9948
TJB
55562012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5557
5558 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5559 (PTRACE_ARG4_TYPE): Likewise.
5560 (PTRACE_XFER_TYPE): Likewise.
5561 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5562 ptrace to PTRACE_ARG3_TYPE.
5563 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5564 (PTRACE_ARG4_TYPE): Likewise.
5565 (PTRACE_XFER_TYPE): Likewise.
5566 (linux_detach_one_lwp): Cast fourth argument of
5567 ptrace to long then PTRACE_ARG4_TYPE.
5568 (regsets_fetch_inferior_registers): Cast third argument of
5569 ptrace to long then PTRACE_ARG3_TYPE.
5570 (regsets_store_inferior_registers): Likewise.
5571
38ea300a
PA
55722012-04-20 Pedro Alves <palves@redhat.com>
5573
5574 * configure: Regenerate.
5575
c971b7fa
PA
55762012-04-19 Pedro Alves <palves@redhat.com>
5577
43aaf8b6 5578 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 5579 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
5580 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5581 (all, install-only, uninstall, clean-info, all-lib, clean): No
5582 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5583 (maintainer-clean realclean distclean): Use subdir_do.
5584 (subdir_do): New.
5585 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 5586 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
5587 * acinclude.m4: Include acx_configure_dir.m4.
5588 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5589 calls. Call AC_PROG_RANLIB. Configure gnulib using
5590 ACX_CONFIGURE_DIR.
5591 (GNULIB): New.
5592 (GNULIB_STDINT_H): Adjust.
5593 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5594 * gdbreplay.c: Include build-gnulib/config.h.
5595 * server.h: Likewise.
5596 * aclocal.m4: Regenerate.
5597 * config.in: Regenerate.
5598 * configure: Regenerate.
c971b7fa 5599
809277f8
PA
56002012-04-19 Pedro Alves <palves@redhat.com>
5601
5602 * Makefile.in (LIBGNU, INCGNU): Adjust.
5603 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5604 (all, install-only, uninstall, clean-info, all-lib, clean)
5605 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5606 * configure.ac: Adjust AC_OUTPUT output.
5607 * aclocal.m4: Regenerate.
5608 * configure: Regenerate.
5609
fd9bb8b8
PA
56102012-04-19 Pedro Alves <palves@redhat.com>
5611
5612 * Makefile.in (generated_files): New.
5613 (server_h): Remove the explicit dependency on config.h, and depend
5614 on $generated_files.
5615
1c298c66
PA
56162012-04-19 Pedro Alves <palves@redhat.com>
5617
5618 * Makefile.in (INCGNU): Add -Ignulib.
5619
57c4b50b
PA
56202012-04-19 Pedro Alves <palves@redhat.com>
5621
5622 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5623 (INCGNU): ... this, and spell out -I here.
5624 (GNULIB_LIB): Rename to ...
5625 (LIBGNU): ... this.
5626 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5627
1030e047
PA
56282012-04-19 Pedro Alves <palves@redhat.com>
5629
5630 * config.in: Regenerate.
5631
447d4319
PA
56322012-04-19 Pedro Alves <palves@redhat.com>
5633
5634 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5635 * server.h (memmem): Remove declaration.
5636 * config.in: Regenerate.
5637 * configure: Regenerate.
5638
aad9eab9
YQ
56392012-04-19 Yao Qi <yao@codesourcery.com>
5640
5641 * Makefile.in (SFILES): Add common/vec.c.
5642 (OBS): Add vec.o.
5643 (vec.o): New rule.
5644
3e10640f
YQ
56452012-04-19 Yao Qi <yao@codesourcery.com>
5646
5647 * remote-utils.c (prepare_resume_reply): Replace with macro
5648 target_core_of_thread.
5649 * server.c (handle_qxfer_threads_proper): Likewise.
5650 * target.h (traget_core_of_thread): New macro.
5651
71622373
PA
56522012-04-18 Pedro Alves <palves@redhat.com>
5653
5654 * aclocal.m4: Regenerate.
5655 * configure: Regenerate.
5656
80d26939
YQ
56572012-04-16 Yao Qi <yao@codesourcery.com>
5658
5659 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5660 duplicated on address.
5661
42476b70
YQ
56622012-04-16 Yao Qi <yao@codesourcery.com>
5663
5664 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5665 (struct tracepoint_action_ops) <send>: New field.
5666 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5667 (agent_expr_send, x_tracepoint_action_send): New.
5668 (l_tracepoint_action_send): New.
5669 (cmd_qtdp): Download and install tracepoint
5670 according to `use_agent'.
5671 (run_inferior_command): Add one more parameter `len'.
5672 Update callers.
5673 (tracepoint_send_agent): New.
5674 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5675
7bc83639
YQ
56762012-04-16 Yao Qi <yao@codesourcery.com>
5677
5678 * tracepoint.c (download_tracepoints): Moved to ...
5679 (cmd_qtstart): ... here.
5680
5f18041e
YQ
56812012-04-14 Yao Qi <yao@codesourcery.com>
5682
5683 * tracepoint.c: Include inttypes.h.
5684 (struct collect_memory_action): Use sized types.
5685 (struct tracepoint): Likewise.
5686 (cmd_qtdp, stop_tracing): Update print specifiers.
5687 (cmd_qtp, response_tracepoint): Likewise.
5688 (collect_data_at_tracepoint): Likewise.
5689 (collect_data_at_step): Likewise.
5690
55a8c076
YQ
56912012-04-14 Yao Qi <yao@codesourcery.com>
5692
5693 Import gnulib module inttypes.
5694 * aclocal.m4, config.in, configure: Regenerated.
5695
dc750257
YQ
56962012-04-14 Yao Qi <yao@codesourcery.com>
5697
5698 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5699 Makefile and config.status at last.
5700
0ab5faf9
YQ
57012012-04-13 Yao Qi <yao@codesourcery.com>
5702
5703 * tracepoint.c: Include stdint.h unconditionally.
5704
18f5fd81
TJB
57052012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5706
5707 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5708 on BFD_HAVE_SYS_PROCFS_TYPE.
5709 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5710 * configure: Regenerate.
5711 * config.in: Likewise.
5712
4d47af5c
L
57132012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5714
5715 * Makefile.in (clean): Also remove x32.c x32-linux.c
5716 x32-avx.c x32-avx-linux.c.
5717 (x32.o): New target.
5718 (x32.c): Likewise.
5719 (x32-linux.o): Likewise.
5720 (x32-linux.c): Likewise.
5721 (x32-avx.o): Likewise.
5722 (x32-avx.c): Likewise.
5723 (x32-avx-linux.o): Likewise.
5724 (x32-avx-linux.c): Likewise.
5725
5726 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5727 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5728 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5729 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5730 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5731 i386/x32-avx-linux.xml.
5732
5733 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5734 (init_registers_x32_avx_linux): Likwise.
5735 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5736 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5737
ecedbe58
PA
57382012-04-13 Pedro Alves <palves@redhat.com>
5739
5740 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5741 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5742 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5743 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5744 the sub-make.
5745
c92b5177
L
57462012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5747
5748 * linux-x86-low.c (compat_x32_clock_t): New.
5749 (compat_x32_siginfo_t): Likewise.
5750 (compat_x32_siginfo_from_siginfo): Likewise.
5751 (siginfo_from_compat_x32_siginfo): Likewise.
5752 (linux_is_elf64): Likewise.
5753 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5754 and siginfo_from_compat_x32_siginfo for x32.
5755 (x86_arch_setup): Set linux_is_elf64.
5756
214d508e
L
57572012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5758
5759 PR gdb/13969
5760 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5761 e_machine field.
5762 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5763 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5764 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5765 compatible with process.
5766
c9a1864a
YQ
57672012-04-12 Yao Qi <yao@codesourcery.com>
5768
5769 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5770 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5771 (install-only, install-info, clean): Handle sub dir gnulib.
5772 (all-lib, am--refresh): New targets.
5773 (memmem.o): Remove target.
5774 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5775 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5776 (AC_REPLACE_FUNCS): Remove memmem.
5777 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5778 (AC_OUTPUT): Generate Makefile in gnulib/.
5779 * aclocal.m4, config.in, configure: Regenerated.
5780
367ba2c2
MR
57812012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5782
5783 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5784
9d236627
PA
57852012-04-05 Pedro Alves <palves@redhat.com>
5786
5787 -Werror=strict-aliasing
5788
5789 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5790 pointer.
5791
111217b3
PA
57922012-04-04 Pedro Alves <palves@redhat.com>
5793
5794 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5795 (sparc_store_gregset_from_stack, sparc_store_gregset)
5796 (sparc_breakpoint_at): Fix formatting.
5797
8365dcf5
TJB
57982012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5799
5800 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5801 are available.
5802 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5803 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5804 * config.in: Regenerate.
5805 * configure: Likewise.
5806
689cc2ae
PA
58072012-03-29 Pedro Alves <palves@redhat.com>
5808
5809 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5810 Correct ptrace arguments.
5811
c14dfd32
PA
58122012-03-28 Pedro Alves <palves@redhat.com>
5813
5814 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5815 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5816 (IA64_FR1_REGNUM): New defines.
5817 (ia64_fetch_register): New.
5818 (the_low_target): Install it.
5819 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5820 field.
5821 * linux-low.c (linux_fetch_registers): Try the
5822 the_low_target.fetch_register hook first.
5823
5824 * linux-arm-low.c (the_low_target): Adjust.
5825 * linux-bfin-low.c (the_low_target): Adjust.
5826 * linux-cris-low.c (the_low_target): Adjust.
5827 * linux-crisv32-low.c (the_low_target): Adjust.
5828 * linux-m32r-low.c (the_low_target): Adjust.
5829 * linux-m68k-low.c (the_low_target): Adjust.
5830 * linux-mips-low.c (the_low_target): Adjust.
5831 * linux-ppc-low.c (the_low_target): Adjust.
5832 * linux-s390-low.c (the_low_target): Adjust.
5833 * linux-sh-low.c (the_low_target): Adjust.
5834 * linux-sparc-low.c (the_low_target): Adjust.
5835 * linux-tic6x-low.c (the_low_target): Adjust.
5836 * linux-x86-low.c (the_low_target): Adjust.
5837 * linux-xtensa-low.c (the_low_target): Adjust.
5838
63c88e13
PA
58392012-03-26 Pedro Alves <palves@redhat.com>
5840
5841 * server.c (handle_qxfer_libraries): Don't bail early if
5842 the_target->qxfer_libraries_svr4 is not NULL.
5843
fb723180
PA
58442012-03-26 Pedro Alves <palves@redhat.com>
5845
5846 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5847
0afae3cf
PA
58482012-03-23 Pedro Alves <palves@redhat.com>
5849
5850 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5851 "library-list-svr4" element's start tag when the the DSO list is
5852 empty.
5853
485f1ee4
PA
58542012-03-23 Pedro Alves <palves@redhat.com>
5855
5856 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5857 a variable whose type size is the same as the inferior's pointer
5858 size.
5859
a5362b9a
TS
58602012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5861
5862 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5863 struct siginfo.
5864 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5865 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5866 * linux-low.h: Include <signal.h>.
5867 (struct siginfo): Remove forward declaration.
5868 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5869 struct siginfo.
5870
d226c142
MF
58712012-03-21 Mike Frysinger <vapier@gentoo.org>
5872
5873 * .gitignore: Ignore more files.
5874
122f36ef
PA
58752012-03-19 Pedro Alves <palves@redhat.com>
5876 Jan Kratochvil <jan.kratochvil@redhat.com>
5877
5878 * server.c (cont_thread, general_thread): Add describing comments.
5879 (start_inferior): Clear `cont_thread'.
5880 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5881 of a process.
5882
fc3e5175
YQ
58832012-03-15 Yao Qi <yao@codesourcery.com>
5884
5885 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5886 handling to ...
5887 (cmd_qtdp): ... here.
5888
8d0d92cd
YQ
58892012-03-15 Yao Qi <yao@codesourcery.com>
5890
5891 * tracepoint.c (struct tracepoint_action_ops): New.
5892 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5893 (m_tracepoint_action_download): New.
5894 (r_tracepoint_action_download): New.
5895 (x_tracepoint_action_download): New.
5896 (l_tracepoint_action_download): New.
5897 (add_tracepoint_action): Install `action->ops' according type.
5898 (download_tracepoint_1): Move code `download' function pointer
5899 of various tracepoint_action_ops.
5900
87b0bb13
JK
59012012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5902
5903 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5904 linux_ptrace_attach_warnings.
5905
5f572dec
JK
59062012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5907
5908 * Makefile.in (linux-ptrace.o): New.
5909 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5910 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5911 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5912 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5913 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5914 of these targets.
5915 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5916
f4647387
YQ
59172012-03-08 Yao Qi <yao@codesourcery.com>
5918 Pedro Alves <palves@redhat.com>
5919
5920 Fix PR server/13392.
5921 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5922 offset of JMP insn.
5923 * tracepoint.c (remove_tracepoint): New.
5924 (cmd_qtdp): Call remove_tracepoint when failed to install.
5925
9b224c5e
PA
59262012-03-07 Pedro Alves <palves@redhat.com>
5927
5928 * linux-low.c (get_detach_signal): New.
5929 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5930 Pass on pending signals to PTRACE_DETACH. Check the result of the
5931 ptrace call.
5932 * server.c (program_signals, program_signals_p): New.
5933 (handle_general_set): Handle QProgramSignals.
5934 * server.h (program_signals, program_signals_p): Declare.
5935
e237a7e2
JK
59362012-03-05 Pedro Alves <palves@redhat.com>
5937 Jan Kratochvil <jan.kratochvil@redhat.com>
5938
5939 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5940 New comment why.
5941
5808517f
YQ
59422012-03-03 Yao Qi <yao@codesourcery.com>
5943
5944 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5945 agent_look_up_symbols.
5946
58b4daa5
YQ
59472012-03-03 Yao Qi <yao@codesourcery.com>
5948
5949 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5950 (linux-x86-low.o): Likewise.
5951 * server.h: Remove in_process_agent_loaded.
5952 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5953 common/agent.c.
5954 Update callers.
5955
8ffcbaaf
YQ
59562012-03-03 Yao Qi <yao@codesourcery.com>
5957
5958 * tracepoint.c (gdb_agent_capability): New global.
5959 (in_process_agent_loaded_ust): Renamed to
5960 `in_process_agent_supports_ust'.
5961 Update callers.
5962 (in_process_agent_supports_ust): Call agent_capability_check.
5963 (clear_installed_tracepoints): Assert that agent supports
5964 agent.
5965
d1feda86
YQ
59662012-03-03 Yao Qi <yao@codesourcery.com>
5967
5968 * linux-low.c (linux_supports_agent): New.
5969 (linux_target_ops): Initialize field `supports_agent' with
5970 linux_supports_agent.
5971 * target.h (struct target_ops) <supports_agent>: New.
5972 (target_supports_agent): New macro.
5973 * server.c (handle_general_set): Handle packet 'QAgent'.
5974 (handle_query): Send `QAgent+'.
5975 * Makefile.in (server.o): Depends on agent.h.
5976
2fa291ac
YQ
59772012-03-03 Yao Qi <yao@codesourcery.com>
5978
5979 * Makefile.in (OBS): Add agent.o.
5980 Add new rule for agent.o.
5981 Track dependence of tracepoint.c on agent.h.
5982 * tracepoint.c (run_inferior_command_1):
5983 (run_inferior_command): Call agent_run_command.
5984 (gdb_ust_connect_sync_socket): Deleted. Move it to
5985 common/agent.c.
5986 (resume_thread, stop_thread): Likewise.
5987 (gdb_ust_socket_init): Renamed to ...
5988 (gdb_agent_socket_init): ... New.
5989 (gdb_ust_thread): Renamed to ...
5990 (gdb_agent_helper_thread): ... New.
5991 (gdb_ust_init): Move some code to ...
5992 (gdb_agent_init): ... here. New.
5993 [HAVE_UST]: Call gdb_ust_init.
5994 (initialize_tracepoint_ftlib): Call gdb_agent_init.
5995 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
5996 * config.in, configure: Regenerated.
5997
05044653
PA
59982012-03-02 Pedro Alves <palves@redhat.com>
5999
6000 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6001 * linux-low.c (struct simple_pid_list): New.
6002 (stopped_pids): New a struct simple_pid_list pointer.
6003 (add_to_pid_list, pull_pid_from_list): New.
6004 (handle_extended_wait): Don't assume the first signal new children
6005 report is SIGSTOP. Adjust call to pull_pid_from_list.
6006 (linux_wait_for_lwp): Adjust.
6007
8d00225b
YQ
60082012-03-02 Yao Qi <yao@codesourcery.com>
6009
6010 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6011 debug log.
6012
19560ba5
YQ
60132012-03-02 Yao Qi <yao@codesourcery.com>
6014
6015 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6016 `stop_pc' and `tpoint'. Update caller.
6017
1faeff08
MR
60182012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6019
6020 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6021 * linux-low.c (use_linux_regsets): New macro.
6022 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6023 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6024 (linux_register_in_regsets): New function.
6025 (usr_fetch_inferior_registers): Skip registers covered by
6026 regsets.
6027 (usr_store_inferior_registers): Likewise.
6028 (usr_fetch_inferior_registers): New macro.
6029 (usr_store_inferior_registers): Likewise.
6030 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6031 (linux_store_registers): Likewise.
6032 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6033 prototype.
6034 (init_registers_mips64_dsp_linux): Likewise.
6035 (init_registers_mips_linux): New macro.
6036 (init_registers_mips_dsp_linux): Likewise.
6037 (mips_dsp_num_regs): Likewise.
6038 (DSP_BASE, DSP_CONTROL): New fallback macros.
6039 (mips_base_regs): New macro.
6040 (mips_regmap): Use it. Fix the size.
6041 (mips_dsp_regmap): New variable.
6042 (mips_dsp_regset_bitmap): Likewise.
6043 (mips_arch_setup): New function.
6044 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6045 than mips_regmap.
6046 (mips_cannot_store_register): Likewise.
6047 (the_low_target): Update .arch_setup, .num_regs and .regmap
6048 initializers. Add .regset_bitmap initializer.
6049 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6050 initializer.
6051 * linux-bfin-low.c (the_low_target): Likewise.
6052 * linux-cris-low.c (the_low_target): Likewise.
6053 * linux-crisv32-low.c (the_low_target): Likewise.
6054 * linux-ia64-low.c (the_low_target): Likewise.
6055 * linux-m32r-low.c (the_low_target): Likewise.
6056 * linux-m68k-low.c (the_low_target): Likewise.
6057 * linux-ppc-low.c (the_low_target): Likewise.
6058 * linux-s390-low.c (the_low_target): Likewise.
6059 * linux-sh-low.c (the_low_target): Likewise.
6060 * linux-sparc-low.c (the_low_target): Likewise.
6061 * linux-tic6x-low.c (the_low_target): Likewise.
6062 * linux-x86-low.c (the_low_target): Likewise.
6063 * linux-xtensa-low.c (the_low_target): Likewise.
6064 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6065 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6066 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6067 srv_xmlfiles.
6068 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6069 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6070
c03e6ccc
YQ
60712012-02-29 Yao Qi <yao@codesourcery.com>
6072 Pedro Alves <palves@redhat.com>
6073
6074 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6075 `step_over_finished' is true.
6076
644cebc9
PA
60772012-02-27 Pedro Alves <palves@redhat.com>
6078
6079 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6080 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6081
c14d7ab2
PA
60822012-02-27 Pedro Alves <palves@redhat.com>
6083
6084 PR server/9684
6085 * linux-low.c (pid_is_stopped): New.
6086 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6087
412c89dd
LM
60882012-02-25 Luis Machado <lgustavo@codesourcery.com>
6089
6090 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6091 of conditions.
6092
b745defe
MR
60932012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6094
6095 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6096
9f3a5c85
LM
60972012-02-24 Luis Machado <lgustavo@codesourcery>
6098
6099 * server.c (handle_query): Advertise support for target-side
6100 breakpoint condition evaluation.
6101 (process_point_options): New function.
6102 (process_serial_event): When inserting a breakpoint, check for
6103 a target-side condition that should be evaluated.
6104
6105 * mem-break.c: Include regcache.h and ax.h.
6106 (point_cond_list_t): New data structure.
6107 (breakpoint) <cond_list>: New field.
6108 (find_gdb_breakpoint_at): Make non-static.
6109 (delete_gdb_breakpoint_at): Clear any target-side
6110 conditions.
6111 (clear_gdb_breakpoint_conditions): New function.
6112 (add_condition_to_breakpoint): Likewise.
6113 (add_breakpoint_condition): Likewise.
6114 (gdb_condition_true_at_breakpoint): Likewise.
6115 (gdb_breakpoint_here): Return result directly instead
6116 of going through a local variable.
6117
6118 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6119 (clear_gdb_breakpoint_conditions): Likewise.
6120 (add_breakpoint_condition): Likewise.
6121 (gdb_condition_true_at_breakpoint): Likewise.
6122
6123 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6124 (need_step_over_p): Take target-side breakpoint condition into
6125 consideration.
6126
5e1dc496
LM
61272012-02-24 Luis Machado <lgustavo@codesourcery>
6128
6129 * server.h: Include tracepoint.h.
6130 (agent_mem_read, agent_get_trace_state_variable_value,
6131 agent_set_trace_state_variable_value,
6132 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6133 get_set_tsv_func_addr): New prototypes.
6134
6135 * ax.h: New include file.
6136 * ax.c: New source file.
6137
6138 * tracepoint.c: Include ax.h.
6139 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6140 agent_expr, eval_result_type): Move to ax.h.
6141 (parse_agent_expr): Rename to ...
6142 (gdb_parse_agent_expr): ... this, make it non-static and move
6143 to ax.h.
6144 (unparse_agent_expr) Rename to ...
6145 (gdb_unparse_agent_expr): ... this, make it non-static and move
6146 to ax.h.
6147 (eval_agent_expr): Rename to ...
6148 (eval_tracepoint_agent_expr): ... this.
6149 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6150 forward declarations.
6151 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6152 (agent_get_trace_state_variable_value): New function.
6153 (agent_set_trace_state_variable_value): New function.
6154 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6155 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6156 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6157 (condition_true_at_tracepoint): Likewise.
6158 (parse_agent_expr): Rename to ...
6159 (gdb_parse_agent_expr): ... this and move to ax.c.
6160 (unparse_agent_expr): Rename to ...
6161 (gdb_unparse_agent_expr): ... this and move to ax.c.
6162 (gdb_agent_op_name): Move to ax.c.
6163 (eval_agent_expr): Rename to ...
6164 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6165 and move to ax.c.
6166 (eval_tracepoint_agent_expr): New function.
6167 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 6168 non-static.
5e1dc496
LM
6169 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6170 ax.c.
6171 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6172 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6173 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6174 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6175 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6176 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6177 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6178 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6179 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6180 (compile_bytecodes): Remove forward declaration.
6181 (is_goto_target): Move to ax.c.
6182 (compile_bytecodes): Move to ax.c and call
6183 agent_get_trace_state_variable_value (...) and
6184 agent_set_trace_state_variable_value (...).
6185
6186 * Makefile.in: Update ax.c and IPA dependencies.
6187
277e4e52
PA
61882012-02-24 Pedro Alves <palves@redhat.com>
6189
6190 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6191 (cmd_bigqtbuffer_circular): ... this. Only handle
6192 'QTBuffer:circular:'.
6193 (handle_tracepoint_general_set): Adjust.
6194
bf4c19f7
YQ
61952012-02-16 Yao Qi <yao@codesourcery.com>
6196
6197 * inferiors.c: Move code to ...
6198 * dll.c: .... here. New.
6199 * server.h: Declare clear_dlls.
6200 * Makefile.in (SFILES): Add dll.c.
6201 (OBS): Add dll.o
6202 (dll.o): New rule.
6203
d73f2619
YQ
62042012-02-11 Yao Qi <yao@codesourcery.com>
6205
6206 * server.c: (handle_monitor_command): Add a new parameter
6207 `own_buf'.
6208 (handle_query): Update caller.
6209
f8255c2a
JB
62102012-02-09 Joel Brobecker <brobecker@adacore.com>
6211
6212 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6213 * configure, config.in: Regenerate.
6214 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6215 is not defined.
6216
da84f473
PA
62172012-02-02 Pedro Alves <palves@redhat.com>
6218
6219 Try SIGKILL first, then PTRACE_KILL.
6220 * linux-low.c (linux_kill_one_lwp): New.
6221 (linux_kill_one_lwp): Rename to ...
6222 (kill_one_lwp_callback): ... this. Use the new
6223 linux_kill_one_lwp.
6224
e886a173
PA
62252012-02-02 Pedro Alves <palves@redhat.com>
6226
6227 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6228 inferior.
6229
be07f1a2
PA
62302012-01-27 Pedro Alves <palves@redhat.com>
6231
6232 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6233 (elf_64_file_p): Make static.
6234 (linux_pid_exe_is_elf_64_file): New.
6235 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6236 Delete declarations.
6237 (linux_pid_exe_is_elf_64_file): Declare.
6238 * linux-x86-low.c (x86_arch_setup): Use
6239 linux_pid_exe_is_elf_64_file.
6240
d8301ad1
JK
62412012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6242
6243 * linux-low.c (linux_wait_for_event_1): Rename to ...
6244 (linux_wait_for_event): ... here and merge it with former
6245 linux_wait_for_event - new variable wait_ptid, use it.
6246 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6247
01b17894
PA
62482012-01-23 Pedro Alves <palves@redhat.com>
6249
6250 * server.c (main): Avoid yet another case of infinite loop while
6251 detaching/killing after a longjmp.
6252
e825046f
JK
62532012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6254
6255 Code cleanup.
6256 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6257
b9e7b9c3
UW
62582012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6259
6260 * hostio.c (handle_readlink): New function.
6261 (handle_vFile): Call it to handle "vFile:readlink" packets.
6262
901f9912
UW
62632012-01-20 Pedro Alves <palves@redhat.com>
6264 Ulrich Weigand <ulrich.weigand@linaro.org>
6265
6266 * server.c (handle_v_requests): Only support vAttach and vRun to
6267 start multiple processes when in extended protocol mode.
6268
fc1ab1a0
PA
62692012-01-17 Pedro Alves <palves@redhat.com>
6270
6271 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6272 memalign plus mprotect to allocate the scratch buffer.
6273
7d5d4e98
PA
62742012-01-13 Pedro Alves <palves@redhat.com>
6275
6276 * server.c (attach_inferior): Clear `cont_thread'.
6277
f128d5e9
PA
62782012-01-13 Pedro Alves <palves@redhat.com>
6279
6280 * server.c (main): Avoid infinite loop while detaching/killing
6281 after a longjmp.
6282
06db92f0
DE
62832012-01-09 Doug Evans <dje@google.com>
6284
6285 * server.c (start_inferior): Set last_ptid in --wrapper case.
6286
32d92999
YQ
62872012-01-06 Yao Qi <yao@codesourcery.com>
6288
6289 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6290 defined.
6291 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6292
5e0a92a9
YQ
62932012-01-04 Yao Qi <yao@codesourcery.com>
6294
6295 * tracepoint.c (cmd_qtdp): Print debug message
6296 for static tracepoint.
6297
ae639e8c
YQ
62982012-01-04 Yao Qi <yao@codesourcery.com>
6299
6300 * tracepoint.c (trace_vdebug): Differentiate debug message
6301 between gdbserver and IPA.
6302
f72429c5
YQ
63032012-01-03 Yao Qi <yao@codesourcery.com>
6304
6305 * tracepoint.c (tracepoint_was_hit): Don't collect for
6306 static tracepoint.
6307
12c3e59c
JB
63082012-01-02 Joel Brobecker <brobecker@adacore.com>
6309
6310 * terminal.h: Reformat copyright header.
6311
67827812
JB
63122012-01-02 Joel Brobecker <brobecker@adacore.com>
6313
6314 * server.c (gdbserver_version): Update copyright year.
6315 * gdbreplay.c (gdbreplay_version): Likewise.
6316
3e52c33d
JK
63172011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6318
6319 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6320
6321 Revert:
6322 2011-12-18 Hui Zhu <teawater@gmail.com>
6323 * linux-low.c (linux_create_inferior): Save return value to ret.
6324
66f1260e
HZ
63252011-12-18 Hui Zhu <teawater@gmail.com>
6326
6327 * linux-low.c (linux_create_inferior): Save return value to ret.
6328
e77616d7
DE
63292011-12-16 Doug Evans <dje@google.com>
6330
e7b06c57
DE
6331 * linux-low.c (linux_create_inferior): If stdio connection,
6332 redirect stdin from /dev/null, stdout to stderr.
6333 * remote-utils.c (remote_is_stdio): New static global.
6334 (remote_connection_is_stdio): New function.
6335 (remote_prepare): Handle stdio connection.
6336 (remote_open): Ditto.
6337 (remote_close): Don't close stdin for stdio connections.
6338 (read_prim,write_prim): New functions. Replace all calls to
6339 read/write to these.
6340 * server.c (main): Watch for "-" argument. Move call to
6341 remote_prepare before start_inferior.
6342 * server.h (STDIO_CONNECTION_NAME): New macro.
6343 (remote_connection_is_stdio): Declare.
6344
e77616d7
DE
6345 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6346 in debugging output.
6347
82067193
YQ
63482011-12-15 Yao Qi <yao@codesourcery.com>
6349
6350 * tracepoint.c: Include sys/syscall.h.
6351 (gdb_ust_thread): Remove preprocessor conditional.
6352
82bfbe7e
PA
63532011-12-14 Pedro Alves <pedro@codesourcery.com>
6354
6355 * linux-low.c (linux_detach_one_lwp): Call
6356 the_low_target.prepare_to_resume before detaching.
6357
712c6575
YQ
63582011-12-14 Yao Qi <yao@codesourcery.com>
6359
6360 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6361 of write.
6362
d54d1edf
YQ
63632011-12-14 Yao Qi <yao@codesourcery.com>
6364
6365 * i386-low.c (i386_low_stopped_data_address): Initialize local
6366 variable `control'.
6367
6210a125
PA
63682011-12-13 Pedro Alves <pedro@codesourcery.com>
6369
6370 PR remote/13492
6371
6372 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6373 DR_CONTROL unless necessary. Extend comments.
6374 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6375 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6376
2ece8244
YQ
63772011-12-13 Yao Qi <yao@codesourcery.com>
6378
6379 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6380 macros.
6381 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6382
784867a5
JK
63832011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6384
6385 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6386 Print new debug message for such case.
6387
6bf36717
JK
63882011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6389
6390 Fix overlapping memcpy.
6391 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6392 the read_inferior_memory transfer.
6393 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6394 write_inferior_memory transfer.
6395 (set_fast_tracepoint_jump): New variable buf. Use it for the
6396 read_inferior_memory and write_inferior_memory transfers.
6397 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6398 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6399 Use it for the write_inferior_memory transfer.
6400 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6401 buffers.
6402
50275556
MR
64032011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6404
6405 * linux-low.c (fetch_register, store_register): Make code
6406 consistent, fix formatting.
6407
7325beb4
MR
64082011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6409
6410 * linux-low.c (usr_store_inferior_registers): Factor out code
6411 to handle individual registers into...
6412 (store_register): ... this new function.
6413
c642a434
UW
64142011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6415
6416 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6417 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6418 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6419 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6420 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6421 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6422 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6423 (srv_xmlfiles): Add new XML files.
6424
6425 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6426 and <sys/uio.h>.
6427 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6428 (init_registers_s390_linux32v1): Add prototype.
6429 (init_registers_s390_linux32v2): Likewise.
6430 (init_registers_s390_linux64v1): Likewise.
6431 (init_registers_s390_linux64v2): Likewise.
6432 (init_registers_s390x_linux64v1): Likewise.
6433 (init_registers_s390x_linux64v2): Likewise.
6434 (s390_num_regs): Increment to 52.
6435 (s390_regmap): Add orig_r2 register.
6436 (s390_num_regs_3264): Increment to 68.
6437 (s390_regmap_3264): Add orig_r2 register.
6438 (s390_collect_ptrace_register): Handle orig_r2 register.
6439 (s390_supply_ptrace_register): Likewise.
6440 (s390_fill_last_break): New function.
6441 (s390_store_last_break): Likewise.
6442 (s390_fill_system_call): New function.
6443 (s390_store_system_call): Likewise.
6444 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6445 register sets.
6446 (s390_check_regset): New function.
6447 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6448 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6449 Update target_regsets for available register sets.
6450
2268b414
JK
64512011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6452 Jan Kratochvil <jan.kratochvil@redhat.com>
6453
6454 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6455 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6456 New.
6457 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6458 * linux-low.h (struct process_info_private): New member r_debug.
6459 * server.c (handle_qxfer_libraries): Call
6460 the_target->qxfer_libraries_svr4.
6461 (handle_qxfer_libraries_svr4): New function.
6462 (qxfer_packets): New entry "libraries-svr4".
6463 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6464 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6465 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6466 PACKET_qXfer_libraries_svr4.
6467
d6db1fab
UW
64682011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6469
6470 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6471 PSW address/mask between 8-byte and 16-byte formats.
6472 (s390_supply_ptrace_register): Likewise.
6473 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6474 basic addressing mode bit.
6475
242f5f1c
SS
64762011-11-24 Stan Shebs <stan@codesourcery.com>
6477
6478 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6479
f196051f
SS
64802011-11-17 Stan Shebs <stan@codesourcery.com>
6481
6482 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6483 (tracing_start_time): New global.
6484 (tracing_stop_time): New global.
6485 (tracing_user_name): New global.
6486 (tracing_notes): New global.
6487 (tracing_stop_note): New global.
6488 (cmd_qtstart): Set traceframe_usage, start_time.
6489 (stop_tracing): Set stop_time.
6490 (cmd_qtstatus): Report additional status.
6491 (cmd_qtp): New function.
6492 (handle_tracepoint_query): Call it.
6493 (cmd_qtnotes): New function.
6494 (handle_tracepoint_general_set): Call it.
6495 (get_timestamp): Rename from tsv_get_timestamp.
6496
405f8e94
SS
64972011-11-14 Stan Shebs <stan@codesourcery.com>
6498 Kwok Cheung Yeung <kcy@codesourcery.com>
6499
6500 * linux-x86-low.c (small_jump_insn): New.
6501 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6502 trampoline and error message, build a trampoline and issue a small
6503 jump instruction to it.
6504 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6505 trampoline and error message.
6506 (x86_get_min_fast_tracepoint_insn_len): New.
6507 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6508 * linux-low.h (struct linux_target_ops): Add arguments to
6509 install_fast_tracepoint_jump_pad operation, add new operation.
6510 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6511 arguments.
6512 (linux_get_min_fast_tracepoint_insn_len): New function.
6513 (linux_target_op): Add new operation.
6514 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6515 (gdb_trampoline_buffer_end): Ditto.
6516 (gdb_trampoline_buffer_error): Ditto.
6517 (struct ipa_sym_addresses): Add fields for new IPA variables.
6518 (symbol_list): Add entries for new IPA variables.
6519 (struct tracepoint): Add fields to hold the address range of the
6520 trampoline used by the tracepoint.
6521 (trampoline_buffer_head): New static variable.
6522 (trampoline_buffer_tail): Ditto.
6523 (claim_trampoline_space): New function.
6524 (have_fast_tracepoint_trampoline_buffer): New function.
6525 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6526 structure.
6527 (install_fast_tracepoint): Ditto, also add error buffer argument.
6528 (cmd_qtminftpilen): New function.
6529 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6530 (fast_tracepoint_from_trampoline_address): New function.
6531 (fast_tracepoint_collecting): Handle trampoline as part of jump
6532 pad space.
6533 (set_trampoline_buffer_space): New function.
6534 (initialize_tracepoint): Initialize new IPA variables.
6535 * target.h (struct target_ops): Add arguments to
6536 install_fast_tracepoint_jump_pad operation, add new
6537 get_min_fast_tracepoint_insn_len operation.
6538 (target_get_min_fast_tracepoint_insn_len): New.
6539 (install_fast_tracepoint_jump_pad): Add arguments.
6540 * server.h (IPA_BUFSIZ): Define.
6541 * linux-i386-ipa.c: Include extra header files.
6542 (initialize_fast_tracepoint_trampoline_buffer): New function.
6543 (initialize_low_tracepoint): Call it.
6544 * server.h (set_trampoline_buffer_space): Declare.
6545 (claim_trampoline_space): Ditto.
6546 (have_fast_tracepoint_trampoline_buffer): Ditto.
6547
1e4d1764
YQ
65482011-11-14 Yao Qi <yao@codesourcery.com>
6549
6550 * server.c (handle_query): Handle InstallInTrace for qSupported.
6551 * tracepoint.c (add_tracepoint): Sort list.
6552 (install_tracepoint, download_tracepoint): New.
6553 (cmd_qtdp): Call them to install and download tracepoints.
6554 (sort_tracepoints): Removed.
6555 (cmd_qtstart): Update.
6556
5c73ff4e
YQ
65572011-11-14 Yao Qi <yao@codesourcery.com>
6558
6559 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6560 * mem-break.h: Declare.
6561 * tracepoint.c (cmd_qtstart): Move some code to ...
6562 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6563 New.
6564 (download_tracepoints): Move some code to ...
6565 (download_tracepoint_1): ... here. New.
6566
86a30030
YQ
65672011-11-08 Yao Qi <yao@codesourcery.com>
6568
6569 * remote-utils.c (relocate_instruction): A comment fix.
6570
8d26e50c
JB
65712011-11-07 Joel Brobecker <brobecker@adacore.com>
6572
6573 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6574 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6575 dr_status_mirror and dr_control_mirror from debug_reg_state.
6576 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6577 (i386_initial_stuff): Remove use of deleted globals.
6578 (i386_get_thread_context, i386_set_thread_context,
6579 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6580 from debug_reg_state.
6581
a59306a3
YQ
65822011-11-05 Yao Qi <yao@codesourcery.com>
6583
6584 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6585 address as TPOINT's.
6586
3065dfb6
SS
65872011-11-02 Stan Shebs <stan@codesourcery.com>
6588
6589 * tracepoint.c (agent_mem_read_string): New function.
6590 (eval_agent_expr): Call it for tracenz.
6591 * server.c (handle_query): Report support for tracenz.
6592
fd0d8c7c
YQ
65932011-11-02 Yao Qi <yao@codesourcery.com>
6594
6595 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6596
609086b1
YQ
65972011-11-02 Yao Qi <yao@codesourcery.com>
6598
6599 * target.h: Fix a typo in comment.
6600
b9fd1791
PA
66012011-10-31 Pedro Alves <pedro@codesourcery.com>
6602
6603 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6604 clobber the breakpoints' shadows with fast tracepoint jumps.
6605 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6606 * target.c (write_inferior_memory): Also pass MYADDR down to
6607 check_mem_write.
6608
03583c20
UW
66092011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6610
6611 * configure.ac: Check support for personality routine.
6612 * configure: Regenerate.
6613 * config.in: Likewise.
6614 * linux-low.c: Include <sys/personality.h>.
6615 Define ADDR_NO_RANDOMIZE if necessary.
6616 (linux_create_inferior): Disable address space randomization when
6617 forking inferior, if requested.
6618 (linux_supports_disable_randomization): New function.
6619 (linux_target_ops): Install it.
6620 * server.h (disable_randomization): Declare.
6621 * server.c (disable_randomization): New global variable.
6622 (handle_general_set): Handle QDisableRandomization.
6623 (handle_query): Likewise for qSupported.
6624 (main): Support --disable-randomization and --no-disable-randomization
6625 command line arguments.
6626 * target.h (struct target_ops): Add supports_disable_randomization.
6627 (target_supports_disable_randomization): New macro.
6628
723b724b
MF
66292011-09-29 Mike Frysinger <vapier@gentoo.org>
6630
6631 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6632 ifdef check.
6633 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6634 [!PT_GETDSBT] (target_loadmap): New definition.
6635 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6636 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6637 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6638 and PT_GETDSBT to LINUX_LOADMAP.
6639 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6640 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6641
55329a5c 66422011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
6643
6644 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6645 (arm_linux_hwbp_cap): New static variable.
6646 (arm_linux_get_hwbp_cap): Replace by ...
6647 (arm_linux_init_hwbp_cap): ... this new function.
6648 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6649 (arm_linux_get_hw_watchpoint_count): Likewise.
6650 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6651 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6652 (arm_prepare_to_resume): Use perror_with_name instead of error.
6653
55329a5c 66542011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
6655
6656 * linux-arm-low.c: Include <signal.h>.
6657 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6658 (struct arm_linux_hwbp_cap): New data type.
6659 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6660 (struct arm_linux_hw_breakpoint): New data type.
6661 (MAX_BPTS, MAX_WPTS): Define.
6662 (struct arch_process_info, struct arch_lwp_info): New data types.
6663 (arm_linux_get_hwbp_cap): New function.
6664 (arm_linux_get_hw_breakpoint_count): Likewise.
6665 (arm_linux_get_hw_watchpoint_count): Likewise.
6666 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6667 (arm_hwbp_control_initialize): Likewise.
6668 (arm_hwbp_control_is_enabled): Likewise.
6669 (arm_hwbp_control_is_initialized): Likewise.
6670 (arm_hwbp_control_disable): Likewise.
6671 (arm_linux_hw_breakpoint_equal): Likewise.
6672 (arm_linux_hw_point_initialize): Likewise.
6673 (struct update_registers_data): New data structure.
6674 (update_registers_callback: New function.
6675 (arm_insert_point): Likewise.
6676 (arm_remove_point): Likewise.
6677 (arm_stopped_by_watchpoint): Likewise.
6678 (arm_stopped_data_address): Likewise.
6679 (arm_new_process): Likewise.
6680 (arm_new_thread): Likewise.
6681 (arm_prepare_to_resume): Likewise.
6682 (the_low_target): Register arm_insert_point, arm_remove_point,
6683 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6684 arm_new_thread, and arm_prepare_to_resume.
6685
6b9801d4
SS
66862011-09-15 Stan Shebs <stan@codesourcery.com>
6687
6688 * server.h (struct emit_ops): Add compare-goto fields.
6689 * tracepoint.c (gdb_agent_op_sizes): New table.
6690 (emit_eq_goto): New function.
6691 (emit_ne_goto): New function.
6692 (emit_lt_goto): New function.
6693 (emit_le_goto): New function.
6694 (emit_gt_goto): New function.
6695 (emit_ge_goto): New function.
6696 (is_goto_target): New function.
6697 (compile_bytecodes): Recognize special cases of compare-goto
6698 combinations and call specialized emitters for them.
6699 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6700 (amd64_emit_ne_goto): New function.
6701 (amd64_emit_lt_goto): New function.
6702 (amd64_emit_le_goto): New function.
6703 (amd64_emit_gt_goto): New function.
6704 (amd64_emit_ge_goto): New function.
6705 (amd64_emit_ops): Add the new functions.
6706 (i386_emit_eq_goto): New function.
6707 (i386_emit_ne_goto): New function.
6708 (i386_emit_lt_goto): New function.
6709 (i386_emit_le_goto): New function.
6710 (i386_emit_gt_goto): New function.
6711 (i386_emit_ge_goto): New function.
6712 (i386_emit_ops): Add the new functions.
6713
bf15cbda
SS
67142011-09-08 Stan Shebs <stan@codesourcery.com>
6715
6716 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6717 (i386_emit_epilogue): Restore %ebx.
6718
943ca1dd
JZ
67192011-08-31 Jie Zhang <jzhang918@gmail.com>
6720
6721 * server.c (step_thread): Remove definition.
6722 (process_serial_event): Don't handle Hs.
6723 * server.h (step_thread): Remove declaration.
6724 * target.c (set_desired_inferior): Remove use of step_thread.
6725
e3deef73
LM
67262011-08-24 Luis Machado <lgustavo@codesourcery.com>
6727
6728 * linux-low.c: Include linux-procfs.h.
6729 (linux_attach_lwp_1): Update comments.
6730 (linux_attach): Scan for existing threads when attaching to a
6731 process that is the tgid.
6732 * Makefile.in: Update dependencies.
6733
13da1c97
LM
67342011-08-24 Luis Machado <lgustavo@codesourcery.com>
6735
6736 * configure.srv: Add linux-procfs.o dependencies.
6737
881127c9
YQ
67382011-08-14 Yao Qi <yao@codesourcery.com>
6739
6740 * target.h (struct target_ops): Fix indent.
6741 * win32-low.c (win32_target_ops): Fix comment.
6742
58dbd541
YQ
67432011-08-14 Andrew Jenner <andrew@codesourcery.com>
6744 Yao Qi <yao@codesourcery.com>
6745
6746 * Makefile.in (clean): Remove tic6x-*.c files.
6747 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6748 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6749 (tic6x-c64xp-linux.c): Likewise.
6750 * configure.srv: Add support for tic6x-*-uclinux.
6751 * linux-tic6x-low.c: New.
6752 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6753
78d85199
YQ
67542011-08-14 Andrew Stubbs <ams@codesourcery.com>
6755 Yao Qi <yao@codesourcery.com>
6756
6757 * target.h (struct target_ops): Add read_loadmap.
6758 * linux-low.c (struct target_loadseg): New type.
6759 (struct target_loadmap): New type.
6760 (linux_read_loadmap): New function.
6761 (linux_target_ops): Add linux_read_loadmap.
6762 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
6763 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6764 to NULL.
78d85199 6765
a959a88d
EZ
67662011-08-05 Eli Zaretskii <eliz@gnu.org>
6767
6768 * win32-low.c: Include <stdint.h>.
6769
1ced966e
PA
67702011-07-22 Pedro Alves <pedro@codesourcery.com>
6771
6772 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6773 to the inferior here.
6774 (i386_remove_aligned_watchpoint): Ditto.
6775 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6776 fit part of the watchpoint in the debug registers.
6777 (i386_update_inferior_debug_regs): New.
6778 (i386_low_insert_watchpoint): Work on a local mirror of the debug
6779 registers, and only update the inferior on success.
6780 (i386_low_remove_watchpoint): Ditto.
6781
d26e3629
KY
67822011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6783
6784 * linux-low.c (compare_ints, unique, list_threads, show_process,
6785 linux_core_of_thread): Delete.
6786 (linux_target_ops): Change linux_core_of_thread to
6787 linux_common_core_of_thread.
6788 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6789 * utils.c (malloc_failure): Change type of argument.
6790 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6791 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6792 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6793 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6794 (IPA_OBJS): Add common-utils-ipa.o.
6795 (ptid_h, linux_osdata_h): New macros.
6796 (server_h): Add common/common-utils.h, common/xml-utils.h,
6797 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6798 common/ptid.h.
6799 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6800 ptid.o, buffer.o): New rules.
6801 (linux-low.o): Add common/linux-osdata.h as a dependency.
6802 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6803 * configure.ac: Add AC_HEADER_DIRENT check.
6804 * config.in: Regenerate.
6805 * configure: Regenerate.
6806 * remote-utils.c (xml_escape_text): Delete.
6807 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6808 buffer_xml_printf): Move to common/buffer.c.
6809 * server.c (main): Remove call to initialize_inferiors.
6810 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6811 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6812 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6813 internal_error, gdb_assert, gdb_assert_fail): Delete.
6814 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6815 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6816 common/buffer.h.
6817 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6818 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6819 initialize_inferiors): Delete.
6820
2275a1a7
PA
68212011-07-20 Pedro Alves <pedro@codesourcery.com>
6822
6823 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6824 symbol error.
6825
0a5b1e09
PA
68262011-05-31 Pedro Alves <pedro@codesourcery.com>
6827
6828 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6829 assertion.
6830 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6831
6938fd34
YQ
68322011-05-26 Yao Qi <yao@codesourcery.com>
6833
6834 * Makefile.in (thread-db.o): Track dependence to
6835 common/gdb_thread_db.h.
6836 * thread-db.c: include gdb_thread_db.h from right place.
6837
b481f9e0
TT
68382011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6839
6840 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6841 __FILE__ and __LINE__ to internal_error.
6842
98a5dd13
DE
68432011-05-13 Doug Evans <dje@google.com>
6844
6845 * thread-db.c (try_thread_db_load_from_sdir): New function.
6846 (try_thread_db_load_from_dir): New function.
6847 (thread_db_load_search): Handle $sdir, ignore $pdir.
6848 Remove trying of system directories if search of
6849 libthread-db-search-path fails, that is now done via $sdir.
6850
d248b706
KY
68512011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6852
6853 * server.c (handle_query): Add EnableDisableTracepoints to the list
6854 of supported features.
43aaf8b6 6855 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 6856 tracepoints.
43aaf8b6
PA
6857 (cmd_qtenable_disable): New.
6858 (cmd_qtstart): Install tracepoints even if disabled.
6859 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6860 receiving a QTEnable or QTDisable packet.
6861 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6862 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6863 tracepoints.
6864 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 6865
84e578fb
DE
68662011-05-10 Doug Evans <dje@google.com>
6867
6868 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6869
71f55dd8
DE
68702011-05-04 Doug Evans <dje@google.com>
6871
6872 * linux-low.c (linux_join): Skip process lookup.
6873 * spu-low.c (spu_join): Ditto.
6874 * server.c (join_inferiors_callback): Delete.
6875 (process_serial_event): For 'D' packet (detach) call join_inferior
6876 directly.
6877
4d393d60
JM
68782011-05-04 Joseph Myers <joseph@codesourcery.com>
6879
6880 * README: Don't mention xscale*-*-linux*.
6881 * configure.srv (xscale*-*-linux*): Don't handle target.
6882
b00ad6ff
NF
68832011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6884
6885 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6886 casting pointers.
6887 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6888 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6889 (i386_emit_void_call_2): Likewise.
6890
af96c192
YQ
68912011-04-26 Yao Qi <yao@codesourcery.com>
6892
43aaf8b6
PA
6893 * linux-low.c: Move common macros to linux-ptrace.h.
6894 Include linux-ptrace.h.
af96c192
YQ
6895 * Makefile.in (linux_ptrace_h): New.
6896 (linux-low.o): Depends on linux-ptrace.h.
6897
03f2bd59
JK
68982011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6899
6900 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6901 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6902 (remote_prepare): New function with most of the TCP code from ...
6903 (remote_open): ... here. Detect PORT here unconditionally. Move also
6904 setting transport_is_reliable.
6905 * server.c (run_once): New variable.
6906 (gdbserver_usage): Document it.
6907 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6908 the first run if RUN_ONCE.
6909 * server.h (run_once, remote_prepare): New declarations.
6910
7a9dd1b2
TT
69112011-04-19 Tom Tromey <tromey@redhat.com>
6912
6913 * win32-low.c (handle_load_dll): Remove duplicate "the".
6914
81239425
PM
69152011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6916
6917 Remove support for old Cygwin 1.5 versions.
6918 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6919 function to avoid warning.
6920 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6921 warning.
6922
9e0627f1
PM
69232011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6924
6925 * gdbserver/server.h (Macro _): Define it if not available.
6926
588eebee
MS
69272011-03-14 Michael Snyder <msnyder@vmware.com>
6928
348af9f7 6929 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 6930
43f70d4c
JB
69312011-03-10 Joel Brobecker <brobecker@adacore.com>
6932
6933 * Makefile.in (maintainer-clean realclean distclean): Remove
6934 "make ... subdir_do" command.
6935
348af9f7
MS
69362011-03-10 Michael Snyder <msnyder@vmware.com>
6937
6938 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6939
6940 * server.c (handle_v_run): Free alloced buffer on early return.
6941
e637a4f5
YQ
69422011-03-09 Yao Qi <yao@codesourcery.com>
6943
6944 Revert:
6945 2011-03-04 Yao Qi <yao@codesourcery.com>
6946
6947 * Makefile.in: Remove GNU make feature --directory.
6948
6949 2011-03-05 Yao Qi <yao@codesourcery.com>
6950
6951 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6952 (subdir_do): New make target. Copied from gdb/Makefile.
6953 (maintainer-clean, realclean, distclean, clean): Call corresponding
6954 make targets in common/Makefile.
6955
6956 2011-02-11 Yao Qi <yao@codesourcery.com>
6957
6958 * configure.ac: Call AC_PROG_RANLIB.
6959 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6960 * configure: Regenerate.
6961
e6edda56
JK
69622011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6963
6964 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6965
e5141119
JB
69662011-03-06 Yao Qi <yao@codesourcery.com>
6967
6968 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6969
64794aa4
JB
69702011-03-05 Yao Qi <yao@codesourcery.com>
6971
6972 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6973 (subdir_do): New make target. Copied from gdb/Makefile.
6974 (maintainer-clean, realclean, distclean, clean): Call corresponding
6975 make targets in common/Makefile.
6976
7a762829
YQ
69772011-03-04 Yao Qi <yao@codesourcery.com>
6978
6979 * Makefile.in: Remove GNU make feature --directory.
6980
348af9f7
MS
69812011-03-04 Michael Snyder <msnyder@vmware.com>
6982
6983 * server.c (queue_stop_reply): Call xmalloc not malloc.
6984
69852011-03-02 Michael Snyder <msnyder@vmware.com>
6986
6987 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6988
9f72fee2
MS
69892011-02-28 Michael Snyder <msnyder@vmware.com>
6990
588eebee
MS
6991 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6992 (cmd_qtframe): Ditto.
6993 (cmd_qtbuffer): Ditto.
6994 (cmd_bigqtbuffer): Ditto.
6995
9f72fee2
MS
6996 * utils.c (decimal2str): Initialize 'width' to nine, then
6997 don't mess with it.
6998
8040bd49
UW
69992011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7000
7001 * hostio.c (require_data): Free *data, not data.
7002
7e52cbd0
JK
70032011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7004
7005 * hostio.c (require_data): Use free, not xfree.
7006
9130f83e
MS
70072011-02-27 Michael Snyder <msnyder@vmware.com>
7008
4b812f4e
MS
7009 * server.c (handle_query): Discard unused value.
7010
9130f83e
MS
7011 * hostio.c (require_data): Free malloc memory before returning
7012 error.
7013
69d37113
MS
70142011-02-26 Michael Snyder <msnyder@vmware.com>
7015
7016 * linux-low.c (list_threads): Call closedir for dirent.
7017
35f5825a
MS
70182011-02-27 Michael Snyder <msnyder@vmware.com>
7019
2a589cef
MS
7020 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7021 a case statement falls through.
7022
0adea5f7
MS
7023 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7024
35f5825a
MS
7025 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7026 in comparison.
7027
238f1c74
MS
70282011-02-26 Michael Snyder <msnyder@vmware.com>
7029
7030 * utils.c (decimal2str): Eliminate dead code and dead param.
7031 (pulongest): Drop dead param from call to decimal2str.
7032 (plongest): Ditto.
7033
633ff500
JB
70342011-02-24 Joel Brobecker <brobecker@adacore.com>
7035
7036 Revert the following patch (not approved yet):
7037 2011-02-21 Hui Zhu <teawater@gmail.com>
7038 * tracepoint.c (tp_printf): New function.
7039 (eval_agent_expr): Handle gdb_agent_op_printf.
7040
f9c6ff72
HZ
70412011-02-21 Hui Zhu <teawater@gmail.com>
7042
7043 * tracepoint.c (tp_printf): New function.
7044 (eval_agent_expr): Handle gdb_agent_op_printf.
7045
94d5e490
TT
70462011-02-18 Tom Tromey <tromey@redhat.com>
7047
7048 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7049 (tracepoint.o): Likewise.
7050 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7051 (gdb_agent_op_names): Likewise.
7052
c7f96d2b
TT
70532011-02-18 Tom Tromey <tromey@redhat.com>
7054
7055 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7056 gdb_agent_op_rot>: New constants.
7057 (gdb_agent_op_names): Add pick and roll.
7058 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7059 cases.
7060
0feedb2c
JK
70612011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7062
7063 * aclocal.m4: Regenerated with aclocal-1.11.1.
7064
b3b9301e
PA
70652011-02-14 Pedro Alves <pedro@codesourcery.com>
7066
7067 * server.c (handle_qxfer_traceframe_info): New.
7068 (qxfer_packets): Register "traceframe-info".
7069 (handle_query): Report support for qXfer:traceframe-info:read+.
7070 * tracepoint.c (match_blocktype): New.
7071 (traceframe_find_block_type): Rename to ...
7072 (traceframe_walk_blocks): ... this. Add callback filter argument,
7073 and use it.
7074 (traceframe_find_block_type): New, reimplemented on top of
7075 traceframe_walk_blocks.
7076 (build_traceframe_info_xml): New.
7077 (traceframe_read_info): New.
7078 * server.h (traceframe_read_info): Declare.
7079
4f3e6fb7
YQ
70802011-02-11 Yao Qi <yao@codesourcery.com>
7081
7082 * configure.ac: Call AC_PROG_RANLIB.
7083 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7084 * configure: Regenerate.
7085
764880b7
PA
70862011-02-07 Pedro Alves <pedro@codesourcery.com>
7087
7088 * server.c (gdb_read_memory): Change return semantics to allow
7089 partial transfers.
7090 (handle_search_memory_1): Adjust.
7091 (process_serial_event) <'m' packet>: Handle partial transfers.
7092 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7093
1c79eb8a
PA
70942011-01-28 Pedro Alves <pedro@codesourcery.com>
7095
7096 * regcache.c (init_register_cache): Initialize
7097 regcache->register_status.
7098 (free_register_cache): Release regcache->register_status.
7099 (regcache_cpy): Copy register_status.
7100 (registers_to_string): Print 'x's for unavailable registers.
7101 (supply_register): Mark the register's status valid or
7102 unavailable, depending on whether a buffer was passed in or not.
7103 (supply_register_zeroed): New.
7104 (supply_regblock): Mark the registers' status valid or
7105 unavailable, depending on whether a buffer was passed in or not.
7106 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7107 (struct regcache): New `register_status' field.
7108 (supply_register_zeroed): Declare.
7109 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7110 supply_register_zeroed, rather than passing a NULL buffer to
7111 supply_register.
7112 * tracepoint.c (fetch_traceframe_registers): Update comment.
7113
85724a0e
PA
71142011-01-28 Pedro Alves <pedro@codesourcery.com>
7115
7116 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7117 buffer explicit.
7118
d08aafef
PA
71192011-01-25 Pedro Alves <pedro@codesourcery.com>
7120
7121 * server.h (decode_xfer_write): Change prototype.
7122 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7123 and don't extract the annex here.
7124 * server.c (decode_xfer_read): Remove `annex' parameter,
7125 and don't extract the annex here.
7126 (decode_xfer): New.
7127 (struct qxfer): New.
7128 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7129 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7130 (handle_qxfer_statictrace): New functions, abstracted out from
7131 handle_query, and made to use the struct qxfer interface.
7132 (handle_threads_qxfer_proper): Rename to ...
7133 (handle_qxfer_threads_proper): ... this.
7134 (handle_threads_qxfer): Rename to ...
7135 (handle_qxfer_threads): ... this. Adjust.
7136 (qxfer_packets): New array.
7137 (handle_qxfer): New function.
7138 (handle_query): Use handle_qxfer.
7139
493e2a69
MS
71402011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7141
7142 * gdbreplay.c: Shorten lines of >= 80 columns.
7143 * linux-low.c: Ditto.
7144 * linux-ppc-low.c: Ditto.
7145 * linux-s390-low.c: Ditto.
7146 * linux-sparc-low.c: Ditto.
7147 * linux-x86-low.c: Ditto.
7148 * linux-xtensa-low.c: Ditto.
7149 * mem-break.c: Ditto.
7150 * nto-low.c: Ditto.
7151 * regcache.h: Ditto.
7152 * remote-utils.c: Ditto.
7153 * server.c: Ditto.
7154 * server.h: Ditto.
7155 * thread-db.c: Ditto.
7156 * tracepoint.c: Ditto.
7157 * utils.c: Ditto.
7158 * win32-low.h: Ditto.
7159
44944448
JB
71602011-01-05 Joel Brobecker <brobecker@adacore.com>
7161
7162 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7163 update.
7164
71ce852c
JB
71652011-01-01 Joel Brobecker <brobecker@adacore.com>
7166
7167 * server.c (gdbserver_version): Update copyright year in version
7168 output.
7169 * gdbreplay.c (gdbreplay_version): Ditto.
7170
eb826dc6
MF
71712010-12-29 Jie Zhang <jie.zhang@analog.com>
7172
7173 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7174 * linux-bfin-low.c: New file.
7175 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7176 PT_DATA_ADDR for BFIN targets.
7177 * Makefile.in (SFILES): Add linux-bfin-low.c.
7178 (clean): Remove reg-bfin.c.
7179 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7180 * README: Mention supported Blackfin targets.
7181
39ab222a
MF
71822010-12-23 Mike Frysinger <vapier@gentoo.org>
7183
7184 * .gitignore: New file.
7185
a1f2ce7d
MF
71862010-11-16 Mike Frysinger <vapier@gentoo.org>
7187
7188 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7189
f474844c
JZ
71902010-10-22 Jie Zhang <jie@codesourcery.com>
7191
7192 * Makefile.in: Add FLAGS_TO_PASS variable.
7193 (install): Remove dependency of install-only and recursively
7194 invoke make for install-only.
7195
f1048712
DE
71962010-10-04 Doug Evans <dje@google.com>
7197
7198 * Makefile.in (uninstall): Use $(DESTDIR).
7199
b53a1623
PA
72002010-09-24 Pedro Alves <pedro@codesourcery.com>
7201
e6ee044d
PA
7202 PR gdb/11842
7203
b53a1623
PA
7204 * linux-x86-low.c (compat_siginfo_from_siginfo)
7205 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7206 si_code is < 0. Check for si_code == SI_TIMER before checking for
7207 si_code < 0.
7208
fa1bd1e4
JB
72092010-09-13 Joel Brobecker <brobecker@adacore.com>
7210
7211 * lynx-i386-low.c: New file.
7212 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7213
47fac8f8
JB
72142010-09-13 Joel Brobecker <brobecker@adacore.com>
7215
7216 * lynx-low.c (ptrace_request_to_str): Remove handling for
7217 request values that have been removed in LynxOS 5.x.
7218
1adfc54d
JB
72192010-09-13 Joel Brobecker <brobecker@adacore.com>
7220
7221 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7222 <ptrace.h>
7223
c2a66c29
NS
72242010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7225
7226 * configure.ac: Add --enable-inprocess-agent option.
7227 * configure: Rebuilt.
7228
32fcada3
YQ
72292010-09-06 Yao Qi <yao@codesourcery.com>
7230
7231 * linux-low.c (linux_kill): Remove unused variable.
7232 (linux_stabilize_threads): Likewise.
7233 * server.c (start_inferior): Likewise.
7234 (queue_stop_reply_callback): Likewise.
7235 * tracepoint.c (do_action_at_tracepoint): Likewise.
7236
0cccb683
YQ
72372010-09-06 Yao Qi <yao@codesourcery.com>
7238
7239 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7240 on return.
7241
423ec54c
JK
72422010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7243
7244 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7245
12ac6819
PA
72462010-09-06 Pedro Alves <pedro@codesourcery.com>
7247
7248 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7249 "$(IPA_DEPFILES)".
7250
8ed54b31
JB
72512010-09-01 Joel Brobecker <brobecker@adacore.com>
7252
7253 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7254 gdbserver/lynx-ppc-low.c: New files.
7255 * Makefile.in (lynx_low_h): New variable.
7256 (lynx-low.o, lynx-ppc-low.o): New rules.
7257 * configure.ac: On LynxOS, link with -lnetinet.
7258 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7259 * configure: regenerate.
7260
bb0116a4
JB
72612010-09-01 Joel Brobecker <brobecker@adacore.com>
7262
7263 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7264 * configure.ac: Add check for vasprintf and vsnprintf.
7265 * configure, config.in: Regenerate.
7266 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7267
a778ab81 72682010-09-01 Joel Brobecker <brobecker@adacore.com>
7269
7270 * gdbreplay.c: Move include of alloca.h up, next to include of
7271 malloc.h.
7272 * server.h: Add include of malloc.h.
7273 * mem-break.c: Remove include of malloc.h.
7274 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7275
8b034a19 72762010-09-01 Joel Brobecker <brobecker@adacore.com>
7277
7278 * Makefile.in (memmem.o): Build with -Wno-error.
7279
72802010-09-01 Joel Brobecker <brobecker@adacore.com>
7281
7282 * utils.c (xsnprintf): Make non-static.
7283 * server.h: Add xsnprintf declaration.
7284 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7285 replace calls to snprintf by calls to xsnprintf throughout.
7286
72872010-09-01 Joel Brobecker <brobecker@adacore.com>
7288
7289 * configure.ac: Add configure check for alloca.
7290 * configure, config.in: Regenerate.
7291 * server.h: Include alloca.h if it exists.
7292 * gdbreplay.c: Include alloca.h if it exists.
7293
1a981360
PA
72942010-08-28 Pedro Alves <pedro@codesourcery.com>
7295
7296 * linux-low.c (__SIGRTMIN): Define if not already defined.
7297 (linux_create_inferior): Check for __ANDROID__ rather than
7298 __SIGRTMIN.
7299 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7300 are already deferred.
7301 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7302 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7303 stopped and already has a pending signal to report.
7304 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7305 a pending signal to report or is moving out of a jump pad.
7306 (linux_init_signals): Check for __ANDROID__ rather than
7307 __SIGRTMIN.
7308
b4d51a55
PA
73092010-08-28 Pedro Alves <pedro@codesourcery.com>
7310
7311 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7312 debug_threads check. Avoid a linear search when not doing debug
7313 output.
7314
ec48365d
PA
73152010-08-27 Pedro Alves <pedro@codesourcery.com>
7316
7317 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7318 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7319 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7320 (process_event): Change local fd's type to gdb_fildes_t.
7321 (create_file_handler): Adjust prototype.
7322 (delete_file_handler): Adjust prototype.
7323 (handle_file_event): Adjust prototype. Use pfildes.
7324 (create_file_event): Adjsut prototype.
7325 * remote-utils.c (remote_desc, listen_desc): Change type to
7326 gdb_fildes_t.
7327 * server.h: New gdb_fildes_t typedef.
7328 [USE_WIN32API]: Include winsock2.h.
7329 (delete_file_handler, add_file_handler): Adjust prototypes.
7330 (pfildes): Declare.
7331 * utils.c (pfildes): New.
7332
854d88f0
PA
73332010-08-27 Pedro Alves <pedro@codesourcery.com>
7334
7335 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7336 * configure: Regenerate.
7337
0146f85b
PA
73382010-08-27 Pedro Alves <pedro@codesourcery.com>
7339
7340 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7341 (linux_done_accessing_memory): ... this.
7342 (linux_target_ops): Adjust.
7343 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7344 * nto-low.c (nto_target_ops): Adjust comment.
7345 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7346 * spu-low.c (spu_target_ops): Adjust comment.
7347 * target.h (target_ops): Rename unprepare_to_access_memory field
7348 to done_accessing_memory.
7349 (unprepare_to_access_memory): Rename to ...
7350 (done_accessing_memory): ... this.
7351
90d74c30
PA
73522010-08-26 Pedro Alves <pedro@codesourcery.com>
7353
7354 * linux-low.c (linux_prepare_to_access_memory): New.
7355 (linux_unprepare_to_access_memory): New.
7356 (linux_target_ops): Install them.
7357 * server.c (read_memory): Rename to ...
7358 (gdb_read_memory): ... this. Use
7359 prepare_to_access_memory/prepare_to_access_memory.
7360 (write_memory): Rename to ...
7361 (gdb_write_memory): ... this. Use
7362 prepare_to_access_memory/prepare_to_access_memory.
7363 (handle_search_memory_1): Adjust.
7364 (process_serial_event): Adjust.
7365 * target.h (struct target_ops): New fields
7366 prepare_to_access_memory and unprepare_to_access_memory.
7367 (prepare_to_access_memory, unprepare_to_access_memory): New.
7368 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7369 prepare_to_access_memory/prepare_to_access_memory.
7370 * nto-low.c (nto_target_ops): Adjust.
7371 * spu-low.c (spu_target_ops): Adjust.
7372 * win32-low.c (win32_target_ops): Adjust.
7373
fd467969
PA
73742010-08-26 Pedro Alves <pedro@codesourcery.com>
7375
7376 * Makefile.in (WARN_CFLAGS): Get it from configure.
7377 (WERROR_CFLAGS): New.
7378 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7379 * configure.ac: Introduce --enable-werror, which adds -Werror to
7380 the compiler command line. Enabled by default. Disable with
7381 --disable-werror. Add -Wdeclaration-after-statement
7382 Wpointer-arith and -Wformat-nonliteral to warning flags.
7383 * configure: Regenerate.
7384
331e2f5f
PA
73852010-08-26 Pedro Alves <pedro@codesourcery.com>
7386
7387 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7388
e581f2b4
PA
73892010-08-26 Pedro Alves <pedro@codesourcery.com>
7390
7391 * gdbreplay.c (remote_error): New.
7392 (gdbchar): New.
7393 (expect): Use gdbchar. Check for error reading from GDB.
7394 Clarify sync error output.
7395 (play): Check for errors writing to GDB.
7396 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7397 * remote-utils.c (getpkt): Check for errors writing to the remote
7398 descriptor.
7399
3c11dd79
PA
74002010-08-25 Pedro Alves <pedro@codesourcery.com>
7401
7402 * linux-low.c (linux_wait_1): Move non-debugging code out of
7403 `debug_threads' control.
7404
d20a8ad9
PA
74052010-08-25 Pedro Alves <pedro@codesourcery.com>
7406
7407 * linux-low.c (linux_wait_1): Don't set last_status here.
7408 * server.c (push_event, queue_stop_reply_callback): Assert we're
7409 not pushing a TARGET_WAITKIND_IGNORE event.
7410 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7411 (myresume, handle_target_event): Set the thread's last_resume_kind
7412 and last_status from the target returned status.
7413
964e4306
PA
74142010-08-25 Pedro Alves <pedro@codesourcery.com>
7415
7416 PR threads/10729
7417
7418 * linux-x86-low.c (update_debug_registers_callback): New.
7419 (i386_dr_low_set_addr): Use it.
7420 (i386_dr_low_get_addr): New.
7421 (i386_dr_low_set_control): Use update_debug_registers_callback.
7422 (i386_dr_low_get_control): New.
7423 (i386_dr_low_get_status): Adjust.
7424 * linux-low.c (linux_stop_lwp): New.
7425 * linux-low.h (linux_stop_lwp): Declare.
7426
7427 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7428 argument instead of a i386_debug_reg_state.
7429 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7430 a i386_debug_reg_state.
7431 (i386_insert_aligned_watchpoint): Adjust.
7432 (i386_remove_aligned_watchpoint): Adjust.
7433 (i386_low_stopped_data_address): Read the debug registers from the
7434 inferior instead of from the mirrors.
7435 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7436 (i386_dr_low_get_addr): Declare.
7437 (i386_dr_low_get_control): Declare.
7438 (i386_dr_low_get_status): Change prototype.
7439
7440 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7441 (i386_dr_low_get_addr): New.
7442 (i386_dr_low_get_control): New.
7443 (i386_dr_low_get_status): Adjust prototype. Return
7444 dr_status_mirror.
7445 (i386_initial_stuff): Clear dr_status_mirror and
7446 dr_control_mirror.
7447 (i386_get_thread_context): Adjust.
7448 (i386_set_thread_context): Adjust.
7449 (i386_thread_added): Adjust.
7450
5f21a75b
PA
74512010-08-24 Pedro Alves <pedro@codesourcery.com>
7452
7453 * linux-low.h (linux_thread_area): Delete declaration.
7454
3e4c1235
TS
74552010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7456
7457 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7458 after its termination.
7459
1971b033
PA
74602010-08-09 Pedro Alves <pedro@codesourcery.com>
7461
7462 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7463 (gdb_wants_all_stopped): Delete.
7464 (linux_wait_1): Don't call them.
7465 * server.c (handle_v_cont): Tag all threads as want-stopped.
7466 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7467 stopped as "client-wants-stopped".
7468
310444ac
PA
74692010-07-31 Pedro Alves <pedro@codesourcery.com>
7470
7471 * Makefile.in (signals_h): New.
7472 (server_h): Depend on it.
7473 (server.o): Don't depend on $(signals_def).
7474 (signals.o): Depend on $(signals_def).
7475
a19cae16
JK
74762010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7477
7478 * Makefile.in (signals_def): New.
7479 (server_h): Append include/gdb/signals.h and signals_def.
7480 (server.o): Append signals_def.
7481
30d50328
JK
74822010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7483
7484 * server.c (handle_target_event): Use target_signal_to_host for
7485 resume_info.sig initialization.
7486 * target.h (struct thread_resume) <sig>: New comment.
7487
5c3216e2
OS
74882010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7489
c6f46ca0
OS
7490 * server.c (handle_query): strcpy() the returned string from paddress()
7491 instead of sprintf().
5c3216e2
OS
7492 * utils.c (paddress): Return phex_nz().
7493
6bd31874
JB
74942010-07-07 Joel Brobecker <brobecker@adacore.com>
7495
7496 * server.c (handle_v_cont): Call mourn_inferior if process
7497 just exited.
7498 (myresume): Likewise.
7499
0fb4aa4b
PA
75002010-07-01 Pedro Alves <pedro@codesourcery.com>
7501
7502 Static tracepoints, and integration with UST.
7503
7504 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7505 * mem-break.c (uninsert_all_breakpoints)
7506 (reinsert_all_breakpoints): New.
7507 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7508 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7509 (gdb_agent_ust_loaded, helper_thread_id)
7510 (gdb_agent_helper_thread_id): New macros.
7511 (struct ipa_sym_addresses): Add addr_ust_loaded,
7512 addr_helper_thread_id, addr_cmd_buf.
7513 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7514 (in_process_agent_loaded_ust): New.
7515 (write_e_ust_not_loaded): New.
7516 (maybe_write_ipa_ust_not_loaded): New.
7517 (struct collect_static_trace_data_action): New.
7518 (enum tracepoint_type) <static_tracepoint>: New.
7519 (struct tracepoint) <handle>: Mention static tracepoints.
7520 (struct static_tracepoint_ctx): New.
7521 (CMD_BUF_SIZE): New.
7522 (add_tracepoint_action): Handle static tracepoint actions.
7523 (unprobe_marker_at): New.
7524 (clear_installed_tracepoints): Handle static tracepoints.
7525 (cmd_qtdp): Handle static tracepoints.
7526 (probe_marker_at): New.
7527 (cmd_qtstart): Handle static tracepoints.
7528 (response_tracepoint): Handle static tracepoints.
7529 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7530 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7531 (get_context_regcache): Handle static tracepoints.
7532 (do_action_at_tracepoint): Handle static tracepoint actions.
7533 (traceframe_find_block_type): Handle static trace data blocks.
7534 (traceframe_read_sdata): New.
7535 (download_tracepoints): Download static tracepoint actions.
7536 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7537 (GDB_PROBE_NAME): New.
7538 (ust_ops): New.
7539 (GET_UST_SYM): New.
7540 (USTF): New.
7541 (dlsym_ust): New.
7542 (ust_marker_to_static_tracepoint): New.
7543 (gdb_probe): New.
7544 (collect_ust_data_at_tracepoint): New.
7545 (gdb_ust_probe): New.
7546 (UNIX_PATH_MAX, SOCK_DIR): New.
7547 (gdb_ust_connect_sync_socket): New.
7548 (resume_thread, stop_thread): New.
7549 (run_inferior_command): New.
7550 (init_named_socket): New.
7551 (gdb_ust_socket_init): New.
7552 (cstr_to_hexstr): New.
7553 (next_st): New.
7554 (first_marker, next_marker): New.
7555 (response_ust_marker): New.
7556 (cmd_qtfstm, cmd_qtsstm): New.
7557 (unprobe_marker_at, probe_marker_at): New.
7558 (cmd_qtstmat, gdb_ust_thread): New.
7559 (gdb_ust_init): New.
7560 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7561 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7562 (ST_REGENTRY): New.
7563 (x86_64_st_collect_regmap): New.
7564 (X86_64_NUM_ST_COLLECT_GREGS): New.
7565 (AMD64_RIP_REGNUM): New.
7566 (supply_static_tracepoint_registers): New.
7567 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7568 (ST_REGENTRY): New.
7569 (i386_st_collect_regmap): New.
7570 (i386_NUM_ST_COLLECT_GREGS): New.
7571 (supply_static_tracepoint_registers): New.
7572 * server.c (handle_query): Handle qXfer:statictrace:read.
7573 <qSupported>: Report support for StaticTracepoints, and
7574 qXfer:statictrace:read features.
7575 * server.h (traceframe_read_sdata)
7576 (supply_static_tracepoint_registers): Declare.
7577 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7578 (unpack_varlen_hex): Include in IPA build.
7579 * Makefile.in (ustlibs, ustinc): New.
7580 (IPA_OBJS): Add remote-utils-ipa.o.
7581 ($(IPA_LIB)): Link -ldl and -lpthread.
7582 (UST_CFLAGS): New.
7583 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7584 * config.in, configure: Regenerate.
7585
9e4344e5
PA
75862010-06-20 Ian Lance Taylor <iant@google.com>
7587 Pedro Alves <pedro@codesourcery.com>
7588
7589 * linux-x86-low.c (always_true): Delete.
7590 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7591 trying to fool the compiler with always_true.
7592
c6beb2cb
PA
75932010-06-20 Pedro Alves <pedro@codesourcery.com>
7594
7595 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7596 conditions in gdbserver.
7597
d2ed6730
UW
75982010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7599
7600 * spu-low.c (spu_read_memory): Wrap around local store limit.
7601 (spu_write_memory): Likewise.
7602
4e29fb54
PA
76032010-06-15 Pedro Alves <pedro@codesourcery.com>
7604
7605 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7606 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7607 LONGEST uses.
7608 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7609 uses.
7610 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7611 uses with LONGEST uses.
7612
6a271cae
PA
76132010-06-14 Stan Shebs <stan@codesourcery.com>
7614 Pedro Alves <pedro@codesourcery.com>
7615
7616 Bytecode compiler.
7617
7618 * linux-x86-low.c: Include limits.h.
7619 (add_insns): New.
7620 (always_true): New.
7621 (EMIT_ASM): New.
7622 (EMIT_ASM32): New.
7623 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7624 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7625 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7626 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7627 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7628 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7629 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7630 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7631 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7632 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7633 (amd64_emit_void_call_2): New.
7634 (amd64_emit_ops): New.
7635 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7636 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7637 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7638 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7639 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7640 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7641 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7642 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7643 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7644 (i386_emit_stack_adjust, i386_emit_int_call_1)
7645 (i386_emit_void_call_2): New.
7646 (i386_emit_ops): New.
7647 (x86_emit_ops): New.
7648 (the_low_target): Install x86_emit_ops.
7649 * server.h (struct emit_ops): New.
7650 (get_raw_reg_func_addr): Declare.
7651 (current_insn_ptr, emit_error): Declare.
7652 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7653 (set_trace_state_variable_value): New defines.
7654 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7655 addr_get_trace_state_variable_value and
7656 addr_set_trace_state_variable_value.
7657 (symbol_list): New fields for get_raw_reg,
7658 get_trace_state_variable_value and set_trace_state_variable_value.
7659 (condfn): New typedef.
7660 (struct tracepoint): New field `compiled_cond'.
7661 (do_action_at_tracepoint): Clear compiled_cond.
7662 (get_trace_state_variable_value, set_trace_state_variable_value):
7663 Export in the IPA.
7664 (condition_true_at_tracepoint): If there's a compiled condition,
7665 run that.
7666 (current_insn_ptr, emit_error): New globals.
7667 (struct bytecode_address): New.
7668 (get_raw_reg_func_addr): New.
7669 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7670 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7671 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7672 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7673 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7674 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7675 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7676 (compile_tracepoint_condition, compile_bytecodes): New.
7677 * target.h (emit_ops): Forward declare.
7678 (struct target_ops): New field emit_ops.
7679 (target_emit_ops): New.
7680 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7681 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7682 * linux-low.c (linux_emit_ops): New.
7683 (linux_target_ops): Install it.
7684 * linux-low.h (struct linux_target_ops): New field emit_ops.
7685
92b72907
UW
76862010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7687
7688 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7689 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7690
fa593d66
PA
76912010-06-01 Pedro Alves <pedro@codesourcery.com>
7692 Stan Shebs <stan@codesourcery.com>
7693
7694 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7695 (all): Depend on $(extra_libraries).
7696 (install-only): Install the IPA.
7697 (IPA_OBJS, IPA_LIB): New.
7698 (clean): Remove the IPA lib.
7699 (IPAGENT_CFLAGS): New.
7700 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7701 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7702 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7703 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7704 * configure.ac: Check for atomic builtins support in the compiler.
7705 (IPA_DEPFILES, extra_libraries): Define.
7706 * configure.srv (ipa_obj): Add description.
7707 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7708 (i[34567]86-*-linux*): Set ipa_obj.
7709 (x86_64-*-linux*): Set ipa_obj.
7710 * linux-low.c (stabilizing_threads): New.
7711 (supports_fast_tracepoints): New.
7712 (linux_detach): Stabilize threads before detaching.
7713 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7714 the lwp is either not stabilizing, or is moving out of a jump pad.
7715 (linux_fast_tracepoint_collecting): New.
7716 (maybe_move_out_of_jump_pad): New.
7717 (enqueue_one_deferred_signal): New.
7718 (dequeue_one_deferred_signal): New.
7719 (linux_wait_for_event_1): If moving out of a jump pad, defer
7720 pending signals to later.
7721 (linux_stabilize_threads): New.
7722 (linux_wait_1): Check if threads need moving out of jump pads, and
7723 do it if so.
7724 (stuck_in_jump_pad_callback): New.
7725 (move_out_of_jump_pad_callback): New.
7726 (lwp_running): New.
7727 (linux_resume_one_lwp): Handle moving out of jump pads.
7728 (linux_set_resume_request): Dequeue deferred signals.
7729 (need_step_over_p): Also step over fast tracepoint jumps.
7730 (start_step_over): Also uninsert fast tracepoint jumps.
7731 (finish_step_over): Also reinsert fast tracepoint jumps.
7732 (linux_install_fast_tracepoint_jump): New.
7733 (linux_target_ops): Install linux_stabilize_threads and
7734 linux_install_fast_tracepoint_jump_pad.
7735 * linux-low.h (linux_target_ops) <get_thread_area,
7736 install_fast_tracepoint_jump_pad>: New fields.
7737 (struct lwp_info) <collecting_fast_tracepoint,
7738 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7739 (linux_get_thread_area): Declare.
7740 * linux-x86-low.c (jump_insn): New.
7741 (x86_get_thread_area): New.
7742 (append_insns): New.
7743 (push_opcode): New.
7744 (amd64_install_fast_tracepoint_jump_pad): New.
7745 (i386_install_fast_tracepoint_jump_pad): New.
7746 (x86_install_fast_tracepoint_jump_pad): New.
7747 (the_low_target): Install x86_get_thread_area and
7748 x86_install_fast_tracepoint_jump_pad.
7749 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7750 (struct fast_tracepoint_jump): New.
7751 (fast_tracepoint_jump_insn): New.
7752 (fast_tracepoint_jump_shadow): New.
7753 (find_fast_tracepoint_jump_at): New.
7754 (fast_tracepoint_jump_here): New.
7755 (delete_fast_tracepoint_jump): New.
7756 (set_fast_tracepoint_jump): New.
7757 (uninsert_fast_tracepoint_jumps_at): New.
7758 (reinsert_fast_tracepoint_jumps_at): New.
7759 (set_breakpoint_at): Use write_inferior_memory.
7760 (uninsert_raw_breakpoint): Use write_inferior_memory.
7761 (check_mem_read): Mask out fast tracepoint jumps.
7762 (check_mem_write): Mask out fast tracepoint jumps.
7763 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7764 (set_fast_tracepoint_jump): Declare.
7765 (delete_fast_tracepoint_jump)
7766 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7767 (reinsert_fast_tracepoint_jumps_at): Declare.
7768 * regcache.c: Don't compile many functions when building the
7769 in-process agent library.
7770 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7771 the register buffer in the heap.
7772 (free_register_cache): If the register buffer isn't owned by the
7773 regcache, don't free it.
7774 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7775 pre-existing register caches.
7776 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7777 type.
7778 (convert_ascii_to_int): : Constify `from' parameter type.
7779 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7780 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7781 the needed buffer in-place.
7782 (relocate_instruction): New.
7783 * server.c (handle_query) <qSymbols>: If the target supports
7784 tracepoints, give it a chance of looking up symbols. Report
7785 support for fast tracepoints.
7786 (handle_status): Stabilize threads.
7787 (process_serial_event): Adjust.
7788 * server.h (struct fast_tracepoint_jump): Forward declare.
7789 (struct process_info) <fast_tracepoint_jumps>: New field.
7790 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7791 (decode_X_packet, decode_M_packet): Adjust.
7792 (relocate_instruction): Declare.
7793 (in_process_agent_loaded): Declare.
7794 (tracepoint_look_up_symbols): Declare.
7795 (struct fast_tpoint_collect_status): Declare.
7796 (fast_tracepoint_collecting): Declare.
7797 (force_unlock_trace_buffer): Declare.
7798 (handle_tracepoint_bkpts): Declare.
7799 (initialize_low_tracepoint)
7800 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7801 * target.h (struct target_ops) <stabilize_threads,
7802 install_fast_tracepoint_jump_pad>: New fields.
7803 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7804 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7805 [HAVE_STDINT_H]: Include stdint.h.
7806 (trace_debug_1): Rename to ...
7807 (trace_vdebug): ... this.
7808 (trace_debug): Rename to ...
7809 (trace_debug_1): ... this. Add `level' parameter.
7810 (trace_debug): New.
7811 (ATTR_USED, ATTR_NOINLINE): New.
7812 (IP_AGENT_EXPORT): New.
7813 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7814 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7815 (about_to_request_buffer_space, trace_buffer_is_full)
7816 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7817 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7818 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7819 (traceframe_write_count, traceframes_created)
7820 (trace_state_variables)
7821 New renaming defines.
7822 (struct ipa_sym_addresses): New.
7823 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7824 (symbol_list): New.
7825 (ipa_sym_addrs): New.
7826 (all_tracepoint_symbols_looked_up): New.
7827 (in_process_agent_loaded): New.
7828 (write_e_ipa_not_loaded): New.
7829 (maybe_write_ipa_not_loaded): New.
7830 (tracepoint_look_up_symbols): New.
7831 (debug_threads) [IN_PROCESS_AGENT]: New.
7832 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7833 (UNKNOWN_SIDE_EFFECTS): New.
7834 (stop_tracing): New.
7835 (flush_trace_buffer): New.
7836 (stop_tracing_bkpt): New.
7837 (flush_trace_buffer_bkpt): New.
7838 (read_inferior_integer): New.
7839 (read_inferior_uinteger): New.
7840 (read_inferior_data_pointer): New.
7841 (write_inferior_data_pointer): New.
7842 (write_inferior_integer): New.
7843 (write_inferior_uinteger): New.
7844 (struct collect_static_trace_data_action): Delete.
7845 (enum tracepoint_type): New.
7846 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
7847 <actions_str, step_actions, step_actions_str>: Only include in
7848 GDBserver.
fa593d66
PA
7849 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7850 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7851 (tracepoints): Use IP_AGENT_EXPORT.
7852 (last_tracepoint): Don't include in the IPA.
7853 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7854 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7855 (alloced_trace_state_variables): New.
7856 (trace_state_variables): Use IP_AGENT_EXPORT.
7857 (traceframe_t): Delete unused variable.
7858 (circular_trace_buffer): Don't include in the IPA.
7859 (trace_buffer_start): Delete.
7860 (struct trace_buffer_control): New.
7861 (trace_buffer_free): Delete.
7862 (struct ipa_trace_buffer_control): New.
7863 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7864 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7865 New.
7866 (trace_buffer_ctrl): New.
7867 (TRACE_BUFFER_CTRL_CURR): New.
7868 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7869 Reimplement as macros.
7870 (trace_buffer_wrap): Delete.
7871 (traceframe_write_count, traceframe_read_count)
7872 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7873 (struct tracepoint_hit_ctx) <type>: New field.
7874 (struct fast_tracepoint_ctx): New.
7875 (memory_barrier): New.
7876 (cmpxchg): New.
7877 (record_tracepoint_error): Update atomically in the IPA.
7878 (clear_inferior_trace_buffer): New.
7879 (about_to_request_buffer_space): New.
7880 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7881 updating the same buffer.
7882 (add_tracepoint): Default the tracepoint's type to trap
7883 tracepoint, and orig_size to -1.
7884 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7885 internal variables.
7886 (create_trace_state_variable): New parameter `gdb'. Handle it.
7887 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7888 (cmd_qtdp): Handle fast tracepoints.
7889 (cmd_qtdv): Adjust.
7890 (max_jump_pad_size): New.
7891 (gdb_jump_pad_head): New.
7892 (get_jump_space_head): New.
7893 (claim_jump_space): New.
7894 (sort_tracepoints): New.
7895 (MAX_JUMP_SIZE): New.
7896 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7897 IPA.
7898 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7899 support. Upload fast traceframes, and delete internal IPA
7900 breakpoints.
7901 (stop_tracing_handler): New.
7902 (flush_trace_buffer_handler): New.
7903 (cmd_qtstop): Upload fast tracepoints.
7904 (response_tracepoint): Handle fast tracepoints.
7905 (tracepoint_finished_step): Upload fast traceframes. Set the
7906 tracepoint hit context's tracepoint type.
7907 (handle_tracepoint_bkpts): New.
7908 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7909 type. Add comment about fast tracepoints.
7910 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7911 non-existing action_str field.
7912 (get_context_regcache): Handle fast tracepoints.
7913 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7914 to the regcache.
7915 (fast_tracepoint_from_jump_pad_address): New.
7916 (fast_tracepoint_from_ipa_tpoint_address): New.
7917 (collecting_t): New.
7918 (force_unlock_trace_buffer): New.
7919 (fast_tracepoint_collecting): New.
7920 (collecting): New.
7921 (gdb_collect): New.
7922 (write_inferior_data_ptr): New.
7923 (target_tp_heap): New.
7924 (target_malloc): New.
7925 (download_agent_expr): New.
7926 (UALIGN): New.
7927 (download_tracepoints): New.
7928 (download_trace_state_variables): New.
7929 (upload_fast_traceframes): New.
7930 (IPA_FIRST_TRACEFRAME): New.
7931 (IPA_NEXT_TRACEFRAME_1): New.
7932 (IPA_NEXT_TRACEFRAME): New.
7933 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7934 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7935 (gdb_jump_pad_buffer_end): New.
7936 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7937 (initialize_tracepoint): Adjust.
7938 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7939 buffer. Initialize the low module.
7940 * utils.c (PREFIX, TOOLNAME): New.
7941 (malloc_failure): Use PREFIX.
7942 (error): In the IPA, an error causes an exit.
7943 (fatal, warning): Use PREFIX.
7944 (internal_error): Use TOOLNAME.
7945 (NUMCELLS): Increase to 10.
7946 * configure, config.in: Regenerate.
7947
d149dd1d
PA
79482010-06-01 Pedro Alves <pedro@codesourcery.com>
7949
7950 * server.c (handle_query) <qSupported>: Do two passes over the
7951 qSupported string to avoid nesting strtok.
7952
f6528abd
JK
79532010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7954
7955 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7956 (CDEPS): New.
7957 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7958 -Wl,--dynamic-list.
7959 * configure: Regenerate.
7960 * proc-service.list: New.
7961
ca2a87a0
JK
79622010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7963
7964 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7965 New comment.
7966
363a6e9f
OS
79672010-05-26 Ozkan Sezer <sezeroz@gmail.com>
7968
7969 * gdbreplay.c (remote_open): Check error return from socket() call by
7970 its equality to -1 not by it being negative.
7971 * remote-utils.c (remote_open): Likewise.
7972
d23b6cb1
PA
79732010-05-23 Pedro Alves <pedro@codesourcery.com>
7974
7975 * config.h: Regenerate.
7976
28d3cf85
MK
79772010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7978
7979 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7980 doesn't provide PTRACE_GET_THREAD_AREA.
7981
fea36a59
MK
79822010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7983
7984 * linux-m68k-low.c: Include <asm/ptrace.h>
7985 (ps_get_thread_area): Implement.
7986
24b066ba
DE
79872010-05-03 Doug Evans <dje@google.com>
7988
7989 * event-loop.c (struct callback_event): New struct.
7990 (callback_list): New global.
7991 (append_callback_event, delete_callback_event): New functions.
7992 (process_callback): New function.
7993 (start_event_loop): Call it.
7994 * remote-utils.c (NOT_SCHEDULED): Define.
7995 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
7996 moved out of readchar.
7997 (readchar): Rewrite. Call reschedule before returning.
7998 (reset_readchar): New function.
7999 (remote_close): Call it.
8000 (process_remaining, reschedule): New functions.
8001 * server.h (callback_handler_func): New typedef.
8002 (append_callback_event, delete_callback_event): Declare.
8003
9836d6ea
PA
80042010-05-03 Pedro Alves <pedro@codesourcery.com>
8005
8006 * proc-service.c (ps_pglobal_lookup): Use
8007 thread_db_look_up_one_symbol.
8008 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8009 parameter. Use it instead of all_symbols_looked_up.
8010 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8011 field.
8012 (all_symbols_looked_up): Don't declare.
8013 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8014 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8015 field.
8016 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8017 Set all_symbols_looked_up here.
8018 (thread_db_look_up_one_symbol): New.
8019 (thread_db_get_tls_address): Adjust.
8020 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8021 thread_db object on the heap, and tentatively set it in the
8022 process structure.
8023 (thread_db_init): Don't set all_symbols_looked_up here.
8024 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8025
7984d532
PA
80262010-05-03 Pedro Alves <pedro@codesourcery.com>
8027
8028 * linux-low.c (linux_kill, linux_detach): Adjust.
8029 (status_pending_p_callback): Remove redundant statement. Check
8030 for !TARGET_WAITIKIND_IGNORE, instead of
8031 TARGET_WAITKIND_STOPPED.
8032 (handle_tracepoints): Make sure LWP is locked. Adjust.
8033 (linux_wait_for_event_1): Adjust.
8034 (linux_cancel_breakpoints): New.
8035 (unsuspend_one_lwp): New.
8036 (unsuspend_all_lwps): New.
8037 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8038 (send_sigstop_callback): Change return type to int, add new
8039 `except' parameter and handle it.
8040 (suspend_and_send_sigstop_callback): New.
8041 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8042 pass them down. If SUSPEND, also increment the lwp's suspend
8043 count.
8044 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8045 (need_step_over_p): Don't consider suspended LWPs.
8046 (start_step_over): Adjust.
8047 (proceed_one_lwp): Change return type to int, add new `except'
8048 parameter and handle it.
8049 (unsuspend_and_proceed_one_lwp): New.
8050 (proceed_all_lwps): Use find_inferior instead of
8051 for_each_inferior.
8052 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8053 also decrement the suspend count of LWPs. Pass `except' down,
8054 instead of hacking its suspend count.
8055 (linux_pause_all): Add `freeze' parameter. Adjust.
8056 (linux_unpause_all): New.
8057 (linux_target_ops): Install linux_unpause_all.
8058 * server.c (handle_status): Adjust.
8059 * target.h (struct target_ops): New fields `unpause_all' and
8060 `cancel_breakpoints'. Add new parameter to `pause_all'.
8061 (pause_all): Add new `freeze' parameter.
8062 (unpause_all): New.
8063 (cancel_breakpoints): New.
8064 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8065 cancel breakpoints.
8066 (cmd_qtstart): Pause threads.
8067 (stop_tracing): Pause threads, and cancel breakpoints.
8068 * win32-low.c (win32_target_ops): Adjust.
8069
e471f25b
PA
80702010-05-03 Pedro Alves <pedro@codesourcery.com>
8071
8072 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8073 the inferior right away from here...
8074 (linux_wait_1): ... to here, and adjust to check the thread's
8075 last_resume_kind instead of the lwp's step or stop_expected flags.
8076
1915ef4f
PA
80772010-05-02 Pedro Alves <pedro@codesourcery.com>
8078
8079 * README: Use consistent `GDB' and `GDBserver' spellings.
8080
f9e39928
PA
80812010-05-02 Pedro Alves <pedro@codesourcery.com>
8082
8083 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8084 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8085 (linux_detach_one_lwp): Assume the lwp is stopped.
8086 (any_thread_of): Delete.
8087 (linux_detach): Stop all lwps here. Don't blindly delete all
8088 breakpoints.
8089 (delete_lwp_callback): New.
8090 (linux_mourn): Delete all lwps of the process that is gone.
8091 (linux_wait_1): Don't delete the last lwp of the process here.
8092 * mem-break.h (mark_breakpoints_out): Declare.
8093 * mem-break.c (mark_breakpoints_out): New.
8094 (free_all_breakpoints): Use it.
8095 * server.c (handle_target_event): If the process is gone, mark
8096 breakpoints out.
8097 * thread-db.c (struct thread_db) <create_bp>: New field.
8098 (thread_db_enable_reporting): Fix prototype. Store a thread event
8099 breakpoint reference in the thread_db struct.
8100 (thread_db_load_search): Clear the thread_db object.
8101 (try_thread_db_load_1): Ditto.
8102 (switch_to_process): New.
8103 (disable_thread_event_reporting): Use it.
8104 (remove_thread_event_breakpoints): New.
8105 (thread_db_detach, thread_db_mourn): Use it.
8106
1e7fc18c
PA
81072010-05-01 Pedro Alves <pedro@codesourcery.com>
8108
8109 * linux-low.c (linux_enable_event_reporting): New.
8110 (linux_wait_for_event_1, handle_extended_wait): Use it.
8111
02fc4de7
PA
81122010-04-30 Pedro Alves <pedro@codesourcery.com>
8113
8114 * linux-low.c (linux_kill_one_lwp, linux_kill)
8115 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8116 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8117 SIGSTOP even if the LWP is stopped.
8118 (send_sigstop_callback): New.
8119 (stop_all_lwps): Use send_sigstop_callback instead.
8120 (linux_resume_one_thread): Adjust.
8121 (proceed_one_lwp): Still proceed an LWP that the client has
8122 requested to stop, if we haven't reported it as stopped yet. Make
8123 sure that LWPs the client want stopped, have a pending SIGSTOP.
8124
bc3b5632
DE
81252010-04-26 Doug Evans <dje@google.com>
8126
ae1ada35
DE
8127 * server.c (handle_general_set): Make static.
8128
bc3b5632
DE
8129 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8130 Print received char after testing for error/eof instead of before.
8131 (input_interrupt): Tweak comment.
8132
65730243
DE
81332010-04-23 Doug Evans <dje@google.com>
8134
8135 * server.c (start_inferior): Print inferior argv if --debug.
8136
a8ae7dc0
AR
81372010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8138
8139 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8140 * nto-x86-low.c: Include server.h
8141
1c07cc19
PM
81422010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8143
8144 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8145 be consistent with other sources of this directory.
8146 (init_registers_amd64): Correct name of source file of this function
8147 in the comment.
8148
e0a61e09
PM
81492010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8150
8151 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8152 64-bit executables.
8153
54709339
PM
81542010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8155
8156 * win32-i386-low.c: Add 64-bit support.
8157 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8158 (init_registers_amd64): Declare.
8159 (mappings): Add 64-bit version of array.
8160 (init_windows_x86): New function.
8161 (the_low_target): Change init_arch field to init_windows_x86.
8162
e8f0053d
PM
81632010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8164
8165 * win32-low.c: Adapt to support also 64-bit architecture.
8166 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8167 (get_image_name): Use SIZE_T type for local variable `done'.
8168 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8169 (toolhelp_get_dll_name): Idem.
8170 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8171 Use uintptr_t typecast to avoid warning.
8172 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8173 (handle_exception): Use phex_nz to avoid warning.
8174 (win32_wait): Remove unused local variable `process'.
8175
c481e77e
PM
81762010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8177
8178 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8179 `amd64-avx.o'.
8180
12ea4b69
PM
81812010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8182
8183 * configure.ac: Use `ws2_32' library for srv_mingw.
8184 * configure: Regenerate.
8185 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8186 * remote-utils.c: Likewise.
8187
f6d1620c
L
81882010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8189
8190 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8191 if __x86_64__ is defined.
8192
8e642873
PM
81932010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8194
8195 * configure: Regenerate.
8196
711e434b
PM
81972010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8198
8199 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8200 * target.h (target_ops): New get_tib_address field.
8201 * win32-low.h (win32_thread_info): Add thread_local_base field.
8202 * win32-low.c (child_add_thread): Add tlb argument.
8203 Set thread_local_base field to TLB.
8204 (get_child_debug_event): Adapt to child_add_thread change.
8205 (win32_get_tib_address): New function.
8206 (win32_target_ops): Set get_tib_address field to
8207 win32_get_tib_address.
8208 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8209
505106cd
PA
82102010-04-12 Pedro Alves <pedro@codesourcery.com>
8211
505106cd
PA
8212 * linux-low.c (linux_mourn): Also remove the process.
8213 * server.c (handle_target_event): Don't remove the process here.
8214 * nto-low.c (nto_mourn): New.
8215 (nto_target_ops): Install it.
8216 * spu-low.c (spu_mourn): New.
8217 (spu_target_ops): Install it.
8218 * win32-low.c (win32_mourn): New.
8219 (win32_target_ops): Install it.
8220
e8470a06
PA
82212010-04-12 Pedro Alves <pedro@codesourcery.com>
8222
8223 * server.h (buffer_xml_printf): Remove redundant `;'.
8224
45ba0d02
PA
82252010-04-12 Pedro Alves <pedro@codesourcery.com>
8226
8227 * regcache.c (set_register_cache): Invalidate regcaches before
8228 changing the register cache layout.
8229 (regcache_invalidate_one): Allow a NULL regcache.
8230 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8231 regcaches before changing the register cache layout or the target
8232 regsets.
8233
59e04013
L
82342010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8235
8236 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8237 variable warning on Linux/x86-64.
8238
8336d594
PA
82392010-04-11 Pedro Alves <pedro@codesourcery.com>
8240
8241 GDBserver disconnected tracing support.
8242
8243 * linux-low.c (linux_remove_process): Delete.
8244 (add_lwp): Don't set last_resume_kind here.
8245 (linux_kill): Use `mourn'.
8246 (linux_detach): Use `thread_db_detach', and `mourn'.
8247 (linux_mourn): New.
8248 (linux_attach_lwp_1): Adjust comment.
8249 (linux_attach): last_resume_kind moved the thread_info; adjust.
8250 (status_pending_p_callback): Adjust.
8251 (linux_wait_for_event_1): Adjust.
8252 (count_events_callback, select_singlestep_lwp_callback)
8253 (select_event_lwp_callback, cancel_breakpoints_callback)
8254 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8255 (proceed_one_lwp): Adjust.
8256 (linux_async): Add debug output.
8257 (linux_thread_stopped): New.
8258 (linux_pause_all): New.
8259 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8260 linux_pause_all.
8261 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8262 (thread_db_free): Delete declaration.
8263 (thread_db_detach, thread_db_mourn): Declare.
8264 * thread-db.c (thread_db_init): Use thread_db_mourn.
8265 (thread_db_free): Delete, split in two.
8266 (disable_thread_event_reporting): New.
8267 (thread_db_detach): New.
8268 (thread_db_mourn): New.
8269
8270 * server.h (struct thread_info) <last_resume_kind>: New field.
8271 <attached>: Add comment.
8272 <gdb_detached>: New field.
8273 (handler_func): Change return type to int.
8274 (handle_serial_event, handle_target_event): Ditto.
8275 (gdb_connected): Declare.
8276 (tracing): Delete.
8277 (disconnected_tracing): Declare.
8278 (stop_tracing): Declare.
8279
8280 * server.c (handle_query) <qSupported>: Report support for
8281 disconnected tracing.
8282 (queue_stop_reply_callback): Account for running threads.
8283 (gdb_wants_thread_stopped): New.
8284 (gdb_wants_all_threads_stopped): New.
8285 (gdb_reattached_process): New.
8286 (handle_status): Clear the `gdb_detached' flag of all processes.
8287 In all-stop, stop all threads.
8288 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8289 (process_serial_event): If the remote connection breaks, or if an
8290 exit was forced with "monitor exit", force an event loop exit.
8291 Handle disconnected tracing on detach.
8292 (handle_serial_event): Adjust.
8293 (handle_target_event): If GDB isn't connected, forward events back
8294 to the inferior, unless the last process exited, in which case,
8295 exit gdbserver. Adjust interface.
8296
8297 * remote-utils.c (remote_open): Don't block in accept. Instead
8298 register an event loop source on the listen socket file
8299 descriptor. Refactor bits into ...
8300 (listen_desc): ... this new global.
8301 (gdb_connected): ... this new function.
8302 (enable_async_notification): ... this new function.
8303 (handle_accept_event): ... this new function.
8304 (remote_close): Clear remote_desc.
8305
8306 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8307
8308 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8309 New fields.
8310 (mourn_inferior): Define.
8311 (target_process_qsupported): Avoid the dangling else problem.
8312 (thread_stopped): Define.
8313 (pause_all): Define.
8314 (target_waitstatus_to_string): Declare.
8315 * target.c (target_waitstatus_to_string): New.
8316
8317 * tracepoint.c (tracing): Make extern.
8318 (disconnected_tracing): New.
8319 (stop_tracing): Make extern. Handle tracing stops due to GDB
8320 disconnecting.
8321 (cmd_qtdisconnected): New.
8322 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8323 (handle_tracepoint_general_set): Handle QTDisconnected.
8324
8325 * event-loop.c (event_handler_func): Change return type to int.
8326 (process_event): Bail out if the event handler wants the event
8327 loop to stop.
8328 (handle_file_event): Ditto.
8329 (start_event_loop): Bail out if the event handler wants the event
8330 loop to stop.
8331
8332 * nto-low.c (nto_target_ops): Adjust.
8333 * spu-low.c (spu_wait): Don't remove the process here.
8334 (spu_target_ops): Adjust.
8335 * win32-low.c (win32_wait): Don't remove the process here.
8336 (win32_target_ops): Adjust.
8337
5d267c4c
PA
83382010-04-11 Pedro Alves <pedro@codesourcery.com>
8339
8340 * regcache.c (realloc_register_cache): Invalidate inferior's
8341 regcache before recreating it.
8342
623ccd72
PA
83432010-04-09 Pedro Alves <pedro@codesourcery.com>
8344
8345 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8346
219f2f23
PA
83472010-04-09 Stan Shebs <stan@codesourcery.com>
8348 Pedro Alves <pedro@codesourcery.com>
8349
8350 * server.h (LONGEST): New.
8351 (struct thread_info) <while_stepping>: New field.
8352 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8353 Declare.
8354 (initialize_tracepoint, handle_tracepoint_general_set)
8355 (handle_tracepoint_query, tracepoint_finished_step)
8356 (tracepoint_was_hit, release_while_stepping_state_list):
8357 (current_traceframe): Declare.
8358 * server.c (handle_general_set): Handle tracepoint packets.
8359 (read_memory): New.
8360 (write_memory): New.
8361 (handle_search_memory_1): Use read_memory.
8362 (handle_query): Report support for conditional tracepoints, trace
8363 state variables, and tracepoint sources. Handle tracepoint
8364 queries.
8365 (main): Initialize the tracepoints module.
8366 (process_serial_event): Handle traceframe reads/writes.
8367
8368 * linux-low.c (handle_tracepoints): New.
8369 (linux_wait_1): Call it.
8370 (linux_resume_one_lwp): Handle while-stepping.
8371 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8372 (linux_target_ops): Install them.
8373 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8374 New field.
8375 * linux-x86-low.c (x86_supports_tracepoints): New.
8376 (the_low_target). Install it.
8377
8378 * mem-break.h (delete_breakpoint): Declare.
8379 * mem-break.c (delete_breakpoint): Make external.
8380
8381 * target.h (struct target_ops): Add `supports_tracepoints',
8382 `read_pc', and `write_pc' fields.
8383 (target_supports_tracepoints): Define.
8384 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8385 (phex_nz): New.
8386
8387 * regcache.h (struct regcache) <registers_owned>: New field.
8388 (init_register_cache, regcache_cpy): Declare.
8389 (regcache_read_pc, regcache_write_pc): Declare.
8390 (register_cache_size): Declare.
8391 (supply_regblock): Declare.
8392 * regcache.c (init_register_cache): New.
8393 (new_register_cache): Use it.
8394 (regcache_cpy): New.
8395 (register_cache_size): New.
8396 (supply_regblock): New.
8397 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 8398
219f2f23
PA
8399 * tracepoint.c: New.
8400
8401 * Makefile.in (OBS): Add tracepoint.o.
8402 (tracepoint.o): New rule.
8403
3a13a53b
L
84042010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8405
8406 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8407 (i386-mmx.o): New.
8408 (i386-mmx.c): Likewise.
8409 (i386-mmx-linux.o): Likewise.
8410 (i386-mmx-linux.c): Likewise.
8411
8412 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8413 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8414 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8415 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8416
8417 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8418 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8419 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8420
1570b33e
L
84212010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8422
8423 * Makefile.in (clean): Updated.
8424 (i386-avx.o): New.
8425 (i386-avx.c): Likewise.
8426 (i386-avx-linux.o): Likewise.
8427 (i386-avx-linux.c): Likewise.
8428 (amd64-avx.o): Likewise.
8429 (amd64-avx.c): Likewise.
8430 (amd64-avx-linux.o): Likewise.
8431 (amd64-avx-linux.c): Likewise.
8432
8433 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8434 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8435 (srv_amd64_regobj): Add amd64-avx.o.
8436 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8437 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8438 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8439 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8440 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8441 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8442 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8443
8444 * i387-fp.c: Include "i386-xstate.h".
8445 (i387_xsave): New.
8446 (i387_cache_to_xsave): Likewise.
8447 (i387_xsave_to_cache): Likewise.
8448 (x86_xcr0): Likewise.
8449
8450 * i387-fp.h (i387_cache_to_xsave): Likewise.
8451 (i387_xsave_to_cache): Likewise.
8452 (x86_xcr0): Likewise.
8453
8454 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8455 * linux-crisv32-low.c (target_regsets): Likewise.
8456 * linux-m68k-low.c (target_regsets): Likewise.
8457 * linux-mips-low.c (target_regsets): Likewise.
8458 * linux-ppc-low.c (target_regsets): Likewise.
8459 * linux-s390-low.c (target_regsets): Likewise.
8460 * linux-sh-low.c (target_regsets): Likewise.
8461 * linux-sparc-low.c (target_regsets): Likewise.
8462 * linux-xtensa-low.c (target_regsets): Likewise.
8463
8464 * linux-low.c: Include <sys/uio.h>.
8465 (regsets_fetch_inferior_registers): Support nt_type.
8466 (regsets_store_inferior_registers): Likewise.
8467 (linux_process_qsupported): New.
8468 (linux_target_ops): Add linux_process_qsupported.
8469
8470 * linux-low.h (regset_info): Add nt_type.
8471 (linux_target_ops): Add process_qsupported.
8472
8473 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8474 and <sys/uio.h>.
8475 (init_registers_i386_avx_linux): New.
8476 (init_registers_amd64_avx_linux): Likewise.
8477 (xmltarget_i386_linux_no_xml): Likewise.
8478 (xmltarget_amd64_linux_no_xml): Likewise.
8479 (PTRACE_GETREGSET): Likewise.
8480 (PTRACE_SETREGSET): Likewise.
8481 (x86_fill_xstateregset): Likewise.
8482 (x86_store_xstateregset): Likewise.
8483 (use_xml): Likewise.
8484 (x86_linux_update_xmltarget): Likewise.
8485 (x86_linux_process_qsupported): Likewise.
8486 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8487 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8488 init_registers_i386_linux here. Call
8489 x86_linux_update_xmltarget.
8490 (the_low_target): Add x86_linux_process_qsupported.
8491
8492 * server.c (handle_query): Call target_process_qsupported.
8493
8494 * target.h (target_ops): Add process_qsupported.
8495 (target_process_qsupported): New.
8496
fc7238bb
PA
84972010-04-03 Pedro Alves <pedro@codesourcery.com>
8498
8499 * inferiors.c (add_thread): Set last_status kind to
8500 TARGET_WAITKIND_IGNORE.
8501 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8502 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8503 (linux_wait_1): Move `thread' local definition to block that uses
8504 it. Don't NULL initialize `event_child'.
8505 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8506 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8507 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8508
bdabb078
PA
85092010-04-01 Pedro Alves <pedro@codesourcery.com>
8510
8511 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8512 an extended waitstatus, or by a watchpoint.
8513 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8514 thread was stepping or has been stopped by a watchpoint.
8515
d3bbe7a0
PA
85162010-04-01 Pedro Alves <pedro@codesourcery.com>
8517
8518 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8519 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8520 of another, then delete the previous, and validate all
8521 breakpoints.
8522 (validate_inserted_breakpoint): New.
8523 (delete_disabled_breakpoints): New.
8524 (validate_breakpoints): New.
8525 (check_mem_read): Validate breakpoints before trusting their
8526 shadow. Delete disabled breakpoints.
8527 (check_mem_write): Validate breakpoints before trusting they
8528 should be inserted. Delete disabled breakpoints.
8529 * mem-break.h (validate_breakpoints):
8530 * server.c (handle_query): Validate breakpoints when we see a
8531 qSymbol query.
8532
8b07ae33
PA
85332010-04-01 Pedro Alves <pedro@codesourcery.com>
8534
8535 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8536 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8537 if we could tell there's a GDB breakpoint at stop_pc.
8538 (need_step_over_p): Don't do a step over if we find a GDB
8539 breakpoint at the resume PC.
8540
8541 * mem-break.c (struct raw_breakpoint): New.
8542 (enum bkpt_type): New type `gdb_breakpoint'.
8543 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8544 fields. New field `raw'.
8545 (find_raw_breakpoint_at): New.
8546 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8547 breakpoint instead.
8548 (set_breakpoint_at): Adjust.
8549 (delete_raw_breakpoint): New.
8550 (release_breakpoint): New.
8551 (delete_breakpoint): Rename to...
8552 (delete_breakpoint_1): ... this. Add proc parameter. Use
8553 release_breakpoint. Return ENOENT.
8554 (delete_breakpoint): Reimplement.
8555 (find_breakpoint_at): Delete.
8556 (find_gdb_breakpoint_at): New.
8557 (delete_breakpoint_at): Delete.
8558 (set_gdb_breakpoint_at): New.
8559 (delete_gdb_breakpoint_at): New.
8560 (gdb_breakpoint_here): New.
8561 (set_reinsert_breakpoint): Use release_breakpoint.
8562 (uninsert_breakpoint): Rename to ...
8563 (uninsert_raw_breakpoint): ... this.
8564 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8565 (reinsert_raw_breakpoint): Change parameter type to
8566 raw_breakpoint.
8567 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8568 instead.
8569 (check_breakpoints): Adjust. Use release_breakpoint.
8570 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8571 (breakpoint_inserted_here): Ditto.
8572 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8573 Don't trust the breakpoint's shadow if it is not inserted.
8574 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8575 (delete_all_breakpoints): Adjust.
8576 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8577 use delete_breakpoint_1.
8578
8579 * mem-break.h (breakpoints_supported): Delete declaration.
8580 (set_gdb_breakpoint_at): Declare.
8581 (gdb_breakpoint_here): Declare.
8582 (delete_breakpoint_at): Delete.
8583 (delete_gdb_breakpoint_at): Declare.
8584
8585 * server.h (struct raw_breakpoint): Forward declare.
8586 (struct process_info): New field `raw_breakpoints'.
8587
8588 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8589 breakpoints.
8590
6bf5e0ba
PA
85912010-03-24 Pedro Alves <pedro@codesourcery.com>
8592
8593 * linux-low.c (status_pending_p_callback): Fix comment.
8594 (linux_wait_for_event_1): Move most of the internal breakpoint
8595 handling from here...
8596 (linux_wait_1): ... to here.
8597 (count_events_callback): New.
8598 (select_singlestep_lwp_callback): New.
8599 (select_event_lwp_callback): New.
8600 (cancel_breakpoints_callback): New.
8601 (select_event_lwp): New.
8602 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8603 priority to all LWPs that have had events that should be reported
8604 to the client. Cancel breakpoints when about to reporting the
8605 event to the client, not while stopping lwps. No longer cancel
8606 finished single-steps here.
8607 (cancel_finished_single_step): Delete.
8608 (cancel_finished_single_steps): Delete.
8609
414a389f
PA
86102010-03-24 Pedro Alves <pedro@codesourcery.com>
8611
8612 * mem-break.c (enum bkpt_type): New.
8613 (struct breakpoint): New field `type'.
8614 (set_breakpoint_at): Change return type to struct breakpoint
8615 pointer. Set type to `other_breakpoint' by default.
8616 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8617 in the breakpoint list.
8618 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8619 (reinsert_breakpoint): Rename to ...
8620 (reinsert_raw_breakpoint): ... this.
8621 (reinsert_breakpoints_at): Adjust.
8622 * mem-break.h (struct breakpoint): Declare.
8623 (set_breakpoint_at): Change return type to struct breakpoint
8624 pointer.
8625
2280c721
PA
86262010-03-24 Pedro Alves <pedro@codesourcery.com>
8627
8628 * server.c (handle_query): Assign, not compare.
8629
d50171e4
PA
86302010-03-24 Pedro Alves <pedro@codesourcery.com>
8631
8632 Teach linux gdbserver to step-over-breakpoints.
8633
8634 * linux-low.c (can_hardware_single_step): New.
8635 (supports_breakpoints): New.
8636 (handle_extended_wait): If stopping threads, read the stop pc of
8637 the new cloned LWP.
8638 (get_pc): New.
8639 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8640 low target doesn't support retrieving the PC.
8641 (add_lwp): Set last_resume_kind to resume_continue.
8642 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8643 (linux_attach): Don't clear stop_expected. Set the lwp's
8644 last_resume_kind to resume_stop.
8645 (linux_detach_one_lwp): Don't check for removed breakpoints.
8646 (check_removed_breakpoint): Delete.
8647 (status_pending_p): Rename to ...
8648 (status_pending_p_callback): ... this. Don't check for removed
8649 breakpoints. Don't consider threads that are stopped from GDB's
8650 perspective.
8651 (linux_wait_for_lwp): Always read the stop_pc here.
8652 (cancel_breakpoint): New.
8653 (step_over_bkpt): New global.
8654 (linux_wait_for_event_1): Implement stepping over breakpoints.
8655 (gdb_wants_lwp_stopped): New.
8656 (gdb_wants_all_stopped): New.
8657 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8658 single-step traps here. Store the thread's last reported target
8659 wait status.
8660 (send_sigstop): Don't clear stop_expected. Always set it,
8661 instead.
8662 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8663 (cancel_finished_single_step): New.
8664 (cancel_finished_single_steps): New.
8665 (wait_for_sigstop): Don't cancel finished single-step traps here.
8666 (linux_resume_one_lwp): Don't check for removed breakpoints.
8667 Don't set `step' on non-hardware step archs.
8668 (linux_set_resume_request): Ignore resume_stop requests if already
8669 stopping or stopped. Set the lwp's last_resume_kind.
8670 (resume_status_pending_p): Don't check for removed breakpoints.
8671 (need_step_over_p): New.
8672 (start_step_over): New.
8673 (finish_step_over): New.
8674 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8675 requests. Clear the thread's last reported target waitstatus.
8676 Don't use the `suspended' flag. Don't consider pending breakpoints.
8677 (linux_resume): Start a step-over if necessary.
8678 (proceed_one_lwp): New.
8679 (proceed_all_lwps): New.
8680 (unstop_all_lwps): New.
8681 * linux-low.h (struct lwp_info): Rewrite comment for the
8682 `suspended' flag. Add the `stop_pc' field. Delete the
8683 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8684 Add `'last_resume_kind' and `need_step_over' fields.
8685 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8686 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8687 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8688 (set_raw_breakpoint_at): New.
8689 (set_breakpoint_at): Rewrite to use it.
8690 (reinsert_breakpoint_handler): Delete.
8691 (set_reinsert_breakpoint): New.
8692 (reinsert_breakpoint_by_bp): Delete.
8693 (delete_reinsert_breakpoints): New.
8694 (uninsert_breakpoint): Rewrite.
8695 (uninsert_breakpoints_at): New.
8696 (reinsert_breakpoint): Rewrite.
8697 (reinsert_breakpoints_at): New.
8698 (check_breakpoints): Rewrite.
8699 (breakpoint_here): New.
8700 (breakpoint_inserted_here): New.
8701 (check_mem_read): Adjust.
8702 * mem-break.h (breakpoints_supported, breakpoint_here)
8703 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8704 (reinsert_breakpoint_by_bp): Delete declaration.
8705 (delete_reinsert_breakpoints): Declare.
8706 (reinsert_breakpoint): Delete declaration.
8707 (reinsert_breakpoints_at): Declare.
8708 (uninsert_breakpoint): Delete declaration.
8709 (uninsert_breakpoints_at): Declare.
8710 (check_breakpoints): Adjust prototype.
8711 * server.h: Adjust include order.
8712 (struct thread_info): Declare here. Add a `last_status' field.
8713
30ba68cb
MS
87142010-03-23 Michael Snyder <msnyder@vmware.com>
8715
8716 * server.c (crc32): New function.
8717 (handle_query): Add handling for 'qCRC:' request.
8718
b9a881c2
PA
87192010-03-23 Pedro Alves <pedro@codesourcery.com>
8720
8721 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8722 lwp had been stopped by a watchpoint.
8723
e92d13d5
PA
87242010-03-16 Pedro Alves <pedro@codesourcery.com>
8725
8726 * server.h (internal_error): Declare.
8727 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8728 * utils.c (internal_error): New function.
8729
64daa791
AS
87302010-03-15 Andreas Schwab <schwab@redhat.com>
8731
8732 * configure.srv: Fix typo setting srv_regobj.
8733
f52cd8cd
PA
87342010-03-15 Pedro Alves <pedro@codesourcery.com>
8735
8736 * linux-low.c (fetch_register): Avoid passing a non string literal
8737 format to `error'.
8738 (usr_store_inferior_registers): Ditto.
8739
93ae6fdc
PA
87402010-03-14 Pedro Alves <pedro@codesourcery.com>
8741
8742 * linux-low.c (linux_write_memory): Bail out early if peeking
8743 memory failed.
8744
c3adc08c
PA
87452010-03-14 Pedro Alves <pedro@codesourcery.com>
8746
8747 * linux-low.h (struct lwp_info): New fields
8748 `stopped_by_watchpoint' and `stopped_data_address'.
8749 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8750 here, and cache them in the lwp object.
8751 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8752 directly.
8753 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8754 field.
8755 (linux_stopped_by_watchpoint): Rewrite.
8756 (linux_stopped_data_address): Rewrite.
8757
bce522a2
PA
87582010-03-06 Simo Melenius <simo.melenius@iki.fi>
8759
8760 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8761 switching the current inferior, not before.
8762
90884b2b
L
87632010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8764
8765 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8766 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8767 i386-linux.c and amd64-linux.c.
8768 (reg-i386.o): Removed.
8769 (reg-i386.c): Likewise.
8770 (reg-i386-linux.o): Likewise.
8771 (reg-i386-linux.c): Likewise.
8772 (reg-x86-64.o): Likewise.
8773 (reg-x86-64.c): Likewise.
8774 (reg-x86-64-linux.o): Likewise.
8775 (reg-x86-64-linux.c): Likewise.
8776 (i386.o): New.
8777 (i386.c): Likewise.
8778 (i386-linux.o): Likewise.
8779 (i386-linux.c): Likewise.
8780 (amd64.o): Likewise.
8781 (amd64.c): Likewise.
8782 (amd64-linux.o): Likewise.
8783 (amd64-linux.c): Likewise.
8784
8785 * configure.srv (srv_i386_regobj): New.
8786 (srv_i386_linux_regobj): Likewise.
8787 (srv_amd64_regobj): Likewise.
8788 (srv_amd64_linux_regobj): Likewise.
8789 (srv_i386_32bit_xmlfiles): Likewise.
8790 (srv_i386_64bit_xmlfiles): Likewise.
8791 (srv_i386_xmlfiles): Likewise.
8792 (srv_amd64_xmlfiles): Likewise.
8793 (srv_i386_linux_xmlfiles): Likewise.
8794 (srv_amd64_linux_xmlfiles): Likewise.
8795 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8796 srv_xmlfiles to $srv_i386_xmlfiles.
8797 (i[34567]86-*-mingw32ce*): Likewise.
8798 (i[34567]86-*-mingw*): Likewise.
8799 (i[34567]86-*-nto*): Likewise.
8800 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8801 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8802 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8803 (x86_64-*-linux*): Likewise.
8804
8805 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8806 (init_registers_amd64_linux): New.
8807 (x86_arch_setup): Replace init_registers_x86_64_linux with
8808 init_registers_amd64_linux.
8809
193f13e6
MK
88102010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8811
8812 * configure.ac: Check for libdl. If it is not available link against
8813 static libthread_db.
8814 * configure: Regenerate.
8815
85d721b8
PA
88162010-02-22 Pedro Alves <pedro@codesourcery.com>
8817
8818 PR9605
8819
8820 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8821 handing a read watchpoint.
8822 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8823
6076632b
DE
88242010-02-12 Doug Evans <dje@google.com>
8825
8826 * linux-low.c (linux_supports_tracefork_flag): Document.
8827 (linux_look_up_symbols): Add comment.
8828
3327ccf7
L
88292010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8830
8831 * regcache.c (supply_register): Clear regcache if buf is NULL.
8832
0718675c 88332010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 8834 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
8835
8836 * inferiors.c (find_inferior): Add function documentation.
8837 (unloaded_dll): Handle the case where the unloaded dll has not
8838 been previously registered in the dll list.
8839
177321bd
DJ
88402010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8841
8842 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8843 (thumb2_breakpoint): New.
8844 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8845
2b009048
DJ
88462010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8847
8848 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8849 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8850 breakpoints.
8851
3be029c7
PA
88522010-01-21 Pedro Alves <pedro@codesourcery.com>
8853
8854 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8855
18f5de3b
JK
88562010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8857
8858 * linux-s390-low.c (s390_collect_ptrace_register)
8859 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8860
3743bb4f
DE
88612010-01-21 Doug Evans <dje@google.com>
8862
14ce3065
DE
8863 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8864 (PTRACE_ARG4_TYPE): New macro.
8865 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8866 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8867 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8868 (usr_store_inferior_registers): Ditto.
8869 (linux_read_memory, linux_write_memory): Ditto.
8870 (linux_test_for_tracefork): Ditto.
8871
3743bb4f
DE
8872 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8873 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8874
8b315be5
PA
88752010-01-21 Pedro Alves <pedro@codesourcery.com>
8876
8877 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8878 target.
8879
85492558
PA
88802010-01-21 Pedro Alves <pedro@codesourcery.com>
8881
8882 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8883 prototype to take a regcache. Adjust.
8884
442ea881
PA
88852010-01-20 Pedro Alves <pedro@codesourcery.com>
8886
8887 * regcache.h (struct thread_info): Forward declare.
8888 (struct regcache): New.
8889 (new_register_cache): Adjust prototype.
8890 (get_thread_regcache): Declare.
8891 (free_register_cache): Adjust prototype.
8892 (registers_to_string, registers_from_string): Ditto.
8893 (supply_register, supply_register_by_name, collect_register)
8894 (collect_register_as_string, collect_register_by_name): Ditto.
8895 * regcache.c (struct inferior_regcache_data): Delete.
8896 (get_regcache): Rename to ...
8897 (get_thread_regcache): ... this. Adjust. Switch inferior before
8898 fetching registers.
8899 (regcache_invalidate_one): Adjust.
8900 (regcache_invalidate): Fix prototype.
8901 (new_register_cache): Return the new register cache.
8902 (free_register_cache): Change prototype.
8903 (realloc_register_cache): Adjust.
8904 (registers_to_string): Change prototype to take a regcache. Adjust.
8905 (registers_from_string): Ditto.
8906 (register_data): Ditto.
8907 (supply_register): Ditto.
8908 (supply_register_by_name): Ditto.
8909 (collect_register): Ditto.
8910 (collect_register_as_string): Ditto.
8911 (collect_register_by_name): Ditto.
8912 * server.c (process_serial_event): Adjust.
8913 * linux-low.h (regset_fill_func, regset_store_func): Change
8914 prototype.
8915 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8916 Change prototype.
8917 * linux-low.c (get_stop_pc): Adjust.
8918 (check_removed_breakpoint): Adjust.
8919 (linux_wait_for_event): Adjust.
8920 (linux_resume_one_lwp): Adjust.
8921 (fetch_register): Add regcache parameter. Adjust.
8922 (usr_store_inferior_registers): Ditto.
8923 (regsets_fetch_inferior_registers): Ditto.
8924 (regsets_store_inferior_registers): Ditto.
8925 (linux_fetch_registers, linux_store_registers): Ditto.
8926 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8927 regcache. Adjust.
43aaf8b6
PA
8928 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8929 Ditto.
442ea881
PA
8930 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8931 prototype to take a regcache.
8932 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8933 * remote-utils.c (convert_ascii_to_int, outreg)
8934 (prepare_resume_reply): Change prototype to take a regcache.
8935 Adjust.
8936 * target.h (struct target_ops) <fetch_registers, store_registers>:
8937 Change prototype to take a regcache.
8938 (fetch_inferior_registers, store_inferior_registers): Change
8939 prototype to take a regcache. Adjust.
8940 * proc-service.c (ps_lgetregs): Adjust.
8941 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8942 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8943 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8944 take a regcache. Adjust.
8945 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8946 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8947 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8948 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8949 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8950 (cris_cannot_fetch_register):
8951 (cris_breakpoint_at): Change prototype to take a regcache.
8952 Adjust.
8953 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8954 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8955 to take a regcache. Adjust.
8956 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8957 Adjust.
8958 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8959 take a regcache. Adjust.
8960 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8961 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8962 (m68k_set_pc): Change prototype to take a regcache. Adjust.
8963 * linux-mips-low.c (mips_get_pc):
8964 (mips_set_pc): Change prototype to take a regcache. Adjust.
8965 (mips_reinsert_addr): Adjust.
8966 (mips_collect_register): Change prototype to take a regcache.
8967 Adjust.
8968 (mips_supply_register):
8969 (mips_collect_register_32bit, mips_supply_register_32bit)
8970 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8971 (mips_store_fpregset): Ditto.
43aaf8b6
PA
8972 * linux-ppc-low.c (ppc_supply_ptrace_register)
8973 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
8974 (parse_spufs_run): Adjust.
8975 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8976 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8977 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8978 take a regcache. Adjust.
8979 * linux-s390-low.c (s390_collect_ptrace_register)
8980 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8981 (s390_set_pc): Change prototype to take a regcache. Adjust.
8982 (s390_arch_setup): Adjust.
8983 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8984 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
8985 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8986 (sparc_fill_gregset, sparc_store_gregset_from_stack)
8987 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8988 regcache. Adjust.
8989 (sparc_breakpoint_at): Adjust.
8990 * linux-xtensa-low.c (xtensa_fill_gregset):
8991 (xtensa_store_gregset):
8992 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
8993 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
8994 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
8995 prototype to take a regcache. Adjust.
8996 * win32-arm-low.c (arm_fetch_inferior_register)
8997 (arm_store_inferior_register): Change prototype to take a
8998 regcache. Adjust.
8999 * win32-i386-low.c (i386_fetch_inferior_register)
9000 (i386_store_inferior_register): Change prototype to take a
9001 regcache. Adjust.
9002 * win32-low.c (child_fetch_inferior_registers)
9003 (child_store_inferior_registers): Change prototype to take a
9004 regcache. Adjust.
9005 (win32_wait): Adjust.
9006 (win32_fetch_inferior_registers): Change prototype to take a
9007 regcache. Adjust.
9008 (win32_store_inferior_registers): Adjust.
9009 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9010 store_inferior_register>: Change prototype to take a regcache.
9011
60c3d7b0
DE
90122010-01-20 Doug Evans <dje@google.com>
9013
9014 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9015 #ifdef.
9016 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 9017 (W_STOPCODE): Provide definition if missing.
60c3d7b0 9018
dc146f7c
VP
90192010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9020
9021 * linux-low.c (linux_core_of_thread): New.
9022 (compare_ints, show_process, list_threads): New.
9023 (linux_qxfer_osdata): Report threads and cores.
9024 (linux_target_op): Register linux_core_of_thread.
9025 * remote-utils.c (prepare_resume_reply): Report the core.
9026 (buffer_xml_printf): Support %d specifier.
9027 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9028 New.
9029 (handle_query): Handle qXfer:threads. Announce availability
9030 thereof.
9031 * target.h (struct target_ops): New field core_of_thread.
9032
7803799a
UW
90332010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9034
9035 * Makefile.in (clean): Remove new generated files.
9036 (reg-s390.o, reg-s390.c): Remove rules.
9037 (reg-s390x.o, reg-s390x.c): Likewise.
9038 (s390-linux32.o, s390-linux32.c): Add rules.
9039 (s390-linux64.o, s390-linux64.c): Likewise.
9040 (s390x-linux64.o, s390x-linux64.c): Likewise.
9041 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9042 * linux-s390-low.c: Include <elf.h>.
9043 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9044 (init_registers_s390): Remove prototype.
9045 (init_registers_s390x): Likewise.
9046 (init_registers_s390_linux32): Add prototype.
9047 (init_registers_s390_linux64): Likewise.
9048 (init_registers_s390x_linux64): Likewise.
9049 (s390_num_regs_3264): New define.
9050 (s390_regmap_3264): New global variable.
9051 (s390_cannot_fetch_register): Remove obsolete check.
9052 (s390_cannot_store_register): Likewise.
9053 (s390_collect_ptrace_register): Handle upper/lower register halves.
9054 (s390_supply_ptrace_register): Likewise.
9055 (s390_fill_gregset): Update to register number changes.
9056 (s390_get_hwcap): New routine.
9057 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9058 Install appropriate regmap and register set.
9059
6e7ffa39
JB
90602010-01-01 Joel Brobecker <brobecker@adacore.com>
9061
9062 * server.c (gdbserver_version): Update copyright year to 2010.
9063 * gdbreplay.c (gdbreplay_version): Likewise.
9064
957f3f49
DE
90652009-12-28 Doug Evans <dje@google.com>
9066
9067 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9068 elf/external.h. Include <elf.h> instead but only if necessary.
9069
ca5c370d
PA
90702009-12-28 Pedro Alves <pedro@codesourcery.com>
9071
9072 * linux-low.c (linux_remove_process): Remove `detaching'
9073 parameter. Don't release/detach from thread_db here.
9074 (linux_kill): Release/detach from thread_db here, ...
9075 (linux_detach): ... and here, before actually detaching.
9076 (linux_wait_1): ... and here, when a process exits.
9077 * thread-db.c (any_thread_of): New.
9078 (thread_db_free): Switch the current inferior to a thread of the
9079 passed in process.
9080
4ee62156
DE
90812009-12-21 Doug Evans <dje@google.com>
9082
d90e6a88
DE
9083 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9084
c5f62d5f
DE
9085 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9086 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9087 warning ifndef __NR_tkill. Move setting of errno there too.
9088 Delete unnecessary resetting of errno after syscall.
9089 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9090
10e86dd7
DE
9091 * configure.ac: Check for dladdr.
9092 * config.in: Regenerate.
9093 * configure: Regenerate.
9094 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9095 (try_thread_db_load): Update.
9096
4ee62156
DE
9097 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9098
00f515da
DE
90992009-12-18 Doug Evans <dje@google.com>
9100
e9464885
DE
9101 * event-loop.c: Include unistd.h if it exists.
9102
07d4f67e
DE
9103 * linux-low.c (my_waitpid): Move definition away from being in
9104 between linux_tracefork_child/linux_test_for_tracefork.
9105
00f515da
DE
9106 * gdb_proc_service.h (psaddr_t): Fix type.
9107 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9108 signature to match glibc.
9109
1de1badb
DE
91102009-12-16 Doug Evans <dje@google.com>
9111
9112 * linux-low.c (linux_read_memory): Fix argument to read.
9113
aeeb81d1
PA
91142009-11-26 Pedro Alves <pedro@codesourcery.com>
9115
9116 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9117 events, don't leave current_inferior pointing at null.
9118
10357975
PA
91192009-11-26 Pedro Alves <pedro@codesourcery.com>
9120
9121 * win32-low.c (LOG): Delete.
9122 (OUTMSG): Output to stderr.
9123 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9124 on compile time LOG macro.
9125 (win32_wait): Fix debug output.
9126
cf6e3471
PA
91272009-11-26 Pedro Alves <pedro@codesourcery.com>
9128
9129 * win32-low.c (win32_add_one_solib): If the dll name is
9130 "ntdll.dll", prepend the system directory to the dll path.
9131
0c85e18e
MK
91322009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9133
9134 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9135
9ac544ce 91362009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 9137 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
9138
9139 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9140 * configure.ac: Check for __mcoldfire__ and set
9141 gdb_cv_m68k_is_coldfire.
9142 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9143 reg-cf.o and reg-m68k.o.
9144 * configure: Regenerated.
9145
fd7dd3e6
PA
91462009-11-16 Pedro Alves <pedro@codesourcery.com>
9147
9148 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9149 Pass it to thread_db_free.
9150 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9151 proper `detaching' argument to linux_remove_process.
9152 * linux-low.h (thread_db_free): Add `detaching' parameter.
9153 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9154 to thread_db_free.
9155 (thread_db_free): Add `detaching' parameter. Only
9156 call td_ta_clear_event if detaching from process.
9157
75aa492e
MK
91582009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9159
9160 * thread-db.c (thread_db_free): Fix typo.
9161
21e1bee4
PP
91622009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9163
9164 PR gdb/10838
9165 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9166
8838b45e
NS
91672009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9168
9169 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9170 with an i686 compiler.
9171 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9172 needed.
9173 * configure: Rebuilt.
9174
8a35fb51
SL
91752009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9176
9177 PR gdb/10783
9178
9179 * server.c (handle_search_memory_1): Correct read_addr initialization
9180 in loop for searching subsequent chunks.
9181
96f15937
PP
91822009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9183
9184 * configure.ac: New --with-libthread-db option.
9185 * thread-db.c: Allow direct dependence on libthread_db.
9186 (thread_db_free): Adjust.
9187 * config.in: Regenerate.
9188 * configure: Likewise.
889bf7c5 9189
5f7d1694
PP
91902009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9191
9192 PR gdb/10757
9193 * thread-db.c (attach_thread): New function.
9194 (maybe_attach_thread): Return success/failure.
9195 (find_new_threads_callback): Adjust.
889bf7c5
PA
9196 (thread_db_find_new_threads): Loop until no new threads.
9197
88e3b899
PA
91982009-10-13 Pedro Alves <pedro@codesourcery.com>
9199
9200 * proc-service.c (ps_lgetregs): Formatting.
9201
cdbfd419
PP
92022009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9203
9204 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9205 * configure.ac: Adjust.
9206 * linux-low.h (struct process_info_private): Move members to struct
9207 thread_db.
9208 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9209 * linux-low.c (linux_remove_process): Adjust.
9210 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9211 * server.c (handle_query): Move code ...
9212 (handle_monitor_command): ... here. New function.
9213 * target.h (struct target_ops): New member.
9214 * thread-db.c (struct thread_db): New.
9215 (libthread_db_search_path): New variable.
9216 (thread_db_create_event, thread_db_enable_reporting)
9217 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9218 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9219 (try_thread_db_load_1, dladdr_to_soname): New functions.
9220 (try_thread_db_load, thread_db_load_search): New functions.
9221 (thread_db_init): Search for libthread_db.
9222 (thread_db_free): New function.
9223 (thread_db_handle_monitor_command): Likewise.
9224 * config.in: Regenerate.
9225 * configure: Regenerate.
889bf7c5 9226
4168d2d6
UW
92272009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9228
9229 * spu-low.c (spu_kill): Wait for inferior to terminate.
9230 Call clear_inferiors.
9231 (spu_detach): Call clear_inferiors.
9232
81ecdfbb
RW
92332009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9234
9235 * aclocal.m4: Regenerate.
9236 * config.in: Likewise.
9237 * configure: Likewise.
9238
0b9ff2c0
UW
92392009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9240
9241 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9242 (parse_spufs_run): New function.
9243 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9244 (ppc_breakpoint_at): Handle SPU breakpoints.
9245
efcbbd14
UW
92462009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9247
9248 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9249 (SPUFS_MAGIC): Define.
9250 (spu_enumerate_spu_ids): New function.
9251 (linux_qxfer_spu): New function.
9252 (linux_target_ops): Install linux_qxfer_spu.
9253
f4d9bade
UW
92542009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9255
9256 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9257 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9258 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9259 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9260 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9261 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9262 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9263 (init_registers_powerpc_cell32l): Add prototype.
9264 (init_registers_powerpc_cell64l): Likewise.
9265 (ppc_arch_setup): Detect Cell/B.E. architecture.
9266
96e946ca
RW
92672009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9268
9269 * Makefile.in (datarootdir): New variable.
9270
58d6951d
DJ
92712009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9272
9273 * linux-low.c (linux_write_memory): Update debugging output.
9274 * Makefile.in (clean): Add new descriptions.
9275 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9276 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9277 * configure.srv: Add new files for arm*-*-linux*.
9278 * linux-arm-low.c: Add new declarations.
9279 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9280 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9281 (HWCAP_VFPv3D16): New.
9282 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9283 instead of __IWMMXT__.
9284 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9285 (arm_arch_setup): New.
9286 (target_regsets): Remove #ifdef. Add VFP regset.
9287 (the_low_target): Use arm_arch_setup.
9288
12b42a12
DJ
92892009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9290
9291 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9292 the main thread again.
9293
ac8c974e
AR
92942009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9295
9296 Adding Neutrino gdbserver.
9297 * configure: Regenerated.
9298 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9299 * configure.srv (i[34567]86-*-nto*): New target.
9300 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9301 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9302 (nto_comctrl) [__QNX__]: New function.
9303 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9304
4424e0c3 93052009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
9306
9307 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9308 srv_tgtobj.
9309
912cf4ba
PA
93102009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9311 Pedro Alves <pedro@codesourcery.com>
9312
9313 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9314 don't support CONTEXT_EXTENDED_REGISTERS.
9315 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9316 (the_low_target): Install them.
9317 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9318 failing with ERROR_PIPE_NOT_CONNECTED.
9319
aa5ca48f
DE
93202009-06-30 Doug Evans <dje@google.com>
9321 Pierre Muller <muller@ics.u-strasbg.fr>
9322
9323 Add h/w watchpoint support to x86-linux, win32-i386.
9324 * Makefile.in (SFILES): Add i386-low.c
9325 (i386_low_h): Define.
9326 (i386-low.o): Add dependencies.
9327 (linux-x86-low.o): Add i386-low.h dependency.
9328 (win32-i386-low.o): Ditto.
9329 * i386-low.c: New file.
9330 * i386-low.h: New file.
9331 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9332 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9333 * linux-low.c (linux_add_process): Initialize arch_private.
9334 (linux_remove_process): Free arch_private.
9335 (add_lwp): Initialize arch_private.
9336 (delete_lwp): Free arch_private.
9337 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9338 provided.
9339 * linux-low.h (process_info_private): New member arch_private.
9340 (lwp_info): New member arch_private.
9341 (linux_target_ops): New members new_process, new_thread,
9342 prepare_to_resume.
9343 (ptid_of): New macro.
9344 * linux-x86-low.c: Include stddef.h, i386-low.h.
9345 (arch_process_info): New struct.
9346 (arch_lwp_info): New struct.
9347 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9348 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9349 (i386_dr_low_get_status): New function.
9350 (x86_insert_point, x86_remove_point): New functions.
9351 (x86_stopped_by_watchpoint): New function.
9352 (x86_stopped_data_address): New function.
9353 (x86_linux_new_process, x86_linux_new_thread): New functions.
9354 (x86_linux_prepare_to_resume): New function.
9355 (the_low_target): Add entries for insert_point, remove_point,
9356 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9357 prepare_to_resume.
9358 * server.c (debug_hw_points): New global.
9359 (monitor_show_help): Document set debug-hw-points.
9360 (handle_query): Process "set debug-hw-points".
9361 * server.h (debug_hw_points): Declare.
9362 (paddress): Declare.
9363 * utils.c (NUMCELLS, CELLSIZE): New macros.
9364 (get_sell, xsnprintf, paddress): New functions.
9365 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9366 remove_point, stopped_by_watchpoint, stopped_data_address.
9367 * win32-i386-low.c: Include i386-low.h.
9368 (debug_reg_state): Replaces dr.
9369 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9370 (i386_dr_low_get_status): New function.
9371 (i386_insert_point, i386_remove_point): New functions.
9372 (i386_stopped_by_watchpoint): New function.
9373 (i386_stopped_data_address): New function.
9374 (i386_initial_stuff): Update.
9375 (get_thread_context,set_thread_context,i386_thread_added): Update.
9376 (the_low_target): Add entries for insert_point,
9377 remove_point, stopped_by_watchpoint, stopped_data_address.
9378 * win32-low.c (win32_insert_watchpoint): New function.
9379 (win32_remove_watchpoint): New function.
9380 (win32_stopped_by_watchpoint): New function.
9381 (win32_stopped_data_address): New function.
9382 (win32_target_ops): Add entries for insert_watchpoint,
9383 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9384 * win32-low.h (win32_target_ops): New members insert_point,
9385 remove_point, stopped_by_watchpoint, stopped_data_address.
9386
d993e290
PA
93872009-06-25 Pedro Alves <pedro@codesourcery.com>
9388
9389 * server.c (process_serial_event): Re-return unsupported, not
9390 error, if the type isn't recognized. Re-allow supporting only
9391 insert or remove packets. Also call require_running for
9392 breakpoints. Add missing break statement to default case. Tidy.
9393 * target.h (struct target_ops): Rename insert_watchpoint to
9394 insert_point, and remove_watchpoint to remove_point.
9395
9396 * linux-low.h (struct linux_target_ops): Likewise.
9397 * linux-low.c (linux_insert_watchpoint): Rename to ...
9398 (linux_insert_point): ... this. Adjust.
9399 (linux_remove_watchpoint): Rename to ...
9400 (linux_remove_point): ... this. Adjust.
9401 (linux_target_ops): Adjust.
9402 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9403 (cris_insert_point): ... this.
9404 (cris_remove_watchpoint): Rename to ...
9405 (cris_remove_point): ... this.
9406 (the_low_target): Adjust.
9407
0f54c268
PM
94082009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9409
9410 * server.c (handle_v_kill): Pass signal_pid to
9411 kill_inferior if multi_process is zero.
9412
c6314022
AR
94132009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9414
9415 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9416 * target.h (target_ops): Comment for *_watchpoint to make it clear
9417 the functions can get types '0' and '1'.
9418
4463ce24
AR
94192009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9420
9421 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9422 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9423 * regcache.c (get_regcache): Likewise.
9424 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9425 * win32-low.c (child_fetch_inferior_registers): Remove check for
9426 regno 0.
9427
cf8fd78b
PA
94282009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9429 Pedro Alves <pedro@codesourcery.com>
9430
9431 * target.h (struct target_ops) <supports_multi_process>: New
9432 callback.
9433 (target_supports_multi_process): New.
9434 * server.c (handle_query): Even if GDB reports support, only
9435 enable multi-process if the target also supports it. Report
9436 multi-process support only if the target backend supports it.
9437 * linux-low.c (linux_supports_multi_process): New function.
9438 (linux_target_ops): Install it as target_supports_multi_process
9439 callback.
9440
47c0c975
DE
94412009-05-24 Doug Evans <dje@google.com>
9442
e09875d4
DE
9443 Global renaming of find_thread_pid to find_thread_ptid.
9444 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9445 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9446 All callers updated.
9447
e27d73f6
DE
9448 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9449 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9450 directly.
9451
47c0c975
DE
9452 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9453 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9454 (linux_resume_one_lwp): Ditto.
9455
2acc282a
DE
94562009-05-23 Doug Evans <dje@google.com>
9457
9458 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9459 from struct inferior_list_entry * to struct lwp_info *.
9460 All callers updated.
9461
9f1036c1
DE
94622009-05-13 Doug Evans <dje@google.com>
9463
9464 * linux-x86-low.c: Don't include assert.h.
9465 (x86_siginfo_fixup): Use fatal, not assert.
9466 (x86_arch_setup): Fix comment.
9467
d0722149
DE
94682009-05-12 Doug Evans <dje@google.com>
9469
9470 Biarch support for i386/amd64 gdbserver.
9471 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9472 Add linux-x86-low.c.
9473 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9474 (linux-x86-low.o): Add.
9475 * linux-x86-64-low.c: Delete.
9476 * linux-i386-low.c: Delete.
9477 * linux-x86-low.c: New file.
9478 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9479 linux-x86-low.o.
9480 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9481 linux-x86-low.o.
9482 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9483 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9484 (linux_child_pid_to_exec_file): New function.
9485 (elf_64_header_p, elf_64_file_p): New functions.
9486 (siginfo_fixup): New function.
9487 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9488 give target a chance to convert layout.
9489 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9490 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9491
fdeb2a12
DE
94922009-05-07 Doug Evans <dje@google.com>
9493
9494 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9495 (regsets_store_inferior_registers): Ditto.
9496
a6dbe5df
PA
94972009-05-06 Pedro Alves <pedro@codesourcery.com>
9498
9499 PR server/10048
9500
9501 * linux-low.c (must_set_ptrace_flags): Delete.
9502 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9503 of the global.
9504 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9505 `lwp->must_set_ptrace_flags' instead.
ba42693b 9506 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
9507 (linux_wait_1): ... not here.
9508
5091eb23
DE
95092009-04-30 Doug Evans <dje@google.com>
9510
9f767825
DE
9511 * inferiors.c (started_inferior_callback): New function.
9512 (attached_inferior_callback): New function.
9513 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9514 * server.c (print_started_pid, print_attached_pid): New functions.
9515 (detach_or_kill_for_exit): New function.
9516 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9517 * server.h (have_started_inferiors_p): Declare.
9518 (have_attached_inferiors_p): Declare.
9519
5091eb23
DE
9520 * inferiors.c (remove_process): Fix memory leak, free process.
9521 * linux-low.c (linux_remove_process): New function.
9522 (linux_kill): Call it instead of remove_process.
9523 (linux_detach, linux_wait_1): Ditto.
9524
155c8968
PA
95252009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9526
9527 * configure.srv: Add x86 Windows CE target.
9528
7fe519cb
UW
95292009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9530
9531 * inferiors.c (get_thread_process): Make global.
9532 * server.h (get_thread_process): Add prototype.
9533 * thread-db.c (find_one_thread): Use get_thread_process
9534 instead of current_process.
9535 (thread_db_get_tls_address): Do not crash if called when
9536 thread layer is not yet initialized.
9537
5472f405
UW
95382009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9539
9540 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9541 * spu-low.c (current_tid): Rename to ...
9542 (current_ptid): ... this.
9543 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9544 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9545 ptid_get_lwp (current_ptid) instead of current_tid.
9546 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9547 instead of current_tid. Use find_process_pid to verify pid
9548 argument is valid. Pass proper argument to remove_process.
9549 (spu_thread_alive): Compare current_ptid instead of current_tid.
9550 (spu_resume): Likewise.
9551
55ac2b99
PA
95522009-04-02 Pedro Alves <pedro@codesourcery.com>
9553
9554 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9555 variable.
9556
95954743
PA
95572009-04-01 Pedro Alves <pedro@codesourcery.com>
9558
9559 Implement the multiprocess extensions, and add linux multiprocess
9560 support.
9561
9562 * server.h (ULONGEST): Declare.
9563 (struct ptid, ptid_t): New.
9564 (minus_one_ptid, null_ptid): Declare.
9565 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9566 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9567 (struct inferior_list_entry): Change `id' type from unsigned from
9568 to ptid_t.
9569 (struct sym_cache, struct breakpoint, struct
9570 process_info_private): Forward declare.
9571 (struct process_info): Declare.
9572 (current_process): Declare.
9573 (all_processes): Declare.
9574 (initialize_inferiors): Declare.
9575 (add_thread): Adjust to use ptid_t.
9576 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9577 (add_process, remove_process, find_thread_pid): Declare.
9578 (find_inferior_id): Adjust to use ptid_t.
9579 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9580 (multi_process): Declare.
9581 (push_event): Adjust to use ptid_t.
9582 (read_ptid, write_ptid): Declare.
9583 (prepare_resume_reply): Adjust to use ptid_t.
9584 (clear_symbol_cache): Declare.
9585 * inferiors.c (all_processes): New.
9586 (null_ptid, minus_one_ptid): New.
9587 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9588 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9589 (add_thread): Change unsigned long to ptid. Remove gdb_id
9590 parameter. Adjust.
9591 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9592 (gdb_id_to_thread): Rename to ...
9593 (find_thread_pid): ... this. Change unsigned long to ptid.
9594 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9595 (loaded_dll, pull_pid_from_list): Adjust.
9596 (add_process, remove_process, find_process_pid)
9597 (get_thread_process, current_process, initialize_inferiors): New.
9598 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9599 (struct target_waitstatus) <related_pid>: Ditto.
9600 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9601 return type to int.
9602 (struct target_ops) <join>: Add `pid' argument.
9603 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9604 (struct target_ops) <wait>: Add `ptid' field. Change return type
9605 to ptid.
9606 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9607 (mywait): Add `ptid' argument. Change return type to ptid_t.
9608 (target_pid_to_str): Declare.
9609 * target.c (set_desired_inferior): Adjust to use ptids.
9610 (mywait): Add new `ptid' argument. Adjust.
9611 (target_pid_to_str): New.
9612 * mem-break.h (free_all_breakpoints): Declare.
9613 * mem-break.c (breakpoints): Delelete.
9614 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9615 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9616 to use per-process breakpoint list.
9617 (free_all_breakpoints): New.
9618 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9619 (symbol_cache, all_symbols_looked_up): Delete.
9620 (hexchars): New.
9621 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9622 read_ptid): New.
9623 (prepare_resume_reply): Change ptid argument's type from unsigned
9624 long to ptid_t. Adjust. Implement W;process and X;process.
9625 (free_sym_cache, clear_symbol_cache): New.
9626 (look_up_one_symbol): Adjust to per-process symbol cache. *
9627 * server.c (cont_thread, general_thread, step_thread): Change type
9628 to ptid_t.
9629 (attached): Delete.
9630 (multi_process): New.
9631 (last_ptid): Change type to ptid_t.
9632 (struct vstop_notif) <ptid>: Change type to ptid_t.
9633 (queue_stop_reply, push_event): Change `ptid' argument's type to
9634 ptid_t.
9635 (discard_queued_stop_replies): Add `pid' argument.
9636 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9637 changes. Don't reference the `attached' global.
9638 (attach_inferior): Adjust to mywait interface changes.
9639 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9640 features. Handle and report "multiprocess+". Handle
9641 "qAttached:PID".
9642 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9643 changes.
9644 (handle_v_kill): New.
9645 (handle_v_stopped): Adjust to use target_pid_to_str.
9646 (handle_v_requests): Allow multiple attaches and runs when
9647 multiprocess extensions are in effect. Handle "vKill".
9648 (myresume): Adjust to use ptids.
9649 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9650 (handle_status): Adjust to discard_queued_stop_replies interface
9651 change.
9652 (first_thread_of, kill_inferior_callback)
9653 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9654 (main): Call initialize_inferiors. Adjust to use ptids, killing
9655 and detaching from all inferiors. Handle multiprocess packet
9656 variants.
9657 * linux-low.h: Include gdb_proc_service.h.
9658 (struct process_info_private): New.
9659 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9660 <lwpid_of>: Use ptid_get_lwp.
9661 (get_lwp_thread): Adjust.
9662 (struct lwp_info): Add `dead' member.
9663 (find_lwp_pid): Declare.
9664 * linux-low.c (thread_db_active): Delete.
9665 (new_inferior): Adjust comment.
9666 (inferior_pid): Delete.
9667 (linux_add_process): New.
9668 (handle_extended_wait): Adjust.
9669 (add_lwp): Change unsigned long to ptid.
9670 (linux_create_inferior): Add process to processes table. Adjust
9671 to use ptids. Don't set new_inferior here.
9672 (linux_attach_lwp): Rename to ...
9673 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9674 it. Adjust to use ptids.
9675 (linux_attach_lwp): New.
9676 (linux_attach): Add process to processes table. Don't set
9677 new_inferior here.
9678 (struct counter): New.
9679 (second_thread_of_pid_p, last_thread_of_process_p): New.
9680 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9681 multiple processes.
9682 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9683 processes. Remove process from process table.
9684 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9685 to multiple processes.
9686 (any_thread_of): New.
9687 (linux_detach): Add `pid' argument, and handle it. Remove process
9688 from processes table.
9689 (linux_join): Add `pid' argument. Handle it.
9690 (linux_thread_alive): Change unsighed long argument to ptid_t.
9691 Consider dead lwps as not being alive.
9692 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9693 threads we're not interested in.
9694 (same_lwp, find_lwp_pid): New.
9695 (linux_wait_for_lwp): Change `pid' argument's type from int to
9696 ptid_t. Adjust.
9697 (linux_wait_for_event): Rename to ...
9698 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9699 from int to ptid_t. Adjust.
9700 (linux_wait_for_event): New.
9701 (linux_wait_1): Add `ptid' argument. Change return type to
9702 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9703 that exit from the process table.
9704 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9705 Adjust.
9706 (mark_lwp_dead): New.
9707 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9708 stopping all threads, mark its main lwp as dead.
9709 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9710 ptids.
9711 (fetch_register, usr_store_inferior_registers)
9712 (regsets_fetch_inferior_registers)
9713 (regsets_store_inferior_registers, linux_read_memory)
9714 (linux_write_memory): Inline `inferior_pid'.
9715 (linux_look_up_symbols): Adjust to use per-process
9716 `thread_db_active'.
9717 (linux_request_interrupt): Adjust to use ptids.
9718 (linux_read_auxv): Inline `inferior_pid'.
9719 (initialize_low): Don't reference thread_db_active.
9720 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9721 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9722 (ps_getpid): Return the pid of the current inferior.
9723 * thread-db.c (proc_handle, thread_agent): Delete.
9724 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9725 per-process data.
9726 (find_one_thread): Change argument type to ptid_t. Adjust to
9727 per-process data.
9728 (maybe_attach_thread): Adjust to per-process data and ptids.
9729 (thread_db_find_new_threads): Ditto.
9730 (thread_db_init): Ditto.
9731 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9732 processes table. Adjust to use ptids.
9733 (spu_kill, spu_detach): Adjust interface. Remove process from
9734 processes table.
9735 (spu_join, spu_thread_alive): Adjust interface.
9736 (spu_wait): Adjust interface. Remove process from processes
9737 table. Adjust to use ptids.
9738 * win32-low.c (current_inferior_tid): Delete.
9739 (current_inferior_ptid): New.
9740 (debug_event_ptid): New.
9741 (thread_rec): Take a ptid. Adjust.
9742 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9743 (child_delete_thread): Ditto.
9744 (do_initial_child_stuff): Add `attached' argument. Add process to
9745 processes table.
9746 (child_fetch_inferior_registers, child_store_inferior_registers):
9747 Adjust.
9748 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9749 (win32_attach): Pass 1 to do_initial_child_stuff.
9750 (win32_kill): Adjust interface. Remove process from processes
9751 table.
9752 (win32_detach): Ditto.
9753 (win32_join): Adjust interface.
9754 (win32_thread_alive): Take a ptid.
9755 (win32_resume): Adjust to use ptids.
9756 (get_child_debug_event): Ditto.
9757 (win32_wait): Adjust interface. Remove exiting process from
9758 processes table.
9759
bd99dc85
PA
97602009-04-01 Pedro Alves <pedro@codesourcery.com>
9761
9762 Non-stop mode support.
9763
9764 * server.h (non_stop): Declare.
9765 (gdb_client_data, handler_func): Declare.
9766 (delete_file_handler, add_file_handler, start_event_loop):
9767 Declare.
9768 (handle_serial_event, handle_target_event, push_event)
9769 (putpkt_notif): Declare.
9770 * target.h (enum resume_kind): New.
9771 (struct thread_resume): Replace `step' field by `kind' field.
9772 (TARGET_WNOHANG): Define.
9773 (struct target_ops) <wait>: Add `options' argument.
9774 <supports_non_stop, async, start_non_stop>: New fields.
9775 (target_supports_non_stop, target_async): New.
9776 (start_non_stop): Declare.
9777 (mywait): Add `options' argument.
9778 * target.c (mywait): Add `options' argument. Print child exit
9779 notifications here.
9780 (start_non_stop): New.
9781 * server.c (non_stop, own_buf, mem_buf): New globals.
9782 (struct vstop_notif): New.
9783 (notif_queue): New global.
9784 (queue_stop_reply, push_event, discard_queued_stop_replies)
9785 (send_next_stop_reply): New.
9786 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9787 interface changes.
9788 (attach_inferior): In non-stop mode, don't wait for the target
9789 here.
9790 (handle_general_set): Handle QNonStop.
9791 (handle_query): When handling qC, return the current general
9792 thread, instead of the first thread of the list.
9793 (handle_query): If the backend supports non-stop mode, include
9794 QNonStop+ in the qSupported query response.
9795 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9796 and non-stop mode.
9797 (handle_v_attach, handle_v_run): Handle non-stop mode.
9798 (handle_v_stopped): New.
9799 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9800 (myresume): Adjust to use resume_kind. Handle non-stop.
9801 (queue_stop_reply_callback): New.
9802 (handle_status): Handle non-stop mode.
9803 (main): Clear non_stop flag on reconnection. Use the event-loop.
9804 Refactor serial protocol handling from here ...
9805 (process_serial_event): ... to this new function. When GDB
9806 selects any thread, select one here. In non-stop mode, wait until
9807 GDB acks all pending events before exiting.
9808 (handle_serial_event, handle_target_event): New.
9809 * remote-utils.c (remote_open): Install remote_desc in the event
9810 loop.
9811 (remote_close): Remove remote_desc from the event loop.
9812 (putpkt_binary): Rename to...
9813 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9814 (putpkt_binary): New as wrapper around putpkt_binary_1.
9815 (putpkt_notif): New.
9816 (prepare_resume_reply): In non-stop mode, don't change the
9817 general_thread.
9818 * event-loop.c: New.
9819 * Makefile.in (OBJ): Add event-loop.o.
9820 (event-loop.o): New rule.
9821
9822 * linux-low.h (pid_of): Moved here.
9823 (lwpid_of): New.
9824 (get_lwp_thread): Use lwpid_of.
9825 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9826 * linux-low.c (pid_of): Delete.
9827 (inferior_pid): Use lwpid_of.
9828 (linux_event_pipe): New.
9829 (target_is_async_p): New.
9830 (delete_lwp): New.
9831 (handle_extended_wait): Use lwpid_of.
9832 (add_lwp): Don't set lwpid field.
9833 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9834 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9835 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9836 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9837 first. Adjust to linux_wait_for_event interface changes. Use
9838 lwpid_of.
9839 (linux_detach): Don't delete the main lwp here.
9840 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9841 (status_pending_p): Don't consider explicitly suspended lwps.
9842 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9843 pointer. Add OPTIONS argument. Change return type to int. Use
9844 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9845 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9846 pointer. Add status pointer argument. Return a pid instead of a
9847 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9848 changes. In non-stop mode, don't switch to a random thread.
9849 (linux_wait): Rename to...
9850 (linux_wait_1): ... this. Add target_options argument, and handle
9851 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9852 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9853 clean exit and signal exit code. Don't stop all threads in
9854 non-stop mode. In all-stop mode, only stop all threads when
9855 reporting a stop to GDB. Handle explicit thread stop requests.
9856 (async_file_flush, async_file_mark): New.
9857 (linux_wait): New.
9858 (send_sigstop): Use lwpid_of.
9859 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9860 interface changes. In non-stop mode, don't switch to a random
9861 thread.
9862 (linux_resume_one_lwp): Use lwpid_of.
9863 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9864 (linux_resume_one_thread): ... this. Handle resume_stop. In
9865 non-stop mode, don't look for pending flag in all threads.
9866 (resume_status_pending_p): Don't consider explicitly suspended
9867 threads.
9868 (my_waitpid): Reimplement. Emulate __WALL.
9869 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9870 Use lwpid_of.
9871 (sigchld_handler, linux_supports_non_stop, linux_async)
9872 (linux_start_non_stop): New.
9873 (linux_target_ops): Register linux_supports_non_stop, linux_async
9874 and linux_start_non_stop.
9875 (initialize_low): Install SIGCHLD handler.
9876 * thread-db.c (thread_db_create_event, find_one_thread)
9877 (thread_db_get_tls_address): Use lwpid_of.
9878 * win32-low.c (win32_detach): Adjust to use resume_kind.
9879 (win32_wait): Add `options' argument.
9880 * spu-low.c (spu_resume): Adjust to use resume_kind.
9881 (spu_wait): Add `options' argument.
9882
5b1c542e
PA
98832009-04-01 Pedro Alves <pedro@codesourcery.com>
9884
9885 Decouple target code from remote protocol.
9886
9887 * target.h (enum target_waitkind): New.
9888 (struct target_waitstatus): New.
9889 (struct target_ops) <wait>: Return an unsigned long. Take a
9890 target_waitstatus pointer instead of a char pointer.
9891 (mywait): Likewise.
9892 * target.c (mywait): Change prototype to return an unsigned long.
9893 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9894 * server.h (thread_from_wait, old_thread_from_wait): Delete
9895 declarations.
9896 (prepare_resume_reply): Change prototype to take a
9897 target_waitstatus.
9898 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9899 (last_status, last_ptid): New.
9900 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9901 pid instead of a signal.
9902 (attach_inferior): Remove "status" and "signal" parameters.
9903 Adjust.
9904 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9905 not as an address.
9906 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9907 (handle_v_requests, myresume): Remove "status" and "signal"
9908 parameters. Adjust.
9909 (handle_status): New.
9910 (main): Delete local `status'. Adjust.
9911 * remote-utils.c: Include target.h.
9912 (prepare_resume_reply): Change prototype to take a
9913 target_waitstatus. Adjust.
9914
9915 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9916 interface.
9917 * spu-low.c (spu_wait): Adjust.
9918 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9919 Delete.
9920 (win32_wait): Adjust.
9921
2bd7c093
PA
99222009-04-01 Pedro Alves <pedro@codesourcery.com>
9923
9924 * target.h (struct thread_resume): Delete leave_stopped member.
9925 (struct target_ops): Add a `n' argument to the `resume' callback.
9926 * server.c (start_inferior): Adjust.
9927 (handle_v_cont, myresume): Adjust.
9928 * linux-low.c (check_removed_breakpoint): Adjust to resume
9929 interface change, and to removed leave_stopped field.
9930 (resume_ptr): Delete.
9931 (struct thread_resume_array): New.
9932 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9933 resume interface change.
9934 (linux_continue_one_thread, linux_queue_one_thread)
9935 (resume_status_pending_p): Check if the resume field is NULL
9936 instead of checking the leave_stopped member.
9937 (linux_resume): Adjust to the target resume interface change.
9938 * spu-low.c (spu_resume): Adjust to the target resume interface
9939 change.
9940 * win32-low.c (win32_detach, win32_resume): Ditto.
9941
c35fafde
PA
99422009-04-01 Pedro Alves <pedro@codesourcery.com>
9943
9944 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9945 flag.
9946 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9947 pending.
9948 (linux_continue_one_thread): Only preserve the stepping flag if
9949 there's a pending breakpoint.
9950
0a59d50b
PA
99512009-03-31 Pedro Alves <pedro@codesourcery.com>
9952
9953 * server.c (main): After the inferior having exited, call
9954 remote_close before exiting gdbserver.
9955
f04c6d38
TJB
99562009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9957
9958 Fix size of FPSCR in Power 7 processors.
9959 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9960 (PPC_FEATURE_HAS_DFP): New #define.
9961 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9962 size of the FPSCR.
9963
78e5cee6
PA
99642009-03-23 Pedro Alves <pedro@codesourcery.com>
9965
9966 * server.c (handle_query) Whitespace and formatting.
9967
1b3f6016
PA
99682009-03-22 Pedro Alves <pedro@codesourcery.com>
9969
9970 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9971 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9972 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9973 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9974 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9975 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9976 Makefile.in, configure.ac: Fix whitespace throughout.
9977 * configure: Regenerate.
9978
a07b2135
PA
99792009-03-22 Pedro Alves <pedro@codesourcery.com>
9980
9981 * inferiors.c (find_inferior): Make it safe for the callback
9982 function to delete the currently iterated inferior.
9983
67cc2626
PA
99842009-03-22 Pedro Alves <pedro@codesourcery.com>
9985
9986 * Makefile.in (linuw_low_h): Move higher.
9987 (thread-db.o): Depend on $(linux_low_h).
9988
54a0b537
PA
99892009-03-17 Pedro Alves <pedro@codesourcery.com>
9990
9991 Rename "process" to "lwp" throughout.
9992
9993 * linux-low.c (all_processes): Rename to...
9994 (all_lwps): ... this.
9995 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
9996 (add_process): Rename to ...
9997 (add_lwp): ... this. Adjust.
9998 (linux_create_inferior): Adjust.
9999 (linux_attach_lwp): Adjust.
10000 (linux_attach): Adjust.
10001 (linux_kill_one_process): Rename to ...
10002 (linux_kill_one_lwp): ... this. Adjust.
10003 (linux_kill): Adjust.
10004 (linux_detach_one_process): Rename to ...
10005 (linux_detach_one_lwp): ... this. Adjust.
10006 (linux_detach): Adjust.
10007 (check_removed_breakpoint): Adjust.
10008 (status_pending_p): Adjust.
10009 (linux_wait_for_process): Rename to ...
10010 (linux_wait_for_lwp): ... this. Adjust.
10011 (linux_wait_for_event): Adjust.
10012 (send_sigstop): Adjust.
10013 (wait_for_sigstop): Adjust.
10014 (stop_all_processes): Rename to ...
10015 (stop_all_lwps): ... this.
10016 (linux_resume_one_process): Rename to ...
10017 (linux_resume_one_lwp): ... this. Adjust.
10018 (linux_set_resume_request, linux_continue_one_thread)
10019 (linux_queue_one_thread, resume_status_pending_p)
10020 (usr_store_inferior_registers, regsets_store_inferior_registers)
10021 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10022 Adjust.
10023 * linux-low.h (get_process): Rename to ...
10024 (get_lwp): ... this. Adjust.
10025 (get_thread_process): Rename to ...
10026 (get_thread_lwp): ... this. Adjust.
10027 (get_process_thread): Rename to ...
10028 (get_lwp_thread): ... this. Adjust.
10029 (struct process_info): Rename to ...
10030 (struct lwp_info): ... this.
10031 (all_processes): Rename to ...
10032 (all_lwps): ... this.
10033 * proc-service.c (ps_lgetregs): Adjust.
10034 * thread-db.c (thread_db_create_event, find_one_thread)
10035 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10036
0b16c5cf
PA
100372009-03-14 Pedro Alves <pedro@codesourcery.com>
10038
10039 * server.c (handle_query): Handle "qAttached".
10040
32de4b9d
NS
100412009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10042
10043 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10044 GPLv3, update license URL.
10045
2aecd87f
DE
100462009-03-01 Doug Evans <dje@google.com>
10047
93efd302 10048 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
10049 (server_h): Add gdb_signals.h.
10050 (signals.o): Update.
10051 * server.h (target_signal_from_host,target_signal_to_host_p)
10052 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10053
86b1f9c5
PM
100542009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10055
10056 * remote-utils.c (getpkt): Also generate remote-debug
10057 information if noack_mode is set.
10058
4aa995e1
PA
100592009-02-06 Pedro Alves <pedro@codesourcery.com>
10060
10061 * server.c (handle_query): Report qXfer:siginfo:read and
10062 qXfer:siginfo:write as supported and handle them.
10063 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10064 * linux-low.c (linux_xfer_siginfo): New.
10065 (linux_target_ops): Set it.
10066
62709adf
PA
100672009-01-26 Pedro Alves <pedro@codesourcery.com>
10068
10069 * server.c (gdbserver_usage): Mention --remote-debug.
10070 (main): Accept '--remote-debug' switch.
10071
aef93bd7
DE
100722009-01-18 Doug Evans <dje@google.com>
10073
10074 * regcache.c (new_register_cache): No need to check result of xcalloc.
10075 * server.c (handle_search_memory): Back out calls to xmalloc,
10076 result is checked and error is returned to user upon failure.
10077 (handle_query): Ditto. Add more checks for result of malloc.
10078 (handle_v_cont): Check result of malloc, report error back to
10079 user upon failure.
10080 (handle_v_run): Ditto. Call freeargv.
10081 * server.h (freeargv): Declare.
10082 * utils.c (freeargv): New fn.
10083
54363045
DE
100842009-01-15 Doug Evans <dje@google.com>
10085
f626972c
DE
10086 * gdbreplay.c (perror_with_name): Make arg const char *.
10087 * server.h (target_signal_to_name): Make return type const char *.
0842e787 10088 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 10089 * utils.c (perror_with_name): Make arg const char *.
54363045 10090
18aae699
PA
100912009-01-14 Pedro Alves <pedro@codesourcery.com>
10092
10093 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10094 when handling a EXIT_PROCESS_DEBUG_EVENT.
10095
ff703abe
JB
100962009-01-06 Joel Brobecker <brobecker@adacore.com>
10097
10098 * gdbreplay.c (gdbreplay_version): Update copyright year.
10099 * server.c (gdbserver_version): Likewise.
10100
f21cc1a2 101012009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
10102
10103 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 10104 (handle_extended_wait): Improve comment.
0e21c1ec 10105
bca929d3
DE
101062008-12-13 Doug Evans <dje@google.com>
10107
10108 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10109 * server.h (ATTR_MALLOC): New macro.
10110 (xmalloc,xcalloc,xstrdup): Declare.
10111 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10112 * inferiors.c: Ditto.
10113 * linux-low.c: Ditto.
10114 * mem-break.c: Ditto.
10115 * regcache.c: Ditto.
10116 * remote-utils.c: Ditto.
10117 * server.c: Ditto.
10118 * target.c: Ditto.
10119 * win32-low.c: Ditto.
10120
97438e3f
DE
101212008-12-12 Doug Evans <dje@google.com>
10122
896c7fbb
DE
10123 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10124 in debugging printf.
10125
97438e3f
DE
10126 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10127
e3b886f8
DE
101282008-12-09 Doug Evans <dje@google.com>
10129
10130 * linux-low.h (struct process_info): Delete member tid, unused.
10131 * thread-db.c (find_one_thread): Update.
10132 (maybe_attach_thread): Update.
10133
07e059b5
VP
101342008-12-02 Pedro Alves <pedro@codesourcery.com>
10135
889bf7c5
PA
10136 * target.h (struct target_ops): Add qxfer_osdata member.
10137 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10138 and dirent.h.
10139 (linux_qxfer_osdata): New functions.
10140 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10141 callback.
10142 * server.c (handle_query): Handle "qXfer:osdata:read:".
10143 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10144 (buffer_xml_printf): New functions.
10145 * server.h (struct buffer): New.
10146 (buffer_grow_str, buffer_grow_str0): New macros.
10147 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10148 (buffer_xml_printf): Declare.
07e059b5 10149
4cab47ab
DE
101502008-11-24 Doug Evans <dje@google.com>
10151
10152 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10153
f142445f
DJ
101542008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10155
10156 * server.c (handle_v_run): Always use the supplied argument list.
10157
d0107bb6 101582008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 10159
d0107bb6
BW
10160 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10161 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 10162
2c4ad781
TJB
101632008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10164
10165 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10166 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10167 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10168 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10169 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10170 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10171 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10172 XML target descriptions.
10173 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10174 when inferior is running on an ISA 2.05 or later processor. Add
10175 special case to return offset for full 64-bit slot of FPSCR when
10176 in 32-bits.
10177
dfb64f85
DJ
101782008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10179
10180 * Makefile.in (SFILES, clean): Added sparc64 files.
10181 (reg-sparc64.o, reg-sparc64.c): New.
10182 * configure.srv (sparc*-*-linux*): New configuration.
10183 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10184 syscall arguments for SPARC.
10185 (regsets_store_inferior_registers): Likewise.
10186 * linux-sparc-low.c: New file.
10187
66b6e1dd
DE
101882008-10-21 Doug Evans <dje@google.com>
10189
10190 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10191 (READLINE_DIR,READLINE_DEP): Delete.
10192 (INTERNAL_CFLAGS): Update.
10193 (LINTFLAGS): Update.
10194
9b710a42
PA
101952008-10-10 Pedro Alves <pedro@codesourcery.com>
10196
10197 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10198 whole argv from the last run, not just argv[0].
10199
5822d809
PA
102002008-09-08 Pedro Alves <pedro@codesourcery.com>
10201
10202 * regcache.c (new_register_cache): Return NULL if the register
10203 cache size isn't known yet.
10204 (free_register_cache): Avoid dereferencing a NULL regcache.
10205
74aac56f
DJ
102062008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10207
10208 * configure.srv: Merge MIPS and MIPS64.
10209
400b20f5
MR
102102008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10211
10212 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10213
677c5bb1
LM
102142008-08-18 Luis Machado <luisgpm@br.ibm.com>
10215
10216 * Makefile.in: Add required vsx dependencies.
10217
10218 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10219 Declare init_registers_powerpc_vsx32l.
10220 Declare init_registers_powerpc_vsx64l.
10221 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10222 (ppc_arch_setup): Check for VSX in hwcap.
10223 (ppc_fill_vsxregset): New function.
10224 (ppc_store_vsxregset): New function.
10225 Add new VSX entry in regset_info target_regsets.
10226
10227 * configure.srv: Add new VSX dependencies.
10228
a6f3e723
SL
102292008-08-12 Pedro Alves <pedro@codesourcery.com>
10230
10231 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10232 (remote_open): Set or clear transport_is_reliable.
10233 (putpkt_binary): Don't expect acks in noack mode.
10234 (getpkt): Don't send ack/nac in noack mode.
10235 * server.c (handle_general_set): Handle QStartNoAckMode.
10236 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10237 qSupported.
10238 (main): Reset noack_mode on every connection.
10239 * server.h (noack_mode): Declare.
10240
a417dc56
RW
102412008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10242
10243 * Makefile.in (GDBREPLAY_OBS): New variable.
10244 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10245
3221518c
UW
102462008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10247 Daniel Jacobowitz <dan@codesourcery.com>
10248
10249 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10250 (usr_store_inferior_registers): Likewise.
10251 (regsets_store_inferior_registers): Likewise.
10252
ec56be1b
PA
102532008-07-31 Rolf Jansen <rj@surtec.com>
10254 Pedro Alves <pedro@codesourcery.com>
10255
10256 * configure.ac: Check for memmem declaration.
10257 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10258 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10259 (disable_packet_qfThreadInfo): Unconditionally compile.
10260 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10261 * configure, config.in: Regenerate.
10262
2fe5e3ff
DE
102632008-07-28 Doug Kwan <dougkwan@google.com>
10264
10265 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10266 (linux_write_memory): Remove declaration of errno.
10267
836acd6d
UW
102682008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10269
10270 * linux-low.c (handle_extended_wait): Do not use "status"
10271 variable uninitialized.
10272
aeba519e
PA
102732008-07-07 Pedro Alves <pedro@codesourcery.com>
10274
10275 * server.c (handle_v_attach): Inhibit reporting dll changes.
10276
db42f210
PA
102772008-06-27 Pedro Alves <pedro@codesourcery.com>
10278
10279 * remote-utils.c (prepare_resume_reply): If requested, don't
10280 output "thread:TID" in the T stop reply.
10281
10282 * server.c (disable_packet_vCont, disable_packet_Tthread)
10283 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10284 (handle_query): If requested, disable support for qC, qfThreadInfo
10285 and qsThreadInfo.
10286 (handle_v_requests): If requested, disable support for vCont.
10287 (gdbserver_show_disableable): New.
10288 (main): Handle --disable-packet and --disable-packet=LIST.
10289
10290 * server.h (disable_packet_vCont, disable_packet_Tthread)
10291 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10292
8e4c5421
CD
102932008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10294
10295 * server.c (gdbserver_usage): Mention --version.
10296
6e23a804
DJ
102972008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10298
10299 * Makefile.in (gdbreplay.o): New rule.
10300
90aa6a40
JM
103012008-06-06 Joseph Myers <joseph@codesourcery.com>
10302
10303 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10304 message, not gdbserver.
10305
c16158bc 103062008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
10307 Nathan Sidwell <nathan@codesourcery.com>
10308 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
10309
10310 * acinclude.m4: Include ../../config/acx.m4.
10311 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10312 * configure, config.in: Regenerate.
10313 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10314 * server.c (gdbserver_version): Print PKGVERSION.
10315 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10316 (main): Adjust gdbserver_usage calls.
10317 * gdbreplay.c (version, host_name): Add declarations.
10318 (gdbreplay_version, gdbreplay_usage): New.
10319 (main): Accept --version and --help options.
10320
aeb75bf5
DJ
103212008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10322
10323 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10324 (arm_breakpoint_at): Handle Thumb.
10325 (the_low_target): Add comment.
10326
76b233dd
UW
103272008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10328
10329 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10330
08388c79
DE
103312008-05-09 Doug Evans <dje@google.com>
10332
a3c83fae
DE
10333 * server.h (decode_search_memory_packet): Declare.
10334 * remote-utils.c (decode_search_memory_packet): New fn.
10335 * server.c (handle_search_memory_1): New fn.
08388c79
DE
10336 (handle_search_memory): New fn.
10337 (handle_query): Process qSearch:memory packets.
10338
bb9c3d36
UW
103392008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10340
10341 * regcache.c (registers_length): Remove.
10342 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10343 full register packet.
10344 * regcache.h (registers_length): Remove prototype.
10345 * server.h (PBUFSIZ): Define to 16384.
10346
7284e1be
UW
103472008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10348
10349 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10350 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10351 powerpc-64l.o, and powerpc-altivec64l.o.
10352 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10353 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10354 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10355 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10356 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10357 to srv_xmlfiles.
10358
10359 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10360 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10361 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10362 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10363 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10364 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10365 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10366 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10367 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10368 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10369 (clean): Update.
10370
10371 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10372 (init_registers_powerpc_32l): ... this new prototype.
10373 (init_registers_powerpc_32): Remove, replace by ...
10374 (init_registers_powerpc_altivec32l): ... this new prototype.
10375 (init_registers_powerpc_e500): Remove, replace by ...
10376 (init_registers_powerpc_e500l): ... this new prototype.
10377 (init_registers_ppc64): Remove, replace by ...
10378 (init_registers_powerpc_64l): ... this new prototype.
10379 (init_registers_powerpc_64): Remove, replace by ...
10380 (init_registers_powerpc_altivec64l): ... this new prototype.
10381 (ppc_num_regs): Set to 73.
10382 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10383 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10384 (ppc_cannot_store_register): Handle orig_r3 and trap.
10385 (ppc_arch_setup): Update init_registers_... calls.
10386 (ppc_fill_gregset): Handle orig_r3 and trap.
10387
10388 * inferiors.c (clear_inferiors): Reset current_inferior.
10389
fdc59709
PB
103902008-04-23 Paolo Bonzini <bonzini@gnu.org>
10391
889bf7c5
PA
10392 * acinclude.m4: Add override.m4.
10393 * configure: Regenerate.
fdc59709 10394
c9b2f845
UW
103952008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10396
10397 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10398 initial call to init_register_ppc64.
10399
550512b8
UW
104002008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10401
43aaf8b6
PA
10402 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10403 single powerpc*-*-linux* case.
550512b8
UW
10404 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10405
b6430ec3
UW
104062008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10407
10408 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 10409 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
10410 from reg_xmlfiles.
10411 * linux-ppc-low.c: Include <elf.h>.
10412 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10413 (ppc_hwcap): New global variable.
10414 (ppc_regmap): Remove __SPE__ #ifdef sections.
10415 (ppc_regmap_e500): New global variable.
10416 (ppc_cannot_store_register): Update __SPE__ special case.
10417 (ppc_get_hwcap): New function.
10418 (ppc_arch_setup): Use it to determine whether inferior supports
10419 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10420 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10421 Do not access registers if target does not support AltiVec.
10422 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10423 Do not access registers if target does not support SPE.
10424 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10425
52fa2412
UW
104262008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10427
10428 * linux-low.c (disabled_regsets, num_regsets): New.
10429 (use_regsets_p): Delete.
10430 (linux_wait_for_process): Clear disabled_regsets.
10431 (regsets_fetch_inferior_registers): Check and set it.
10432 (regsets_store_inferior_registers): Likewise.
10433 (linux_fetch_registers, linux_store_registers): Do not use
10434 use_regsets_p.
10435 (initialize_low): Allocate disabled_regsets.
10436
e28b3332
DJ
104372008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10438
10439 * Makefile.in (LIBOBJS): New.
10440 (OBS): Use LIBOBJS.
10441 (memmem.o): New rule.
10442 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10443 * configure: Regenerated.
10444
4536995d
UW
104452008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10446
10447 * server.c (handle_query): Never return "unsupported" for
10448 qXfer:features:read queries.
10449
221c031f
UW
104502008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10451
10452 * server.c (get_features_xml): Fix inverted condition.
10453 (handle_query): Always support qXfer:feature:read.
10454
ccd213ac
DJ
104552008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10456
10457 * server.c (wrapper_argv): New.
10458 (start_inferior): Handle wrapper_argv. If set, expect an extra
10459 trap.
10460 (gdbserver_usage): Document --wrapper.
10461 (main): Parse --wrapper.
10462
6fe305f7
UW
104632008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10464
10465 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10466 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10467 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10468 (ppc_set_pc): Likewise.
10469 (ppc_arch_setup): New function.
10470 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10471 of collect_register.
889bf7c5 10472 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 10473
5b0a002e
UW
104742008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10475
10476 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10477 instead of linux-ppc64-low.o.
10478 * linux-ppc64-low.c: Remove file.
10479 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10480 (linux-ppc64-low.o): Remove rule.
10481
10482 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10483 (init_registers_powerpc_64): Likewise.
10484 (ppc_regmap): Conditionally define depending on __powerpc64__.
10485 (ppc_cannot_store_register): Do not special-case "fpscr" when
10486 compiled on __powerpc64__.
10487 (ppc_collect_ptrace_register): New function.
10488 (ppc_supply_ptrace_register): New function.
10489 (ppc_breakpoint): Change type to "unsigned int".
10490 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10491 (the_low_target): Conditionally provide initializers for the
889bf7c5 10492 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
10493 collect_ptrace_register and supply_ptrace_register members.
10494
9b4b61c8
UW
104952008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10496
10497 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10498 * server.c (gdbserver_xmltarget): Define.
10499 (get_features_xml): Use it to replace "target.xml" and arch_string.
10500
10501 * configure.srv: Remove srv_xmltarget. Add XML files that were
10502 mentioned there to srv_xmlfiles instead. Remove conditional tests
10503 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10504 srv_xmlfiles and srv_regobj to include all possible choices.
10505 * configure.ac (srv_xmltarget): Remove.
10506 (srv_xmlfiles): Do not add "target.xml".
10507 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10508 checks for supplementary target information.
10509 * configure: Regenerate.
10510 * Makefile.in (XML_TARGET): Remove.
10511 (target.xml): Remove rule.
10512 (clean): Do not clean up target.xml.
10513 (.PRECIOUS): Do not mention target.xml.
10514
10515 * target.h (struct target_ops): Remove arch_string member.
10516 * linux-low.c (linux_arch_string): Remove.
10517 (linux_target_ops): Remove arch_string initializer.
10518 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10519 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10520 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10521 * spu-low.c (spu_arch_string): Remove.
10522 (spu_target_ops): Remove arch_string initializer.
10523 * win32-low.c (win32_arch_string): Remove.
10524 (win32_target_ops): Remove arch_string initializer.
10525 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10526 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10527 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10528
ee1a7ae4
UW
105292008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10530
10531 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10532 by collect_ptrace_register and supply_ptrace_register hooks.
10533 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10534 instead of checking for the_low_target.left_pad_xfer.
10535 (usr_store_inferior_registers): Use collect_ptrace_register callback
10536 instead of checking for the_low_target.left_pad_xfer.
10537
10538 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10539 (s390_supply_ptrace_register): Likewise.
10540 (s390_fill_gregset): Call s390_collect_ptrace_register.
10541 (the_low_target): Update.
10542
10543 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10544 (ppc_supply_ptrace_register): Likewise.
10545 (the_low_target): Update.
10546
10547 * linux-i386-low.c (the_low_target): Update.
10548 * linux-x86-64-low.c (the_low_target): Update.
10549
d61ddec4
UW
105502008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10551
10552 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10553 reg-s390.o and reg-s390x.o.
10554
10555 * linux-low.c (new_inferior): New global variable.
10556 (linux_create_inferior, linux_attach): Set it.
10557 (linux_wait_for_process): Call the_low_target.arch_setup after the
10558 target has stopped for the first time.
10559 (initialize_low): Do not call the_low_target.arch_setup.
10560
10561 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10562 (s390_set_pc): Likewise.
10563 (s390_arch_setup): New function.
10564 (the_low_target): Use s390_arch_setup as arch_setup routine.
10565
10566 * regcache.c (realloc_register_cache): New function.
10567 (set_register_cache): Call it for each existing regcache.
10568
d05b4ac3
UW
105692008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10570
10571 * server.h (init_registers): Remove prototype.
10572
10573 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10574 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10575 instead of init_registers ().
10576 * linux-arm-low.c (init_registers_arm): Add prototype.
10577 (init_registers_arm_with_iwmmxt): Likewise.
10578 (the_low_target): Add initializer for arch_setup field.
10579 * linux-cris-low.c (init_registers_cris): Add prototype.
10580 (the_low_target): Add initializer for arch_setup field.
10581 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10582 (the_low_target): Add initializer for arch_setup field.
10583 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10584 (the_low_target): Add initializer for arch_setup field.
10585 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10586 (the_low_target): Add initializer for arch_setup field.
10587 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10588 (the_low_target): Add initializer for arch_setup field.
10589 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10590 (the_low_target): Add initializer for arch_setup field.
10591 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10592 (init_registers_mips64_linux): Likewise.
10593 (the_low_target): Add initializer for arch_setup field.
10594 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10595 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10596 (the_low_target): Add initializer for arch_setup field.
10597 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10598 (init_registers_powerpc_64): Likewise.
10599 (the_low_target): Add initializer for arch_setup field.
10600 * linux-s390-low.c (init_registers_s390): Add prototype.
10601 (init_registers_s390x): Likewise.
10602 (the_low_target): Add initializer for arch_setup field.
10603 * linux-sh-low.c (init_registers_sh): Add prototype.
10604 (the_low_target): Add initializer for arch_setup field.
10605 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10606 (the_low_target): Add initializer for arch_setup field.
10607 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10608 (the_low_target): Add initializer for arch_setup field.
10609
10610 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10611 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10612 instead of init_registers ().
10613 * win32-arm-low.c (init_registers_arm): Add prototype.
10614 (the_low_target): Add initializer for arch_setup field.
10615 * win32-i386-low.c (init_registers_i386): Add prototype.
10616 (the_low_target): Add initializer for arch_setup field.
10617
10618 * spu-low.c (init_registers_spu): Add prototype.
10619 (initialize_low): Call initialie_registers_spu () instead of
10620 initialize_registers ().
10621
fd96d250
PA
106222008-02-19 Pedro Alves <pedro@codesourcery.com>
10623
10624 * server.c (handle_v_requests): When handling the vRun and vAttach
10625 packets, if already debugging a process, don't kill it. Return an
10626 error instead.
10627
d41b6bb4
DJ
106282008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10629
10630 * server.c (handle_query): Correct length check.
10631
5ac588cf
PA
106322008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10633
10634 * win32-low.c (do_initial_child_stuff): Add process handle
10635 parameter. Set current_process_handle and current_process_id from the
10636 parameters. Clear globals.
10637 (win32_create_inferior): Don't set current_process_handle and
10638 current_process_id here. Instead pass them on the call to
10639 do_initial_child_stuff.
10640 (win32_attach): Likewise.
10641 (win32_clear_inferiors): New.
10642 (win32_kill): Don't close the current process handle or the
10643 current thread handle here. Instead call win32_clear_inferiors.
10644 (win32_detach): Don't open a new handle to the process. Call
10645 win32_clear_inferiors.
10646 (win32_join): Don't rely on current_process_handle; open a new
10647 handle using the process id.
10648 (win32_wait): Call win32_clear_inferiors when the inferior process
10649 has exited.
10650
ecd7ecbc
DJ
106512008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10652
10653 * server.c (monitor_show_help): Add "exit".
10654
1525d545
MG
106552008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10656
ecd7ecbc 10657 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
10658 (clean): Add reg-xtensa.c.
10659 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
10660 * configure.srv (xtensa*-*-linux*) New target.
10661 * linux-xtensa-low.c: New.
10662 * xtensa-xtregs.c: New.
1525d545 10663
59a016f0
PA
106642008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10665
10666 * hostio.c: Don't include errno.h.
10667 (errno_to_fileio_errno): Move to hostio-errno.
10668 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10669 error number outputting to the target->hostio_last_error callback.
10670 (hostio_packet_error): Use FILEIO_EINVAL directly.
10671 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10672 calls to hostio_error.
10673 * hostio-errno.c: New.
10674 * server.h (hostio_last_error_from_errno): Declare.
10675 * target.h (target_ops): Add hostio_last_error member.
10676 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10677 as hostio_last_error handler.
889bf7c5 10678 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
10679 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10680 (wince_hostio_last_error): New functions.
10681 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10682 as hostio_last_error handler.
10683 (win32_target_ops) [!_WIN32_WCE]: Register
10684 hostio_last_error_from_errno as hostio_last_error handler.
10685 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10686 (hostio-errno.o): New rule.
10687 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10688 * configure.srv (srv_hostio_err_objs): New variable. Default to
10689 hostio-errno.o.
10690 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10691 * configure: Regenerate.
10692
2d717e4f
DJ
106932008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10694
10695 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10696 (linux_kill, linux_detach): Clean up the process list.
10697 * remote-utils.c (remote_open): Improve port number parsing.
10698 (putpkt_binary, input_interrupt): Only send interrupts if the target
10699 is running.
10700 * server.c (extended_protocol): Make static.
10701 (attached): Define earlier.
10702 (exit_requested, response_needed, program_argv): New variables.
10703 (target_running): New.
10704 (start_inferior): Clear attached here.
10705 (attach_inferior): Set attached here.
10706 (require_running): Define.
10707 (handle_query): Use require_running and target_running. Implement
10708 "monitor exit".
10709 (handle_v_attach, handle_v_run): New.
10710 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10711 (gdbserver_usage): Update.
10712 (main): Redo argument parsing. Handle --debug and --multi. Handle
10713 --attach along with other options or after the port. Save
10714 program_argv. Support no initial program. Resynchronize
10715 communication with GDB after an error. Handle "monitor exit".
10716 Use require_running and target_running. Always allow the extended
10717 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10718 restart in extended mode.
10719 * README: Refer to the GDB manual. Update --attach usage.
10720
7407e2de
AS
107212007-12-20 Andreas Schwab <schwab@suse.de>
10722
10723 * linux-low.c (STACK_SIZE): Define.
10724 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10725 (linux_test_for_tracefork): Likewise.
10726
b65d95c5
DJ
107272007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10728
10729 * linux-low.c (linux_wait_for_event): Update messages. Do not
10730 reinsert auto-delete breakpoints.
10731 * mem-break.c (struct breakpoint): Change return type of handler to
10732 int.
10733 (set_breakpoint_at): Update handler type.
10734 (reinsert_breakpoint_handler): Return 1 instead of calling
10735 delete_breakpoint.
10736 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10737 setting a new one.
10738 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10739 * mem-break.h (set_breakpoint_at): Update handler type.
10740 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10741 * win32-low.c (auto_delete_breakpoint): New.
10742 (get_child_debug_event): Use it.
10743
4e799345
DJ
107442007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10745
10746 * configure.ac: Check for pread and pwrite.
10747 * hostio.c (handle_pread): Fall back to lseek and read.
10748 (handle_pwrite): Fall back to lseek and write.
10749 * config.in, configure: Regenerated.
10750
27524b67
DJ
107512007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10752
10753 * server.c (myresume): Add own_buf argument.
10754 (main): Update calls.
10755
a20d5e98
DJ
107562007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10757
10758 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10759 * remote-utils.c (remote_open): Do not call disable_async_io.
10760 (block_async_io): Delete.
10761 (unblock_async_io): Make static.
10762 (initialize_async_io): New.
10763 * server.c (handle_v_cont): Handle async I/O here.
10764 (myresume): Likewise. Move other common resume tasks here...
10765 (main): ... from here. Call initialize_async_io. Disable async
10766 I/O before the main loop.
10767 * server.h (initialize_async_io): Declare.
10768 (block_async_io, unblock_async_io): Delete prototypes.
10769 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10770
b79d787e
DJ
107712007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10772
10773 * remote-utils.c (readchar): Allow binary data in received messages.
10774
d97903b2
PA
107752007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10776
10777 * win32-low.c (attaching): New global.
10778 (win32_create_inferior): Clear the `attaching' global.
10779 (win32_attach): Set the `attaching' global.
10780 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10781 attaching. Only set a breakpoint at the entry point if not
10782 attaching.
10783
311de423
PA
107842007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10785
10786 * server.c (main): Don't report dll events on the initial
10787 connection on attaches.
10788
6c2d16d2
PA
107892007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10790
10791 * server.c (main): Relax numerical bases supported for the pid of
10792 the --attach command line argument.
10793
5ca906e6
PA
107942007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10795
10796 * win32-low.c (win32_attach): Call OpenProcess before
10797 DebugActiveProcess, not after. Add last error output to error
10798 call.
10799
9c6c8194
PA
108002007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10801
10802 * win32-low.c (win32_get_thread_context)
10803 (win32_set_thread_context): New functions.
10804 (thread_rec): Use win32_get_thread_context.
10805 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10806 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10807 field.
10808
4d5d1aaa
PA
108092007-12-03 Leo Zayas
10810 Pedro Alves <pedro_alves@portugalmail.pt>
10811
10812 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10813 global variables.
10814 (child_add_thread): Minor cleanup.
10815 (child_continue): Resume artificially suspended threads before
10816 calling ContinueDebugEvent.
10817 (suspend_one_thread): New.
10818 (fake_breakpoint_event): New.
10819 (get_child_debug_event): Change return type to int. Check here if
10820 gdb sent an interrupt request. If a soft interrupt was requested,
10821 fake a breakpoint event. Return 0 if there is no event to handle,
10822 and 1 otherwise.
10823 (win32_wait): Don't check here if gdb sent an interrupt request.
10824 Ensure there is a valid event to handle.
10825 (win32_request_interrupt): Add soft interruption method as last
10826 resort.
10827
c436e841
PA
108282007-12-03 Leo Zayas
10829 Pedro Alves <pedro_alves@portugalmail.pt>
10830
10831 * win32-low.h (win32_thread_info): Add descriptions to the
10832 structure members. Replace `suspend_count' counter by a
10833 `suspended' flag.
10834 * win32-low.c (thread_rec): Update condition of when to get the
10835 context from the inferior. Rely on ContextFlags being set if it
10836 has already been retrieved. Only suspend the inferior thread if
10837 we haven't already. Warn if that fails.
10838 (continue_one_thread): s/suspend_count/suspended/. Only call
10839 ResumeThread once. Warn if that fails.
10840
e7b5fa67
PA
108412007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10842
10843 * win32-low.c (win32_wait): Don't read from the inferior when it
10844 has already exited.
10845
a385171d
PA
108462007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10847
10848 * Makefile.in (win32_low_h): New variable.
10849 (win32-low.o): Add dependency on $(win32_low_h).
10850 (win32-arm-low.o, win32-i386-low.o): New rules.
10851
f80c84b3
DJ
108522007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10853
10854 * hostio.c: Correct copyright year.
10855
a6b151f1
DJ
108562007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10857
10858 * Makefile.in (OBS): Add hostio.o.
10859 (hostio.o): New rule.
10860 * server.h (handle_vFile): Declare.
10861 * hostio.c: New file.
10862 * server.c (handle_v_requests): Take packet_len and new_packet_len
10863 for binary packets. Call handle_vFile.
10864 (main): Update call to handle_v_requests.
10865
f9387fc3
DJ
108662007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10867
10868 * linux-low.c: Include <sched.h>.
10869
51c2684e
DJ
108702007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10871
10872 * linux-low.c (linux_tracefork_grandchild): New.
10873 (linux_tracefork_child): Use clone.
10874 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10875
75f83163
JB
108762007-10-31 Joel Brobecker <brobecker@adacore.com>
10877
10878 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10879
da5898ce
DJ
108802007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10881
10882 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10883
24a09b5f
DJ
108842007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10885
10886 * inferiors.c (change_inferior_id): Delete.
10887 (add_pid_to_list, pull_pid_from_list): New.
10888 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10889 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10890 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10891 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10892 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10893 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10894 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10895 (using_threads): Always set to 1.
10896 (handle_extended_wait): New.
10897 (add_process): Do not set TID.
10898 (linux_create_inferior): Set must_set_ptrace_flags.
10899 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10900 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10901 (linux_thread_alive): Rename TID argument to LWPID.
10902 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10903 (linux_wait_for_event): Do not use TID or check using_threads. Update
10904 call to dead_thread_notify. Call handle_extended_wait.
10905 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10906 (send_sigstop): Delete sigstop_sent.
10907 (wait_for_sigstop): Avoid TID.
10908 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10909 (linux_test_for_tracefork): New.
10910 (linux_lookup_signals): Use thread_db_active and
10911 linux_supports_tracefork_flag.
10912 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10913 * linux-low.h (get_process_thread): Avoid TID.
10914 (struct process_ifo): Move thread_known and tid to the end. Remove
10915 sigstop_sent.
10916 (linux_attach_lwp, thread_db_init): Update prototypes.
10917 * server.h (change_inferior_id): Delete prototype.
10918 (add_pid_to_list, pull_pid_from_list): New prototypes.
10919 * thread-db.c (thread_db_use_events): New.
10920 (find_first_thread): Rename to...
10921 (find_one_thread): ...this. Update callers and messages. Do not
10922 call fatal. Check thread_db_use_events. Do not call
10923 change_inferior_id or new_thread_notify.
10924 (maybe_attach_thread): Update. Do not call new_thread_notify.
10925 (thread_db_init): Set thread_db_use_events. Check use_events.
10926 * utils.c (fatal, warning): Correct message prefix.
10927
30ed0a8f
DJ
109282007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10929
10930 * Makefile.in (clean): Remove new files.
10931 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10932 (powerpc-64.o, powerpc-64.c): New rules.
10933 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10934 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10935 with SPE.
10936 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10937 SPE targets.
10938 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10939 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10940 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10941 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10942 (target_regsets): Add AltiVec and SPE register sets.
10943 * configure.ac: Check for AltiVec and SPE.
10944 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10945 (ppc_fill_vrregset, ppc_store_vrregset): New.
10946 (target_regsets): Add AltiVec register set.
10947 * configure: Regenerated.
10948
fd462a61
DJ
109492007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10950
10951 * linux-low.c (O_LARGEFILE): Define.
10952 (linux_read_memory): Use /proc/PID/mem.
10953 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10954 * configure, config.in: Regenerated.
10955
69f223ed
DJ
109562007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10957
10958 * linux-low.c (linux_wait_for_event): Do not pass signals while
10959 single-stepping.
10960
aec18585
PA
109612007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10962
10963 * win32-low.c (create_process): New.
10964 (win32_create_inferior): Use create_process instead of
10965 CreateProcess. If create_process failed retry appending an ".exe"
10966 suffix. Store the GetLastError result immediatelly after
10967 create_process calls and use it on the call to error.
10968
34d86ddd
PA
109692007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10970
10971 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10972
5a0e3bd0
JB
109732007-08-23 Joel Brobecker <brobecker@adacore.com>
10974
10975 * configure.ac: Switch license to GPLv3.
10976
f88c79e6
MS
109772007-08-01 Michael Snyder <msnyder@access-company.com>
10978
10979 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10980
6b3d9b83
PA
109812007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
10982
10983 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10984 typedef.
10985 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10986 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
10987 CloseToolhelp32Snapshot.
10988 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10989 CloseToolhelp32Snapshot.
10990
c588c53c
MS
109912007-07-27 Michael Snyder <michael.snyder@access-company.com>
10992
10993 * server.c (main): Check for inferior exit before main loop.
10994
aa0403d9
PA
109952007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
10996
10997 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
10998 instead of on tmp_desc.
10999
255e7678
DJ
110002007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11001 Daniel Jacobowitz <dan@codesourcery.com>
11002
11003 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11004 (add_thread): Minor cleanups.
11005 (clear_inferiors): Move lower in the file. Clear the DLL
11006 list.
11007 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11008 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11009 (xml_escape_text): New.
11010 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11011 for qSupported.
11012 (handle_v_cont): Report errors.
11013 (gdbserver_version): Update.
11014 (main): Correct size of own_buf. Do not report initial DLL events.
11015 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11016 (unloaded_dll, xml_escape_text): New.
11017 * win32-low.c (enum target_waitkind): Update comments.
11018 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11019 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11020 (win32_EnumProcessModules, win32_GetModuleInformation)
11021 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11022 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11023 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11024 (win32_Module32First, win32_Module32Next, load_toolhelp)
11025 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11026 (get_child_debug_event): Handle DLL events.
11027 (win32_wait): Likewise.
11028
0d37add9
DJ
110292007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11030
11031 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11032 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11033
45e2715e
PA
110342007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11035
11036 * win32-low.c (handle_output_debug_string): Ignore event if not
11037 waiting.
11038
c5674cf1
PA
110392007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11040
11041 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11042
2bbe3cc1
DJ
110432007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11044
11045 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11046
ae13219e
DJ
110472007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11048
11049 * inferiors.c (change_inferior_id): Add comment.
11050 * linux-low.c (check_removed_breakpoint): Add an early
11051 prototype. Improve debug output.
11052 (linux_attach): Doc update.
11053 (linux_detach_one_process, linux_detach): Clean up before releasing
11054 each process.
11055 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11056 * linux-low.h (struct process_info): Doc improvement.
11057 * mem-break.c (delete_all_breakpoints): New.
11058 * mem-break.h (delete_all_breakpoints): New prototype.
11059 * thread-db.c (find_first_thread): New.
11060 (thread_db_create_event): Call it instead of
11061 thread_db_find_new_threads. Clean up unused variables.
11062 (maybe_attach_thread): Remove first thread handling.
11063 (thread_db_find_new_threads): Use find_first_thread.
11064 (thread_db_get_tls_address): Likewise.
11065
4105de34
DJ
110662007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11067
11068 * thread-db.c (thread_db_find_new_threads): Add prototype.
11069 (thread_db_create_event): Check for the main thread before adding
11070 a new thread.
11071 (maybe_attach_thread): Only enable event reporting if TID == 0.
11072 (thread_db_get_tls_address): Check for new threads.
11073
2b876972
DJ
110742007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11075
11076 * linux-low.c (linux_create_inferior): Try execv before execvp.
11077 * spu-low.c (spu_create_inferior): Likewise.
11078
7a245884
DJ
110792007-06-13 Mike Frysinger <vapier@gentoo.org>
11080
11081 * linux-low.c (linux_create_inferior): Change execv to execvp.
11082 * spu-low.c (spu_create_inferior): Likewies.
11083
117ce543
DJ
110842007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11085
11086 * Makefile.in (clean): Clean new files instead of deleted ones.
11087 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11088 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11089 rules.
11090 * configure.srv: Specify XML files and new regformats for MIPS and
11091 MIPS64 GNU/Linux.
11092 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11093 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11094 an entry for the restart register.
11095 (mips_cannot_fetch_register, mips_cannot_store_register)
11096 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11097 register names to match the XML descriptions.
11098 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11099 restart register instead of $0.
11100
0e7f50da
UW
111012007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11102 Markus Deuling <deuling@de.ibm.com>
11103
11104 * remote-utils.c (decode_xfer_write): New function.
11105 * server.h (decode_xfer_write): Add prototype.
11106 * server.c (handle_query): Add PACKET_LEN argument. Support
11107 qXfer:spu:read and qXfer:spu:write packets.
11108 (main): Pass packet_len to handle_query.
11109 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11110 * target.h (target_ops): Add qxfer_spu.
11111
374c1d38
UW
111122007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11113
11114 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11115 accessing non-seekable spufs files.
11116
bb63802a
UW
111172007-05-16 Markus Deuling <deuling@de.ibm.com>
11118
889bf7c5 11119 * server.c (handle_query): Add reply for qC packet.
bb63802a 11120
7390519e
PA
111212007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11122 Leo Zayas <lerele@champenstudios@com>
11123
11124 * server.h (check_remote_input_interrupt_request): New function.
11125 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11126 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11127 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11128 (check_remote_input_interrupt_request): New function.
11129 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 11130 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
11131 winapi_GenerateConsoleCtrlEvent): New typedefs.
11132 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11133 to 250 ms.
11134 (win32_wait): Check for remote interrupt request
11135 with check_remote_input_interrupt_request.
11136 (win32_request_interrupt): New function.
11137 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11138
34b34921
PA
111392007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11140
11141 * win32-low.c (debug_registers_changed,
11142 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11143 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11144 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11145 (thread_rec): Get context using the low target.
11146 (child_add_thread): Call thread_added on the low target,
11147 which does the same thing.
11148 (regptr): Delete.
11149 (do_initial_child_stuff): Remove debug registers references.
11150 Set context using the low target. Resume threads after
11151 setting the contexts.
11152 (child_continue): Remove dead variable. Remove debug
11153 registers references.
11154 (child_fetch_inferior_registers): Go through the low target.
11155 (do_child_store_inferior_registers): Remove.
11156 (child_store_inferior_registers): Go through the low target.
11157 (win32_resume): Remove debug registers references.
11158 Set context using the low target.
11159 (handle_exception): Change return type to void. Don't record
11160 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11161 first chance exception.
889bf7c5 11162 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
11163 goto loop. Always return after waiting for debug event.
11164 (win32_wait): Convert to switch statement. Handle spurious
11165 events.
11166
11167 * win32-i386-low.c (debug_registers_changed,
11168 debug_registers_used): New.
11169 (initial_stuff): Rename to ...
11170 (i386_initial_stuff): ... this. Clear debug registers
11171 state variables.
11172 (store_debug_registers): Delete.
11173 (i386_get_thread_context): New.
11174 (load_debug_registers): Delete.
11175 (i386_set_thread_context): New.
11176 (i386_thread_added): New.
11177 (single_step): Rename to ...
11178 (i386_single_step): ... this.
11179 (do_fetch_inferior_registers): Rename to ...
11180 (i386_fetch_inferior_register): ... this.
11181 (i386_store_inferior_register): New.
11182 (the_low_target): Adapt to new interface.
11183
11184 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11185 (arm_get_thread_context): New.
11186 (arm_set_thread_context): New.
11187 (regptr): New.
11188 (do_fetch_inferior_registers): Rename to ...
11189 (arm_fetch_inferior_register): ... this.
11190 (arm_store_inferior_register): New.
11191 (arm_wince_breakpoint): Reimplement as unsigned long.
11192 (arm_wince_breakpoint_len): Define.
11193 (the_low_target): Adapt to new interface.
11194
11195 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11196 load_debug_registers. Add get_thread_context, set_thread_context,
11197 thread_added and store_inferior_register. Rename
11198 fetch_inferior_registers to fetch_inferior_register.
11199 (regptr): Remove declaration.
11200
dd6953e1
PA
112012007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11202
11203 * linux-low.c (linux_detach): Change return type to int. Return 0.
11204 * spu-low.c (spu_detach): Likewise.
11205
444d6139
PA
112062007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11207
11208 * target.h (target_ops): Change return type of detach to int.
11209 Add join.
11210 (join_inferior): New.
11211 * server.c (main): Don't skip detach support on mingw32.
11212 If the inferior doesn't support detaching return error.
11213 Call join_inferior instead of using waitpid.
11214 * linux-low.c (linux_join): New.
11215 (linux_target_op): Add linux_join.
11216 * spu-low.c (spu_join): New.
11217 (spu_target_ops): Add spu_join.
11218 * win32-low.c (win32_detach): Adapt to new interface.
11219 Reopen current_process_handle before detaching. Issue a child
11220 resume before detaching.
11221 (win32_join): New.
11222 (win32_target_op): Add win32_join.
11223
1d5315fe
PA
112242007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11225
11226 * win32-low.c (win32-attach): Fix return value.
11227 * target.h (target_ops): Describe ATTACH return values.
11228
bf914831
PA
112292007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11230
11231 * win32-low.c (GETPROCADDRESS): Define.
11232 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11233 (winapi_DebugSetProcessKillOnExit): Likewise.
11234 (win32_create_inferior): Force usage of ansi CreateProcessA.
11235 (win32_attach): Use GETPROCADDRESS.
11236 (win32_detach): Likewise.
11237
f72f3e60
PA
112382007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11239
11240 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11241
ed50f18f
PA
112422007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11243
11244 * win32-low.c: Commit leftover changes from 2007-03-29.
11245
0c2ead7e
DJ
112462007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11247
11248 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11249 fields short instead of int. Add explicit padding.
11250 (i387_cache_to_fsave): Remove unnecessary casts.
11251 (i387_fsave_to_cache): Doc fix.
11252 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11253
73725ff3
DJ
112542007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11255
11256 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11257 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11258
d99f33d8
PA
112592007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11260
11261 * configure.srv (arm*-*-mingw32ce*): Move near the other
11262 arm targets.
11263
68070c10
PA
112642007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11265
2482afc6 11266 * configure.ac: Add errno checking.
68070c10
PA
11267 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11268 sys/file.h and malloc.h.
11269 (AC_CHECK_DECLS): Add perror.
11270 (srv_mingwce): Handle.
2482afc6 11271 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
11272 win32-i386-low.o to srv_tgtobj.
11273 (i[34567]86-*-mingw*): Likewise.
11274 (arm*-*-mingw32ce*): Add case.
11275 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11276 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11277 [__MINGW32CE__] (strerror): New function.
11278 [__MINGW32CE__] (errno): Define to GetLastError.
11279 [__MINGW32CE__] (COUNTOF): New macro.
11280 (remote_open): Remove extra close call.
11281 * mem-break.c (delete_breakpoint_at): New function.
11282 * mem-break.h (delete_breakpoint_at): Declare.
11283 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11284 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11285 [USE_WIN32API] (read, write): Add char* casts.
11286 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11287 * server.h: Include wincecompat.h on Windows CE.
11288 [HAVE_ERRNO_H]: Check.
11289 (perror): Declare if not declared.
11290 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11291 (perror_with_name): Remove errno declaration.
11292 * wincecompat.h: New.
11293 * wincecompat.c: New.
11294 * win32-low.h: New.
11295 * win32-arm-low.c: New.
11296 * win32-i386-low.c: New.
11297 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11298 (OUTMSG2): Make it safe.
11299 (_T): New macro.
11300 (COUNTOF): New macro.
11301 (NUM_REGS): Get it from the low target.
11302 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11303 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11304 (thread_rec): Let low target handle debug registers.
11305 (child_add_thread): Likewise.
11306 (child_init_thread_list): Likewise.
11307 (continue_one_thread): Likewise.
11308 (regptr): New.
11309 (do_child_fetch_inferior_registers): Move to ...
11310 * win32-i386-low.c: ... here, and rename to ...
11311 (do_fetch_inferior_registers): ... this.
889bf7c5 11312 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
11313 Go through the low target.
11314 (do_child_store_inferior_registers): Use regptr.
11315 (strwinerror): New function.
11316 (win32_create_inferior): Handle Windows CE.
11317 Use strwinerror instead of strerror on Windows error
11318 codes. Add program to the error output.
11319 Don't close the main thread handle on Windows CE.
11320 (win32_attach): Use coredll.dll on Windows CE.
11321 (win32_kill): Close current process and current
11322 thread handles.
11323 (win32_detach): Use coredll.dll on Windows CE.
11324 (win32_resume): Let low target handle debug registers, and
11325 step request.
11326 (handle_exception): Add/Remove initial breakpoint. Avoid
11327 non-existant WSTOPSIG on Windows CE.
11328 (win32_read_inferior_memory): Cast to remove warning.
11329 (win32_arch_string): Go through the low target.
11330 (initialize_low): Call set_breakpoint_data with the low
11331 target's breakpoint.
11332 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11333 FOP_REGNUM, mappings): Move to ...
11334 * win32-i386-low.c: ... here.
11335 * win32-low.c (win32_thread_info): Move to ...
11336 * win32-low.h: ... here.
11337 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11338 win32-arm-low.c and wincecompat.c.
11339 (all:): Add $EXEEXT.
11340 (install-only:): Likewise.
11341 (gdbserver:): Likewise.
11342 (gdbreplay:): Likewise.
11343 * config.in: Regenerate.
11344 * configure: Regenerate.
11345
41093d81
PA
113462007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11347
11348 * win32-low.c: Rename typedef thread_info to
11349 win32_thread_info throughout.
11350
544afa54
PA
113512007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11352
11353 * win32-i386-low.c: Rename to ...
11354 * win32-low.c: ... this.
11355 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11356 * Makefile.in: Likewise.
11357
bce7165d
PA
113582007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11359
11360 * remote-utils.c (monitor_output): Constify msg parameter.
11361 * server.h (monitor_output): Likewise.
11362 * win32-i386-low.c (handle_output_debug_string): New.
11363 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11364 handle_output_debug_string.
11365 (get_child_debug_event): Likewise.
11366
506c7aa0
DJ
113672007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11368
11369 * server.c (main): Correct strtoul check.
11370
42c81e2a
DJ
113712007-03-27 Jon Ringle <jon@ringle.org>
11372
11373 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11374
9453113a
DJ
113752007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11376
11377 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11378
64a69107
DJ
113792007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11380
11381 * terminal.h: Check HAVE_SGTTY_H.
11382
113832007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
11384
11385 * remote-utils.c (remote_open): Print out the assigned port number.
11386
c74d0ad8
DJ
113872007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11388
11389 * remote-utils.c (monitor_output): New function.
11390 * server.c (debug_threads): Define here.
11391 (monitor_show_help): New function.
11392 (handle_query): Handle qRcmd.
11393 (main): Do not handle 'd' packet.
11394 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11395 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11396 of debug_threads.
11397
de7c3b4a
PA
113982007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11399
11400 * Makefile.in (EXEEXT): New.
11401 (clean): Use $(EXEEXT).
11402
ef57601b
PA
114032007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11404
11405 * target.h (target_ops): Rename send_signal to request_interrupt,
11406 and remove enum target_signal parameter.
11407 * linux-low.c (linux_request_interrupt): Rename from
11408 linux_send_signal, and always send SIGINT.
11409 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11410 and always send SIGINT.
11411 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11412 of send_signal.
11413 (input_interrupt): Likewise.
11414
820f2bda
PA
114152007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11416
11417 * server.c (get_features_xml): Check if target implemented
11418 arch_string.
11419 * win32-i386-low.c (win32_arch_string): New.
11420 (win32_target_ops): Add win32_arch_string as arch_string member.
11421
ab39bf24
UW
114222007-02-22 Markus Deuling <deuling@de.ibm.com>
11423
11424 * spu-low.c (spu_arch_string): New.
11425 (spu_target_ops): Add spu_arch_string.
11426
61ff6e04
DJ
114272007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11428
11429 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11430 * configure.ac: Do not check for terminal.h.
11431 * configure, config.in: Regenerated.
11432
fb1e4ffc
DJ
114332007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11434
11435 * Makefile.in (OBS): Add $(XML_BUILTIN).
11436 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11437 (clean): Update.
11438 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11439 (arm-with-iwmmxt.c): New.
11440 * config.in, configure: Regenerate.
11441 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11442 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11443 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11444 (arm*-*-linux*): Add iWMMXt and regset support.
11445 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11446 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11447 (arm_store_wmmxregset, target_regsets): New.
11448 * server.c (get_features_xml): Take annex argument. Check builtin
11449 XML documents.
11450 (handle_query): Handle multiple annexes.
11451
0f48aa01
DJ
114522007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11453
11454 * remote-utils.c [USE_WIN32API] (read, write): Define.
11455 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11456 write.
11457
23181151
DJ
114582007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11459
11460 * linux-i386-low.c (the_low_target): Set arch_string.
11461 * linux-x86-64-low.c (the_low_target): Likewise.
11462 * linux-low.c (linux_arch_string): New.
11463 (linux_target_ops): Add it.
11464 * linux-low.h (struct linux_target_ops): Add arch_string.
11465 * server.c (write_qxfer_response): Use const void * for DATA.
11466 (get_features_xml): New.
11467 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11468 * target.h (struct target_ops): Add arch_string method.
11469
9d606399
DJ
114702007-01-03 Denis Pilat <denis.pilat@st.com>
11471 Daniel Jacobowitz <dan@codesourcery.com>
11472
11473 * linux-low.c (linux_kill): Handle being called with no threads.
11474 * win32-i386-low.c (win32_kill): Likewise.
11475 (get_child_debug_event): Clear current_process_handle.
11476
114772006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
11478 Daniel Jacobowitz <dan@codesourcery.com>
11479
11480 * remote-utils.c (remote_open): Check the type of specified
11481 serial port devices before opening them.
11482 * server.c (main): Kill the inferior if an error occurs during
11483 the first remote_open.
11484
a5e13d24
DJ
114852006-12-05 Markus Deuling <deuling@de.ibm.com>
11486
11487 * README: Update supported targets.
11488
186947f7
DJ
114892006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11490
11491 * Makefile.in (clean): Remove reg-mips64.c.
11492 (reg-mips64.c, reg-mips64.o): New rules.
11493 * configure.srv: Handle mips64. Include regset support for mips.
11494 * linux-mips-low.c (union mips_register): New.
11495 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11496 (mips_breakpoint, mips_breakpoint_at): Use int.
11497 (mips_collect_register, mips_supply_register)
11498 (mips_collect_register_32bit, mips_supply_register_32bit)
11499 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11500 (mips_store_fpregset, target_regsets): New.
11501 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11502
a13e2c95
UW
115032006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11504
11505 * configure.srv: Add target "spu*-*-*".
11506 * Makefile.in (clean): Remove reg-spu.c.
11507 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11508 * spu-low.c: New file.
11509
cb7283db
DJ
115102006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11511
11512 * configure.ac: Correct td_thr_tls_get_addr test.
11513 * configure: Regenerated.
11514
89be2091
DJ
115152006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11516
11517 * linux-low.c (linux_wait_for_event): Reformat. Use the
11518 pass_signals array.
11519 * remote-utils.c (decode_address_to_semicolon): New.
11520 * server.c (pass_signals, handle_general_set): New.
11521 (handle_query): Mention QPassSignals for qSupported.
11522 (main): Call handle_general_set.
11523 * server.h (pass_signals, decode_address_to_semicolon): New.
11524
000ef4f0
DJ
115252006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11526
11527 * server.c (handle_query): Correct error handling for read_auxv.
11528
b7149293
UW
115292005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11530
11531 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11532 and srv_linux_thread_db to yes.
11533 * linux-s390-low.c (s390_fill_gregset): New function.
11534 (target_regsets): Define data structure.
11535
dae5f5cf
DJ
115362006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11537
11538 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11539 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11540 * config.in, configure: Regenerated.
11541 * inferiors.c (gdb_id_to_thread): New function.
11542 (gdb_id_to_thread_id): Use it.
11543 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11544 * linux-low.h (struct process_info): Add th member.
11545 (thread_db_get_tls_address): New prototype.
11546 * remote-utils.c (decode_address): Make non-static.
11547 * server.c (handle_query): Handle qGetTLSAddr.
11548 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11549 * target.h (struct target_ops): Add get_tls_address.
11550 * thread-db.c (maybe_attach_thread): Save the thread handle.
11551 (thread_db_get_tls_address): New.
11552
32ca6d61
DJ
115532006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11554
11555 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11556 (linux_resume_one_process): Take a siginfo_t *. Update all
11557 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11558 (struct pending_signals): Add a siginfo_t.
11559 (linux_wait_for_process): Always set last_status.
11560 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11561 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11562 * linux-low.h (struct process_info): Add last_status.
11563
5ffff7c1
DJ
115642006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11565
11566 * remote-utils.c (try_rle): New function.
11567 (putpkt_binary): Use it.
11568
8695c747
DJ
115692006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11570
11571 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11572 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11573 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11574 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11575 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11576 point registers.
11577
290fadea
RS
115782006-08-08 Richard Sandiford <richard@codesourcery.com>
11579
11580 * server.c (terminal_fd): New variable.
11581 (old_foreground_pgrp): Likewise.
11582 (restore_old_foreground_pgrp): New function.
11583 (start_inferior): Record the terminal file descriptor in terminal_fd
11584 and its original foreground group in old_foreground_pgrp. Register
11585 restore_old_foreground_pgrp with atexit().
11586
9f2e1e63
DJ
115872006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11588
11589 * server.c (handle_query): Correct qPart to qXfer.
11590
b80864fb
DJ
115912006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11592
11593 * configure.ac: Check for more headers which are missing on
11594 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11595 * configure.srv: Add Cygwin and mingw32.
11596 * remote-utils.c: Don't include headers unconditionally which
11597 are missing on mingw32. Include <winsock.h> for mingw32.
11598 (remote_open): Adjust for mingw32 support. Flush
11599 standard error after writing to it.
11600 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11601 (unblock_async_io, enable_async_io, disable_async_io)
11602 (readchar, getpkt): Update for Winsock support.
11603 (prepare_resume_reply): Expect a protocol signal number.
11604 * server.c: Disable <sys/wait.h> on mingw32.
11605 (start_inferior): Adjust for mingw32 support. Flush
11606 standard error after writing to it.
11607 (attach_inferior): Likewise. Use protocol signal
11608 numbers.
11609 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11610 and names.
11611 * win32-i386-low.c: New file.
11612 * Makefile.in (XM_CLIBS): Set.
11613 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11614 (win32-i386-low.o): New dependency rule.
11615 * linux-low.c (linux_wait): Use target signal numbers.
11616 * target.h (struct target_ops): Doc fix.
11617 * server.h (target_signal_to_name): New prototype.
11618 * gdbreplay.c: Don't include headers unconditionally which
11619 are missing on mingw32. Include <winsock.h> for mingw32.
11620 (remote_close, remote_open): Adjust for Winsock support.
11621 * configure, config.in: Regenerated.
11622
0876f84a
DJ
116232006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11624
11625 * server.c (decode_xfer_read, write_qxfer_response): New.
11626 (handle_query): Take a packet length argument. Handle
11627 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11628 the qSupported response.
11629 (main): Update call to handle_query.
11630
01f9e8fa
DJ
116312006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11632
11633 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11634 (putpkt_binary): Renamed from putpkt and adjusted for binary
11635 data.
11636 (putpkt): New wrapper for putpkt_binary.
11637 (readchar): Don't mask off the high bit.
11638 (decode_X_packet): New function.
11639 * server.c (main): Call putpkt_binary if a handler sets the packet
11640 length. Save the length of the incoming packet. Handle 'X'.
11641 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11642
be2a5f71
DJ
116432006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11644
11645 * server.c (handle_query): Handle qSupported.
11646
ea025f5f
DJ
116472006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11648
11649 * remote-utils.c (all_symbols_looked_up): New variable.
11650 (look_up_one_symbol): Check it.
11651 * server.h (look_up_one_symbol): New declaration.
11652 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11653
9308fc88
DJ
116542006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11655
11656 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 11657 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
11658 (PTRACE_GET_THREAD_AREA): Define.
11659 (ps_get_thread_area): New function.
11660
52fb6437
NS
116612006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11662
11663 * configure.srv (m68k*-*-uclinux*): New target.
11664 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11665 (linux_resume_one_process): Remove extraneous cast.
11666 (linux_read_offsets): New.
11667 (linux_target_op): Add linux_read_offsets on mmuless systems.
11668 * server.c (handle_query): Add qOffsets logic.
11669 * target.h (struct target_ops): Add read_offsets.
11670
21b0f40c
DJ
116712006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11672
11673 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11674 (PTRACE_GET_THREAD_AREA): Define.
11675 (ps_get_thread_area): New function.
11676 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11677 (linux-x86-64-low.o): Update.
11678
0050a760
DJ
116792006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11680
11681 * configure.ac: Remove checks for prfpregset_t.
11682 * gdb_proc_service.h: New file.
11683 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11684 new "gdb_proc_service.h".
11685 * proc-service.c: Likewise.
11686 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11687 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11688 * Makefile.in (gdb_proc_service_h): Updated.
11689 * configure, config.in: Regenerated.
11690
b92a518e
DJ
116912006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11692
11693 * remote-utils.c (prepare_resume_reply): Move declaration
11694 of gdb_id_from_wait to the top of the block.
11695
545587ee
DJ
116962006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11697
11698 * linux-low.c (regsets_store_inferior_registers): Read the regset
11699 from the target before filling it.
11700
9db87ebd
DJ
117012006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11702
11703 * server.c (attach_inferior): Return SIGTRAP for a successful
11704 attach.
11705
dd24457d
DJ
117062006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11707
11708 * Makefile.in (OBS): Add version.o.
11709 (STAGESTUFF): Delete.
11710 (version.o): Add dependencies.
11711 (version.c): Replace rule.
11712 (clean): Remove version.c.
11713 * server.c (gdbserver_version): New.
11714 (gdbserver_usage): Use printf.
11715 (main): Handle --version and --help.
11716 * server.h (version, host_name): Add declarations.
11717
6f0f660e
EZ
117182005-12-23 Eli Zaretskii <eliz@gnu.org>
11719
889bf7c5
PA
11720 * linux-arm-low.c:
11721 * linux-arm-low.c:
11722 * inferiors.c:
11723 * i387-fp.h:
11724 * i387-fp.c:
11725 * gdbreplay.c:
11726 * regcache.c:
11727 * proc-service.c:
11728 * mem-break.h:
11729 * mem-break.c:
11730 * linux-x86-64-low.c:
11731 * linux-sh-low.c:
11732 * linux-s390-low.c:
11733 * linux-ppc64-low.c:
11734 * linux-ppc-low.c:
11735 * linux-mips-low.c:
11736 * linux-m68k-low.c:
11737 * linux-m32r-low.c:
11738 * linux-low.h:
11739 * linux-low.c:
11740 * linux-ia64-low.c:
11741 * linux-i386-low.c:
11742 * linux-crisv32-low.c:
11743 * thread-db.c:
11744 * terminal.h:
11745 * target.h:
11746 * target.c:
11747 * server.h:
11748 * server.c:
11749 * remote-utils.c:
11750 * regcache.h:
11751 * utils.c:
11752 * Makefile.in:
11753 * configure.ac:
6f0f660e
EZ
11754 * gdbserver.1: Add (C) after Copyright. Update the FSF
11755 address.
11756
9d1fb177
DJ
117572005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11758
11759 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11760 (arm_breakpoint_at): Recognize both breakpoints.
11761 (the_low_target): Use the correct breakpoint instruction.
11762
011a70c2
DJ
117632005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11764
11765 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11766 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11767 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11768 (the_low_target): Update.
11769
7fb85e41
AS
117702005-10-25 Andreas Schwab <schwab@suse.de>
11771
11772 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11773
11774 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11775 (ia64_num_regs): Reduce to 462.
11776
3db0444b
DJ
117772005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11778
11779 * acinclude.m4: Correct quoting.
11780 * aclocal.m4: Regenerated.
11781
11782 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11783 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11784 (thread_db_init): Call thread_db_err_str.
11785 * configure.ac: Check for TD_VERSION.
11786 * config.in, configure: Regenerated.
11787
bee0189a
DJ
117882005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11789
11790 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11791
e9d25b98
DJ
117922005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11793
11794 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11795 is not available. Define HAVE_PTRACE_GETREGS if it is.
11796 * config.in, configure: Regenerated.
11797 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11798 * linux-i386-low.c, linux-m68k-low.c: Update to use
11799 HAVE_PTRACE_GETREGS.
11800 * linux-low.c (regsets_fetch_inferior_registers)
11801 (regsets_store_inferior_registers): Only return 0 if we processed
11802 GENERAL_REGS.
11803 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11804 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11805
a06660f7
DJ
118062005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11807
11808 * inferiors.c (struct thread_info): Add gdb_id.
11809 (add_thread): Add gdb_id argument.
11810 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11811 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11812 calls to add_thread.
11813 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11814 * server.c (handle_query): Use thread_to_gdb_id.
11815 (handle_v_cont, main): Use gdb_id_to_thread_id.
11816 * server.h (add_thread): Update prototype.
11817 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11818 prototypes.
11819
5a1f5858
DJ
118202005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11821
11822 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11823 left-padded registers.
11824 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11825 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11826
e122f1f5
SE
118272005-07-01 Steve Ellcey <sje@cup.hp.com>
11828
11829 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11830 * configure: Regenerate.
11831 * config.in: Regenerate.
11832 * server.h (NEED_DECLARATION_STRERROR):
11833 Replace with !HAVE_DECL_STRERROR.
11834
d592fa2f
DJ
118352005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11836
11837 * linux-low.c (linux_wait, linux_send_signal): Don't test
11838 an unsigned long variable for > 0 if it could be MAX_ULONG.
11839 * server.c (myresume): Likewise.
11840 * target.c (set_desired_inferior): Likewise.
11841
ccbd4912
MK
118422005-06-13 Mark Kettenis <kettenis@gnu.org>
11843
11844 * configure.ac: Simplify and improve check for socklen_t.
11845 * configure, config.in: Regenerate.
11846
f450004a
DJ
118472005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11848
11849 * acconfig.h: Remove.
11850 * configure.ac: Add a test for socklen_t. Use three-argument
11851 AC_DEFINE throughout.
11852 * config.in: Regenerated using autoheader 2.59.
11853 * configure: Regenerated.
11854
11855 * gdbreplay.c (socklen_t): Provide a default.
11856 (remote_open): Use socklen_t.
11857 * remote-utils.c (socklen_t): Provide a default.
11858 (remote_open): Use socklen_t.
11859 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11860 unsigned char.
11861
11862 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11863 char for buffers.
11864 * linux-low.c (linux_read_memory, linux_write_memory)
11865 (linux_read_auxv): Likewise.
11866 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11867 (check_mem_write): Likewise.
11868 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11869 Likewise.
11870 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11871 (registers_from_string, register_data): Likewise.
11872 * server.c (handle_query, main): Likewise.
11873 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11874 (decode_M_packet): Likewise.
11875 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11876 * target.h (struct target_ops): Update read_memory, write_memory,
11877 and read_auxv.
11878 (read_inferior_memory, write_inferior_memory): Update.
11879 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11880 to unsigned char *.
11881 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11882 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11883 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11884 linux-s390-low.c, linux-sh-low.c: Update for changes in
11885 read_inferior_memory and the_low_target->breakpoint.
11886
eee84df1
DJ
118872005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11888
11889 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11890 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11891 * configure.srv: Add powerpc64-*-linux*.
11892 * linux-ppc64-low.c: New file.
11893
45b134e5
OF
118942005-05-23 Orjan Friberg <orjanf@axis.com>
11895
11896 * linux-cris-low.c: New file with support for CRIS.
11897 * linux-crisv32-low.c: Ditto for CRISv32.
11898 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11899 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 11900 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
11901 reg-crisv32.o, and reg-crisv32.c to make rules.
11902 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11903 recognized targets.
11904
48d93c75
UW
119052005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11906
11907 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11908 of sizeof (PTRACE_XFER_TYPE).
11909 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11910
e013ee27
OF
119112005-05-12 Orjan Friberg <orjanf@axis.com>
11912
889bf7c5 11913 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
11914 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11915 pointers for hardware watchpoint support.
11916 * linux-low.h (struct linux_target_ops): Ditto.
11917 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11918 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11919 to linux_target_ops.
11920 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11921 reply packet.
11922 * server.c (main): Recognize 'Z' and 'z' packets.
11923
b0ded00b
UW
119242005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11925
11926 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11927 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11928 (the_low_target): Add new members.
11929
8643e2ad
DJ
119302005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11931
11932 * proc-service.c (ps_lgetregs): Search all_processes instead of
11933 all_threads.
11934
fc620387
DJ
119352005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11936
11937 * server.c (start_inferior): Change return type to int.
11938 (attach_inferior): Change sigptr to int *.
11939 (handle_v_cont, handle_v_requests): Change signal to int *.
11940 (main): Change signal to int.
11941
119422005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
11943
11944 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11945 * configure.srv: Add m32r*-*-linux*.
11946 * linux-m32r-low.c: New file.
11947
e0e76420
DJ
119482005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11949
11950 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11951
a1928bad
DJ
119522005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11953
11954 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11955 Take unsigned long arguments for PIDs.
11956 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11957 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11958 (wait_for_sigstop, linux_resume_one_process)
11959 (regsets_fetch_inferior_registers, linux_send_signal)
11960 (linux_read_auxv): Likewise. Update the types of variables holding
11961 PIDs. Update format string specifiers.
11962 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11963 * remote-utils.c (prepare_resume_reply): Likewise.
11964 * server.c (cont_thread, general_thread, step_thread)
11965 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11966 unsigned long.
11967 (handle_query): Update format specifiers.
11968 (handle_v_cont, main): Use strtoul for thread IDs.
11969 * server.h (struct inferior_list_entry): Use unsigned long for ID.
11970 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11971 (general_thread, step_thread, thread_from_wait)
11972 (old_thread_from_wait): Update.
11973 * target.h (struct thread_resume): Use unsigned long for THREAD.
11974 (struct target_ops): Use unsigned long for arguments to attach and
11975 thread_alive.
11976
dcdb98d2
DJ
119772005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
11978
11979 * acinclude.m4: Include bfd/bfd.m4 directly.
11980 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
11981 <agriffis@toolchain.org>.
11982 * aclocal.m4, configure: Regenerated.
11983
bec39cab
AC
119842005-01-07 Andrew Cagney <cagney@gnu.org>
11985
11986 * configure.ac: Rename configure.in, require autoconf 2.59.
11987 * configure: Re-generate.
11988
434c4c77
DJ
119892004-12-08 Daniel Jacobowitz <dan@debian.org>
11990
11991 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
11992 LIBS when finished.
11993 * aclocal.m4: Regenerated.
11994 * configure: Regenerated.
11995
db1d3e1b
AS
119962004-11-21 Andreas Schwab <schwab@suse.de>
11997
11998 * linux-m68k-low.c (m68k_num_gregs): Define.
11999 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12000 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12001 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12002 (m68k_breakpoint_at): New. Add to the_low_target.
12003
12004 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12005 srv_linux_thread_db to yes.
12006
43360365
JB
120072004-10-20 Joel Brobecker <brobecker@gnat.com>
12008
12009 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12010 (ARCH_SET_FS): Likewise.
12011 (ARCH_GET_FS): Likewise.
12012 (ARCH_GET_GS): Likewise.
12013
fd500816
DJ
120142004-10-16 Daniel Jacobowitz <dan@debian.org>
12015
12016 * linux-i386-low.c (ps_get_thread_area): New.
12017 * linux-x86-64-low.c (ps_get_thread_area): New.
12018 * linux-low.c: Include <sys/syscall.h>.
12019 (linux_kill_one_process): Don't kill the first thread here.
12020 (linux_kill): Kill the first thread here.
12021 (kill_lwp): New function.
12022 (send_sigstop, linux_send_signal): Use it.
12023 * proc-service.c: Clean up #ifdefs.
12024 (fpregset_info): Delete.
12025 (ps_lgetregs): Update and enable implementation.
12026 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12027 implementations.
12028 * remote-utils.c (struct sym_cache, symbol_cache): New.
12029 (input_interrupt): Print a clearer message.
12030 (async_io_enabled): New variable.
12031 (enable_async_io, disable_async_io): Use it. Update comments.
12032 (look_up_one_symbol): Use the symbol cache.
12033 * thread-db.c (thread_db_look_up_symbols): New function.
12034 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12035
f6de3c42
DJ
120362004-10-16 Daniel Jacobowitz <dan@debian.org>
12037
12038 * configure.in: Test for -rdynamic.
12039 * configure: Regenerated.
12040 * Makefile (INTERNAL_LDFLAGS): New.
12041 (gdbserver, gdbreplay): Use it.
12042
2c0fc042
AC
120432004-09-02 Andrew Cagney <cagney@gnu.org>
12044
12045 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12046
075b3282
DJ
120472004-03-23 Daniel Jacobowitz <drow@mvista.com>
12048
12049 * linux-low.c (linux_wait): Clear all_processes list also.
12050
fa6a77dc
DJ
120512004-03-12 Daniel Jacobowitz <drow@mvista.com>
12052
12053 * linux-low.c: Include <errno.h>. Remove extern declaration of
12054 errno.
12055
6d782a97
DJ
120562004-03-12 Daniel Jacobowitz <drow@mvista.com>
12057
12058 * gdbreplay.c, server.h, utils.c: Update copyright years.
12059
3a7fb99b
DJ
120602004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12061
12062 * server.c (main): Print child status or termination signal from
12063 variable 'signal', not 'sig'.
12064
c3e735a6
DJ
120652004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12066
12067 * linux-low.c (linux_read_memory): Change return type to
12068 int. Check for and return error from ptrace().
12069 * target.c (read_inferior_memory): Change return type to int. Pass
12070 back return status from the_target->read_memory().
12071 * target.h (struct target_ops): Adapt *read_memory() prototype.
12072 Update comment.
12073 (read_inferior_memory): Adapt prototype.
12074 * server.c (main): Return an error packet if
12075 read_inferior_memory() returns an error.
12076
a59d1c82
DJ
120772004-03-04 Daniel Jacobowitz <drow@mvista.com>
12078
12079 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12080 Unify with other clean targets.
12081
dc3f8883
DJ
120822004-02-29 Daniel Jacobowitz <drow@mvista.com>
12083
12084 * server.c (handle_v_cont): Call set_desired_inferior.
12085
89a208da
DJ
120862004-02-29 Daniel Jacobowitz <drow@mvista.com>
12087
12088 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12089
62ea82f5
DJ
120902004-02-29 Daniel Jacobowitz <drow@mvista.com>
12091
12092 * linux-low.c (linux_wait): Unblock async I/O.
12093 (linux_resume): Block and enable async I/O.
12094 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12095 * server.h (block_async_io, unblock_async_io): Add prototypes.
12096
6910d122
DJ
120972004-02-29 Daniel Jacobowitz <drow@mvista.com>
12098
12099 * remote-utils.c (remote_open): Print a status notice after
12100 opening a TCP port.
12101 * server.c (attach_inferior): Print a status notice after
12102 attaching.
12103
121042004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
12105
12106 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12107
c89dc5d4
DJ
121082004-02-26 Daniel Jacobowitz <drow@mvista.com>
12109
12110 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12111 error packet.
12112 * server.c, target.h: Update copyright years.
12113
4b8dad4a
RM
121142004-02-25 Roland McGrath <roland@redhat.com>
12115
12116 * target.h (struct target_ops): New member `read_auxv'.
12117 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12118 * linux-low.c (linux_read_auxv): New function.
12119 (linux_target_ops): Initialize `read_auxv' member to that.
12120
d7446758
JB
121212004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12122
12123 Committed by Jim Blandy <jimb@redhat.com>.
12124
12125 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 12126 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
12127 instead of GPR_SIZE to distiguish s390 and s390x targets.
12128
5544ad89
DJ
121292004-01-31 Daniel Jacobowitz <drow@mvista.com>
12130
12131 * linux-low.c: Update copyright year.
12132 (check_removed_breakpoint): Clear pending_is_breakpoint.
12133 (linux_set_resume_request, linux_queue_one_thread)
12134 (resume_status_pending_p): New functions.
12135 (linux_continue_one_thread): Use process->resume.
12136 (linux_resume): Only resume threads if there are no pending events.
12137 * linux-low.h (struct process_info): Add resume request
12138 pointer.
12139
2a68b70e
DJ
121402004-01-30 Daniel Jacobowitz <drow@mvista.com>
12141
12142 * regcache.c (new_register_cache): Clear the allocated register
12143 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12144
64386c31
DJ
121452003-10-13 Daniel Jacobowitz <drow@mvista.com>
12146
12147 * linux-low.c (linux_resume): Take a struct thread_resume *
12148 argument.
12149 (linux_wait): Update call.
12150 (resume_ptr): New static variable.
12151 (linux_continue_one_thread): Renamed from
12152 linux_continue_one_process. Use resume_ptr.
12153 (linux_resume): Use linux_continue_one_thread.
12154 * server.c (handle_v_cont, handle_v_requests): New functions.
12155 (myresume): New function.
12156 (main): Handle 'v' case.
12157 * target.h (struct thread_resume): New type.
12158 (struct target_ops): Change argument of "resume" to struct
12159 thread_resume *.
12160 (myresume): Delete macro.
12161
c938e9b0
L
121622003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12163
12164 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12165 (uninstall): Support DESTDIR.
12166
7f313d07
BC
12167Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12168
12169 * configure.srv: Add xscale*linux copy of arm*linux entry.
12170
3b2fc2ea
DJ
121712003-07-24 Daniel Jacobowitz <drow@mvista.com>
12172
12173 * linux-arm-low.c (arm_reinsert_addr): New function.
12174 (the_low_target): Add arm_reinsert_addr.
12175
1c0a559e
MK
121762003-07-08 Mark Kettenis <kettenis@gnu.org>
12177
12178 * mem-break.c: Remove whitespace at end of file.
12179
43d5792c
DJ
121802003-06-28 Daniel Jacobowitz <drow@mvista.com>
12181
12182 * configure.in: Check whether we need to prototype strerror.
12183 * server.h: Optionally prototype strerror.
12184 * gdbreplay.c (perror_with_name): Use strerror.
12185 * linux-low.c (linux_attach_lwp): Use strerror.
12186 * utils.c (perror_with_name): Use strerror.
12187 * config.in, configure: Regenerated.
12188
c8a86edf
DJ
121892003-06-28 Daniel Jacobowitz <drow@mvista.com>
12190
12191 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12192 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12193
73d37363
DJ
121942003-06-20 Daniel Jacobowitz <drow@mvista.com>
12195
12196 * Makefile.in (SFILES): Update.
12197 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12198 low-sun3.c: Remove files.
12199
6ad8ae5c
DJ
122002003-06-17 Daniel Jacobowitz <drow@mvista.com>
12201
12202 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12203 (linux_detach_one_process, linux_detach): New functions.
12204 (linux_target_ops): Add linux_detach.
12205 * server.c (main): Handle 'D' packet.
12206 * target.h (struct target_ops): Add "detach" member.
12207 (detach_inferior): Define.
12208
1581182a
MK
122092003-06-13 Mark Kettenis <kettenis@gnu.org>
12210
12211 From Kelley Cook <kelleycook@wideopenwest.com>:
12212 * configure.srv: Accept i[34567]86 variants.
12213
e5379b03
DJ
122142003-06-05 Daniel Jacobowitz <drow@mvista.com>
12215
12216 * linux-low.c (linux_wait_for_event): Correct comment typos.
12217 (linux_resume_one_process): Call check_removed_breakpoint.
12218 (linux_send_signal): New function.
12219 (linux_target_ops): Add linux_send_signal.
12220 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12221 of kill.
12222 * target.h (struct target_ops): Add send_signal.
12223
2ff29de4
JB
122242003-05-29 Jim Blandy <jimb@redhat.com>
12225
12226 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12227 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12228 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12229 away part of the register's value.
12230
254787d4
DJ
122312003-03-26 Daniel Jacobowitz <drow@mvista.com>
12232
12233 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12234 (linux_wait_for_event, linux_init_signals): Likewise.
12235
94e10508
DJ
122362003-03-17 Daniel Jacobowitz <drow@mvista.com>
12237
12238 * configure.in: Check for stdlib.h.
12239 * configure: Regenerated.
12240 * config.in: Regenerated.
12241
4c0711e0
DJ
122422003-01-04 Andreas Schwab <schwab@suse.de>
12243
12244 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12245
ef66e766
AC
122462003-01-02 Andrew Cagney <ac131313@redhat.com>
12247
12248 * Makefile.in: Remove obsolete code.
12249
a1358604
DJ
122502002-11-20 Daniel Jacobowitz <drow@mvista.com>
12251
12252 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12253 defined(PT_FPR0_HI).
12254
23ce3b1c
DJ
122552002-11-17 Stuart Hughes <seh@zee2.com>
12256
12257 * linux-arm-low.c (arm_num_regs): Increase.
12258 (arm_regmap): Include status register.
12259
122602002-11-17 Daniel Jacobowitz <drow@mvista.com>
12261
12262 * linux-low.c (register_addr): Remove incorrect -1 check.
12263
a9fa9f7d
DJ
122642002-08-29 Daniel Jacobowitz <drow@mvista.com>
12265
12266 * linux-low.c (linux_create_inferior): Call setpgid. Return
12267 the new PID.
12268 (unstopped_p, linux_signal_pid): Remove.
12269 (linux_target_ops): Remove linux_signal_pid.
12270 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12271 global instead of target method.
12272 * target.h (struct target_ops): Remove signal_pid. Update comment
12273 for create_inferior.
12274 * server.c (signal_pid): New variable.
12275 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 12276 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
12277 (attach_inferior): Set signal_pid.
12278
17574093
DJ
122792002-08-23 Daniel Jacobowitz <drow@mvista.com>
12280
12281 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12282
122832002-08-20 Jim Blandy <jimb@redhat.com>
12284
12285 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12286 default for this.
12287
122882002-08-01 Andrew Cagney <cagney@redhat.com>
12289
12290 * Makefile.in: Make chill references obsolete.
12291
122922002-07-24 Kevin Buettner <kevinb@redhat.com>
12293
12294 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12295 * configure: Regenerate.
12296 * config.in: Regenerate.
12297
122982002-07-09 David O'Brien <obrien@FreeBSD.org>
12299
12300 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12301 (perror_with_name, remote_close, remote_open, expect, play): Static.
12302
123032002-07-04 Michal Ludvig <mludvig@suse.cz>
12304
4b8dad4a 12305 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
12306 byte offsets instead of an array of indexes.
12307 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12308
123092002-06-13 Daniel Jacobowitz <drow@mvista.com>
12310
12311 * regcache.c: Add comment.
12312
123132002-06-11 Daniel Jacobowitz <drow@mvista.com>
12314
12315 * thread-db.c: New file.
12316 * proc-service.c: New file.
12317 * acinclude.m4: New file.
12318 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12319 proc-service.o, and thread-db.o.
12320 (linux-low.o): Add USE_THREAD_DB.
12321 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12322 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12323 * aclocal.m4: Regenerated.
12324 * config.in: Regenerated.
12325 * configure: Regenerated.
12326 * configure.in: Check for proc_service.h, sys/procfs.h,
12327 thread_db.h, and linux/elf.h headrs.
12328 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12329 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12330 Check for -lthread_db and thread support.
12331 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12332 PowerPC, and SuperH.
12333 * i387-fp.c: Constify arguments.
12334 * i387-fp.h: Likewise.
12335 * inferiors.c: (struct thread_info): Renamed from
12336 `struct inferior_info'. Remove PID member. Use generic inferior
12337 list header. All uses updated.
12338 (inferiors, signal_pid): Removed.
12339 (all_threads): New variable.
12340 (get_thread): Define.
12341 (add_inferior_to_list): New function.
12342 (for_each_inferior): New function.
12343 (change_inferior_id): New function.
12344 (add_inferior): Removed.
12345 (remove_inferior): New function.
12346 (add_thread): New function.
12347 (free_one_thread): New function.
12348 (remove_thread): New function.
12349 (clear_inferiors): Use for_each_inferior and free_one_thread.
12350 (find_inferior): New function.
12351 (find_inferior_id): New function.
12352 (inferior_target_data): Update argument type.
12353 (set_inferior_target_data): Likewise.
12354 (inferior_regcache_data): Likewise.
12355 (set_inferior_regcache_data): Likewise.
12356 * linux-low.c (linux_bp_reinsert): Remove.
12357 (all_processes, stopping_threads, using_thrads)
12358 (struct pending_signals, debug_threads, pid_of): New.
12359 (inferior_pid): Replace with macro.
12360 (struct inferior_linux_data): Remove.
12361 (get_stop_pc, add_process): New functions.
12362 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12363 Use add_process and add_thread.
12364 (linux_attach_lwp): New function, based on old linux_attach. Use
12365 add_process and add_thread. Set stop_expected for new threads.
12366 (linux_attach): New function.
12367 (linux_kill_one_process): New function.
12368 (linux_kill): Kill all LWPs.
12369 (linux_thread_alive): Use find_inferior_id.
12370 (check_removed_breakpoints, status_pending_p): New functions.
12371 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12372 Update. Use WNOHANG. Wait for cloned processes also. Update process
12373 struct for the found process.
12374 (linux_wait_for_event): New function.
12375 (linux_wait): Use it. Support LWPs.
12376 (send_sigstop, wait_for_sigstop, stop_all_processes)
12377 (linux_resume_one_process, linux_continue_one_process): New functions.
12378 (linux_resume): Support LWPs.
12379 (REGISTER_RAW_SIZE): Remove.
12380 (fetch_register): Use register_size instead. Call supply_register.
12381 (usr_store_inferior_registers): Likewise. Call collect_register.
12382 Fix recursive case.
12383 (regsets_fetch_inferior_registers): Improve error message.
12384 (regsets_store_inferior_registers): Add debugging.
12385 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12386 (unstopped_p, linux_signal_pid): New functions.
12387 (linux_target_ops): Add linux_signal_pid.
12388 (linux_init_signals): New function.
12389 (initialize_low): Call it. Initialize using_threads.
12390 * regcache.c (inferior_regcache_data): Add valid
12391 flag.
12392 (get_regcache): Fetch registers lazily. Add fetch argument
12393 and update all callers.
12394 (regcache_invalidate_one, regcache_invalidate): New
12395 functions.
12396 (new_register_cache): Renamed from create_register_cache.
12397 Return the new regcache.
12398 (free_register_cache): Change argument to a void *.
12399 (registers_to_string, registers_from_string): Call get_regcache
12400 with fetch flag set.
12401 (register_data): Make static. Pass fetch flag to get_regcache.
12402 (supply_register): Call get_regcache with fetch flag clear.
12403 (collect_register): Call get_regcache with fetch flag set.
12404 (collect_register_as_string): New function.
12405 * regcache.h: Update.
12406 * remote-utils.c (putpkt): Flush after debug output and use
12407 stderr.
12408 Handle input interrupts while waiting for an ACK.
12409 (input_interrupt): Use signal_pid method.
12410 (getpkt): Flush after debug output and use stderr.
12411 (outreg): Use collect_register_as_string.
12412 (new_thread_notify, dead_thread_notify): New functions.
12413 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12414 and general_thread.
12415 (look_up_one_symbol): Flush after debug output.
12416 * server.c (step_thread, server_waiting): New variables.
12417 (start_inferior): Don't use signal_pid. Update call to mywait.
12418 (attach_inferior): Update call to mywait.
12419 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12420 (main): Don't fetch/store registers explicitly. Use
12421 set_desired_inferior. Support proposed ``Hs'' packet. Update
12422 calls to mywait.
12423 * server.h: Update.
12424 (struct inferior_list, struct_inferior_list_entry): New.
12425 * target.c (set_desired_inferior): New.
12426 (write_inferior_memory): Constify.
12427 (mywait): New function.
12428 * target.h: Update.
12429 (struct target_ops): New signal_pid method.
12430 (mywait): Removed macro, added prototype.
12431
12432 * linux-low.h (regset_func): Removed.
12433 (regset_fill_func, regset_store_func): New.
12434 (enum regset_type): New.
12435 (struct regset_info): Add type field. Use new operation types.
12436 (struct linux_target_ops): stop_pc renamed to get_pc.
12437 Add decr_pc_after_break and breakpoint_at.
12438 (get_process, get_thread_proess, get_process_thread)
12439 (strut process_info, all_processes, linux_attach_lwp)
12440 (thread_db_init): New.
12441
12442 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12443 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12444 (the_low_target): Add new members.
12445 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12446 (i386_store_fpxregset): Constify.
12447 (target_regsets): Add new kind identifier.
12448 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12449 (i386_set_pc): Add debugging.
12450 (i386_breakpoint_at): New function.
12451 (the_low_target): Add new members.
12452 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12453 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12454 (mips_breakpoint_at): New.
12455 (the_low_target): Add new members.
12456 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12457 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12458 (the_low_target): Add new members.
12459 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12460 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12461 (the_low_target): Add new members.
12462 * linux-x86-64-low.c (target_regsets): Add new kind
12463 identifier.
12464
124652002-05-15 Daniel Jacobowitz <drow@mvista.com>
12466
12467 From Martin Pool <mbp@samba.org>:
12468 * server.c (gdbserver_usage): New function.
12469 (main): Call it.
12470
124712002-05-14 Daniel Jacobowitz <drow@mvista.com>
12472
12473 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12474 stop_at -> stop_pc.
12475
124762002-05-04 Andrew Cagney <ac131313@redhat.com>
12477
12478 * Makefile.in: Remove obsolete code.
12479
124802002-04-24 Michal Ludvig <mludvig@suse.cz>
12481
12482 * linux-low.c (regsets_fetch_inferior_registers),
12483 (regsets_store_inferior_registers): Removed cast to int from
12484 ptrace() calls.
12485 * regcache.h: Added declaration of struct inferior_info.
12486
124872002-04-20 Daniel Jacobowitz <drow@mvista.com>
12488
12489 * inferiors.c (struct inferior_info): Add regcache_data.
12490 (add_inferior): Call create_register_cache.
12491 (clear_inferiors): Call free_register_cache.
12492 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12493 * regcache.c (struct inferior_regcache_data): New.
12494 (registers): Remove.
12495 (get_regcache): New function.
12496 (create_register_cache, free_register_cache): New functions.
12497 (set_register_cache): Don't initialize the register cache here.
12498 (registers_to_string, registers_from_string, register_data): Call
12499 get_regcache.
12500 * regcache.h: Add prototypes.
12501 * server.h: Likewise.
12502
125032002-04-20 Daniel Jacobowitz <drow@mvista.com>
12504
12505 * mem-break.c: New file.
12506 * mem-break.h: New file.
12507 * Makefile.in: Add mem-break.o rule; update server.h
12508 dependencies.
12509 * inferiors.c (struct inferior_info): Add target_data
12510 member.
12511 (clear_inferiors): Free target_data member if set.
12512 (inferior_target_data, set_inferior_target_data): New functions.
12513 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12514 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12515 * linux-low.c (linux_bp_reinsert): New variable.
12516 (struct inferior_linux_data): New.
12517 (linux_create_inferior): Use set_inferior_target_data.
12518 (linux_attach): Likewise. Call add_inferior.
12519 (linux_wait_for_one_inferior): New function.
12520 (linux_wait): Call it.
12521 (linux_write_memory): Add const.
12522 (initialize_low): Call set_breakpoint_data.
12523 * linux-low.h (struct linux_target_ops): Add breakpoint
12524 handling members.
12525 * server.c (attach_inferior): Remove extra add_inferior
12526 call.
12527 * server.h: Include mem-break.h. Update inferior.c
12528 prototypes.
12529 * target.c (read_inferior_memory)
12530 (write_inferior_memory): New functions.
12531 * target.h (read_inferior_memory)
12532 (write_inferior_memory): Change macros to prototypes.
12533 (struct target_ops): Update comments. Add const to write_memory
12534 definition.
12535
125362002-04-11 Daniel Jacobowitz <drow@mvista.com>
12537
12538 * linux-low.c (usr_store_inferior_registers): Support
12539 registers which are allowed to fail to store.
12540 * linux-low.h (linux_target_ops): Likewise.
12541 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12542 (ppc_cannot_store_register): FPSCR may not be storable.
12543
125442002-04-09 Daniel Jacobowitz <drow@mvista.com>
12545
12546 * server.h: Include <string.h> if HAVE_STRING_H.
12547 * ChangeLog: Correct paths in last ChangeLog entry.
12548
125492002-04-09 Daniel Jacobowitz <drow@mvista.com>
12550
12551 * linux-low.h: Remove obsolete prototypes.
12552 (struct linux_target_ops): New.
12553 (extern the_low_target): New.
12554 * linux-low.c (num_regs, regmap): Remove declarations.
12555 (register_addr): Use the_low_target explicitly.
12556 (fetch_register): Likewise.
12557 (usr_fetch_inferior_registers): Likewise.
12558 (usr_store_inferior_registers): Likewise.
12559 * linux-arm-low.c (num_regs): Remove.
12560 (arm_num_regs): Define.
12561 (arm_regmap): Renamed from regmap, made static.
12562 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12563 made static.
12564 (arm_cannot_store_register): Renamed from cannot_store_register,
12565 made static.
12566 (the_low_target): New.
12567 * linux-i386-low.c (num_regs): Remove.
12568 (i386_num_regs): Define.
12569 (i386_regmap): Renamed from regmap, made static.
12570 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12571 made static.
12572 (i386_cannot_store_register): Renamed from cannot_store_register,
12573 made static.
12574 (the_low_target): New.
12575 * linux-ia64-low.c (num_regs): Remove.
12576 (ia64_num_regs): Define.
12577 (ia64_regmap): Renamed from regmap, made static.
12578 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12579 made static.
12580 (ia64_cannot_store_register): Renamed from cannot_store_register,
12581 made static.
12582 (the_low_target): New.
12583 * linux-m68k-low.c (num_regs): Remove.
12584 (m68k_num_regs): Define.
12585 (m68k_regmap): Renamed from regmap, made static.
12586 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12587 made static.
12588 (m68k_cannot_store_register): Renamed from cannot_store_register,
12589 made static.
12590 (the_low_target): New.
12591 * linux-mips-low.c (num_regs): Remove.
12592 (mips_num_regs): Define.
12593 (mips_regmap): Renamed from regmap, made static.
12594 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12595 made static.
12596 (mips_cannot_store_register): Renamed from cannot_store_register,
12597 made static.
12598 (the_low_target): New.
12599 * linux-ppc-low.c (num_regs): Remove.
12600 (ppc_num_regs): Define.
12601 (ppc_regmap): Renamed from regmap, made static.
12602 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12603 made static.
12604 (ppc_cannot_store_register): Renamed from cannot_store_register,
12605 made static.
12606 (the_low_target): New.
12607 * linux-s390-low.c (num_regs): Remove.
12608 (s390_num_regs): Define.
12609 (s390_regmap): Renamed from regmap, made static.
12610 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12611 made static.
12612 (s390_cannot_store_register): Renamed from cannot_store_register,
12613 made static.
12614 (the_low_target): New.
12615 * linux-sh-low.c (num_regs): Remove.
12616 (sh_num_regs): Define.
12617 (sh_regmap): Renamed from regmap, made static.
12618 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12619 made static.
12620 (sh_cannot_store_register): Renamed from cannot_store_register,
12621 made static.
12622 (the_low_target): New.
12623 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12624 (the_low_target): New.
12625
126262002-04-09 Daniel Jacobowitz <drow@mvista.com>
12627
12628 * Makefile.in: Add stamp-h target.
12629 * configure.in: Create stamp-h.
12630 * configure: Regenerated.
12631
126322002-04-09 Daniel Jacobowitz <drow@mvista.com>
12633
12634 * inferiors.c: New file.
12635 * target.c: New file.
12636 * target.h: New file.
12637 * Makefile.in: Add target.o and inferiors.o. Update
12638 dependencies.
12639 * linux-low.c (inferior_pid): New static variable,
12640 moved from server.c.
12641 (linux_create_inferior): Renamed from create_inferior.
12642 Call add_inferior. Return 0 on success instead of a PID.
12643 (linux_attach): Renamed from myattach.
12644 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12645 (linux_thread_alive): Renamed from mythread_alive.
12646 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12647 child dies.
12648 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12649 (regsets_store_inferior_registers): Correct error message.
12650 Add missing ``return 0''.
12651 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12652 (linux_store_registers): Renamed from store_inferior_registers.
12653 (linux_read_memory): Renamed from read_inferior_memory.
12654 (linux_write_memory): Renamed from write_inferior_memory.
12655 (linux_target_ops): New structure.
12656 (initialize_low): Call set_target_ops ().
12657 * remote-utils.c (unhexify): New function.
12658 (hexify): New function.
12659 (input_interrupt): Send signals to ``signal_pid''.
12660 * server.c (inferior_pid): Remove.
12661 (start_inferior): Update create_inferior call.
12662 (attach_inferior): Call add_inferior.
12663 (handle_query): New function.
12664 (main): Call handle_query for `q' packets.
12665 * server.h: Include "target.h". Remove obsolete prototypes.
12666 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12667
126682002-04-09 Daniel Jacobowitz <drow@mvista.com>
12669
12670 * Makefile.in: Add WARN_CFLAGS. Update configury
12671 dependencies.
12672 * configure.in: Check for <string.h>
12673 * configure: Regenerate.
12674 * config.in: Regenerate.
12675 * gdbreplay.c: Include needed system headers.
12676 (remote_open): Remove strchr prototype.
12677 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12678 * regcache.c (supply_register): Change buf argument to const void *.
12679 (supply_register_by_name): Likewise.
12680 (collect_register): Change buf argument to void *.
12681 (collect_register_by_name): Likewise.
12682 * regcache.h: Add missing prototypes.
12683 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12684 * server.c (handle_query): New function.
12685 (attached): New static variable, moved out of main.
12686 (main): Quiet longjmp clobber warnings.
12687 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12688 * utils.c (error): Remove NORETURN.
12689 (fatal): Likewise.