]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Allow for __gnu_lto_slim prefixed with extra "_"
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
4d3bb80e
SM
12017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2
3 * gdbthread.h (find_thread, for_each_thread): New functions.
4 * inferiors.c (thread_of_pid): Remove.
5 (find_any_thread_of_pid): Use find_thread.
6 * linux-low.c (num_lwps): Use for_each_thread.
7
7a7cdfa0
YQ
82017-10-17 Yao Qi <yao.qi@linaro.org>
9
10 * Makefile.in: Remove one rule.
11 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
12
e675d170
YQ
132017-10-17 Yao Qi <yao.qi@linaro.org>
14
15 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
16 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
17
7eb4e0f9
YQ
182017-10-17 Yao Qi <yao.qi@linaro.org>
19
20 * configure.srv: Rename arm.o with arch/arm.o.
21
60d6cfc9
YQ
222017-10-17 Yao Qi <yao.qi@linaro.org>
23
24 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
25 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
26 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
27 (arch-i386.o, arch-amd64.o): Remove rules.
28 (arch/%.o): New rule.
29 Update POSTCOMPILE and COMPILE.pre.
30 * configure.ac: Invoke AC_CONFIG_COMMANDS.
31 * configure: Re-generated.
32 * configure.srv: Replace arch-i386.o with arch/i386.o.
33 Replace arch-amd64.o with arch/amd64.o.
34
5bfda255
YQ
352017-10-16 Yao Qi <yao.qi@linaro.org>
36
37 * configure: Regenerated.
38
9c80ecd6
SM
392017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
40
41 * inferiors.h: (struct inferior_list): Remove.
42 (struct inferior_list_entry); Remove.
43 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
44 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
45 get_first_inferior): Remove.
46 (for_each_inferior, for_each_inferior_with_data, find_inferior,
47 find_inferior_id, find_inferior_in_random): Change signature.
48 * inferiors.c (all_threads): Change type to
49 std::list<thread_info *>.
50 (get_thread): Remove macro.
51 (find_inferior, find_inferior_id): Change signature, implement
52 using find_thread.
53 (find_inferior_in_random): Change signature, implement using
54 find_thread_in_random.
55 (for_each_inferior, for_each_inferior_with_data): Change
56 signature, implement using for_each_thread.
57 (add_inferior_to_list, remove_inferior): Remove.
58 (add_thread, get_first_thread, thread_of_pid,
59 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
60 (get_first_inferior, one_inferior_p, clear_inferior_list):
61 Remove.
62 (clear_inferiors, get_thread_process): Update.
63 * gdbthread.h: Include <list>.
64 (struct thread_info) <entry>: Remove field.
65 <id>: New field.
66 (all_threads): Change type to std::list<thread_info *>.
67 (get_first_inferior): Add doc.
68 (find_thread, for_each_thread, find_thread_in_random): New
69 functions.
70 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
71 * linux-arm-low.c (update_registers_callback): Update.
72 * linux-low.c (second_thread_of_pid_p): Update.
73 (kill_one_lwp_callback, linux_detach_lwp_callback,
74 delete_lwp_callback, status_pending_p_callback, same_lwp,
75 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
76 iterate_over_lwps, not_stopped_callback,
77 resume_stopped_resumed_lwps, count_events_callback,
78 select_singlestep_lwp_callback, select_event_lwp_callback,
79 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
80 suspend_and_send_sigstop_callback, wait_for_sigstop,
81 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
82 lwp_running, linux_set_resume_request, resume_status_pending_p,
83 need_step_over_p, start_step_over, linux_resume_one_thread,
84 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
85 reset_lwp_ptrace_options_callback): Update.
86 * linux-mips-low.c (update_watch_registers_callback): Update.
87 * regcache.c (regcache_invalidate_one, regcache_invalidate):
88 Update.
89 (free_register_cache_thread_one): Remove.
90 (regcache_release): Update.
91 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
92 handle_qxfer_threads_worker): Update.
93 (handle_query): Update, use list iterator.
94 (visit_actioned_threads, handle_pending_status,
95 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
96 clear_pending_status_callback, set_pending_status_callback,
97 find_status_pending_thread_callback, handle_status,
98 process_serial_event): Update.
99 * target.c (thread_search_callback): Update.
100 * thread-db.c (thread_db_get_tls_address): Update.
101 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
102 Update.
103 * win32-i386-low.c (update_debug_registers_callback): Update.
104 * win32-low.c (delete_thread_info, child_delete_thread,
105 continue_one_thread, suspend_one_thread,
106 get_child_debug_event): Adjust.
107
9179355e
SM
1082017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
109
110 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
111 * inferiors.h: Include <list>.
112 (struct process_info) <entry>: Remove field.
113 <pid>: New field.
114 (pid_of): Change macro to function.
115 (ptid_of, lwpid_of): Remove macro.
116 (all_processes): Change type to std::list<process_info *>.
117 (ALL_PROCESSES): Remove macro.
118 (for_each_process, find_process): New function.
119 * inferiors.c (all_processes): Change type to
120 std::list<process_info *>.
121 (find_thread_process): Adjust.
122 (add_process): Likewise.
123 (remove_process): Likewise.
124 (find_process_pid): Likewise.
125 (get_first_process): Likewise.
126 (started_inferior_callback): Remove.
127 (have_started_inferiors_p): Adjust.
128 (attached_inferior_callback): Remove.
129 (have_attached_inferiors_p): Adjust.
130 * linux-low.c (check_zombie_leaders): Likewise.
131 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
132 (x86_linux_update_xmltarget): Adjust.
133 * server.c (handle_query): Likewise.
134 (gdb_reattached_process): Remove.
135 (handle_status): Adjust.
136 (kill_inferior_callback): Likewise.
137 (detach_or_kill_inferior): Remove.
138 (print_started_pid): Likewise.
139 (print_attached_pid): Likewise.
140 (detach_or_kill_for_exit): Update.
141 (process_serial_event): Likewise.
142 * linux-arm-low.c (arm_new_fork): Likewise.
143
c9cb8905
SM
1442017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
145
146 * dll.h: Include <list>.
147 (struct dll_info): Add constructor.
148 <entry>: Remove field.
149 (all_dlls): Change type to std::list<dll_info>.
150 * dll.c: Include <algorithm>.
151 (get_dll): Remove macro.
152 (all_dlls): Change type to std::list<dll_info *>.
153 (free_one_dll): Remove.
154 (match_dll): Likewise.
155 (loaded_dll): Adjust.
156 (unloaded_dll): Adjust to all_dlls type change, use
157 std::find_if. Inline code from match_dll.
158 (clear_dlls): Adjust to all_dlls type change.
159 * server.c (emit_dll_description): Remove.
160 (handle_qxfer_libraries): Adjust to all_dlls type change,
161 integrate emit_dll_description's functionality.
162
04ec7890
SM
1632017-10-12 Simon Marchi <simon.marchi@ericsson.com>
164
165 * linux-low.h (struct linux_target_ops) <delete_process>: New
166 field.
167 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
168 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
169 (struct linux_target_ops): Add delete_process callback.
170 * linux-arm-low.c (arm_delete_process): New.
171 (struct linux_target_ops): Add delete_process callback.
172 * linux-bfin-low.c (struct linux_target_ops): Likewise.
173 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
174 * linux-m32r-low.c (struct linux_target_ops): Likewise.
175 * linux-mips-low.c (mips_linux_delete_process): New.
176 (struct linux_target_ops): Add delete_process callback.
177 * linux-ppc-low.c (struct linux_target_ops): Likewise.
178 * linux-s390-low.c (struct linux_target_ops): Likewise.
179 * linux-sh-low.c (struct linux_target_ops): Likewise.
180 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
181 * linux-tile-low.c (struct linux_target_ops): Likewise.
182 * linux-x86-low.c (x86_linux_delete_process): New.
183 (struct linux_target_ops): Add delete_process callback.
184 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
185
466eecee
SM
1862017-10-12 Simon Marchi <simon.marchi@ericsson.com>
187
188 * linux-aarch64-low.c (the_low_target): Add thread delete
189 callback.
190 * linux-arm-low.c (arm_delete_thread): New function.
191 (the_low_target): Add thread delete callback.
192 * linux-bfin-low.c (the_low_target): Likewise.
193 * linux-crisv32-low.c (the_low_target): Likewise.
194 * linux-low.c (delete_lwp): Invoke delete_thread callback if
195 set.
196 * linux-low.h (struct linux_target_ops) <delete_thread>: New
197 field.
198 * linux-m32r-low.c (the_low_target): Add thread delete callback.
199 * linux-mips-low.c (mips_linux_delete_thread): New function.
200 (the_low_target): Add thread delete callback.
201 * linux-ppc-low.c (the_low_target): Likewise.
202 * linux-s390-low.c (the_low_target): Likewise.
203 * linux-sh-low.c (the_low_target): Likewise.
204 * linux-tic6x-low.c (the_low_target): Likewise.
205 * linux-tile-low.c (the_low_target): Likewise.
206 * linux-x86-low.c (the_low_target): Likewise.
207 * linux-xtensa-low.c (the_low_target): Likewise.
208
b79f7801
YZ
2092017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
210
211 * win32-low.c: Include "common-inferior.h".
212
bc3b087d
SDJ
2132017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
214
215 * inferiors.c (set_inferior_cwd): New function.
216 * server.c (handle_general_set): Handle QSetWorkingDir packet.
217 (handle_query): Inform that QSetWorkingDir is supported.
218 * win32-low.c (create_process): Pass the inferior's cwd to
219 CreateProcess.
220
d092c5a2
SDJ
2212017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
222
223 * inferiors.c (current_inferior_cwd): New global variable.
224 (get_inferior_cwd): New function.
225 * inferiors.h (struct process_info) <cwd>: New field.
226
7da0a886
SDJ
2272017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
228
229 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
230 (OBS): Add gdb_tilde_expand.o.
231
289a6840
SM
2322017-10-02 Simon Marchi <simon.marchi@ericsson.com>
233
234 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
235 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
236
256642e8
PA
2372017-09-29 Pedro Alves <palves@redhat.com>
238
239 * ax.c (gdb_parse_agent_expr): Constify.
240 * ax.h (gdb_parse_agent_expr): Constify.
241 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
242 Constify.
243 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
244 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
245 * remote-utils.h (read_ptid): Constify.
246 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
247 (process_point_options, process_serial_event): Constify.
248 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
249 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
250 (cmd_qtbuffer): Constify.
251
5b9ca4d4
PA
2522017-09-29 Pedro Alves <palves@redhat.com>
253
254 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
255 fails.
256
94c207e0
PA
2572017-09-29 Pedro Alves <palves@redhat.com>
258
259 * linux-low.c (handle_extended_wait): Pass parent thread instead
260 of process to thread_db_notice_clone.
261 * linux-low.h (thread_db_notice_clone): Replace parent process
262 parameter with parent thread parameter.
263 * thread-db.c (find_one_thread): Add comment.
264 (thread_db_notice_clone): Replace parent process parameter with
265 parent thread parameter. Temporarily switch to the parent thread.
266
75352e28
SDJ
2672017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
268
269 * gdbthread.h: Include "common-gdbthread.h".
270 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
271 "if" when validating the ptid.
272 * remote-utils.c: Include "gdbthread.h".
273 (prepare_resume_reply): Use "switch_to_thread".
274 * target.c (done_accessing_memory): Likewise.
275
ad339634
AA
2762017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
277
278 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
279 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
280 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
281 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
282 s390x-gs-linux64-ipa.o to ipa_obj.
283 * linux-s390-low.c (HWCAP_S390_GS): New define.
284 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
285 New functions.
286 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
287 (s390_arch_setup): Check for guarded-storage support and choose
288 appropriate tdesc.
289 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
290 init_registers_s390x_gs_linux64.
291 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
292 enum value.
293 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
294 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
295
cc4d742f
SM
2962017-09-22 Simon Marchi <simon.marchi@ericsson.com>
297
298 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
299
f6327dcb
KB
3002017-09-21 Kevin Buettner <kevinb@redhat.com>
301
302 * linux-low.h (struct lwp_info): Add new field, thread_handle.
303 (thread_db_thread_handle): Declare.
304 * linux-low.c (linux_target_ops): Initialize thread_handle.
305 * server.c (handle_qxfer_threads_worker): Add support for
306 "handle" attribute.
307 * target.h (struct target_ops): Add new function pointer,
308 thread_handle.
309 (target_thread_handle): Define.
310 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
311 field in lwp.
312 (thread_db_thread_handle): New function.
313
86299109
KB
3142017-09-21 Kevin Buettner <kevinb@redhat.com>
315
316 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
317 * linux-low.h (thread_db_notice_clone): Declare.
318 * thread-db.c (thread_db_notice_clone): New function.
319
f557a88a
PA
3202017-09-21 Pedro Alves <palves@redhat.com>
321
322 * server.c (gdb_read_memory, handle_status, process_serial_event)
323 (handle_serial_event, handle_target_event): Adjust to
324 set_desired_thread prototype change.
325 * target.c (set_desired_thread): Remove 'use_general' parameter
326 and adjust.
327 * target.h (set_desired_thread): Remove 'use_general' parameter.
328
223ffa71
TT
3292017-09-20 Tom Tromey <tom@tromey.com>
330
331 * target.c (target_terminal::terminal_state): Define.
332 (target_terminal::init): Rename from target_terminal_init.
333 (target_terminal::inferior): Rename from
334 target_terminal_inferior.
335 (target_terminal::ours): Rename from target_terminal_ours.
336 (target_terminal::ours_for_output, target_terminal::info): New.
337
04fd3ba9
SM
3382017-09-16 Simon Marchi <simon.marchi@ericsson.com>
339
340 * server.c (accumulate_file_name_length): Remove.
341 (emit_dll_description): Adjust to std::string change.
342 (handle_qxfer_libraries): Use std::string to hold document.
343
5e187554
SM
3442017-09-16 Simon Marchi <simon.marchi@ericsson.com>
345
346 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
347 return type of xml_escape_text.
348 * server.c (emit_dll_description): Likewise.
349
1526853e
SM
3502017-09-16 Simon Marchi <simon.marchi@ericsson.com>
351
352 * server.c (captured_main): Accept argument for --selftest.
353 Update run_tests call.
354 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
355 when registering selftests.
356
c4dfafab
SDJ
3572017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
358
359 * regcache.c (get_thread_regcache): Update code to use "std::vector"
360 instead of "VEC" for "target_desc.reg_defs".
361 (regcache_cpy): Likewise.
362 (registers_to_string): Likewise.
363 (registers_from_string): Likewise.
364 (find_regno): Likewise.
365 (supply_regblock): Likewise.
366 (regcache_raw_read_unsigned): Likewise.
367 * tdesc.c (init_target_desc): Likewise.
368 (tdesc_create_reg): Likewise.
369 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
370 (struct target_desc) <reg_defs>: Convert to "std::vector".
371 (target_desc): Do not initialize "reg_defs".
372 (~target_desc): Update code to use "std::vector" instead of "VEC"
373 for "target_desc.reg_defs".
374 (operator==): Likewise.
375
124aceb4
SM
3762017-09-15 Simon Marchi <simon.marchi@ericsson.com>
377
378 * inferiors.h (thread_to_gdb_id): Remove.
379 * inferiors.c (thread_to_gdb_id): Remove.
380 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
381 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
382 lynx_store_registers, lynx_read_memory, lynx_write_memory):
383 Likewise.
384 * nto-low.c (nto_fetch_registers, nto_store_registers,
385 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
386
96cde54f
SM
3872017-09-15 Simon Marchi <simon.marchi@ericsson.com>
388
389 * inferiors.h (gdb_id_to_thread_id): Remove.
390 * inferiors.c (gdb_id_to_thread_id): Remove.
391 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
392 removal. Move pid declaration closer to where it's used.
393
e8ca139e
SM
3942017-09-15 Simon Marchi <simon.marchi@ericsson.com>
395
396 * server.c (handle_detach): New function.
397 (process_serial_event): Move code out, call handle_detach.
398
f8a4e119
SM
3992017-09-15 Simon Marchi <simon.marchi@ericsson.com>
400
401 * server.c (require_running): Rename to ...
402 (require_running_or_return): ... this ...
403 (require_running_or_break): ... and this.
404 (handle_query, process_serial_event): Adjust.
405
0eb0a407
SM
4062017-09-15 Simon Marchi <simon.marchi@ericsson.com>
407
408 * linux-low.c (linux_set_resume_request): Remove unused
409 variables.
410
785922a5
SM
4112017-09-15 Simon Marchi <simon.marchi@ericsson.com>
412
413 * server.c (first_thread_of): Remove.
414 (process_serial_event): Replace usage of first_thread_of with
415 find_any_thread_of_pid.
416 * tracepoint.c (same_process_p): Remove.
417 (gdb_agent_about_to_close): Replace usage of same_process_p with
418 find_any_thread_of_pid.
419 * linux-x86-low.c (same_process_callback): Remove.
420 (x86_arch_setup_process_callback): Replace usage of
421 same_process_callback with find_any_thread_of_pid.
422 * thread-db.c (any_thread_of): Remove.
423 (switch_to_process): Replace usage of any_thread_of with
424 find_any_thread_of_pid.
425 * inferiors.c (thread_pid_matches_callback): Remove.
426 (find_thread_process): Adjust to use find_any_thread_of_pid.
427
a059f00c
SDJ
4282017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
429
430 * regcache.c (get_thread_regcache): Guard calls to "memset"
431 with "!VEC_empty".
432
cc397f3a
SDJ
4332017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
434
435 * linux-low.c (handle_extended_wait): Use
436 "allocate_target_description" instead of "XNEW".
437 * linux-x86-low.c (initialize_low_arch): Likewise.
438
22916b07
YQ
4392017-09-05 Yao Qi <yao.qi@linaro.org>
440
441 * configure.srv (srv_i386_regobj): Remove.
442 (srv_amd64_regobj): Remove.
443 (srv_regobj): Set it to "" for x86 non-linux targets.
444 * linux-x86-tdesc.c (i386_linux_read_description):
445 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
446 (init_registers_i386): Remove the declaration.
447 (tdesc_i386): Remove the declaration.
448 (lynx_i386_arch_setup): Call i386_create_target_description.
449 * nto-x86-low.c: Likewise.
450 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
451 [!__x86_64__]: include arch/i386.h.
452 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
453
38602d55
YQ
4542017-09-05 Yao Qi <yao.qi@linaro.org>
455
456 * configure.srv (srv_amd64_linux_xmlfiles): Remove
457 i386/amd64-XXX-linux from it.
458
44b886ff
YQ
4592017-09-05 Yao Qi <yao.qi@linaro.org>
460
461 * configure.srv: Empty srv_amd64_linux_regobj if $development is
462 false.
463 (ipa_amd64_linux_regobj): Remove.
464 (ipa_x32_linux_regobj): Remove.
465
b4570e4b
YQ
4662017-09-05 Yao Qi <yao.qi@linaro.org>
467
468 * Makefile.in (arch-amd64.o): New rule.
469 * configure.srv: Append arch-amd64.o.
470 * linux-amd64-ipa.c: Include common/x86-xstate.h.
471 (get_ipa_tdesc): Call amd64_linux_read_description.
472 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
473 and init_registers_amd64_XXX.
474 * linux-x86-low.c (x86_linux_read_description): Call
475 amd64_linux_read_description.
476 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
477 (initialize_low_arch): Don't call init_registers_x32_XXX and
478 init_registers_amd64_XXX.
479 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
480 and tdesc_amd64_XXX.
481 [__x86_64__] (amd64_tdesc_test): New function.
482 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
483 and init_registers_amd64_XXX.
484 * linux-x86-tdesc.c: Include arch/amd64.h.
485 (xcr0_to_tdesc_idx): New function.
486 (i386_linux_read_description): New function.
487 (amd64_get_ipa_tdesc_idx): New function.
488 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
489 (amd64_get_ipa_tdesc): Declare.
490
d1f28ea2
YQ
4912017-09-05 Yao Qi <yao.qi@linaro.org>
492
493 * configure.srv (srv_i386_linux_xmlfiles): Remove
494 i386/i386-XXX-linux.xml from it.
495
25a93583
YQ
4962017-09-05 Yao Qi <yao.qi@linaro.org>
497
498 * configure.srv: Set srv_i386_linux_regobj empty if $development
499 is false.
500 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
501 initialize_low_tdesc.
502 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
503 with #if initialize_low_tdesc.
504 * linux-x86-tdesc-selftest.c: New file.
505 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
506
5f035c07
YQ
5072017-09-05 Yao Qi <yao.qi@linaro.org>
508
509 * Makefile.in (arch-i386.o): New rule.
510 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
511 (x86_64-*-linux*): Likewise.
512 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
513 include arch/i386.h.
514 (i386_linux_read_description): Remove code and call
515 i386_create_target_description.
516 * tdesc.c (allocate_target_description): New function.
517 * tdesc.h (set_tdesc_architecture): Remove declaration.
518 (set_tdesc_osabi): Likewise.
519
0abe8a89
YQ
5202017-09-05 Yao Qi <yao.qi@linaro.org>
521
522 * linux-x86-tdesc.c: Don't include <inttypes.h>.
523 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
524 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
525 .xmltarget.
526 * server.c (get_features_xml): Call tdesc_get_features_xml.
527 * tdesc.c (set_tdesc_architecture): New function.
528 (set_tdesc_osabi): New function.
529 (tdesc_get_features_xml): New function.
530 (tdesc_create_feature): Add an argument.
531 * tdesc.h (struct target_desc) <features>: New field.
532 <arch, osabi>: New field.
533 (~target_desc): xfree features, arch, and osabi.
534 (target_desc::oerator==): Don't compare .xmltarget.
535 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
536 (set_tdesc_osabi): Likewise.
537 (tdesc_get_features_xml): Likewise.
538
0a188386
YQ
5392017-09-05 Yao Qi <yao.qi@linaro.org>
540
541 * linux-x86-tdesc.c: Include selftest.h.
542 (i386_tdesc_test): New function.
543 (initialize_low_tdesc): Call selftests::register_test.
544 * tdesc.h: Include regdef.h.
545 (target_desc): Override operator == and !=.
546
f49ff000
YQ
5472017-09-05 Yao Qi <yao.qi@linaro.org>
548
549 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
550 (ipa_obj): Likewise.
551 * linux-i386-ipa.c: Include common/x86-xstate.h
552 (get_ipa_tdesc): Call i386_linux_read_description.
553 (initialize_low_tracepoint): Don't call init_registers_XXX
554 functions, call initialize_low_tdesc instead.
555 * linux-x86-low.c (x86_linux_read_description): Call
556 i386_linux_read_description.
557 (initialize_low_arch): Don't call init_registers_i386_XXX
558 functions, call initialize_low_tdesc.
559 * linux-x86-tdesc.c: New file.
560 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
561 (i386_get_ipa_tdesc_idx): Declare.
562 (i386_get_ipa_tdesc): Declare.
563 (initialize_low_tdesc): Declare.
564
2b68ef2f
YQ
5652017-09-05 Yao Qi <yao.qi@linaro.org>
566
567 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
568 instead of 0.
569
f7000548
YQ
5702017-09-05 Yao Qi <yao.qi@linaro.org>
571
572 * Makefile.in (IPA_OBJS): Add vec-ipa.o
573 * regcache.c (get_thread_regcache): Use VEC_length.
574 (init_register_cache): Likewise.
575 (regcache_cpy): Likewise.
576 (registers_to_string): Iterate reg_defs via VEC_iterate.
577 (find_regno): Likewise.
578 (find_register_by_number): Use VEC_index.
579 (register_size): Call find_register_by_number.
580 (register_data): Call find_register_by_number.
581 (supply_regblock): Use VEC_length.
582 (regcache_raw_read_unsigned): Likewise.
583 * tdesc.c (init_target_desc): Iterate reg_defs via
584 VEC_iterate.
585 (default_description): Update initializer.
586 (copy_target_description): Don't update field num_registers.
587 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
588 <num_registers>: Remove.
589
50a421ac
SM
5902017-09-04 Simon Marchi <simon.marchi@ericsson.com>
591
592 * Makefile.in (.SECONDARY): Define target.
593
23fdd69e
SM
5942017-09-03 Simon Marchi <simon.marchi@ericsson.com>
595
596 * linux-low.c (linux_wait_1): Adjust.
597 * server.c (queue_stop_reply_callback): Adjust.
598
0a2dde4a
SDJ
5992017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
600
601 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
602 QEnvironmentUnset and QEnvironmentReset packets.
603 (handle_query): Inform remote that QEnvironmentHexEncoded,
604 QEnvironmentUnset and QEnvironmentReset are supported.
605
6afd337d
SM
6062017-08-25 Simon Marchi <simon.marchi@ericsson.com>
607
608 * inferiors.h (inferior_target_data): Rename to ...
609 (thread_target_data): ... this.
610 (inferior_regcache_data): Rename to ...
611 (thread_regcache_data): ... this.
612 (set_inferior_regcache_data): Rename to ...
613 (set_thread_regcache_data): ... this.
614 * inferiors.c (inferior_target_data): Rename to ...
615 (thread_target_data): ... this.
616 (inferior_regcache_data): Rename to ...
617 (thread_regcache_data): ... this.
618 (set_inferior_regcache_data): Rename to ...
619 (set_thread_regcache_data): ... this.
620 (free_one_thread): Update.
621 * linux-low.h (get_thread_lwp): Update.
622 * regcache.c (get_thread_regcache): Update.
623 (regcache_invalidate_thread): Update.
624 (free_register_cache_thread): Update.
625 * win32-i386-low.c (update_debug_registers_callback): Update.
626 (win32_get_current_dr): Update.
627 * win32-low.c (thread_rec): Update.
628 (delete_thread_info): Update.
629 (continue_one_thread): Update.
630 (suspend_one_thread): Update.
631
a160cc46
SM
6322017-08-24 Simon Marchi <simon.marchi@ericsson.com>
633
634 * inferiors.c (set_inferior_target_data): Remove.
635 * inferiors.h (set_inferior_target_data): Remove.
636
6d580b63
YQ
6372017-08-18 Yao Qi <yao.qi@linaro.org>
638
639 * Makefile.in (OBS): Add selftest.o.
640 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
641 * configure, config.in: Re-generated.
642 * server.c: Include common/sefltest.h.
643 (captured_main): Handle option --selftest.
644
f5a29eb0
YQ
6452017-08-09 Yao Qi <yao.qi@linaro.org>
646
647 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
648 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
649 i386-avx-mpx.o and i386-mmx.o.
650 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
651 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
652 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
653 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
654 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
655 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
656 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
657 i386/amd64-avx-mpx.xml.
658
57757c2f
YQ
6592017-08-09 Yao Qi <yao.qi@linaro.org>
660
661 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
662 and x32-avx-avx512.o.
663 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
664 i386/x32-avx-avx512.xml.
665
229d26fc
SM
6662017-07-26 Simon Marchi <simon.marchi@ericsson.com>
667
668 * tracepoint.h (enum class fast_tpoint_collect_result): New
669 enumeration.
670 (fast_tracepoint_collecting): Change return type to
671 fast_tpoint_collect_result.
672 * tracepoint.c (fast_tracepoint_collecting): Likewise.
673 * linux-low.h: Include tracepoint.h.
674 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
675 fast_tpoint_collect_result.
676 * linux-low.c (handle_tracepoints): Adjust.
677 (linux_fast_tracepoint_collecting): Change return type to
678 fast_tpoint_collect_result.
679 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
680 linux_wait_1, stuck_in_jump_pad_callback,
681 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
682 proceed_one_lwp): Adjust to type change.
683
2e1e43e1
YQ
6842017-07-10 Yao Qi <yao.qi@linaro.org>
685
686 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
687
adc764e7
YQ
6882017-06-29 Yao Qi <yao.qi@linaro.org>
689
690 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
691 Remove.
692 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
693
a206891a
SM
6942017-06-20 Simon Marchi <simon.marchi@ericsson.com>
695
696 * Makefile.in (IPA_OBJS): Sort and format one item per line.
697
9a6c7d9c
SDJ
6982017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
699
700 * linux-low.c (linux_create_inferior): Adjust code to access the
701 environment information via 'gdb_environ' class.
702 * lynx-low.c (lynx_create_inferior): Likewise.
703 * server.c (our_environ): Make it an instance of 'gdb_environ'.
704 (get_environ): Return a pointer to 'our_environ'.
705 (captured_main): Initialize 'our_environ'.
706 * server.h (get_environ): Adjust prototype.
707 * spu-low.c (spu_create_inferior): Adjust code to access the
708 environment information via 'gdb_environ' class.
709
ae3e2ccf
SM
7102017-06-17 Simon Marchi <simon.marchi@ericsson.com>
711
712 * linux-low.c (linux_read_memory, linux_write_memory): Remove
713 usage of "register" keyword.
714
3e019bdc
SM
7152017-06-17 Simon Marchi <simon.marchi@ericsson.com>
716
717 * configure: Re-generate.
718
8465943a
SM
7192017-06-17 Simon Marchi <simon.marchi@ericsson.com>
720
721 * configure: Re-generate.
722
cf0dd6f0
SM
7232017-06-17 Simon Marchi <simon.marchi@ericsson.com>
724
725 * Makefile.in (COMPILE.pre): Add "-x c++".
726
9845682b
SDJ
7272017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
728
729 * fork-child.c: Conditionally include <signal.h>.
730
aefd8b33
SDJ
7312017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
732
733 * server.c (handle_general_set): Handle new packet
734 "QStartupWithShell".
735 (handle_query): Add "QStartupWithShell" to the list of supported
736 packets.
737 (gdbserver_usage): Add help text explaining the
738 new "--startup-with-shell" and "--no-startup-with-shell" CLI
739 options.
740 (captured_main): Recognize and act upon the presence of the new
741 CLI options.
742
2090129c
SDJ
7432017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
744 Pedro Alves <palves@redhat.com>
745
746 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
747 * configure: Regenerate.
748 * configure.srv (srv_linux_obj): Add "fork-child.o" and
749 "fork-inferior.o".
750 (i[34567]86-*-lynxos*): Likewise.
751 (spu*-*-*): Likewise.
752 * fork-child.c: New file.
753 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
754 and "environ.h".
755 (linux_ptrace_fun): New function.
756 (linux_create_inferior): Adjust function prototype to reflect
757 change on "target.h". Adjust function code to use
758 "fork_inferior".
759 (linux_request_interrupt): Delete "signal_pid".
760 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
761 (lynx_ptrace_fun): New function.
762 (lynx_create_inferior): Adjust function prototype to reflect
763 change on "target.h". Adjust function code to use
764 "fork_inferior".
765 * nto-low.c (nto_create_inferior): Adjust function prototype and
766 code to reflect change on "target.h". Update comments.
767 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
768 "common-terminal.h" and "environ.h".
769 (terminal_fd): Moved to fork-child.c.
770 (old_foreground_pgrp): Likewise.
771 (restore_old_foreground_pgrp): Likewise.
772 (last_status): Make it global.
773 (last_ptid): Likewise.
774 (our_environ): New variable.
775 (startup_with_shell): Likewise.
776 (program_name): Likewise.
777 (program_argv): Rename to...
778 (program_args): ...this.
779 (wrapper_argv): New variable.
780 (start_inferior): Delete function.
781 (get_exec_wrapper): New function.
782 (get_exec_file): Likewise.
783 (get_environ): Likewise.
784 (prefork_hook): Likewise.
785 (post_fork_inferior): Likewise.
786 (postfork_hook): Likewise.
787 (postfork_child_hook): Likewise.
788 (handle_v_run): Update code to deal with arguments coming from the
789 remote host. Update calls from "start_inferior" to
790 "create_inferior".
791 (captured_main): Likewise. Initialize environment variable. Call
792 "have_job_control".
793 * server.h (post_fork_inferior): New prototype.
794 (get_environ): Likewise.
795 (last_status): Declare.
796 (last_ptid): Likewise.
797 (signal_pid): Likewise.
798 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
799 (spu_ptrace_fun): New function.
800 (spu_create_inferior): Adjust function prototype to reflect change
801 on "target.h". Adjust function code to use "fork_inferior".
802 * target.c (target_terminal_init): New function.
803 (target_terminal_inferior): Likewise.
804 (target_terminal_ours): Likewise.
805 * target.h: Include <vector>.
806 (struct target_ops) <create_inferior>: Update prototype.
807 (create_inferior): Update macro.
808 * utils.c (gdb_flush_out_err): New function.
809 * win32-low.c (win32_create_inferior): Adjust function prototype
810 and code to reflect change on "target.h".
811
043a4934
SDJ
8122017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
813
814 * inferiors.c (switch_to_thread): New function.
815
15652511
SDJ
8162017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
817
818 * Makefile.in (SFILE): Add "common/job-control.c".
819 (OBS): Add "job-control.o".
820
21ea5acd
SDJ
8212017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
822
823 * Makefile: Remove "@host_makefile_frag@".
824
e13cb306
PA
8252017-05-05 Pedro Alves <palves@redhat.com>
826
827 * configure: Regenerate.
828
c94fee56
SDJ
8292017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
830
831 * configure: Regenerate.
832
a0ff9e1a
SM
8332017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
834
835 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
836 software_single_step change of return type to
837 std::vector<CORE_ADDR>.
838 * linux-low.c (install_software_single_step_breakpoints):
839 Likewise.
840 * linux-low.h (install_software_single_step_breakpoints):
841 Likewise.
842
be628ab8
SDJ
8432017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
844
845 * remote-utils.c: Include "gdb_termios.h" instead of
846 "terminal.h".
847 * terminal.h: Delete file.
848
7c5ded6a
SDJ
8492017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
850
851 * server.c: Include <vector>.
852 <program_argv, wrapper_argv>: Convert to std::vector.
853 (start_inferior): Rewrite function to use C++.
854 (handle_v_run): Likewise. Update code that calculates the argv
855 based on the vRun packet; use C++.
856 (captured_main): Likewise.
857
436252de
SM
8582017-04-06 Simon Marchi <simon.marchi@ericsson.com>
859
860 * server.c (handle_v_cont): Initialize thread_resume::thread
861 with null_ptid.
862
9bf2a700
PA
8632017-04-05 Pedro Alves <palves@redhat.com>
864
865 * configure: Regenerate.
866
a121b7c1
PA
8672017-04-05 Pedro Alves <palves@redhat.com>
868
869 * gdbreplay.c (sync_error): Constify.
870 * linux-x86-low.c (push_opcode): Constify.
871
21c8a587
PA
8722017-04-05 Pedro Alves <palves@redhat.com>
873
874 * win32-low.c (get_child_debug_event)
875 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
876 Report TARGET_WAITKIND_SPURIOUS instead.
877
fb32b4f7
PA
8782017-04-05 Pedro Alves <palves@redhat.com>
879
880 * remote-utils.c (remote_prepare, remote_open): Constify.
881 * remote-utils.h (remote_prepare, remote_open): Constify.
882 * server.c (captured_main): Constify 'port' handling.
883
65dd1e59
SM
8842017-04-04 Simon Marchi <simon.marchi@ericsson.com>
885
886 * Makefile.in (clean): Clear .deps.
887
8fa5b777
SM
8882017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
889
890 * .gitignore: Remove generated files, replace with wildcard.
891 * (clean): Replace removal of generated files with wildcard.
892 (version.c): Replace with...
893 (version-generated.c): ...this.
894 (xml-builtin.c): Replace with...
895 (xml-builtin-generated.c): ...this.
896 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
897 (%.c: *regformats*): Replace with...
898 (%-generated.c: *regformats*): ...this.
899
a12e714b
MF
9002017-03-27 Max Filippov <jcmvbkbc@gmail.com>
901
902 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
903 (xtensa_fill_gregset): Call collect_register_by_name for
904 threadptr register.
905 (xtensa_store_gregset): Call supply_register_by_name for
906 threadptr register.
907
1a09b50a
MF
9082017-03-27 Max Filippov <jcmvbkbc@gmail.com>
909
910 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
911 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
912 (xtensa_store_gregset): Call supply_register for all registers in
913 a0_regnum..a0_regnum + C0_NREGS range.
914
1a01e7c6
SM
9152017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
916
917 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
918 (ax-ipa.o: ax.c): Remove.
919 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
920 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
921 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
922 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
923 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
924
36bc18a8
SM
9252017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
926
927 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
928 (print-utils-ipa.o: ../common/print-utils.c): Remove.
929 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
930 (errors-ipa.o: ../common/errors.c): Remove.
931 (format-ipa.o: ../common/format.c): Remove.
932 (common-utils-ipa.o: ../common/common-utils.c): Remove.
933
a8ebe3d5
SM
9342017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
935
936 * Makefile.in (%-ipa.o: %.c): New rule.
937 (tracepoint-ipa.o: tracepoint.c): Remove.
938 (utils-ipa.o: utils.c): Remove.
939 (remote-utils-ipa.o: remote-utils.c): Remove.
940 (regcache-ipa.o: regcache.c): Remove.
941 (i386-linux-ipa.o: i386-linux.c): Remove.
942 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
943 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
944 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
945 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
946 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
947 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
948 (amd64-linux-ipa.o: amd64-linux.c): Remove.
949 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
950 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
951 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
952 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
953 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
954 (aarch64-ipa.o: aarch64.c): Remove.
955 (s390-linux32-ipa.o: s390-linux32.c): Remove.
956 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
957 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
958 (s390-linux64-ipa.o: s390-linux64.c): Remove.
959 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
960 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
961 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
962 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
963 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
964 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
965 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
966 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
967 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
968 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
969 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
970 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
971 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
972 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
973 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
974 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
975 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
976 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
977 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
978 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
979 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
980 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
981 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
982 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
983 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
984 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
985 (tdesc-ipa.o: tdesc.c): Remove.
986 (x32-linux-ipa.o: x32-linux.c): Remove.
987 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
988 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
989
50cfacb7
SM
9902017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
991
992 * Makefile.in (%.o: ../arch/%.c): New rule.
993 (arm.o: ../arch/arm.c): Remove.
994 (arm-linux.o: ../arch/arm-linux.c): Remove.
995 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
996 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
997
c5a22423
SM
9982017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
999
1000 * Makefile.in (%.o: ../nat/%.c): New rule.
1001 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1002 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1003 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1004 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1005 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1006 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1007 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1008 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1009 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1010 (linux-personality.o: ../nat/linux-personality.c): Remove.
1011 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1012 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1013 (x86-linux.o: ../nat/x86-linux.c): Remove.
1014 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1015 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1016
6bda016b
SM
10172017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1018
1019 * Makefile.in (%.o: ../common/%.c): New rule.
1020 (signals.o: ../common/signals.c): Remove.
1021 (print-utils.o: ../common/print-utils.c): Remove.
1022 (rsp-low.o: ../common/rsp-low.c): Remove.
1023 (common-utils.o: ../common/common-utils.c): Remove.
1024 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1025 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1026 (vec.o: ../common/vec.c): Remove.
1027 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1028 (xml-utils.o: ../common/xml-utils.c): Remove.
1029 (ptid.o: ../common/ptid.c): Remove.
1030 (buffer.o: ../common/buffer.c): Remove.
1031 (format.o: ../common/format.c): Remove.
1032 (filestuff.o: ../common/filestuff.c): Remove.
1033 (agent.o: ../common/agent.c): Remove.
1034 (errors.o: ../common/errors.c): Remove.
1035 (environ.o: ../common/environ.c): Remove.
1036 (common-debug.o: ../common/common-debug.c): Remove.
1037 (cleanups.o: ../common/cleanups.c): Remove.
1038 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1039 (fileio.o: ../common/fileio.c): Remove.
1040 (common-regcache.o: ../common/common-regcache.c): Remove.
1041 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1042 (new-op.o: ../common/new-op.c): Remove.
1043 (btrace-common.o: ../common/btrace-common.c): Remove.
1044
21122961
SM
10452017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1046
1047 * Makefile.in (%.o: ../target/%.c): New rule.
1048 (waitstatus.o: ../target/waitstatus.c): Remove.
1049
c362e621
SM
10502017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1051
1052 * Makefile.in
1053 (%.c: ../regformats/%.dat,
1054 (%.c: ../regformats/arm/%.dat,
1055 (%.c: ../regformats/i386/%.dat,
1056 (%.c: ../regformats/rs6000/%.dat): New rules.
1057 (aarch64.c): Remove.
1058 (reg-arm.c): Remove.
1059 (arm-with-iwmmxt.c): Remove.
1060 (arm-with-vfpv2.c): Remove.
1061 (arm-with-vfpv3.c): Remove.
1062 (arm-with-neon.c): Remove.
1063 (reg-bfin.c): Remove.
1064 (reg-cris.c): Remove.
1065 (reg-crisv32.c): Remove.
1066 (i386.c): Remove.
1067 (i386-linux.c): Remove.
1068 (i386-avx.c): Remove.
1069 (i386-avx-linux.c): Remove.
1070 (i386-avx-avx512.c): Remove.
1071 (i386-avx-avx512-linux.c): Remove.
1072 (i386-mpx.c): Remove.
1073 (i386-mpx-linux.c): Remove.
1074 (i386-avx-mpx-avx512-pku.c): Remove.
1075 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1076 (i386-avx-mpx.c): Remove.
1077 (i386-avx-mpx-linux.c): Remove.
1078 (i386-mmx.c): Remove.
1079 (i386-mmx-linux.c): Remove.
1080 (reg-ia64.c): Remove.
1081 (reg-m32r.c): Remove.
1082 (reg-m68k.c): Remove.
1083 (reg-cf.c): Remove.
1084 (mips-linux.c): Remove.
1085 (mips-dsp-linux.c): Remove.
1086 (mips64-linux.c): Remove.
1087 (mips64-dsp-linux.c): Remove.
1088 (nios2-linux.c): Remove.
1089 (powerpc-32.c): Remove.
1090 (powerpc-32l.c): Remove.
1091 (powerpc-altivec32l.c): Remove.
1092 (powerpc-cell32l.c): Remove.
1093 (powerpc-vsx32l.c): Remove.
1094 (powerpc-isa205-32l.c): Remove.
1095 (powerpc-isa205-altivec32l.c): Remove.
1096 (powerpc-isa205-vsx32l.c): Remove.
1097 (powerpc-e500l.c): Remove.
1098 (powerpc-64l.c): Remove.
1099 (powerpc-altivec64l.c): Remove.
1100 (powerpc-cell64l.c): Remove.
1101 (powerpc-vsx64l.c): Remove.
1102 (powerpc-isa205-64l.c): Remove.
1103 (powerpc-isa205-altivec64l.c): Remove.
1104 (powerpc-isa205-vsx64l.c): Remove.
1105 (s390-linux32.c): Remove.
1106 (s390-linux32v1.c): Remove.
1107 (s390-linux32v2.c): Remove.
1108 (s390-linux64.c): Remove.
1109 (s390-linux64v1.c): Remove.
1110 (s390-linux64v2.c): Remove.
1111 (s390-te-linux64.c): Remove.
1112 (s390-vx-linux64.c): Remove.
1113 (s390-tevx-linux64.c): Remove.
1114 (s390x-linux64.c): Remove.
1115 (s390x-linux64v1.c): Remove.
1116 (s390x-linux64v2.c): Remove.
1117 (s390x-te-linux64.c): Remove.
1118 (s390x-vx-linux64.c): Remove.
1119 (s390x-tevx-linux64.c): Remove.
1120 (tic6x-c64xp-linux.c): Remove.
1121 (tic6x-c64x-linux.c): Remove.
1122 (tic6x-c62x-linux.c): Remove.
1123 (reg-sh.c): Remove.
1124 (reg-sparc64.c): Remove.
1125 (reg-spu.c): Remove.
1126 (amd64.c): Remove.
1127 (amd64-linux.c): Remove.
1128 (amd64-avx.c): Remove.
1129 (amd64-avx-linux.c): Remove.
1130 (amd64-avx-avx512.c): Remove.
1131 (amd64-avx-avx512-linux.c): Remove.
1132 (amd64-mpx.c): Remove.
1133 (amd64-mpx-linux.c): Remove.
1134 (amd64-avx-mpx-avx512-pku.c): Remove.
1135 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1136 (amd64-avx-mpx.c): Remove.
1137 (amd64-avx-mpx-linux.c): Remove.
1138 (x32.c): Remove.
1139 (x32-linux.c): Remove.
1140 (x32-avx.c): Remove.
1141 (x32-avx-linux.c): Remove.
1142 (x32-avx-avx512.c): Remove.
1143 (x32-avx-avx512-linux.c): Remove.
1144 (reg-xtensa.c): Remove.
1145 (reg-tilegx.c): Remove.
1146 (reg-tilegx32.c): Remove.
1147
1672e0d9
SDJ
11482017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1149
1150 * Makefile.in (SFILES): Add "common/environ.c".
1151 (OBJS): Add "common/environ.h".
1152
239b6d10
WT
11532017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1154
1155 * configure.ac: Check if the fs_base and gs_base members of
1156 `struct user_regs_struct' exist.
1157 * config.in: Regenerated.
1158 * configure: Likewise.
1159
694b382c
AT
11602017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1161
1162 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1163 target_read_memory.
1164 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1165 (get_next_pcs_syscall_next_pc): Likewise.
1166
7dc53023
LM
11672016-12-23 Luis Machado <lgustavo@codesourcery.com>
1168
1169 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1170 * nto-x86-low.c: Likewise.
1171
ad02e4fe
SM
11722016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1173
1174 * Makefile.in: Include disable-implicit-rules.mk.
1175
dcb07cfa
PA
11762016-11-23 Pedro Alves <palves@redhat.com>
1177
1178 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1179 (debug_vprintf): Use std::chrono::steady_clock instead of
1180 gettimeofday. Use '.' instead of ':'.
1181 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1182 (get_timestamp): Use std::chrono::steady_clock instead of
1183 gettimeofday.
1184
8629c02c
SM
11852016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1186
1187 * Makefile.in: Fix whitespace formatting.
1188
b593ecca
SM
11892016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1190
1191 * Makefile.in (SFILES, OBS): Flatten list and order
1192 alphabetically.
1193
9986ba08
PA
11942016-11-23 Pedro Alves <palves@redhat.com>
1195
1196 * event-loop.c (handle_file_event): Use warning.
1197 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1198 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1199 Use warning.
1200
4eefa7bc
PA
12012016-11-23 Pedro Alves <palves@redhat.com>
1202
1203 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1204 output.
1205 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1206 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1207 debug_printf and debug_flush for debug output.
1208 * server.c (handle_general_set): Likewise.
1209 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1210 output.
1211
5443506e
SM
12122016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1213
1214 * Makefile.in (.c.o): Replace rule with ...
1215 (%.o: %.c): ... this one.
1216
3b165252
SM
12172016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1218
1219 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1220 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1221 make.
1222 * configure.ac: Remove checks for the make program.
1223 * configure: Re-generate.
1224
0bcda685
PA
12252016-10-28 Pedro Alves <palves@redhat.com>
1226
1227 * Makefile.in (CXX_DIALECT): Get from configure.
1228 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1229 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1230 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1231 * config.in: Regenerate.
1232 * configure: Regenerate.
1233
c3805894
YQ
12342016-10-27 Yao Qi <yao.qi@linaro.org>
1235
1236 * linux-low.c (linux_supports_range_stepping): Return true if
1237 can_software_single_step return true.
1238
89342618
YQ
12392016-10-27 Yao Qi <yao.qi@linaro.org>
1240
1241 * inferiors.c (find_inferior_in_random): New function.
1242 * inferiors.h (find_inferior_in_random): Declare.
1243 * linux-low.c (linux_wait_for_event_filtered): Call
1244 find_inferior_in_random instead of find_inferior.
1245
e3652c84
YQ
12462016-10-27 Yao Qi <yao.qi@linaro.org>
1247
1248 * linux-low.c (linux_wait_1): If single-step breakpoints are
1249 inserted, remove them.
1250
5a04c4cf
PA
12512016-10-26 Pedro Alves <palves@redhat.com>
1252
1253 * linux-low.c (handle_extended_wait): Link parent/child fork
1254 threads.
1255 (linux_wait_1): Unlink them.
1256 (linux_set_resume_request): Ignore resume requests for
1257 already-resumed and unhandled fork child threads.
1258 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1259 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1260 New functions.
1261 (handle_v_requests) <vCont>: Don't call require_running.
1262 * server.h (in_queued_stop_replies): New declaration.
1263
cb93dc7f
YQ
12642016-10-24 Yao Qi <yao.qi@linaro.org>
1265
1266 PR server/20733
1267 * linux-aarch64-low.c (append_insns): Cast the return value to
1268 'uint32_t *'.
1269
a1078bea
YQ
12702016-10-10 Yao Qi <yao.qi@linaro.org>
1271
1272 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1273
1fb77080
SDJ
12742016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1275
1276 * target.c (target_supports_multi_process): New function, moved
1277 from...
1278 * target.h (target_supports_multi_process): ... here. Remove
1279 macro.
1280
39b5a3b9
TT
12812016-10-05 Tom Tromey <tom@tromey.com>
1282
1283 PR remote/20655:
1284 * tracepoint.c (handle_tracepoint_bkpts): Check
1285 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1286
c1d0b70a
YQ
12872016-10-05 Yao Qi <yao.qi@linaro.org>
1288
1289 * configure.srv: Update the path of arm-*.xml files.
1290
0a69eedb
YQ
12912016-10-05 Terry Guo <terry.guo@arm.com>
1292 Yao Qi <yao.qi@linaro.org>
1293
1294 * Makefile.in: Adjust the path of rules.
1295 * configure.srv: Update the path of xml files.
1296 * regformats/arm-with-iwmmxt.dat: Regenerated.
1297 * regformats/arm-with-neon.dat: Likewise.
1298 * regformats/arm-with-vfpv2.dat: Likewise.
1299 * regformats/arm-with-vfpv3.dat Likewise.
1300
17e16485
YQ
13012016-09-30 Yao Qi <yao.qi@linaro.org>
1302
1303 PR gdbserver/20627
1304 * target.c (target_stop_and_wait): Don't call
1305 target_continue_no_signal, use resume_stop instead.
1306
edeeb602
YQ
13072016-09-26 Yao Qi <yao.qi@linaro.org>
1308
1309 * linux-low.c (linux_wait_1): Call debug_exit.
1310
503b1c39
PA
13112016-09-23 Pedro Alves <palves@redhat.com>
1312
1313 * Makefile.in (SFILES): Add common/new-op.c.
1314 (OBS): Add common/new-op.o.
1315 (new-op.o): New rule.
1316
74172ecf
SM
13172016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1318
1319 * .gitinore: Ignore more files.
1320
fc6cda2e
YQ
13212016-09-21 Yao Qi <yao.qi@linaro.org>
1322
1323 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1324 23.
1325
bc1e6c81
SDJ
13262016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1327
1328 * server.c (start_inferior): Call target_mourn_inferior instead of
1329 mourn_inferior; pass ptid_t argument to it.
1330 (resume): Likewise.
1331 (handle_target_event): Likewise.
1332 * target.c (target_mourn_inferior): New function.
1333 * target.h (mourn_inferior): Delete macro.
1334
0e00e962
AA
13352016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1336
1337 * linux-low.c (lwp_is_stepping): New function.
1338
1d8cb77d
CL
13392016-09-06 Carl Love <cel@us.ibm.com>
1340
1341 * server.c (start_inferior): Fixed comment, requested comment change
1342 didn't get updated correctly. Removed reference to ptrace () call as
1343 it is only true on Linux systems.
1344
7313bced
CL
13452016-09-06 Carl Love <cel@us.ibm.com>
1346
1347 * server.c (start_inferior): Do not call
1348 function target_post_create_inferior () if the
1349 inferior process has already exited.
1350
cf6de44d
PA
13512016-09-05 Pedro Alves <palves@redhat.com>
1352
1353 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1354 (COMPILE.pre, CC_LD): Use CXX directly.
1355 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1356 * acinclude.m4: Don't include build-with-cxx.m4.
1357 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1358 * configure: Regenerate.
1359
c1da6748
AT
13602016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1361
1362 PR gdb/19495
1363 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1364 call writing data to own_buf.
1365
f2b9e3df
SDJ
13662016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1367
1368 * target.c (mywait): Call target_wait instead of
1369 the_target->wait.
1370 (target_wait): New function.
1371
049a8570
SDJ
13722016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1373
1374 * server.c (start_inferior): New variable 'ptid'. Replace calls
1375 to the_target->resume by target_continue{,_no_signal}, depending
1376 on the case.
1377 * target.c (target_stop_and_wait): Call target_continue_no_signal
1378 instead of the_target->resume.
1379 (target_continue): New function.
1380
3aa5cfa0
AT
13812016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1382
1383 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1384
754653a7
AZ
13852016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1386
1387 PR server/20491
1388 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1389 ps_prochandle.
1390 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1391 * linux-arm-low.c (ps_get_thread_area): Likewise.
1392 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1393 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1394 * linux-mips-low.c (ps_get_thread_area): Likewise.
1395 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1396 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1397 * linux-x86-low.c (ps_get_thread_area): Likewise.
1398 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1399
ed036b40
PA
14002016-08-19 Pedro Alves <palves@redhat.com>
1401
1402 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1403
c8ef42ee
PA
14042016-08-19 Pedro Alves <palves@redhat.com>
1405
1406 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1407 comment. Use memcpy instead of casting through unsigned long.
1408
9c235a72
PA
14092016-08-19 Pedro Alves <palves@redhat.com>
1410
1411 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1412 allocating around 0x80000000.
1413
201506da
PA
14142016-08-19 Pedro Alves <palves@redhat.com>
1415
1416 PR gdb/20415
1417 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1418 (x32-avx512-linux-ipa.o): New rules.
1419 * configure.ac (x86_64-*-linux*): New x32 check.
1420 * configure.srv (ipa_x32_linux_regobj): New.
1421 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1422 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1423 descriptions.
1424 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1425 descriptions.
1426 * configure: Regenerate.
1427
f348d89a
PA
14282016-08-09 Pedro Alves <palves@redhat.com>
1429
1430 PR gdb/18653
1431 * Makefile.in (OBS): Add signals-state-save-restore.o.
1432 (signals-state-save-restore.o): New rule.
1433 * config.in: Regenerate.
1434 * configure: Regenerate.
1435 * linux-low.c: Include "signals-state-save-restore.h".
1436 (linux_create_inferior): Call
1437 restore_original_signals_state.
1438 * server.c: Include "dispositions-save-restore.h".
1439 (captured_main): Call save_original_signals_state.
1440
1baf5149
PA
14412016-08-05 Pedro Alves <palves@redhat.com>
1442
1443 * configure: Regenerate.
1444
fcd4a73d
YQ
14452016-08-04 Yao Qi <yao.qi@linaro.org>
1446
1447 * linux-low.c (regsets_fetch_inferior_registers): Check
1448 errno is ESRCH or not.
1449
979659d0
YQ
14502016-08-02 Yao Qi <yao.qi@linaro.org>
1451
1452 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1453 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1454 (thread_db_load_search): Update.
1455 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1456 td_ta_set_event and td_ta_event_getmsg.
1457
6598661d
PA
14582016-07-26 Pedro Alves <palves@redhat.com>
1459
1460 PR server/20414
1461 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1462 of unsigned long for 64-bit registers and use uint32_t instead of
1463 unsigned int for 32-bit registers.
1464
9cf12d57
PA
14652016-07-26 Pedro Alves <palves@redhat.com>
1466
1467 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1468 to 'ptrace'.
1469
305450ed
TT
14702016-07-21 Tom Tromey <tom@tromey.com>
1471
1472 * configure: Rebuild.
1473
2583da7c
YQ
14742016-07-21 Yao Qi <yao.qi@linaro.org>
1475
1476 * mem-break.c (find_gdb_breakpoint): Cast bp to
1477 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1478
21536b36
YQ
14792016-07-21 Yao Qi <yao.qi@linaro.org>
1480
1481 * server.c (handle_v_requests): Support s and S actions
1482 if target_supports_software_single_step return true.
1483
8901d193
YQ
14842016-07-21 Yao Qi <yao.qi@linaro.org>
1485
1486 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1487 is resume_step, call maybe_hw_step.
1488 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1489 and unstop them.
1490 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1491 breakpoints or not.
1492 (proceed_one_lwp): If resume request is resume_step, install
1493 reinsert breakpoints and call maybe_hw_step.
1494
0e9a339e
YQ
14952016-07-21 Yao Qi <yao.qi@linaro.org>
1496
1497 * linux-low.c (proceed_one_lwp): Declare.
1498 (linux_resume_one_thread): Remove local variable 'step'.
1499 Lift code enqueue signal. Call proceed_one_lwp instead of
1500 linux_resume_one_lwp.
1501
4281b351
YQ
15022016-07-21 Yao Qi <yao.qi@linaro.org>
1503
1504 * linux-low.c (linux_resume_one_thread): Call
1505 enqueue_pending_signal.
1506
984a2c04
YQ
15072016-07-21 Yao Qi <yao.qi@linaro.org>
1508
1509 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1510 * inferiors.c (do_restore_current_thread_cleanup): New function.
1511 (make_cleanup_restore_current_thread): Likewise.
1512 * linux-low.c (install_software_single_step_breakpoints): Call
1513 make_cleanup_restore_current_thread. Switch current_thread to
1514 thread.
1515
bec903c9
YQ
15162016-07-21 Yao Qi <yao.qi@linaro.org>
1517
1518 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1519 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1520 (clone_one_breakpoint): Likewise.
1521 (delete_reinsert_breakpoints): Change parameter to thread.
1522 Callers updated.
1523 (has_reinsert_breakpoints): Likewise.
1524 (uninsert_reinsert_breakpoints): Likewise.
1525 (reinsert_reinsert_breakpoints): Likewise.
1526 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1527 (delete_reinsert_breakpoints): Likewise.
1528 (reinsert_reinsert_breakpoints): Likewise.
1529 (uninsert_reinsert_breakpoints): Likewise.
1530 (has_reinsert_breakpoints): Likewise.
1531
63c40ec7
YQ
15322016-07-21 Yao Qi <yao.qi@linaro.org>
1533
1534 * inferiors.c (get_thread_process): Make parameter const.
1535 * inferiors.h (get_thread_process): Update declaration.
1536 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1537 Add new parameters child_thread and parent_thread. Callers
1538 updated.
1539 * mem-break.h (clone_all_breakpoints): Update declaration.
1540
9aa76cd0
YQ
15412016-07-21 Yao Qi <yao.qi@linaro.org>
1542
1543 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1544 <command_list, handler>: Remove.
1545 (struct gdb_breakpoint): New.
1546 (struct other_breakpoint): New.
1547 (struct reinsert_breakpoint): New.
1548 (is_gdb_breakpoint): New function.
1549 (any_persistent_commands): Update command_list if
1550 is_gdb_breakpoint returns true.
1551 (set_breakpoint): Create breakpoints according to their types.
1552 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1553 (set_gdb_breakpoint_1): Likewise.
1554 (set_gdb_breakpoint): Likewise.
1555 (clear_breakpoint_conditions): Change parameter type to
1556 'struct gdb_breakpoint *'.
1557 (clear_breakpoint_commands): Likewise.
1558 (clear_breakpoint_conditions_and_commands): Likewise.
1559 (add_condition_to_breakpoint): Likewise.
1560 (add_breakpoint_condition): Likewise.
1561 (add_commands_to_breakpoint): Likewise.
1562 (check_breakpoints): Check other_breakpoint.
1563 (clone_one_breakpoint): Clone breakpopint according to its type.
1564 * mem-break.h (struct gdb_breakpoint): Declare.
1565 (set_gdb_breakpoint): Update declaration.
1566 (clear_breakpoint_conditions_and_commands): Likewise.
1567 (add_breakpoint_condition): Likewise.
1568 (add_breakpoint_commands): Likewise.
1569 * server.c (process_point_options): Change parameter type to
1570 'struct gdb_breakpoint *'.
1571
811f8301
YQ
15722016-07-21 Yao Qi <yao.qi@linaro.org>
1573
1574 * mem-break.c (set_breakpoint_at): Rename it to ...
1575 (set_breakpoint_type_at): ... it.
1576 (set_breakpoint_at): Call set_breakpoint_type_at.
1577 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1578 * mem-break.h (set_breakpoint_at): Update comments.
1579
b1c51e36
CLT
15802016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1581
1582 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1583 to buf parameter.
1584 (nios2_store_gregset): Likewise.
1585
ced2dffb
PA
15862016-07-01 Pedro Alves <palves@redhat.com>
1587 Antoine Tremblay <antoine.tremblay@ericsson.com>
1588
1589 * linux-low.c: Change interface to take the target lwp_info
1590 pointer directly and return void. Handle detaching from a zombie
1591 thread.
1592 (linux_detach_lwp_callback): New function.
1593 (linux_detach): Detach from the leader thread after detaching from
1594 the clone threads.
1595
2ac09a5b
YQ
15962016-06-28 Yao Qi <yao.qi@linaro.org>
1597
1598 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1599 for variable new_offset.
1600 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1601 (aarch64_ftrace_insn_reloc_cb): Likewise.
1602 (aarch64_ftrace_insn_reloc_tb): Likewise.
1603 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1604 PRIx64 instead of PRIx32.
1605
79e7fd4f
YQ
16062016-06-28 Yao Qi <yao.qi@linaro.org>
1607
1608 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1609 (the_low_target): Install arm_get_syscall_trapinfo.
1610
061fc021
YQ
16112016-06-28 Yao Qi <yao.qi@linaro.org>
1612
1613 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1614 function.
1615 (the_low_target): Install aarch64_get_syscall_trapinfo.
1616
4cc32bec
YQ
16172016-06-28 Yao Qi <yao.qi@linaro.org>
1618
1619 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1620 Callers updated.
1621 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1622 Remove parameter sysno.
1623 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1624 sysret.
1625
782c1122
AA
16262016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1627
1628 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1629 (s390_emit_ne_goto): Likewise.
1630 (s390_emit_lt_goto): Likewise.
1631 (s390_emit_le_goto): Likewise.
1632 (s390_emit_gt_goto): Likewise.
1633 (s390_emit_ge_goto): Likewise.
1634 (s390x_emit_eq_goto): Likewise.
1635 (s390x_emit_ne_goto): Likewise.
1636 (s390x_emit_lt_goto): Likewise.
1637 (s390x_emit_le_goto): Likewise.
1638 (s390x_emit_gt_goto): Likewise.
1639 (s390x_emit_ge_goto): Likewise.
1640 (s390_emit_ops_impl): Mark variable static.
1641 (s390x_emit_ops): Likewise.
1642
2e7b624b
YQ
16432016-06-17 Yao Qi <yao.qi@linaro.org>
1644
1645 * linux-low.c (handle_extended_wait): Call
1646 uninsert_reinsert_breakpoints for the parent process. Remove
1647 reinsert breakpoints from the child process. Reinsert them to
1648 the parent process when vfork is done.
1649 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1650 (reinsert_reinsert_breakpoints): New function.
1651 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1652 (reinsert_reinsert_breakpoints): Declare.
1653
8a81c5d7
YQ
16542016-06-17 Yao Qi <yao.qi@linaro.org>
1655
1656 * linux-low.c (handle_extended_wait): If the parent is doing
1657 step-over, remove the reinsert breakpoints from the forked child.
1658
f50bf8e5
YQ
16592016-06-17 Yao Qi <yao.qi@linaro.org>
1660
1661 * linux-low.c (unsuspend_all_lwps): Declare.
1662 (linux_low_filter_event): If thread exited, call finish_step_over.
1663 If step-over is finished, unsuspend other threads.
1664
8376a3cb
YQ
16652016-06-17 Yao Qi <yao.qi@linaro.org>
1666
1667 * linux-low.c (linux_resume_one_lwp_throw): Assert
1668 has_reinsert_breakpoints returns false.
1669 * mem-break.c (delete_disabled_breakpoints): Assert
1670 bp type isn't reinsert_breakpoint.
1671
f79b145d
YQ
16722016-06-17 Yao Qi <yao.qi@linaro.org>
1673
1674 * linux-low.c (maybe_hw_step): New function.
1675 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1676 (finish_step_over): Switch current_thread to lwp temporarily,
1677 and assert has_reinsert_breakpoints returns true.
1678 (proceed_one_lwp): Call maybe_hw_step.
1679 * mem-break.c (has_reinsert_breakpoints): New function.
1680 * mem-break.h (has_reinsert_breakpoints): Declare.
1681
0ae534d2
JT
16822016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1683
1684 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1685
fcdad592
YQ
16862016-05-17 Yao Qi <yao.qi@linaro.org>
1687
1688 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1689 instead of find_inferior.
1690
9e784964
YQ
16912016-05-05 Yao Qi <yao.qi@linaro.org>
1692
1693 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1694 Initialize res to zero.
1695
cf2ebb6e
YQ
16962016-05-05 Yao Qi <yao.qi@linaro.org>
1697
1698 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1699 to uint32_t.
1700
c1aebf87
UW
17012016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1702
1703 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1704 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1705 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1706
35fd2deb 17072016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 1708 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
1709
1710 * tracepoint.c (write_inferior_int8): New function.
1711 (cmd_qtenable_disable): Write enable flag using
1712 write_inferior_int8.
1713
484b3c32
YQ
17142016-04-25 Yao Qi <yao.qi@linaro.org>
1715
1716 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1717 (need_step_over_p): Return zero if the LWP has pending signals
1718 can be delivered on software single step target.
1719
85ba7d86
YQ
17202016-04-25 Yao Qi <yao.qi@linaro.org>
1721
1722 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1723 return instead of error.
1724
3539aa13
YQ
17252016-04-22 Yao Qi <yao.qi@linaro.org>
1726
1727 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1728 to 23.
1729
5b061e98
YQ
17302016-04-22 Yao Qi <yao.qi@linaro.org>
1731
1732 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1733 signal when stepping over breakpoint with software single
1734 step.
1735
3451269c
PA
17362016-04-21 Pedro Alves <palves@redhat.com>
1737
1738 * linux-s390-low.c (s390_collect_ptrace_register)
1739 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1740 add casts.
1741 (s390_check_regset): Use void * instead of gdb_byte *.
1742
a2358508
PA
17432016-04-20 Pedro Alves <palves@redhat.com>
1744
1745 * configure: Renegerate.
1746
6885166d
YQ
17472016-04-20 Yao Qi <yao.qi@linaro.org>
1748
1749 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1750 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1751 number 16.
1752 (arm_store_gregset): Likewise.
1753
2b863f51
WT
17542016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1755
1756 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1757 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1758 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1759 (amd64-avx-mpx-linux.c): New rules.
1760 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1761 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1762 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1763 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1764 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1765 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1766 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1767 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1768 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1769 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1770 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1771 * linux-x86-low.c (x86_linux_read_description): Add case for
1772 X86_XSTATE_AVX_MPX_MASK.
1773 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1774 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1775 init_registers_i386_avx_mpx_linux.
1776 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1777 (initialize_low_tracepoint): Call
1778 init_registers_i386_avx_mpx_linux.
1779 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1780 (initialize_low_tracepoint): Call
1781 init_registers_amd64_avx_mpx_linux.
1782 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1783 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1784 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1785 declarations.
1786
9b30624b
PA
17872016-04-18 Pedro Alves <palves@redhat.com>
1788
1789 * configure: Regenerate.
1790
45e3745e
AT
17912016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1792
1793 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1794 (aarch64_emit_sub): Likewise.
1795
2afc13ff
PA
17962016-04-12 Pedro Alves <palves@redhat.com>
1797
1798 * utils.c (prepare_to_throw_exception): Delete.
1799
6e774b13
SM
18002016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1801
1802 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1803
4dca19f8
MK
18042016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1805
1806 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1807
d0a9981f
MK
18082016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1809
1810 * linux-aarch64-ipa.c: Add <elf.h> include.
1811 * linux-ppc-ipa.c: Add <elf.h> include.
1812 * linux-s390-ipa.c: Add <elf.h> include.
1813
252db07e
MK
18142016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1815
1816 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1817 (get_raw_reg_ptr): Likewise.
1818 (get_trace_state_variable_value_ptr): Likewise.
1819 (set_trace_state_variable_value_ptr): Likewise.
1820 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1821 char *.
1822
14e2b6d9
MK
18232016-03-31 Wei-cheng Wang <cole945@gmail.com>
1824 Marcin Kościelnicki <koriakin@0x04.net>
1825
1826 PR/17221
1827 * linux-ppc-low.c (emit_insns): New function.
1828 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1829 (ppc_emit_prologue): New function.
1830 (ppc_emit_epilogue): New function.
1831 (ppc_emit_add): New function.
1832 (ppc_emit_sub): New function.
1833 (ppc_emit_mul): New function.
1834 (ppc_emit_lsh): New function.
1835 (ppc_emit_rsh_signed): New function.
1836 (ppc_emit_rsh_unsigned): New function.
1837 (ppc_emit_ext): New function.
1838 (ppc_emit_zero_ext): New function.
1839 (ppc_emit_log_not): New function.
1840 (ppc_emit_bit_and): New function.
1841 (ppc_emit_bit_or): New function.
1842 (ppc_emit_bit_xor): New function.
1843 (ppc_emit_bit_not): New function.
1844 (ppc_emit_equal): New function.
1845 (ppc_emit_less_signed): New function.
1846 (ppc_emit_less_unsigned): New function.
1847 (ppc_emit_ref): New function.
1848 (ppc_emit_const): New function.
1849 (ppc_emit_reg): New function.
1850 (ppc_emit_pop): New function.
1851 (ppc_emit_stack_flush): New function.
1852 (ppc_emit_swap): New function.
1853 (ppc_emit_stack_adjust): New function.
1854 (ppc_emit_call): New function.
1855 (ppc_emit_int_call_1): New function.
1856 (ppc_emit_void_call_2): New function.
1857 (ppc_emit_if_goto): New function.
1858 (ppc_emit_goto): New function.
1859 (ppc_emit_eq_goto): New function.
1860 (ppc_emit_ne_goto): New function.
1861 (ppc_emit_lt_goto): New function.
1862 (ppc_emit_le_goto): New function.
1863 (ppc_emit_gt_goto): New function.
1864 (ppc_emit_ge_goto): New function.
1865 (ppc_write_goto_address): New function.
1866 (ppc_emit_ops_impl): New static variable.
1867 (ppc64v1_emit_prologue): New function.
1868 (ppc64v2_emit_prologue): New function.
1869 (ppc64_emit_epilogue): New function.
1870 (ppc64_emit_add): New function.
1871 (ppc64_emit_sub): New function.
1872 (ppc64_emit_mul): New function.
1873 (ppc64_emit_lsh): New function.
1874 (ppc64_emit_rsh_signed): New function.
1875 (ppc64_emit_rsh_unsigned): New function.
1876 (ppc64_emit_ext): New function.
1877 (ppc64_emit_zero_ext): New function.
1878 (ppc64_emit_log_not): New function.
1879 (ppc64_emit_bit_and): New function.
1880 (ppc64_emit_bit_or): New function.
1881 (ppc64_emit_bit_xor): New function.
1882 (ppc64_emit_bit_not): New function.
1883 (ppc64_emit_equal): New function.
1884 (ppc64_emit_less_signed): New function.
1885 (ppc64_emit_less_unsigned): New function.
1886 (ppc64_emit_ref): New function.
1887 (ppc64_emit_const): New function.
1888 (ppc64v1_emit_reg): New function.
1889 (ppc64v2_emit_reg): New function.
1890 (ppc64_emit_pop): New function.
1891 (ppc64_emit_stack_flush): New function.
1892 (ppc64_emit_swap): New function.
1893 (ppc64v1_emit_call): New function.
1894 (ppc64v2_emit_call): New function.
1895 (ppc64v1_emit_int_call_1): New function.
1896 (ppc64v2_emit_int_call_1): New function.
1897 (ppc64v1_emit_void_call_2): New function.
1898 (ppc64v2_emit_void_call_2): New function.
1899 (ppc64_emit_if_goto): New function.
1900 (ppc64_emit_eq_goto): New function.
1901 (ppc64_emit_ne_goto): New function.
1902 (ppc64_emit_lt_goto): New function.
1903 (ppc64_emit_le_goto): New function.
1904 (ppc64_emit_gt_goto): New function.
1905 (ppc64_emit_ge_goto): New function.
1906 (ppc64v1_emit_ops_impl): New static variable.
1907 (ppc64v2_emit_ops_impl): New static variable.
1908 (ppc_emit_ops): New function.
1909 (linux_low_target): Wire in ppc_emit_ops.
1910
a2174ba4
MK
19112016-03-31 Wei-cheng Wang <cole945@gmail.com>
1912 Marcin Kościelnicki <koriakin@0x04.net>
1913
1914 PR/17221
1915 * Makefile.in: Add powerpc-*-ipa.o
1916 * configure.srv: Add ipa_obj for powerpc*-linux.
1917 * linux-ppc-ipa.c: New file.
1918 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1919 includes.
1920 (PPC_FIELD): New macro.
1921 (PPC_SEXT): New macro.
1922 (PPC_OP6): New macro.
1923 (PPC_BO): New macro.
1924 (PPC_LI): New macro.
1925 (PPC_BD): New macro.
1926 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1927 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1928 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1929 (ppc_get_thread_area): New function.
1930 (is_elfv2_inferior): New function.
1931 (gen_ds_form): New function.
1932 (GEN_STD): New macro.
1933 (GEN_STDU): New macro.
1934 (GEN_LD): New macro.
1935 (GEN_LDU): New macro.
1936 (gen_d_form): New function.
1937 (GEN_ADDI): New macro.
1938 (GEN_ADDIS): New macro.
1939 (GEN_LI): New macro.
1940 (GEN_LIS): New macro.
1941 (GEN_ORI): New macro.
1942 (GEN_ORIS): New macro.
1943 (GEN_LWZ): New macro.
1944 (GEN_STW): New macro.
1945 (GEN_STWU): New macro.
1946 (gen_xfx_form): New function.
1947 (GEN_MFSPR): New macro.
1948 (GEN_MTSPR): New macro.
1949 (GEN_MFCR): New macro.
1950 (GEN_MTCR): New macro.
1951 (GEN_SYNC): New macro.
1952 (GEN_LWSYNC): New macro.
1953 (gen_x_form): New function.
1954 (GEN_OR): New macro.
1955 (GEN_MR): New macro.
1956 (GEN_LWARX): New macro.
1957 (GEN_STWCX): New macro.
1958 (GEN_CMPW): New macro.
1959 (gen_md_form): New function.
1960 (GEN_RLDICL): New macro.
1961 (GEN_RLDICR): New macro.
1962 (gen_i_form): New function.
1963 (GEN_B): New macro.
1964 (GEN_BL): New macro.
1965 (gen_b_form): New function.
1966 (GEN_BNE): New macro.
1967 (GEN_LOAD): New macro.
1968 (GEN_STORE): New macro.
1969 (gen_limm): New function.
1970 (gen_atomic_xchg): New function.
1971 (gen_call): New function.
1972 (ppc_relocate_instruction): New function.
1973 (ppc_install_fast_tracepoint_jump_pad): New function.
1974 (ppc_get_min_fast_tracepoint_insn_len): New function.
1975 (ppc_get_ipa_tdesc_idx): New function.
1976 (the_low_target): Wire in the new functions.
1977 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1978 tdescs.
1979 * linux-ppc-tdesc.h: New file.
1980
a13c4696
MK
19812016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1982
1983 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1984 (alloc_jump_pad_buffer): New function.
1985 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1986 (alloc_jump_pad_buffer): New function.
1987 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1988 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1989 (alloc_jump_pad_buffer): New function.
1990 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1991 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1992 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1993 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1994
1cda1512
MK
19952016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1996
1997 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1998 * linux-amd64-ipa.c: Likewise.
1999 * linux-i386-ipa.c: Likewise.
2000 * linux-s390-ipa.c: Likewise.
2001 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2002 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2003 set_trace_state_variable_value_ptr.
2004 (struct ipa_sym_addresses): Likewise.
2005 (symbol_list): Likewise.
2006 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2007 accessing gdb_collect directly.
2008 (gdb_collect_ptr_type): New typedef.
2009 (get_raw_reg_ptr_type): New typedef.
2010 (get_trace_state_variable_value_ptr_type): New typedef.
2011 (set_trace_state_variable_value_ptr_type): New typedef.
2012 (gdb_collect_ptr): New global.
2013 (get_raw_reg_ptr): New global.
2014 (get_trace_state_variable_value_ptr): New global.
2015 (set_trace_state_variable_value_ptr): New global.
2016 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2017 accessing get_raw_reg directly.
2018 (get_get_tsv_func_addr): Likewise for
2019 get_trace_state_variable_value_ptr.
2020 (get_set_tsv_func_addr): Likewise for
2021 set_trace_state_variable_value_ptr.
2022 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2023
72fb5488
SM
20242016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2025
2026 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2027
28170b88
MK
20282016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2029
2030 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2031 packets.
2032 (relocate_instruction): Remove own_buf.
2033 * server.c (own_buf): Make global.
2034 (handle_v_requests): Make global.
2035 * server.h (own_buf): New declaration.
2036 (handle_v_requests): New prototype.
2037
f39e8743
MK
20382016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2039
2040 PR 18377
2041 * linux-s390-low.c (add_insns): New function.
2042 (s390_emit_prologue): New function.
2043 (s390_emit_epilogue): New function.
2044 (s390_emit_add): New function.
2045 (s390_emit_sub): New function.
2046 (s390_emit_mul): New function.
2047 (s390_emit_lsh): New function.
2048 (s390_emit_rsh_signed): New function.
2049 (s390_emit_rsh_unsigned): New function.
2050 (s390_emit_ext): New function.
2051 (s390_emit_log_not): New function.
2052 (s390_emit_bit_and): New function.
2053 (s390_emit_bit_or): New function.
2054 (s390_emit_bit_xor): New function.
2055 (s390_emit_bit_not): New function.
2056 (s390_emit_equal): New function.
2057 (s390_emit_less_signed): New function.
2058 (s390_emit_less_unsigned): New function.
2059 (s390_emit_ref): New function.
2060 (s390_emit_if_goto): New function.
2061 (s390_emit_goto): New function.
2062 (s390_write_goto_address): New function.
2063 (s390_emit_litpool): New function.
2064 (s390_emit_const): New function.
2065 (s390_emit_call): New function.
2066 (s390_emit_reg): New function.
2067 (s390_emit_pop): New function.
2068 (s390_emit_stack_flush): New function.
2069 (s390_emit_zero_ext): New function.
2070 (s390_emit_swap): New function.
2071 (s390_emit_stack_adjust): New function.
2072 (s390_emit_set_r2): New function.
2073 (s390_emit_int_call_1): New function.
2074 (s390_emit_void_call_2): New function.
2075 (s390_emit_eq_goto): New function.
2076 (s390_emit_ne_goto): New function.
2077 (s390_emit_lt_goto): New function.
2078 (s390_emit_le_goto): New function.
2079 (s390_emit_gt_goto): New function.
2080 (s390_emit_ge_goto): New function.
2081 (s390x_emit_prologue): New function.
2082 (s390x_emit_epilogue): New function.
2083 (s390x_emit_add): New function.
2084 (s390x_emit_sub): New function.
2085 (s390x_emit_mul): New function.
2086 (s390x_emit_lsh): New function.
2087 (s390x_emit_rsh_signed): New function.
2088 (s390x_emit_rsh_unsigned): New function.
2089 (s390x_emit_ext): New function.
2090 (s390x_emit_log_not): New function.
2091 (s390x_emit_bit_and): New function.
2092 (s390x_emit_bit_or): New function.
2093 (s390x_emit_bit_xor): New function.
2094 (s390x_emit_bit_not): New function.
2095 (s390x_emit_equal): New function.
2096 (s390x_emit_less_signed): New function.
2097 (s390x_emit_less_unsigned): New function.
2098 (s390x_emit_ref): New function.
2099 (s390x_emit_if_goto): New function.
2100 (s390x_emit_const): New function.
2101 (s390x_emit_call): New function.
2102 (s390x_emit_reg): New function.
2103 (s390x_emit_pop): New function.
2104 (s390x_emit_stack_flush): New function.
2105 (s390x_emit_zero_ext): New function.
2106 (s390x_emit_swap): New function.
2107 (s390x_emit_stack_adjust): New function.
2108 (s390x_emit_int_call_1): New function.
2109 (s390x_emit_void_call_2): New function.
2110 (s390x_emit_eq_goto): New function.
2111 (s390x_emit_ne_goto): New function.
2112 (s390x_emit_lt_goto): New function.
2113 (s390x_emit_le_goto): New function.
2114 (s390x_emit_gt_goto): New function.
2115 (s390x_emit_ge_goto): New function.
2116 (s390_emit_ops): New function.
2117 (struct linux_target_ops): Fill in emit_ops hook.
2118
abd9baf9
MK
21192016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2120
2121 PR 18377
2122 * Makefile.in: Add s390 IPA files.
2123 * configure.srv: Build IPA for s390.
2124 * linux-s390-ipa.c: New file.
2125 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2126 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2127 (tdesc_s390_linux32): Likewise.
2128 (init_registers_s390_linux32v1): Likewise.
2129 (tdesc_s390_linux32v1): Likewise.
2130 (init_registers_s390_linux32v2): Likewise.
2131 (tdesc_s390_linux32v2): Likewise.
2132 (init_registers_s390_linux64): Likewise.
2133 (tdesc_s390_linux64): Likewise.
2134 (init_registers_s390_linux64v1): Likewise.
2135 (tdesc_s390_linux64v1): Likewise.
2136 (init_registers_s390_linux64v2): Likewise.
2137 (tdesc_s390_linux64v2): Likewise.
2138 (init_registers_s390_te_linux64): Likewise.
2139 (tdesc_s390_te_linux64): Likewise.
2140 (init_registers_s390_vx_linux64): Likewise.
2141 (tdesc_s390_vx_linux64): Likewise.
2142 (init_registers_s390_tevx_linux64): Likewise.
2143 (tdesc_s390_tevx_linux64): Likewise.
2144 (init_registers_s390x_linux64): Likewise.
2145 (tdesc_s390x_linux64): Likewise.
2146 (init_registers_s390x_linux64v1): Likewise.
2147 (tdesc_s390x_linux64v1): Likewise.
2148 (init_registers_s390x_linux64v2): Likewise.
2149 (tdesc_s390x_linux64v2): Likewise.
2150 (init_registers_s390x_te_linux64): Likewise.
2151 (tdesc_s390x_te_linux64): Likewise.
2152 (init_registers_s390x_vx_linux64): Likewise.
2153 (tdesc_s390x_vx_linux64): Likewise.
2154 (init_registers_s390x_tevx_linux64): Likewise.
2155 (tdesc_s390x_tevx_linux64): Likewise.
2156 (have_hwcap_s390_vx): New static variable.
2157 (s390_arch_setup): Fill have_hwcap_s390_vx.
2158 (s390_get_thread_area): New function.
2159 (s390_ft_entry_gpr_esa): New const.
2160 (s390_ft_entry_gpr_zarch): New const.
2161 (s390_ft_entry_misc): New const.
2162 (s390_ft_entry_fr): New const.
2163 (s390_ft_entry_vr): New const.
2164 (s390_ft_main_31): New const.
2165 (s390_ft_main_64): New const.
2166 (s390_ft_exit_fr): New const.
2167 (s390_ft_exit_vr): New const.
2168 (s390_ft_exit_misc): New const.
2169 (s390_ft_exit_gpr_esa): New const.
2170 (s390_ft_exit_gpr_zarch): New const.
2171 (append_insns): New function.
2172 (s390_relocate_instruction): New function.
2173 (s390_install_fast_tracepoint_jump_pad): New function.
2174 (s390_get_min_fast_tracepoint_insn_len): New function.
2175 (s390_get_ipa_tdesc_idx): New function.
2176 (struct linux_target_ops): Wire in the above functions.
2177 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2178 * linux-s390-tdesc.h: New file.
2179
a4105d04
MK
21802016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2181
2182 * linux-s390-low.c (s390_supports_tracepoints): New function.
2183 (struct linux_target_ops): Fill supports_tracepoints hook.
2184
35ac8b3e
YQ
21852016-03-18 Yao Qi <yao.qi@linaro.org>
2186
2187 * linux-low.c (lwp_signal_can_be_delivered): New function.
2188 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2189
94610ec4
YQ
21902016-03-18 Yao Qi <yao.qi@linaro.org>
2191
2192 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2193 0 if signal is enqueued. Remove 'signal' from one debugging
2194 message. Move one debugging message to some lines below.
2195 Remove code setting 'signal' to 0.
2196
80aea927
YQ
21972016-03-18 Yao Qi <yao.qi@linaro.org>
2198
2199 * linux-low.c (linux_low_filter_event): Remove redundant
2200 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2201
b04fd3be
MK
22022016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2203
2204 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2205 (struct linux_target_ops): Wire in the above.
2206
c40c8d4b
YQ
22072016-03-03 Yao Qi <yao.qi@linaro.org>
2208
2209 * linux-low.c: Update comments to start_step_over.
2210
0f8288ae
YQ
22112016-03-03 Yao Qi <yao.qi@linaro.org>
2212
2213 PR server/19736
2214 * linux-low.c (handle_extended_wait): Set child suspended
2215 if event_lwp->bp_reinsert isn't zero.
2216
fdbd04a8
YQ
22172016-03-02 Yao Qi <yao.qi@linaro.org>
2218
2219 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2220 enqueue_pending_signal.
2221
6896a8fa
MK
22222016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2223
2224 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2225 is actually loaded.
2226
ab503087
MK
22272016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2228
2229 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2230 (s390_regmap_3264) [!__s390x__]: New global.
2231 (s390_collect_ptrace_register): Skip map entries containing -1.
2232 (s390_supply_ptrace_register): Ditto.
2233 (s390_fill_gprs_high): New function.
2234 (s390_store_gprs_high): New function.
2235 (s390_regsets): Add NT_S390_HIGH_GPRS.
2236 (s390_get_hwcap): Enable on 31-bit.
2237 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2238 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2239 Detect NT_S390_HIGH_GPRS.
2240 (s390_usrregs_info_3264): Enable on 31-bit.
2241 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2242 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2243
ae91f625
MK
22442016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2245
2246 PR gdb/13808
2247 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2248 * configure.srv: Ditto.
2249 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2250 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2251 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2252 (init_registers_amd64_linux): Remove prototype.
2253 (tdesc_amd64_linux): Remove declaration.
2254 (get_ipa_tdesc): New function.
2255 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2256 initialize remaining tdescs.
2257 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2258 (init_registers_i386_linux): Remove prototype.
2259 (tdesc_i386_linux): Remove declaration.
2260 (get_ipa_tdesc): New function.
2261 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2262 initialize remaining tdescs.
2263 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2264 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2265 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2266 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2267 (x86_get_ipa_tdesc_idx): New function.
2268 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2269 * linux-x86-tdesc.h: New file.
2270 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2271 (target_get_ipa_tdesc_idx): New macro.
2272 * tracepoint.c (ipa_tdesc_idx): New macro.
2273 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2274 (symbol_list): Add ipa_tdesc_idx.
2275 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2276 (ipa_tdesc): Remove.
2277 (ipa_tdesc_idx): New variable.
2278 (get_context_regcache): Use get_ipa_tdesc.
2279 (gdb_collect): Ditto.
2280 (gdb_probe): Ditto.
2281 * tracepoint.h (get_ipa_tdesc): New prototype.
2282 (ipa_tdesc): Remove.
2283
e7ad2f14
PA
22842016-02-24 Pedro Alves <palves@redhat.com>
2285
2286 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2287 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2288 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2289 Factor out common code between the USE_SIGTRAP_SIGINFO and
2290 !USE_SIGTRAP_SIGINFO blocks.
2291 (linux_low_filter_event): Call save_stop_reason instead of
2292 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2293 Update comments.
2294 (linux_wait_1): Update comments.
2295
657f9cde
WW
22962016-02-24 Wei-cheng Wang <cole945@gmail.com>
2297
2298 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2299 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2300 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2301 ppc_insert_point, ppc_remove_point.
2302
b00b61e1
MK
23032016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2304
2305 * linux-s390-low.c (s390_supports_z_point_type): New function.
2306 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2307
553cb527
YQ
23082016-02-16 Yao Qi <yao.qi@linaro.org>
2309
2310 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2311 PC. Get pc from regcache_read_pc.
2312
a5652c21
YQ
23132016-02-12 Yao Qi <yao.qi@linaro.org>
2314
2315 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2316 or linux_get_pc_32bit.
2317 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2318
ed443b61
YQ
23192016-02-12 Yao Qi <yao.qi@linaro.org>
2320
2321 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2322 arm_linux_get_next_pcs_fixup.
2323
020ecd38
MK
23242016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2325
2326 * tracepoint.c (x_tracepoint_action_download): Change
2327 write_inferior_data_ptr to write_inferior_data_pointer.
2328 (cmd_qtstart): Likewise.
2329 (write_inferior_data_ptr): Remove.
2330 (download_agent_expr): Change write_inferior_data_ptr to
2331 write_inferior_data_pointer.
2332 (download_tracepoint_1): Likewise.
2333 (download_tracepoint): Likewise.
2334 (download_trace_state_variables): Likewise.
2335
7cae9051
WW
23362016-02-11 Wei-cheng Wang <cole945@gmail.com>
2337 Marcin Kościelnicki <koriakin@0x04.net>
2338
2339 * tracepoint.c (struct tracepoint_action_ops): Remove.
2340 (struct tracepoint_action): Remove ops.
2341 (m_tracepoint_action_download, r_tracepoint_action_download)
2342 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2343 size and offset accordingly.
2344 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2345 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2346 (tracepoint_action_send, tracepoint_action_download): New functions.
2347 Helpers for trace action handlers.
2348 (add_tracepoint_action): Remove setup actions ops.
2349 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2350
9f6a71b4
YQ
23512016-02-10 Yao Qi <yao.qi@linaro.org>
2352
2353 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2354
1e94266c
SM
23552016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2356
2357 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2358 to AC_OUTPUT.
2359 * configure: Regenerate.
2360
8adce034
SM
23612016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2362
2363 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2364 void * to gdb_byte *.
2365 * linux-low.c (siginfo_fixup): Likewise.
2366 (linux_xfer_siginfo): Likewise.
2367 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2368 Likewise.
2369 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2370
93813b37
WT
23712016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2372
2373 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2374 to srv_tgtobj.
2375 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2376 to srv_tgtobj.
2377 * linux-x86-low.c [__x86_64__]: Include
2378 "nat/amd64-linux-siginfo.h".
2379 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2380 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2381 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2382 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2383 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2384 (cpt_si_fd, si_timerid, si_overrun): Move from
2385 nat/amd64-linux-siginfo.c.
2386 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2387
8424cc97
SM
23882016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2389
2390 * server.c (skip_to_semicolon): Remove.
2391 (process_point_options): Use strchrnul instead of
2392 skip_to_semicolon.
2393
4d18591b
YQ
23942016-01-26 Yao Qi <yao.qi@linaro.org>
2395
2396 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2397 * linux-low.c (install_software_single_step_breakpoints): Don't
2398 call regcache_read_pc.
2399 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2400 argument pc.
2401
d8020970
YQ
24022016-01-26 Yao Qi <yao.qi@linaro.org>
2403
2404 * linux-low.c (install_software_single_step_breakpoints): Call
2405 regcache_read_pc instead of get_pc.
2406
8b207339
YQ
24072016-01-26 Yao Qi <yao.qi@linaro.org>
2408
2409 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2410 (unblock_async_io): Rename to ...
2411 (block_unblock_async_io): ... it. New function.
2412 (enable_async_io): Don't install SIGIO handler. Unblock it
2413 instead.
2414 (disable_async_io): Don't ignore SIGIO. Block it instead.
2415 (initialize_async_io): Install SIGIO handler. Don't call
2416 unblock_async_io.
2417
18879fef
YQ
24182016-01-26 Yao Qi <yao.qi@linaro.org>
2419
2420 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2421 first character is '\003', call *the_target->request_interrupt.
2422
a0f8e08a
YQ
24232016-01-25 Yao Qi <yao.qi@linaro.org>
2424
2425 * remote-utils.c (new_thread_notify): Remove.
2426 (dead_thread_notify): Likewise.
2427 * remote-utils.h (new_thread_notify): Remove declaration.
2428 (dead_thread_notify): Likewise.
2429
cc5fd9ab
MK
24302016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2431
2432 * gdb.trace/pending.exp: Fix expected message on continue.
2433
99e8eb11
MK
24342016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2435
2436 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2437 it works properly on big-endian machines where sizeof (CORE_ADDR)
2438 != sizeof (void *).
2439
a994041d
PA
24402016-01-21 Pedro Alves <palves@redhat.com>
2441
2442 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2443 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2444 * configure: Regenerate.
2445
f7a6a40d
YQ
24462016-01-21 Yao Qi <yao.qi@linaro.org>
2447
2448 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2449 is_thumb and set it according to CPSR saved on the stack.
2450 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2451 arm_sigreturn_next_pc.
2452
6f69e520
YQ
24532016-01-18 Yao Qi <yao.qi@linaro.org>
2454
2455 * linux-low.c (linux_set_pc_64bit): New function.
2456 (linux_get_pc_64bit): New function.
2457 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2458 Declare.
2459 * linux-sparc-low.c (debug_threads): Remove declaration.
2460 (sparc_get_pc): Remove.
2461 (the_low_target): Use linux_get_pc_64bit instead of
2462 sparc_get_pc.
2463 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2464 (the_low_target): Use linux_get_pc_64bit and
2465 linux_set_pc_64bit.
2466
276d4552
YQ
24672016-01-18 Yao Qi <yao.qi@linaro.org>
2468
2469 * linux-arm-low.c (debug_threads): Remove declaration.
2470 (arm_get_pc, arm_set_pc): Remove.
2471 (the_low_target): Use linux_get_pc_32bit and
2472 linux_set_pc_32bit.
2473 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2474 (the_low_target): Use linux_get_pc_32bit and
2475 linux_set_pc_32bit.
2476 * linux-cris-low.c (debug_threads): Remove declaration.
2477 (cris_get_pc, cris_set_pc,): Remove.
2478 (the_low_target): Use linux_get_pc_32bit and
2479 linux_set_pc_32bit.
2480 * linux-crisv32-low.c (debug_threads): Remove declaration.
2481 (cris_get_pc, cris_set_pc): Remove.
2482 (the_low_target): Use linux_get_pc_32bit and
2483 linux_set_pc_32bit.
2484 * linux-low.c: Include inttypes.h.
2485 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2486 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2487 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2488 (the_low_target): Use linux_get_pc_32bit and
2489 linux_set_pc_32bit.
2490 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2491 (the_low_target): Use linux_get_pc_32bit and
2492 linux_set_pc_32bit.
2493 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2494 (the_low_target): Use linux_get_pc_32bit and
2495 linux_set_pc_32bit.
2496 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2497 (the_low_target): Use linux_get_pc_32bit and
2498 linux_set_pc_32bit.
2499 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2500 (the_low_target): Use linux_get_pc_32bit and
2501 linux_set_pc_32bit.
2502
eb0edac8
GB
25032016-01-18 Gary Benson <gbenson@redhat.com>
2504
2505 * configure.ac (AC_FUNC_FORK): New check.
2506 * config.in: Regenerate.
2507 * configure: Likewise.
2508
1b451dda
YQ
25092016-01-14 Yao Qi <yao.qi@linaro.org>
2510
2511 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2512 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2513 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2514 arm_get_next_pcs_ctor.
2515
82075af2
JS
25162016-01-12 Josh Stone <jistone@redhat.com>
2517 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2518
2519 * inferiors.h: Include "gdb_vecs.h".
2520 (struct process_info): Add syscalls_to_catch.
2521 * inferiors.c (remove_process): Free syscalls_to_catch.
2522 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2523 syscall_return stops.
2524 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2525 * server.c (handle_general_set): Handle QCatchSyscalls.
2526 (handle_query): Report support for QCatchSyscalls.
2527 * target.h (struct target_ops): Add supports_catch_syscall.
2528 (target_supports_catch_syscall): New macro.
2529 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2530 (struct lwp_info): Add syscall_state.
2531 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2532 Maintain syscall_state and syscalls_to_catch across exec.
2533 (get_syscall_trapinfo): New function, proxy to the_low_target.
2534 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2535 (linux_low_filter_event): Toggle syscall_state entry/return for
2536 syscall traps, and set it ignored for all others.
2537 (gdb_catching_syscalls_p): New function.
2538 (gdb_catch_this_syscall_p): New function.
2539 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2540 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2541 (linux_supports_catch_syscall): New function.
2542 (linux_target_ops): Install it.
2543 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2544 (the_low_target): Install it.
2545
8f13a3ce
MF
25462016-01-12 Mike Frysinger <vapier@gentoo.org>
2547
2548 * acinclude.m4: Include new ../warning.m4 file.
2549 * configure: Regenerated.
2550 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2551
5b3da067
MF
25522016-01-12 Mike Frysinger <vapier@gentoo.org>
2553
2554 * ax.c (is_goto_target): Mark static.
2555 * linux-low.c (register_addr): Likewise.
2556 (linux_fetch_registers, linux_store_registers): Likewise.
2557 * mem-break.c (any_persistent_commands): Fix old prototype.
2558 (add_commands_to_breakpoint): Mark static.
2559 * regcache.c (find_register_by_name): Delete unused func.
2560 * remote-utils.c (hex_or_minus_one): Mark static.
2561 * server.c (monitor_show_help): Mark static.
2562 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2563 handle_v_requests): Likewise.
2564
bc504a31
PA
25652016-01-12 Pedro Alves <palves@redhat.com>
2566
2567 Remove use of the registered trademark symbol throughout.
2568
5a0dd67a
YQ
25692016-01-08 Yao Qi <yao.qi@linaro.org>
2570
2571 * remote-utils.c (getpkt): If c is '\003', call target hook
2572 request_interrupt.
2573
b2ca446f
YQ
25742016-01-06 Yao Qi <yao.qi@linaro.org>
2575
2576 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2577 linux-aarch32-low.c.
2578 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2579 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2580 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2581 (thumb2_breakpoint): Declare.
2582 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2583 linux-aarch32-low.h.
2584 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2585 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2586 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2587
edd88788
JB
25882016-01-01 Joel Brobecker <brobecker@adacore.com>
2589
2590 * gdbreplay.c (gdbreplay_version): Change copyright year in
2591 version message.
2592 * server.c (gdbserver_version): Likewise.
2593
65da7f14
PP
25942015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2595
2596 * server.c (crc32_table): Delete.
2597 (crc32): Use libiberty's xcrc32 function.
2598
4abd5ed2
JB
25992015-12-22 Joel Brobecker <brobecker@adacore.com>
2600
2601 * lynx-low.c (lynx_delete_thread_callback): New function.
2602 (lynx_mourn): Properly delete our process and all of its
2603 threads. Remove call to clear_inferiors.
2604
0e50fe5c
JB
26052015-12-22 Joel Brobecker <brobecker@adacore.com>
2606
2607 * target.c (thread_search_callback): Add check that
2608 the thread_stopped target callback is not NULL before
2609 calling it.
2610
35adc03f
YQ
26112015-12-21 Yao Qi <yao.qi@linaro.org>
2612
2613 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2614 arm breakpoint.
2615
bd2b2909
AT
26162015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2617
2618 * server.c (handle_query): Call target_supports_software_single_step.
2619
7fe5e27e
AT
26202015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2621
2622 * linux-low.c (single_step): New function.
2623 (linux_resume_one_lwp_throw): Call single_step.
2624 (start_step_over): Likewise.
2625
d9311bfa
AT
26262015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2627
2628 * Makefile.in (SFILES): Append arch/arm-linux.c,
2629 arch/arm-get-next-pcs.c.
2630 (arm-linux.o): New rule.
2631 (arm-get-next-pcs.o): New rule.
2632 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2633 arm-linux.o.
2634 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2635 to linux-aarch32-low.c.
2636 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2637 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2638 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2639 (thumb2_breakpoint_len): Likewise.
2640 (arm_is_thumb_mode): Make non-static.
2641 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2642 from linux-aarch32-low.c.
2643 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2644 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2645 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2646 (thumb2_breakpoint_len): Likewise.
2647 (arm_is_thumb_mode): New declaration.
2648 * linux-arm-low.c: Include arch/arm-linux.h
2649 aarch/arm-get-next-pcs.h, sys/syscall.h.
2650 (get_next_pcs_ops): New struct.
2651 (get_next_pcs_addr_bits_remove): New function.
2652 (get_next_pcs_is_thumb): New function.
2653 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2654 (arm_sigreturn_next_pc): Likewise.
2655 (get_next_pcs_syscall_next_pc): Likewise.
2656 (arm_gdbserver_get_next_pcs): Likewise.
2657 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2658 Initialize.
2659 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2660 * server.h: Include gdb_vecs.h.
2661
68ce2059
AT
26622015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2663
2664 * Makefile.in (SFILES): Append common/common-regcache.c.
2665 (OBS): Append common-regcache.o.
2666 (common-regcache.o): New rule.
2667 * regcache.c (init_register_cache): Initialize cache to
2668 REG_UNAVAILABLE.
2669 (regcache_raw_read_unsigned): New function.
2670 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2671 register_status enum.
2672
fa5308bd
AT
26732015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2674
2675 * linux-aarch64-low.c (the_low_targets): Rename
2676 breakpoint_reinsert_addr to get_next_pcs.
2677 * linux-arm-low.c (the_low_targets): Likewise.
2678 * linux-bfin-low.c (the_low_targets): Likewise.
2679 * linux-cris-low.c (the_low_targets): Likewise.
2680 * linux-crisv32-low.c (the_low_targets): Likewise.
2681 * linux-low.c (can_software_single_step): Likewise.
2682 (install_software_single_step_breakpoints): New function.
2683 (start_step_over): Use install_software_single_step_breakpoints.
2684 * linux-low.h: New CORE_ADDR vector.
2685 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2686 get_next_pcs.
2687 * linux-mips-low.c (the_low_targets): Likewise.
2688 * linux-nios2-low.c (the_low_targets): Likewise.
2689 * linux-sparc-low.c (the_low_targets): Likewise.
2690
4a6ed09b
PA
26912015-12-17 Pedro Alves <palves@redhat.com>
2692
2693 * linux-low.c (linux_kill_one_lwp): Remove references to
2694 LinuxThreads.
2695 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2696 to 'kill'.
2697 (linux_init_signals): Delete.
2698 (initialize_low): Adjust.
2699 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2700
7544db95
PA
27012015-12-16 Pedro Alves <palves@redhat.com>
2702
2703 * configure.ac (compiler warning flags): When testing a
2704 -Wno-foo option, check whether -Wfoo works instead.
2705 * configure: Regenerate.
2706
8020350c
DB
27072015-12-11 Don Breazeal <donb@codesourcery.com>
2708
2709 * server.c (process_serial_event): Don't exit from gdbserver
2710 in remote mode if there are still active inferiors.
2711
db91f502
YQ
27122015-12-11 Yao Qi <yao.qi@linaro.org>
2713
2714 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2715 arm_breakpoint_at if the process is 32-bit.
2716
b37a6290
YQ
27172015-12-11 Yao Qi <yao.qi@linaro.org>
2718
2719 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2720 arm breakpoint.
2721
17b1509a
YQ
27222015-12-07 Yao Qi <yao.qi@linaro.org>
2723
2724 * configure.srv: Append arm.o to srv_tgtobj for
2725 aarch64*-*-linux* target.
2726 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2727 from linux-arm-low.c.
2728 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2729 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2730 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2731 (thumb2_breakpoint_len): Likewise.
2732 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2733 (arm_breakpoint_kinds): Likewise.
2734 (arm_breakpoint_kind_from_pc): Likewise.
2735 (arm_sw_breakpoint_from_kind): Likewise.
2736 (arm_breakpoint_kind_from_current_state): Likewise.
2737 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2738 (arm_sw_breakpoint_from_kind): Declare.
2739 (arm_breakpoint_kind_from_current_state): Declare.
2740 (arm_breakpoint_at): Declare.
2741 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2742 arm_sw_breakpoint_from_kind if process is 32-bit.
2743 (aarch64_breakpoint_kind_from_pc): New function.
2744 (aarch64_breakpoint_kind_from_current_state): New function.
2745 (the_low_target): Initialize fields breakpoint_kind_from_pc
2746 and breakpoint_kind_from_current_state.
2747 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2748 linux-aarch32-low.c.
2749 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2750 (arm_breakpoint, arm_breakpoint_len): Likewise.
2751 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2752 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2753 (arm_is_thumb_mode): Likewise.
2754 (arm_breakpoint_at): Likewise.
2755 (arm_breakpoint_kind_from_pc): Likewise.
2756 (arm_sw_breakpoint_from_kind): Likewise.
2757 (arm_breakpoint_kind_from_current_state): Likewise.
2758
2759 Revert:
2760 2015-08-04 Yao Qi <yao.qi@linaro.org>
2761
2762 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2763 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2764 * server.c (extended_protocol): Remove "static".
2765 * server.h (extended_protocol): Declare it.
2766
ece66d65
JS
27672015-12-04 Josh Stone <jistone@redhat.com>
2768
2769 * target.h (struct target_ops) <arch_setup>: Rename to ...
2770 (struct target_ops) <post_create_inferior>: ... this.
2771 (target_arch_setup): Rename to ...
2772 (target_post_create_inferior): ... this, calling post_create_inferior.
2773 * server.c (start_inferior): Update target_arch_setup calls to
2774 target_post_create_inferior.
2775 * linux-low.c (linux_low_ptrace_options): Forward declare.
2776 (linux_arch_setup): Update its comment for general use.
2777 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2778 (struct linux_target_ops): Use linux_post_create_inferior.
2779 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2780 to post_create_inferior.
2781 * nto-low.c (struct nto_target_ops): Likewise.
2782 * spu-low.c (struct spu_target_ops): Likewise.
2783 * win32-low.c (struct win32_target_ops): Likewise.
2784
e58c48b4
AT
27852015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2786
2787 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2788
fbec8956
AT
27892015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2790
2791 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2792 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2793 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2794 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2795 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2796 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2797 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2798 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2799 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2800 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2801 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2802 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2803
9b4c5f87
AT
28042015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2805
2806 * linux-low.c (linux_look_up_symbols): Don't call
2807 linux_supports_traceclone.
2808 * linux-low.h (thread_db_init): Remove use_events argument.
2809 * thread-db.c (thread_db_use_event): Remove global variable.
2810 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2811 (struct thread_db) <td_create_bp>: Remove field.
2812 (thread_db_create_event): Remove function.
2813 (thread_db_enable_reporting): Likewise.
2814 (find_one_thread): Don't check for thread_db_use_events.
2815 (attach_thread): Likewise.
2816 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2817 (try_thread_db_load_1): Don't check for thread_db_use_events.
2818 (thread_db_init): Remove use_events argument and thread events
2819 handling.
2820 (remove_thread_event_breakpoints): Remove function.
2821 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2822
7d00775e
AT
28232015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2824
2825 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2826 New function.
2827 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2828 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2829 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2830 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2831 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2832 Initialize.
2833 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2834 New function.
2835 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2836 * linux-low.c (can_hardware_single_step): Use
2837 supports_hardware_single_step.
2838 (can_software_single_step): New function.
2839 (start_step_over): Call can_software_single_step.
2840 (linux_supports_hardware_single_step): New function.
2841 (struct target_ops) <supports_software_single_step>: Initialize.
2842 * linux-low.h (struct linux_target_ops)
2843 <supports_hardware_single_step>: Initialize.
2844 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2845 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2846 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2847 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2848 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2849 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2850 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2851 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2852 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2853 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2854 Initialize.
2855 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2856 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2857 Initialize.
2858 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2859 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2860 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2861 New function.
2862 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2863 * target.h (struct target_ops): <supports_software_single_step>:
2864 New field.
2865 (target_supports_software_single_step): New macro.
2866
2d97cd35
AT
28672015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2868
2869 * linux-low.c (linux_wait_1): Fix pc advance condition.
2870 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2871 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2872
769ef81f
AT
28732015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2874
2875 * linux-arm-low.c (arm_is_thumb_mode): New function.
2876 (arm_breakpoint_at): Use arm_is_thumb_mode.
2877 (arm_breakpoint_kind_from_current_state): New function.
2878 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2879 Initialize.
2880 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2881 (linux_breakpoint_kind_from_current_state): New function.
2882 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2883 * linux-low.h (struct linux_target_ops)
2884 <breakpoint_kind_from_current_state>: New field.
2885 * target.h (struct target_ops): Likewise.
2886 (target_breakpoint_kind_from_current_state): New macro.
2887
1bebeeca
PA
28882015-11-30 Pedro Alves <palves@redhat.com>
2889
2890 * linux-low.c (linux_resume): Wake up the event loop before
2891 returning.
2892
a67a9fae
PA
28932015-11-30 Pedro Alves <palves@redhat.com>
2894
2895 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2896 check.
2897 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2898 to -1.
2899 * target.c (struct thread_search): New structure.
2900 (thread_search_callback): New function.
2901 (prev_general_thread): New global.
2902 (prepare_to_access_memory, done_accessing_memory): New functions.
2903 * target.h (prepare_to_access_memory, done_accessing_memory):
2904 Replace macros with function declarations.
2905
f2faf941
PA
29062015-11-30 Pedro Alves <palves@redhat.com>
2907
2908 PR 14618
2909 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2910 report TARGET_WAITKIND_NO_RESUMED.
2911 * remote-utils.c (prepare_resume_reply): Handle
2912 TARGET_WAITKIND_NO_RESUMED.
2913 * server.c (report_no_resumed): New global.
2914 (handle_query) <qSupported>: Handle "no-resumed+". Report
2915 "no-resumed+" support.
2916 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2917 return error if the client doesn't support no-resumed events.
2918 (push_stop_notification): New function.
2919 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2920 events if the client supports them.
2921
a681f9c9
PA
29222015-11-30 Pedro Alves <palves@redhat.com>
2923
2924 * linux-low.c (thread_still_has_status_pending_p): Don't check
2925 vCont;t here.
2926 (lwp_resumed): New function.
2927 (status_pending_p_callback): Return early if the LWP is not
2928 supposed to be resumed.
2929
65706a29
PA
29302015-11-30 Pedro Alves <palves@redhat.com>
2931
2932 * linux-low.c (handle_extended_wait): Assert that the LWP's
2933 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2934 thread create events, leave the new child's status pending.
2935 (linux_low_filter_event): If GDB wants to hear about thread exit
2936 events, leave the LWP marked dead and don't delete it.
2937 (linux_wait_for_event_filtered): Don't check for thread exit.
2938 (filter_exit_event): New function.
2939 (linux_wait_1): Use it, when returning an exit event.
2940 (linux_resume_one_lwp_throw): Assert that the LWP's
2941 waitstatus is TARGET_WAITKIND_IGNORE.
2942 * remote-utils.c (prepare_resume_reply): Handle
2943 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2944 * server.c (report_thread_events): New global.
2945 (handle_general_set): Handle QThreadEvents.
2946 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2947 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2948 TARGET_WAITKIND_THREAD_EXITED.
2949 * server.h (report_thread_events): Declare.
2950
56cf4bed
PA
29512015-11-30 Pedro Alves <palves@redhat.com>
2952
2953 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2954 the thread's last_resume_kind was resume_stop.
2955
500c1d85
PA
29562015-11-30 Pedro Alves <palves@redhat.com>
2957
2958 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2959 before returning.
2960
de979965
PA
29612015-11-30 Pedro Alves <palves@redhat.com>
2962
2963 * server.c (handle_v_requests): Handle vCtrlC.
2964
34c65914
PA
29652015-11-30 Pedro Alves <palves@redhat.com>
2966
2967 * gdbthread.h (find_any_thread_of_pid): Declare.
2968 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2969 functions.
2970 * server.c (handle_query): If current_thread is NULL, look for
2971 another thread of the selected process.
2972
79efa585 29732015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 2974 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
2975
2976 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2977 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2978 name in reply.
2979 * target.h (struct target_ops) <thread_name>: New field.
2980 (target_thread_name): New macro.
2981
80d82c19
JB
29822015-11-23 Joel Brobecker <brobecker@adacore.com>
2983
2984 * regcache.h (regcache_invalidate_pid): Add declaration.
2985 * regcache.c (regcache_invalidate_pid): New function, extracted
2986 from regcache_invalidate.
2987 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2988 Add trivial documentation comment.
2989 * lynx-low.c: Use regcache_invalidate_pid instead of
2990 regcache_invalidate.
2991
64da5dd5
JB
29922015-11-23 Joel Brobecker <brobecker@adacore.com>
2993
2994 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2995 and Elf64_auxv_t if the target is Android.
2996
37ce4055
DE
29972015-11-22 Doug Evans <xdje42@gmail.com>
2998
2999 * target.h: #include <sys/types.h>.
3000
06e03fff
PA
30012015-11-19 Pedro Alves <palves@redhat.com>
3002
3003 * linux-low.c (linux_process_qsupported): Change prototype.
3004 Adjust.
3005 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3006 Change prototype.
3007 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3008 and adjust to loop over all features.
3009 * server.c (handle_query) <qSupported>: Adjust to call
3010 target_process_qsupported once, passing it a vector of unprocessed
3011 features.
3012 * target.h (struct target_ops) <process_qsupported>: Change
3013 prototype.
3014 (target_process_qsupported): Adjust.
3015
9a084706
PA
30162015-11-19 Pedro Alves <palves@redhat.com>
3017
3018 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3019 mode.
3020 * configure: Regenerate.
3021
dad44a1f
PA
30222015-11-19 Pedro Alves <palves@redhat.com>
3023
3024 * configure: Regenerate.
3025
231c0592
YQ
30262015-11-19 Yao Qi <yao.qi@linaro.org>
3027
3028 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3029 type to uint32_t.
3030
6c1c9a8b
YQ
30312015-11-19 Yao Qi <yao.qi@linaro.org>
3032
3033 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3034 (struct aarch64_operand): Move enum out.
3035
9caa3311
YQ
30362015-11-19 Yao Qi <yao.qi@linaro.org>
3037
3038 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3039 struct user_fpsimd_state *.
3040 (aarch64_store_fpregset): Likewise.
3041
6a69a054
YQ
30422015-11-19 Yao Qi <yao.qi@linaro.org>
3043
3044 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3045 struct user_pt_regs *.
3046 (aarch64_store_gregset): Likewise.
3047
1798301e
PA
30482015-11-18 Pedro Alves <palves@redhat.com>
3049
3050 * Makefile.in (all_object_files): Add $IPA_OBJS.
3051
ce7715e2
PA
30522015-11-17 Pedro Alves <palves@redhat.com>
3053
3054 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3055 GDB_SIGNAL_0 and gdb_signal_to_string.
3056
c0879059
PA
30572015-11-17 Pedro Alves <palves@redhat.com>
3058
3059 * win32-low.c (handle_output_debug_string): Remove parameter.
3060 (win32_kill): Remove our_status local and adjust call to
3061 handle_output_debug_string.
3062 (get_child_debug_event): Adjust call to
3063 handle_output_debug_string.
3064
1996e237
SM
30652015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3066
3067 * linux-mips-low.c (mips_fill_gregset): Add cast.
3068 (mips_store_gregset): Likewise.
3069 (mips_fill_fpregset): Likewise.
3070 (mips_store_fpregset): Likewise.
3071
cbec665b
SM
30722015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3073
3074 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3075 priv.
3076
eb3e3c67
SM
30772015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3078
3079 * linux-mips-low.c (mips_linux_new_thread): Change type of
3080 watch_type to enum target_hw_bp_type.
3081
171de4b8
SM
30822015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3083
3084 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3085 Change return type to arm_hwbp_type.
3086
04248ead
SM
30872015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3088
3089 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3090 (arm_store_gregset): Likewise.
3091 * linux-arm-low.c (arm_get_hwcap): Likewise.
3092 (arm_read_description): Likewise.
3093
04b3479c
SM
30942015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3095
3096 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3097
2bc84e8a
SM
30982015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3099
3100 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3101 (ppc_fill_vsxregset): Likewise.
3102 (ppc_store_vsxregset): Likewise.
3103 (ppc_fill_vrregset): Likewise.
3104 (ppc_store_vrregset): Likewise.
3105 (ppc_fill_evrregset): Likewise.
3106 (ppc_store_evrregset): Likewise.
3107
e6c5bb05
SM
31082015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3109
3110 * linux-ppc-low.c (ppc_usrregs_info): Remove
3111 forward-declaration.
3112 (ppc_arch_setup): Move lower in file.
3113
7ea45d72
SM
31142015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3115
3116 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3117 (ps_pdwrite): Likewise.
3118
69291610
HW
31192015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3120
3121 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3122 to after assert checks.
3123
b42945fd
SM
31242015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3125
3126 * proc-service.c (ps_pdread): Add/adjust casts.
3127 (ps_pdwrite): Add/adjust casts.
3128
d6f85c84
SM
31292015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3130
3131 * server.c (handle_search_memory_1): Cast return value of
3132 memmem.
3133
f98cd059
SM
31342015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3135
3136 * server.c (write_qxfer_response): Change type of data to
3137 gdb_byte *.
3138
d2412fa5
PA
31392015-10-29 Pedro Alves <palves@redhat.com>
3140
3141 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3142
c17414a2
PA
31432015-10-29 Pedro Alves <palves@redhat.com>
3144
3145 * tracepoint.c (clear_installed_tracepoints): Add casts.
3146
e053fbc4
PA
31472015-10-29 Pedro Alves <palves@redhat.com>
3148
3149 * server.c (handle_v_cont, process_serial_event): Add enum
3150 gdb_signal casts to signal parsing code.
3151
add67df8
PA
31522015-10-29 Pedro Alves <palves@redhat.com>
3153
3154 * linux-low.h (NULL_REGSET): Define.
3155 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3156 * linux-arm-low.c (arm_regsets): Likewise.
3157 * linux-crisv32-low.c (cris_regsets): Likewise.
3158 * linux-m68k-low.c (m68k_regsets): Likewise.
3159 * linux-mips-low.c (mips_regsets): Likewise.
3160 * linux-nios2-low.c (nios2_regsets): Likewise.
3161 * linux-ppc-low.c (ppc_regsets): Likewise.
3162 * linux-s390-low.c (s390_regsets): Likewise.
3163 * linux-sh-low.c (sh_regsets): Likewise.
3164 * linux-sparc-low.c (sparc_regsets): Likewise.
3165 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3166 * linux-tile-low.c (tile_regsets): Likewise.
3167 * linux-x86-low.c (x86_regsets): Likewise.
3168 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3169
50bc912a
PA
31702015-10-29 Pedro Alves <palves@redhat.com>
3171
3172 * linux-low.h (NULL_REGSET): Define.
3173 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3174 * linux-arm-low.c (arm_regsets): Likewise.
3175 * linux-crisv32-low.c (cris_regsets): Likewise.
3176 * linux-m68k-low.c (m68k_regsets): Likewise.
3177 * linux-mips-low.c (mips_regsets): Likewise.
3178 * linux-nios2-low.c (nios2_regsets): Likewise.
3179 * linux-ppc-low.c (ppc_regsets): Likewise.
3180 * linux-s390-low.c (s390_regsets): Likewise.
3181 * linux-sh-low.c (sh_regsets): Likewise.
3182 * linux-sparc-low.c (sparc_regsets): Likewise.
3183 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3184 * linux-tile-low.c (tile_regsets): Likewise.
3185 * linux-x86-low.c (x86_regsets): Likewise.
3186 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3187
682b2546
DE
31882015-10-26 Doug Evans <dje@google.com>
3189
3190 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3191
963843d4
DE
31922015-10-26 Doug Evans <dje@google.com>
3193
3194 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3195
d41401ac
DE
31962015-10-26 Doug Evans <dje@google.com>
3197
3198 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3199 for debug_printf.
3200 (attach_thread, find_new_threads_callback): Ditto.
3201
3db28855
AT
32022015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3203
3204 * mem-break.h (set_breakpoint_data): Remove.
3205
fb78e89c
AT
32062015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3207
3208 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3209 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3210 (initialize_low): Remove set_breakpoint_data call.
3211 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3212 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3213 (initialize_low): Remove set_breakpoint_data call.
3214 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3215 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3216 (initialize_low): Remove set_breakpoint_data call.
3217
2e6ee069
AT
32182015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3219
3220 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3221 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3222 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3223 * target.h (target_breakpoint_kind_from_pc): New macro.
3224
1652a986
AT
32252015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3226
3227 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3228 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3229 the default breakpoint kind.
3230
abeead09
AT
32312015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3232
3233 * linux-arm-low.c (arm_supports_z_point_type): Add software
3234 breakpoint support.
3235
b0b4b501
AT
32362015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3237
3238 * linux-arm-low.c: Refactor breakpoint definitions.
3239 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3240 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3241
8689682c
AT
32422015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3243
3244 * Makefile.in: Add arm.c/o.
3245 * configure.srv: Likewise.
3246 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3247 (arm_breakpoint_kind_from_pc): New function.
3248 (arm_sw_breakpoint_from_kind): Return proper kind.
3249 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3250
27165294
AT
32512015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3252
3253 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3254 removal.
3255 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3256 (struct raw_breakpoint) <size>: Remove.
3257 (struct raw_breakpoint) <kind>: Add.
3258 (bp_size): New function.
3259 (bp_opcode): Likewise.
3260 (find_raw_breakpoint_at): Adjust for kind.
3261 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3262 (remove_memory_breakpoint): Adjust for kind call bp_size.
3263 (set_raw_breakpoint_at): Adjust for kind.
3264 (set_breakpoint): Likewise.
3265 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3266 (delete_raw_breakpoint): Adjust for kind.
3267 (delete_breakpoint): Likewise.
3268 (find_gdb_breakpoint): Likewise.
3269 (set_gdb_breakpoint_1): Likewise.
3270 (set_gdb_breakpoint): Likewise.
3271 (delete_gdb_breakpoint_1): Likewise.
3272 (delete_gdb_breakpoint): Likewise.
3273 (uninsert_raw_breakpoint): Likewise.
3274 (reinsert_raw_breakpoint): Likewise.
3275 (set_breakpoint_data): Remove.
3276 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3277 (check_mem_read): Adjust for kind call bp_size.
3278 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3279 (clone_one_breakpoint): Adjust for kind.
3280 * mem-break.h (set_gdb_breakpoint): Likewise.
3281 (delete_gdb_breakpoint): Likewise.
3282 * server.c (process_serial_event): Likewise.
3283
dd373349
AT
32842015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3285
3286 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3287 (struct linux_target_ops) <breakpoint>: Remove.
3288 (struct linux_target_ops) <breakpoint_len>: Remove.
3289 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3290 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3291 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3292 (arm_sw_breakpoint_from_kind): New function.
3293 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3294 (struct linux_target_ops) <breakpoint>: Remove.
3295 (struct linux_target_ops) <breakpoint_len>: Remove.
3296 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3297 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3298 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3299 (struct linux_target_ops) <breakpoint>: Remove.
3300 (struct linux_target_ops) <breakpoint_len>: Remove.
3301 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3302 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3303 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3304 (struct linux_target_ops) <breakpoint>: Remove.
3305 (struct linux_target_ops) <breakpoint_len>: Remove.
3306 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3307 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3308 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3309 and sw_breakpoint_from_kind to increment the pc.
3310 (linux_breakpoint_kind_from_pc): New function.
3311 (linux_sw_breakpoint_from_kind): New function.
3312 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3313 (initialize_low): Call breakpoint_kind_from_pc and
3314 sw_breakpoint_from_kind to replace breakpoint_data/len.
3315 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3316 New field.
3317 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3318 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3319 (struct linux_target_ops) <breakpoint>: Remove.
3320 (struct linux_target_ops) <breakpoint_len>: Remove.
3321 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3322 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3323 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3324 (struct linux_target_ops) <breakpoint>: Remove.
3325 (struct linux_target_ops) <breakpoint_len>: Remove.
3326 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3327 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3328 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3329 (struct linux_target_ops) <breakpoint>: Remove.
3330 (struct linux_target_ops) <breakpoint_len>: Remove.
3331 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3332 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3333 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3334 (struct linux_target_ops) <breakpoint>: Remove.
3335 (struct linux_target_ops) <breakpoint_len>: Remove.
3336 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3337 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3338 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3339 (struct linux_target_ops) <breakpoint>: Remove.
3340 (struct linux_target_ops) <breakpoint_len>: Remove.
3341 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3342 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3343 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3344 (struct linux_target_ops) <breakpoint>: Remove.
3345 (struct linux_target_ops) <breakpoint_len>: Remove.
3346 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3347 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3348 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3349 (struct linux_target_ops) <breakpoint>: Remove.
3350 (struct linux_target_ops) <breakpoint_len>: Remove.
3351 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3352 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3353 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3354 (struct linux_target_ops) <breakpoint>: Remove.
3355 (struct linux_target_ops) <breakpoint_len>: Remove.
3356 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3357 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3358 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3359 (struct linux_target_ops) <breakpoint>: Remove.
3360 (struct linux_target_ops) <breakpoint_len>: Remove.
3361 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3362 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3363 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3364 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3365 (struct linux_target_ops) <breakpoint>: Remove.
3366 (struct linux_target_ops) <breakpoint_len>: Remove.
3367 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3368 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3369 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3370 (struct linux_target_ops) <breakpoint>: Remove.
3371 (struct linux_target_ops) <breakpoint_len>: Remove.
3372 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3373 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3374
4cd98a19
AT
33752015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3376
3377 * linux-cris-low.c (cris_get_pc): Remove void arg.
3378
774ee6d2
AR
33792015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3380
3381 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3382 variable name.
3383
833dcd29
AR
33842015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3385
3386 * inferiors.c (thread_pid_matches_callback): New function.
3387 (find_thread_process): New function.
3388 (remove_thread): Reset current_thread.
3389 (remove_process): Assert threads have been removed first.
3390
8d689ee5
YQ
33912015-10-15 Yao Qi <yao.qi@linaro.org>
3392
3393 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3394 if it is 3.
3395 (aarch64_remove_point): Likewise.
3396 * regcache.c (regcache_register_size): New function.
3397
1c2e1515
YQ
33982015-10-12 Yao Qi <yao.qi@linaro.org>
3399
3400 * linux-aarch64-low.c: Update all callers as emit_load_store
3401 is renamed to aarch64_emit_load_store.
3402
e1c587c3
YQ
34032015-10-12 Yao Qi <yao.qi@linaro.org>
3404
3405 * linux-aarch64-low.c: Update all callers of function renaming
3406 from emit_insn to aarch64_emit_insn.
3407
b6542f81
YQ
34082015-10-12 Yao Qi <yao.qi@linaro.org>
3409
3410 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3411 arch/aarch64-insn.h.
3412 (struct aarch64_memory_operand): Likewise.
3413 (ENCODE): Likewise.
3414 (emit_insn): Move to arch/aarch64-insn.c.
3415 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3416 (emit_load_store): Move to arch/aarch64-insn.c.
3417 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3418 (can_encode_int32): Remove.
3419
246994ce
YQ
34202015-10-12 Yao Qi <yao.qi@linaro.org>
3421
3422 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3423 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3424 (aarch64_relocate_instruction): Likewise.
3425 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3426 (struct aarch64_insn_visitor): Likewise.
3427
0badd99f
YQ
34282015-10-12 Yao Qi <yao.qi@linaro.org>
3429
3430 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3431 (struct aarch64_insn_visitor): New.
3432 (struct aarch64_insn_relocation_data): New.
3433 (aarch64_ftrace_insn_reloc_b): New function.
3434 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3435 (aarch64_ftrace_insn_reloc_cb): Likewise.
3436 (aarch64_ftrace_insn_reloc_tb): Likewise.
3437 (aarch64_ftrace_insn_reloc_adr): Likewise.
3438 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3439 (aarch64_ftrace_insn_reloc_others): Likewise.
3440 (visitor): New.
3441 (aarch64_relocate_instruction): Use visitor.
3442
dfaffe9d
YQ
34432015-10-12 Yao Qi <yao.qi@linaro.org>
3444
3445 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3446 int. Add argument buf.
3447 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3448 aarch64_relocate_instruction.
3449
70b439f0
YQ
34502015-10-12 Yao Qi <yao.qi@linaro.org>
3451
3452 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3453 argument insn. Remove local variable insn. Don't call
3454 target_read_uint32.
3455 (aarch64_install_fast_tracepoint_jump_pad): Call
3456 target_read_uint32.
3457
7781c06f
YQ
34582015-09-30 Yao Qi <yao.qi@linaro.org>
3459
3460 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3461 (emit_load_store_pair): Likewise.
3462
9a3c8263
SM
34632015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3464
3465 * dll.c (match_dll): Add cast(s).
3466 (unloaded_dll): Likewise.
3467 * linux-low.c (second_thread_of_pid_p): Likewise.
3468 (delete_lwp_callback): Likewise.
3469 (count_events_callback): Likewise.
3470 (select_event_lwp_callback): Likewise.
3471 (linux_set_resume_request): Likewise.
3472 * server.c (accumulate_file_name_length): Likewise.
3473 (emit_dll_description): Likewise.
3474 (handle_qxfer_threads_worker): Likewise.
3475 (visit_actioned_threads): Likewise.
3476 * thread-db.c (any_thread_of): Likewise.
3477 * tracepoint.c (same_process_p): Likewise.
3478 (match_blocktype): Likewise.
3479 (build_traceframe_info_xml): Likewise.
3480
224c3ddb
SM
34812015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3482
3483 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3484 assignment.
3485 (gdb_unparse_agent_expr): Likewise.
3486 * hostio.c (require_data): Likewise.
3487 (handle_pread): Likewise.
3488 * linux-low.c (disable_regset): Likewise.
3489 (fetch_register): Likewise.
3490 (store_register): Likewise.
3491 (get_dynamic): Likewise.
3492 (linux_qxfer_libraries_svr4): Likewise.
3493 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3494 (set_fast_tracepoint_jump): Likewise.
3495 (uninsert_fast_tracepoint_jumps_at): Likewise.
3496 (reinsert_fast_tracepoint_jumps_at): Likewise.
3497 (validate_inserted_breakpoint): Likewise.
3498 (clone_agent_expr): Likewise.
3499 * regcache.c (init_register_cache): Likewise.
3500 * remote-utils.c (putpkt_binary_1): Likewise.
3501 (decode_M_packet): Likewise.
3502 (decode_X_packet): Likewise.
3503 (look_up_one_symbol): Likewise.
3504 (relocate_instruction): Likewise.
3505 (monitor_output): Likewise.
3506 * server.c (handle_search_memory): Likewise.
3507 (handle_qxfer_exec_file): Likewise.
3508 (handle_qxfer_libraries): Likewise.
3509 (handle_qxfer): Likewise.
3510 (handle_query): Likewise.
3511 (handle_v_cont): Likewise.
3512 (handle_v_run): Likewise.
3513 (captured_main): Likewise.
3514 * target.c (write_inferior_memory): Likewise.
3515 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3516 * tracepoint.c (init_trace_buffer): Likewise.
3517 (add_tracepoint_action): Likewise.
3518 (add_traceframe): Likewise.
3519 (add_traceframe_block): Likewise.
3520 (cmd_qtdpsrc): Likewise.
3521 (cmd_qtdv): Likewise.
3522 (cmd_qtstatus): Likewise.
3523 (response_source): Likewise.
3524 (response_tsv): Likewise.
3525 (cmd_qtnotes): Likewise.
3526 (gdb_collect): Likewise.
3527 (initialize_tracepoint): Likewise.
3528
afbe19f8
PL
35292015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3530
3531 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3532 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3533 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3534 <NOP>: New.
3535 (enum aarch64_condition_codes): New enum.
3536 (w0): New static global.
3537 (fp): Likewise.
3538 (lr): Likewise.
3539 (struct aarch64_memory_operand) <type>: New
3540 MEMORY_OPERAND_POSTINDEX type.
3541 (postindex_memory_operand): New helper function.
3542 (emit_ret): New function.
3543 (emit_load_store_pair): New function, factored out of emit_stp
3544 with support for MEMORY_OPERAND_POSTINDEX.
3545 (emit_stp): Rewrite using emit_load_store_pair.
3546 (emit_ldp): New function.
3547 (emit_load_store): Likewise.
3548 (emit_ldr): Mention post-index instruction in comment.
3549 (emit_ldrh): New function.
3550 (emit_ldrb): New function.
3551 (emit_ldrsw): Mention post-index instruction in comment.
3552 (emit_str): Likewise.
3553 (emit_subs): New function.
3554 (emit_cmp): Likewise.
3555 (emit_and): Likewise.
3556 (emit_orr): Likewise.
3557 (emit_orn): Likewise.
3558 (emit_eor): Likewise.
3559 (emit_mvn): Likewise.
3560 (emit_lslv): Likewise.
3561 (emit_lsrv): Likewise.
3562 (emit_asrv): Likewise.
3563 (emit_mul): Likewise.
3564 (emit_sbfm): Likewise.
3565 (emit_sbfx): Likewise.
3566 (emit_ubfm): Likewise.
3567 (emit_ubfx): Likewise.
3568 (emit_csinc): Likewise.
3569 (emit_cset): Likewise.
3570 (emit_nop): Likewise.
3571 (emit_ops_insns): New helper function.
3572 (emit_pop): Likewise.
3573 (emit_push): Likewise.
3574 (aarch64_emit_prologue): New function.
3575 (aarch64_emit_epilogue): Likewise.
3576 (aarch64_emit_add): Likewise.
3577 (aarch64_emit_sub): Likewise.
3578 (aarch64_emit_mul): Likewise.
3579 (aarch64_emit_lsh): Likewise.
3580 (aarch64_emit_rsh_signed): Likewise.
3581 (aarch64_emit_rsh_unsigned): Likewise.
3582 (aarch64_emit_ext): Likewise.
3583 (aarch64_emit_log_not): Likewise.
3584 (aarch64_emit_bit_and): Likewise.
3585 (aarch64_emit_bit_or): Likewise.
3586 (aarch64_emit_bit_xor): Likewise.
3587 (aarch64_emit_bit_not): Likewise.
3588 (aarch64_emit_equal): Likewise.
3589 (aarch64_emit_less_signed): Likewise.
3590 (aarch64_emit_less_unsigned): Likewise.
3591 (aarch64_emit_ref): Likewise.
3592 (aarch64_emit_if_goto): Likewise.
3593 (aarch64_emit_goto): Likewise.
3594 (aarch64_write_goto_address): Likewise.
3595 (aarch64_emit_const): Likewise.
3596 (aarch64_emit_call): Likewise.
3597 (aarch64_emit_reg): Likewise.
3598 (aarch64_emit_pop): Likewise.
3599 (aarch64_emit_stack_flush): Likewise.
3600 (aarch64_emit_zero_ext): Likewise.
3601 (aarch64_emit_swap): Likewise.
3602 (aarch64_emit_stack_adjust): Likewise.
3603 (aarch64_emit_int_call_1): Likewise.
3604 (aarch64_emit_void_call_2): Likewise.
3605 (aarch64_emit_eq_goto): Likewise.
3606 (aarch64_emit_ne_goto): Likewise.
3607 (aarch64_emit_lt_goto): Likewise.
3608 (aarch64_emit_le_goto): Likewise.
3609 (aarch64_emit_gt_goto): Likewise.
3610 (aarch64_emit_ge_got): Likewise.
3611 (aarch64_emit_ops_impl): New static global variable.
3612 (aarch64_emit_ops): New target function, return
3613 &aarch64_emit_ops_impl.
3614 (struct linux_target_ops): Install it.
3615
bb903df0
PL
36162015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3617
3618 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3619 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3620 aarch64-ipa.o.
3621 * linux-aarch64-ipa.c: New file.
3622 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3623 and endian.h.
3624 (aarch64_get_thread_area): New target method.
3625 (extract_signed_bitfield): New helper function.
3626 (aarch64_decode_ldr_literal): New function.
3627 (enum aarch64_opcodes): New enum.
3628 (struct aarch64_register): New struct.
3629 (struct aarch64_operand): New struct.
3630 (x0): New static global.
3631 (x1): Likewise.
3632 (x2): Likewise.
3633 (x3): Likewise.
3634 (x4): Likewise.
3635 (w2): Likewise.
3636 (ip0): Likewise.
3637 (sp): Likewise.
3638 (xzr): Likewise.
3639 (aarch64_register): New helper function.
3640 (register_operand): Likewise.
3641 (immediate_operand): Likewise.
3642 (struct aarch64_memory_operand): New struct.
3643 (offset_memory_operand): New helper function.
3644 (preindex_memory_operand): Likewise.
3645 (enum aarch64_system_control_registers): New enum.
3646 (ENCODE): New macro.
3647 (emit_insn): New helper function.
3648 (emit_b): New function.
3649 (emit_bcond): Likewise.
3650 (emit_cb): Likewise.
3651 (emit_tb): Likewise.
3652 (emit_blr): Likewise.
3653 (emit_stp): Likewise.
3654 (emit_ldp_q_offset): Likewise.
3655 (emit_stp_q_offset): Likewise.
3656 (emit_load_store): Likewise.
3657 (emit_ldr): Likewise.
3658 (emit_ldrsw): Likewise.
3659 (emit_str): Likewise.
3660 (emit_ldaxr): Likewise.
3661 (emit_stxr): Likewise.
3662 (emit_stlr): Likewise.
3663 (emit_data_processing_reg): Likewise.
3664 (emit_data_processing): Likewise.
3665 (emit_add): Likewise.
3666 (emit_sub): Likewise.
3667 (emit_mov): Likewise.
3668 (emit_movk): Likewise.
3669 (emit_mov_addr): Likewise.
3670 (emit_mrs): Likewise.
3671 (emit_msr): Likewise.
3672 (emit_sevl): Likewise.
3673 (emit_wfe): Likewise.
3674 (append_insns): Likewise.
3675 (can_encode_int32_in): New helper function.
3676 (aarch64_relocate_instruction): New function.
3677 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3678 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3679 (struct linux_target_ops): Install aarch64_get_thread_area,
3680 aarch64_install_fast_tracepoint_jump_pad and
3681 aarch64_get_min_fast_tracepoint_insn_len.
3682
787749ea
PL
36832015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3684
3685 * Makefile.in (aarch64-insn.o): New rule.
3686 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3687
9812b2e6
YQ
36882015-09-21 Yao Qi <yao.qi@linaro.org>
3689
3690 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3691
18fe412b
YQ
36922015-09-21 Yao Qi <yao.qi@linaro.org>
3693
3694 * tracepoint.c (max_jump_pad_size): Remove.
3695
a0cc84cd
YQ
36962015-09-18 Yao Qi <yao.qi@linaro.org>
3697
3698 * linux-aarch64-low.c: Don't include sys/uio.h.
3699 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3700
d78908cf
WW
37012015-09-16 Wei-cheng Wang <cole945@gmail.com>
3702
3703 * tracepoint.c (eval_result_type): Change prototype.
3704 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3705
d57e0d50
PA
37062015-09-15 Pedro Alves <palves@redhat.com>
3707
3708 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3709 Check whether to report exec events instead of checking whether
3710 multiprocess is enabled.
3711
5a676acc
PA
37122015-09-15 Pedro Alves <palves@redhat.com>
3713
3714 PR remote/18965
3715 * remote-utils.c (prepare_resume_reply): Merge
3716 TARGET_WAITKIND_VFORK_DONE switch case with the
3717 TARGET_WAITKIND_FORKED case.
3718
7c5d0fad
YQ
37192015-09-15 Yao Qi <yao.qi@linaro.org>
3720
3721 * server.c (handle_query): Check string comparison using
3722 "else if" instead of "if".
3723
750ce8d1
YQ
37242015-09-15 Yao Qi <yao.qi@linaro.org>
3725
3726 * server.c (vCont_supported): New global variable.
3727 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3728 matches. Append ";vContSupported+" to own_buf.
3729 (handle_v_requests): Append ";s;S" to own_buf if target supports
3730 hardware single step or vCont_supported is false.
3731 (capture_main): Set vCont_supported to zero.
3732
70b90b91
YQ
37332015-09-15 Yao Qi <yao.qi@linaro.org>
3734
3735 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3736 it to ...
3737 (linux_supports_hardware_single_step): ... New function.
3738 (linux_target_ops): Update.
3739 * lynx-low.c (lynx_target_ops): Set field
3740 supports_hardware_single_step to target_can_do_hardware_single_step.
3741 * nto-low.c (nto_target_ops): Likewise.
3742 * spu-low.c (spu_target_ops): Likewise.
3743 * win32-low.c (win32_target_ops): Likewise.
3744 * target.c (target_can_do_hardware_single_step): New function.
3745 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3746 Remove. <supports_hardware_single_step>: New field.
3747 (target_supports_conditional_breakpoints): Remove.
3748 (target_supports_hardware_single_step): New macro.
3749 (target_can_do_hardware_single_step): Declare.
3750 * server.c (handle_query): Use target_supports_hardware_single_step
3751 instead of target_supports_conditional_breakpoints.
3752
ade90bde
YQ
37532015-09-15 Yao Qi <yao.qi@linaro.org>
3754
3755 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3756 function.
3757 (struct linux_target_ops the_low_target): Install
3758 aarch64_linux_siginfo_fixup.
3759
94585166
DB
37602015-09-11 Don Breazeal <donb@codesourcery.com>
3761 Luis Machado <lgustavo@codesourcery.com>
3762
3763 * linux-low.c (linux_mourn): Static declaration.
3764 (linux_arch_setup): Move in front of
3765 handle_extended_wait.
3766 (linux_arch_setup_thread): New function.
3767 (handle_extended_wait): Handle exec events. Call
3768 linux_arch_setup_thread. Make event_lwp argument a
3769 pointer-to-a-pointer.
3770 (check_zombie_leaders): Do not check stopped threads.
3771 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3772 (linux_low_filter_event): Add lwp and thread for exec'ing
3773 non-leader thread if leader thread has been deleted.
3774 Refactor code into linux_arch_setup_thread and call it.
3775 Pass child lwp pointer by reference to handle_extended_wait.
3776 (linux_wait_for_event_filtered): Update comment.
3777 (linux_wait_1): Prevent clobbering exec event status.
3778 (linux_supports_exec_events): New function.
3779 (linux_target_ops) <supports_exec_events>: Initialize new member.
3780 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3781 new member.
3782 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3783 * server.c (report_exec_events): New global variable.
3784 (handle_query): Handle qSupported query for exec-events feature.
3785 (captured_main): Initialize report_exec_events.
3786 * server.h (report_exec_events): Declare new global variable.
3787 * target.h (struct target_ops) <supports_exec_events>: New
3788 member.
3789 (target_supports_exec_events): New macro.
3790 * win32-low.c (win32_target_ops) <supports_exec_events>:
3791 Initialize new member.
3792
0568462b
MM
37932015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3794
3795 * linux-low.c (linux_low_enable_btrace): Remove.
3796 (linux_target_ops): Replace linux_low_enable_btrace with
3797 linux_enable_btrace.
3798
39edd165
YQ
37992015-09-03 Yao Qi <yao.qi@linaro.org>
3800
3801 * linux-aarch64-low.c (aarch64_insert_point): Call
3802 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3803 returns true.
3804
1db33b5a
UW
38052015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3806
3807 * linux-low.c (check_stopped_by_breakpoint): Use
3808 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3809
ab290430
PA
38102015-08-27 Pedro Alves <palves@redhat.com>
3811
3812 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3813
8d749320
SM
38142015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3815
6711b7f8
SM
3816 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3817 the XNEW-family equivalent.
8d749320
SM
3818 (compile_bytecodes): Likewise.
3819 * dll.c (loaded_dll): Likewise.
3820 * event-loop.c (append_callback_event): Likewise.
3821 (create_file_handler): Likewise.
3822 (create_file_event): Likewise.
3823 * hostio.c (handle_open): Likewise.
3824 * inferiors.c (add_thread): Likewise.
3825 (add_process): Likewise.
3826 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3827 * linux-arm-low.c (arm_new_process): Likewise.
3828 (arm_new_thread): Likewise.
3829 * linux-low.c (add_to_pid_list): Likewise.
3830 (linux_add_process): Likewise.
3831 (handle_extended_wait): Likewise.
3832 (add_lwp): Likewise.
3833 (enqueue_one_deferred_signal): Likewise.
3834 (enqueue_pending_signal): Likewise.
3835 (linux_resume_one_lwp_throw): Likewise.
3836 (linux_resume_one_thread): Likewise.
3837 (linux_read_memory): Likewise.
3838 (linux_write_memory): Likewise.
3839 * linux-mips-low.c (mips_linux_new_process): Likewise.
3840 (mips_linux_new_thread): Likewise.
3841 (mips_add_watchpoint): Likewise.
3842 * linux-x86-low.c (initialize_low_arch): Likewise.
3843 * lynx-low.c (lynx_add_process): Likewise.
3844 * mem-break.c (set_raw_breakpoint_at): Likewise.
3845 (set_breakpoint): Likewise.
3846 (add_condition_to_breakpoint): Likewise.
3847 (add_commands_to_breakpoint): Likewise.
3848 (clone_agent_expr): Likewise.
3849 (clone_one_breakpoint): Likewise.
3850 * regcache.c (new_register_cache): Likewise.
3851 * remote-utils.c (look_up_one_symbol): Likewise.
3852 * server.c (queue_stop_reply): Likewise.
3853 (start_inferior): Likewise.
3854 (queue_stop_reply_callback): Likewise.
3855 (handle_target_event): Likewise.
3856 * spu-low.c (fetch_ppc_memory): Likewise.
3857 (store_ppc_memory): Likewise.
3858 * target.c (set_target_ops): Likewise.
3859 * thread-db.c (thread_db_load_search): Likewise.
3860 (try_thread_db_load_1): Likewise.
3861 * tracepoint.c (add_tracepoint): Likewise.
3862 (add_tracepoint_action): Likewise.
3863 (create_trace_state_variable): Likewise.
3864 (cmd_qtdpsrc): Likewise.
3865 (cmd_qtro): Likewise.
3866 (add_while_stepping_state): Likewise.
3867 * win32-low.c (child_add_thread): Likewise.
3868 (get_image_name): Likewise.
3869
ed8b7b42
YQ
38702015-08-25 Yao Qi <yao.qi@linaro.org>
3871
3872 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3873
db3cb7cb
YQ
38742015-08-25 Yao Qi <yao.qi@linaro.org>
3875
3876 * Makefile.in (aarch64-linux.o): New rule.
3877 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3878 srv_tgtobj.
3879 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3880 (aarch64_init_debug_reg_state): Make it extern.
3881 (aarch64_linux_prepare_to_resume): Remove.
3882
f6011a1c
YQ
38832015-08-25 Yao Qi <yao.qi@linaro.org>
3884
3885 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3886 lwp_arch_private_info and ptid_of_lwp.
3887
88e2cf7e
YQ
38882015-08-25 Yao Qi <yao.qi@linaro.org>
3889
3890 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3891 Find proc_info by find_process_pid. All callers updated.
3892
5e35436e
YQ
38932015-08-25 Yao Qi <yao.qi@linaro.org>
3894
3895 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3896 Remove.
3897 (debug_reg_change_callback): Remove.
3898 (aarch64_notify_debug_reg_change): Remove.
3899
4a8a7965
YQ
39002015-08-25 Yao Qi <yao.qi@linaro.org>
3901
3902 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3903 Call current_lwp_ptid.
3904
32a271ee
YQ
39052015-08-25 Yao Qi <yao.qi@linaro.org>
3906
3907 * linux-aarch64-low.c (debug_reg_change_callback): Use
3908 debug_printf.
3909
0d51c8d7
YQ
39102015-08-25 Yao Qi <yao.qi@linaro.org>
3911
3912 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3913
31a43dd5
YQ
39142015-08-25 Yao Qi <yao.qi@linaro.org>
3915
3916 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3917
8ee52567
YQ
39182015-08-25 Yao Qi <yao.qi@linaro.org>
3919
3920 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3921 the code.
3922
ff3f0f45
YQ
39232015-08-25 Yao Qi <yao.qi@linaro.org>
3924
3925 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3926 Remove.
3927 (debug_reg_change_callback): Remove argument entry and add argument
3928 lwp. Remove local variable thread. Don't print thread id in the
3929 debugging output. Don't check whether pid of thread equals to pid.
3930 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3931 iterate_over_lwps instead find_inferior.
3932
3d40fbb5
PA
39332015-08-24 Pedro Alves <palves@redhat.com>
3934
3935 * inferiors.c (get_first_process): New function.
3936 * inferiors.h (get_first_process): New declaration.
3937 * remote-utils.c (read_ptid): Default to the first process in the
3938 list, instead of to the current thread's process.
3939
438e1e42
PA
39402015-08-24 Pedro Alves <palves@redhat.com>
3941
3942 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3943 * event-loop.c: Likewise.
3944 * remote-utils.c: Likewise.
3945 * tracepoint.c: Likewise.
3946
a8c6d4fc
PA
39472015-08-24 Pedro Alves <palves@redhat.com>
3948
3949 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3950 ptid_get_lwp.
3951
99b0bb12
PA
39522015-08-21 Pedro Alves <palves@redhat.com>
3953
3954 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3955 instead of literal 1.
3956
f8904751
PA
39572015-08-21 Pedro Alves <palves@redhat.com>
3958
3959 * tdesc.c (default_description): Explicitly zero-initialize.
3960
465a859e
PA
39612015-08-21 Pedro Alves <palves@redhat.com>
3962
3963 PR gdb/18749
3964 * inferiors.c (remove_thread): Discard any pending stop reply for
3965 this thread.
3966 * server.c (remove_all_on_match_pid): Rename to ...
3967 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3968 instead of a pid.
3969 (discard_queued_stop_replies): Change parameter to a ptid. Now
3970 extern.
3971 (handle_v_kill, kill_inferior_callback, captured_main)
3972 (process_serial_event): Adjust.
3973 * server.h (discard_queued_stop_replies): Declare.
3974
f0db101d
PA
39752015-08-21 Pedro Alves <palves@redhat.com>
3976
3977 * linux-low.c (wait_for_sigstop): Always switch to no thread
3978 selected if the previously current thread dies.
3979 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3980 process instead of the current thread's.
3981 * remote-utils.c (input_interrupt): Don't check if there's no
3982 current thread.
3983 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3984 current thread to the general thread fails, error out.
3985 (handle_qxfer_auxv, handle_qxfer_libraries)
3986 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3987 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3988 (handle_query): Check if there's a thread selected instead of
3989 checking whether there's any thread in the thread list.
3990 (handle_qxfer_threads, handle_qxfer_btrace)
3991 (handle_qxfer_btrace_conf): Don't error out early if there's no
3992 thread in the thread list.
3993 (handle_v_cont, myresume): Don't set the current thread to the
3994 continue thread.
3995 (process_serial_event) <Hg handling>: Also set thread_id if the
3996 previous general thread is still alive.
3997 (process_serial_event) <g/G handling>: If setting the current
3998 thread to the general thread fails, error out.
3999 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4000 thread's lwp instead of the current thread's.
4001 * target.c (set_desired_thread): If the desired thread was not
4002 found, leave the current thread pointing to NULL. Return an int
4003 (boolean) indicating success.
4004 * target.h (set_desired_thread): Change return type to int.
4005
40045d91
MF
40062015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4007
4008 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4009 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4010 #includes.
4011 (ps_get_thread_area): New function.
4012
45face3b
GB
40132015-08-19 Gary Benson <gbenson@redhat.com>
4014
4015 * hostio.c (handle_pread): Do not attempt to read more data
4016 than hostio_reply_with_data can fit in a packet.
4017
16d5f642
JB
40182015-08-18 Joel Brobecker <brobecker@adacore.com>
4019
4020 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4021
a738da3a
MF
40222015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4023
4024 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4025
33ebda9d
PA
40262015-08-06 Pedro Alves <palves@redhat.com>
4027
4028 * tracepoint.c (expr_eval_result): Now an int.
4029
a44892be
PA
40302015-08-06 Pedro Alves <palves@redhat.com>
4031
4032 * gdbthread.h (struct regcache): Forward declare.
4033 (struct thread_info) <regcache_data>: Now a struct regcache
4034 pointer.
4035 * inferiors.c (inferior_regcache_data)
4036 (set_inferior_regcache_data): Now work with struct regcache
4037 pointers.
4038 * inferiors.h (struct regcache): Forward declare.
4039 (inferior_regcache_data, set_inferior_regcache_data): Now work
4040 with struct regcache pointers.
4041 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4042 (free_register_cache_thread): Remove struct regcache pointer
4043 casts.
4044
608a1e46
PA
40452015-08-06 Pedro Alves <palves@redhat.com>
4046
4047 * server.c (captured_main): On error, print the exception message
4048 to stderr, and if run_once is set, throw a quit.
4049
f0ce0d3a
PA
40502015-08-06 Pedro Alves <palves@redhat.com>
4051
4052 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4053 the current thread.
4054
bf47e248
PA
40552015-08-06 Pedro Alves <palves@redhat.com>
4056
4057 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4058 reading beyond the passed in buffer length.
4059
b6b9ffcc
PL
40602015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4061
4062 * tracepoint.c (symbol_list) <required>: Remove.
4063
863d01bd
PA
40642015-08-06 Pedro Alves <palves@redhat.com>
4065
4066 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4067 count if stopping and suspending threads.
4068 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4069 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4070 (linux_detach): Complete an ongoing step-over.
4071 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4072 throughout.
4073 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4074 (linux_wait_1): If passing a signal to the inferior after
4075 finishing a step-over, unsuspend and re-resume all lwps. If we
4076 see a single-step event but the thread should be continuing, don't
4077 pass the trap to gdb.
4078 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4079 internal_error instead of gdb_assert.
4080 (enqueue_pending_signal): New function.
4081 (check_ptrace_stopped_lwp_gone): Add debug output.
4082 (start_step_over): Use internal_error instead of gdb_assert.
4083 (complete_ongoing_step_over): New function.
4084 (linux_resume_one_thread): Don't resume a suspended thread.
4085 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4086 it stepping.
4087
00db26fa
PA
40882015-08-06 Pedro Alves <palves@redhat.com>
4089
4090 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4091 (linux_thread_alive): Use lwp_is_marked_dead.
4092 (extended_event_reported): Delete.
4093 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4094 instead of extended_event_reported.
4095 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4096 as well.
4097 (lwp_is_marked_dead): New function.
4098 (lwp_running): Use lwp_is_marked_dead.
4099 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4100 comment.
4101
ad071a30
PA
41022015-08-06 Pedro Alves <palves@redhat.com>
4103
4104 * linux-low.c (linux_wait_1): Move fork event output out of the
4105 !report_to_gdb check. Pass event_child->waitstatus to
4106 target_waitstatus_to_string instead of ourstatus.
4107
524b57e6
YQ
41082015-08-04 Yao Qi <yao.qi@linaro.org>
4109
4110 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4111 if current_thread is 32 bit.
4112
6085d6f6
YQ
41132015-08-04 Yao Qi <yao.qi@linaro.org>
4114
4115 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4116 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4117 * server.c (extended_protocol): Remove "static".
4118 * server.h (extended_protocol): Declare it.
4119
8a7e4587
YQ
41202015-08-04 Yao Qi <yao.qi@linaro.org>
4121
4122 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4123 both aarch64 and aarch32.
4124 (aarch64_set_pc): Likewise.
4125
3b53ae99
YQ
41262015-08-04 Yao Qi <yao.qi@linaro.org>
4127
4128 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4129 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4130 arm-with-neon.xml to srv_xmlfiles.
4131 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4132 (is_64bit_tdesc): New function.
4133 (aarch64_linux_read_description): New function.
4134 (aarch64_arch_setup): Call aarch64_linux_read_description.
4135 (regs_info): Rename to regs_info_aarch64.
4136 (aarch64_regs_info): Return right regs_info.
4137 (initialize_low_arch): Call initialize_low_arch_aarch32.
4138
bd9e6534
YQ
41392015-08-04 Yao Qi <yao.qi@linaro.org>
4140
4141 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4142 * linux-aarch32-low.c: New file.
4143 * linux-aarch32-low.h: New file.
4144 * linux-arm-low.c (arm_fill_gregset): Move it to
4145 linux-aarch32-low.c.
4146 (arm_store_gregset): Likewise.
4147 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4148 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4149 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4150 (regs_info): Rename to regs_info_arm.
4151 (arm_regs_info): Return regs_info_aarch32 if
4152 have_ptrace_getregset is 1 and target description is
4153 arm_with_neon or arm_with_vfpv3.
4154 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4155 Call initialize_low_arch_aarch32 instead.
4156
ded48a5e
YQ
41572015-08-04 Yao Qi <yao.qi@linaro.org>
4158
4159 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4160 * linux-low.c: ... here.
4161 * linux-low.h (have_ptrace_getregset): Declare it.
4162
96e9210f
PA
41632015-08-04 Pedro Alves <palves@redhat.com>
4164
4165 * thread-db.c (struct thread_db): Use new typedefs.
4166 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4167 CHK calls.
4168 (disable_thread_event_reporting): Cast result of dlsym to
4169 destination function pointer type.
4170 (thread_db_mourn): Use td_ta_delete_ftype.
4171
af60a1ef
SL
41722015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4173
4174 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4175 arch variant.
4176 (CDX_BREAKPOINT): Define for R2.
4177 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4178 (the_low_target): Add comments.
4179
e8b41681
YQ
41802015-07-30 Yao Qi <yao.qi@linaro.org>
4181
4182 * linux-arm-low.c (arm_hwcap): Remove it.
4183 (arm_read_description): New local variable arm_hwcap. Don't
4184 set arm_hwcap to zero.
4185
89abb039
YQ
41862015-07-30 Yao Qi <yao.qi@linaro.org>
4187
4188 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4189 Use regcache->tdesc instead.
4190 (arm_store_wmmxregset): Likewise.
4191 (arm_fill_vfpregset): Likewise.
4192 (arm_store_vfpregset): Likewise.
4193
deca266c
YQ
41942015-07-30 Yao Qi <yao.qi@linaro.org>
4195
4196 * linux-arm-low.c: Include arch/arm.h.
4197 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4198 (arm_store_gregset): Likewise.
4199
aa58a496
SM
42002015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4201
4202 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4203 ptrace's 4th parameter.
4204
50904b25
YQ
42052015-07-27 Yao Qi <yao.qi@linaro.org>
4206
4207 * configure.srv (case aarch64*-*-linux*): Don't set
4208 srv_linux_usrregs.
4209
5826e159
PA
42102015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4211
4212 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4213 sys/ptrace.h.
4214 * linux-arm-low.c: Likewise.
4215 * linux-cris-low.c: Likewise.
4216 * linux-crisv32-low.c: Likewise.
4217 * linux-low.c: Likewise.
4218 * linux-m68k-low.c: Likewise.
4219 * linux-mips-low.c: Likewise.
4220 * linux-nios2-low.c: Likewise.
4221 * linux-s390-low.c: Likewise.
4222 * linux-sparc-low.c: Likewise.
4223 * linux-tic6x-low.c: Likewise.
4224 * linux-tile-low.c: Likewise.
4225 * linux-x86-low.c: Likewise.
4226
54019719
PA
42272015-07-24 Pedro Alves <palves@redhat.com>
4228
4229 * config.in: Regenerate.
4230 * configure: Regenerate.
4231
eb7aa561
PA
42322015-07-24 Pedro Alves <palves@redhat.com>
4233
4234 * acinclude.m4: Include ../ptrace.m4.
4235 * configure.ac: Call GDB_AC_PTRACE.
4236 * config.in, configure: Regenerate.
4237
55d7b841
YQ
42382015-07-24 Yao Qi <yao.qi@linaro.org>
4239
4240 * linux-low.c (linux_create_inferior): Remove setting to
4241 proc->priv->new_inferior.
4242 (linux_attach): Likewise.
4243 (linux_low_filter_event): Likewise.
4244 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4245
c06cbd92
YQ
42462015-07-24 Yao Qi <yao.qi@linaro.org>
4247
4248 * linux-low.c (linux_arch_setup): New function.
4249 (linux_low_filter_event): If proc->tdesc is NULL and
4250 proc->attached is true, call the_low_target.arch_setup.
4251 Otherwise, keep status pending, and return.
4252 (linux_resume_one_lwp_throw): Don't call get_pc if
4253 thread->while_stepping isn't NULL. Don't call
4254 get_thread_regcache if proc->tdesc is NULL.
4255 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4256 (linux_target_ops): Install arch_setup.
4257 * server.c (start_inferior): Call the_target->arch_setup.
4258 * target.h (struct target_ops) <arch_setup>: New field.
4259 (target_arch_setup): New marco.
4260 * lynx-low.c (lynx_target_ops): Update.
4261 * nto-low.c (nto_target_ops): Update.
4262 * spu-low.c (spu_target_ops): Update.
4263 * win32-low.c (win32_target_ops): Update.
4264
5ae3ebba
YQ
42652015-07-24 Yao Qi <yao.qi@linaro.org>
4266
4267 * linux-low.c (linux_add_process): Don't set
4268 proc->priv->new_inferior.
4269 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4270 (linux_attach): Likewise.
4271
eb97750b
YQ
42722015-07-24 Yao Qi <yao.qi@linaro.org>
4273
4274 * server.c (start_inferior): Code refactor.
4275
51aee833
YQ
42762015-07-24 Yao Qi <yao.qi@linaro.org>
4277
4278 * server.c (process_serial_event): Set general_thread.
4279
af1b22f3
YQ
42802015-07-21 Yao Qi <yao.qi@linaro.org>
4281
4282 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4283 aarch64_linux_get_debug_reg_capacity.
4284
554717a3
YQ
42852015-07-17 Yao Qi <yao.qi@linaro.org>
4286
4287 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4288 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4289 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4290 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4291 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4292 (AARCH64_HWP_ALIGNMENT): Likewise.
4293 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4294 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4295 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4296 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4297 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4298 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4299 (struct aarch64_debug_reg_state): Likewise.
4300 (struct arch_lwp_info): Likewise.
4301 (aarch64_align_watchpoint): Likewise.
4302 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4303 (aarch64_watchpoint_length): Likewise.
4304 (aarch64_point_encode_ctrl_reg): Likewise
4305 (aarch64_point_is_aligned): Likewise.
4306 (aarch64_align_watchpoint): Likewise.
4307 (aarch64_linux_set_debug_regs):
4308 (aarch64_dr_state_insert_one_point): Likewise.
4309 (aarch64_dr_state_remove_one_point): Likewise.
4310 (aarch64_handle_breakpoint): Likewise.
4311 (aarch64_handle_aligned_watchpoint): Likewise.
4312 (aarch64_handle_unaligned_watchpoint): Likewise.
4313 (aarch64_handle_watchpoint): Likewise.
4314
c67ca4de
YQ
43152015-07-17 Yao Qi <yao.qi@linaro.org>
4316
4317 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4318 and don't aarch64_get_debug_reg_state. All callers update.
4319 (aarch64_handle_aligned_watchpoint): Likewise.
4320 (aarch64_handle_unaligned_watchpoint): Likewise.
4321 (aarch64_handle_watchpoint): Likewise.
4322 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4323 (aarch64_remove_point): Likewise.
4324
25abf979
YQ
43252015-07-17 Yao Qi <yao.qi@linaro.org>
4326
4327 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4328 debug_printf.
4329 (aarch64_handle_unaligned_watchpoint): Likewise.
4330
db1ff28b
JK
43312015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4332
4333 Revert the previous 3 commits:
4334 Move gdb_regex* to common/
4335 Move linux_find_memory_regions_full & co.
4336 gdbserver build-id attribute generator
4337
700ca40f
JK
43382015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4339 Jan Kratochvil <jan.kratochvil@redhat.com>
4340
4341 gdbserver build-id attribute generator.
4342 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4343 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4344 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4345 (find_phdr): New.
4346 (get_dynamic): Use find_pdhr to traverse program headers.
4347 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4348 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4349 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4350 (get_hex_build_id): New.
4351 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4352 to reply XML document.
4353
9904185c
JK
43542015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4355 Jan Kratochvil <jan.kratochvil@redhat.com>
4356
4357 * target.c: Include target/target-utils.h and fcntl.h.
4358 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4359 (target_fileio_read_stralloc): New functions.
4360
6e5b4429
JK
43612015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4362
4363 * Makefile.in (OBS): Add gdb_regex.o.
4364 (gdb_regex.o): New.
4365 * config.in: Rebuilt.
4366 * configure: Rebuilt.
4367
ddc98fbf
JK
43682015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4369 Jan Kratochvil <jan.kratochvil@redhat.com>
4370
4371 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4372 * Makefile.in (OBS): Add target-utils.o.
4373 (linux-maps.o, target-utils.o): New.
4374 * configure.srv (srv_linux_obj): Add linux-maps.o.
4375
e57bb7a0
PL
43762015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4377
4378 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4379 function, return 1.
4380 (the_low_target): Install it.
4381
586b02a9
PA
43822015-07-14 Pedro Alves <palves@redhat.com>
4383
4384 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4385 Instead, ignore ECHILD, and throw an error for other errnos.
4386
58c1b36c
PA
43872015-07-10 Pedro Alves <palves@redhat.com>
4388
4389 * event-loop.c (struct callback_event) <data>: Change type to
4390 gdb_client_data instance instead of gdb_client_data pointer.
4391 (append_callback_event): Adjust.
4392
421530db
PL
43932015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4394
4395 * linux-aarch64-low.c: Add comments for each linux_target_ops
4396 method. Remove comments already covered in target_ops and
4397 linux_target_ops definitions.
4398 (the_low_target): Add comments for each unimplemented method.
4399
c2d65f38
YQ
44002015-07-09 Yao Qi <yao.qi@linaro.org>
4401
4402 * linux-aarch64-low.c (aarch64_regmap): Remove.
4403 (aarch64_usrregs_info): Remove.
4404 (regs_info): Set field usrregs to NULL.
4405
b20a6524
MM
44062015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4407
4408 * linux-low.c: Include "rsp-low.h"
4409 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4410 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4411 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4412 (handle_btrace_enable_pt): New.
4413 (handle_btrace_general_set): Support "pt".
4414 (handle_btrace_conf_general_set): Support "pt:size".
4415
96c97461
PL
44162015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4417
4418 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4419 Z_PACKET_SW_BP.
4420
37d66942
PL
44212015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4422
4423 * linux-aarch64-low.c: Remove comment about endianness.
4424 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4425 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4426 memcmp.
4427
dc06243f
GB
44282015-06-24 Gary Benson <gbenson@redhat.com>
4429
4430 * linux-i386-ipa.c (stdint.h): Do not include.
4431 * lynx-i386-low.c (stdint.h): Likewise.
4432 * lynx-ppc-low.c (stdint.h): Likewise.
4433 * mem-break.c (stdint.h): Likewise.
4434 * thread-db.c (stdint.h): Likewise.
4435 * tracepoint.c (stdint.h): Likewise.
4436 * win32-low.c (stdint.h): Likewise.
4437
124e13d9
SM
44382015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4439
4440 * server.c (write_qxfer_response): Update call to
4441 remote_escape_output.
4442
909c2cda
JK
44432015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4444 Jan Kratochvil <jan.kratochvil@redhat.com>
4445
4446 Merge multiple hex conversions.
4447 * gdbreplay.c (tohex): Rename to 'fromhex'.
4448 (logchar): Use fromhex.
4449
24c05f46
JK
44502015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4451
4452 * server.c (handle_qxfer_libraries): Set `version' attribute for
4453 <library-list>.
4454
14d2069a
GB
44552015-06-10 Gary Benson <gbenson@redhat.com>
4456
4457 * target.h (struct target_ops) <multifs_open>: New field.
4458 <multifs_unlink>: Likewise.
4459 <multifs_readlink>: Likewise.
4460 * linux-low.c (nat/linux-namespaces.h): New include.
4461 (linux_target_ops): Initialize the_target->multifs_open,
4462 the_target->multifs_unlink and the_target->multifs_readlink.
4463 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4464 * hostio.c (hostio_fs_pid): New static variable.
4465 (hostio_handle_new_gdb_connection): New function.
4466 (handle_setfs): Likewise.
4467 (handle_open): Use the_target->multifs_open as appropriate.
4468 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4469 (handle_readlink): Use the_target->multifs_readlink as
4470 appropriate.
4471 (handle_vFile): Handle vFile:setfs packets.
4472 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4473 after target_handle_new_gdb_connection.
4474
4b8b5e72
GB
44752015-06-10 Gary Benson <gbenson@redhat.com>
4476
4477 * configure.ac (AC_CHECK_FUNCS): Add setns.
4478 * config.in: Regenerate.
4479 * configure: Likewise.
4480 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4481 (linux-namespaces.o): New rule.
4482 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4483
3ac2e371
GB
44842015-06-09 Gary Benson <gbenson@redhat.com>
4485
4486 * hostio.c (handle_open): Process mode argument with
4487 fileio_to_host_mode.
4488
ca9b78ce
YQ
44892015-06-01 Yao Qi <yao.qi@linaro.org>
4490
4491 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4492 * linux-x86-low.c: Likewise.
4493
bfacd19d
DB
44942015-05-28 Don Breazeal <donb@codesourcery.com>
4495
4496 * linux-low.c (handle_extended_wait): Initialize
4497 thread_info.last_resume_kind for new fork children.
4498
452003ef
PA
44992015-05-15 Pedro Alves <palves@redhat.com>
4500
4501 * target.h (target_handle_new_gdb_connection): Rewrite using if
4502 wrapped in do/while.
4503
1041a03c
JB
45042015-05-14 Joel Brobecker <brobecker@adacore.com>
4505
4506 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4507 * configure, config.in: Regenerate.
4508 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4509 Declare typedef.
4510
c269dbdb
DB
45112015-05-12 Don Breazeal <donb@codesourcery.com>
4512
4513 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4514 PTRACE_EVENT_VFORK_DONE.
4515 (linux_low_ptrace_options, extended_event_reported): Add vfork
4516 events.
4517 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4518 and "vforkdone" for RSP 'T' Stop Reply Packet.
4519 * server.h (report_vfork_events): Declare
4520 global variable.
4521
3a8a0396
DB
45222015-05-12 Don Breazeal <donb@codesourcery.com>
4523
4524 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4525 (the_low_target) <new_fork>: Initialize new member.
4526 * linux-arm-low.c (arm_new_fork): New function.
4527 (the_low_target) <new_fork>: Initialize new member.
4528 * linux-low.c (handle_extended_wait): Call new target function
4529 new_fork.
4530 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4531 * linux-mips-low.c (mips_add_watchpoint): New function
4532 extracted from mips_insert_point.
4533 (the_low_target) <new_fork>: Initialize new member.
4534 (mips_linux_new_fork): New function.
4535 (mips_insert_point): Call mips_add_watchpoint.
4536 * linux-x86-low.c (x86_linux_new_fork): New function.
4537 (the_low_target) <new_fork>: Initialize new member.
4538
de0d863e
DB
45392015-05-12 Don Breazeal <donb@codesourcery.com>
4540
4541 * linux-low.c (handle_extended_wait): Implement return value,
4542 rename argument 'event_child' to 'event_lwp', handle
4543 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4544 (linux_low_ptrace_options): New function.
4545 (linux_low_filter_event): Call linux_low_ptrace_options,
4546 use different argument fo linux_enable_event_reporting,
4547 use return value from handle_extended_wait.
4548 (extended_event_reported): New function.
4549 (linux_wait_1): Call extended_event_reported and set
4550 status to report fork events.
4551 (linux_write_memory): Add pid to debug message.
4552 (reset_lwp_ptrace_options_callback): New function.
4553 (linux_handle_new_gdb_connection): New function.
4554 (linux_target_ops): Initialize new structure member.
4555 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4556 * lynx-low.c: Initialize new structure member.
4557 * remote-utils.c (prepare_resume_reply): Implement stop reason
4558 "fork" for "T" stop message.
4559 * server.c (handle_query): Call handle_new_gdb_connection.
4560 * server.h (report_fork_events): Declare global flag.
4561 * target.h (struct target_ops) <handle_new_gdb_connection>:
4562 New member.
4563 (target_handle_new_gdb_connection): New macro.
4564 * win32-low.c: Initialize new structure member.
4565
ddcbc397
DB
45662015-05-12 Don Breazeal <donb@codesourcery.com>
4567
4568 * mem-break.c (APPEND_TO_LIST): Define macro.
4569 (clone_agent_expr): New function.
4570 (clone_one_breakpoint): New function.
4571 (clone_all_breakpoints): New function.
4572 * mem-break.h: Declare new functions.
4573
89245bc0
DB
45742015-05-12 Don Breazeal <donb@codesourcery.com>
4575
4576 * linux-low.c (linux_supports_fork_events): New function.
4577 (linux_supports_vfork_events): New function.
4578 (linux_target_ops): Initialize new structure members.
4579 (initialize_low): Call linux_check_ptrace_features.
4580 * lynx-low.c (lynx_target_ops): Initialize new structure
4581 members.
4582 * server.c (report_fork_events, report_vfork_events):
4583 New global flags.
4584 (handle_query): Add new features to qSupported packet and
4585 response.
4586 (captured_main): Initialize new global variables.
4587 * target.h (struct target_ops) <supports_fork_events>:
4588 New member.
4589 <supports_vfork_events>: New member.
4590 (target_supports_fork_events): New macro.
4591 (target_supports_vfork_events): New macro.
4592 * win32-low.c (win32_target_ops): Initialize new structure
4593 members.
4594
835205d0
GB
45952015-05-12 Gary Benson <gbenson@redhat.com>
4596
4597 * server.c (handle_qxfer_exec_file): Use current process
4598 if annex is empty.
4599
21e94bd9
SL
46002015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4601
4602 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4603 Remove HAVE_PTRACE_GETREGS conditionals.
4604 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4605 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4606
45614f15
YQ
46072015-05-08 Yao Qi <yao.qi@linaro.org>
4608
4609 * linux-low.c (linux_supports_conditional_breakpoints): New
4610 function.
4611 (linux_target_ops): Install new target method.
4612 * lynx-low.c (lynx_target_ops): Install NULL hook for
4613 supports_conditional_breakpoints.
4614 * nto-low.c (nto_target_ops): Likewise.
4615 * spu-low.c (spu_target_ops): Likewise.
4616 * win32-low.c (win32_target_ops): Likewise.
4617 * server.c (handle_query): Check
4618 target_supports_conditional_breakpoints.
4619 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4620 New field.
4621 (target_supports_conditional_breakpoints): New macro.
4622
80ad801e
PA
46232015-05-06 Pedro Alves <palves@redhat.com>
4624
4625 PR server/18081
4626 * server.c (start_inferior): If the process exits, mourn it.
4627
819843c7
GB
46282015-04-21 Gary Benson <gbenson@redhat.com>
4629
4630 * hostio.c (fileio_open_flags_to_host): Factored out to
4631 fileio_to_host_openflags in common/fileio.c. Single use
4632 updated.
4633
a2d5a9d7
MF
46342015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4635
4636 * linux-xtensa-low.c (xtensa_fill_gregset)
4637 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4638 XCHAL_HAVE_LOOP.
4639
deb44829
MF
46402015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4641
4642 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4643 (regs_info): Replace usrregs pointer with NULL.
4644
e57f1de3
GB
46452015-04-17 Gary Benson <gbenson@redhat.com>
4646
4647 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4648 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4649 * server.c (handle_qxfer_exec_file): New function.
4650 (qxfer_packets): Add exec-file entry.
4651 (handle_query): Report qXfer:exec-file:read as supported packet.
4652
62828379
RN
46532015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4654
4655 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4656
b88bb450
GB
46572015-04-09 Gary Benson <gbenson@redhat.com>
4658
4659 * hostio-errno.c (errno_to_fileio_error): Remove function.
4660 Update caller to use remote_fileio_to_fio_error.
4661
c8f4bfdd
YQ
46622015-04-09 Yao Qi <yao.qi@linaro.org>
4663
4664 * linux-low.c (linux_insert_point): Call
4665 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4666 (linux_remove_point): Call remove_memory_breakpoint if type is
4667 raw_bkpt_type_sw.
4668 * linux-x86-low.c (x86_insert_point): Don't call
4669 insert_memory_breakpoint.
4670 (x86_remove_point): Don't call remove_memory_breakpoint.
4671
41f98f02
PA
46722015-04-01 Pedro Alves <palves@redhat.com>
4673 Cleber Rosa <crosa@redhat.com>
4674
4675 * server.c (gdbserver_usage): Reorganize and extend the usage
4676 message.
4677
2bf6fb9d
PA
46782015-03-24 Pedro Alves <palves@redhat.com>
4679
4680 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4681 output. Also dump TRAP_TRACE.
4682 (linux_low_filter_event): In debug output, distinguish a
4683 resume_stop SIGSTOP from a delayed SIGSTOP.
4684
369f6daa
GB
46852015-03-24 Gary Benson <gbenson@redhat.com>
4686
4687 * linux-x86-low.c (x86_linux_new_thread): Moved to
4688 nat/x86-linux.c.
4689 (x86_linux_prepare_to_resume): Likewise.
4690
8e5d4070
GB
46912015-03-24 Gary Benson <gbenson@redhat.com>
4692
4693 * Makefile.in (x86-linux-dregs.o): New rule.
4694 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4695 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4696 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4697 (x86_linux_dr_get): Likewise.
4698 (x86_linux_dr_set): Likewise.
4699 (update_debug_registers_callback): Likewise.
4700 (x86_linux_dr_set_addr): Likewise.
4701 (x86_linux_dr_get_addr): Likewise.
4702 (x86_linux_dr_set_control): Likewise.
4703 (x86_linux_dr_get_control): Likewise.
4704 (x86_linux_dr_get_status): Likewise.
4705 (x86_linux_update_debug_registers): Likewise.
4706
2b95d440
GB
47072015-03-24 Gary Benson <gbenson@redhat.com>
4708
4709 * linux-x86-low.c (x86_linux_update_debug_registers):
4710 New function, factored out from...
4711 (x86_linux_prepare_to_resume): ...this.
4712
14b0bc68
GB
47132015-03-24 Gary Benson <gbenson@redhat.com>
4714
4715 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4716 (x86_linux_dr_set): Likewise.
4717 (update_debug_registers_callback): Likewise.
4718 (x86_linux_dr_set_addr): Likewise.
4719 (x86_linux_dr_get_addr): Likewise.
4720 (x86_linux_dr_set_control): Likewise.
4721 (x86_linux_dr_get_control): Likewise.
4722 (x86_linux_dr_get_status): Likewise.
4723 (x86_linux_prepare_to_resume): Likewise.
4724
5dfe6ca8
GB
47252015-03-24 Gary Benson <gbenson@redhat.com>
4726
4727 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4728 Use perror_with_name. Pass string through gettext.
4729 (x86_linux_dr_set): Likewise.
4730
d33472ad
GB
47312015-03-24 Gary Benson <gbenson@redhat.com>
4732
4733 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4734 (x86_linux_dr_set_addr): ...this.
4735 (x86_dr_low_get_addr): Rename to...
4736 (x86_linux_dr_get_addr): ...this.
4737 (x86_dr_low_set_control): Rename to...
4738 (x86_linux_dr_set_control): ...this.
4739 (x86_dr_low_get_control): Rename to...
4740 (x86_linux_dr_get_control): ...this.
4741 (x86_dr_low_get_status): Rename to...
4742 (x86_linux_dr_get_status): ...this.
4743 (x86_dr_low): Update with new function names.
4744
4b134ca1
GB
47452015-03-24 Gary Benson <gbenson@redhat.com>
4746
4747 * Makefile.in (x86-linux.o): New rule.
4748 * configure.srv: Add x86-linux.o to relevant targets.
4749 * linux-low.c (lwp_set_arch_private_info): New function.
4750 (lwp_arch_private_info): Likewise.
4751 * linux-x86-low.c: Include nat/x86-linux.h.
4752 (arch_lwp_info): Removed structure.
4753 (update_debug_registers_callback):
4754 Use lwp_set_debug_registers_changed.
4755 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4756 and lwp_set_debug_registers_changed.
4757 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4758
34c703da
GB
47592015-03-24 Gary Benson <gbenson@redhat.com>
4760
4761 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4762 * linux-arm-low.c (arm_new_thread): Likewise.
4763 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4764 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4765 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4766 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4767
cff068da
GB
47682015-03-24 Gary Benson <gbenson@redhat.com>
4769
4770 * linux-low.c (ptid_of_lwp): New function.
4771 (lwp_is_stopped): Likewise.
4772 (lwp_stop_reason): Likewise.
4773 * linux-x86-low.c (update_debug_registers_callback):
4774 Use lwp_is_stopped.
4775 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4776 lwp_stop_reason.
4777
b2f7c7e8
GB
47782015-03-24 Gary Benson <gbenson@redhat.com>
4779
4780 * linux-low.h (linux_stop_lwp): Remove declaration.
4781
6d4ee8c6
GB
47822015-03-24 Gary Benson <gbenson@redhat.com>
4783
4784 * linux-low.h: Include nat/linux-nat.h.
4785 * linux-low.c (iterate_over_lwps_args): New structure.
4786 (iterate_over_lwps_filter): New function.
4787 (iterate_over_lwps): Likewise.
4788 * linux-x86-low.c (update_debug_registers_callback):
4789 Update signature to what iterate_over_lwps expects.
4790 Remove PID check that iterate_over_lwps now performs.
4791 (x86_dr_low_set_addr): Use iterate_over_lwps.
4792 (x86_dr_low_set_control): Likewise.
4793
70a0bb6b
GB
47942015-03-24 Gary Benson <gbenson@redhat.com>
4795
4796 * linux-x86-low.c (x86_debug_reg_state): New function.
4797 (x86_linux_prepare_to_resume): Use the above.
4798
7b669087
GB
47992015-03-24 Gary Benson <gbenson@redhat.com>
4800
4801 * linux-low.c (current_lwp_ptid): New function.
4802 * linux-x86-low.c: Include nat/linux-nat.h.
4803 (x86_dr_low_get_addr): Use current_lwp_ptid.
4804 (x86_dr_low_get_control): Likewise.
4805 (x86_dr_low_get_status): Likewise.
4806
eef49a3d
PA
48072015-03-20 Pedro Alves <palves@redhat.com>
4808
4809 * tracepoint.c (cmd_qtstatus): Make "str" const.
4810
b2333d22
PA
48112015-03-20 Pedro Alves <palves@redhat.com>
4812
4813 * server.c (handle_general_set): Make "req_str" const.
4814
23f238d3
PA
48152015-03-19 Pedro Alves <palves@redhat.com>
4816
4817 * linux-low.c (linux_resume_one_lwp): Rename to ...
4818 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4819 instead call perror_with_name.
4820 (check_ptrace_stopped_lwp_gone): New function.
4821 (linux_resume_one_lwp): Reimplement as wrapper around
4822 linux_resume_one_lwp_throw that swallows errors if the LWP is
4823 gone.
4824
91baf43f
PA
48252015-03-19 Pedro Alves <palves@redhat.com>
4826
4827 * linux-low.c (count_events_callback, select_event_lwp_callback):
4828 No longer check whether the thread has resume_stop as last resume
4829 kind.
4830
8bf3b159
PA
48312015-03-19 Pedro Alves <palves@redhat.com>
4832
4833 * linux-low.c (count_events_callback, select_event_lwp_callback):
4834 Use the lwp's status_pending_p field, not the thread's.
4835
b90fc188
PA
48362015-03-19 Pedro Alves <palves@redhat.com>
4837
4838 * linux-low.c (select_event_lwp_callback): Update comments to
4839 no longer mention SIGTRAP.
4840
464b0089
GB
48412015-03-18 Gary Benson <gbenson@redhat.com>
4842
4843 * server.c (handle_query): Do not report vFile:fstat as supported.
4844
aa9e327f
GB
48452015-03-11 Gary Benson <gbenson@redhat.com>
4846
4847 * hostio.c (sys/types.h): New include.
4848 (sys/stat.h): Likewise.
4849 (common-remote-fileio.h): Likewise.
4850 (handle_fstat): New function.
4851 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 4852
791c0056
GB
48532015-03-11 Gary Benson <gbenson@redhat.com>
4854
4855 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4856 struct stat.st_blocks and struct stat.st_blksize.
4857 * configure: Regenerate.
4858 * config.in: Likewise.
4859 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4860 (OBS): Add common-remote-fileio.o.
4861 (common-remote-fileio.o): New rule.
4862
9a9df970
PA
48632015-03-09 Pedro Alves <palves@redhat.com>
4864
4865 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4866 'struct sockaddr' pointer in 'accept' call.
4867
9eb1356e
PA
48682015-03-09 Pedro Alves <palves@redhat.com>
4869
4870 Revert:
4871 2015-03-07 Pedro Alves <palves@redhat.com>
4872 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4873 or <winsock2.h> here. Instead include "gdb_socket.h".
4874 (remote_open): Use union gdb_sockaddr_u.
4875 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4876 or <winsock2.h> here. Instead include "gdb_socket.h".
4877 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4878 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4879 or <sys/un.h>.
4880 (init_named_socket, gdb_agent_helper_thread): Use union
4881 gdb_sockaddr_u.
4882
aac331e4
PA
48832015-03-07 Pedro Alves <palves@redhat.com>
4884
4885 * configure.ac (build_warnings): Move
4886 -Wdeclaration-after-statement to the C-specific set.
4887 * configure: Regenerate.
4888
366c75fc
PA
48892015-03-07 Pedro Alves <palves@redhat.com>
4890
4891 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4892 or <winsock2.h> here. Instead include "gdb_socket.h".
4893 (remote_open): Use union gdb_sockaddr_u.
4894 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4895 or <winsock2.h> here. Instead include "gdb_socket.h".
4896 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4897 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4898 or <sys/un.h>.
4899 (init_named_socket, gdb_agent_helper_thread): Use union
4900 gdb_sockaddr_u.
4901
492d29ea
PA
49022015-03-07 Pedro Alves <palves@redhat.com>
4903
4904 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4905 instead.
4906
60a191ed
YQ
49072015-03-06 Yao Qi <yao.qi@linaro.org>
4908
4909 * linux-aarch64-low.c (aarch64_insert_point): Use
4910 show_debug_regs as a boolean.
4911 (aarch64_remove_point): Likewise.
4912
f5771b1d
PA
49132015-03-05 Pedro Alves <palves@redhat.com>
4914
4915 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4916 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4917 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4918 * nto-low.c (nto_target_ops): Likewise.
4919 * spu-low.c (spu_target_ops): Likewise.
4920 * win32-low.c (win32_target_ops): Likewise.
4921
3e572f71
PA
49222015-03-04 Pedro Alves <palves@redhat.com>
4923
72f4393d 4924 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
4925 Decide whether a breakpoint triggered based on the SIGTRAP's
4926 siginfo.si_code.
72f4393d
L
4927 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4928 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
4929 (linux_low_filter_event): Check for breakpoints before checking
4930 watchpoints.
4931 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4932 siginfo.si_code.
72f4393d
L
4933 (linux_stopped_by_sw_breakpoint)
4934 (linux_supports_stopped_by_sw_breakpoint)
4935 (linux_stopped_by_hw_breakpoint)
4936 (linux_supports_stopped_by_hw_breakpoint): New functions.
4937 (linux_target_ops): Install new target methods.
3e572f71 4938
1ec68e26
PA
49392015-03-04 Pedro Alves <palves@redhat.com>
4940
4941 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4942 * server.c (swbreak_feature, hwbreak_feature): New globals.
4943 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4944 (captured_main): Clear swbreak_feature and hwbreak_feature.
4945 * server.h (swbreak_feature, hwbreak_feature): Declare.
4946 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4947 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4948 supports_stopped_by_hw_breakpoint>: New fields.
4949 (target_supports_stopped_by_sw_breakpoint)
4950 (target_stopped_by_sw_breakpoint)
4951 (target_supports_stopped_by_hw_breakpoint)
4952 (target_stopped_by_hw_breakpoint): Declare.
4953
15c66dd6
PA
49542015-03-04 Pedro Alves <palves@redhat.com>
4955
4956 enum lwp_stop_reason -> enum target_stop_reason
4957 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4958 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4959 (linux_wait_1, stuck_in_jump_pad_callback)
4960 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4961 (linux_stopped_by_watchpoint):
4962 * linux-low.h (enum lwp_stop_reason): Delete.
4963 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4964 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4965
98fc70d6
YQ
49662015-03-04 Yao Qi <yao.qi@linaro.org>
4967
4968 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4969
dd2ac174
GB
49702015-03-03 Gary Benson <gbenson@redhat.com>
4971
4972 * hostio.c (handle_vFile): Fix prefix lengths.
4973
d68e53f4
MM
49742015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4975
4976 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4977 ptr_bits.
4978
bf2d68ab
AA
49792015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4980
4981 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4982 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4983 (clean): Add "rm -f" for above C files.
4984 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4985 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4986 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4987 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4988 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4989 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4990 (init_registers_s390x_vx_linux64)
4991 (init_registers_s390x_tevx_linux64)
4992 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4993 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4994 declarations.
4995 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4996 (s390_store_vxrs_high): New functions.
4997 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4998 NT_S390_VXRS_HIGH.
4999 (s390_arch_setup): Add logic for selecting one of the new target
5000 descriptions. Activate the new vector regsets if applicable.
5001 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5002 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5003 and init_registers_s390x_tevx_linux64.
5004
c966a859
PA
50052015-03-01 Pedro Alves <palves@redhat.com>
5006
5007 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5008 parameter.
5009
4180215b
PA
50102015-02-27 Pedro Alves <palves@redhat.com>
5011
5012 * linux-x86-low.c (u_debugreg_offset): New function.
5013 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5014
749bab01
PA
50152015-02-27 Pedro Alves <palves@redhat.com>
5016
5017 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5018 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5019 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5020 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5021 (ps_lsetfpregs, ps_getpid)
5022 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5023 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5024 (ps_lsetxregs, ps_plog): Declare.
5025
3c14e5a3
PA
50262015-02-27 Pedro Alves <palves@redhat.com>
5027
5028 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5029 IP_AGENT_EXPORT_FUNC.
5030 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5031 IP_AGENT_EXPORT_FUNC.
5032 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5033 (IP_AGENT_EXPORT): Delete.
5034 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5035 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5036 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5037 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5038 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5039 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5040 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5041 (traceframe_read_count, traceframe_write_count)
5042 (traceframes_created, trace_state_variables, get_raw_reg)
5043 (get_trace_state_variable_value, set_trace_state_variable_value)
5044 (ust_loaded, helper_thread_id, cmd_buf): Use
5045 IPA_SYM_EXPORTED_NAME.
5046 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5047 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5048 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5049 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5050 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5051 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5052 EXTERN_C_PUSH/EXTERN_C_POP.
5053 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5054 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5055 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5056 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5057 (traceframe_write_count, traceframe_read_count)
5058 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5059 (about_to_request_buffer_space, get_trace_state_variable_value)
5060 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5061 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5062 EXTERN_C_PUSH/EXTERN_C_POP.
5063 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5064 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5065 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5066 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5067 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5068 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5069 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5070 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5071 Define.
5072 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5073 (IP_AGENT_EXPORT_VAR_DECL): Define.
5074 (tracing): Declare.
5075 (gdb_agent_get_raw_reg): Declare.
5076
fe978cb0
PA
50772015-02-27 Tom Tromey <tromey@redhat.com>
5078 Pedro Alves <palves@redhat.com>
5079
5080 Rename symbols whose names are reserved C++ keywords throughout.
5081
3bc3d82a
PA
50822015-02-27 Pedro Alves <palves@redhat.com>
5083
5084 * Makefile.in (COMPILER): New, get it from autoconf.
5085 (CXX): Get from autoconf instead.
5086 (COMPILE.pre): Use COMPILER.
5087 (CC-LD): Rename to ...
5088 (CC_LD): ... this. Use COMPILER.
5089 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5090 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5091 * acinclude.m4: Include build-with-cxx.m4.
5092 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5093 Disable -Werror by default if building in C++ mode.
5094 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5095 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5096 the C++ compiler. Save/restore CXXFLAGS too.
5097 * configure: Regenerate.
5098
07697489
PA
50992015-02-27 Pedro Alves <palves@redhat.com>
5100
5101 * acinclude.m4: Include libiberty.m4.
5102 * configure.ac: Call libiberty_INIT.
5103 * config.in, configure: Regenerate.
5104
9beb7c4e
PA
51052015-02-26 Pedro Alves <palves@redhat.com>
5106
5107 * linux-low.c (linux_wait_1): When incrementing the PC past a
5108 program breakpoint always use the_low_target.breakpoint_len as
5109 increment, rather than the maximum between that and
5110 the_low_target.decr_pc_after_break.
5111
8090aef2
PA
51122015-02-23 Pedro Alves <palves@redhat.com>
5113
5114 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5115 thread was doing a step-over; always adjust the PC if
5116 we stepped over a permanent breakpoint.
5117 (linux_wait_1): If we stepped over breakpoint that was on top of a
5118 permanent breakpoint, manually advance the PC past it.
5119
bc9540e8
PA
51202015-02-23 Pedro Alves <palves@redhat.com>
5121
5122 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5123 modes.
5124 (x86_fill_gregset, x86_store_gregset): Use it when handling
5125 $orig_eax.
5126
2db9a427
PA
51272015-02-20 Pedro Alves <palves@redhat.com>
5128
5129 * thread-db.c: Include "nat/linux-procfs.h".
5130 (thread_db_init): Skip listing new threads if the kernel supports
5131 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5132
afa8d396
PA
51332015-02-20 Pedro Alves <palves@redhat.com>
5134
5135 * linux-low.c (status_pending_p_callback): Use ptid_match.
5136
c9587f88
AT
51372015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5138
5139 PR breakpoints/16812
5140 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5141 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5142 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5143
b05ec7a5
AT
51442015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5145
5146 PR breakpoints/15956
5147 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5148
d33501a5
MM
51492015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5150
5151 * linux-low.c (linux_low_btrace_conf): Print size.
5152 * server.c (handle_btrace_conf_general_set): New.
5153 (hanle_general_set): Call handle_btrace_conf_general_set.
5154 (handle_query): Report Qbtrace-conf:bts:size as supported.
5155
f4abbc16
MM
51562015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5157
5158 * linux-low.c (linux_low_enable_btrace): Update parameters.
5159 (linux_low_btrace_conf): New.
5160 (linux_target_ops)<to_btrace_conf>: Initialize.
5161 * server.c (current_btrace_conf): New.
5162 (handle_btrace_enable): Rename to ...
5163 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5164 to target_enable_btrace. Update comment. Update users.
5165 (handle_qxfer_btrace_conf): New.
5166 (qxfer_packets): Add btrace-conf entry.
5167 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5168 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5169 (target_ops)<read_btrace_conf>: New.
5170 (target_enable_btrace): Update parameters.
5171 (target_read_btrace_conf): New.
5172
043c3577
MM
51732015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5174
5175 * server.c (handle_btrace_general_set): Remove call to
5176 target_supports_btrace.
5177 (supported_btrace_packets): New.
5178 (handle_query): Call supported_btrace_packets.
5179 * target.h: include btrace-common.h.
5180 (btrace_target_info): Removed.
5181 (supports_btrace, target_supports_btrace): Update parameters.
5182
734b0e4b
MM
51832015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5184
5185 * Makefile.in (SFILES): Add common/btrace-common.c.
5186 (OBS): Add common/btrace-common.o.
5187 (btrace-common.o): Add build rules.
5188 * linux-low: Include btrace-common.h.
5189 (linux_low_read_btrace): Use struct btrace_data. Call
5190 btrace_data_init and btrace_data_fini.
5191
d6c146e9
PA
51922015-02-06 Pedro Alves <palves@redhat.com>
5193
5194 * thread-db.c (find_new_threads_callback): Add debug output.
5195
20ba1ce6
PA
51962015-02-04 Pedro Alves <palves@redhat.com>
5197
5198 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5199 (resume_stopped_resumed_lwps): New function.
5200 (linux_wait_for_event_filtered): Use it.
5201
8cc73a39
SDJ
52022015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5203
5204 * Makefile.in (SFILES): Add linux-personality.c.
5205 (linux-personality.o): New rule.
5206 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5207 list of objects to be built.
5208 * linux-low.c: Include nat/linux-personality.h.
5209 (linux_create_inferior): Remove code to disable address space
5210 randomization (moved to ../nat/linux-personality.c). Create
5211 cleanup to disable address space randomization.
5212
fb23d554
SDJ
52132015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5214
5215 * Makefile.in (posix-strerror.o): New rule.
5216 (mingw-strerror.o): Likewise.
5217 * configure: Regenerated.
5218 * configure.ac: Source file ../common/common.host. Initialize new
5219 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5220
cdf43629
YQ
52212015-01-14 Yao Qi <yao@codesourcery.com>
5222
5223 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5224 (ppc-linux.o): New rule.
5225 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5226 * configure.ac: AC_CHECK_FUNCS(getauxval).
5227 * config.in: Re-generated.
5228 * configure: Re-generated.
5229 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5230 ppc64_64bit_inferior_p
5231
514c5338
YQ
52322015-01-14 Yao Qi <yao@codesourcery.com>
5233
5234 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5235 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5236 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5237 (PT_ORIG_R3, PT_TRAP): Likewise.
5238 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5239 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5240 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5241
3368c1e5
JB
52422015-01-10 Joel Brobecker <brobecker@adacore.com>
5243
5244 * i387-fp.c (i387_cache_to_xsave): In look over
5245 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5246 zmmh_low_space field by use of zmmh_high_space.
5247
582511be
PA
52482015-01-09 Pedro Alves <palves@redhat.com>
5249
5250 * linux-low.c (step_over_bkpt): Move higher up in the file.
5251 (handle_extended_wait): Don't store the stop_pc here.
5252 (get_stop_pc): Adjust comments and rename to ...
5253 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5254 stopped for a software breakpoint or hardware breakpoint.
5255 (thread_still_has_status_pending_p): New function.
5256 (status_pending_p_callback): Use
5257 thread_still_has_status_pending_p. If the event is no longer
5258 interesting, resume the LWP.
5259 (handle_tracepoints): Add assert.
5260 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5261 (wstatus_maybe_breakpoint): New function.
5262 (cancel_breakpoint): Delete function.
5263 (check_stopped_by_watchpoint): New function, factored out from
5264 linux_low_filter_event.
5265 (lp_status_maybe_breakpoint): Delete function.
5266 (linux_low_filter_event): Remove filter_ptid argument.
5267 Leave thread group exits pending here. Store the LWP's stop PC.
5268 Always leave events pending.
5269 (linux_wait_for_event_filtered): Pull all events out of the
5270 kernel, and leave them all pending.
5271 (count_events_callback, select_event_lwp_callback): Consider all
5272 events.
5273 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5274 (select_event_lwp): Only give preference to the stepping LWP in
5275 all-stop mode. Adjust comments.
5276 (ignore_event): New function.
5277 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5278 references to cancel_breakpoints. Adjust to renames. Also give
5279 equal priority to all LWPs that have had events in non-stop mode.
5280 If reporting a software breakpoint event, unadjust the LWP's PC.
5281 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5282 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5283 Adjust.
5284 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5285 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5286 (linux_stopped_by_watchpoint): Adjust.
5287 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5288 * linux-low.h (enum lwp_stop_reason): New.
5289 (struct lwp_info) <stop_pc>: Adjust comment.
5290 <stopped_by_watchpoint>: Delete field.
5291 <stop_reason>: New field.
5292 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5293 * mem-break.c (software_breakpoint_inserted_here)
5294 (hardware_breakpoint_inserted_here): New function.
5295 * mem-break.h (software_breakpoint_inserted_here)
5296 (hardware_breakpoint_inserted_here): Declare.
5297 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5298 (cancel_breakpoints): Delete.
5299 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5300 (upload_fast_traceframes): Remove references to
5301 cancel_breakpoints.
5302
a33e3959
PA
53032015-01-09 Pedro Alves <palves@redhat.com>
5304
5305 * thread-db.c (find_new_threads_callback): Ignore thread if the
5306 kernel thread ID is -1.
5307
8784d563
PA
53082015-01-09 Pedro Alves <palves@redhat.com>
5309
5310 * linux-low.c (linux_attach_fail_reason_string): Move to
5311 nat/linux-ptrace.c, and rename.
5312 (linux_attach_lwp): Update comment.
5313 (attach_proc_task_lwp_callback): New function.
5314 (linux_attach): Adjust to rename and use
5315 linux_proc_attach_tgid_threads.
5316 (linux_attach_fail_reason_string): Delete declaration.
5317
76f2b779
JB
53182015-01-01 Joel Brobecker <brobecker@adacore.com>
5319
5320 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5321 * server.c (gdbserver_version): Likewise.
5322
fafcc06a
SDJ
53232014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5324
5325 * remote-utils.c: Include ctype.h.
5326 (input_interrupt): Explicitly handle the case when the char
5327 received is the NUL byte. Improve the printing of non-ASCII
5328 characters.
5329
beed38b8
JB
53302014-12-16 Joel Brobecker <brobecker@adacore.com>
5331
5332 * linux-low.c (linux_low_filter_event): Update call to
5333 linux_enable_event_reporting following the addition of
5334 a new parameter to that function.
5335
bf330350
CU
53362014-12-16 Catalin Udma <catalin.udma@freescale.com>
5337
5338 PR server/17457
5339 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5340 (AARCH64_FPCR_REGNO): Likewise.
5341 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5342 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5343 (aarch64_store_fpregset): Likewise.
5344
5227d625
JB
53452014-12-15 Joel Brobecker <brobecker@adacore.com>
5346
5347 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5348 Remove FIXME comment about assumption about N.
5349
f93b65a0
JB
53502014-12-13 Joel Brobecker <brobecker@adacore.com>
5351
5352 * configure.ac: If large-file support is disabled in GDBserver,
5353 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5354 * configure: Regenerate.
5355
e5a9158d
AA
53562014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5357
5358 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5359 warning upon ENODATA from ptrace.
5360 * linux-s390-low.c (s390_store_tdb): New.
5361 (s390_regsets): Add regset for NT_S390_TDB.
5362
feea5f36
AA
53632014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5364
5365 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5366 without a fill_function.
5367 * linux-s390-low.c (s390_fill_last_break): Remove.
5368 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5369 (s390_arch_setup): Use regset's size instead of fill_function for
5370 loop end condition.
5371
098dbe61
AA
53722014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5373
5374 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5375 the regset's store function when ptrace returned an error.
5376 * regcache.c (get_thread_regcache): Invalidate register cache
5377 before fetching inferior's registers.
5378
28eef672
AA
53792014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5380
5381 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5382 while-loop as for-loop.
5383 (regsets_store_inferior_registers): Likewise.
5384
bdca27a2
YQ
53852014-11-28 Yao Qi <yao@codesourcery.com>
5386
5387 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5388 * config.in, configure: Re-generate.
5389 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5390 is defined.
5391
9c232dda
YQ
53922014-11-21 Yao Qi <yao@codesourcery.com>
5393
5394 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5395 (AC_CHECK_HEADERS): Remove malloc.h.
5396 * configure: Re-generated.
5397 * config.in: Re-generated.
5398 * server.h: Don't include alloca.h and malloc.h.
5399 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5400 Don't include malloc.h.
5401
43968415
JB
54022014-11-17 Joel Brobecker <brobecker@adacore.com>
5403
5404 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5405 corresponding ERRNO check in same block.
5406
40e91bc7
PA
54072014-11-12 Pedro Alves <palves@redhat.com>
5408
5409 * server.c (cont_thread): Update comment.
5410 (start_inferior, attach_inferior): No longer clear cont_thread.
5411 (handle_v_cont): No longer set cont_thread.
5412 (captured_main): Clear cont_thread each time a GDB connects.
5413
c2c118cf
PA
54142014-11-12 Pedro Alves <palves@redhat.com>
5415
5416 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5417 thread, and don't resume all threads if the Hc thread has exited.
5418
78708b7c
PA
54192014-11-12 Pedro Alves <palves@redhat.com>
5420
5421 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5422 the process group instead of to a specific LWP.
5423
a2abc7de
PA
54242014-10-15 Pedro Alves <palves@redhat.com>
5425
5426 PR server/17487
5427 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5428 parameter.
5429 (arm_set_thread_context): Delete.
5430 (the_low_target): Adjust.
5431 * win32-i386-low.c (debug_registers_changed)
5432 (debug_registers_used): Delete.
5433 (update_debug_registers_callback): New function.
5434 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5435 needing to update their debug registers.
5436 (win32_get_current_dr): New function.
5437 (x86_dr_low_get_addr, x86_dr_low_get_control)
5438 (x86_dr_low_get_status): Fetch the debug register from the thread
5439 record's context.
5440 (i386_initial_stuff): Adjust.
5441 (i386_get_thread_context): Remove current_event parameter. Don't
5442 clear debug_registers_changed nor copy DR values to
5443 debug_reg_state.
5444 (i386_set_thread_context): Delete.
5445 (i386_prepare_to_resume): New function.
5446 (i386_thread_added): Mark the thread as needing to update irs
5447 debug registers.
5448 (the_low_target): Remove i386_set_thread_context and install
5449 i386_prepare_to_resume.
5450 * win32-low.c (win32_get_thread_context): Adjust.
5451 (win32_set_thread_context): Use SetThreadContext
5452 directly.
5453 (win32_prepare_to_resume): New function.
5454 (win32_require_context): New function, factored out from ...
5455 (thread_rec): ... this.
5456 (continue_one_thread): Call win32_prepare_to_resume on each thread
5457 we're about to continue.
5458 (win32_resume): Call win32_prepare_to_resume on the event thread.
5459 * win32-low.h (struct win32_thread_info)
5460 <debug_registers_changed>: New field.
5461 (struct win32_target_ops): Change prototype of set_thread_context,
5462 delete set_thread_context and add prepare_to_resume.
5463 (win32_require_context): New declaration.
5464
a442d071
GB
54652014-10-08 Gary Benson <gbenson@redhat.com>
5466
5467 * server.h: Do not include common-exceptions.h.
5468
6f1947e8
GB
54692014-10-08 Gary Benson <gbenson@redhat.com>
5470
5471 * server.h: Do not include cleanups.h.
5472
63b434a4
JH
54732014-09-30 James Hogan <james.hogan@imgtec.com>
5474
5475 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5476 mips64-dsp-linux.c.
5477
c4d9ceb6
YQ
54782014-09-23 Yao Qi <yao@codesourcery.com>
5479
5480 * linux-low.c (lp_status_maybe_breakpoint): New function.
5481 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5482 (count_events_callback): Likewise.
5483 (select_event_lwp_callback): Likewise.
5484 (cancel_breakpoints_callback): Likewise.
5485
89a5711c
DB
54862014-09-19 Don Breazeal <donb@codesourcery.com>
5487
5488 * linux-low.c (handle_extended_wait): Call
5489 linux_ptrace_get_extended_event.
5490 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5491 linux_is_extended_waitstatus.
5492
bffc0964
JB
54932014-09-16 Joel Brobecker <brobecker@adacore.com>
5494
5495 * Makefile.in (CPPFLAGS): Define.
5496 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5497 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5498
0bfdf32f
GB
54992014-09-16 Gary Benson <gbenson@redhat.com>
5500
5501 * inferiors.h (current_inferior): Renamed as...
5502 (current_thread): New variable. All uses updated.
5503 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5504 (maybe_move_out_of_jump_pad): Likewise.
5505 (cancel_breakpoint): Likewise.
5506 (linux_low_filter_event): Likewise.
5507 (wait_for_sigstop): Likewise.
5508 (linux_resume_one_lwp): Likewise.
5509 (need_step_over_p): Likewise.
5510 (start_step_over): Likewise.
5511 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5512 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5513 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5514 and save_inferior as saved_thread.
5515 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5516 saved_thread.
5517 (regcache_invalidate_thread): Likewise.
5518 * remote-utils.c (prepare_resume_reply): Likewise.
5519 * thread-db.c (thread_db_get_tls_address): Likewise.
5520 (disable_thread_event_reporting): Likewise.
5521 (remove_thread_event_breakpoints): Likewise.
5522 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5523 as saved_thread.
5524 * target.h (set_desired_inferior): Renamed as...
5525 (set_desired_thread): New declaration. All uses updated.
5526 * server.c (myresume): Updated comment to reference thread instead
5527 of inferior.
5528 (handle_serial_event): Likewise.
5529 (handle_target_event): Likewise.
5530
361c8ade
GB
55312014-09-12 Tom Tromey <tromey@redhat.com>
5532 Gary Benson <gbenson@redhat.com>
5533
5534 * regcache.h: Include common-regcache.h.
5535 (regcache_read_pc): Don't declare.
5536 * regcache.c (get_thread_regcache_for_ptid): New function.
5537
bd9269f7
GB
55382014-09-11 Tom Tromey <tromey@redhat.com>
5539 Gary Benson <gbenson@redhat.com>
5540
5541 * symbol.c: New file.
5542 * Makefile.in (SFILES): Add symbol.c.
5543 (OBS): Add symbol.o.
5544
f8c1d06b
GB
55452014-09-11 Gary Benson <gbenson@redhat.com>
5546
5547 * target.c (target_stop_ptid, target_continue_ptid): New
5548 functions.
5549
721ec300
GB
55502014-09-11 Tom Tromey <tromey@redhat.com>
5551 Gary Benson <gbenson@redhat.com>
5552
5553 * target.h: Include target/target.h.
5554 * target.c (target_read_memory, target_read_uint32)
5555 (target_write_memory): New functions.
5556
c5e92cca
GB
55572014-09-11 Gary Benson <gbenson@redhat.com>
5558
5559 * server.h (debug_hw_points): Don't declare.
5560 * server.c (debug_hw_points): Don't define. Replace all uses
5561 with show_debug_regs.
5562 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5563 all uses with show_debug_regs.
5564
2e4bb98a
EBM
55652014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5566
5567 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5568 endianness into account.
5569 (ppc_supply_ptrace_register): Likewise.
5570
ac740bc7
JH
55712014-09-03 James Hogan <james.hogan@imgtec.com>
5572
5573 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5574 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5575
97ea6506
GB
55762014-09-03 Gary Benson <gbenson@redhat.com>
5577
5578 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5579 ALL_DEBUG_ADDRESS_REGISTERS.
5580
df7e5265
GB
55812014-09-02 Gary Benson <gbenson@redhat.com>
5582
5583 * i386-low.h: Renamed as...
5584 * x86-low.h: New file. All type, function and variable name
5585 prefixes changed from "i386_" to "x86_". All references updated.
5586 * i386-low.c: Renamed as...
5587 * x86-low.c: New file. All type, function and variable name
5588 prefixes changed from "i386_" to "x86_". All references updated.
5589
ed859da7
GB
55902014-09-02 Gary Benson <gbenson@redhat.com>
5591
5592 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5593 (x86_linux_new_thread): Likewise.
5594
860789c7
GB
55952014-08-29 Gary Benson <gbenson@redhat.com>
5596
5597 * server.h (setjmp.h): Do not include.
5598 (toplevel): Do not declare.
5599 (common-exceptions.h): Include.
5600 (cleanups.h): Likewise.
5601 * server.c (toplevel): Do not define.
5602 (exit_code): New static global.
5603 (detach_or_kill_for_exit_cleanup): New function.
5604 (main): New function. Original main renamed to...
5605 (captured_main): New function.
5606 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5607
ff55e1b5
GB
56082014-08-29 Gary Benson <gbenson@redhat.com>
5609
5610 * Makefile.in (SFILES): Add common/common-exceptions.c.
5611 (OBS): Add common-exceptions.o.
5612 (common-exceptions.o): New rule.
5613 * utils.c (prepare_to_throw_exception): New function.
5614
e9bcb658
GB
56152014-08-29 Gary Benson <gbenson@redhat.com>
5616
5617 * config.in: Regenerate.
5618 * configure: Likewise.
5619
e3180625
GB
56202014-08-29 Gary Benson <gbenson@redhat.com>
5621
5622 * Makefile.in (SFILES): Add common/cleanups.c.
5623 (OBS): cleanups.o.
5624 (cleanups.o): New rule.
5625
e3d6ba5d
GB
56262014-08-29 Gary Benson <gbenson@redhat.com>
5627
5628 * utils.c (internal_vwarning): New function.
5629
7096e886
GB
56302014-08-28 Gary Benson <gbenson@redhat.com>
5631
5632 * utils.h (fatal): Remove declaration.
5633 * utils.c (fatal): Remove function.
5634
14ce3192
GB
56352014-08-28 Gary Benson <gbenson@redhat.com>
5636
5637 * tracepoint.c (gdb_agent_init): Replace fatal with
5638 perror_with_name.
5639 (initialize_tracepoint): Likewise.
5640
50278d59
GB
56412014-08-28 Gary Benson <gbenson@redhat.com>
5642
5643 * remote-utils.c (remote_prepare): Replace fatal with error.
5644
aa96c426
GB
56452014-08-28 Gary Benson <gbenson@redhat.com>
5646
5647 * linux-low.c (linux_async): Replace fatal with warning.
5648 Tidy up and return.
5649 (linux_start_non_stop): Return -1 if linux_async failed.
5650
f7160e97
GB
56512014-08-28 Gary Benson <gbenson@redhat.com>
5652
5653 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5654 gdb_assert.
5655 (i386_dr_low_get_addr): Remove vague comment.
5656 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5657 gdb_assert.
5658
38e08fca
GB
56592014-08-28 Gary Benson <gbenson@redhat.com>
5660
5661 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5662 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5663 internal_error.
5664 (linux_resume_one_lwp): Likewise.
5665 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5666 gdb_assert.
5667 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5668 with internal_error.
5669 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5670 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5671 (find_register_by_name): Replace fatal with internal_error.
5672 (find_regno): Likewise.
5673 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5674 * thread-db.c (thread_db_create_event): Likewise.
5675 (thread_db_load_search): Likewise.
5676 (try_thread_db_load_1): Likewise.
5677 * tracepoint.c (get_jump_space_head): Replace fatal with
5678 internal_error.
5679 (claim_trampoline_space): Likewise.
5680 (have_fast_tracepoint_trampoline_buffer): Likewise.
5681 (cmd_qtstart): Likewise.
5682 (stop_tracing): Likewise.
5683 (fast_tracepoint_collecting): Likewise.
5684 (target_malloc): Likewise.
5685 (download_tracepoint): Likewise.
5686 (download_trace_state_variables): Replace check with gdb_assert.
5687 (upload_fast_traceframes): Replace fatal with internal_error.
5688
34abf635
GB
56892014-08-19 Tom Tromey <tromey@redhat.com>
5690 Gary Benson <gbenson@redhat.com>
5691
5692 * Makefile.in (SFILES): Add common/common-debug.c.
5693 (OBS): Add common-debug.o.
5694 (common-debug.o): New rule.
5695 * debug.h (debug_printf): Don't declare.
5696 * debug.c (debug_printf): Renamed and rewritten as...
5697 (debug_vprintf): New function.
5698
f6e94d78
GB
56992014-08-19 Gary Benson <gbenson@redhat.com>
5700
5701 * utils.h: Do not include print-utils.h.
5702
9239eeab
GB
57032014-08-19 Tom Tromey <tromey@redhat.com>
5704 Gary Benson <gbenson@redhat.com>
5705
5706 * server.h: Add static assertion.
5707 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5708
ef87c8bb
GB
57092014-08-19 Tom Tromey <tromey@redhat.com>
5710 Gary Benson <gbenson@redhat.com>
5711
5712 * Makefile.in (SFILES): Add common/errors.c.
5713 (OBS): Add errors.o.
5714 (IPA_OBS): Add errors-ipa.o.
5715 (errors.o): New rule.
5716 (errors-ipa.o): Likewise.
5717 * utils.h (perror_with_name, error, warning): Don't declare.
5718 * utils.c (warning): Renamed and rewritten as...
5719 (vwarning): New function.
5720 (error): Renamed and rewritten as...
5721 (verror): New function.
5722 (internal_error): Renamed and rewritten as...
5723 (internal_verror): New function.
5724
bb974a24
GB
57252014-08-07 Gary Benson <gbenson@redhat.com>
5726
5727 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5728 * configure: Regenerate.
5729 * config.in: Likewise.
5730 * server.h: Do not include errno.h.
5731 * event-loop.c: Likewise.
5732 * hostio-errno.c: Likewise.
5733 * linux-low.c: Likewise.
5734 * remote-utils.c: Likewise.
5735 * spu-low.c: Likewise.
5736 * utils.c: Likewise.
5737 * gdbreplay.c: Unconditionally include errno.h.
5738
6d3d12eb
GB
57392014-08-07 Gary Benson <gbenson@redhat.com>
5740
5741 * server.h: Do not include string.h.
5742 * event-loop.c: Likewise.
5743 * linux-low.c: Likewise.
5744 * regcache.c: Likewise.
5745 * remote-utils.c: Likewise.
5746 * spu-low.c: Likewise.
5747 * utils.c: Likewise.
5748
dccbb609
GB
57492014-08-07 Gary Benson <gbenson@redhat.com>
5750
5751 * server.h: Do not include gdb_assert.h.
5752
e76df0d0
GB
57532014-08-07 Gary Benson <gbenson@redhat.com>
5754
5755 * server.h: Do not include common-utils.h.
5756
4cb9c816
GB
57572014-08-07 Gary Benson <gbenson@redhat.com>
5758
5759 * server.h: Do not include ptid.h.
5760 * notif.h: Likewise.
5761
3995eeee
GB
57622014-08-07 Gary Benson <gbenson@redhat.com>
5763
5764 * server.h: Do not include gdb_locale.h.
5765
cb9f1a9b
GB
57662014-08-07 Gary Benson <gbenson@redhat.com>
5767
5768 * server.h: Do not include gdb/signals.h.
5769 * win32-low.c: Likewise.
5770
a5fceff8
GB
57712014-08-07 Gary Benson <gbenson@redhat.com>
5772
5773 * server.h: Do not include pathmax.h.
5774
b9391142
GB
57752014-08-07 Gary Benson <gbenson@redhat.com>
5776
5777 * server.h: Do not include libiberty.h.
5778 * linux-bfin-low.c: Likewise.
5779
0e443c87
GB
57802014-08-07 Gary Benson <gbenson@redhat.com>
5781
5782 * server.h: Do not include ansidecl.h.
5783
8ebb3f56
GB
57842014-08-07 Gary Benson <gbenson@redhat.com>
5785
5786 * linux-x86-low.c: Do not include stddef.h.
5787 * lynx-ppc-low.c: Likewise.
5788 * tracepoint.c: Likewise.
5789
8980bdf6
GB
57902014-08-07 Gary Benson <gbenson@redhat.com>
5791
5792 * server.h: Do not include stdarg.h.
5793 * nto-low.c: Likewise.
5794
d7096f71
GB
57952014-08-07 Gary Benson <gbenson@redhat.com>
5796
5797 * server.h: Do not include stdlib.h.
5798 * inferiors.c: Likewise.
5799 * linux-low.c: Likewise.
5800 * regcache.c: Likewise.
5801 * spu-low.c: Likewise.
5802 * tracepoint.c: Likewise.
5803 * utils.c: Likewise.
5804
d02f550d
GB
58052014-08-07 Gary Benson <gbenson@redhat.com>
5806
5807 * server.h: Do not include stdio.h.
5808 * linux-low.c: Likewise.
5809 * remote-utils.c: Likewise.
5810 * spu-low.c: Likewise.
5811 * utils.c: Likewise.
5812 * wincecompat.c: Likewise.
5813
87f6c4e3
GB
58142014-08-06 Gary Benson <gbenson@redhat.com>
5815
5816 * regcache.c (init_register_cache): Move conditionals inside if.
5817
7089dca4
GB
58182014-08-06 Gary Benson <gbenson@redhat.com>
5819
5820 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5821
462f517e
GB
58222014-07-31 Gary Benson <gbenson@redhat.com>
5823
5824 * ax.h: Do not include server.h.
5825 * gdbthread.h: Likewise.
5826 * lynx-low.h: Likewise.
5827 * notif.h: Likewise.
5828
976411d6
GB
58292014-07-30 Gary Benson <gbenson@redhat.com>
5830
5831 * server.h: Include common-defs.h.
5832 Do not include config.h or build-gnulib-gdbserver/config.h.
5833
d41f6d8e
GB
58342014-07-30 Gary Benson <gbenson@redhat.com>
5835
5836 * hostio-errno.c: Move server.h to top of includes list.
5837 * inferiors.c: Likewise.
5838 * linux-x86-low.c: Likewise.
5839 * notif.c: Include server.h.
5840
314c6a35
TT
58412014-07-24 Tom Tromey <tromey@redhat.com>
5842 Gary Benson <gbenson@redhat.com>
5843
5844 * server.h (CORE_ADDR): Now unsigned.
5845
69ff6be5
PA
58462014-07-16 Pedro Alves <palves@redhat.com>
5847
5848 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5849
ce9e3fe7
PA
58502014-07-15 Pedro Alves <palves@redhat.com>
5851
5852 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5853 copy.
5854
e76126e8
PA
58552014-07-11 Pedro Alves <palves@redhat.com>
5856
5857 * linux-low.c (kill_wait_lwp): New function, based on
5858 kill_one_lwp_callback, but use my_waitpid directly.
5859 (kill_one_lwp_callback, linux_kill): Use it.
5860
8e9db26e
PA
58612014-06-23 Pedro Alves <palves@redhat.com>
5862
5863 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5864 before setting DR0..DR3.
5865
698b3e08
GB
58662014-06-20 Gary Benson <gbenson@redhat.com>
5867
5868 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5869 * configure: Regenerated.
5870 * config.in: Likewise.
5871
125f8a3d
GB
58722014-06-20 Gary Benson <gbenson@redhat.com>
5873
5874 * Makefile.in (SFILES): Update locations for files moved
5875 from common to nat.
5876 (object file files): Reordered.
5877
42995dbd
GB
58782014-06-20 Gary Benson <gbenson@redhat.com>
5879
5880 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5881 (i386_dr_low_set_addr): Likewise.
5882 (i386_dr_low_get_addr): Likewise.
5883 (i386_dr_low_can_set_control): Likewise.
5884 (i386_dr_low_set_control): Likewise.
5885 (i386_dr_low_get_control): Likewise.
5886 (i386_dr_low_get_status): Likewise.
5887 (i386_get_debug_register_length): Likewise.
5888 * linux-x86-low.c (i386_dr_low_set_addr):
5889 Changed signature. Made static.
5890 (i386_dr_low_get_addr): Likewise.
5891 (i386_dr_low_set_control): Likewise.
5892 (i386_dr_low_get_control): Likewise.
5893 (i386_dr_low_get_status): Likewise.
5894 (i386_dr_low): New global variable.
5895 * win32-i386-low.c (i386_dr_low_set_addr):
5896 Changed signature. Made static.
5897 (i386_dr_low_get_addr): Likewise.
5898 (i386_dr_low_set_control): Likewise.
5899 (i386_dr_low_get_control): Likewise.
5900 (i386_dr_low_get_status): Likewise.
5901 (i386_dr_low): New global variable.
5902
e1d2394b
MS
59032014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5904
5905 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5906 * Makefile.in (AR, AR_FLAGS): Define.
5907 * configure: Regenerate.
5908
3a8ee006
GB
59092014-06-19 Gary Benson <gbenson@redhat.com>
5910
5911 * Makefile.in (i386-dregs.o): New rule.
5912 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5913 * i386-low.c (target.h): Remove include.
5914 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5915 (DR_CONTROL_SHIFT): Likewise.
5916 (DR_CONTROL_SIZE): Likewise.
5917 (DR_RW_EXECUTE): Likewise.
5918 (DR_RW_WRITE): Likewise.
5919 (DR_RW_READ): Likewise.
5920 (DR_RW_IORW): Likewise.
5921 (DR_LEN_1): Likewise.
5922 (DR_LEN_2): Likewise.
5923 (DR_LEN_4): Likewise.
5924 (DR_LEN_8): Likewise.
5925 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5926 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5927 (DR_ENABLE_SIZE): Likewise.
5928 (DR_LOCAL_SLOWDOWN): Likewise.
5929 (DR_GLOBAL_SLOWDOWN): Likewise.
5930 (DR_CONTROL_RESERVED): Likewise.
5931 (I386_DR_CONTROL_MASK): Likewise.
5932 (I386_DR_VACANT): Likewise.
5933 (I386_DR_LOCAL_ENABLE): Likewise.
5934 (I386_DR_GLOBAL_ENABLE): Likewise.
5935 (I386_DR_DISABLE): Likewise.
5936 (I386_DR_SET_RW_LEN): Likewise.
5937 (I386_DR_GET_RW_LEN): Likewise.
5938 (I386_DR_WATCH_HIT): Likewise.
5939 (i386_wp_op_t): Likewise.
5940 (i386_show_dr): Likewise.
5941 (i386_length_and_rw_bits): Likewise.
5942 (i386_insert_aligned_watchpoint): Likewise.
5943 (i386_remove_aligned_watchpoint): Likewise.
5944 (i386_handle_nonaligned_watchpoint): Likewise.
5945 i386_update_inferior_debug_regs(): Likewise.
5946 (i386_dr_insert_watchpoint): Likewise.
5947 (i386_dr_remove_watchpoint): Likewise.
5948 (i386_dr_region_ok_for_watchpoint): Likewise.
5949 (i386_dr_stopped_data_address): Likewise.
5950 (i386_dr_stopped_by_watchpoint): Likewise.
5951
8f26655c
GB
59522014-06-19 Gary Benson <gbenson@redhat.com>
5953
5954 * i386-low.c (i386_dr_show): Renamed to
5955 i386_show_dr and made static. All uses updated.
5956 (i386_dr_length_and_rw_bits): Renamed to
5957 i386_length_and_rw_bits and made static.
5958 All uses updated.
5959 (i386_dr_insert_aligned_watchpoint): Renamed to
5960 i386_insert_aligned_watchpoint and made static.
5961 All uses updated.
5962 (i386_dr_remove_aligned_watchpoint): Renamed to
5963 i386_remove_aligned_watchpoint and made static.
5964 All uses updated.
5965 (i386_dr_update_inferior_debug_regs): Renamed to
5966 i386_update_inferior_debug_regs and made static.
5967 All uses updated.
5968
b9228891
GB
59692014-06-18 Gary Benson <gbenson@redhat.com>
5970
5171def3
GB
5971 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5972 (i386_dr_low_can_set_control): Likewise.
5973 (i386_get_debug_register_length): Likewise.
5974 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5975 (i386_dr_low_can_set_control): Likewise.
5976 (i386_get_debug_register_length): Likewise.
5977
59782014-06-17 Gary Benson <gbenson@redhat.com>
5979
b9228891
GB
5980 * i386-low.h (i386-dregs.h): New include.
5981 (DR_FIRSTADDR): Now in i386-dregs.h.
5982 (DR_LASTADDR): Likewise.
5983 (DR_NADDR): Likewise.
5984 (DR_STATUS): Likewise.
5985 (DR_CONTROL): Likewise.
5986 (i386_debug_reg_state): Likewise.
5987 (i386_dr_insert_watchpoint): Likewise.
5988 (i386_dr_remove_watchpoint): Likewise.
5989 (i386_dr_region_ok_for_watchpoint): Likewise.
5990 (i386_dr_stopped_data_address): Likewise.
5991 (i386_dr_stopped_by_watchpoint): Likewise.
5992 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5993
4be83cc2
GB
59942014-06-18 Gary Benson <gbenson@redhat.com>
5995
5996 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5997 i386_dr_insert_watchpoint.
5998 (i386_low_remove_watchpoint): Renamed to
5999 i386_dr_remove_watchpoint.
6000 (i386_low_region_ok_for_watchpoint): Renamed to
6001 i386_dr_region_ok_for_watchpoint.
6002 (i386_low_stopped_data_address): Renamed to
6003 i386_dr_stopped_data_address.
6004 (i386_low_stopped_by_watchpoint): Renamed to
6005 i386_dr_stopped_by_watchpoint.
6006 * i386-low.c (i386_show_dr): Renamed to
6007 i386_dr_show and made nonstatic. All uses updated.
6008 (i386_length_and_rw_bits): Renamed to
6009 i386_dr_length_and_rw_bits and made nonstatic.
6010 All uses updated.
6011 (i386_insert_aligned_watchpoint): Renamed to
6012 i386_dr_insert_aligned_watchpoint and made nonstatic.
6013 All uses updated.
6014 (i386_remove_aligned_watchpoint): Renamed to
6015 i386_dr_remove_aligned_watchpoint and made nonstatic.
6016 All uses updated.
6017 (i386_update_inferior_debug_regs): Renamed to
6018 i386_dr_update_inferior_debug_regs and made nonstatic.
6019 All uses updated.
6020 (i386_low_insert_watchpoint): Renamed to
6021 i386_dr_insert_watchpoint. All uses updated.
6022 (i386_low_remove_watchpoint): Renamed to
6023 i386_dr_remove_watchpoint. All uses updated.
6024 (i386_low_region_ok_for_watchpoint): Renamed to
6025 i386_dr_region_ok_for_watchpoint. All uses updated.
6026 (i386_low_stopped_data_address): Renamed to
6027 i386_dr_stopped_data_address. All uses updated.
6028 (i386_low_stopped_by_watchpoint): Renamed to
6029 i386_dr_stopped_by_watchpoint. All uses updated.
6030
131aa0d4
GB
60312014-06-18 Gary Benson <gbenson@redhat.com>
6032
6033 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6034 (i386_dr_low_can_set_control): Likewise.
6035 (i386_insert_aligned_watchpoint): New check.
6036
d9305f7f
GB
60372014-06-18 Gary Benson <gbenson@redhat.com>
6038
6039 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6040 Renamed to state.
6041
e927c9fc
GB
60422014-06-18 Gary Benson <gbenson@redhat.com>
6043
6044 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6045 instead of fatal and error.
6046 (i386_handle_nonaligned_watchpoint): Likewise.
6047
1b6d4134
GB
60482014-06-18 Gary Benson <gbenson@redhat.com>
6049
6050 * i386-low.c (i386_get_debug_register_length): New macro.
6051 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6052 (i386_show_dr): Use debug_printf instead of fprintf. Use
6053 phex to format values.
6054
6e62758f
GB
60552014-06-18 Gary Benson <gbenson@redhat.com>
6056
6057 * i386-low.h: Comment changes.
6058 * i386-low.c: Likewise.
6059
fc6e2f03
GB
60602014-06-18 Gary Benson <gbenson@redhat.com>
6061
6062 * i386-low.c: Whitespace changes.
6063
f9d1eeed
TT
60642014-06-12 Tom Tromey <tromey@redhat.com>
6065
6066 * utils.c (freeargv): Remove.
6067
0b04e523
TT
60682014-06-12 Tom Tromey <tromey@redhat.com>
6069
6070 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6071 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6072 (parse_debug_format_options): Likewise.
6073 (gdbserver_usage): Likewise.
6074 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6075 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6076 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6077 against libiberty.
6078 ($(LIBGNU)): Depend on libiberty.
6079 (all-lib): Recurse into all subdirs.
6080 (install-only): Invoke "install" target in subdirs.
6081 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6082 targets.
6083 * configure: Rebuild.
6084 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6085 for vasprintf, vsnprintf, or gettimeofday.
6086 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6087 srv_tgtobj.
6088
270c9937
JB
60892014-06-05 Joel Brobecker <brobecker@adacore.com>
6090
6091 * development.sh: Delete.
6092 * Makefile.in (config.status): Adjust dependency on development.sh.
6093 * configure.ac: Adjust development.sh source call.
6094 * configure: Regenerate.
6095
0a261ed8
PA
60962014-06-02 Pedro Alves <palves@redhat.com>
6097
6098 * ax.c (gdb_free_agent_expr): New function.
6099 * ax.h (gdb_free_agent_expr): New declaration.
6100 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6101 list.
6102 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6103 static.
6104 (clear_breakpoint_conditions_and_commands): New function.
6105 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6106 (clear_breakpoint_conditions_and_commands): New declaration.
6107
e9dae05e
RR
61082014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6109
6110 * linux-aarch64-low.c (asm/ptrace.h): Include.
6111
5876f503
JK
61122014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6113
6114 Fix TLS access for -static -pthread.
6115 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6116 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6117 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6118
802e8e6d
PA
61192014-05-20 Pedro Alves <palves@redhat.com>
6120
6121 * linux-aarch64-low.c (aarch64_insert_point)
6122 (aarch64_remove_point): No longer check whether the type is
6123 supported here. Adjust to new interface.
6124 (the_low_target): Install aarch64_supports_z_point_type as
6125 supports_z_point_type method.
6126 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6127 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6128 instead of a Z packet char. Adjust.
6129 (arm_supports_z_point_type): New function.
6130 (arm_insert_point, arm_remove_point): Adjust to new interface.
6131 (the_low_target): Install arm_supports_z_point_type.
6132 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6133 (cris_insert_point, cris_remove_point): Adjust to new interface.
6134 Don't check whether the type is supported here.
6135 (the_low_target): Install cris_supports_z_point_type.
6136 * linux-low.c (linux_supports_z_point_type): New function.
6137 (linux_insert_point, linux_remove_point): Adjust to new interface.
6138 * linux-low.h (struct linux_target_ops) <insert_point,
6139 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6140 raw_breakpoint pointer parameter.
6141 <supports_z_point_type>: New method.
6142 * linux-mips-low.c (mips_supports_z_point_type): New function.
6143 (mips_insert_point, mips_remove_point): Adjust to new interface.
6144 Use mips_supports_z_point_type.
6145 (the_low_target): Install mips_supports_z_point_type.
6146 * linux-ppc-low.c (the_low_target): Install NULL as
6147 supports_z_point_type method.
6148 * linux-s390-low.c (the_low_target): Install NULL as
6149 supports_z_point_type method.
6150 * linux-sparc-low.c (the_low_target): Install NULL as
6151 supports_z_point_type method.
6152 * linux-x86-low.c (x86_supports_z_point_type): New function.
6153 (x86_insert_point): Adjust to new insert_point interface. Use
6154 insert_memory_breakpoint. Adjust to new
6155 i386_low_insert_watchpoint interface.
6156 (x86_remove_point): Adjust to remove_point interface. Use
6157 remove_memory_breakpoint. Adjust to new
6158 i386_low_remove_watchpoint interface.
6159 (the_low_target): Install x86_supports_z_point_type.
6160 * lynx-low.c (lynx_target_ops): Install NULL as
6161 supports_z_point_type callback.
6162 * nto-low.c (nto_supports_z_point_type): New.
6163 (nto_insert_point, nto_remove_point): Adjust to new interface.
6164 (nto_target_ops): Install nto_supports_z_point_type.
6165 * mem-break.c: Adjust intro comment.
6166 (struct raw_breakpoint) <raw_type, size>: New fields.
6167 <inserted>: Update comment.
6168 <shlib_disabled>: Delete field.
6169 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6170 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6171 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6172 (raw_bkpt_type_to_target_hw_bp_type): New function.
6173 (find_enabled_raw_code_breakpoint_at): New function.
6174 (find_raw_breakpoint_at): New type and size parameters. Use them.
6175 (insert_memory_breakpoint): New function, based off
6176 set_raw_breakpoint_at.
6177 (remove_memory_breakpoint): New function.
6178 (set_raw_breakpoint_at): Reimplement.
6179 (set_breakpoint): New, based on set_breakpoint_at.
6180 (set_breakpoint_at): Reimplement.
6181 (delete_raw_breakpoint): Go through the_target->remove_point
6182 instead of assuming memory breakpoints.
6183 (find_gdb_breakpoint_at): Delete.
6184 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6185 (find_gdb_breakpoint): New function.
6186 (set_gdb_breakpoint_at): Delete.
6187 (z_type_supported): New function.
6188 (set_gdb_breakpoint_1): New function, loosely based off
6189 set_gdb_breakpoint_at.
6190 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6191 (delete_gdb_breakpoint_at): Delete.
6192 (delete_gdb_breakpoint_1): New function, loosely based off
6193 delete_gdb_breakpoint_at.
6194 (delete_gdb_breakpoint): New function.
6195 (clear_gdb_breakpoint_conditions): Rename to ...
6196 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6197 breakpoint.
6198 (add_condition_to_breakpoint): Make static.
6199 (add_breakpoint_condition): Take a struct breakpoint pointer
6200 instead of an address. Adjust.
6201 (gdb_condition_true_at_breakpoint): Rename to ...
6202 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6203 z_type parameter.
6204 (gdb_condition_true_at_breakpoint): Reimplement.
6205 (add_breakpoint_commands): Take a struct breakpoint pointer
6206 instead of an address. Adjust.
6207 (gdb_no_commands_at_breakpoint): Rename to ...
6208 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6209 parameter. Return true if no breakpoint was found. Change debug
6210 output.
6211 (gdb_no_commands_at_breakpoint): Reimplement.
6212 (run_breakpoint_commands): Rename to ...
6213 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6214 and change return type to boolean.
6215 (run_breakpoint_commands): New function.
6216 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6217 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6218 breakpoint. Go through the_target->remove_point instead of
6219 assuming memory breakpoint.
6220 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6221 software and hardware breakpoints.
6222 (reinsert_raw_breakpoint): Go through the_target->insert_point
6223 instead of assuming memory breakpoint.
6224 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6225 software and hardware breakpoints.
6226 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6227 Check both software and hardware breakpoints.
6228 (validate_inserted_breakpoint): Assert the breakpoint is a
6229 software breakpoint. Set the inserted flag to -1 instead of
6230 setting shlib_disabled.
6231 (delete_disabled_breakpoints): Adjust.
6232 (validate_breakpoints): Only validate software breakpoints.
6233 Adjust to inserted flag change.
6234 (check_mem_read, check_mem_write): Skip breakpoint types other
6235 than software breakpoints. Adjust to inserted flag change.
6236 * mem-break.h (enum raw_bkpt_type): New enum.
6237 (raw_breakpoint, struct process_info): Forward declare.
6238 (Z_packet_to_target_hw_bp_type): Delete declaration.
6239 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6240 (set_gdb_breakpoint, delete_gdb_breakpoint)
6241 (clear_breakpoint_conditions): New declarations.
6242 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6243 (breakpoint_inserted_here): Update comment.
6244 (add_breakpoint_condition, add_breakpoint_commands): Replace
6245 address parameter with a breakpoint pointer parameter.
6246 (gdb_breakpoint_here): Update comment.
6247 (delete_gdb_breakpoint_at): Delete.
6248 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6249 * server.c (process_point_options): Take a struct breakpoint
6250 pointer instead of an address. Adjust.
6251 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6252 delete_gdb_breakpoint.
6253 * spu-low.c (spu_target_ops): Install NULL as
6254 supports_z_point_type method.
6255 * target.h: Include mem-break.h.
6256 (struct target_ops) <prepare_to_access_memory>: Update comment.
6257 <supports_z_point_type>: New field.
6258 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6259 instead of a char. Also take a raw breakpoint pointer.
6260 * win32-arm-low.c (the_low_target): Install NULL as
6261 supports_z_point_type.
6262 * win32-i386-low.c (i386_supports_z_point_type): New function.
6263 (i386_insert_point, i386_remove_point): Adjust to new interface.
6264 (the_low_target): Install i386_supports_z_point_type.
6265 * win32-low.c (win32_supports_z_point_type): New function.
6266 (win32_insert_point, win32_remove_point): Adjust to new interface.
6267 (win32_target_ops): Install win32_supports_z_point_type.
6268 * win32-low.h (struct win32_target_ops):
6269 <supports_z_point_type>: New method.
6270 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6271 instead of a char. Also take a raw breakpoint pointer.
6272
932539e3
PA
62732014-05-20 Pedro Alves <palves@redhat.com>
6274
6275 * mem-break.h: Include break-common.h.
6276 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6277 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6278 (Z_packet_to_target_hw_bp_type): New declaration.
6279 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6280 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6281 (Z_PACKET_ACCESS_WP): Delete macros.
6282 (Z_packet_to_hw_type): Delete function.
6283 * i386-low.h: Don't include break-common.h here.
6284 (Z_packet_to_hw_type): Delete declaration.
6285 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6286 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6287 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6288 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6289 * linux-aarch64-low.c: Don't include break-common.h here.
6290 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6291 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6292 (Z_packet_to_target_hw_bp_type): Delete function.
6293 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6294 function.
6295 (mips_insert_point, mips_remove_point): Use
6296 Z_packet_to_target_hw_bp_type.
6297
4ff0d3d8
PA
62982014-05-20 Pedro Alves <palves@redhat.com>
6299
6300 * linux-aarch64-low.c: Include break-common.h.
6301 (enum target_point_type): Delete.
6302 (Z_packet_to_point_type): Rename to ...
6303 (Z_packet_to_target_hw_bp_type): ... this, and return a
6304 target_hw_bp_type instead.
6305 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6306 instead of an enum target_point_type.
6307 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6308 breakpoint type.
6309 (aarch64_dr_state_insert_one_point)
6310 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6311 (aarch64_handle_aligned_watchpoint)
6312 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6313 Take an enum target_hw_bp_type instead of an enum
6314 target_point_type.
6315 (aarch64_supports_z_point_type): New function.
6316 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6317 use Z_packet_to_target_hw_bp_type.
6318
786dc519
JB
63192014-05-20 Joel Brobecker <brobecker@adacore.com>
6320
6321 * configure.ac: Only use -Werror by default when DEVELOPMENT
6322 is true.
6323 * configure: Regenerate.
6324
9e0aa64f
JK
63252014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6326
6327 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6328 * linux-x86-low.c (X86_64_USER_REGS): New.
6329 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6330
2b577b92
YQ
63312014-04-28 Yao Qi <yao@codesourcery.com>
6332
6333 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6334 name.
6335
94611da2
PA
63362014-04-25 Pedro Alves <palves@redhat.com>
6337
6338 PR server/16255
6339 * linux-low.c (linux_attach_fail_reason_string): New function.
6340 (linux_attach_lwp): Delete.
6341 (linux_attach_lwp_1): Rename to ...
6342 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6343 argument. Remove "initial" parameter. Return int instead of
6344 void. Don't error or warn here.
6345 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6346 failure to attach to the tgid. Call warning when failing to
6347 attach to an lwp.
6348 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6349 argument. Remove "initial" parameter. Return int instead of
6350 void. Don't error or warn here.
6351 (linux_attach_fail_reason_string): New declaration.
6352 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6353 interface change. Use linux_attach_fail_reason_string.
6354
01f9f808
MS
63552014-04-24 Michael Sturm <michael.sturm@mintel.com>
6356 Walfred Tedeschi <walfred.tedeschi@intel.com>
6357
6358 * Makefile.in: Added rules to handle new files
6359 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6360 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6361 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6362 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6363 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6364 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6365 x32-avx512-linux.o.
6366 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6367 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6368 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6369 i386/x32-avx512.xml.
6370 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6371 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6372 i386/x32-avx512-linux.xml.
6373 * i387-fp.c (num_avx512_k_registers): New constant for number
6374 of K registers.
6375 (num_avx512_zmmh_low_registers): New constant for number of
6376 lower ZMM registers (0-15).
6377 (num_avx512_zmmh_high_registers): New constant for number of
6378 higher ZMM registers (16-31).
6379 (num_avx512_ymmh_registers): New contant for number of higher
6380 YMM registers (ymm16-31 added by avx521 on x86_64).
6381 (num_avx512_xmm_registers): New constant for number of higher
6382 XMM registers (xmm16-31 added by AVX512 on x86_64).
6383 (struct i387_xsave): Add space for AVX512 registers.
6384 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6385 Add code to handle AVX512 registers.
6386 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6387 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6388 prototypei from generated file.
6389 (tdesc_amd64_avx512_linux): Likewise.
6390 (init_registers_x32_avx512_linux): Likewise.
6391 (tdesc_x32_avx512_linux): Likewise.
6392 (init_registers_i386_avx512_linux): Likewise.
6393 (tdesc_i386_avx512_linux): Likewise.
6394 (x86_64_regmap): Add AVX512 registers.
6395 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6396 mask.
6397 (initialize_low_arch): Add code to initialize AVX512 registers.
6398
51aa91f9
PA
63992014-04-23 Pedro Alves <palves@redhat.com>
6400
6401 * mem-break.c (find_gdb_breakpoint_at): Make static.
6402 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6403
a4165e94
PA
64042014-04-23 Pedro Alves <palves@redhat.com>
6405
6406 * i386-low.c: Don't include break-common.h here.
6407 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6408 prototype to take target_hw_bp_type as argument instead of a Z
6409 packet char.
6410 * i386-low.h: Include break-common.h here.
6411 (Z_packet_to_hw_type): Declare.
6412 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6413 prototypes.
6414 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6415 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6416 (x86_remove_point): Convert the packet number to a
6417 target_hw_bp_type before calling i386_low_remove_watchpoint.
6418 * win32-i386-low.c (i386_insert_point): Convert the packet number
6419 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6420 (i386_remove_point): Convert the packet number to a
6421 target_hw_bp_type before calling i386_low_remove_watchpoint.
6422
b8acf843
PA
64232014-04-23 Pedro Alves <palves@redhat.com>
6424
6425 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6426
d708bcd1
PA
64272014-04-10 Pedro Alves <palves@redhat.com>
6428
6429 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6430 Check if the condition or command is NULL before checking if the
6431 breakpoint is known. On success, return true.
6432 * mem-break.h (add_breakpoint_condition): Document return.
6433 (add_breakpoint_commands): Add describing comment.
6434 * server.c (skip_to_semicolon): New function.
6435 (process_point_options): Use it.
6436
2eec7d5b
PA
64372014-04-09 Pedro Alves <palves@redhat.com>
6438
6439 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6440 to lwpid_of.
6441
fa96cb38
PA
64422014-02-27 Pedro Alves <palves@redhat.com>
6443
6444 PR 12702
6445 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6446 macros.
6447 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6448 output.
6449 (last_thread_of_process_p): Take a PID argument instead of a
6450 thread pointer.
6451 (linux_wait_for_lwp): Delete.
6452 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6453 functions.
6454 (linux_low_filter_event): New function, party factored out from
6455 linux_wait_for_event.
6456 (linux_wait_for_event): Rename to ...
6457 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6458 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6459 sigsuspend. Check for zombie leaders.
6460 (linux_wait_for_event): Reimplement as wrapper around
6461 linux_wait_for_event_filtered.
6462 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6463 a normal or signal exit is seen, it's the whole process exiting.
6464 (wait_for_sigstop): No longer a for_each_inferior callback.
6465 Rewrite on top of linux_wait_for_event_filtered.
6466 (stop_all_lwps): Call wait_for_sigstop directly.
6467 * server.c (resume, handle_target_event): Handle
6468 TARGET_WAITKIND_NO_RESUMED.
6469
d763de10
JB
64702014-02-26 Joel Brobecker <brobecker@adacore.com>
6471
6472 * win32-low.c (psapi_get_dll_name,
6473 * win32_CreateToolhelp32Snapshot): Delete.
6474 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6475 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6476 Delete.
6477 (handle_load_dll): Add function description.
6478 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6479
850a0f76
JB
64802014-02-26 Joel Brobecker <brobecker@adacore.com>
6481
6482 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6483 Add comment.
6484 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6485 base address when calling win32_add_one_solib.
6486 (handle_load_dll): Delete local variable load_addr.
6487 Remove 0x1000 offset applied to DLL base address when calling
6488 win32_add_one_solib.
6489 (handle_unload_dll): Add comment.
6490
f25b3fc3
JB
64912014-02-26 Joel Brobecker <brobecker@adacore.com>
6492
6493 * win32-low.c (win32_add_all_dlls): Renames
6494 win32_ensure_ntdll_loaded. Rewrite function documentation.
6495 Adjust implementation to always load all DLLs.
6496 Add 0x1000 offset to DLL base address when calling
6497 win32_add_one_solib.
6498 (child_initialization_done): New static global.
6499 (do_initial_child_stuff): Set child_initialization_done to
6500 zero during child initialization, and 1 after. Replace call
6501 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6502 Add comment.
6503 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6504 (handle_unload_dll): Add function documentation.
6505 (get_child_debug_event): Ignore load and unload DLL events
6506 during child initialization.
6507
d86d4aaf
DE
65082014-02-20 Doug Evans <dje@google.com>
6509
3bc32da3 6510 Remove global all_lwps.
d86d4aaf
DE
6511 * inferiors.h (ptid_of): Move here from linux-low.h.
6512 (pid_of, lwpid_of): Ditto.
6513 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6514 parameter is a struct thread_info * now.
6515 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6516 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6517 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6518 directly.
6519 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6520 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6521 * linux-arm-low.c (update_registers_callback): Update, "entry"
6522 parameter is a struct thread_info * now.
6523 Fetch lwpid from current_inferior directly.
6524 (arm_insert_point): Pass &all_threads to find_inferior instead of
6525 &all_lwps.
6526 (arm_remove_point): Ditto.
6527 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6528 (arm_prepare_to_resume): Fetch pid from thread.
6529 (arm_read_description): Fetch lwpid from current_inferior directly.
6530 * linux-low.c (all_lwps): Delete.
6531 (delete_lwp): Delete call to remove_inferior.
6532 (handle_extended_wait): Fetch lwpid from thread.
6533 (add_lwp): Don't set lwp->entry.id. Remove call to
6534 add_inferior_to_list.
6535 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6536 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6537 (kill_one_lwp_callback): Ditto.
6538 (linux_kill): Don't dereference NULL pointer.
6539 Fetch ptid,lwpid from thread.
6540 (get_detach_signal): Fetch ptid from thread.
6541 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6542 Simplify call to regcache_invalidate_thread.
6543 (delete_lwp_callback): Update, "entry" parameter is a
6544 struct thread_info * now. Fetch pid from thread.
6545 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6546 (status_pending_p_callback): Update, "entry" parameter is a
6547 struct thread_info * now. Fetch ptid from thread.
6548 (find_lwp_pid): Update, "entry" parameter is a
6549 struct thread_info * now.
6550 (linux_wait_for_lwp): Fetch pid from thread.
6551 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6552 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6553 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6554 (dequeue_one_deferred_signal): Ditto.
6555 (cancel_breakpoint): Fetch ptid from current_inferior.
6556 (linux_wait_for_event): Pass &all_threads to find_inferior,
6557 not &all_lwps. Fetch ptid, lwpid from thread.
6558 (count_events_callback): Update, "entry" parameter is a
6559 struct thread_info * now.
6560 (select_singlestep_lwp_callback): Ditto.
6561 (select_event_lwp_callback): Ditto.
6562 (cancel_breakpoints_callback): Ditto.
6563 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6564 not &all_lwps.
6565 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6566 (unsuspend_one_lwp): Update, "entry" parameter is a
6567 struct thread_info * now.
6568 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6569 not &all_lwps.
6570 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6571 Fetch lwpid from thread, not lwp.
6572 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6573 Pass &all_threads to find_inferior, not &all_lwps.
6574 (send_sigstop): Fetch lwpid from thread, not lwp.
6575 (send_sigstop_callback): Update, "entry" parameter is a
6576 struct thread_info * now.
6577 (suspend_and_send_sigstop_callback): Ditto.
6578 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6579 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6580 struct thread_info * now.
6581 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6582 from thread, lwp.
6583 (lwp_running): Update, "entry" parameter is a
6584 struct thread_info * now.
6585 (stop_all_lwps): Fetch ptid from thread.
6586 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6587 (linux_resume_one_lwp): Fetch lwpid from thread.
6588 (linux_set_resume_request): Update, "entry" parameter is a
6589 struct thread_info * now. Fetch pid, lwpid from thread.
6590 (resume_status_pending_p): Update, "entry" parameter is a
6591 struct thread_info * now.
6592 (need_step_over_p): Ditto. Fetch lwpid from thread.
6593 (start_step_over): Fetch lwpid from thread.
6594 (linux_resume_one_thread): Update, "entry" parameter is a
6595 struct thread_info * now. Fetch lwpid from thread.
6596 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6597 (proceed_one_lwp): Update, "entry" parameter is a
6598 struct thread_info * now. Fetch lwpid from thread.
6599 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6600 struct thread_info * now.
6601 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6602 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6603 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6604 directly.
6605 (regsets_store_inferior_registers): Ditto.
6606 (fetch_register, store_register): Ditto.
6607 (linux_read_memory, linux_write_memory): Ditto.
6608 (linux_request_interrupt): Ditto.
6609 (linux_read_auxv): Ditto.
6610 (linux_xfer_siginfo): Ditto.
6611 (linux_qxfer_spu): Ditto.
6612 (linux_qxfer_libraries_svr4): Ditto.
6613 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6614 moved to inferiors.h.
6615 (get_lwp): Delete.
6616 (get_thread_lwp): Update.
6617 (struct lwp_info): Delete member "entry". Simplify comment for
6618 member "thread".
6619 (all_lwps): Delete.
6620 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6621 current_inferior directly.
6622 (update_watch_registers_callback): Update, "entry" parameter is a
6623 struct thread_info * now. Fetch pid from thread.
6624 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6625 (mips_insert_point): Fetch lwpid from current_inferior.
6626 Pass &all_threads to find_inferior, not &all_lwps.
6627 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6628 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6629 directly.
6630 (mips_stopped_data_address): Ditto.
6631 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6632 directly.
6633 * linux-tile-low.c (tile_arch_setup): Ditto.
6634 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6635 (update_debug_registers_callback): Update, "entry" parameter is a
6636 struct thread_info * now. Fetch pid from thread.
6637 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6638 Pass &all_threads to find_inferior, not &all_lwps.
6639 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6640 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6641 Pass &all_threads to find_inferior, not &all_lwps.
6642 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6643 (i386_dr_low_get_status): Ditto.
6644 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6645 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6646 (x86_linux_read_description): Ditto.
6647 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6648
3b8361aa
DE
66492014-02-20 Doug Evans <dje@google.com>
6650
6651 * inferiors.c (get_first_inferior): Fix buglet.
6652
f7667f0d
DE
66532014-02-19 Doug Evans <dje@google.com>
6654
6655 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6656 * inferiors.c (add_thread): Change result type to struct thread_info *.
6657 All callers updated.
6658 (add_lwp): Call add_thread here instead of in callers.
6659 All callers updated.
6660 * linux-low.h (get_lwp_thread): Rewrite.
6661 (struct lwp_info): New member "thread".
6662
b3312d80
DE
66632014-02-19 Doug Evans <dje@google.com>
6664
6665 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6666 All callers updated.
6667
ecc6f45c
DE
66682014-02-19 Doug Evans <dje@google.com>
6669
6670 * inferiors.c (add_thread): Fix whitespace.
6671
649ebbca
DE
66722014-02-19 Doug Evans <dje@google.com>
6673
6674 * dll.c (clear_dlls): Replace accessing list implemention details
6675 with API function.
6676 * gdbthread.h (get_first_thread): Declare.
6677 * inferiors.c (for_each_inferior_with_data): New function.
6678 (get_first_thread): New function.
6679 (find_thread_ptid): Simplify.
6680 (get_first_inferior): New function.
6681 (clear_list): Delete.
6682 (one_inferior_p): New function.
6683 (clear_inferior_list): New function.
6684 (clear_inferiors): Update.
6685 * inferiors.h (for_each_inferior_with_data): Declare.
6686 (clear_inferior_list): Declare.
6687 (one_inferior_p): Declare.
6688 (get_first_inferior): Declare.
6689 * linux-low.c (linux_wait_for_event): Replace accessing list
6690 implemention details with API function.
6691 * server.c (target_running): Ditto.
6692 (accumulate_file_name_length): New function.
6693 (emit_dll_description): New function.
6694 (handle_qxfer_libraries): Replace accessing list implemention
6695 details with API function.
6696 (handle_qxfer_threads_worker): New function.
6697 (handle_qxfer_threads_proper): Replace accessing list implemention
6698 details with API function.
6699 (handle_query): Ditto.
6700 (visit_actioned_threads_callback_ftype): New typedef.
6701 (visit_actioned_threads_data): New struct.
6702 (visit_actioned_threads): Rewrite to be find_inferior callback.
6703 (resume): Call find_inferior.
6704 (handle_status): Replace accessing list implemention
6705 details with API function.
6706 (process_serial_event): Replace accessing list implemention details
6707 with API function.
6708 * target.c (set_desired_inferior): Replace accessing list implemention
6709 details with API function.
6710 * tracepoint.c (same_process_p): New function.
6711 (gdb_agent_about_to_close): Replace accessing list implemention
6712 details with API function.
6713 * win32-low.c (child_delete_thread): Replace accessing list
6714 implemention details with API function.
6715 (match_dll_by_basename): New function.
6716 (dll_is_loaded_by_basename): New function.
6717 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6718 details call to dll_is_loaded_by_basename.
6719
80894984
DE
67202014-02-19 Doug Evans <dje@google.com>
6721
6722 * dll.h (struct dll_info): Add comment.
6723 * gdbthread.h (struct thread_info): Add comment.
6724 (current_ptid): Simplify.
6725 * inferiors.c (add_process): Update.
6726 (remove_process): Update.
6727 * inferiors.h (struct process_info): Rename member "head" to "entry".
6728 * linux-low.c (delete_lwp): Update.
6729 (add_lwp): Update.
6730 (last_thread_of_process_p): Update.
6731 (kill_one_lwp_callback, linux_kill): Update.
6732 (status_pending_p_callback): Update.
6733 (wait_for_sigstop): Update. Simplify read of ptid.
6734 (start_step_over): Update.
6735 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6736 (get_lwp_thread): Update.
6737 (struct lwp_info): Rename member "head" to "entry".
6738 * regcache.h (inferior_list_entry): Delete.
6739 * server.c (kill_inferior_callback): Update.
6740 (detach_or_kill_inferior_callback): Update.
6741 (print_started_pid): Update.
6742 (print_attached_pid): Update.
6743 (process_serial_event): Simplify read of ptid.
6744 * thread-db.c (thread_db_create_event): Update.
6745 (thread_db_get_tls_address): Update.
6746 * win32-low.c (current_inferior_ptid): Simplify.
6747
46917d26
TT
67482014-02-19 Tom Tromey <tromey@redhat.com>
6749
6750 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6751 argument.
6752 (target_supports_btrace): Update.
6753
0759a81e
YQ
67542014-02-14 Yao Qi <yao@codesourcery.com>
6755
6756 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6757 (rsp-low-ipa.o): New target.
6758
a7191e8b
TT
67592014-02-12 Tom Tromey <tromey@redhat.com>
6760
6761 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6762 convert_ascii_to_int.
6763 * regcache.c (registers_to_string): Likewise.
6764 * remote-utils.c (decode_M_packet): Likewise.
6765 * server.c (process_serial_event): Likewise.
6766
ff0e980e
TT
67672014-02-12 Tom Tromey <tromey@redhat.com>
6768
6769 * server.c (handle_query, handle_v_run): Use hex2bin, not
6770 unhexify.
6771 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6772
e9371aff
TT
67732014-02-12 Tom Tromey <tromey@redhat.com>
6774
6775 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6776 convert_int_to_ascii.
6777 * regcache.c (registers_to_string, collect_register_as_string):
6778 Likewise.
6779 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6780 Likewise.
6781 * server.c (process_serial_event): Likewise.
6782 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6783 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6784
971dc0b8
TT
67852014-02-12 Tom Tromey <tromey@redhat.com>
6786
6787 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6788 bin2hex, not hexify.
6789 * tracepoint.c (cmd_qtstatus): Likewise.
6790
0a822afb
TT
67912014-02-12 Tom Tromey <tromey@redhat.com>
6792
6793 * remote-utils.c (monitor_output): Pass explicit length to
6794 hexify.
6795
9c3d6531
TT
67962014-02-12 Tom Tromey <tromey@redhat.com>
6797
6798 * tracepoint.c: Include rsp-low.h.
6799 * server.c: Include rsp-low.h.
6800 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6801 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6802 declare.
6803 * remote-utils.c: Include rsp-low.h.
6804 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6805 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6806 (convert_int_to_ascii, convert_ascii_to_int): Move to
6807 common/rsp-low.c.
6808 * regcache.c: Include rsp-low.h.
6809 * ax.c: Include rsp-low.h.
6810 * Makefile.in (SFILES): Add common/rsp-low.c.
6811 (OBS): Add rsp-low.o.
6812 (rsp-low.o): New target.
6813
01fd3ea5
TT
68142014-02-12 Tom Tromey <tromey@redhat.com>
6815
6816 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6817 Include print-utils.h.
6818 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6819 (plongest, thirty_two, phex_nz): Remove.
6820 * Makefile.in (SFILES): Add common/print-utils.c.
6821 (OBS): Add print-utils.o.
6822 (print-utils-ipa.o): New target.
6823 (print-utils.o): New target.
6824 (IPA_OBJS): Add print-utils-ipa.o.
6825
e99dc820
TT
68262014-02-06 Tom Tromey <tromey@redhat.com>
6827
6828 * Makefile.in (SFILES): Fix indentation.
6829
ee1e2d4f
DE
68302014-02-05 Doug Evans <dje@google.com>
6831
6832 * linux-low.c (linux_wait_for_event): Improve comment.
6833 (linux_wait_1): Keep current_inferior in sync with event_child.
6834
f5a02773
DE
68352014-01-22 Doug Evans <dje@google.com>
6836
6837 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6838
87ce2a04
DE
68392014-01-22 Doug Evans <dje@google.com>
6840
6841 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6842 * configure: Regenerate.
6843 * config.in: Regenerate.
6844 * Makefile.in (SFILES): Add debug.c.
6845 (OBS): Add debug.o.
6846 * debug.c: New file.
6847 * debug.h: New file.
6848 * linux-aarch64-low.c (*): Update all debugging printfs to use
6849 debug_printf instead of fprintf.
6850 * linux-arm-low.c (*): Ditto.
6851 * linux-cris-low.c (*): Ditto.
6852 * linux-crisv32-low.c (*): Ditto.
6853 * linux-m32r-low.c (*): Ditto.
6854 * linux-sparc-low.c (*): Ditto.
6855 * linux-x86.c (*): Ditto.
6856 * linux-low.c (*): Ditto.
6857 (linux_wait_1): Add calls to debug_enter, debug_exit.
6858 (linux_wait): Remove redundant debugging printf.
6859 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6860 (linux_resume, unstop_all_lwps): Ditto.
6861 * mem-break.c (*): Update all debugging printfs to use
6862 debug_printf instead of fprintf.
6863 * remote-utils.c (*): Ditto.
6864 * thread-db.c (*): Ditto.
6865 * server.c #include <ctype.h>, "gdb_vecs.h".
6866 (debug_threads): Moved to debug.c.
6867 (*): Update all debugging printfs to use debug_printf instead of
6868 fprintf.
6869 (start_inferior): Replace call to fflush with call to debug_flush.
6870 (monitor_show_help): Mention set debug-format.
6871 (parse_debug_format_options): New function.
6872 (handle_monitor_command): Handle "monitor set debug-format".
6873 (gdbserver_usage): Mention --debug-format.
6874 (main): Parse --debug-format.
6875 * server.h (debug_threads): Declaration moved to debug.h.
6876 #include "debug.h".
6877 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6878 trace_debug_1 that uses debug_printf.
6879 (tracepoint_look_up_symbols): Update all debugging printfs to use
6880 debug_printf instead of fprintf.
6881
e671835b
BS
68822014-01-20 Baruch Siach <baruch@tkos.co.il>
6883
6884 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6885 sys/ptrace.h.
6886
b5737fa9
PA
68872014-01-17 Pedro Alves <palves@redhat.com>
6888
ea38d2a9 6889 PR build/16445
c7faa97a
PA
6890 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6891 defined after including gdb_proc_service.h.
b5737fa9 6892
40ed484e
DE
68932014-01-16 Doug Evans <dje@google.com>
6894
6895 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6896 (match_dll): Use it.
6897
969c39fb
MM
68982014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6899
6900 * target.h (target_ops) <read_btrace>: Change parameters and
6901 return type to allow error reporting.
6902 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6903 trace reading errors on.
6904 * linux-low.c (linux_low_read_btrace): Pass trace reading
6905 errors on.
6906 (linux_low_disable_btrace): New.
6907
ab7f45ba
DE
69082014-01-15 Doug Evans <dje@google.com>
6909
6910 * inferiors.c (thread_id_to_gdb_id): Delete.
6911 * inferiors.h (thread_id_to_gdb_id): Delete.
6912
66af0f44
EZ
69132014-01-13 Eli Zaretskii <eliz@gnu.org>
6914
6915 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6916 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6917 versions.
6918
9939e131
PA
69192014-01-08 Pedro Alves <palves@redhat.com>
6920
6921 * server.c (handle_status): Don't discard previous queued stop
6922 replies or thread's pending status here.
6923 (main) <disconnection>: Do it here instead.
6924
b7ea362b
PA
69252014-01-08 Pedro Alves <palves@redhat.com>
6926
6927 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6928 * server.c (visit_actioned_threads, handle_pending_status): New
6929 function.
6930 (handle_v_cont): Factor out parts to ...
6931 (resume): ... this new function. If in all-stop, and a thread
6932 being resumed has a pending status, report it without actually
6933 resuming.
6934 (myresume): Adjust to use the new 'resume' function.
6935 (clear_pending_status_callback, set_pending_status_callback)
6936 (find_status_pending_thread_callback): New functions.
6937 (handle_status): Handle the case of multiple threads having
6938 interesting statuses to report. Report threads' real last signal
6939 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6940 with an interesting thread to report the status for, instead of
6941 always reporting the status of the first thread.
6942
28498c42
JB
69432014-01-01 Joel Brobecker <brobecker@adacore.com>
6944
6945 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6946 * gdbreplay.c (gdbreplay_version): Likewise.
6947
f45c82da
YZ
69482013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6949
6950 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6951 iov.iov_len with the real length in use.
6952
379a5e2d
JB
69532013-12-13 Joel Brobecker <brobecker@adacore.com>
6954
6955 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6956 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6957 for all targets that use win32-low.c.
6958 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6959 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6960
4210d83e
PA
69612013-12-13 Pedro Alves <palves@redhat.com>
6962
6963 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6964 if equal to TARGET_WAITKIND_LOADED.
6965 * win32-low.c (cached_status): New static global.
6966 (win32_wait): Add declaration.
6967 (do_initial_child_stuff): Flush all initial pending debug events
6968 up to the initial breakpoint.
6969 (win32_wait): If CACHED_STATUS was set, return that instead
6970 of doing a real wait. Remove the code resuming the execution
6971 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6972 during the initial phase. Also remove the code changing
6973 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6974 TARGET_WAITKIND_STOPPED.
6975
e7f0d979
YQ
69762013-12-11 Yao Qi <yao@codesourcery.com>
6977
6978 * notif.c (handle_notif_ack): Return 0 if no notification
6979 matches.
6980
ebcf782c
DE
69812013-11-20 Doug Evans <dje@google.com>
6982
6983 * linux-low.c (linux_set_resume_request): Fix comment.
6984
20ad9378
DE
69852013-11-20 Doug Evans <dje@google.com>
6986
6987 * linux-low.c (resume_status_pending_p): Tweak comment.
6988
a196ebeb
WT
69892013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6990
6991 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6992 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6993 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6994 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6995 (srv_amd64_regobj): Add amd64-mpx.o.
6996 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6997 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6998 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6999 * i387-fp.c (num_pl_bnd_register) Added constant.
7000 (num_pl_bnd_cfg_registers) Added constant.
7001 (struct i387_xsave) Added reserved area and MPX fields.
7002 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7003 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7004 function.
7005 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7006 (init_registers_amd64_mpx_linux): Declare new function.
7007 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7008 (x86_64_regmap): Add MPX registers.
7009 (x86_linux_read_description): Add MPX case.
7010 (initialize_low_arch): Initialize MPX targets.
7011
0080a2f6
TT
70122013-11-18 Tom Tromey <tromey@redhat.com>
7013
7014 * configure: Rebuild.
7015 * configure.ac: Don't check for stdlib.h.
7016 * gdbreplay.c: Unconditionally include stdlib.h.
7017
2978b111
TT
70182013-11-18 Tom Tromey <tromey@redhat.com>
7019
7020 * config.in: Rebuild.
7021 * configure: Rebuild.
7022 * configure.ac: Don't use AC_HEADER_DIRENT.
7023
a3d08894
TT
70242013-11-18 Tom Tromey <tromey@redhat.com>
7025
7026 * server.h: Don't check HAVE_STRING_H.
7027 * gdbreplay.c: Don't check HAVE_STRING_H.
7028 * configure: Rebuild.
7029
0a5dd17d
TT
70302013-11-18 Tom Tromey <tromey@redhat.com>
7031
7032 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7033 LIBGNU.
7034
1bd2f0ba
TT
70352013-11-08 Tom Tromey <tromey@redhat.com>
7036
7037 * configure, config.in: Rebuild.
7038 * configure.ac: Remove unused configury.
7039
3266f10b
TT
70402013-11-08 Tom Tromey <tromey@redhat.com>
7041
7042 * acinclude.m4: Include common.m4, codeset.m4.
7043 * configure, config.in: Rebuild.
7044 * configure.ac: Use GDB_AC_COMMON.
7045
6682d959
AA
70462013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7047
7048 * linux-s390-low.c (HWCAP_S390_TE): New define.
7049 (s390_arch_setup): Consider the TE field in the HWCAP for
7050 determining 'have_regset_tdb'.
7051
fd0a4d76
SDJ
70522013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7053
7054 PR gdb/16014
7055 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7056 call to sizeof.
7057
1a3d890b
PA
70582013-10-02 Pedro Alves <palves@redhat.com>
7059
7060 * server.c (process_serial_event): Don't output "GDBserver
7061 exiting" if GDB is connected through stdio.
7062 * target.c (mywait): Likewise, be silent if GDB is connected
7063 through stdio.
7064
97ad4581
JB
70652013-10-01 Joel Brobecker <brobecker@adacore.com>
7066
7067 * lynx-low.c (lynx_add_threads_after_attach): New function.
7068 (lynx_attach): Remove call to add_thread. Add call to
7069 lynx_add_threads_after_attach instead.
7070
5b4e221c
MF
70712013-09-28 Mike Frysinger <vapier@gentoo.org>
7072
7073 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7074 * config.in, configure: Regenerated.
7075
ee47b2f8
YQ
70762013-09-18 Yao Qi <yao@codesourcery.com>
7077
7078 PR server/15959
7079 * server.c (start_inferior): Clear 'resume_info'.
7080
d6707650 70812013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7082
d6707650
JW
7083 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7084 for each register.
7085
9243dd0e 70862013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7087
9243dd0e
JW
7088 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7089 linux-tile-low.o to srv_tgtobj.
7090
c623a6ef
WN
70912013-09-16 Will Newton <will.newton@linaro.org>
7092
7093 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7094 out regs.
7095
fb71d39e
PA
70962013-09-06 Pedro Alves <palves@redhat.com>
7097
7098 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7099 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7100 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7101 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7102 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7103 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7104
8e7e9910
PA
71052013-09-06 Pedro Alves <palves@redhat.com>
7106
7107 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7108 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7109
7c3a12ca
PA
71102013-09-06 Pedro Alves <palves@redhat.com>
7111
7112 * linux-amd64-ipa.c: Include tracepoint.h.
7113 * linux-i386-ipa.c: Include tracepoint.h.
7114
8eb3d7b6
RW
71152013-09-06 Ricard Wanderlof <ricardw@axis.com>
7116
7117 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7118 (ps_get_thread_area): New function.
7119
eddddb9d
RW
71202013-09-06 Ricard Wanderlof <ricardw@axis.com>
7121
7122 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7123 (initialize_low_arch): Call init_registers_crisv32 rather than
7124 init_register_crisv32.
7125
533b0600
PA
71262013-09-05 Pedro Alves <palves@redhat.com>
7127
7128 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7129 to ...
7130 * hostio.h: ... this new file.
7131 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7132 win32-low.c: Include hostio.h.
7133
0ce3d3b5
PA
71342013-09-05 Pedro Alves <palves@redhat.com>
7135
7136 * server.h (gdb_client_data, handler_func, callback_handler_func)
7137 (delete_file_handler, add_file_handler, append_callback_event)
7138 (delete_callback_event, start_event_loop, initialize_event_loop):
7139 Move to event-loop.h and include it.
7140 * event-loop.h: New file.
7141
799cdc37
PA
71422013-09-05 Pedro Alves <palves@redhat.com>
7143
7144 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7145 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7146 (loaded_dll, unloaded_dll): Move to ...
7147 * dll.h: ... this new file.
7148 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7149
6a6bbd9d
PA
71502013-09-05 Pedro Alves <palves@redhat.com>
7151
7152 * server.h (current_process, get_thread_process, all_processes)
7153 (add_inferior_to_list, for_each_inferior, current_inferior)
7154 (remove_inferior, add_process, remove_process, find_process_pid)
7155 (have_started_inferiors_p, have_attached_inferiors_p)
7156 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7157 (clear_inferiors, find_inferior, find_inferior_id)
7158 (inferior_target_data, set_inferior_target_data)
7159 (inferior_regcache_data, set_inferior_regcache_data): Move to
7160 inferiors.h, and include it.
7161 * inferiors.h: New file.
7162
f699aaba
PA
71632013-09-05 Pedro Alves <palves@redhat.com>
7164
7165 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7166 Move ...
72f4393d 7167 * ax.h: ... here.
f699aaba 7168
c144c7a0
PA
71692013-09-05 Pedro Alves <palves@redhat.com>
7170
7171 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7172 tracepoint.h.
7173 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7174 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7175 (handle_tracepoint_general_set, handle_tracepoint_query)
7176 (tracepoint_finished_step, tracepoint_was_hit)
7177 (release_while_stepping_state_list, current_traceframe)
7178 (in_readonly_region, traceframe_read_mem)
7179 (fetch_traceframe_registers, traceframe_read_sdata)
7180 (traceframe_read_info, struct fast_tpoint_collect_status)
7181 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7182 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7183 (supply_fast_tracepoint_registers)
7184 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7185 (ipa_tdesc, claim_trampoline_space)
7186 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7187 (agent_mem_read, agent_get_trace_state_variable_value)
7188 (agent_set_trace_state_variable_value, agent_tsv_read)
7189 (agent_mem_read_string, get_raw_reg_func_addr)
7190 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7191 * tracepoint.h: ... this new file.
7192
ff42e6ab
PA
71932013-09-05 Pedro Alves <palves@redhat.com>
7194
7195 * server.h (perror_with_name, error, fatal, warning, paddress)
7196 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7197 include it.
7198 * utils.h: New file.
7199
541af0f4
PA
72002013-09-05 Pedro Alves <palves@redhat.com>
7201
7202 * server.h (remote_debug, noack_mode, transport_is_reliable)
7203 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7204 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7205 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7206 (write_enn, initialize_async_io, enable_async_io)
7207 (disable_async_io, check_remote_input_interrupt_request)
7208 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7209 (dead_thread_notify, prepare_resume_reply)
7210 (decode_address_to_semicolon, decode_address, decode_m_packet)
7211 (decode_M_packet, decode_X_packet, decode_xfer_write)
7212 (decode_search_memory_packet, unhexify, hexify)
7213 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7214 (look_up_one_symbol, relocate_instruction)
7215 (monitor_output): Move to remote-utils.h, and include it.
7216 * remote-utils.h: New file.
7217
eebdf26b
PA
72182013-09-05 Pedro Alves <palves@redhat.com>
7219
7220 * server.h (_): Delete.
7221
3aafd2ff
PA
72222013-09-02 Pedro Alves <palves@redhat.com>
7223
7224 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7225 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7226 allocated.
7227 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7228
cee83bcb
PM
72292013-09-02 Pierre Muller <muller@sourceware.org>
7230
7231 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7232 or WriteProcessMemory complete successfully and handle
7233 ERROR_PARTIAL_COPY error.
7234
9a13b2fa
PA
72352013-09-02 Pedro Alves <palves@redhat.com>
7236
7237 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7238 error instead of EIO.
7239
602e3198
JK
72402013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7241
7242 PR server/15604
7243 * linux-low.c: Include filestuff.h.
7244 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7245 * lynx-low.c: Include filestuff.h.
7246 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7247 * server.c: Include filestuff.h.
7248 (main): Call notice_open_fds.
7249 * spu-low.c: Include filestuff.h.
7250 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7251
96d7229d
LM
72522013-08-22 Luis Machado <lgustavo@codesourcery.com>
7253
7254 * Makefile.in: Explain why ../target and ../nat are not
7255 listed as include file search paths.
7256 (linux-waitpid.o): New object file rule.
7257 * configure.srv (srv_native_linux_obj): New variable.
7258 Replace all occurrences of linux native object files with
7259 $srv_native_linux_obj.
7260 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7261 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7262 (linux_enable_event_reporting): Remove declaration.
7263 (my_waitpid): Moved to common/linux-waitpid.c.
7264 (linux_wait_for_event): Pass ptid when calling
7265 linux_enable_event_reporting.
7266 (linux_supports_tracefork_flag): Remove.
7267 (linux_enable_event_reporting): Likewise.
7268 (linux_tracefork_grandchild): Remove.
7269 (STACK_SIZE): Moved to common/linux-ptrace.c.
7270 (linux_tracefork_child): Remove.
7271 (linux_test_for_tracefork): Remove.
7272 (linux_look_up_symbols): Call linux_supports_traceclone.
7273 (initialize_low): Remove call to linux_test_for_tracefork.
7274 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7275 common/linux-ptrace.h.
7276 (PTRACE_TYPE_ARG4): Likewise.
7277 Include linux-ptrace.h.
7278
32940073
PA
72792013-08-21 Pedro Alves <palves@redhat.com>
7280
7281 * config.in: Renegerate.
7282
33b60d58 72832013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 7284
33b60d58
LM
7285 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7286 (SFILES): Remove $(srcdir)/common/target-common.c and
7287 add $(srcdir)/target/waitstatus.c.
7288 (OBS): Remove target-common.o and add waitstatus.o.
7289 (server_h): Remove $(srcdir)/../common/target-common.h and
7290 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7291 and $(srcdir)/../target/waitstatus.h.
7292 (target-common.o): Remove.
7293 (waitstatus.o): New target object file.
7294 * target.h: Do not include target-common.h and
7295 include target/resume.h, target/wait.h and
7296 target/waitstatus.h.
7297
b8e1b30e
LM
72982013-08-13 Luis Machado <lgustavo@codesourcery.com>
7299
7300 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7301 to PTRACE_TYPE_ARG3.
7302 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7303 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7304 PTRACE_TYPE_ARG4.
7305 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7306 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7307
7a60ad40
YQ
73082013-07-27 Jie Zhang <jie@codesourcery.com>
7309 Daniel Jacobowitz <dan@codesourcery.com>
7310 Yao Qi <yao@codesourcery.com>
7311
7312 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7313 (mips-linux-watch.o): New rule.
7314 (mips_linux_watch_h): New variable.
7315 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7316 srv_tgtobj.
7317 * linux-mips-low.c: Include mips-linux-watch.h.
7318 (struct arch_process_info, struct arch_lwp_info): New.
7319 (update_watch_registers_callback): New function.
7320 (mips_linux_new_process, mips_linux_new_thread) New functions.
7321 (mips_linux_prepare_to_resume, mips_insert_point): New
7322 functions.
7323 (mips_remove_point, mips_stopped_by_watchpoint): New
7324 functions.
7325 (rsp_bp_type_to_target_hw_bp_type): New function.
7326 (mips_stopped_data_address): New function.
7327 (the_low_target): Add watchpoint support functions.
7328
de6f69ad
YQ
73292013-07-27 Yao Qi <yao@codesourcery.com>
7330
7331 * i386-low.c: Include break-common.h.
7332 (enum target_hw_bp_type): Remove.
7333
3360c0bf
LM
73342013-07-24 Luis Machado <lgustavo@codesourcery.com>
7335
7336 * Makefile.in (SFILES): /common/target-common.c.
7337 (OBS): Add target-common.o.
7338 (server_h): Add $(srcdir)/../common/target-common.h.
7339 (target-common.o): New target.
7340 * server.c (queue_stop_reply_callback): Free
7341 status string after use.
7342 * target.c (target_waitstatus_to_string): Remove.
7343 * target.h: Include target-common.h.
7344 (resume_kind): Likewise.
7345 (target_waitkind): Likewise.
7346 (target_waitstatus): Likewise.
7347 (TARGET_WNOHANG): Likewise.
7348
bd885420
YQ
73492013-07-04 Yao Qi <yao@codesourcery.com>
7350
7351 * Makefile.in (host_alias): Use @host_noncanonical@.
7352 (target_alias): Use @target_noncanonical@.
7353 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7354 ACX_NONCANONICAL_HOST.
7355 * configure: Regenerated.
7356
7357 Revert:
7358 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7359
7360 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7361 * configure: Rebuild.
7362 * Makefile.in (version_host, version_target): Get from configure.
7363 (version.c): Use $(version_host) and $(version_target).
7364
17ef446e
PA
73652013-07-03 Pedro Alves <palves@redhat.com>
7366
7367 * Makefile.in (config.status): Depend on development.sh.
7368 * acinclude.m4: Include libmcheck.m4.
7369 * configure: Regenerate.
7370
7a9a7487
MG
73712013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7372
7373 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7374 attribute inside the parentheses.
7375 (winapi_DebugSetProcessKillOnExit): Ditto.
7376 (winapi_DebugBreakProcess): Ditto.
7377 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7378
49b64de6
MG
73792013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7380
7381 * notif.h (notif_event): Add a dummy member to avoid compiler
7382 errors.
7383
d5749ee7
PA
73842013-07-01 Pedro Alves <palves@redhat.com>
7385
7386 * hostio.c (HOSTIO_PATH_MAX): Define.
7387 (require_filename, handle_open, handle_unlink, handle_readlink):
7388 Use it.
7389
d8d2a3ee
PA
73902013-07-01 Pedro Alves <palves@redhat.com>
7391
7392 * server.h: Include "pathmax.h".
7393 * linux-low.c: Don't include sys/param.h.
7394 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7395 MAXPATHLEN.
7396 * win32-low.c: Don't include sys/param.h.
7397 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7398
bc7dea8d
PA
73992013-07-01 Pedro Alves <palves@redhat.com>
7400
7401 * event-loop.c: Don't check HAVE_UNISTD_H before including
7402 <unistd.h>.
7403 * gdbreplay.c: Likewise.
7404 * remote-utils.c: Likewise.
7405 * server.c: Likewise.
7406 * configure.ac: Don't check for unistd.h.
7407 * configure: Regenerate.
7408
d6c2da54
TT
74092013-06-28 Tom Tromey <tromey@redhat.com>
7410
7411 * Makefile.in (version.c): Use version.in, not
7412 common/version.in.
7413
257b6bec
MG
74142013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7415
7416 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7417 * configure: Rebuild.
7418 * Makefile.in (version_host, version_target): Get from configure.
7419 (version.c): Use $(version_host) and $(version_target).
7420
86ebe149
DK
74212013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7422
7423 Fix trace-status to output user name without trailing colon.
7424 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7425
f30aa5af
DK
74262013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7427
7428 Fix trace-status to output proper start-time and stop-time.
7429 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7430 output start time and stop time in hex as gdb expects.
7431
28a93511
YQ
74322013-06-26 Pedro Alves <pedro@codesourcery.com>
7433
7434 * tracepoint.c (build_traceframe_info_xml): Output trace state
7435 variables present in the trace buffer.
7436
01208463
TT
74372013-06-24 Tom Tromey <tromey@redhat.com>
7438
7439 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7440 create-version.sh.
7441 (version.o): Remove.
7442 * gdbreplay.c: Include version.h.
7443 (version, host_name): Don't declare.
7444 * server.h: Include version.h.
7445 (version, host_name): Don't declare.
7446
760256f9
PA
74472013-06-12 Pedro Alves <palves@redhat.com>
7448
7449 * linux-x86-low.c (linux_is_elf64): Delete global.
7450 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7451 with local linux_pid_exe_is_elf_64_file use.
7452
030031ee
PA
74532013-06-11 Pedro Alves <palves@redhat.com>
7454
7455 * linux-low.c (regset_disabled, disable_regset): New functions.
7456 (regsets_fetch_inferior_registers)
7457 (regsets_store_inferior_registers): Use them.
7458 (initialize_regsets_info); Don't allocate the disabled_regsets
7459 array here.
7460 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7461 comment.
7462
5da6eb0a
PA
74632013-06-11 Pedro Alves <palves@redhat.com>
7464
7465 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7466 xmalloc.
7467
7e5aaa09
PA
74682013-06-11 Pedro Alves <palves@redhat.com>
7469
7470 * linux-x86-low.c (initialize_low_arch): Call
7471 init_registers_x32_avx_linux.
7472
d878444c
JK
74732013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7474
7475 Fix compatibility with Android Bionic.
7476 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7477 it is not empty.
7478
3aee8918
PA
74792013-06-07 Pedro Alves <palves@redhat.com>
7480
5f2b57b5 7481 PR server/14823
3aee8918
PA
7482 * Makefile.in (OBS): Add tdesc.o.
7483 (IPA_OBJS): Add tdesc-ipa.o.
7484 (tdesc-ipa.o): New rule.
7485 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7486 interface.
7487 * linux-low.c (new_inferior): Delete.
7488 (disabled_regsets, num_regsets): Delete.
7489 (linux_add_process): Adjust to set the new per-process
7490 new_inferior flag.
7491 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7492 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7493 was a stop. When calling arch_setup, switch the current inferior
7494 to the thread that got an event.
7495 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7496 (regsets_fetch_inferior_registers)
7497 (regsets_store_inferior_registers): New regsets_info parameter.
7498 Adjust to use it.
7499 (linux_register_in_regsets): New regs_info parameter. Adjust to
7500 use it.
7501 (register_addr, fetch_register, store_register): New usrregs_info
7502 parameter. Adjust to use it.
7503 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7504 parameter regs_info. Adjust to use it.
7505 (linux_fetch_registers): Get the current inferior's regs_info, and
7506 adjust to use it.
7507 (linux_store_registers): Ditto.
7508 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7509 (initialize_low): Don't initialize the target_regsets here. Call
7510 initialize_low_arch.
7511 * linux-low.h (target_regsets): Delete declaration.
7512 (struct regsets_info): New.
7513 (struct usrregs_info): New.
7514 (struct regs_info): New.
7515 (struct process_info_private) <new_inferior>: New field.
7516 (struct linux_target_ops): Delete the num_regs, regmap, and
7517 regset_bitmap fields. New field regs_info.
7518 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7519 * i387-fp.c (num_xmm_registers): Delete.
7520 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7521 calls to new interface.
7522 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7523 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7524 Infer the number of xmm registers from the regcache's target
7525 description.
7526 * i387-fp.h (num_xmm_registers): Delete.
7527 * inferiors.c (add_thread): Don't install the thread's regcache
7528 here.
7529 * proc-service.c (gregset_info): Fetch the current inferior's
7530 regs_info. Adjust to use it.
7531 * regcache.c: Include tdesc.h.
7532 (register_bytes, reg_defs, num_registers)
7533 (gdbserver_expedite_regs): Delete.
7534 (get_thread_regcache): If the thread doesn't have a regcache yet,
7535 create one, instead of aborting gdbserver.
7536 (regcache_invalidate_one): Rename to ...
7537 (regcache_invalidate_thread): ... this.
7538 (regcache_invalidate_one): New.
7539 (regcache_invalidate): Only invalidate registers of the current
7540 process.
7541 (init_register_cache): Add target_desc parameter, and use it.
7542 (new_register_cache): Ditto. Assert the target description has a
7543 non zero registers_size.
7544 (regcache_cpy): Add assertions. Adjust.
7545 (realloc_register_cache, set_register_cache): Delete.
7546 (registers_to_string, registers_from_string): Adjust.
7547 (find_register_by_name, find_regno, find_register_by_number)
7548 (register_cache_size): Add target_desc parameter, and use it.
7549 (free_register_cache_thread, free_register_cache_thread_one)
7550 (regcache_release, register_cache_size): New.
7551 (register_size): Add target_desc parameter, and use it.
7552 (register_data, supply_register, supply_register_zeroed)
7553 (supply_regblock, supply_register_by_name, collect_register)
7554 (collect_register_as_string, collect_register_by_name): Adjust.
7555 * regcache.h (struct target_desc): Forward declare.
7556 (struct regcache) <tdesc>: New field.
7557 (init_register_cache, new_register_cache): Add target_desc
7558 parameter.
7559 (regcache_invalidate_thread): Declare.
7560 (regcache_invalidate_one): Delete declaration.
7561 (regcache_release): Declare.
7562 (find_register_by_number, register_cache_size, register_size)
7563 (find_regno): Add target_desc parameter.
7564 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7565 declarations.
7566 * remote-utils.c: Include tdesc.h.
7567 (outreg, prepare_resume_reply): Adjust.
7568 * server.c: Include tdesc.h.
7569 (gdbserver_xmltarget): Delete declaration.
7570 (get_features_xml, process_serial_event): Adjust.
7571 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7572 declare.
7573 (struct process_info) <tdesc>: New field.
7574 (ipa_tdesc): Declare.
7575 * tdesc.c: New file.
7576 * tdesc.h: New file.
7577 * tracepoint.c: Include tdesc.h.
7578 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7579 (get_context_regcache): Adjust to pass ipa_tdesc down.
7580 (do_action_at_tracepoint): Adjust to get the register cache size
7581 from the context regcache's description.
7582 (traceframe_walk_blocks): Adjust to get the register cache size
7583 from the current trace frame's description.
7584 (traceframe_get_pc): Adjust to get current trace frame's
7585 description and pass it down.
7586 (gdb_collect): Adjust to get the register cache size from the
7587 IPA's description.
7588 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7589 (gdbserver_xmltarget): Delete.
7590 (initialize_low_tracepoint): Set the ipa's target description.
7591 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7592 (initialize_low_tracepoint): Set the ipa's target description.
7593 * linux-x86-low.c: Include tdesc.h.
7594 [__x86_64__] (is_64bit_tdesc): New.
7595 (ps_get_thread_area, x86_get_thread_area): Use it.
7596 (i386_cannot_store_register): Rename to ...
7597 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7598 (i386_cannot_fetch_register): Rename to ...
7599 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7600 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7601 to new interface.
7602 (target_regsets): Rename to ...
7603 (x86_regsets): ... this.
7604 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7605 interface.
7606 (x86_siginfo_fixup): Use is_64bit_tdesc.
7607 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7608 (tdesc_x32_avx_linux, tdesc_x32_linux)
7609 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7610 Declare.
7611 (x86_linux_update_xmltarget): Delete.
7612 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7613 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7614 (AMD64_LINUX_USER64_CS): New.
7615 (x86_linux_read_description): New, based on
7616 x86_linux_update_xmltarget.
7617 (same_process_callback): New.
7618 (x86_arch_setup_process_callback): New.
7619 (x86_linux_update_xmltarget): New.
7620 (x86_regsets_info): New.
7621 (amd64_linux_regs_info): New.
7622 (i386_linux_usrregs_info): New.
7623 (i386_linux_regs_info): New.
7624 (x86_linux_regs_info): New.
7625 (x86_arch_setup): Reimplement.
7626 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7627 (x86_emit_ops): Ditto.
7628 (the_low_target): Adjust. Install x86_linux_regs_info,
7629 x86_cannot_fetch_register, and x86_cannot_store_register.
7630 (initialize_low_arch): New.
7631 * linux-ia64-low.c (tdesc_ia64): Declare.
7632 (ia64_fetch_register): Adjust.
7633 (ia64_usrregs_info, regs_info): New globals.
7634 (ia64_regs_info): New function.
7635 (the_low_target): Adjust.
7636 (initialize_low_arch): New function.
7637 * linux-sparc-low.c (tdesc_sparc64): Declare.
7638 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7639 Adjust.
7640 (sparc_arch_setup): New function.
7641 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7642 (the_low_target): Adjust.
7643 (initialize_low_arch): New function.
7644 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7645 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7646 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7647 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7648 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7649 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7650 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7651 (tdesc_powerpc_isa205_vsx64l): Declare.
7652 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7653 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7654 (ppc_set_pc, ppc_get_hwcap): Adjust.
7655 (ppc_usrregs_info): Forward declare.
7656 (!__powerpc64__) ppc_regmap_adjusted: New global.
7657 (ppc_arch_setup): Adjust to the current process'es target
7658 description.
7659 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7660 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7661 (ppc_store_evrregset): Adjust.
7662 (target_regsets): Rename to ...
7663 (ppc_regsets): ... this, and make static.
7664 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7665 (ppc_regs_info): New function.
7666 (the_low_target): Adjust.
7667 (initialize_low_arch): New function.
7668 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7669 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7670 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7671 (tdesc_s390x_linux64v2): Declare.
7672 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7673 (s390_fill_gregset, s390_store_last_break): Adjust.
7674 (target_regsets): Rename to ...
7675 (s390_regsets): ... this, and make static.
7676 (s390_get_pc, s390_set_pc): Adjust.
7677 (s390_get_hwcap): New target_desc parameter, and use it.
7678 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7679 (s390_arch_setup): Adjust to set the current process'es target
7680 description. Don't adjust the regmap.
7681 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7682 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7683 (regs_info_3264): New globals.
7684 (s390_regs_info): New function.
7685 (the_low_target): Adjust.
7686 (initialize_low_arch): New function.
7687 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7688 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7689 [__mips64] (init_registers_mips_linux)
7690 (init_registers_mips_dsp_linux): Delete defines.
7691 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7692 (have_dsp): New global.
7693 (mips_read_description): New, based on mips_arch_setup.
7694 (mips_arch_setup): Reimplement.
7695 (get_usrregs_info): New function.
7696 (mips_cannot_fetch_register, mips_cannot_store_register)
7697 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7698 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7699 (target_regsets): Rename to ...
7700 (mips_regsets): ... this, and make static.
7701 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7702 (dsp_regs_info, regs_info): New globals.
7703 (mips_regs_info): New function.
7704 (the_low_target): Adjust.
7705 (initialize_low_arch): New function.
7706 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7707 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7708 Declare.
7709 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7710 (arm_read_description): New, with bits factored from
7711 arm_arch_setup.
7712 (arm_arch_setup): Reimplement.
7713 (target_regsets): Rename to ...
7714 (arm_regsets): ... this, and make static.
7715 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7716 (arm_regs_info): New function.
7717 (the_low_target): Adjust.
7718 (initialize_low_arch): New function.
7719 * linux-m68k-low.c (tdesc_m68k): Declare.
7720 (target_regsets): Rename to ...
7721 (m68k_regsets): ... this, and make static.
7722 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7723 (m68k_regs_info): New function.
7724 (m68k_arch_setup): New function.
7725 (the_low_target): Adjust.
7726 (initialize_low_arch): New function.
7727 * linux-sh-low.c (tdesc_sharch): Declare.
7728 (target_regsets): Rename to ...
7729 (sh_regsets): ... this, and make static.
7730 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7731 (sh_regs_info, sh_arch_setup): New functions.
7732 (the_low_target): Adjust.
7733 (initialize_low_arch): New function.
7734 * linux-bfin-low.c (tdesc_bfin): Declare.
7735 (bfin_arch_setup): New function.
7736 (bfin_usrregs_info, regs_info): New globals.
7737 (bfin_regs_info): New function.
7738 (the_low_target): Adjust.
7739 (initialize_low_arch): New function.
7740 * linux-cris-low.c (tdesc_cris): Declare.
7741 (cris_arch_setup): New function.
7742 (cris_usrregs_info, regs_info): New globals.
7743 (cris_regs_info): New function.
7744 (the_low_target): Adjust.
7745 (initialize_low_arch): New function.
7746 * linux-cris-low.c (tdesc_crisv32): Declare.
7747 (cris_arch_setup): New function.
7748 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7749 (cris_regs_info): New function.
7750 (the_low_target): Adjust.
7751 (initialize_low_arch): New function.
7752 * linux-m32r-low.c (tdesc_m32r): Declare.
7753 (m32r_arch_setup): New function.
7754 (m32r_usrregs_info, regs_info): New globals.
7755 (m32r_regs_info): Adjust.
7756 (initialize_low_arch): New function.
7757 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7758 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7759 (tic6x_usrregs_info): Forward declare.
7760 (tic6x_read_description): New function, based on ...
7761 (tic6x_arch_setup): ... this. Reimplement.
7762 (target_regsets): Rename to ...
7763 (tic6x_regsets): ... this, and make static.
7764 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7765 (tic6x_regs_info): New function.
7766 (the_low_target): Adjust.
7767 (initialize_low_arch): New function.
7768 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7769 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7770 (target_regsets): Rename to ...
7771 (xtensa_regsets): ... this, and make static.
7772 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7773 globals.
7774 (xtensa_arch_setup, xtensa_regs_info): New functions.
7775 (the_low_target): Adjust.
7776 (initialize_low_arch): New function.
7777 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7778 (nios2_arch_setup): Set the current process'es tdesc.
7779 (target_regsets): Rename to ...
7780 (nios2_regsets): ... this.
7781 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7782 (nios2_regs_info): New function.
7783 (the_low_target): Adjust.
7784 (initialize_low_arch): New function.
a261b8f5
PA
7785 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7786 (aarch64_arch_setup): Set the current process'es tdesc.
7787 (target_regsets): Rename to ...
7788 (aarch64_regsets): ... this.
7789 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7790 (aarch64_regs_info): New function.
7791 (the_low_target): Adjust.
7792 (initialize_low_arch): New function.
3aee8918
PA
7793 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7794 globals.
7795 (target_regsets): Rename to ...
7796 (tile_regsets): ... this.
7797 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7798 (tile_regs_info): New function.
7799 (tile_arch_setup): Set the current process'es tdesc.
7800 (the_low_target): Adjust.
7801 (initialize_low_arch): New function.
7802 * spu-low.c (tdesc_spu): Declare.
7803 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7804 * win32-arm-low.c (tdesc_arm): Declare.
7805 (arm_arch_setup): New function.
7806 (the_low_target): Install arm_arch_setup instead of
7807 init_registers_arm.
7808 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7809 (init_windows_x86): Rename to ...
7810 (i386_arch_setup): ... this. Set `win32_tdesc'.
7811 (the_low_target): Adjust.
7812 * win32-low.c (win32_tdesc): New global.
7813 (child_add_thread): Don't create the thread cache here.
7814 (do_initial_child_stuff): Set the new process'es tdesc.
7815 * win32-low.h (struct target_desc): Forward declare.
7816 (win32_tdesc): Declare.
7817 * lynx-i386-low.c (tdesc_i386): Declare global.
7818 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7819 * lynx-low.c (lynx_tdesc): New global.
7820 (lynx_add_process): Set the new process'es tdesc.
7821 * lynx-low.h (struct target_desc): Forward declare.
7822 (lynx_tdesc): Declare global.
7823 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7824 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7825 * nto-low.c (nto_tdesc): New global.
7826 (do_attach): Set the new process'es tdesc.
7827 * nto-low.h (struct target_desc): Forward declare.
7828 (nto_tdesc): Declare.
7829 * nto-x86-low.c (tdesc_i386): Declare.
7830 (nto_x86_arch_setup): Set `nto_tdesc'.
7831
b1fbec62
GB
78322013-06-04 Gary Benson <gbenson@redhat.com>
7833
7834 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7835 to qSupported response when appropriate.
7836 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7837 with nonzero-length annex.
7838 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7839 arguments supplied in annex.
7840
d1ec4ce7
DE
78412013-05-31 Doug Evans <dje@google.com>
7842
ac44adcb 7843 PR server/15594
d1ec4ce7
DE
7844 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7845 64 bits in 64-cross-32 environment.
7846
9b25f2d3
PA
78472013-05-28 Pedro Alves <palves@redhat.com>
7848
7849 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7850 (aarch64-without-fpu.c): Delete rule.
7851 * configure.srv (aarch64*-*-linux*): Remove references to
7852 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7853 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7854 declaration.
7855
6740dc9c
PA
78562013-05-24 Pedro Alves <palves@redhat.com>
7857
7858 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7859 instead of strchr/decode_address. Error if the range isn't split
7860 with a ','. Don't assume there's be a ':' in the action.
7861
c2d6af84
PA
78622013-05-23 Yao Qi <yao@codesourcery.com>
7863 Pedro Alves <palves@redhat.com>
7864
7865 * linux-low.c (lwp_in_step_range): New function.
7866 (linux_wait_1): If the thread was range stepping and stopped
7867 outside the stepping range, report the stop to GDB. Otherwise,
7868 continue stepping. Add range stepping debug output.
7869 (linux_set_resume_request): Copy the step range from the resume
7870 request to the lwp.
7871 (linux_supports_range_stepping): New.
7872 (linux_target_ops) <supports_range_stepping>: Set to
7873 linux_supports_range_stepping.
7874 * linux-low.h (struct linux_target_ops)
7875 <supports_range_stepping>: New field.
7876 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7877 * linux-x86-low.c (x86_supports_range_stepping): New.
7878 (the_low_target) <supports_range_stepping>: Set to
7879 x86_supports_range_stepping.
7880 * server.c (handle_v_cont): Handle 'r' action.
7881 (handle_v_requests): Append ";r" if the target supports range
7882 stepping.
7883 * target.h (struct thread_resume) <step_range_start,
7884 step_range_end>: New fields.
7885 (struct target_ops) <supports_range_stepping>:
7886 New field.
7887 (target_supports_range_stepping): New macro.
7888
58794e1a
JB
78892013-05-17 Joel Brobecker <brobecker@adacore.com>
7890
7891 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7892 confusion in comment.
7893
d631c5a7
JB
78942013-05-17 Joel Brobecker <brobecker@adacore.com>
7895
7896 * lynx-low.c (struct process_info_private): New type.
7897 (lynx_add_process): New function.
7898 (lynx_create_inferior, lynx_attach): Replace calls to
7899 add_process by calls to lynx_add_process.
7900 (lynx_resume): If PTID is null, then try using
7901 current_process()->private->last_wait_event_ptid.
7902 Add comments.
7903 (lynx_clear_inferiors): Delete. The contents of that function
7904 has been inlined in lynx_mourn;
7905 (lynx_wait_1): Save the ptid in the process's private data.
7906 (lynx_mourn): Free the process' private data. Replace call
7907 to lynx_clear_inferiors by call to clear_inferiors.
7908
96f7a20f
YQ
79092013-05-17 Yao Qi <yao@codesourcery.com>
7910
7911 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7912 the right place.
7913
db0dfaa0
LM
79142013-05-16 Luis Machado <lgustavo@codesourcery.com>
7915
7916 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7917 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7918 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7919 PT_TEXT_END_ADDR guards. Update comments.
7920 (linux_target_op) <read_offsets>: Conditionally define to
7921 linux_read_offsets if the target is UCLIBC and if it defines
7922 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7923
68f5f838
SL
79242013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7925 Andrew Jenner <andrew@codesourcery.com>
7926
7927 * Makefile.in (SFILES): Add linux-nios2-low.c.
7928 (clean): Add action to delete nios2-linux.c.
7929 (nios2-linux.c): New rule.
7930 * configure.srv: Add nios2*-*-linux*.
7931 * linux-nios2-low.c: New.
7932
1ebff1fd
HAQ
79332013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7934
7935 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7936
f6150862
HZ
79372013-04-25 Hui Zhu <hui@codesourcery.com>
7938
7939 PR gdb/15186
f6150862
HZ
7940 * ax.c (ax_printf): Add fflush.
7941
614c279d
TT
79422013-04-22 Tom Tromey <tromey@redhat.com>
7943
7944 * Makefile.in (SFILES): Add filestuff.c.
7945 (OBS): Add filestuff.o.
7946 (filestuff.o): New target.
7947 * config.in, configure: Rebuild.
7948 * configure.ac: Check for fdwalk, pipe2.
7949
7d4e5717
PA
79502013-04-17 Pedro Alves <palves@redhat.com>
7951
7952 * configure.ac (USE_THREAD_DB): Delete variable.
7953 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7954 Don't AC_SUBST USE_THREAD_DB.
7955 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7956 * config.in, configure: Regenerate.
7957
d5c93e41
PA
79582013-04-16 Pedro Alves <palves@redhat.com>
7959
7960 * linux-low.h (struct lwp_info) <thread_known>: Move under
7961 the USE_THREAD_DB #ifdef.
7962
04f5fe89
PA
79632013-04-16 Pedro Alves <palves@redhat.com>
7964
7965 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7966 (linux-low.o): Delete rule.
7967 * linux-low.h: Always include "gdb_thread_db.h" instead of
7968 conditionally including thread_db.h.
7969 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7970 HAVE_THREAD_DB_H.
7971
480b27bf
JK
79722013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7973
7974 * Makefile.in (install-only): Fix make install regression.
7975
43662968
JK
79762013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7977
7978 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7979 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7980 installation.
7981 * gdbserver.1: Remove.
7982
3e74e146
PA
79832013-03-22 Pedro Alves <palves@redhat.com>
7984
7985 * linux-low.c (handle_extended_wait): Don't call
7986 linux_enable_event_reporting.
7987
a8347a2a
TT
79882013-03-15 Tony Theodore <tonyt@logyst.com>
7989
7990 PR build/9098:
7991 * Makefile.in (SHELL): Use @SHELL@.
7992
eeb56fa7
SDJ
79932013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7994
7995 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7996 compiler warning.
7997
4fa7e2ff
JB
79982013-03-13 Joel Brobecker <brobecker@adacore.com>
7999
8000 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8001 Remove extraneous NULL element.
8002
8ddb1965
YQ
80032013-03-13 Yao Qi <yao@codesourcery.com>
8004
8005 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8006 'V' block in trace frame.
8007
9accd112
MM
80082013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8009
8010 * target.h (struct target_ops): Add btrace ops.
8011 (target_supports_btrace): New macro.
8012 (target_enable_btrace): New macro.
8013 (target_disable_btrace): New macro.
8014 (target_read_btrace): New macro.
8015 * gdbthread.h (struct thread_info): Add btrace field.
8016 * server.c: Include btrace-common.h.
8017 (handle_btrace_general_set): New function.
8018 (handle_btrace_enable): New function.
8019 (handle_btrace_disable): New function.
8020 (handle_general_set): Call handle_btrace_general_set.
8021 (handle_qxfer_btrace): New function.
8022 (struct qxfer qxfer_packets[]): Add btrace entry.
8023 * inferiors.c (remove_thread): Disable btrace.
8024 * linux-low: Include linux-btrace.h.
8025 (linux_low_enable_btrace): New function.
8026 (linux_low_read_btrace): New function.
8027 (linux_target_ops): Add btrace ops.
8028 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8029 Add srv_linux_btrace=yes.
8030 (x86_64-*-linux*): Add linux-btrace.o.
8031 Add srv_linux_btrace=yes.
8032 * configure.ac: Define HAVE_LINUX_BTRACE.
8033 * config.in: Regenerated.
8034 * configure: Regenerated.
8035
5cc22e4c
MM
80362013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8037
8038 * server.c (handle_qxfer): Preserve error message if -3 is
8039 returned.
8040 (qxfer): Document the -3 return value.
8041
7c97f91e
MM
80422013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8043
8044 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8045 (linux_btrace_h): New variable.
8046 (linux-btrace.o): New rule.
8047
be9a119c 80482013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
8049 Hafiz Abid Qadeer <abidh@codesourcery.com>
8050
8051 * tracepoint.c (trace_buffer_size): New global.
8052 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8053 (init_trace_buffer): Change to one-argument function. Allocate
8054 trace buffer memory.
8055 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8056 handle QTBuffer:size packet.
8057 (cmd_bigqtbuffer_size): New function.
8058 (initialize_tracepoint): Call init_trace_buffer with
8059 DEFAULT_TRACE_BUFFER_SIZE.
8060 * server.c (handle_query): Add QTBuffer:size in the
8061 supported packets.
8062
e64f7499
YQ
80632013-03-07 Yao Qi <yao@codesourcery.com>
8064
8065 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8066 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8067 of -1.
8068 (cmd_qtsp): Adjust condition. Do post increment.
8069 Set cur_action and cur_step_action back to 0.
8070
f0ae6fc3
PA
80712013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8072
8073 PR server/15236
8074 * linux-low.c (linux_write_memory): Return early success if LEN is
8075 zero.
8076
b5b0b0af
CV
80772013-03-05 Corinna Vinschen <vinschen@redhat.de>
8078
334ad4a8 8079 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 8080
589bc927
TT
80812013-02-28 Tom Tromey <tromey@redhat.com>
8082
8083 * configure.ac: Invoke AC_SYS_LARGEFILE.
8084 * configure, config.in: Rebuild.
8085
dfe07582
CV
80862013-02-28 Corinna Vinschen <vinschen@redhat.com>
8087
8088 * win32-low.c: Throughout, fix format strings and casts of
8089 printf-like functions to avoid type related warnings on all
8090 platforms.
8091 (get_child_debug_event): Print dwDebugEventCode as hex since
8092 that's how it's usually documented.
8093
736cd585
YQ
80942013-02-28 Yao Qi <yao@codesourcery.com>
8095
8096 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8097 pulongest.
8098
e1f58301
JW
80992013-02-27 Jiong Wang <jiwang@tilera.com>
8100
8101 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8102 (reg-tilegx32.c): New rule.
8103 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8104 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8105 different register info initializer according to elf class.
8106 (init_registers_tilgx32): New function. The tilegx32 register info
8107 initializer.
8108 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8109 (tile_store_gregset): Likewise.
8110
d171ca78
YQ
81112013-02-27 Yao Qi <yao@codesourcery.com>
8112
8113 * server.c (process_point_options): Print debug message when
8114 debug_threads is true.
8115
282bbdf3
YQ
81162013-02-26 Yao Qi <yao@codesourcery.com>
8117
8118 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8119
aca22551
PA
81202013-02-19 Pedro Alves <palves@redhat.com>
8121 Kai Tietz <ktietz@redhat.com>
8122
8123 PR gdb/15161
8124
8125 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8126 instead of strtoul to extract address from packet.
8127 (process_serial_event) <'z'>: Likewise.
8128
4f3cee1c
YQ
81292013-02-18 Yao Qi <yao@codesourcery.com>
8130
8131 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8132
8e1d55a3
PA
81332013-02-14 Pedro Alves <palves@redhat.com>
8134
8135 Plug memory leak.
8136
8137 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8138 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8139
458820da
PA
81402013-02-14 Pedro Alves <palves@redhat.com>
8141
8142 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8143
baea0dae
PA
81442013-02-14 Pedro Alves <palves@redhat.com>
8145
8146 * tracepoint.c (save_string): Delete.
8147 (add_tracepoint_action): Use savestring instead of save_string.
8148
0b1afbb3
PA
81492013-02-12 Pedro Alves <palves@redhat.com>
8150
8151 * linux-xtensa-low.c: Ditto.
8152 * xtensa-xtregs.c: Ditto.
8153
8a4ac37e
PA
81542013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8155
8156 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8157 thread_db.
8158
148de6bb
MS
81592013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8160
8161 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8162 aarch64_num_wp_regs and aarch64_num_bp_regs to
8163 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8164
55fac6e0
MS
81652013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8166
8167 * linux-aarch64-low.c (ps_get_thread_area): Replace
8168 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8169
176eb98c
MS
81702013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8171 Marcus Shawcroft <marcus.shawcroft@arm.com>
8172 Nigel Stephens <nigel.stephens@arm.com>
8173 Yufeng Zhang <yufeng.zhang@arm.com>
8174
8175 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8176 (aarch64.c, aarch64-without-fpu.c): New targets.
8177 * configure.srv (aarch64*-*-linux*): New.
8178 * linux-aarch64-low.c: New file.
8179
56f7af9c
MS
81802013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8181
43aaf8b6 8182 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
8183 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8184 (dequeue_one_deferred_signal, linux_resume_one_thread)
8185 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8186 (linux_tracefork_grandchild, linux_test_for_tracefork)
8187 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8188 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8189 where the argument is 0.
8190
60f662b0
YQ
81912013-01-25 Yao Qi <yao@codesourcery.com>
8192
8193 * event-loop.c: Include "queue.h".
8194 (gdb_event_p): New typedef.
8195 (struct gdb_event) <next_event>: Remove.
8196 (event_queue): Change to QUEUE(gdb_event_p).
8197 (async_queue_event): Remove.
8198 (gdb_event_xfree): New.
8199 (initialize_event_loop): New.
8200 (process_event): Use API from QUEUE.
8201 (wait_for_event): Likewise.
8202 * server.c (main): Call initialize_event_loop.
8203 * server.h (initialize_event_loop): Declare.
8204
5ae4861a
YQ
82052013-01-18 Yao Qi <yao@codesourcery.com>
8206
8207 * ax.h (struct eval_agent_expr_context): New.
8208 (gdb_eval_agent_expr): Update declaration.
8209 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8210 TFRAME. Add new argument CTX.
8211 * server.h (struct eval_agent_expr_context): Declare.
8212 (agent_mem_read, agent_tsv_read): Update declaration.
8213 (agent_mem_read_string): Likewise.
8214 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8215 (add_traceframe_block): Add new argument TPOINT.
8216 Increase TPOINT->traceframe_usage.
8217 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8218 eval_tracepoint_agent_expr.
8219 (condition_true_at_tracepoint): Likewise.
8220 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8221 (agent_mem_read_string, agent_tsv_read): Likewise.
8222
85e00e85
YQ
82232013-01-16 Yao Qi <yao@codesourcery.com>
8224
8225 * linux-low.c (linux_resume_one_lwp): Don't check
8226 'lwp->bp_reinsert != 0'.
8227
4039cf45
JB
82282013-01-07 Joel Brobecker <brobecker@adacore.com>
8229 Pedro Alves <palves@redhat.com>
8230
8231 * lynx-low.c (ptrace_request_to_str): Define a temporary
8232 macro and use it to simplify this function's implementation.
8233
9044dee2
JB
82342013-01-07 Joel Brobecker <brobecker@adacore.com>
8235
8236 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8237 sets errno.
8238
e6352c8f
JB
82392013-01-07 Joel Brobecker <brobecker@adacore.com>
8240
8241 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8242
50681a27
JB
82432013-01-07 Joel Brobecker <brobecker@adacore.com>
8244
8245 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8246
3f6e77ef
JB
82472013-01-07 Joel Brobecker <brobecker@adacore.com>
8248
8249 * lynx-low.c (lynx_resume): Use the resume_info parameter
8250 to determine the ptid for the lynx_ptrace call, unless
8251 it is equal to minus_one_ptid, in which case we use the
8252 ptid of the current_inferior.
8253 (lynx_wait_1): After having received a thread create/exit
8254 event, resume the inferior's execution using the signaling
8255 thread's ptid, rather than the old ptid.
8256
7fda33ae
JB
82572013-01-07 Joel Brobecker <brobecker@adacore.com>
8258
8259 * lynx-low.c (lynx_resume): Delete variable ret.
8260
b9786c74
JB
82612013-01-01 Joel Brobecker <brobecker@adacore.com>
8262
8263 * gdbreplay.c (gdbreplay_version): Update copyright year.
8264 * server.c (gdbserver_version): Likewise.
8265
8b93d60f
JB
82662012-12-17 Joel Brobecker <brobecker@adacore.com>
8267
8268 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8269 new thread.
8270
037335a7
JB
82712012-12-17 Joel Brobecker <brobecker@adacore.com>
8272
8273 * lynx-low.c (ptrace_request_to_str): Add handling for
8274 PTRACE_GETTRACESIG.
8275
52d4cbd8
JB
82762012-12-17 Joel Brobecker <brobecker@adacore.com>
8277
8278 * lynx-low.c (lynx_attach): Delete variable new_process.
8279
ab8f6ca9
JB
82802012-12-17 Joel Brobecker <brobecker@adacore.com>
8281
8282 * lynx-low.c (lynx_create_inferior): Delete variable
8283 new_process.
8284
78cbc024
JB
82852012-12-17 Joel Brobecker <brobecker@adacore.com>
8286
8287 * lynx-low.c (ptrace_request_to_str): Do not handle
8288 PTRACE_GETTHREADLIST if this macro does not exist.
8289
14a00470
YQ
82902012-12-15 Yao Qi <yao@codesourcery.com>
8291
8292 * Makefile.in (OBS): Add notif.o.
8293 * notif.c, notif.h: New.
8294 * server.c: Include "notif.h".
8295 (struct vstop_notif) <next>: Remove.
8296 <base>: New field.
8297 (queue_stop_reply): Update.
8298 (push_event, send_next_stop_reply): Remove.
8299 (discard_queued_stop_replies): Update.
8300 (notif_stop): New variable.
8301 (handle_v_stopped): Remove.
8302 (handle_v_requests): Don't call handle_v_stopped. Call
8303 handle_ack_notif instead.
8304 (queue_stop_reply_callback): Call notif_event_enque instead
8305 of queue_stop_reply.
8306 (handle_status): Don't call send_next_stop_reply, call
8307 notif_write_event instead.
8308 (kill_inferior_callback): Likewise.
8309 (detach_or_kill_inferior_callback): Likewise.
8310 (main): Call initialize_notif.
8311 (process_serial_event): Call QUEUE_is_empty.
8312 (handle_target_event): Call notif_push instead of push event.
8313 * server.h (push_event): Remove declaration.
8314
61c125b9
TT
83152012-12-10 Tom Tromey <tromey@redhat.com>
8316
8317 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8318 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8319 macros.
8320 (.c.o): Rewrite.
8321 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8322 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8323 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8324 (amd64-linux-ipa.o, ax.o): Rewrite.
8325 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8326 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8327 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8328 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8329 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8330 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8331 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8332 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8333 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8334 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8335 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8336 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8337 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8338 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8339 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8340 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8341 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8342 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8343 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8344 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8345 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8346 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8347 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8348 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8349 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8350 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8351 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8352 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8353 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8354 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8355 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8356 (reg-tilegx.o): Remove.
8357 (all_object_files): New macro.
8358 Include .deps files.
8359 * aclocal.m4, configure: Rebuild.
8360 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8361 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8362 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8363
e90e9ad9
TT
83642012-12-05 Tom Tromey <tromey@redhat.com>
8365
8366 PR gdb/14917:
8367 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8368
02d403bf 83692012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8370
8371 * configure.ac: Check for linux/perf_event.h.
8372 * config.in: Regenerated.
8373 * configure: Regenerated.
8374
0270a750
PA
83752012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8376
8377 * hostio.c (handle_readlink): Decrease buffer size
8378 parameter passed to readlink by one byte.
8379
8c29b58e
YQ
83802012-11-26 Yao Qi <yao@codesourcery.com>
8381
8382 * configure.ac (build_warnings): Append '-Wempty-body'.
8383 * configure: Regenerated.
8384 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8385 body.
8386
8bdce1ff
PM
83872012-11-15 Pierre Muller <muller@sourceware.org>
8388
8389 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8390 * config.in: Regenerate.
8391 * configure: Regenerate.
8392 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8393 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8394 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8395 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8396 header.
8397 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8398 instead of <sys/wait.h> header.
8399 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8400
02d403bf 84012012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
8402
8403 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8404 (various make rules): Remove -DGDBSERVER
8405
fbd5db48
YQ
84062012-11-09 Yao Qi <yao@codesourcery.com>
8407
8408 * spu-low.c (current_ptid): Move it to ..
8409 * gdbthread.h: ... here. New.
8410 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8411 * server.c (myresume, process_serial_event): Likewise.
8412 * thread-db.c (thread_db_find_new_threads): Likewise.
8413 * tracepoint.c (run_inferior_command): Likewise.
8414
b3dc46ff
AB
84152012-10-01 Andrew Burgess <aburgess@broadcom.com>
8416
8417 * server.c (handle_search_memory_1): Include access length in
8418 warning message.
8419
07c04788
HPN
84202012-09-05 Michael Brandt <michael.brandt@axis.com>
8421
8422 * linux-crisv32-low.c: Fix compile errors.
8423
918d227b
YQ
84242012-09-04 Yao Qi <yao@codesourcery.com>
8425
8426 * tracepoint.c (cmd_qtsv): Adjust debug message.
8427 Don't check CUR_TPOINT.
8428
18c1b81a
YQ
84292012-08-28 Yao Qi <yao@codesourcery.com>
8430
8431 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8432 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8433 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8434 Remove declarations of xmalloc, xreallloc, xstrdup and
8435 freeargv.
8436 * Makefile.in (libiberty_h): New.
8437 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8438 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8439
dc82f37b
YQ
84402012-08-23 Yao Qi <yao@codesourcery.com>
8441
8442 * server.h: Remove declaration of 'xsnprintf'.
8443
406b1477
KS
84442012-08-22 Keith Seitz <keiths@redhat.com>
8445
8446 * server.h: Include build-gnulib-gbserver/config.h.
8447 * gdbreplay.c: Likewise.
8448
e6712ff1
DE
84492012-08-08 Doug Evans <dje@google.com>
8450
8451 * Makefile.in (SFILES): Add gdb_vecs.c.
8452 (OBS): Add gdb_vecs.o.
8453 (gdb_vecs_h, host_defs_h): New variables.
8454 (thread-db.o): Add $(gdb_vecs_h) dependency.
8455 (gdb_vecs.o): New rule.
8456 * thread-db.c: #include "gdb_vecs.h".
8457 (thread_db_load_search): Use a vector to iterate over path elements.
8458 Handle text appearing after "$pdir".
8459
8460 * configure.ac: Add check for strstr.
8461 * config.in: Regenerate.
8462 * configure: Regenerate.
8463
7c3270ae
UW
84642012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8465
8466 * hostio.c (handle_pread): If pread fails, fall back to attempting
8467 lseek/read.
8468 (handle_pwrite): Likewise for pwrite.
8469
b62e2b27
UW
84702012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8471
8472 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8473 between unsupported TYPE and unimplementable ADDR/LEN combination.
8474 (arm_insert_point): Act on new return value.
8475
78a99e91
PA
84762012-07-31 Pedro Alves <palves@redhat.com>
8477
8478 * server.c (process_point_options): Only skip tokens if we find
8479 one that is unrecognized. Don't treat 'X' specially while
8480 skipping unrecognized tokens.
8481
fcf303ab
UW
84822012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8483
8484 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8485 to 4-byte-align HW breakpoint addresses for Thumb.
8486
7255706c
YQ
84872012-07-27 Yao Qi <yao@codesourcery.com>
8488
8489 PR remote/14161.
8490
8491 * server.h: Declare gdb_agent_about_to_close.
8492 * target.c (kill_inferior): Include "agent.h".
8493 New. Send command 'kill'.
8494 * target.h (kill_inferior): Removed macro.
8495 * tracepoint.c (gdb_agent_about_to_close): New.
8496 (gdb_agent_helper_thread): Handle command 'close'.
8497 Wait endlessly until the inferior stops.
8498 Install gdb_agent_remove_socket to atexit hook.
8499 (agent_socket_name): New static variable.
8500 (gdb_agent_socket_init): Replace local variable 'name' with
8501 'agent_socket_name'.
8502 (gdb_agent_remove_socket): New.
8503
5a3f286f
YQ
85042012-07-27 Yao Qi <yao@codesourcery.com>
8505
8506 * server.c (process_point_options): Stop at 'X' when parsing.
8507
961bd387
ME
85082012-07-19 Michael Eager <eager@eagercon.com>
8509
a261b8f5 8510 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
8511 to hw_execute.
8512 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8513 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8514 hardware breakpoint.
8515
aa7c7447
JK
85162012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8517
8518 * gdbserver/linux-low.c (initialize_low): Call
8519 linux_ptrace_init_warnings.
8520
7f216e7c
DE
85212012-07-02 Doug Evans <dje@google.com>
8522
8523 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8524 pointer to int.
8525
d3ce09f5
SS
85262012-07-02 Stan Shebs <stan@codesourcery.com>
8527
8528 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8529 (ax.o): Add it to build rule.
8530 (ax-ipa.o): Ditto.
8531 (OBS): Add format.o.
8532 (IPA_OBS): Add format.o.
8533 * server.c (handle_query): Claim support for breakpoint commands.
8534 (process_point_options): Add command case.
8535 (process_serial_event): Leave running if there are printfs in
8536 effect.
8537 * mem-break.h (any_persistent_commands): Declare.
8538 (add_breakpoint_commands): Declare.
8539 (gdb_no_commands_at_breakpoint): Declare.
8540 (run_breakpoint_commands): Declare.
8541 * mem-break.c (struct point_command_list): New struct.
8542 (struct breakpoint): New field command_list.
8543 (any_persistent_commands): New function.
8544 (add_commands_to_breakpoint): New function.
8545 (add_breakpoint_commands): New function.
8546 (gdb_no_commands_at_breakpoint): New function.
8547 (run_breakpoint_commands): New function.
8548 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8549 locally.
8550 * ax.c: Include format.h.
8551 (ax_printf): New function.
8552 (gdb_eval_agent_expr): Add printf opcode.
8553
2f8f6aed
YQ
85542012-06-13 Yao Qi <yao@codesourcery.com>
8555
8556 * server.c (start_inferior): Remove duplicated writes to fields
8557 'last_resume_kind' and 'last_status' of 'current_inferior'.
8558
0c9070b3
YQ
85592012-06-12 Yao Qi <yao@codesourcery.com>
8560 Pedro Alves <palves@redhat.com>
8561
8562 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8563 comment.
8564 * server.c (handle_v_cont): Extend comment.
8565
c52daf70
YQ
85662012-06-11 Yao Qi <yao@codesourcery.com>
8567
8568 * linux-low.c (linux_attach): Add 'static'.
8569
d38bbb0a
YQ
85702012-06-06 Yao Qi <yao@codesourcery.com>
8571
8572 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8573
89dc0afd
JK
85742012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8575
8576 Fix gcc -flto compilation warning.
8577 * server.c (main): Make variable multi_mode and attach volatile.
8578
75f62ce7
TJB
85792012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8580
8581 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8582 if the platform doesn't know about it.
8583
65f479b6
PA
85842012-05-30 Jeff Kenton <jkenton@tilera.com>
8585
8586 * Makefile.in (SFILES): Add linux-tile-low.c.
8587 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8588 * configure.srv: Handle tilegx-*-linux*.
8589 * linux-tile-low.c: New file.
8590
0c5bf5a9
JK
85912012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8592
8593 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8594
a493e3e2
PA
85952012-05-24 Pedro Alves <palves@redhat.com>
8596
8597 PR gdb/7205
8598
43aaf8b6 8599 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8600
2ea28649
PA
86012012-05-24 Pedro Alves <palves@redhat.com>
8602
8603 PR gdb/7205
8604
8605 Replace target_signal with gdb_signal throughout.
8606
8d409d16
MR
86072012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8608
8609 * linux-low.c (linux_store_registers): Avoid the copying sequence
8610 when no data has been retrieved by ptrace.
8611
23512c01
MGD
86122012-05-22 Will Deacon <will.deacon@arm.com>
8613
8614 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8615 Include asm/ptrace.h.
8616 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8617 already defined.
8618
4934b29e
MR
86192012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8620
8621 * linux-low.c (linux_store_registers): Don't re-retrieve data
8622 with ptrace that has already been obtained from /proc. Always
8623 copy any data retrieved with ptrace to the buffer supplied.
8624
bde24c0a
PA
86252012-05-11 Yao Qi <yao@codesourcery.com>
8626 Pedro Alves <palves@redhat.com>
8627
8628 * linux-low.c (enum stopping_threads_kind): New.
8629 (stopping_threads): Change type to `enum stopping_threads_kind'.
8630 (handle_extended_wait): If stopping and suspending threads, leave
8631 the new_lwp suspended too.
8632 (linux_wait_for_event): Adjust.
8633 (stop_all_lwps): Set `stopping_threads' to
8634 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8635 whether we're suspending threads or just stopping them. Assert no
8636 recursion happens.
8637
623b6bdf
YQ
86382012-04-29 Yao Qi <yao@codesourcery.com>
8639
8640 * server.h: Move some code to ...
8641 * gdbthread.h: ... here. New.
8642 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8643 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8644 (nto-low.o, win32-low.o): Likewise.
8645 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8646 * regcache.c, remote-utils.c, server.c: Likewise.
8647 * target.c, tracepoint.c, win32-low.c: Likewise.
8648
f15f9948
TJB
86492012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8650
8651 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8652 (PTRACE_ARG4_TYPE): Likewise.
8653 (PTRACE_XFER_TYPE): Likewise.
8654 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8655 ptrace to PTRACE_ARG3_TYPE.
8656 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8657 (PTRACE_ARG4_TYPE): Likewise.
8658 (PTRACE_XFER_TYPE): Likewise.
8659 (linux_detach_one_lwp): Cast fourth argument of
8660 ptrace to long then PTRACE_ARG4_TYPE.
8661 (regsets_fetch_inferior_registers): Cast third argument of
8662 ptrace to long then PTRACE_ARG3_TYPE.
8663 (regsets_store_inferior_registers): Likewise.
8664
38ea300a
PA
86652012-04-20 Pedro Alves <palves@redhat.com>
8666
8667 * configure: Regenerate.
8668
c971b7fa
PA
86692012-04-19 Pedro Alves <palves@redhat.com>
8670
43aaf8b6 8671 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 8672 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
8673 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8674 (all, install-only, uninstall, clean-info, all-lib, clean): No
8675 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8676 (maintainer-clean realclean distclean): Use subdir_do.
8677 (subdir_do): New.
8678 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 8679 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
8680 * acinclude.m4: Include acx_configure_dir.m4.
8681 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8682 calls. Call AC_PROG_RANLIB. Configure gnulib using
8683 ACX_CONFIGURE_DIR.
8684 (GNULIB): New.
8685 (GNULIB_STDINT_H): Adjust.
8686 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8687 * gdbreplay.c: Include build-gnulib/config.h.
8688 * server.h: Likewise.
8689 * aclocal.m4: Regenerate.
8690 * config.in: Regenerate.
8691 * configure: Regenerate.
c971b7fa 8692
809277f8
PA
86932012-04-19 Pedro Alves <palves@redhat.com>
8694
8695 * Makefile.in (LIBGNU, INCGNU): Adjust.
8696 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8697 (all, install-only, uninstall, clean-info, all-lib, clean)
8698 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8699 * configure.ac: Adjust AC_OUTPUT output.
8700 * aclocal.m4: Regenerate.
8701 * configure: Regenerate.
8702
fd9bb8b8
PA
87032012-04-19 Pedro Alves <palves@redhat.com>
8704
8705 * Makefile.in (generated_files): New.
8706 (server_h): Remove the explicit dependency on config.h, and depend
8707 on $generated_files.
8708
1c298c66
PA
87092012-04-19 Pedro Alves <palves@redhat.com>
8710
8711 * Makefile.in (INCGNU): Add -Ignulib.
8712
57c4b50b
PA
87132012-04-19 Pedro Alves <palves@redhat.com>
8714
8715 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8716 (INCGNU): ... this, and spell out -I here.
8717 (GNULIB_LIB): Rename to ...
8718 (LIBGNU): ... this.
8719 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8720
1030e047
PA
87212012-04-19 Pedro Alves <palves@redhat.com>
8722
8723 * config.in: Regenerate.
8724
447d4319
PA
87252012-04-19 Pedro Alves <palves@redhat.com>
8726
8727 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8728 * server.h (memmem): Remove declaration.
8729 * config.in: Regenerate.
8730 * configure: Regenerate.
8731
aad9eab9
YQ
87322012-04-19 Yao Qi <yao@codesourcery.com>
8733
8734 * Makefile.in (SFILES): Add common/vec.c.
8735 (OBS): Add vec.o.
8736 (vec.o): New rule.
8737
3e10640f
YQ
87382012-04-19 Yao Qi <yao@codesourcery.com>
8739
8740 * remote-utils.c (prepare_resume_reply): Replace with macro
8741 target_core_of_thread.
8742 * server.c (handle_qxfer_threads_proper): Likewise.
8743 * target.h (traget_core_of_thread): New macro.
8744
71622373
PA
87452012-04-18 Pedro Alves <palves@redhat.com>
8746
8747 * aclocal.m4: Regenerate.
8748 * configure: Regenerate.
8749
80d26939
YQ
87502012-04-16 Yao Qi <yao@codesourcery.com>
8751
8752 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8753 duplicated on address.
8754
42476b70
YQ
87552012-04-16 Yao Qi <yao@codesourcery.com>
8756
8757 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8758 (struct tracepoint_action_ops) <send>: New field.
8759 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8760 (agent_expr_send, x_tracepoint_action_send): New.
8761 (l_tracepoint_action_send): New.
8762 (cmd_qtdp): Download and install tracepoint
8763 according to `use_agent'.
8764 (run_inferior_command): Add one more parameter `len'.
8765 Update callers.
8766 (tracepoint_send_agent): New.
8767 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8768
7bc83639
YQ
87692012-04-16 Yao Qi <yao@codesourcery.com>
8770
8771 * tracepoint.c (download_tracepoints): Moved to ...
8772 (cmd_qtstart): ... here.
8773
5f18041e
YQ
87742012-04-14 Yao Qi <yao@codesourcery.com>
8775
8776 * tracepoint.c: Include inttypes.h.
8777 (struct collect_memory_action): Use sized types.
8778 (struct tracepoint): Likewise.
8779 (cmd_qtdp, stop_tracing): Update print specifiers.
8780 (cmd_qtp, response_tracepoint): Likewise.
8781 (collect_data_at_tracepoint): Likewise.
8782 (collect_data_at_step): Likewise.
8783
55a8c076
YQ
87842012-04-14 Yao Qi <yao@codesourcery.com>
8785
8786 Import gnulib module inttypes.
8787 * aclocal.m4, config.in, configure: Regenerated.
8788
dc750257
YQ
87892012-04-14 Yao Qi <yao@codesourcery.com>
8790
8791 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8792 Makefile and config.status at last.
8793
0ab5faf9
YQ
87942012-04-13 Yao Qi <yao@codesourcery.com>
8795
8796 * tracepoint.c: Include stdint.h unconditionally.
8797
18f5fd81
TJB
87982012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8799
8800 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8801 on BFD_HAVE_SYS_PROCFS_TYPE.
8802 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8803 * configure: Regenerate.
8804 * config.in: Likewise.
8805
4d47af5c
L
88062012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8807
8808 * Makefile.in (clean): Also remove x32.c x32-linux.c
8809 x32-avx.c x32-avx-linux.c.
8810 (x32.o): New target.
8811 (x32.c): Likewise.
8812 (x32-linux.o): Likewise.
8813 (x32-linux.c): Likewise.
8814 (x32-avx.o): Likewise.
8815 (x32-avx.c): Likewise.
8816 (x32-avx-linux.o): Likewise.
8817 (x32-avx-linux.c): Likewise.
8818
8819 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8820 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8821 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8822 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8823 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8824 i386/x32-avx-linux.xml.
8825
8826 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8827 (init_registers_x32_avx_linux): Likwise.
8828 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8829 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8830
ecedbe58
PA
88312012-04-13 Pedro Alves <palves@redhat.com>
8832
8833 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8834 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8835 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8836 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8837 the sub-make.
8838
c92b5177
L
88392012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8840
8841 * linux-x86-low.c (compat_x32_clock_t): New.
8842 (compat_x32_siginfo_t): Likewise.
8843 (compat_x32_siginfo_from_siginfo): Likewise.
8844 (siginfo_from_compat_x32_siginfo): Likewise.
8845 (linux_is_elf64): Likewise.
8846 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8847 and siginfo_from_compat_x32_siginfo for x32.
8848 (x86_arch_setup): Set linux_is_elf64.
8849
214d508e
L
88502012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8851
8852 PR gdb/13969
8853 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8854 e_machine field.
8855 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8856 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8857 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8858 compatible with process.
8859
c9a1864a
YQ
88602012-04-12 Yao Qi <yao@codesourcery.com>
8861
8862 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8863 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8864 (install-only, install-info, clean): Handle sub dir gnulib.
8865 (all-lib, am--refresh): New targets.
8866 (memmem.o): Remove target.
8867 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8868 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8869 (AC_REPLACE_FUNCS): Remove memmem.
8870 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8871 (AC_OUTPUT): Generate Makefile in gnulib/.
8872 * aclocal.m4, config.in, configure: Regenerated.
8873
367ba2c2
MR
88742012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8875
8876 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8877
9d236627
PA
88782012-04-05 Pedro Alves <palves@redhat.com>
8879
8880 -Werror=strict-aliasing
8881
8882 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8883 pointer.
8884
111217b3
PA
88852012-04-04 Pedro Alves <palves@redhat.com>
8886
8887 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8888 (sparc_store_gregset_from_stack, sparc_store_gregset)
8889 (sparc_breakpoint_at): Fix formatting.
8890
8365dcf5
TJB
88912012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8892
8893 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8894 are available.
8895 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8896 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8897 * config.in: Regenerate.
8898 * configure: Likewise.
8899
689cc2ae
PA
89002012-03-29 Pedro Alves <palves@redhat.com>
8901
8902 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8903 Correct ptrace arguments.
8904
c14dfd32
PA
89052012-03-28 Pedro Alves <palves@redhat.com>
8906
8907 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8908 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8909 (IA64_FR1_REGNUM): New defines.
8910 (ia64_fetch_register): New.
8911 (the_low_target): Install it.
8912 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8913 field.
8914 * linux-low.c (linux_fetch_registers): Try the
8915 the_low_target.fetch_register hook first.
8916
8917 * linux-arm-low.c (the_low_target): Adjust.
8918 * linux-bfin-low.c (the_low_target): Adjust.
8919 * linux-cris-low.c (the_low_target): Adjust.
8920 * linux-crisv32-low.c (the_low_target): Adjust.
8921 * linux-m32r-low.c (the_low_target): Adjust.
8922 * linux-m68k-low.c (the_low_target): Adjust.
8923 * linux-mips-low.c (the_low_target): Adjust.
8924 * linux-ppc-low.c (the_low_target): Adjust.
8925 * linux-s390-low.c (the_low_target): Adjust.
8926 * linux-sh-low.c (the_low_target): Adjust.
8927 * linux-sparc-low.c (the_low_target): Adjust.
8928 * linux-tic6x-low.c (the_low_target): Adjust.
8929 * linux-x86-low.c (the_low_target): Adjust.
8930 * linux-xtensa-low.c (the_low_target): Adjust.
8931
63c88e13
PA
89322012-03-26 Pedro Alves <palves@redhat.com>
8933
8934 * server.c (handle_qxfer_libraries): Don't bail early if
8935 the_target->qxfer_libraries_svr4 is not NULL.
8936
fb723180
PA
89372012-03-26 Pedro Alves <palves@redhat.com>
8938
8939 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8940
0afae3cf
PA
89412012-03-23 Pedro Alves <palves@redhat.com>
8942
8943 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8944 "library-list-svr4" element's start tag when the the DSO list is
8945 empty.
8946
485f1ee4
PA
89472012-03-23 Pedro Alves <palves@redhat.com>
8948
8949 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8950 a variable whose type size is the same as the inferior's pointer
8951 size.
8952
a5362b9a
TS
89532012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8954
8955 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8956 struct siginfo.
8957 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8958 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8959 * linux-low.h: Include <signal.h>.
8960 (struct siginfo): Remove forward declaration.
8961 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8962 struct siginfo.
8963
d226c142
MF
89642012-03-21 Mike Frysinger <vapier@gentoo.org>
8965
8966 * .gitignore: Ignore more files.
8967
122f36ef
PA
89682012-03-19 Pedro Alves <palves@redhat.com>
8969 Jan Kratochvil <jan.kratochvil@redhat.com>
8970
8971 * server.c (cont_thread, general_thread): Add describing comments.
8972 (start_inferior): Clear `cont_thread'.
8973 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8974 of a process.
8975
fc3e5175
YQ
89762012-03-15 Yao Qi <yao@codesourcery.com>
8977
8978 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8979 handling to ...
8980 (cmd_qtdp): ... here.
8981
8d0d92cd
YQ
89822012-03-15 Yao Qi <yao@codesourcery.com>
8983
8984 * tracepoint.c (struct tracepoint_action_ops): New.
8985 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8986 (m_tracepoint_action_download): New.
8987 (r_tracepoint_action_download): New.
8988 (x_tracepoint_action_download): New.
8989 (l_tracepoint_action_download): New.
8990 (add_tracepoint_action): Install `action->ops' according type.
8991 (download_tracepoint_1): Move code `download' function pointer
8992 of various tracepoint_action_ops.
8993
87b0bb13
JK
89942012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8995
8996 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8997 linux_ptrace_attach_warnings.
8998
5f572dec
JK
89992012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9000
9001 * Makefile.in (linux-ptrace.o): New.
9002 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9003 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9004 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9005 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9006 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9007 of these targets.
9008 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9009
f4647387
YQ
90102012-03-08 Yao Qi <yao@codesourcery.com>
9011 Pedro Alves <palves@redhat.com>
9012
9013 Fix PR server/13392.
9014 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9015 offset of JMP insn.
9016 * tracepoint.c (remove_tracepoint): New.
9017 (cmd_qtdp): Call remove_tracepoint when failed to install.
9018
9b224c5e
PA
90192012-03-07 Pedro Alves <palves@redhat.com>
9020
9021 * linux-low.c (get_detach_signal): New.
9022 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9023 Pass on pending signals to PTRACE_DETACH. Check the result of the
9024 ptrace call.
9025 * server.c (program_signals, program_signals_p): New.
9026 (handle_general_set): Handle QProgramSignals.
9027 * server.h (program_signals, program_signals_p): Declare.
9028
e237a7e2
JK
90292012-03-05 Pedro Alves <palves@redhat.com>
9030 Jan Kratochvil <jan.kratochvil@redhat.com>
9031
9032 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9033 New comment why.
9034
5808517f
YQ
90352012-03-03 Yao Qi <yao@codesourcery.com>
9036
9037 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9038 agent_look_up_symbols.
9039
58b4daa5
YQ
90402012-03-03 Yao Qi <yao@codesourcery.com>
9041
9042 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9043 (linux-x86-low.o): Likewise.
9044 * server.h: Remove in_process_agent_loaded.
9045 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9046 common/agent.c.
9047 Update callers.
9048
8ffcbaaf
YQ
90492012-03-03 Yao Qi <yao@codesourcery.com>
9050
9051 * tracepoint.c (gdb_agent_capability): New global.
9052 (in_process_agent_loaded_ust): Renamed to
9053 `in_process_agent_supports_ust'.
9054 Update callers.
9055 (in_process_agent_supports_ust): Call agent_capability_check.
9056 (clear_installed_tracepoints): Assert that agent supports
9057 agent.
9058
d1feda86
YQ
90592012-03-03 Yao Qi <yao@codesourcery.com>
9060
9061 * linux-low.c (linux_supports_agent): New.
9062 (linux_target_ops): Initialize field `supports_agent' with
9063 linux_supports_agent.
9064 * target.h (struct target_ops) <supports_agent>: New.
9065 (target_supports_agent): New macro.
9066 * server.c (handle_general_set): Handle packet 'QAgent'.
9067 (handle_query): Send `QAgent+'.
9068 * Makefile.in (server.o): Depends on agent.h.
9069
2fa291ac
YQ
90702012-03-03 Yao Qi <yao@codesourcery.com>
9071
9072 * Makefile.in (OBS): Add agent.o.
9073 Add new rule for agent.o.
9074 Track dependence of tracepoint.c on agent.h.
9075 * tracepoint.c (run_inferior_command_1):
9076 (run_inferior_command): Call agent_run_command.
9077 (gdb_ust_connect_sync_socket): Deleted. Move it to
9078 common/agent.c.
9079 (resume_thread, stop_thread): Likewise.
9080 (gdb_ust_socket_init): Renamed to ...
9081 (gdb_agent_socket_init): ... New.
9082 (gdb_ust_thread): Renamed to ...
9083 (gdb_agent_helper_thread): ... New.
9084 (gdb_ust_init): Move some code to ...
9085 (gdb_agent_init): ... here. New.
9086 [HAVE_UST]: Call gdb_ust_init.
9087 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9088 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9089 * config.in, configure: Regenerated.
9090
05044653
PA
90912012-03-02 Pedro Alves <palves@redhat.com>
9092
9093 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9094 * linux-low.c (struct simple_pid_list): New.
9095 (stopped_pids): New a struct simple_pid_list pointer.
9096 (add_to_pid_list, pull_pid_from_list): New.
9097 (handle_extended_wait): Don't assume the first signal new children
9098 report is SIGSTOP. Adjust call to pull_pid_from_list.
9099 (linux_wait_for_lwp): Adjust.
9100
8d00225b
YQ
91012012-03-02 Yao Qi <yao@codesourcery.com>
9102
9103 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9104 debug log.
9105
19560ba5
YQ
91062012-03-02 Yao Qi <yao@codesourcery.com>
9107
9108 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9109 `stop_pc' and `tpoint'. Update caller.
9110
1faeff08
MR
91112012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9112
9113 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9114 * linux-low.c (use_linux_regsets): New macro.
9115 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9116 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9117 (linux_register_in_regsets): New function.
9118 (usr_fetch_inferior_registers): Skip registers covered by
9119 regsets.
9120 (usr_store_inferior_registers): Likewise.
9121 (usr_fetch_inferior_registers): New macro.
9122 (usr_store_inferior_registers): Likewise.
9123 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9124 (linux_store_registers): Likewise.
9125 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9126 prototype.
9127 (init_registers_mips64_dsp_linux): Likewise.
9128 (init_registers_mips_linux): New macro.
9129 (init_registers_mips_dsp_linux): Likewise.
9130 (mips_dsp_num_regs): Likewise.
9131 (DSP_BASE, DSP_CONTROL): New fallback macros.
9132 (mips_base_regs): New macro.
9133 (mips_regmap): Use it. Fix the size.
9134 (mips_dsp_regmap): New variable.
9135 (mips_dsp_regset_bitmap): Likewise.
9136 (mips_arch_setup): New function.
9137 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9138 than mips_regmap.
9139 (mips_cannot_store_register): Likewise.
9140 (the_low_target): Update .arch_setup, .num_regs and .regmap
9141 initializers. Add .regset_bitmap initializer.
9142 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9143 initializer.
9144 * linux-bfin-low.c (the_low_target): Likewise.
9145 * linux-cris-low.c (the_low_target): Likewise.
9146 * linux-crisv32-low.c (the_low_target): Likewise.
9147 * linux-ia64-low.c (the_low_target): Likewise.
9148 * linux-m32r-low.c (the_low_target): Likewise.
9149 * linux-m68k-low.c (the_low_target): Likewise.
9150 * linux-ppc-low.c (the_low_target): Likewise.
9151 * linux-s390-low.c (the_low_target): Likewise.
9152 * linux-sh-low.c (the_low_target): Likewise.
9153 * linux-sparc-low.c (the_low_target): Likewise.
9154 * linux-tic6x-low.c (the_low_target): Likewise.
9155 * linux-x86-low.c (the_low_target): Likewise.
9156 * linux-xtensa-low.c (the_low_target): Likewise.
9157 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9158 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9159 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9160 srv_xmlfiles.
9161 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9162 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9163
c03e6ccc
YQ
91642012-02-29 Yao Qi <yao@codesourcery.com>
9165 Pedro Alves <palves@redhat.com>
9166
9167 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9168 `step_over_finished' is true.
9169
644cebc9
PA
91702012-02-27 Pedro Alves <palves@redhat.com>
9171
9172 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9173 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9174
c14d7ab2
PA
91752012-02-27 Pedro Alves <palves@redhat.com>
9176
9177 PR server/9684
9178 * linux-low.c (pid_is_stopped): New.
9179 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9180
412c89dd
LM
91812012-02-25 Luis Machado <lgustavo@codesourcery.com>
9182
9183 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9184 of conditions.
9185
b745defe
MR
91862012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9187
9188 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9189
9f3a5c85
LM
91902012-02-24 Luis Machado <lgustavo@codesourcery>
9191
9192 * server.c (handle_query): Advertise support for target-side
9193 breakpoint condition evaluation.
9194 (process_point_options): New function.
9195 (process_serial_event): When inserting a breakpoint, check for
9196 a target-side condition that should be evaluated.
9197
9198 * mem-break.c: Include regcache.h and ax.h.
9199 (point_cond_list_t): New data structure.
9200 (breakpoint) <cond_list>: New field.
9201 (find_gdb_breakpoint_at): Make non-static.
9202 (delete_gdb_breakpoint_at): Clear any target-side
9203 conditions.
9204 (clear_gdb_breakpoint_conditions): New function.
9205 (add_condition_to_breakpoint): Likewise.
9206 (add_breakpoint_condition): Likewise.
9207 (gdb_condition_true_at_breakpoint): Likewise.
9208 (gdb_breakpoint_here): Return result directly instead
9209 of going through a local variable.
9210
9211 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9212 (clear_gdb_breakpoint_conditions): Likewise.
9213 (add_breakpoint_condition): Likewise.
9214 (gdb_condition_true_at_breakpoint): Likewise.
9215
9216 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9217 (need_step_over_p): Take target-side breakpoint condition into
9218 consideration.
9219
5e1dc496
LM
92202012-02-24 Luis Machado <lgustavo@codesourcery>
9221
9222 * server.h: Include tracepoint.h.
9223 (agent_mem_read, agent_get_trace_state_variable_value,
9224 agent_set_trace_state_variable_value,
9225 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9226 get_set_tsv_func_addr): New prototypes.
9227
9228 * ax.h: New include file.
9229 * ax.c: New source file.
9230
9231 * tracepoint.c: Include ax.h.
9232 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9233 agent_expr, eval_result_type): Move to ax.h.
9234 (parse_agent_expr): Rename to ...
9235 (gdb_parse_agent_expr): ... this, make it non-static and move
9236 to ax.h.
9237 (unparse_agent_expr) Rename to ...
9238 (gdb_unparse_agent_expr): ... this, make it non-static and move
9239 to ax.h.
9240 (eval_agent_expr): Rename to ...
9241 (eval_tracepoint_agent_expr): ... this.
9242 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9243 forward declarations.
9244 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9245 (agent_get_trace_state_variable_value): New function.
9246 (agent_set_trace_state_variable_value): New function.
9247 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9248 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9249 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9250 (condition_true_at_tracepoint): Likewise.
9251 (parse_agent_expr): Rename to ...
9252 (gdb_parse_agent_expr): ... this and move to ax.c.
9253 (unparse_agent_expr): Rename to ...
9254 (gdb_unparse_agent_expr): ... this and move to ax.c.
9255 (gdb_agent_op_name): Move to ax.c.
9256 (eval_agent_expr): Rename to ...
9257 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9258 and move to ax.c.
9259 (eval_tracepoint_agent_expr): New function.
9260 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 9261 non-static.
5e1dc496
LM
9262 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9263 ax.c.
9264 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9265 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9266 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9267 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9268 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9269 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9270 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9271 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9272 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9273 (compile_bytecodes): Remove forward declaration.
9274 (is_goto_target): Move to ax.c.
9275 (compile_bytecodes): Move to ax.c and call
9276 agent_get_trace_state_variable_value (...) and
9277 agent_set_trace_state_variable_value (...).
9278
9279 * Makefile.in: Update ax.c and IPA dependencies.
9280
277e4e52
PA
92812012-02-24 Pedro Alves <palves@redhat.com>
9282
9283 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9284 (cmd_bigqtbuffer_circular): ... this. Only handle
9285 'QTBuffer:circular:'.
9286 (handle_tracepoint_general_set): Adjust.
9287
bf4c19f7
YQ
92882012-02-16 Yao Qi <yao@codesourcery.com>
9289
9290 * inferiors.c: Move code to ...
9291 * dll.c: .... here. New.
9292 * server.h: Declare clear_dlls.
9293 * Makefile.in (SFILES): Add dll.c.
9294 (OBS): Add dll.o
9295 (dll.o): New rule.
9296
d73f2619
YQ
92972012-02-11 Yao Qi <yao@codesourcery.com>
9298
9299 * server.c: (handle_monitor_command): Add a new parameter
9300 `own_buf'.
9301 (handle_query): Update caller.
9302
f8255c2a
JB
93032012-02-09 Joel Brobecker <brobecker@adacore.com>
9304
9305 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9306 * configure, config.in: Regenerate.
9307 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9308 is not defined.
9309
da84f473
PA
93102012-02-02 Pedro Alves <palves@redhat.com>
9311
9312 Try SIGKILL first, then PTRACE_KILL.
9313 * linux-low.c (linux_kill_one_lwp): New.
9314 (linux_kill_one_lwp): Rename to ...
9315 (kill_one_lwp_callback): ... this. Use the new
9316 linux_kill_one_lwp.
9317
e886a173
PA
93182012-02-02 Pedro Alves <palves@redhat.com>
9319
9320 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9321 inferior.
9322
be07f1a2
PA
93232012-01-27 Pedro Alves <palves@redhat.com>
9324
9325 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9326 (elf_64_file_p): Make static.
9327 (linux_pid_exe_is_elf_64_file): New.
9328 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9329 Delete declarations.
9330 (linux_pid_exe_is_elf_64_file): Declare.
9331 * linux-x86-low.c (x86_arch_setup): Use
9332 linux_pid_exe_is_elf_64_file.
9333
d8301ad1
JK
93342012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9335
9336 * linux-low.c (linux_wait_for_event_1): Rename to ...
9337 (linux_wait_for_event): ... here and merge it with former
9338 linux_wait_for_event - new variable wait_ptid, use it.
9339 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9340
01b17894
PA
93412012-01-23 Pedro Alves <palves@redhat.com>
9342
9343 * server.c (main): Avoid yet another case of infinite loop while
9344 detaching/killing after a longjmp.
9345
e825046f
JK
93462012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9347
9348 Code cleanup.
9349 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9350
b9e7b9c3
UW
93512012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9352
9353 * hostio.c (handle_readlink): New function.
9354 (handle_vFile): Call it to handle "vFile:readlink" packets.
9355
901f9912
UW
93562012-01-20 Pedro Alves <palves@redhat.com>
9357 Ulrich Weigand <ulrich.weigand@linaro.org>
9358
9359 * server.c (handle_v_requests): Only support vAttach and vRun to
9360 start multiple processes when in extended protocol mode.
9361
fc1ab1a0
PA
93622012-01-17 Pedro Alves <palves@redhat.com>
9363
9364 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9365 memalign plus mprotect to allocate the scratch buffer.
9366
7d5d4e98
PA
93672012-01-13 Pedro Alves <palves@redhat.com>
9368
9369 * server.c (attach_inferior): Clear `cont_thread'.
9370
f128d5e9
PA
93712012-01-13 Pedro Alves <palves@redhat.com>
9372
9373 * server.c (main): Avoid infinite loop while detaching/killing
9374 after a longjmp.
9375
06db92f0
DE
93762012-01-09 Doug Evans <dje@google.com>
9377
9378 * server.c (start_inferior): Set last_ptid in --wrapper case.
9379
32d92999
YQ
93802012-01-06 Yao Qi <yao@codesourcery.com>
9381
9382 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9383 defined.
9384 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9385
5e0a92a9
YQ
93862012-01-04 Yao Qi <yao@codesourcery.com>
9387
9388 * tracepoint.c (cmd_qtdp): Print debug message
9389 for static tracepoint.
9390
ae639e8c
YQ
93912012-01-04 Yao Qi <yao@codesourcery.com>
9392
9393 * tracepoint.c (trace_vdebug): Differentiate debug message
9394 between gdbserver and IPA.
9395
f72429c5
YQ
93962012-01-03 Yao Qi <yao@codesourcery.com>
9397
9398 * tracepoint.c (tracepoint_was_hit): Don't collect for
9399 static tracepoint.
9400
12c3e59c
JB
94012012-01-02 Joel Brobecker <brobecker@adacore.com>
9402
9403 * terminal.h: Reformat copyright header.
9404
67827812
JB
94052012-01-02 Joel Brobecker <brobecker@adacore.com>
9406
9407 * server.c (gdbserver_version): Update copyright year.
9408 * gdbreplay.c (gdbreplay_version): Likewise.
9409
3e52c33d
JK
94102011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9411
9412 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9413
9414 Revert:
9415 2011-12-18 Hui Zhu <teawater@gmail.com>
9416 * linux-low.c (linux_create_inferior): Save return value to ret.
9417
66f1260e
HZ
94182011-12-18 Hui Zhu <teawater@gmail.com>
9419
9420 * linux-low.c (linux_create_inferior): Save return value to ret.
9421
e77616d7
DE
94222011-12-16 Doug Evans <dje@google.com>
9423
e7b06c57
DE
9424 * linux-low.c (linux_create_inferior): If stdio connection,
9425 redirect stdin from /dev/null, stdout to stderr.
9426 * remote-utils.c (remote_is_stdio): New static global.
9427 (remote_connection_is_stdio): New function.
9428 (remote_prepare): Handle stdio connection.
9429 (remote_open): Ditto.
9430 (remote_close): Don't close stdin for stdio connections.
9431 (read_prim,write_prim): New functions. Replace all calls to
9432 read/write to these.
9433 * server.c (main): Watch for "-" argument. Move call to
9434 remote_prepare before start_inferior.
9435 * server.h (STDIO_CONNECTION_NAME): New macro.
9436 (remote_connection_is_stdio): Declare.
9437
e77616d7
DE
9438 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9439 in debugging output.
9440
82067193
YQ
94412011-12-15 Yao Qi <yao@codesourcery.com>
9442
9443 * tracepoint.c: Include sys/syscall.h.
9444 (gdb_ust_thread): Remove preprocessor conditional.
9445
82bfbe7e
PA
94462011-12-14 Pedro Alves <pedro@codesourcery.com>
9447
9448 * linux-low.c (linux_detach_one_lwp): Call
9449 the_low_target.prepare_to_resume before detaching.
9450
712c6575
YQ
94512011-12-14 Yao Qi <yao@codesourcery.com>
9452
9453 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9454 of write.
9455
d54d1edf
YQ
94562011-12-14 Yao Qi <yao@codesourcery.com>
9457
9458 * i386-low.c (i386_low_stopped_data_address): Initialize local
9459 variable `control'.
9460
6210a125
PA
94612011-12-13 Pedro Alves <pedro@codesourcery.com>
9462
9463 PR remote/13492
9464
9465 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9466 DR_CONTROL unless necessary. Extend comments.
9467 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9468 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9469
2ece8244
YQ
94702011-12-13 Yao Qi <yao@codesourcery.com>
9471
9472 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9473 macros.
9474 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9475
784867a5
JK
94762011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9477
9478 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9479 Print new debug message for such case.
9480
6bf36717
JK
94812011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9482
9483 Fix overlapping memcpy.
9484 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9485 the read_inferior_memory transfer.
9486 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9487 write_inferior_memory transfer.
9488 (set_fast_tracepoint_jump): New variable buf. Use it for the
9489 read_inferior_memory and write_inferior_memory transfers.
9490 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9491 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9492 Use it for the write_inferior_memory transfer.
9493 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9494 buffers.
9495
50275556
MR
94962011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9497
9498 * linux-low.c (fetch_register, store_register): Make code
9499 consistent, fix formatting.
9500
7325beb4
MR
95012011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9502
9503 * linux-low.c (usr_store_inferior_registers): Factor out code
9504 to handle individual registers into...
9505 (store_register): ... this new function.
9506
c642a434
UW
95072011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9508
9509 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9510 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9511 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9512 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9513 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9514 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9515 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9516 (srv_xmlfiles): Add new XML files.
9517
9518 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9519 and <sys/uio.h>.
9520 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9521 (init_registers_s390_linux32v1): Add prototype.
9522 (init_registers_s390_linux32v2): Likewise.
9523 (init_registers_s390_linux64v1): Likewise.
9524 (init_registers_s390_linux64v2): Likewise.
9525 (init_registers_s390x_linux64v1): Likewise.
9526 (init_registers_s390x_linux64v2): Likewise.
9527 (s390_num_regs): Increment to 52.
9528 (s390_regmap): Add orig_r2 register.
9529 (s390_num_regs_3264): Increment to 68.
9530 (s390_regmap_3264): Add orig_r2 register.
9531 (s390_collect_ptrace_register): Handle orig_r2 register.
9532 (s390_supply_ptrace_register): Likewise.
9533 (s390_fill_last_break): New function.
9534 (s390_store_last_break): Likewise.
9535 (s390_fill_system_call): New function.
9536 (s390_store_system_call): Likewise.
9537 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9538 register sets.
9539 (s390_check_regset): New function.
9540 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9541 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9542 Update target_regsets for available register sets.
9543
2268b414
JK
95442011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9545 Jan Kratochvil <jan.kratochvil@redhat.com>
9546
9547 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9548 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9549 New.
9550 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9551 * linux-low.h (struct process_info_private): New member r_debug.
9552 * server.c (handle_qxfer_libraries): Call
9553 the_target->qxfer_libraries_svr4.
9554 (handle_qxfer_libraries_svr4): New function.
9555 (qxfer_packets): New entry "libraries-svr4".
9556 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9557 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9558 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9559 PACKET_qXfer_libraries_svr4.
9560
d6db1fab
UW
95612011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9562
9563 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9564 PSW address/mask between 8-byte and 16-byte formats.
9565 (s390_supply_ptrace_register): Likewise.
9566 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9567 basic addressing mode bit.
9568
242f5f1c
SS
95692011-11-24 Stan Shebs <stan@codesourcery.com>
9570
9571 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9572
f196051f
SS
95732011-11-17 Stan Shebs <stan@codesourcery.com>
9574
9575 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9576 (tracing_start_time): New global.
9577 (tracing_stop_time): New global.
9578 (tracing_user_name): New global.
9579 (tracing_notes): New global.
9580 (tracing_stop_note): New global.
9581 (cmd_qtstart): Set traceframe_usage, start_time.
9582 (stop_tracing): Set stop_time.
9583 (cmd_qtstatus): Report additional status.
9584 (cmd_qtp): New function.
9585 (handle_tracepoint_query): Call it.
9586 (cmd_qtnotes): New function.
9587 (handle_tracepoint_general_set): Call it.
9588 (get_timestamp): Rename from tsv_get_timestamp.
9589
405f8e94
SS
95902011-11-14 Stan Shebs <stan@codesourcery.com>
9591 Kwok Cheung Yeung <kcy@codesourcery.com>
9592
9593 * linux-x86-low.c (small_jump_insn): New.
9594 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9595 trampoline and error message, build a trampoline and issue a small
9596 jump instruction to it.
9597 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9598 trampoline and error message.
9599 (x86_get_min_fast_tracepoint_insn_len): New.
9600 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9601 * linux-low.h (struct linux_target_ops): Add arguments to
9602 install_fast_tracepoint_jump_pad operation, add new operation.
9603 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9604 arguments.
9605 (linux_get_min_fast_tracepoint_insn_len): New function.
9606 (linux_target_op): Add new operation.
9607 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9608 (gdb_trampoline_buffer_end): Ditto.
9609 (gdb_trampoline_buffer_error): Ditto.
9610 (struct ipa_sym_addresses): Add fields for new IPA variables.
9611 (symbol_list): Add entries for new IPA variables.
9612 (struct tracepoint): Add fields to hold the address range of the
9613 trampoline used by the tracepoint.
9614 (trampoline_buffer_head): New static variable.
9615 (trampoline_buffer_tail): Ditto.
9616 (claim_trampoline_space): New function.
9617 (have_fast_tracepoint_trampoline_buffer): New function.
9618 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9619 structure.
9620 (install_fast_tracepoint): Ditto, also add error buffer argument.
9621 (cmd_qtminftpilen): New function.
9622 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9623 (fast_tracepoint_from_trampoline_address): New function.
9624 (fast_tracepoint_collecting): Handle trampoline as part of jump
9625 pad space.
9626 (set_trampoline_buffer_space): New function.
9627 (initialize_tracepoint): Initialize new IPA variables.
9628 * target.h (struct target_ops): Add arguments to
9629 install_fast_tracepoint_jump_pad operation, add new
9630 get_min_fast_tracepoint_insn_len operation.
9631 (target_get_min_fast_tracepoint_insn_len): New.
9632 (install_fast_tracepoint_jump_pad): Add arguments.
9633 * server.h (IPA_BUFSIZ): Define.
9634 * linux-i386-ipa.c: Include extra header files.
9635 (initialize_fast_tracepoint_trampoline_buffer): New function.
9636 (initialize_low_tracepoint): Call it.
9637 * server.h (set_trampoline_buffer_space): Declare.
9638 (claim_trampoline_space): Ditto.
9639 (have_fast_tracepoint_trampoline_buffer): Ditto.
9640
1e4d1764
YQ
96412011-11-14 Yao Qi <yao@codesourcery.com>
9642
9643 * server.c (handle_query): Handle InstallInTrace for qSupported.
9644 * tracepoint.c (add_tracepoint): Sort list.
9645 (install_tracepoint, download_tracepoint): New.
9646 (cmd_qtdp): Call them to install and download tracepoints.
9647 (sort_tracepoints): Removed.
9648 (cmd_qtstart): Update.
9649
5c73ff4e
YQ
96502011-11-14 Yao Qi <yao@codesourcery.com>
9651
9652 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9653 * mem-break.h: Declare.
9654 * tracepoint.c (cmd_qtstart): Move some code to ...
9655 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9656 New.
9657 (download_tracepoints): Move some code to ...
9658 (download_tracepoint_1): ... here. New.
9659
86a30030
YQ
96602011-11-08 Yao Qi <yao@codesourcery.com>
9661
9662 * remote-utils.c (relocate_instruction): A comment fix.
9663
8d26e50c
JB
96642011-11-07 Joel Brobecker <brobecker@adacore.com>
9665
9666 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9667 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9668 dr_status_mirror and dr_control_mirror from debug_reg_state.
9669 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9670 (i386_initial_stuff): Remove use of deleted globals.
9671 (i386_get_thread_context, i386_set_thread_context,
9672 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9673 from debug_reg_state.
9674
a59306a3
YQ
96752011-11-05 Yao Qi <yao@codesourcery.com>
9676
9677 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9678 address as TPOINT's.
9679
3065dfb6
SS
96802011-11-02 Stan Shebs <stan@codesourcery.com>
9681
9682 * tracepoint.c (agent_mem_read_string): New function.
9683 (eval_agent_expr): Call it for tracenz.
9684 * server.c (handle_query): Report support for tracenz.
9685
fd0d8c7c
YQ
96862011-11-02 Yao Qi <yao@codesourcery.com>
9687
9688 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9689
609086b1
YQ
96902011-11-02 Yao Qi <yao@codesourcery.com>
9691
9692 * target.h: Fix a typo in comment.
9693
b9fd1791
PA
96942011-10-31 Pedro Alves <pedro@codesourcery.com>
9695
9696 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9697 clobber the breakpoints' shadows with fast tracepoint jumps.
9698 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9699 * target.c (write_inferior_memory): Also pass MYADDR down to
9700 check_mem_write.
9701
03583c20
UW
97022011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9703
9704 * configure.ac: Check support for personality routine.
9705 * configure: Regenerate.
9706 * config.in: Likewise.
9707 * linux-low.c: Include <sys/personality.h>.
9708 Define ADDR_NO_RANDOMIZE if necessary.
9709 (linux_create_inferior): Disable address space randomization when
9710 forking inferior, if requested.
9711 (linux_supports_disable_randomization): New function.
9712 (linux_target_ops): Install it.
9713 * server.h (disable_randomization): Declare.
9714 * server.c (disable_randomization): New global variable.
9715 (handle_general_set): Handle QDisableRandomization.
9716 (handle_query): Likewise for qSupported.
9717 (main): Support --disable-randomization and --no-disable-randomization
9718 command line arguments.
9719 * target.h (struct target_ops): Add supports_disable_randomization.
9720 (target_supports_disable_randomization): New macro.
9721
723b724b
MF
97222011-09-29 Mike Frysinger <vapier@gentoo.org>
9723
9724 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9725 ifdef check.
9726 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9727 [!PT_GETDSBT] (target_loadmap): New definition.
9728 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9729 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9730 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9731 and PT_GETDSBT to LINUX_LOADMAP.
9732 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9733 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9734
55329a5c 97352011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
9736
9737 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9738 (arm_linux_hwbp_cap): New static variable.
9739 (arm_linux_get_hwbp_cap): Replace by ...
9740 (arm_linux_init_hwbp_cap): ... this new function.
9741 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9742 (arm_linux_get_hw_watchpoint_count): Likewise.
9743 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9744 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9745 (arm_prepare_to_resume): Use perror_with_name instead of error.
9746
55329a5c 97472011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
9748
9749 * linux-arm-low.c: Include <signal.h>.
9750 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9751 (struct arm_linux_hwbp_cap): New data type.
9752 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9753 (struct arm_linux_hw_breakpoint): New data type.
9754 (MAX_BPTS, MAX_WPTS): Define.
9755 (struct arch_process_info, struct arch_lwp_info): New data types.
9756 (arm_linux_get_hwbp_cap): New function.
9757 (arm_linux_get_hw_breakpoint_count): Likewise.
9758 (arm_linux_get_hw_watchpoint_count): Likewise.
9759 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9760 (arm_hwbp_control_initialize): Likewise.
9761 (arm_hwbp_control_is_enabled): Likewise.
9762 (arm_hwbp_control_is_initialized): Likewise.
9763 (arm_hwbp_control_disable): Likewise.
9764 (arm_linux_hw_breakpoint_equal): Likewise.
9765 (arm_linux_hw_point_initialize): Likewise.
9766 (struct update_registers_data): New data structure.
9767 (update_registers_callback: New function.
9768 (arm_insert_point): Likewise.
9769 (arm_remove_point): Likewise.
9770 (arm_stopped_by_watchpoint): Likewise.
9771 (arm_stopped_data_address): Likewise.
9772 (arm_new_process): Likewise.
9773 (arm_new_thread): Likewise.
9774 (arm_prepare_to_resume): Likewise.
9775 (the_low_target): Register arm_insert_point, arm_remove_point,
9776 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9777 arm_new_thread, and arm_prepare_to_resume.
9778
6b9801d4
SS
97792011-09-15 Stan Shebs <stan@codesourcery.com>
9780
9781 * server.h (struct emit_ops): Add compare-goto fields.
9782 * tracepoint.c (gdb_agent_op_sizes): New table.
9783 (emit_eq_goto): New function.
9784 (emit_ne_goto): New function.
9785 (emit_lt_goto): New function.
9786 (emit_le_goto): New function.
9787 (emit_gt_goto): New function.
9788 (emit_ge_goto): New function.
9789 (is_goto_target): New function.
9790 (compile_bytecodes): Recognize special cases of compare-goto
9791 combinations and call specialized emitters for them.
9792 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9793 (amd64_emit_ne_goto): New function.
9794 (amd64_emit_lt_goto): New function.
9795 (amd64_emit_le_goto): New function.
9796 (amd64_emit_gt_goto): New function.
9797 (amd64_emit_ge_goto): New function.
9798 (amd64_emit_ops): Add the new functions.
9799 (i386_emit_eq_goto): New function.
9800 (i386_emit_ne_goto): New function.
9801 (i386_emit_lt_goto): New function.
9802 (i386_emit_le_goto): New function.
9803 (i386_emit_gt_goto): New function.
9804 (i386_emit_ge_goto): New function.
9805 (i386_emit_ops): Add the new functions.
9806
bf15cbda
SS
98072011-09-08 Stan Shebs <stan@codesourcery.com>
9808
9809 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9810 (i386_emit_epilogue): Restore %ebx.
9811
943ca1dd
JZ
98122011-08-31 Jie Zhang <jzhang918@gmail.com>
9813
9814 * server.c (step_thread): Remove definition.
9815 (process_serial_event): Don't handle Hs.
9816 * server.h (step_thread): Remove declaration.
9817 * target.c (set_desired_inferior): Remove use of step_thread.
9818
e3deef73
LM
98192011-08-24 Luis Machado <lgustavo@codesourcery.com>
9820
9821 * linux-low.c: Include linux-procfs.h.
9822 (linux_attach_lwp_1): Update comments.
9823 (linux_attach): Scan for existing threads when attaching to a
9824 process that is the tgid.
9825 * Makefile.in: Update dependencies.
9826
13da1c97
LM
98272011-08-24 Luis Machado <lgustavo@codesourcery.com>
9828
9829 * configure.srv: Add linux-procfs.o dependencies.
9830
881127c9
YQ
98312011-08-14 Yao Qi <yao@codesourcery.com>
9832
9833 * target.h (struct target_ops): Fix indent.
9834 * win32-low.c (win32_target_ops): Fix comment.
9835
58dbd541
YQ
98362011-08-14 Andrew Jenner <andrew@codesourcery.com>
9837 Yao Qi <yao@codesourcery.com>
9838
9839 * Makefile.in (clean): Remove tic6x-*.c files.
9840 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9841 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9842 (tic6x-c64xp-linux.c): Likewise.
9843 * configure.srv: Add support for tic6x-*-uclinux.
9844 * linux-tic6x-low.c: New.
9845 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9846
78d85199
YQ
98472011-08-14 Andrew Stubbs <ams@codesourcery.com>
9848 Yao Qi <yao@codesourcery.com>
9849
9850 * target.h (struct target_ops): Add read_loadmap.
9851 * linux-low.c (struct target_loadseg): New type.
9852 (struct target_loadmap): New type.
9853 (linux_read_loadmap): New function.
9854 (linux_target_ops): Add linux_read_loadmap.
9855 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
9856 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9857 to NULL.
78d85199 9858
a959a88d
EZ
98592011-08-05 Eli Zaretskii <eliz@gnu.org>
9860
9861 * win32-low.c: Include <stdint.h>.
9862
1ced966e
PA
98632011-07-22 Pedro Alves <pedro@codesourcery.com>
9864
9865 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9866 to the inferior here.
9867 (i386_remove_aligned_watchpoint): Ditto.
9868 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9869 fit part of the watchpoint in the debug registers.
9870 (i386_update_inferior_debug_regs): New.
9871 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9872 registers, and only update the inferior on success.
9873 (i386_low_remove_watchpoint): Ditto.
9874
d26e3629
KY
98752011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9876
9877 * linux-low.c (compare_ints, unique, list_threads, show_process,
9878 linux_core_of_thread): Delete.
9879 (linux_target_ops): Change linux_core_of_thread to
9880 linux_common_core_of_thread.
9881 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9882 * utils.c (malloc_failure): Change type of argument.
9883 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9884 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9885 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9886 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9887 (IPA_OBJS): Add common-utils-ipa.o.
9888 (ptid_h, linux_osdata_h): New macros.
9889 (server_h): Add common/common-utils.h, common/xml-utils.h,
9890 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9891 common/ptid.h.
9892 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9893 ptid.o, buffer.o): New rules.
9894 (linux-low.o): Add common/linux-osdata.h as a dependency.
9895 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9896 * configure.ac: Add AC_HEADER_DIRENT check.
9897 * config.in: Regenerate.
9898 * configure: Regenerate.
9899 * remote-utils.c (xml_escape_text): Delete.
9900 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9901 buffer_xml_printf): Move to common/buffer.c.
9902 * server.c (main): Remove call to initialize_inferiors.
9903 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9904 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9905 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9906 internal_error, gdb_assert, gdb_assert_fail): Delete.
9907 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9908 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9909 common/buffer.h.
9910 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9911 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9912 initialize_inferiors): Delete.
9913
2275a1a7
PA
99142011-07-20 Pedro Alves <pedro@codesourcery.com>
9915
9916 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9917 symbol error.
9918
0a5b1e09
PA
99192011-05-31 Pedro Alves <pedro@codesourcery.com>
9920
9921 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9922 assertion.
9923 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9924
6938fd34
YQ
99252011-05-26 Yao Qi <yao@codesourcery.com>
9926
9927 * Makefile.in (thread-db.o): Track dependence to
9928 common/gdb_thread_db.h.
9929 * thread-db.c: include gdb_thread_db.h from right place.
9930
b481f9e0
TT
99312011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9932
9933 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9934 __FILE__ and __LINE__ to internal_error.
9935
98a5dd13
DE
99362011-05-13 Doug Evans <dje@google.com>
9937
9938 * thread-db.c (try_thread_db_load_from_sdir): New function.
9939 (try_thread_db_load_from_dir): New function.
9940 (thread_db_load_search): Handle $sdir, ignore $pdir.
9941 Remove trying of system directories if search of
9942 libthread-db-search-path fails, that is now done via $sdir.
9943
d248b706
KY
99442011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9945
9946 * server.c (handle_query): Add EnableDisableTracepoints to the list
9947 of supported features.
43aaf8b6 9948 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 9949 tracepoints.
43aaf8b6
PA
9950 (cmd_qtenable_disable): New.
9951 (cmd_qtstart): Install tracepoints even if disabled.
9952 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9953 receiving a QTEnable or QTDisable packet.
9954 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9955 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9956 tracepoints.
9957 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 9958
84e578fb
DE
99592011-05-10 Doug Evans <dje@google.com>
9960
9961 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9962
71f55dd8
DE
99632011-05-04 Doug Evans <dje@google.com>
9964
9965 * linux-low.c (linux_join): Skip process lookup.
9966 * spu-low.c (spu_join): Ditto.
9967 * server.c (join_inferiors_callback): Delete.
9968 (process_serial_event): For 'D' packet (detach) call join_inferior
9969 directly.
9970
4d393d60
JM
99712011-05-04 Joseph Myers <joseph@codesourcery.com>
9972
9973 * README: Don't mention xscale*-*-linux*.
9974 * configure.srv (xscale*-*-linux*): Don't handle target.
9975
b00ad6ff
NF
99762011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9977
9978 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9979 casting pointers.
9980 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9981 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9982 (i386_emit_void_call_2): Likewise.
9983
af96c192
YQ
99842011-04-26 Yao Qi <yao@codesourcery.com>
9985
43aaf8b6
PA
9986 * linux-low.c: Move common macros to linux-ptrace.h.
9987 Include linux-ptrace.h.
af96c192
YQ
9988 * Makefile.in (linux_ptrace_h): New.
9989 (linux-low.o): Depends on linux-ptrace.h.
9990
03f2bd59
JK
99912011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9992
9993 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9994 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9995 (remote_prepare): New function with most of the TCP code from ...
9996 (remote_open): ... here. Detect PORT here unconditionally. Move also
9997 setting transport_is_reliable.
9998 * server.c (run_once): New variable.
9999 (gdbserver_usage): Document it.
10000 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10001 the first run if RUN_ONCE.
10002 * server.h (run_once, remote_prepare): New declarations.
10003
7a9dd1b2
TT
100042011-04-19 Tom Tromey <tromey@redhat.com>
10005
10006 * win32-low.c (handle_load_dll): Remove duplicate "the".
10007
81239425
PM
100082011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10009
10010 Remove support for old Cygwin 1.5 versions.
10011 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10012 function to avoid warning.
10013 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10014 warning.
10015
9e0627f1
PM
100162011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10017
10018 * gdbserver/server.h (Macro _): Define it if not available.
10019
588eebee
MS
100202011-03-14 Michael Snyder <msnyder@vmware.com>
10021
348af9f7 10022 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 10023
43f70d4c
JB
100242011-03-10 Joel Brobecker <brobecker@adacore.com>
10025
10026 * Makefile.in (maintainer-clean realclean distclean): Remove
10027 "make ... subdir_do" command.
10028
348af9f7
MS
100292011-03-10 Michael Snyder <msnyder@vmware.com>
10030
10031 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10032
10033 * server.c (handle_v_run): Free alloced buffer on early return.
10034
e637a4f5
YQ
100352011-03-09 Yao Qi <yao@codesourcery.com>
10036
10037 Revert:
10038 2011-03-04 Yao Qi <yao@codesourcery.com>
10039
10040 * Makefile.in: Remove GNU make feature --directory.
10041
10042 2011-03-05 Yao Qi <yao@codesourcery.com>
10043
10044 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10045 (subdir_do): New make target. Copied from gdb/Makefile.
10046 (maintainer-clean, realclean, distclean, clean): Call corresponding
10047 make targets in common/Makefile.
10048
10049 2011-02-11 Yao Qi <yao@codesourcery.com>
10050
10051 * configure.ac: Call AC_PROG_RANLIB.
10052 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10053 * configure: Regenerate.
10054
e6edda56
JK
100552011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10056
10057 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10058
e5141119
JB
100592011-03-06 Yao Qi <yao@codesourcery.com>
10060
10061 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10062
64794aa4
JB
100632011-03-05 Yao Qi <yao@codesourcery.com>
10064
10065 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10066 (subdir_do): New make target. Copied from gdb/Makefile.
10067 (maintainer-clean, realclean, distclean, clean): Call corresponding
10068 make targets in common/Makefile.
10069
7a762829
YQ
100702011-03-04 Yao Qi <yao@codesourcery.com>
10071
10072 * Makefile.in: Remove GNU make feature --directory.
10073
348af9f7
MS
100742011-03-04 Michael Snyder <msnyder@vmware.com>
10075
10076 * server.c (queue_stop_reply): Call xmalloc not malloc.
10077
100782011-03-02 Michael Snyder <msnyder@vmware.com>
10079
10080 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10081
9f72fee2
MS
100822011-02-28 Michael Snyder <msnyder@vmware.com>
10083
588eebee
MS
10084 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10085 (cmd_qtframe): Ditto.
10086 (cmd_qtbuffer): Ditto.
10087 (cmd_bigqtbuffer): Ditto.
10088
9f72fee2
MS
10089 * utils.c (decimal2str): Initialize 'width' to nine, then
10090 don't mess with it.
10091
8040bd49
UW
100922011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10093
10094 * hostio.c (require_data): Free *data, not data.
10095
7e52cbd0
JK
100962011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10097
10098 * hostio.c (require_data): Use free, not xfree.
10099
9130f83e
MS
101002011-02-27 Michael Snyder <msnyder@vmware.com>
10101
4b812f4e
MS
10102 * server.c (handle_query): Discard unused value.
10103
9130f83e
MS
10104 * hostio.c (require_data): Free malloc memory before returning
10105 error.
10106
69d37113
MS
101072011-02-26 Michael Snyder <msnyder@vmware.com>
10108
10109 * linux-low.c (list_threads): Call closedir for dirent.
10110
35f5825a
MS
101112011-02-27 Michael Snyder <msnyder@vmware.com>
10112
2a589cef
MS
10113 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10114 a case statement falls through.
10115
0adea5f7
MS
10116 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10117
35f5825a
MS
10118 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10119 in comparison.
10120
238f1c74
MS
101212011-02-26 Michael Snyder <msnyder@vmware.com>
10122
10123 * utils.c (decimal2str): Eliminate dead code and dead param.
10124 (pulongest): Drop dead param from call to decimal2str.
10125 (plongest): Ditto.
10126
633ff500
JB
101272011-02-24 Joel Brobecker <brobecker@adacore.com>
10128
10129 Revert the following patch (not approved yet):
10130 2011-02-21 Hui Zhu <teawater@gmail.com>
10131 * tracepoint.c (tp_printf): New function.
10132 (eval_agent_expr): Handle gdb_agent_op_printf.
10133
f9c6ff72
HZ
101342011-02-21 Hui Zhu <teawater@gmail.com>
10135
10136 * tracepoint.c (tp_printf): New function.
10137 (eval_agent_expr): Handle gdb_agent_op_printf.
10138
94d5e490
TT
101392011-02-18 Tom Tromey <tromey@redhat.com>
10140
10141 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10142 (tracepoint.o): Likewise.
10143 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10144 (gdb_agent_op_names): Likewise.
10145
c7f96d2b
TT
101462011-02-18 Tom Tromey <tromey@redhat.com>
10147
10148 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10149 gdb_agent_op_rot>: New constants.
10150 (gdb_agent_op_names): Add pick and roll.
10151 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10152 cases.
10153
0feedb2c
JK
101542011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10155
10156 * aclocal.m4: Regenerated with aclocal-1.11.1.
10157
b3b9301e
PA
101582011-02-14 Pedro Alves <pedro@codesourcery.com>
10159
10160 * server.c (handle_qxfer_traceframe_info): New.
10161 (qxfer_packets): Register "traceframe-info".
10162 (handle_query): Report support for qXfer:traceframe-info:read+.
10163 * tracepoint.c (match_blocktype): New.
10164 (traceframe_find_block_type): Rename to ...
10165 (traceframe_walk_blocks): ... this. Add callback filter argument,
10166 and use it.
10167 (traceframe_find_block_type): New, reimplemented on top of
10168 traceframe_walk_blocks.
10169 (build_traceframe_info_xml): New.
10170 (traceframe_read_info): New.
10171 * server.h (traceframe_read_info): Declare.
10172
4f3e6fb7
YQ
101732011-02-11 Yao Qi <yao@codesourcery.com>
10174
10175 * configure.ac: Call AC_PROG_RANLIB.
10176 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10177 * configure: Regenerate.
10178
764880b7
PA
101792011-02-07 Pedro Alves <pedro@codesourcery.com>
10180
10181 * server.c (gdb_read_memory): Change return semantics to allow
10182 partial transfers.
10183 (handle_search_memory_1): Adjust.
10184 (process_serial_event) <'m' packet>: Handle partial transfers.
10185 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10186
1c79eb8a
PA
101872011-01-28 Pedro Alves <pedro@codesourcery.com>
10188
10189 * regcache.c (init_register_cache): Initialize
10190 regcache->register_status.
10191 (free_register_cache): Release regcache->register_status.
10192 (regcache_cpy): Copy register_status.
10193 (registers_to_string): Print 'x's for unavailable registers.
10194 (supply_register): Mark the register's status valid or
10195 unavailable, depending on whether a buffer was passed in or not.
10196 (supply_register_zeroed): New.
10197 (supply_regblock): Mark the registers' status valid or
10198 unavailable, depending on whether a buffer was passed in or not.
10199 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10200 (struct regcache): New `register_status' field.
10201 (supply_register_zeroed): Declare.
10202 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10203 supply_register_zeroed, rather than passing a NULL buffer to
10204 supply_register.
10205 * tracepoint.c (fetch_traceframe_registers): Update comment.
10206
85724a0e
PA
102072011-01-28 Pedro Alves <pedro@codesourcery.com>
10208
10209 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10210 buffer explicit.
10211
d08aafef
PA
102122011-01-25 Pedro Alves <pedro@codesourcery.com>
10213
10214 * server.h (decode_xfer_write): Change prototype.
10215 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10216 and don't extract the annex here.
10217 * server.c (decode_xfer_read): Remove `annex' parameter,
10218 and don't extract the annex here.
10219 (decode_xfer): New.
10220 (struct qxfer): New.
10221 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10222 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10223 (handle_qxfer_statictrace): New functions, abstracted out from
10224 handle_query, and made to use the struct qxfer interface.
10225 (handle_threads_qxfer_proper): Rename to ...
10226 (handle_qxfer_threads_proper): ... this.
10227 (handle_threads_qxfer): Rename to ...
10228 (handle_qxfer_threads): ... this. Adjust.
10229 (qxfer_packets): New array.
10230 (handle_qxfer): New function.
10231 (handle_query): Use handle_qxfer.
10232
493e2a69
MS
102332011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10234
10235 * gdbreplay.c: Shorten lines of >= 80 columns.
10236 * linux-low.c: Ditto.
10237 * linux-ppc-low.c: Ditto.
10238 * linux-s390-low.c: Ditto.
10239 * linux-sparc-low.c: Ditto.
10240 * linux-x86-low.c: Ditto.
10241 * linux-xtensa-low.c: Ditto.
10242 * mem-break.c: Ditto.
10243 * nto-low.c: Ditto.
10244 * regcache.h: Ditto.
10245 * remote-utils.c: Ditto.
10246 * server.c: Ditto.
10247 * server.h: Ditto.
10248 * thread-db.c: Ditto.
10249 * tracepoint.c: Ditto.
10250 * utils.c: Ditto.
10251 * win32-low.h: Ditto.
10252
44944448
JB
102532011-01-05 Joel Brobecker <brobecker@adacore.com>
10254
10255 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10256 update.
10257
71ce852c
JB
102582011-01-01 Joel Brobecker <brobecker@adacore.com>
10259
10260 * server.c (gdbserver_version): Update copyright year in version
10261 output.
10262 * gdbreplay.c (gdbreplay_version): Ditto.
10263
eb826dc6
MF
102642010-12-29 Jie Zhang <jie.zhang@analog.com>
10265
10266 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10267 * linux-bfin-low.c: New file.
10268 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10269 PT_DATA_ADDR for BFIN targets.
10270 * Makefile.in (SFILES): Add linux-bfin-low.c.
10271 (clean): Remove reg-bfin.c.
10272 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10273 * README: Mention supported Blackfin targets.
10274
39ab222a
MF
102752010-12-23 Mike Frysinger <vapier@gentoo.org>
10276
10277 * .gitignore: New file.
10278
a1f2ce7d
MF
102792010-11-16 Mike Frysinger <vapier@gentoo.org>
10280
10281 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10282
f474844c
JZ
102832010-10-22 Jie Zhang <jie@codesourcery.com>
10284
10285 * Makefile.in: Add FLAGS_TO_PASS variable.
10286 (install): Remove dependency of install-only and recursively
10287 invoke make for install-only.
10288
f1048712
DE
102892010-10-04 Doug Evans <dje@google.com>
10290
10291 * Makefile.in (uninstall): Use $(DESTDIR).
10292
b53a1623
PA
102932010-09-24 Pedro Alves <pedro@codesourcery.com>
10294
e6ee044d
PA
10295 PR gdb/11842
10296
b53a1623
PA
10297 * linux-x86-low.c (compat_siginfo_from_siginfo)
10298 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10299 si_code is < 0. Check for si_code == SI_TIMER before checking for
10300 si_code < 0.
10301
fa1bd1e4
JB
103022010-09-13 Joel Brobecker <brobecker@adacore.com>
10303
10304 * lynx-i386-low.c: New file.
10305 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10306
47fac8f8
JB
103072010-09-13 Joel Brobecker <brobecker@adacore.com>
10308
10309 * lynx-low.c (ptrace_request_to_str): Remove handling for
10310 request values that have been removed in LynxOS 5.x.
10311
1adfc54d
JB
103122010-09-13 Joel Brobecker <brobecker@adacore.com>
10313
10314 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10315 <ptrace.h>
10316
c2a66c29
NS
103172010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10318
10319 * configure.ac: Add --enable-inprocess-agent option.
10320 * configure: Rebuilt.
10321
32fcada3
YQ
103222010-09-06 Yao Qi <yao@codesourcery.com>
10323
10324 * linux-low.c (linux_kill): Remove unused variable.
10325 (linux_stabilize_threads): Likewise.
10326 * server.c (start_inferior): Likewise.
10327 (queue_stop_reply_callback): Likewise.
10328 * tracepoint.c (do_action_at_tracepoint): Likewise.
10329
0cccb683
YQ
103302010-09-06 Yao Qi <yao@codesourcery.com>
10331
10332 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10333 on return.
10334
423ec54c
JK
103352010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10336
10337 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10338
12ac6819
PA
103392010-09-06 Pedro Alves <pedro@codesourcery.com>
10340
10341 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10342 "$(IPA_DEPFILES)".
10343
8ed54b31
JB
103442010-09-01 Joel Brobecker <brobecker@adacore.com>
10345
10346 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10347 gdbserver/lynx-ppc-low.c: New files.
10348 * Makefile.in (lynx_low_h): New variable.
10349 (lynx-low.o, lynx-ppc-low.o): New rules.
10350 * configure.ac: On LynxOS, link with -lnetinet.
10351 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10352 * configure: regenerate.
10353
bb0116a4
JB
103542010-09-01 Joel Brobecker <brobecker@adacore.com>
10355
10356 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10357 * configure.ac: Add check for vasprintf and vsnprintf.
10358 * configure, config.in: Regenerate.
10359 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10360
a778ab81 103612010-09-01 Joel Brobecker <brobecker@adacore.com>
10362
10363 * gdbreplay.c: Move include of alloca.h up, next to include of
10364 malloc.h.
10365 * server.h: Add include of malloc.h.
10366 * mem-break.c: Remove include of malloc.h.
10367 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10368
8b034a19 103692010-09-01 Joel Brobecker <brobecker@adacore.com>
10370
10371 * Makefile.in (memmem.o): Build with -Wno-error.
10372
103732010-09-01 Joel Brobecker <brobecker@adacore.com>
10374
10375 * utils.c (xsnprintf): Make non-static.
10376 * server.h: Add xsnprintf declaration.
10377 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10378 replace calls to snprintf by calls to xsnprintf throughout.
10379
103802010-09-01 Joel Brobecker <brobecker@adacore.com>
10381
10382 * configure.ac: Add configure check for alloca.
10383 * configure, config.in: Regenerate.
10384 * server.h: Include alloca.h if it exists.
10385 * gdbreplay.c: Include alloca.h if it exists.
10386
1a981360
PA
103872010-08-28 Pedro Alves <pedro@codesourcery.com>
10388
10389 * linux-low.c (__SIGRTMIN): Define if not already defined.
10390 (linux_create_inferior): Check for __ANDROID__ rather than
10391 __SIGRTMIN.
10392 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10393 are already deferred.
10394 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10395 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10396 stopped and already has a pending signal to report.
10397 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10398 a pending signal to report or is moving out of a jump pad.
10399 (linux_init_signals): Check for __ANDROID__ rather than
10400 __SIGRTMIN.
10401
b4d51a55
PA
104022010-08-28 Pedro Alves <pedro@codesourcery.com>
10403
10404 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10405 debug_threads check. Avoid a linear search when not doing debug
10406 output.
10407
ec48365d
PA
104082010-08-27 Pedro Alves <pedro@codesourcery.com>
10409
10410 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10411 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10412 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10413 (process_event): Change local fd's type to gdb_fildes_t.
10414 (create_file_handler): Adjust prototype.
10415 (delete_file_handler): Adjust prototype.
10416 (handle_file_event): Adjust prototype. Use pfildes.
10417 (create_file_event): Adjsut prototype.
10418 * remote-utils.c (remote_desc, listen_desc): Change type to
10419 gdb_fildes_t.
10420 * server.h: New gdb_fildes_t typedef.
10421 [USE_WIN32API]: Include winsock2.h.
10422 (delete_file_handler, add_file_handler): Adjust prototypes.
10423 (pfildes): Declare.
10424 * utils.c (pfildes): New.
10425
854d88f0
PA
104262010-08-27 Pedro Alves <pedro@codesourcery.com>
10427
10428 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10429 * configure: Regenerate.
10430
0146f85b
PA
104312010-08-27 Pedro Alves <pedro@codesourcery.com>
10432
10433 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10434 (linux_done_accessing_memory): ... this.
10435 (linux_target_ops): Adjust.
10436 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10437 * nto-low.c (nto_target_ops): Adjust comment.
10438 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10439 * spu-low.c (spu_target_ops): Adjust comment.
10440 * target.h (target_ops): Rename unprepare_to_access_memory field
10441 to done_accessing_memory.
10442 (unprepare_to_access_memory): Rename to ...
10443 (done_accessing_memory): ... this.
10444
90d74c30
PA
104452010-08-26 Pedro Alves <pedro@codesourcery.com>
10446
10447 * linux-low.c (linux_prepare_to_access_memory): New.
10448 (linux_unprepare_to_access_memory): New.
10449 (linux_target_ops): Install them.
10450 * server.c (read_memory): Rename to ...
10451 (gdb_read_memory): ... this. Use
10452 prepare_to_access_memory/prepare_to_access_memory.
10453 (write_memory): Rename to ...
10454 (gdb_write_memory): ... this. Use
10455 prepare_to_access_memory/prepare_to_access_memory.
10456 (handle_search_memory_1): Adjust.
10457 (process_serial_event): Adjust.
10458 * target.h (struct target_ops): New fields
10459 prepare_to_access_memory and unprepare_to_access_memory.
10460 (prepare_to_access_memory, unprepare_to_access_memory): New.
10461 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10462 prepare_to_access_memory/prepare_to_access_memory.
10463 * nto-low.c (nto_target_ops): Adjust.
10464 * spu-low.c (spu_target_ops): Adjust.
10465 * win32-low.c (win32_target_ops): Adjust.
10466
fd467969
PA
104672010-08-26 Pedro Alves <pedro@codesourcery.com>
10468
10469 * Makefile.in (WARN_CFLAGS): Get it from configure.
10470 (WERROR_CFLAGS): New.
10471 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10472 * configure.ac: Introduce --enable-werror, which adds -Werror to
10473 the compiler command line. Enabled by default. Disable with
10474 --disable-werror. Add -Wdeclaration-after-statement
10475 Wpointer-arith and -Wformat-nonliteral to warning flags.
10476 * configure: Regenerate.
10477
331e2f5f
PA
104782010-08-26 Pedro Alves <pedro@codesourcery.com>
10479
10480 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10481
e581f2b4
PA
104822010-08-26 Pedro Alves <pedro@codesourcery.com>
10483
10484 * gdbreplay.c (remote_error): New.
10485 (gdbchar): New.
10486 (expect): Use gdbchar. Check for error reading from GDB.
10487 Clarify sync error output.
10488 (play): Check for errors writing to GDB.
10489 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10490 * remote-utils.c (getpkt): Check for errors writing to the remote
10491 descriptor.
10492
3c11dd79
PA
104932010-08-25 Pedro Alves <pedro@codesourcery.com>
10494
10495 * linux-low.c (linux_wait_1): Move non-debugging code out of
10496 `debug_threads' control.
10497
d20a8ad9
PA
104982010-08-25 Pedro Alves <pedro@codesourcery.com>
10499
10500 * linux-low.c (linux_wait_1): Don't set last_status here.
10501 * server.c (push_event, queue_stop_reply_callback): Assert we're
10502 not pushing a TARGET_WAITKIND_IGNORE event.
10503 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10504 (myresume, handle_target_event): Set the thread's last_resume_kind
10505 and last_status from the target returned status.
10506
964e4306
PA
105072010-08-25 Pedro Alves <pedro@codesourcery.com>
10508
10509 PR threads/10729
10510
10511 * linux-x86-low.c (update_debug_registers_callback): New.
10512 (i386_dr_low_set_addr): Use it.
10513 (i386_dr_low_get_addr): New.
10514 (i386_dr_low_set_control): Use update_debug_registers_callback.
10515 (i386_dr_low_get_control): New.
10516 (i386_dr_low_get_status): Adjust.
10517 * linux-low.c (linux_stop_lwp): New.
10518 * linux-low.h (linux_stop_lwp): Declare.
10519
10520 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10521 argument instead of a i386_debug_reg_state.
10522 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10523 a i386_debug_reg_state.
10524 (i386_insert_aligned_watchpoint): Adjust.
10525 (i386_remove_aligned_watchpoint): Adjust.
10526 (i386_low_stopped_data_address): Read the debug registers from the
10527 inferior instead of from the mirrors.
10528 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10529 (i386_dr_low_get_addr): Declare.
10530 (i386_dr_low_get_control): Declare.
10531 (i386_dr_low_get_status): Change prototype.
10532
10533 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10534 (i386_dr_low_get_addr): New.
10535 (i386_dr_low_get_control): New.
10536 (i386_dr_low_get_status): Adjust prototype. Return
10537 dr_status_mirror.
10538 (i386_initial_stuff): Clear dr_status_mirror and
10539 dr_control_mirror.
10540 (i386_get_thread_context): Adjust.
10541 (i386_set_thread_context): Adjust.
10542 (i386_thread_added): Adjust.
10543
5f21a75b
PA
105442010-08-24 Pedro Alves <pedro@codesourcery.com>
10545
10546 * linux-low.h (linux_thread_area): Delete declaration.
10547
3e4c1235
TS
105482010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10549
10550 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10551 after its termination.
10552
1971b033
PA
105532010-08-09 Pedro Alves <pedro@codesourcery.com>
10554
10555 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10556 (gdb_wants_all_stopped): Delete.
10557 (linux_wait_1): Don't call them.
10558 * server.c (handle_v_cont): Tag all threads as want-stopped.
10559 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10560 stopped as "client-wants-stopped".
10561
310444ac
PA
105622010-07-31 Pedro Alves <pedro@codesourcery.com>
10563
10564 * Makefile.in (signals_h): New.
10565 (server_h): Depend on it.
10566 (server.o): Don't depend on $(signals_def).
10567 (signals.o): Depend on $(signals_def).
10568
a19cae16
JK
105692010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10570
10571 * Makefile.in (signals_def): New.
10572 (server_h): Append include/gdb/signals.h and signals_def.
10573 (server.o): Append signals_def.
10574
30d50328
JK
105752010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10576
10577 * server.c (handle_target_event): Use target_signal_to_host for
10578 resume_info.sig initialization.
10579 * target.h (struct thread_resume) <sig>: New comment.
10580
5c3216e2
OS
105812010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10582
c6f46ca0
OS
10583 * server.c (handle_query): strcpy() the returned string from paddress()
10584 instead of sprintf().
5c3216e2
OS
10585 * utils.c (paddress): Return phex_nz().
10586
6bd31874
JB
105872010-07-07 Joel Brobecker <brobecker@adacore.com>
10588
10589 * server.c (handle_v_cont): Call mourn_inferior if process
10590 just exited.
10591 (myresume): Likewise.
10592
0fb4aa4b
PA
105932010-07-01 Pedro Alves <pedro@codesourcery.com>
10594
10595 Static tracepoints, and integration with UST.
10596
10597 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10598 * mem-break.c (uninsert_all_breakpoints)
10599 (reinsert_all_breakpoints): New.
10600 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10601 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10602 (gdb_agent_ust_loaded, helper_thread_id)
10603 (gdb_agent_helper_thread_id): New macros.
10604 (struct ipa_sym_addresses): Add addr_ust_loaded,
10605 addr_helper_thread_id, addr_cmd_buf.
10606 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10607 (in_process_agent_loaded_ust): New.
10608 (write_e_ust_not_loaded): New.
10609 (maybe_write_ipa_ust_not_loaded): New.
10610 (struct collect_static_trace_data_action): New.
10611 (enum tracepoint_type) <static_tracepoint>: New.
10612 (struct tracepoint) <handle>: Mention static tracepoints.
10613 (struct static_tracepoint_ctx): New.
10614 (CMD_BUF_SIZE): New.
10615 (add_tracepoint_action): Handle static tracepoint actions.
10616 (unprobe_marker_at): New.
10617 (clear_installed_tracepoints): Handle static tracepoints.
10618 (cmd_qtdp): Handle static tracepoints.
10619 (probe_marker_at): New.
10620 (cmd_qtstart): Handle static tracepoints.
10621 (response_tracepoint): Handle static tracepoints.
10622 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10623 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10624 (get_context_regcache): Handle static tracepoints.
10625 (do_action_at_tracepoint): Handle static tracepoint actions.
10626 (traceframe_find_block_type): Handle static trace data blocks.
10627 (traceframe_read_sdata): New.
10628 (download_tracepoints): Download static tracepoint actions.
10629 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10630 (GDB_PROBE_NAME): New.
10631 (ust_ops): New.
10632 (GET_UST_SYM): New.
10633 (USTF): New.
10634 (dlsym_ust): New.
10635 (ust_marker_to_static_tracepoint): New.
10636 (gdb_probe): New.
10637 (collect_ust_data_at_tracepoint): New.
10638 (gdb_ust_probe): New.
10639 (UNIX_PATH_MAX, SOCK_DIR): New.
10640 (gdb_ust_connect_sync_socket): New.
10641 (resume_thread, stop_thread): New.
10642 (run_inferior_command): New.
10643 (init_named_socket): New.
10644 (gdb_ust_socket_init): New.
10645 (cstr_to_hexstr): New.
10646 (next_st): New.
10647 (first_marker, next_marker): New.
10648 (response_ust_marker): New.
10649 (cmd_qtfstm, cmd_qtsstm): New.
10650 (unprobe_marker_at, probe_marker_at): New.
10651 (cmd_qtstmat, gdb_ust_thread): New.
10652 (gdb_ust_init): New.
10653 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10654 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10655 (ST_REGENTRY): New.
10656 (x86_64_st_collect_regmap): New.
10657 (X86_64_NUM_ST_COLLECT_GREGS): New.
10658 (AMD64_RIP_REGNUM): New.
10659 (supply_static_tracepoint_registers): New.
10660 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10661 (ST_REGENTRY): New.
10662 (i386_st_collect_regmap): New.
10663 (i386_NUM_ST_COLLECT_GREGS): New.
10664 (supply_static_tracepoint_registers): New.
10665 * server.c (handle_query): Handle qXfer:statictrace:read.
10666 <qSupported>: Report support for StaticTracepoints, and
10667 qXfer:statictrace:read features.
10668 * server.h (traceframe_read_sdata)
10669 (supply_static_tracepoint_registers): Declare.
10670 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10671 (unpack_varlen_hex): Include in IPA build.
10672 * Makefile.in (ustlibs, ustinc): New.
10673 (IPA_OBJS): Add remote-utils-ipa.o.
10674 ($(IPA_LIB)): Link -ldl and -lpthread.
10675 (UST_CFLAGS): New.
10676 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10677 * config.in, configure: Regenerate.
10678
9e4344e5
PA
106792010-06-20 Ian Lance Taylor <iant@google.com>
10680 Pedro Alves <pedro@codesourcery.com>
10681
10682 * linux-x86-low.c (always_true): Delete.
10683 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10684 trying to fool the compiler with always_true.
10685
c6beb2cb
PA
106862010-06-20 Pedro Alves <pedro@codesourcery.com>
10687
10688 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10689 conditions in gdbserver.
10690
d2ed6730
UW
106912010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10692
10693 * spu-low.c (spu_read_memory): Wrap around local store limit.
10694 (spu_write_memory): Likewise.
10695
4e29fb54
PA
106962010-06-15 Pedro Alves <pedro@codesourcery.com>
10697
10698 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10699 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10700 LONGEST uses.
10701 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10702 uses.
10703 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10704 uses with LONGEST uses.
10705
6a271cae
PA
107062010-06-14 Stan Shebs <stan@codesourcery.com>
10707 Pedro Alves <pedro@codesourcery.com>
10708
10709 Bytecode compiler.
10710
10711 * linux-x86-low.c: Include limits.h.
10712 (add_insns): New.
10713 (always_true): New.
10714 (EMIT_ASM): New.
10715 (EMIT_ASM32): New.
10716 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10717 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10718 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10719 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10720 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10721 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10722 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10723 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10724 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10725 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10726 (amd64_emit_void_call_2): New.
10727 (amd64_emit_ops): New.
10728 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10729 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10730 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10731 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10732 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10733 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10734 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10735 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10736 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10737 (i386_emit_stack_adjust, i386_emit_int_call_1)
10738 (i386_emit_void_call_2): New.
10739 (i386_emit_ops): New.
10740 (x86_emit_ops): New.
10741 (the_low_target): Install x86_emit_ops.
10742 * server.h (struct emit_ops): New.
10743 (get_raw_reg_func_addr): Declare.
10744 (current_insn_ptr, emit_error): Declare.
10745 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10746 (set_trace_state_variable_value): New defines.
10747 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10748 addr_get_trace_state_variable_value and
10749 addr_set_trace_state_variable_value.
10750 (symbol_list): New fields for get_raw_reg,
10751 get_trace_state_variable_value and set_trace_state_variable_value.
10752 (condfn): New typedef.
10753 (struct tracepoint): New field `compiled_cond'.
10754 (do_action_at_tracepoint): Clear compiled_cond.
10755 (get_trace_state_variable_value, set_trace_state_variable_value):
10756 Export in the IPA.
10757 (condition_true_at_tracepoint): If there's a compiled condition,
10758 run that.
10759 (current_insn_ptr, emit_error): New globals.
10760 (struct bytecode_address): New.
10761 (get_raw_reg_func_addr): New.
10762 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10763 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10764 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10765 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10766 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10767 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10768 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10769 (compile_tracepoint_condition, compile_bytecodes): New.
10770 * target.h (emit_ops): Forward declare.
10771 (struct target_ops): New field emit_ops.
10772 (target_emit_ops): New.
10773 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10774 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10775 * linux-low.c (linux_emit_ops): New.
10776 (linux_target_ops): Install it.
10777 * linux-low.h (struct linux_target_ops): New field emit_ops.
10778
92b72907
UW
107792010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10780
10781 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10782 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10783
fa593d66
PA
107842010-06-01 Pedro Alves <pedro@codesourcery.com>
10785 Stan Shebs <stan@codesourcery.com>
10786
10787 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10788 (all): Depend on $(extra_libraries).
10789 (install-only): Install the IPA.
10790 (IPA_OBJS, IPA_LIB): New.
10791 (clean): Remove the IPA lib.
10792 (IPAGENT_CFLAGS): New.
10793 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10794 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10795 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10796 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10797 * configure.ac: Check for atomic builtins support in the compiler.
10798 (IPA_DEPFILES, extra_libraries): Define.
10799 * configure.srv (ipa_obj): Add description.
10800 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10801 (i[34567]86-*-linux*): Set ipa_obj.
10802 (x86_64-*-linux*): Set ipa_obj.
10803 * linux-low.c (stabilizing_threads): New.
10804 (supports_fast_tracepoints): New.
10805 (linux_detach): Stabilize threads before detaching.
10806 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10807 the lwp is either not stabilizing, or is moving out of a jump pad.
10808 (linux_fast_tracepoint_collecting): New.
10809 (maybe_move_out_of_jump_pad): New.
10810 (enqueue_one_deferred_signal): New.
10811 (dequeue_one_deferred_signal): New.
10812 (linux_wait_for_event_1): If moving out of a jump pad, defer
10813 pending signals to later.
10814 (linux_stabilize_threads): New.
10815 (linux_wait_1): Check if threads need moving out of jump pads, and
10816 do it if so.
10817 (stuck_in_jump_pad_callback): New.
10818 (move_out_of_jump_pad_callback): New.
10819 (lwp_running): New.
10820 (linux_resume_one_lwp): Handle moving out of jump pads.
10821 (linux_set_resume_request): Dequeue deferred signals.
10822 (need_step_over_p): Also step over fast tracepoint jumps.
10823 (start_step_over): Also uninsert fast tracepoint jumps.
10824 (finish_step_over): Also reinsert fast tracepoint jumps.
10825 (linux_install_fast_tracepoint_jump): New.
10826 (linux_target_ops): Install linux_stabilize_threads and
10827 linux_install_fast_tracepoint_jump_pad.
10828 * linux-low.h (linux_target_ops) <get_thread_area,
10829 install_fast_tracepoint_jump_pad>: New fields.
10830 (struct lwp_info) <collecting_fast_tracepoint,
10831 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10832 (linux_get_thread_area): Declare.
10833 * linux-x86-low.c (jump_insn): New.
10834 (x86_get_thread_area): New.
10835 (append_insns): New.
10836 (push_opcode): New.
10837 (amd64_install_fast_tracepoint_jump_pad): New.
10838 (i386_install_fast_tracepoint_jump_pad): New.
10839 (x86_install_fast_tracepoint_jump_pad): New.
10840 (the_low_target): Install x86_get_thread_area and
10841 x86_install_fast_tracepoint_jump_pad.
10842 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10843 (struct fast_tracepoint_jump): New.
10844 (fast_tracepoint_jump_insn): New.
10845 (fast_tracepoint_jump_shadow): New.
10846 (find_fast_tracepoint_jump_at): New.
10847 (fast_tracepoint_jump_here): New.
10848 (delete_fast_tracepoint_jump): New.
10849 (set_fast_tracepoint_jump): New.
10850 (uninsert_fast_tracepoint_jumps_at): New.
10851 (reinsert_fast_tracepoint_jumps_at): New.
10852 (set_breakpoint_at): Use write_inferior_memory.
10853 (uninsert_raw_breakpoint): Use write_inferior_memory.
10854 (check_mem_read): Mask out fast tracepoint jumps.
10855 (check_mem_write): Mask out fast tracepoint jumps.
10856 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10857 (set_fast_tracepoint_jump): Declare.
10858 (delete_fast_tracepoint_jump)
10859 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10860 (reinsert_fast_tracepoint_jumps_at): Declare.
10861 * regcache.c: Don't compile many functions when building the
10862 in-process agent library.
10863 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10864 the register buffer in the heap.
10865 (free_register_cache): If the register buffer isn't owned by the
10866 regcache, don't free it.
10867 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10868 pre-existing register caches.
10869 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10870 type.
10871 (convert_ascii_to_int): : Constify `from' parameter type.
10872 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10873 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10874 the needed buffer in-place.
10875 (relocate_instruction): New.
10876 * server.c (handle_query) <qSymbols>: If the target supports
10877 tracepoints, give it a chance of looking up symbols. Report
10878 support for fast tracepoints.
10879 (handle_status): Stabilize threads.
10880 (process_serial_event): Adjust.
10881 * server.h (struct fast_tracepoint_jump): Forward declare.
10882 (struct process_info) <fast_tracepoint_jumps>: New field.
10883 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10884 (decode_X_packet, decode_M_packet): Adjust.
10885 (relocate_instruction): Declare.
10886 (in_process_agent_loaded): Declare.
10887 (tracepoint_look_up_symbols): Declare.
10888 (struct fast_tpoint_collect_status): Declare.
10889 (fast_tracepoint_collecting): Declare.
10890 (force_unlock_trace_buffer): Declare.
10891 (handle_tracepoint_bkpts): Declare.
10892 (initialize_low_tracepoint)
10893 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10894 * target.h (struct target_ops) <stabilize_threads,
10895 install_fast_tracepoint_jump_pad>: New fields.
10896 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10897 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10898 [HAVE_STDINT_H]: Include stdint.h.
10899 (trace_debug_1): Rename to ...
10900 (trace_vdebug): ... this.
10901 (trace_debug): Rename to ...
10902 (trace_debug_1): ... this. Add `level' parameter.
10903 (trace_debug): New.
10904 (ATTR_USED, ATTR_NOINLINE): New.
10905 (IP_AGENT_EXPORT): New.
10906 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10907 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10908 (about_to_request_buffer_space, trace_buffer_is_full)
10909 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10910 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10911 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10912 (traceframe_write_count, traceframes_created)
10913 (trace_state_variables)
10914 New renaming defines.
10915 (struct ipa_sym_addresses): New.
10916 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10917 (symbol_list): New.
10918 (ipa_sym_addrs): New.
10919 (all_tracepoint_symbols_looked_up): New.
10920 (in_process_agent_loaded): New.
10921 (write_e_ipa_not_loaded): New.
10922 (maybe_write_ipa_not_loaded): New.
10923 (tracepoint_look_up_symbols): New.
10924 (debug_threads) [IN_PROCESS_AGENT]: New.
10925 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10926 (UNKNOWN_SIDE_EFFECTS): New.
10927 (stop_tracing): New.
10928 (flush_trace_buffer): New.
10929 (stop_tracing_bkpt): New.
10930 (flush_trace_buffer_bkpt): New.
10931 (read_inferior_integer): New.
10932 (read_inferior_uinteger): New.
10933 (read_inferior_data_pointer): New.
10934 (write_inferior_data_pointer): New.
10935 (write_inferior_integer): New.
10936 (write_inferior_uinteger): New.
10937 (struct collect_static_trace_data_action): Delete.
10938 (enum tracepoint_type): New.
10939 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
10940 <actions_str, step_actions, step_actions_str>: Only include in
10941 GDBserver.
fa593d66
PA
10942 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10943 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10944 (tracepoints): Use IP_AGENT_EXPORT.
10945 (last_tracepoint): Don't include in the IPA.
10946 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10947 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10948 (alloced_trace_state_variables): New.
10949 (trace_state_variables): Use IP_AGENT_EXPORT.
10950 (traceframe_t): Delete unused variable.
10951 (circular_trace_buffer): Don't include in the IPA.
10952 (trace_buffer_start): Delete.
10953 (struct trace_buffer_control): New.
10954 (trace_buffer_free): Delete.
10955 (struct ipa_trace_buffer_control): New.
10956 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10957 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10958 New.
10959 (trace_buffer_ctrl): New.
10960 (TRACE_BUFFER_CTRL_CURR): New.
10961 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10962 Reimplement as macros.
10963 (trace_buffer_wrap): Delete.
10964 (traceframe_write_count, traceframe_read_count)
10965 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10966 (struct tracepoint_hit_ctx) <type>: New field.
10967 (struct fast_tracepoint_ctx): New.
10968 (memory_barrier): New.
10969 (cmpxchg): New.
10970 (record_tracepoint_error): Update atomically in the IPA.
10971 (clear_inferior_trace_buffer): New.
10972 (about_to_request_buffer_space): New.
10973 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10974 updating the same buffer.
10975 (add_tracepoint): Default the tracepoint's type to trap
10976 tracepoint, and orig_size to -1.
10977 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10978 internal variables.
10979 (create_trace_state_variable): New parameter `gdb'. Handle it.
10980 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10981 (cmd_qtdp): Handle fast tracepoints.
10982 (cmd_qtdv): Adjust.
10983 (max_jump_pad_size): New.
10984 (gdb_jump_pad_head): New.
10985 (get_jump_space_head): New.
10986 (claim_jump_space): New.
10987 (sort_tracepoints): New.
10988 (MAX_JUMP_SIZE): New.
10989 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10990 IPA.
10991 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10992 support. Upload fast traceframes, and delete internal IPA
10993 breakpoints.
10994 (stop_tracing_handler): New.
10995 (flush_trace_buffer_handler): New.
10996 (cmd_qtstop): Upload fast tracepoints.
10997 (response_tracepoint): Handle fast tracepoints.
10998 (tracepoint_finished_step): Upload fast traceframes. Set the
10999 tracepoint hit context's tracepoint type.
11000 (handle_tracepoint_bkpts): New.
11001 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11002 type. Add comment about fast tracepoints.
11003 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11004 non-existing action_str field.
11005 (get_context_regcache): Handle fast tracepoints.
11006 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11007 to the regcache.
11008 (fast_tracepoint_from_jump_pad_address): New.
11009 (fast_tracepoint_from_ipa_tpoint_address): New.
11010 (collecting_t): New.
11011 (force_unlock_trace_buffer): New.
11012 (fast_tracepoint_collecting): New.
11013 (collecting): New.
11014 (gdb_collect): New.
11015 (write_inferior_data_ptr): New.
11016 (target_tp_heap): New.
11017 (target_malloc): New.
11018 (download_agent_expr): New.
11019 (UALIGN): New.
11020 (download_tracepoints): New.
11021 (download_trace_state_variables): New.
11022 (upload_fast_traceframes): New.
11023 (IPA_FIRST_TRACEFRAME): New.
11024 (IPA_NEXT_TRACEFRAME_1): New.
11025 (IPA_NEXT_TRACEFRAME): New.
11026 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11027 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11028 (gdb_jump_pad_buffer_end): New.
11029 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11030 (initialize_tracepoint): Adjust.
11031 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11032 buffer. Initialize the low module.
11033 * utils.c (PREFIX, TOOLNAME): New.
11034 (malloc_failure): Use PREFIX.
11035 (error): In the IPA, an error causes an exit.
11036 (fatal, warning): Use PREFIX.
11037 (internal_error): Use TOOLNAME.
11038 (NUMCELLS): Increase to 10.
11039 * configure, config.in: Regenerate.
11040
d149dd1d
PA
110412010-06-01 Pedro Alves <pedro@codesourcery.com>
11042
11043 * server.c (handle_query) <qSupported>: Do two passes over the
11044 qSupported string to avoid nesting strtok.
11045
f6528abd
JK
110462010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11047
11048 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11049 (CDEPS): New.
11050 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11051 -Wl,--dynamic-list.
11052 * configure: Regenerate.
11053 * proc-service.list: New.
11054
ca2a87a0
JK
110552010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11056
11057 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11058 New comment.
11059
363a6e9f
OS
110602010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11061
11062 * gdbreplay.c (remote_open): Check error return from socket() call by
11063 its equality to -1 not by it being negative.
11064 * remote-utils.c (remote_open): Likewise.
11065
d23b6cb1
PA
110662010-05-23 Pedro Alves <pedro@codesourcery.com>
11067
11068 * config.h: Regenerate.
11069
28d3cf85
MK
110702010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11071
11072 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11073 doesn't provide PTRACE_GET_THREAD_AREA.
11074
fea36a59
MK
110752010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11076
11077 * linux-m68k-low.c: Include <asm/ptrace.h>
11078 (ps_get_thread_area): Implement.
11079
24b066ba
DE
110802010-05-03 Doug Evans <dje@google.com>
11081
11082 * event-loop.c (struct callback_event): New struct.
11083 (callback_list): New global.
11084 (append_callback_event, delete_callback_event): New functions.
11085 (process_callback): New function.
11086 (start_event_loop): Call it.
11087 * remote-utils.c (NOT_SCHEDULED): Define.
11088 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11089 moved out of readchar.
11090 (readchar): Rewrite. Call reschedule before returning.
11091 (reset_readchar): New function.
11092 (remote_close): Call it.
11093 (process_remaining, reschedule): New functions.
11094 * server.h (callback_handler_func): New typedef.
11095 (append_callback_event, delete_callback_event): Declare.
11096
9836d6ea
PA
110972010-05-03 Pedro Alves <pedro@codesourcery.com>
11098
11099 * proc-service.c (ps_pglobal_lookup): Use
11100 thread_db_look_up_one_symbol.
11101 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11102 parameter. Use it instead of all_symbols_looked_up.
11103 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11104 field.
11105 (all_symbols_looked_up): Don't declare.
11106 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11107 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11108 field.
11109 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11110 Set all_symbols_looked_up here.
11111 (thread_db_look_up_one_symbol): New.
11112 (thread_db_get_tls_address): Adjust.
11113 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11114 thread_db object on the heap, and tentatively set it in the
11115 process structure.
11116 (thread_db_init): Don't set all_symbols_looked_up here.
11117 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11118
7984d532
PA
111192010-05-03 Pedro Alves <pedro@codesourcery.com>
11120
11121 * linux-low.c (linux_kill, linux_detach): Adjust.
11122 (status_pending_p_callback): Remove redundant statement. Check
11123 for !TARGET_WAITIKIND_IGNORE, instead of
11124 TARGET_WAITKIND_STOPPED.
11125 (handle_tracepoints): Make sure LWP is locked. Adjust.
11126 (linux_wait_for_event_1): Adjust.
11127 (linux_cancel_breakpoints): New.
11128 (unsuspend_one_lwp): New.
11129 (unsuspend_all_lwps): New.
11130 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11131 (send_sigstop_callback): Change return type to int, add new
11132 `except' parameter and handle it.
11133 (suspend_and_send_sigstop_callback): New.
11134 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11135 pass them down. If SUSPEND, also increment the lwp's suspend
11136 count.
11137 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11138 (need_step_over_p): Don't consider suspended LWPs.
11139 (start_step_over): Adjust.
11140 (proceed_one_lwp): Change return type to int, add new `except'
11141 parameter and handle it.
11142 (unsuspend_and_proceed_one_lwp): New.
11143 (proceed_all_lwps): Use find_inferior instead of
11144 for_each_inferior.
11145 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11146 also decrement the suspend count of LWPs. Pass `except' down,
11147 instead of hacking its suspend count.
11148 (linux_pause_all): Add `freeze' parameter. Adjust.
11149 (linux_unpause_all): New.
11150 (linux_target_ops): Install linux_unpause_all.
11151 * server.c (handle_status): Adjust.
11152 * target.h (struct target_ops): New fields `unpause_all' and
11153 `cancel_breakpoints'. Add new parameter to `pause_all'.
11154 (pause_all): Add new `freeze' parameter.
11155 (unpause_all): New.
11156 (cancel_breakpoints): New.
11157 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11158 cancel breakpoints.
11159 (cmd_qtstart): Pause threads.
11160 (stop_tracing): Pause threads, and cancel breakpoints.
11161 * win32-low.c (win32_target_ops): Adjust.
11162
e471f25b
PA
111632010-05-03 Pedro Alves <pedro@codesourcery.com>
11164
11165 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11166 the inferior right away from here...
11167 (linux_wait_1): ... to here, and adjust to check the thread's
11168 last_resume_kind instead of the lwp's step or stop_expected flags.
11169
1915ef4f
PA
111702010-05-02 Pedro Alves <pedro@codesourcery.com>
11171
11172 * README: Use consistent `GDB' and `GDBserver' spellings.
11173
f9e39928
PA
111742010-05-02 Pedro Alves <pedro@codesourcery.com>
11175
11176 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11177 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11178 (linux_detach_one_lwp): Assume the lwp is stopped.
11179 (any_thread_of): Delete.
11180 (linux_detach): Stop all lwps here. Don't blindly delete all
11181 breakpoints.
11182 (delete_lwp_callback): New.
11183 (linux_mourn): Delete all lwps of the process that is gone.
11184 (linux_wait_1): Don't delete the last lwp of the process here.
11185 * mem-break.h (mark_breakpoints_out): Declare.
11186 * mem-break.c (mark_breakpoints_out): New.
11187 (free_all_breakpoints): Use it.
11188 * server.c (handle_target_event): If the process is gone, mark
11189 breakpoints out.
11190 * thread-db.c (struct thread_db) <create_bp>: New field.
11191 (thread_db_enable_reporting): Fix prototype. Store a thread event
11192 breakpoint reference in the thread_db struct.
11193 (thread_db_load_search): Clear the thread_db object.
11194 (try_thread_db_load_1): Ditto.
11195 (switch_to_process): New.
11196 (disable_thread_event_reporting): Use it.
11197 (remove_thread_event_breakpoints): New.
11198 (thread_db_detach, thread_db_mourn): Use it.
11199
1e7fc18c
PA
112002010-05-01 Pedro Alves <pedro@codesourcery.com>
11201
11202 * linux-low.c (linux_enable_event_reporting): New.
11203 (linux_wait_for_event_1, handle_extended_wait): Use it.
11204
02fc4de7
PA
112052010-04-30 Pedro Alves <pedro@codesourcery.com>
11206
11207 * linux-low.c (linux_kill_one_lwp, linux_kill)
11208 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11209 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11210 SIGSTOP even if the LWP is stopped.
11211 (send_sigstop_callback): New.
11212 (stop_all_lwps): Use send_sigstop_callback instead.
11213 (linux_resume_one_thread): Adjust.
11214 (proceed_one_lwp): Still proceed an LWP that the client has
11215 requested to stop, if we haven't reported it as stopped yet. Make
11216 sure that LWPs the client want stopped, have a pending SIGSTOP.
11217
bc3b5632
DE
112182010-04-26 Doug Evans <dje@google.com>
11219
ae1ada35
DE
11220 * server.c (handle_general_set): Make static.
11221
bc3b5632
DE
11222 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11223 Print received char after testing for error/eof instead of before.
11224 (input_interrupt): Tweak comment.
11225
65730243
DE
112262010-04-23 Doug Evans <dje@google.com>
11227
11228 * server.c (start_inferior): Print inferior argv if --debug.
11229
a8ae7dc0
AR
112302010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11231
11232 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11233 * nto-x86-low.c: Include server.h
11234
1c07cc19
PM
112352010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11236
11237 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11238 be consistent with other sources of this directory.
11239 (init_registers_amd64): Correct name of source file of this function
11240 in the comment.
11241
e0a61e09
PM
112422010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11243
11244 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11245 64-bit executables.
11246
54709339
PM
112472010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11248
11249 * win32-i386-low.c: Add 64-bit support.
11250 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11251 (init_registers_amd64): Declare.
11252 (mappings): Add 64-bit version of array.
11253 (init_windows_x86): New function.
11254 (the_low_target): Change init_arch field to init_windows_x86.
11255
e8f0053d
PM
112562010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11257
11258 * win32-low.c: Adapt to support also 64-bit architecture.
11259 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11260 (get_image_name): Use SIZE_T type for local variable `done'.
11261 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11262 (toolhelp_get_dll_name): Idem.
11263 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11264 Use uintptr_t typecast to avoid warning.
11265 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11266 (handle_exception): Use phex_nz to avoid warning.
11267 (win32_wait): Remove unused local variable `process'.
11268
c481e77e
PM
112692010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11270
11271 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11272 `amd64-avx.o'.
11273
12ea4b69
PM
112742010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11275
11276 * configure.ac: Use `ws2_32' library for srv_mingw.
11277 * configure: Regenerate.
11278 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11279 * remote-utils.c: Likewise.
11280
f6d1620c
L
112812010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11282
11283 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11284 if __x86_64__ is defined.
11285
8e642873
PM
112862010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11287
11288 * configure: Regenerate.
11289
711e434b
PM
112902010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11291
11292 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11293 * target.h (target_ops): New get_tib_address field.
11294 * win32-low.h (win32_thread_info): Add thread_local_base field.
11295 * win32-low.c (child_add_thread): Add tlb argument.
11296 Set thread_local_base field to TLB.
11297 (get_child_debug_event): Adapt to child_add_thread change.
11298 (win32_get_tib_address): New function.
11299 (win32_target_ops): Set get_tib_address field to
11300 win32_get_tib_address.
11301 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11302
505106cd
PA
113032010-04-12 Pedro Alves <pedro@codesourcery.com>
11304
505106cd
PA
11305 * linux-low.c (linux_mourn): Also remove the process.
11306 * server.c (handle_target_event): Don't remove the process here.
11307 * nto-low.c (nto_mourn): New.
11308 (nto_target_ops): Install it.
11309 * spu-low.c (spu_mourn): New.
11310 (spu_target_ops): Install it.
11311 * win32-low.c (win32_mourn): New.
11312 (win32_target_ops): Install it.
11313
e8470a06
PA
113142010-04-12 Pedro Alves <pedro@codesourcery.com>
11315
11316 * server.h (buffer_xml_printf): Remove redundant `;'.
11317
45ba0d02
PA
113182010-04-12 Pedro Alves <pedro@codesourcery.com>
11319
11320 * regcache.c (set_register_cache): Invalidate regcaches before
11321 changing the register cache layout.
11322 (regcache_invalidate_one): Allow a NULL regcache.
11323 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11324 regcaches before changing the register cache layout or the target
11325 regsets.
11326
59e04013
L
113272010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11328
11329 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11330 variable warning on Linux/x86-64.
11331
8336d594
PA
113322010-04-11 Pedro Alves <pedro@codesourcery.com>
11333
11334 GDBserver disconnected tracing support.
11335
11336 * linux-low.c (linux_remove_process): Delete.
11337 (add_lwp): Don't set last_resume_kind here.
11338 (linux_kill): Use `mourn'.
11339 (linux_detach): Use `thread_db_detach', and `mourn'.
11340 (linux_mourn): New.
11341 (linux_attach_lwp_1): Adjust comment.
11342 (linux_attach): last_resume_kind moved the thread_info; adjust.
11343 (status_pending_p_callback): Adjust.
11344 (linux_wait_for_event_1): Adjust.
11345 (count_events_callback, select_singlestep_lwp_callback)
11346 (select_event_lwp_callback, cancel_breakpoints_callback)
11347 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11348 (proceed_one_lwp): Adjust.
11349 (linux_async): Add debug output.
11350 (linux_thread_stopped): New.
11351 (linux_pause_all): New.
11352 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11353 linux_pause_all.
11354 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11355 (thread_db_free): Delete declaration.
11356 (thread_db_detach, thread_db_mourn): Declare.
11357 * thread-db.c (thread_db_init): Use thread_db_mourn.
11358 (thread_db_free): Delete, split in two.
11359 (disable_thread_event_reporting): New.
11360 (thread_db_detach): New.
11361 (thread_db_mourn): New.
11362
11363 * server.h (struct thread_info) <last_resume_kind>: New field.
11364 <attached>: Add comment.
11365 <gdb_detached>: New field.
11366 (handler_func): Change return type to int.
11367 (handle_serial_event, handle_target_event): Ditto.
11368 (gdb_connected): Declare.
11369 (tracing): Delete.
11370 (disconnected_tracing): Declare.
11371 (stop_tracing): Declare.
11372
11373 * server.c (handle_query) <qSupported>: Report support for
11374 disconnected tracing.
11375 (queue_stop_reply_callback): Account for running threads.
11376 (gdb_wants_thread_stopped): New.
11377 (gdb_wants_all_threads_stopped): New.
11378 (gdb_reattached_process): New.
11379 (handle_status): Clear the `gdb_detached' flag of all processes.
11380 In all-stop, stop all threads.
11381 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11382 (process_serial_event): If the remote connection breaks, or if an
11383 exit was forced with "monitor exit", force an event loop exit.
11384 Handle disconnected tracing on detach.
11385 (handle_serial_event): Adjust.
11386 (handle_target_event): If GDB isn't connected, forward events back
11387 to the inferior, unless the last process exited, in which case,
11388 exit gdbserver. Adjust interface.
11389
11390 * remote-utils.c (remote_open): Don't block in accept. Instead
11391 register an event loop source on the listen socket file
11392 descriptor. Refactor bits into ...
11393 (listen_desc): ... this new global.
11394 (gdb_connected): ... this new function.
11395 (enable_async_notification): ... this new function.
11396 (handle_accept_event): ... this new function.
11397 (remote_close): Clear remote_desc.
11398
11399 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11400
11401 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11402 New fields.
11403 (mourn_inferior): Define.
11404 (target_process_qsupported): Avoid the dangling else problem.
11405 (thread_stopped): Define.
11406 (pause_all): Define.
11407 (target_waitstatus_to_string): Declare.
11408 * target.c (target_waitstatus_to_string): New.
11409
11410 * tracepoint.c (tracing): Make extern.
11411 (disconnected_tracing): New.
11412 (stop_tracing): Make extern. Handle tracing stops due to GDB
11413 disconnecting.
11414 (cmd_qtdisconnected): New.
11415 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11416 (handle_tracepoint_general_set): Handle QTDisconnected.
11417
11418 * event-loop.c (event_handler_func): Change return type to int.
11419 (process_event): Bail out if the event handler wants the event
11420 loop to stop.
11421 (handle_file_event): Ditto.
11422 (start_event_loop): Bail out if the event handler wants the event
11423 loop to stop.
11424
11425 * nto-low.c (nto_target_ops): Adjust.
11426 * spu-low.c (spu_wait): Don't remove the process here.
11427 (spu_target_ops): Adjust.
11428 * win32-low.c (win32_wait): Don't remove the process here.
11429 (win32_target_ops): Adjust.
11430
5d267c4c
PA
114312010-04-11 Pedro Alves <pedro@codesourcery.com>
11432
11433 * regcache.c (realloc_register_cache): Invalidate inferior's
11434 regcache before recreating it.
11435
623ccd72
PA
114362010-04-09 Pedro Alves <pedro@codesourcery.com>
11437
11438 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11439
219f2f23
PA
114402010-04-09 Stan Shebs <stan@codesourcery.com>
11441 Pedro Alves <pedro@codesourcery.com>
11442
11443 * server.h (LONGEST): New.
11444 (struct thread_info) <while_stepping>: New field.
11445 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11446 Declare.
11447 (initialize_tracepoint, handle_tracepoint_general_set)
11448 (handle_tracepoint_query, tracepoint_finished_step)
11449 (tracepoint_was_hit, release_while_stepping_state_list):
11450 (current_traceframe): Declare.
11451 * server.c (handle_general_set): Handle tracepoint packets.
11452 (read_memory): New.
11453 (write_memory): New.
11454 (handle_search_memory_1): Use read_memory.
11455 (handle_query): Report support for conditional tracepoints, trace
11456 state variables, and tracepoint sources. Handle tracepoint
11457 queries.
11458 (main): Initialize the tracepoints module.
11459 (process_serial_event): Handle traceframe reads/writes.
11460
11461 * linux-low.c (handle_tracepoints): New.
11462 (linux_wait_1): Call it.
11463 (linux_resume_one_lwp): Handle while-stepping.
11464 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11465 (linux_target_ops): Install them.
11466 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11467 New field.
11468 * linux-x86-low.c (x86_supports_tracepoints): New.
11469 (the_low_target). Install it.
11470
11471 * mem-break.h (delete_breakpoint): Declare.
11472 * mem-break.c (delete_breakpoint): Make external.
11473
11474 * target.h (struct target_ops): Add `supports_tracepoints',
11475 `read_pc', and `write_pc' fields.
11476 (target_supports_tracepoints): Define.
11477 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11478 (phex_nz): New.
11479
11480 * regcache.h (struct regcache) <registers_owned>: New field.
11481 (init_register_cache, regcache_cpy): Declare.
11482 (regcache_read_pc, regcache_write_pc): Declare.
11483 (register_cache_size): Declare.
11484 (supply_regblock): Declare.
11485 * regcache.c (init_register_cache): New.
11486 (new_register_cache): Use it.
11487 (regcache_cpy): New.
11488 (register_cache_size): New.
11489 (supply_regblock): New.
11490 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 11491
219f2f23
PA
11492 * tracepoint.c: New.
11493
11494 * Makefile.in (OBS): Add tracepoint.o.
11495 (tracepoint.o): New rule.
11496
3a13a53b
L
114972010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11498
11499 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11500 (i386-mmx.o): New.
11501 (i386-mmx.c): Likewise.
11502 (i386-mmx-linux.o): Likewise.
11503 (i386-mmx-linux.c): Likewise.
11504
11505 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11506 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11507 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11508 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11509
11510 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11511 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11512 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11513
1570b33e
L
115142010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11515
11516 * Makefile.in (clean): Updated.
11517 (i386-avx.o): New.
11518 (i386-avx.c): Likewise.
11519 (i386-avx-linux.o): Likewise.
11520 (i386-avx-linux.c): Likewise.
11521 (amd64-avx.o): Likewise.
11522 (amd64-avx.c): Likewise.
11523 (amd64-avx-linux.o): Likewise.
11524 (amd64-avx-linux.c): Likewise.
11525
11526 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11527 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11528 (srv_amd64_regobj): Add amd64-avx.o.
11529 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11530 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11531 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11532 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11533 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11534 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11535 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11536
11537 * i387-fp.c: Include "i386-xstate.h".
11538 (i387_xsave): New.
11539 (i387_cache_to_xsave): Likewise.
11540 (i387_xsave_to_cache): Likewise.
11541 (x86_xcr0): Likewise.
11542
11543 * i387-fp.h (i387_cache_to_xsave): Likewise.
11544 (i387_xsave_to_cache): Likewise.
11545 (x86_xcr0): Likewise.
11546
11547 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11548 * linux-crisv32-low.c (target_regsets): Likewise.
11549 * linux-m68k-low.c (target_regsets): Likewise.
11550 * linux-mips-low.c (target_regsets): Likewise.
11551 * linux-ppc-low.c (target_regsets): Likewise.
11552 * linux-s390-low.c (target_regsets): Likewise.
11553 * linux-sh-low.c (target_regsets): Likewise.
11554 * linux-sparc-low.c (target_regsets): Likewise.
11555 * linux-xtensa-low.c (target_regsets): Likewise.
11556
11557 * linux-low.c: Include <sys/uio.h>.
11558 (regsets_fetch_inferior_registers): Support nt_type.
11559 (regsets_store_inferior_registers): Likewise.
11560 (linux_process_qsupported): New.
11561 (linux_target_ops): Add linux_process_qsupported.
11562
11563 * linux-low.h (regset_info): Add nt_type.
11564 (linux_target_ops): Add process_qsupported.
11565
11566 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11567 and <sys/uio.h>.
11568 (init_registers_i386_avx_linux): New.
11569 (init_registers_amd64_avx_linux): Likewise.
11570 (xmltarget_i386_linux_no_xml): Likewise.
11571 (xmltarget_amd64_linux_no_xml): Likewise.
11572 (PTRACE_GETREGSET): Likewise.
11573 (PTRACE_SETREGSET): Likewise.
11574 (x86_fill_xstateregset): Likewise.
11575 (x86_store_xstateregset): Likewise.
11576 (use_xml): Likewise.
11577 (x86_linux_update_xmltarget): Likewise.
11578 (x86_linux_process_qsupported): Likewise.
11579 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11580 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11581 init_registers_i386_linux here. Call
11582 x86_linux_update_xmltarget.
11583 (the_low_target): Add x86_linux_process_qsupported.
11584
11585 * server.c (handle_query): Call target_process_qsupported.
11586
11587 * target.h (target_ops): Add process_qsupported.
11588 (target_process_qsupported): New.
11589
fc7238bb
PA
115902010-04-03 Pedro Alves <pedro@codesourcery.com>
11591
11592 * inferiors.c (add_thread): Set last_status kind to
11593 TARGET_WAITKIND_IGNORE.
11594 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11595 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11596 (linux_wait_1): Move `thread' local definition to block that uses
11597 it. Don't NULL initialize `event_child'.
11598 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11599 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11600 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11601
bdabb078
PA
116022010-04-01 Pedro Alves <pedro@codesourcery.com>
11603
11604 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11605 an extended waitstatus, or by a watchpoint.
11606 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11607 thread was stepping or has been stopped by a watchpoint.
11608
d3bbe7a0
PA
116092010-04-01 Pedro Alves <pedro@codesourcery.com>
11610
11611 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11612 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11613 of another, then delete the previous, and validate all
11614 breakpoints.
11615 (validate_inserted_breakpoint): New.
11616 (delete_disabled_breakpoints): New.
11617 (validate_breakpoints): New.
11618 (check_mem_read): Validate breakpoints before trusting their
11619 shadow. Delete disabled breakpoints.
11620 (check_mem_write): Validate breakpoints before trusting they
11621 should be inserted. Delete disabled breakpoints.
11622 * mem-break.h (validate_breakpoints):
11623 * server.c (handle_query): Validate breakpoints when we see a
11624 qSymbol query.
11625
8b07ae33
PA
116262010-04-01 Pedro Alves <pedro@codesourcery.com>
11627
11628 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11629 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11630 if we could tell there's a GDB breakpoint at stop_pc.
11631 (need_step_over_p): Don't do a step over if we find a GDB
11632 breakpoint at the resume PC.
11633
11634 * mem-break.c (struct raw_breakpoint): New.
11635 (enum bkpt_type): New type `gdb_breakpoint'.
11636 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11637 fields. New field `raw'.
11638 (find_raw_breakpoint_at): New.
11639 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11640 breakpoint instead.
11641 (set_breakpoint_at): Adjust.
11642 (delete_raw_breakpoint): New.
11643 (release_breakpoint): New.
11644 (delete_breakpoint): Rename to...
11645 (delete_breakpoint_1): ... this. Add proc parameter. Use
11646 release_breakpoint. Return ENOENT.
11647 (delete_breakpoint): Reimplement.
11648 (find_breakpoint_at): Delete.
11649 (find_gdb_breakpoint_at): New.
11650 (delete_breakpoint_at): Delete.
11651 (set_gdb_breakpoint_at): New.
11652 (delete_gdb_breakpoint_at): New.
11653 (gdb_breakpoint_here): New.
11654 (set_reinsert_breakpoint): Use release_breakpoint.
11655 (uninsert_breakpoint): Rename to ...
11656 (uninsert_raw_breakpoint): ... this.
11657 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11658 (reinsert_raw_breakpoint): Change parameter type to
11659 raw_breakpoint.
11660 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11661 instead.
11662 (check_breakpoints): Adjust. Use release_breakpoint.
11663 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11664 (breakpoint_inserted_here): Ditto.
11665 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11666 Don't trust the breakpoint's shadow if it is not inserted.
11667 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11668 (delete_all_breakpoints): Adjust.
11669 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11670 use delete_breakpoint_1.
11671
11672 * mem-break.h (breakpoints_supported): Delete declaration.
11673 (set_gdb_breakpoint_at): Declare.
11674 (gdb_breakpoint_here): Declare.
11675 (delete_breakpoint_at): Delete.
11676 (delete_gdb_breakpoint_at): Declare.
11677
11678 * server.h (struct raw_breakpoint): Forward declare.
11679 (struct process_info): New field `raw_breakpoints'.
11680
11681 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11682 breakpoints.
11683
6bf5e0ba
PA
116842010-03-24 Pedro Alves <pedro@codesourcery.com>
11685
11686 * linux-low.c (status_pending_p_callback): Fix comment.
11687 (linux_wait_for_event_1): Move most of the internal breakpoint
11688 handling from here...
11689 (linux_wait_1): ... to here.
11690 (count_events_callback): New.
11691 (select_singlestep_lwp_callback): New.
11692 (select_event_lwp_callback): New.
11693 (cancel_breakpoints_callback): New.
11694 (select_event_lwp): New.
11695 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11696 priority to all LWPs that have had events that should be reported
11697 to the client. Cancel breakpoints when about to reporting the
11698 event to the client, not while stopping lwps. No longer cancel
11699 finished single-steps here.
11700 (cancel_finished_single_step): Delete.
11701 (cancel_finished_single_steps): Delete.
11702
414a389f
PA
117032010-03-24 Pedro Alves <pedro@codesourcery.com>
11704
11705 * mem-break.c (enum bkpt_type): New.
11706 (struct breakpoint): New field `type'.
11707 (set_breakpoint_at): Change return type to struct breakpoint
11708 pointer. Set type to `other_breakpoint' by default.
11709 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11710 in the breakpoint list.
11711 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11712 (reinsert_breakpoint): Rename to ...
11713 (reinsert_raw_breakpoint): ... this.
11714 (reinsert_breakpoints_at): Adjust.
11715 * mem-break.h (struct breakpoint): Declare.
11716 (set_breakpoint_at): Change return type to struct breakpoint
11717 pointer.
11718
2280c721
PA
117192010-03-24 Pedro Alves <pedro@codesourcery.com>
11720
11721 * server.c (handle_query): Assign, not compare.
11722
d50171e4
PA
117232010-03-24 Pedro Alves <pedro@codesourcery.com>
11724
11725 Teach linux gdbserver to step-over-breakpoints.
11726
11727 * linux-low.c (can_hardware_single_step): New.
11728 (supports_breakpoints): New.
11729 (handle_extended_wait): If stopping threads, read the stop pc of
11730 the new cloned LWP.
11731 (get_pc): New.
11732 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11733 low target doesn't support retrieving the PC.
11734 (add_lwp): Set last_resume_kind to resume_continue.
11735 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11736 (linux_attach): Don't clear stop_expected. Set the lwp's
11737 last_resume_kind to resume_stop.
11738 (linux_detach_one_lwp): Don't check for removed breakpoints.
11739 (check_removed_breakpoint): Delete.
11740 (status_pending_p): Rename to ...
11741 (status_pending_p_callback): ... this. Don't check for removed
11742 breakpoints. Don't consider threads that are stopped from GDB's
11743 perspective.
11744 (linux_wait_for_lwp): Always read the stop_pc here.
11745 (cancel_breakpoint): New.
11746 (step_over_bkpt): New global.
11747 (linux_wait_for_event_1): Implement stepping over breakpoints.
11748 (gdb_wants_lwp_stopped): New.
11749 (gdb_wants_all_stopped): New.
11750 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11751 single-step traps here. Store the thread's last reported target
11752 wait status.
11753 (send_sigstop): Don't clear stop_expected. Always set it,
11754 instead.
11755 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11756 (cancel_finished_single_step): New.
11757 (cancel_finished_single_steps): New.
11758 (wait_for_sigstop): Don't cancel finished single-step traps here.
11759 (linux_resume_one_lwp): Don't check for removed breakpoints.
11760 Don't set `step' on non-hardware step archs.
11761 (linux_set_resume_request): Ignore resume_stop requests if already
11762 stopping or stopped. Set the lwp's last_resume_kind.
11763 (resume_status_pending_p): Don't check for removed breakpoints.
11764 (need_step_over_p): New.
11765 (start_step_over): New.
11766 (finish_step_over): New.
11767 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11768 requests. Clear the thread's last reported target waitstatus.
11769 Don't use the `suspended' flag. Don't consider pending breakpoints.
11770 (linux_resume): Start a step-over if necessary.
11771 (proceed_one_lwp): New.
11772 (proceed_all_lwps): New.
11773 (unstop_all_lwps): New.
11774 * linux-low.h (struct lwp_info): Rewrite comment for the
11775 `suspended' flag. Add the `stop_pc' field. Delete the
11776 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11777 Add `'last_resume_kind' and `need_step_over' fields.
11778 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11779 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11780 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11781 (set_raw_breakpoint_at): New.
11782 (set_breakpoint_at): Rewrite to use it.
11783 (reinsert_breakpoint_handler): Delete.
11784 (set_reinsert_breakpoint): New.
11785 (reinsert_breakpoint_by_bp): Delete.
11786 (delete_reinsert_breakpoints): New.
11787 (uninsert_breakpoint): Rewrite.
11788 (uninsert_breakpoints_at): New.
11789 (reinsert_breakpoint): Rewrite.
11790 (reinsert_breakpoints_at): New.
11791 (check_breakpoints): Rewrite.
11792 (breakpoint_here): New.
11793 (breakpoint_inserted_here): New.
11794 (check_mem_read): Adjust.
11795 * mem-break.h (breakpoints_supported, breakpoint_here)
11796 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11797 (reinsert_breakpoint_by_bp): Delete declaration.
11798 (delete_reinsert_breakpoints): Declare.
11799 (reinsert_breakpoint): Delete declaration.
11800 (reinsert_breakpoints_at): Declare.
11801 (uninsert_breakpoint): Delete declaration.
11802 (uninsert_breakpoints_at): Declare.
11803 (check_breakpoints): Adjust prototype.
11804 * server.h: Adjust include order.
11805 (struct thread_info): Declare here. Add a `last_status' field.
11806
30ba68cb
MS
118072010-03-23 Michael Snyder <msnyder@vmware.com>
11808
11809 * server.c (crc32): New function.
11810 (handle_query): Add handling for 'qCRC:' request.
11811
b9a881c2
PA
118122010-03-23 Pedro Alves <pedro@codesourcery.com>
11813
11814 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11815 lwp had been stopped by a watchpoint.
11816
e92d13d5
PA
118172010-03-16 Pedro Alves <pedro@codesourcery.com>
11818
11819 * server.h (internal_error): Declare.
11820 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11821 * utils.c (internal_error): New function.
11822
64daa791
AS
118232010-03-15 Andreas Schwab <schwab@redhat.com>
11824
11825 * configure.srv: Fix typo setting srv_regobj.
11826
f52cd8cd
PA
118272010-03-15 Pedro Alves <pedro@codesourcery.com>
11828
11829 * linux-low.c (fetch_register): Avoid passing a non string literal
11830 format to `error'.
11831 (usr_store_inferior_registers): Ditto.
11832
93ae6fdc
PA
118332010-03-14 Pedro Alves <pedro@codesourcery.com>
11834
11835 * linux-low.c (linux_write_memory): Bail out early if peeking
11836 memory failed.
11837
c3adc08c
PA
118382010-03-14 Pedro Alves <pedro@codesourcery.com>
11839
11840 * linux-low.h (struct lwp_info): New fields
11841 `stopped_by_watchpoint' and `stopped_data_address'.
11842 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11843 here, and cache them in the lwp object.
11844 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11845 directly.
11846 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11847 field.
11848 (linux_stopped_by_watchpoint): Rewrite.
11849 (linux_stopped_data_address): Rewrite.
11850
bce522a2
PA
118512010-03-06 Simo Melenius <simo.melenius@iki.fi>
11852
11853 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11854 switching the current inferior, not before.
11855
90884b2b
L
118562010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11857
11858 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11859 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11860 i386-linux.c and amd64-linux.c.
11861 (reg-i386.o): Removed.
11862 (reg-i386.c): Likewise.
11863 (reg-i386-linux.o): Likewise.
11864 (reg-i386-linux.c): Likewise.
11865 (reg-x86-64.o): Likewise.
11866 (reg-x86-64.c): Likewise.
11867 (reg-x86-64-linux.o): Likewise.
11868 (reg-x86-64-linux.c): Likewise.
11869 (i386.o): New.
11870 (i386.c): Likewise.
11871 (i386-linux.o): Likewise.
11872 (i386-linux.c): Likewise.
11873 (amd64.o): Likewise.
11874 (amd64.c): Likewise.
11875 (amd64-linux.o): Likewise.
11876 (amd64-linux.c): Likewise.
11877
11878 * configure.srv (srv_i386_regobj): New.
11879 (srv_i386_linux_regobj): Likewise.
11880 (srv_amd64_regobj): Likewise.
11881 (srv_amd64_linux_regobj): Likewise.
11882 (srv_i386_32bit_xmlfiles): Likewise.
11883 (srv_i386_64bit_xmlfiles): Likewise.
11884 (srv_i386_xmlfiles): Likewise.
11885 (srv_amd64_xmlfiles): Likewise.
11886 (srv_i386_linux_xmlfiles): Likewise.
11887 (srv_amd64_linux_xmlfiles): Likewise.
11888 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11889 srv_xmlfiles to $srv_i386_xmlfiles.
11890 (i[34567]86-*-mingw32ce*): Likewise.
11891 (i[34567]86-*-mingw*): Likewise.
11892 (i[34567]86-*-nto*): Likewise.
11893 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11894 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11895 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11896 (x86_64-*-linux*): Likewise.
11897
11898 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11899 (init_registers_amd64_linux): New.
11900 (x86_arch_setup): Replace init_registers_x86_64_linux with
11901 init_registers_amd64_linux.
11902
193f13e6
MK
119032010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11904
11905 * configure.ac: Check for libdl. If it is not available link against
11906 static libthread_db.
11907 * configure: Regenerate.
11908
85d721b8
PA
119092010-02-22 Pedro Alves <pedro@codesourcery.com>
11910
11911 PR9605
11912
11913 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11914 handing a read watchpoint.
11915 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11916
6076632b
DE
119172010-02-12 Doug Evans <dje@google.com>
11918
11919 * linux-low.c (linux_supports_tracefork_flag): Document.
11920 (linux_look_up_symbols): Add comment.
11921
3327ccf7
L
119222010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11923
11924 * regcache.c (supply_register): Clear regcache if buf is NULL.
11925
0718675c 119262010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 11927 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
11928
11929 * inferiors.c (find_inferior): Add function documentation.
11930 (unloaded_dll): Handle the case where the unloaded dll has not
11931 been previously registered in the dll list.
11932
177321bd
DJ
119332010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11934
11935 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11936 (thumb2_breakpoint): New.
11937 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11938
2b009048
DJ
119392010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11940
11941 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11942 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11943 breakpoints.
11944
3be029c7
PA
119452010-01-21 Pedro Alves <pedro@codesourcery.com>
11946
11947 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11948
18f5de3b
JK
119492010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11950
11951 * linux-s390-low.c (s390_collect_ptrace_register)
11952 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11953
3743bb4f
DE
119542010-01-21 Doug Evans <dje@google.com>
11955
14ce3065
DE
11956 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11957 (PTRACE_ARG4_TYPE): New macro.
11958 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11959 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11960 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11961 (usr_store_inferior_registers): Ditto.
11962 (linux_read_memory, linux_write_memory): Ditto.
11963 (linux_test_for_tracefork): Ditto.
11964
3743bb4f
DE
11965 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11966 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11967
8b315be5
PA
119682010-01-21 Pedro Alves <pedro@codesourcery.com>
11969
11970 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11971 target.
11972
85492558
PA
119732010-01-21 Pedro Alves <pedro@codesourcery.com>
11974
11975 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11976 prototype to take a regcache. Adjust.
11977
442ea881
PA
119782010-01-20 Pedro Alves <pedro@codesourcery.com>
11979
11980 * regcache.h (struct thread_info): Forward declare.
11981 (struct regcache): New.
11982 (new_register_cache): Adjust prototype.
11983 (get_thread_regcache): Declare.
11984 (free_register_cache): Adjust prototype.
11985 (registers_to_string, registers_from_string): Ditto.
11986 (supply_register, supply_register_by_name, collect_register)
11987 (collect_register_as_string, collect_register_by_name): Ditto.
11988 * regcache.c (struct inferior_regcache_data): Delete.
11989 (get_regcache): Rename to ...
11990 (get_thread_regcache): ... this. Adjust. Switch inferior before
11991 fetching registers.
11992 (regcache_invalidate_one): Adjust.
11993 (regcache_invalidate): Fix prototype.
11994 (new_register_cache): Return the new register cache.
11995 (free_register_cache): Change prototype.
11996 (realloc_register_cache): Adjust.
11997 (registers_to_string): Change prototype to take a regcache. Adjust.
11998 (registers_from_string): Ditto.
11999 (register_data): Ditto.
12000 (supply_register): Ditto.
12001 (supply_register_by_name): Ditto.
12002 (collect_register): Ditto.
12003 (collect_register_as_string): Ditto.
12004 (collect_register_by_name): Ditto.
12005 * server.c (process_serial_event): Adjust.
12006 * linux-low.h (regset_fill_func, regset_store_func): Change
12007 prototype.
12008 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12009 Change prototype.
12010 * linux-low.c (get_stop_pc): Adjust.
12011 (check_removed_breakpoint): Adjust.
12012 (linux_wait_for_event): Adjust.
12013 (linux_resume_one_lwp): Adjust.
12014 (fetch_register): Add regcache parameter. Adjust.
12015 (usr_store_inferior_registers): Ditto.
12016 (regsets_fetch_inferior_registers): Ditto.
12017 (regsets_store_inferior_registers): Ditto.
12018 (linux_fetch_registers, linux_store_registers): Ditto.
12019 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12020 regcache. Adjust.
43aaf8b6
PA
12021 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12022 Ditto.
442ea881
PA
12023 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12024 prototype to take a regcache.
12025 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12026 * remote-utils.c (convert_ascii_to_int, outreg)
12027 (prepare_resume_reply): Change prototype to take a regcache.
12028 Adjust.
12029 * target.h (struct target_ops) <fetch_registers, store_registers>:
12030 Change prototype to take a regcache.
12031 (fetch_inferior_registers, store_inferior_registers): Change
12032 prototype to take a regcache. Adjust.
12033 * proc-service.c (ps_lgetregs): Adjust.
12034 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12035 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12036 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12037 take a regcache. Adjust.
12038 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12039 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12040 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12041 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12042 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12043 (cris_cannot_fetch_register):
12044 (cris_breakpoint_at): Change prototype to take a regcache.
12045 Adjust.
12046 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12047 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12048 to take a regcache. Adjust.
12049 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12050 Adjust.
12051 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12052 take a regcache. Adjust.
12053 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12054 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12055 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12056 * linux-mips-low.c (mips_get_pc):
12057 (mips_set_pc): Change prototype to take a regcache. Adjust.
12058 (mips_reinsert_addr): Adjust.
12059 (mips_collect_register): Change prototype to take a regcache.
12060 Adjust.
12061 (mips_supply_register):
12062 (mips_collect_register_32bit, mips_supply_register_32bit)
12063 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12064 (mips_store_fpregset): Ditto.
43aaf8b6
PA
12065 * linux-ppc-low.c (ppc_supply_ptrace_register)
12066 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
12067 (parse_spufs_run): Adjust.
12068 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12069 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12070 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12071 take a regcache. Adjust.
12072 * linux-s390-low.c (s390_collect_ptrace_register)
12073 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12074 (s390_set_pc): Change prototype to take a regcache. Adjust.
12075 (s390_arch_setup): Adjust.
12076 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12077 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12078 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12079 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12080 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12081 regcache. Adjust.
12082 (sparc_breakpoint_at): Adjust.
12083 * linux-xtensa-low.c (xtensa_fill_gregset):
12084 (xtensa_store_gregset):
12085 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12086 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12087 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12088 prototype to take a regcache. Adjust.
12089 * win32-arm-low.c (arm_fetch_inferior_register)
12090 (arm_store_inferior_register): Change prototype to take a
12091 regcache. Adjust.
12092 * win32-i386-low.c (i386_fetch_inferior_register)
12093 (i386_store_inferior_register): Change prototype to take a
12094 regcache. Adjust.
12095 * win32-low.c (child_fetch_inferior_registers)
12096 (child_store_inferior_registers): Change prototype to take a
12097 regcache. Adjust.
12098 (win32_wait): Adjust.
12099 (win32_fetch_inferior_registers): Change prototype to take a
12100 regcache. Adjust.
12101 (win32_store_inferior_registers): Adjust.
12102 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12103 store_inferior_register>: Change prototype to take a regcache.
12104
60c3d7b0
DE
121052010-01-20 Doug Evans <dje@google.com>
12106
12107 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12108 #ifdef.
12109 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 12110 (W_STOPCODE): Provide definition if missing.
60c3d7b0 12111
dc146f7c
VP
121122010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12113
12114 * linux-low.c (linux_core_of_thread): New.
12115 (compare_ints, show_process, list_threads): New.
12116 (linux_qxfer_osdata): Report threads and cores.
12117 (linux_target_op): Register linux_core_of_thread.
12118 * remote-utils.c (prepare_resume_reply): Report the core.
12119 (buffer_xml_printf): Support %d specifier.
12120 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12121 New.
12122 (handle_query): Handle qXfer:threads. Announce availability
12123 thereof.
12124 * target.h (struct target_ops): New field core_of_thread.
12125
7803799a
UW
121262010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12127
12128 * Makefile.in (clean): Remove new generated files.
12129 (reg-s390.o, reg-s390.c): Remove rules.
12130 (reg-s390x.o, reg-s390x.c): Likewise.
12131 (s390-linux32.o, s390-linux32.c): Add rules.
12132 (s390-linux64.o, s390-linux64.c): Likewise.
12133 (s390x-linux64.o, s390x-linux64.c): Likewise.
12134 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12135 * linux-s390-low.c: Include <elf.h>.
12136 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12137 (init_registers_s390): Remove prototype.
12138 (init_registers_s390x): Likewise.
12139 (init_registers_s390_linux32): Add prototype.
12140 (init_registers_s390_linux64): Likewise.
12141 (init_registers_s390x_linux64): Likewise.
12142 (s390_num_regs_3264): New define.
12143 (s390_regmap_3264): New global variable.
12144 (s390_cannot_fetch_register): Remove obsolete check.
12145 (s390_cannot_store_register): Likewise.
12146 (s390_collect_ptrace_register): Handle upper/lower register halves.
12147 (s390_supply_ptrace_register): Likewise.
12148 (s390_fill_gregset): Update to register number changes.
12149 (s390_get_hwcap): New routine.
12150 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12151 Install appropriate regmap and register set.
12152
6e7ffa39
JB
121532010-01-01 Joel Brobecker <brobecker@adacore.com>
12154
12155 * server.c (gdbserver_version): Update copyright year to 2010.
12156 * gdbreplay.c (gdbreplay_version): Likewise.
12157
957f3f49
DE
121582009-12-28 Doug Evans <dje@google.com>
12159
12160 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12161 elf/external.h. Include <elf.h> instead but only if necessary.
12162
ca5c370d
PA
121632009-12-28 Pedro Alves <pedro@codesourcery.com>
12164
12165 * linux-low.c (linux_remove_process): Remove `detaching'
12166 parameter. Don't release/detach from thread_db here.
12167 (linux_kill): Release/detach from thread_db here, ...
12168 (linux_detach): ... and here, before actually detaching.
12169 (linux_wait_1): ... and here, when a process exits.
12170 * thread-db.c (any_thread_of): New.
12171 (thread_db_free): Switch the current inferior to a thread of the
12172 passed in process.
12173
4ee62156
DE
121742009-12-21 Doug Evans <dje@google.com>
12175
d90e6a88
DE
12176 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12177
c5f62d5f
DE
12178 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12179 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12180 warning ifndef __NR_tkill. Move setting of errno there too.
12181 Delete unnecessary resetting of errno after syscall.
12182 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12183
10e86dd7
DE
12184 * configure.ac: Check for dladdr.
12185 * config.in: Regenerate.
12186 * configure: Regenerate.
12187 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12188 (try_thread_db_load): Update.
12189
4ee62156
DE
12190 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12191
00f515da
DE
121922009-12-18 Doug Evans <dje@google.com>
12193
e9464885
DE
12194 * event-loop.c: Include unistd.h if it exists.
12195
07d4f67e
DE
12196 * linux-low.c (my_waitpid): Move definition away from being in
12197 between linux_tracefork_child/linux_test_for_tracefork.
12198
00f515da
DE
12199 * gdb_proc_service.h (psaddr_t): Fix type.
12200 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12201 signature to match glibc.
12202
1de1badb
DE
122032009-12-16 Doug Evans <dje@google.com>
12204
12205 * linux-low.c (linux_read_memory): Fix argument to read.
12206
aeeb81d1
PA
122072009-11-26 Pedro Alves <pedro@codesourcery.com>
12208
12209 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12210 events, don't leave current_inferior pointing at null.
12211
10357975
PA
122122009-11-26 Pedro Alves <pedro@codesourcery.com>
12213
12214 * win32-low.c (LOG): Delete.
12215 (OUTMSG): Output to stderr.
12216 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12217 on compile time LOG macro.
12218 (win32_wait): Fix debug output.
12219
cf6e3471
PA
122202009-11-26 Pedro Alves <pedro@codesourcery.com>
12221
12222 * win32-low.c (win32_add_one_solib): If the dll name is
12223 "ntdll.dll", prepend the system directory to the dll path.
12224
0c85e18e
MK
122252009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12226
12227 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12228
9ac544ce 122292009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 12230 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
12231
12232 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12233 * configure.ac: Check for __mcoldfire__ and set
12234 gdb_cv_m68k_is_coldfire.
12235 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12236 reg-cf.o and reg-m68k.o.
12237 * configure: Regenerated.
12238
fd7dd3e6
PA
122392009-11-16 Pedro Alves <pedro@codesourcery.com>
12240
12241 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12242 Pass it to thread_db_free.
12243 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12244 proper `detaching' argument to linux_remove_process.
12245 * linux-low.h (thread_db_free): Add `detaching' parameter.
12246 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12247 to thread_db_free.
12248 (thread_db_free): Add `detaching' parameter. Only
12249 call td_ta_clear_event if detaching from process.
12250
75aa492e
MK
122512009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12252
12253 * thread-db.c (thread_db_free): Fix typo.
12254
21e1bee4
PP
122552009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12256
12257 PR gdb/10838
12258 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12259
8838b45e
NS
122602009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12261
12262 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12263 with an i686 compiler.
12264 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12265 needed.
12266 * configure: Rebuilt.
12267
8a35fb51
SL
122682009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12269
12270 PR gdb/10783
12271
12272 * server.c (handle_search_memory_1): Correct read_addr initialization
12273 in loop for searching subsequent chunks.
12274
96f15937
PP
122752009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12276
12277 * configure.ac: New --with-libthread-db option.
12278 * thread-db.c: Allow direct dependence on libthread_db.
12279 (thread_db_free): Adjust.
12280 * config.in: Regenerate.
12281 * configure: Likewise.
889bf7c5 12282
5f7d1694
PP
122832009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12284
12285 PR gdb/10757
12286 * thread-db.c (attach_thread): New function.
12287 (maybe_attach_thread): Return success/failure.
12288 (find_new_threads_callback): Adjust.
889bf7c5
PA
12289 (thread_db_find_new_threads): Loop until no new threads.
12290
88e3b899
PA
122912009-10-13 Pedro Alves <pedro@codesourcery.com>
12292
12293 * proc-service.c (ps_lgetregs): Formatting.
12294
cdbfd419
PP
122952009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12296
12297 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12298 * configure.ac: Adjust.
12299 * linux-low.h (struct process_info_private): Move members to struct
12300 thread_db.
12301 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12302 * linux-low.c (linux_remove_process): Adjust.
12303 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12304 * server.c (handle_query): Move code ...
12305 (handle_monitor_command): ... here. New function.
12306 * target.h (struct target_ops): New member.
12307 * thread-db.c (struct thread_db): New.
12308 (libthread_db_search_path): New variable.
12309 (thread_db_create_event, thread_db_enable_reporting)
12310 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12311 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12312 (try_thread_db_load_1, dladdr_to_soname): New functions.
12313 (try_thread_db_load, thread_db_load_search): New functions.
12314 (thread_db_init): Search for libthread_db.
12315 (thread_db_free): New function.
12316 (thread_db_handle_monitor_command): Likewise.
12317 * config.in: Regenerate.
12318 * configure: Regenerate.
889bf7c5 12319
4168d2d6
UW
123202009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12321
12322 * spu-low.c (spu_kill): Wait for inferior to terminate.
12323 Call clear_inferiors.
12324 (spu_detach): Call clear_inferiors.
12325
81ecdfbb
RW
123262009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12327
12328 * aclocal.m4: Regenerate.
12329 * config.in: Likewise.
12330 * configure: Likewise.
12331
0b9ff2c0
UW
123322009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12333
12334 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12335 (parse_spufs_run): New function.
12336 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12337 (ppc_breakpoint_at): Handle SPU breakpoints.
12338
efcbbd14
UW
123392009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12340
12341 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12342 (SPUFS_MAGIC): Define.
12343 (spu_enumerate_spu_ids): New function.
12344 (linux_qxfer_spu): New function.
12345 (linux_target_ops): Install linux_qxfer_spu.
12346
f4d9bade
UW
123472009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12348
12349 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12350 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12351 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12352 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12353 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12354 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12355 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12356 (init_registers_powerpc_cell32l): Add prototype.
12357 (init_registers_powerpc_cell64l): Likewise.
12358 (ppc_arch_setup): Detect Cell/B.E. architecture.
12359
96e946ca
RW
123602009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12361
12362 * Makefile.in (datarootdir): New variable.
12363
58d6951d
DJ
123642009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12365
12366 * linux-low.c (linux_write_memory): Update debugging output.
12367 * Makefile.in (clean): Add new descriptions.
12368 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12369 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12370 * configure.srv: Add new files for arm*-*-linux*.
12371 * linux-arm-low.c: Add new declarations.
12372 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12373 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12374 (HWCAP_VFPv3D16): New.
12375 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12376 instead of __IWMMXT__.
12377 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12378 (arm_arch_setup): New.
12379 (target_regsets): Remove #ifdef. Add VFP regset.
12380 (the_low_target): Use arm_arch_setup.
12381
12b42a12
DJ
123822009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12383
12384 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12385 the main thread again.
12386
ac8c974e
AR
123872009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12388
12389 Adding Neutrino gdbserver.
12390 * configure: Regenerated.
12391 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12392 * configure.srv (i[34567]86-*-nto*): New target.
12393 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12394 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12395 (nto_comctrl) [__QNX__]: New function.
12396 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12397
4424e0c3 123982009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
12399
12400 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12401 srv_tgtobj.
12402
912cf4ba
PA
124032009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12404 Pedro Alves <pedro@codesourcery.com>
12405
12406 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12407 don't support CONTEXT_EXTENDED_REGISTERS.
12408 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12409 (the_low_target): Install them.
12410 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12411 failing with ERROR_PIPE_NOT_CONNECTED.
12412
aa5ca48f
DE
124132009-06-30 Doug Evans <dje@google.com>
12414 Pierre Muller <muller@ics.u-strasbg.fr>
12415
12416 Add h/w watchpoint support to x86-linux, win32-i386.
12417 * Makefile.in (SFILES): Add i386-low.c
12418 (i386_low_h): Define.
12419 (i386-low.o): Add dependencies.
12420 (linux-x86-low.o): Add i386-low.h dependency.
12421 (win32-i386-low.o): Ditto.
12422 * i386-low.c: New file.
12423 * i386-low.h: New file.
12424 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12425 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12426 * linux-low.c (linux_add_process): Initialize arch_private.
12427 (linux_remove_process): Free arch_private.
12428 (add_lwp): Initialize arch_private.
12429 (delete_lwp): Free arch_private.
12430 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12431 provided.
12432 * linux-low.h (process_info_private): New member arch_private.
12433 (lwp_info): New member arch_private.
12434 (linux_target_ops): New members new_process, new_thread,
12435 prepare_to_resume.
12436 (ptid_of): New macro.
12437 * linux-x86-low.c: Include stddef.h, i386-low.h.
12438 (arch_process_info): New struct.
12439 (arch_lwp_info): New struct.
12440 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12441 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12442 (i386_dr_low_get_status): New function.
12443 (x86_insert_point, x86_remove_point): New functions.
12444 (x86_stopped_by_watchpoint): New function.
12445 (x86_stopped_data_address): New function.
12446 (x86_linux_new_process, x86_linux_new_thread): New functions.
12447 (x86_linux_prepare_to_resume): New function.
12448 (the_low_target): Add entries for insert_point, remove_point,
12449 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12450 prepare_to_resume.
12451 * server.c (debug_hw_points): New global.
12452 (monitor_show_help): Document set debug-hw-points.
12453 (handle_query): Process "set debug-hw-points".
12454 * server.h (debug_hw_points): Declare.
12455 (paddress): Declare.
12456 * utils.c (NUMCELLS, CELLSIZE): New macros.
12457 (get_sell, xsnprintf, paddress): New functions.
12458 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12459 remove_point, stopped_by_watchpoint, stopped_data_address.
12460 * win32-i386-low.c: Include i386-low.h.
12461 (debug_reg_state): Replaces dr.
12462 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12463 (i386_dr_low_get_status): New function.
12464 (i386_insert_point, i386_remove_point): New functions.
12465 (i386_stopped_by_watchpoint): New function.
12466 (i386_stopped_data_address): New function.
12467 (i386_initial_stuff): Update.
12468 (get_thread_context,set_thread_context,i386_thread_added): Update.
12469 (the_low_target): Add entries for insert_point,
12470 remove_point, stopped_by_watchpoint, stopped_data_address.
12471 * win32-low.c (win32_insert_watchpoint): New function.
12472 (win32_remove_watchpoint): New function.
12473 (win32_stopped_by_watchpoint): New function.
12474 (win32_stopped_data_address): New function.
12475 (win32_target_ops): Add entries for insert_watchpoint,
12476 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12477 * win32-low.h (win32_target_ops): New members insert_point,
12478 remove_point, stopped_by_watchpoint, stopped_data_address.
12479
d993e290
PA
124802009-06-25 Pedro Alves <pedro@codesourcery.com>
12481
12482 * server.c (process_serial_event): Re-return unsupported, not
12483 error, if the type isn't recognized. Re-allow supporting only
12484 insert or remove packets. Also call require_running for
12485 breakpoints. Add missing break statement to default case. Tidy.
12486 * target.h (struct target_ops): Rename insert_watchpoint to
12487 insert_point, and remove_watchpoint to remove_point.
12488
12489 * linux-low.h (struct linux_target_ops): Likewise.
12490 * linux-low.c (linux_insert_watchpoint): Rename to ...
12491 (linux_insert_point): ... this. Adjust.
12492 (linux_remove_watchpoint): Rename to ...
12493 (linux_remove_point): ... this. Adjust.
12494 (linux_target_ops): Adjust.
12495 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12496 (cris_insert_point): ... this.
12497 (cris_remove_watchpoint): Rename to ...
12498 (cris_remove_point): ... this.
12499 (the_low_target): Adjust.
12500
0f54c268
PM
125012009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12502
12503 * server.c (handle_v_kill): Pass signal_pid to
12504 kill_inferior if multi_process is zero.
12505
c6314022
AR
125062009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12507
12508 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12509 * target.h (target_ops): Comment for *_watchpoint to make it clear
12510 the functions can get types '0' and '1'.
12511
4463ce24
AR
125122009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12513
12514 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12515 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12516 * regcache.c (get_regcache): Likewise.
12517 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12518 * win32-low.c (child_fetch_inferior_registers): Remove check for
12519 regno 0.
12520
cf8fd78b
PA
125212009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12522 Pedro Alves <pedro@codesourcery.com>
12523
12524 * target.h (struct target_ops) <supports_multi_process>: New
12525 callback.
12526 (target_supports_multi_process): New.
12527 * server.c (handle_query): Even if GDB reports support, only
12528 enable multi-process if the target also supports it. Report
12529 multi-process support only if the target backend supports it.
12530 * linux-low.c (linux_supports_multi_process): New function.
12531 (linux_target_ops): Install it as target_supports_multi_process
12532 callback.
12533
47c0c975
DE
125342009-05-24 Doug Evans <dje@google.com>
12535
e09875d4
DE
12536 Global renaming of find_thread_pid to find_thread_ptid.
12537 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12538 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12539 All callers updated.
12540
e27d73f6
DE
12541 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12542 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12543 directly.
12544
47c0c975
DE
12545 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12546 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12547 (linux_resume_one_lwp): Ditto.
12548
2acc282a
DE
125492009-05-23 Doug Evans <dje@google.com>
12550
12551 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12552 from struct inferior_list_entry * to struct lwp_info *.
12553 All callers updated.
12554
9f1036c1
DE
125552009-05-13 Doug Evans <dje@google.com>
12556
12557 * linux-x86-low.c: Don't include assert.h.
12558 (x86_siginfo_fixup): Use fatal, not assert.
12559 (x86_arch_setup): Fix comment.
12560
d0722149
DE
125612009-05-12 Doug Evans <dje@google.com>
12562
12563 Biarch support for i386/amd64 gdbserver.
12564 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12565 Add linux-x86-low.c.
12566 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12567 (linux-x86-low.o): Add.
12568 * linux-x86-64-low.c: Delete.
12569 * linux-i386-low.c: Delete.
12570 * linux-x86-low.c: New file.
12571 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12572 linux-x86-low.o.
12573 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12574 linux-x86-low.o.
12575 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12576 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12577 (linux_child_pid_to_exec_file): New function.
12578 (elf_64_header_p, elf_64_file_p): New functions.
12579 (siginfo_fixup): New function.
12580 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12581 give target a chance to convert layout.
12582 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12583 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12584
fdeb2a12
DE
125852009-05-07 Doug Evans <dje@google.com>
12586
12587 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12588 (regsets_store_inferior_registers): Ditto.
12589
a6dbe5df
PA
125902009-05-06 Pedro Alves <pedro@codesourcery.com>
12591
12592 PR server/10048
12593
12594 * linux-low.c (must_set_ptrace_flags): Delete.
12595 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12596 of the global.
12597 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12598 `lwp->must_set_ptrace_flags' instead.
ba42693b 12599 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12600 (linux_wait_1): ... not here.
12601
5091eb23
DE
126022009-04-30 Doug Evans <dje@google.com>
12603
9f767825
DE
12604 * inferiors.c (started_inferior_callback): New function.
12605 (attached_inferior_callback): New function.
12606 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12607 * server.c (print_started_pid, print_attached_pid): New functions.
12608 (detach_or_kill_for_exit): New function.
12609 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12610 * server.h (have_started_inferiors_p): Declare.
12611 (have_attached_inferiors_p): Declare.
12612
5091eb23
DE
12613 * inferiors.c (remove_process): Fix memory leak, free process.
12614 * linux-low.c (linux_remove_process): New function.
12615 (linux_kill): Call it instead of remove_process.
12616 (linux_detach, linux_wait_1): Ditto.
12617
155c8968
PA
126182009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12619
12620 * configure.srv: Add x86 Windows CE target.
12621
7fe519cb
UW
126222009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12623
12624 * inferiors.c (get_thread_process): Make global.
12625 * server.h (get_thread_process): Add prototype.
12626 * thread-db.c (find_one_thread): Use get_thread_process
12627 instead of current_process.
12628 (thread_db_get_tls_address): Do not crash if called when
12629 thread layer is not yet initialized.
12630
5472f405
UW
126312009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12632
12633 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12634 * spu-low.c (current_tid): Rename to ...
12635 (current_ptid): ... this.
12636 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12637 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12638 ptid_get_lwp (current_ptid) instead of current_tid.
12639 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12640 instead of current_tid. Use find_process_pid to verify pid
12641 argument is valid. Pass proper argument to remove_process.
12642 (spu_thread_alive): Compare current_ptid instead of current_tid.
12643 (spu_resume): Likewise.
12644
55ac2b99
PA
126452009-04-02 Pedro Alves <pedro@codesourcery.com>
12646
12647 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12648 variable.
12649
95954743
PA
126502009-04-01 Pedro Alves <pedro@codesourcery.com>
12651
12652 Implement the multiprocess extensions, and add linux multiprocess
12653 support.
12654
12655 * server.h (ULONGEST): Declare.
12656 (struct ptid, ptid_t): New.
12657 (minus_one_ptid, null_ptid): Declare.
12658 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12659 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12660 (struct inferior_list_entry): Change `id' type from unsigned from
12661 to ptid_t.
12662 (struct sym_cache, struct breakpoint, struct
12663 process_info_private): Forward declare.
12664 (struct process_info): Declare.
12665 (current_process): Declare.
12666 (all_processes): Declare.
12667 (initialize_inferiors): Declare.
12668 (add_thread): Adjust to use ptid_t.
12669 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12670 (add_process, remove_process, find_thread_pid): Declare.
12671 (find_inferior_id): Adjust to use ptid_t.
12672 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12673 (multi_process): Declare.
12674 (push_event): Adjust to use ptid_t.
12675 (read_ptid, write_ptid): Declare.
12676 (prepare_resume_reply): Adjust to use ptid_t.
12677 (clear_symbol_cache): Declare.
12678 * inferiors.c (all_processes): New.
12679 (null_ptid, minus_one_ptid): New.
12680 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12681 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12682 (add_thread): Change unsigned long to ptid. Remove gdb_id
12683 parameter. Adjust.
12684 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12685 (gdb_id_to_thread): Rename to ...
12686 (find_thread_pid): ... this. Change unsigned long to ptid.
12687 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12688 (loaded_dll, pull_pid_from_list): Adjust.
12689 (add_process, remove_process, find_process_pid)
12690 (get_thread_process, current_process, initialize_inferiors): New.
12691 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12692 (struct target_waitstatus) <related_pid>: Ditto.
12693 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12694 return type to int.
12695 (struct target_ops) <join>: Add `pid' argument.
12696 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12697 (struct target_ops) <wait>: Add `ptid' field. Change return type
12698 to ptid.
12699 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12700 (mywait): Add `ptid' argument. Change return type to ptid_t.
12701 (target_pid_to_str): Declare.
12702 * target.c (set_desired_inferior): Adjust to use ptids.
12703 (mywait): Add new `ptid' argument. Adjust.
12704 (target_pid_to_str): New.
12705 * mem-break.h (free_all_breakpoints): Declare.
12706 * mem-break.c (breakpoints): Delelete.
12707 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12708 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12709 to use per-process breakpoint list.
12710 (free_all_breakpoints): New.
12711 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12712 (symbol_cache, all_symbols_looked_up): Delete.
12713 (hexchars): New.
12714 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12715 read_ptid): New.
12716 (prepare_resume_reply): Change ptid argument's type from unsigned
12717 long to ptid_t. Adjust. Implement W;process and X;process.
12718 (free_sym_cache, clear_symbol_cache): New.
12719 (look_up_one_symbol): Adjust to per-process symbol cache. *
12720 * server.c (cont_thread, general_thread, step_thread): Change type
12721 to ptid_t.
12722 (attached): Delete.
12723 (multi_process): New.
12724 (last_ptid): Change type to ptid_t.
12725 (struct vstop_notif) <ptid>: Change type to ptid_t.
12726 (queue_stop_reply, push_event): Change `ptid' argument's type to
12727 ptid_t.
12728 (discard_queued_stop_replies): Add `pid' argument.
12729 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12730 changes. Don't reference the `attached' global.
12731 (attach_inferior): Adjust to mywait interface changes.
12732 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12733 features. Handle and report "multiprocess+". Handle
12734 "qAttached:PID".
12735 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12736 changes.
12737 (handle_v_kill): New.
12738 (handle_v_stopped): Adjust to use target_pid_to_str.
12739 (handle_v_requests): Allow multiple attaches and runs when
12740 multiprocess extensions are in effect. Handle "vKill".
12741 (myresume): Adjust to use ptids.
12742 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12743 (handle_status): Adjust to discard_queued_stop_replies interface
12744 change.
12745 (first_thread_of, kill_inferior_callback)
12746 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12747 (main): Call initialize_inferiors. Adjust to use ptids, killing
12748 and detaching from all inferiors. Handle multiprocess packet
12749 variants.
12750 * linux-low.h: Include gdb_proc_service.h.
12751 (struct process_info_private): New.
12752 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12753 <lwpid_of>: Use ptid_get_lwp.
12754 (get_lwp_thread): Adjust.
12755 (struct lwp_info): Add `dead' member.
12756 (find_lwp_pid): Declare.
12757 * linux-low.c (thread_db_active): Delete.
12758 (new_inferior): Adjust comment.
12759 (inferior_pid): Delete.
12760 (linux_add_process): New.
12761 (handle_extended_wait): Adjust.
12762 (add_lwp): Change unsigned long to ptid.
12763 (linux_create_inferior): Add process to processes table. Adjust
12764 to use ptids. Don't set new_inferior here.
12765 (linux_attach_lwp): Rename to ...
12766 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12767 it. Adjust to use ptids.
12768 (linux_attach_lwp): New.
12769 (linux_attach): Add process to processes table. Don't set
12770 new_inferior here.
12771 (struct counter): New.
12772 (second_thread_of_pid_p, last_thread_of_process_p): New.
12773 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12774 multiple processes.
12775 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12776 processes. Remove process from process table.
12777 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12778 to multiple processes.
12779 (any_thread_of): New.
12780 (linux_detach): Add `pid' argument, and handle it. Remove process
12781 from processes table.
12782 (linux_join): Add `pid' argument. Handle it.
12783 (linux_thread_alive): Change unsighed long argument to ptid_t.
12784 Consider dead lwps as not being alive.
12785 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12786 threads we're not interested in.
12787 (same_lwp, find_lwp_pid): New.
12788 (linux_wait_for_lwp): Change `pid' argument's type from int to
12789 ptid_t. Adjust.
12790 (linux_wait_for_event): Rename to ...
12791 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12792 from int to ptid_t. Adjust.
12793 (linux_wait_for_event): New.
12794 (linux_wait_1): Add `ptid' argument. Change return type to
12795 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12796 that exit from the process table.
12797 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12798 Adjust.
12799 (mark_lwp_dead): New.
12800 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12801 stopping all threads, mark its main lwp as dead.
12802 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12803 ptids.
12804 (fetch_register, usr_store_inferior_registers)
12805 (regsets_fetch_inferior_registers)
12806 (regsets_store_inferior_registers, linux_read_memory)
12807 (linux_write_memory): Inline `inferior_pid'.
12808 (linux_look_up_symbols): Adjust to use per-process
12809 `thread_db_active'.
12810 (linux_request_interrupt): Adjust to use ptids.
12811 (linux_read_auxv): Inline `inferior_pid'.
12812 (initialize_low): Don't reference thread_db_active.
12813 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12814 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12815 (ps_getpid): Return the pid of the current inferior.
12816 * thread-db.c (proc_handle, thread_agent): Delete.
12817 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12818 per-process data.
12819 (find_one_thread): Change argument type to ptid_t. Adjust to
12820 per-process data.
12821 (maybe_attach_thread): Adjust to per-process data and ptids.
12822 (thread_db_find_new_threads): Ditto.
12823 (thread_db_init): Ditto.
12824 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12825 processes table. Adjust to use ptids.
12826 (spu_kill, spu_detach): Adjust interface. Remove process from
12827 processes table.
12828 (spu_join, spu_thread_alive): Adjust interface.
12829 (spu_wait): Adjust interface. Remove process from processes
12830 table. Adjust to use ptids.
12831 * win32-low.c (current_inferior_tid): Delete.
12832 (current_inferior_ptid): New.
12833 (debug_event_ptid): New.
12834 (thread_rec): Take a ptid. Adjust.
12835 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12836 (child_delete_thread): Ditto.
12837 (do_initial_child_stuff): Add `attached' argument. Add process to
12838 processes table.
12839 (child_fetch_inferior_registers, child_store_inferior_registers):
12840 Adjust.
12841 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12842 (win32_attach): Pass 1 to do_initial_child_stuff.
12843 (win32_kill): Adjust interface. Remove process from processes
12844 table.
12845 (win32_detach): Ditto.
12846 (win32_join): Adjust interface.
12847 (win32_thread_alive): Take a ptid.
12848 (win32_resume): Adjust to use ptids.
12849 (get_child_debug_event): Ditto.
12850 (win32_wait): Adjust interface. Remove exiting process from
12851 processes table.
12852
bd99dc85
PA
128532009-04-01 Pedro Alves <pedro@codesourcery.com>
12854
12855 Non-stop mode support.
12856
12857 * server.h (non_stop): Declare.
12858 (gdb_client_data, handler_func): Declare.
12859 (delete_file_handler, add_file_handler, start_event_loop):
12860 Declare.
12861 (handle_serial_event, handle_target_event, push_event)
12862 (putpkt_notif): Declare.
12863 * target.h (enum resume_kind): New.
12864 (struct thread_resume): Replace `step' field by `kind' field.
12865 (TARGET_WNOHANG): Define.
12866 (struct target_ops) <wait>: Add `options' argument.
12867 <supports_non_stop, async, start_non_stop>: New fields.
12868 (target_supports_non_stop, target_async): New.
12869 (start_non_stop): Declare.
12870 (mywait): Add `options' argument.
12871 * target.c (mywait): Add `options' argument. Print child exit
12872 notifications here.
12873 (start_non_stop): New.
12874 * server.c (non_stop, own_buf, mem_buf): New globals.
12875 (struct vstop_notif): New.
12876 (notif_queue): New global.
12877 (queue_stop_reply, push_event, discard_queued_stop_replies)
12878 (send_next_stop_reply): New.
12879 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12880 interface changes.
12881 (attach_inferior): In non-stop mode, don't wait for the target
12882 here.
12883 (handle_general_set): Handle QNonStop.
12884 (handle_query): When handling qC, return the current general
12885 thread, instead of the first thread of the list.
12886 (handle_query): If the backend supports non-stop mode, include
12887 QNonStop+ in the qSupported query response.
12888 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12889 and non-stop mode.
12890 (handle_v_attach, handle_v_run): Handle non-stop mode.
12891 (handle_v_stopped): New.
12892 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12893 (myresume): Adjust to use resume_kind. Handle non-stop.
12894 (queue_stop_reply_callback): New.
12895 (handle_status): Handle non-stop mode.
12896 (main): Clear non_stop flag on reconnection. Use the event-loop.
12897 Refactor serial protocol handling from here ...
12898 (process_serial_event): ... to this new function. When GDB
12899 selects any thread, select one here. In non-stop mode, wait until
12900 GDB acks all pending events before exiting.
12901 (handle_serial_event, handle_target_event): New.
12902 * remote-utils.c (remote_open): Install remote_desc in the event
12903 loop.
12904 (remote_close): Remove remote_desc from the event loop.
12905 (putpkt_binary): Rename to...
12906 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12907 (putpkt_binary): New as wrapper around putpkt_binary_1.
12908 (putpkt_notif): New.
12909 (prepare_resume_reply): In non-stop mode, don't change the
12910 general_thread.
12911 * event-loop.c: New.
12912 * Makefile.in (OBJ): Add event-loop.o.
12913 (event-loop.o): New rule.
12914
12915 * linux-low.h (pid_of): Moved here.
12916 (lwpid_of): New.
12917 (get_lwp_thread): Use lwpid_of.
12918 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12919 * linux-low.c (pid_of): Delete.
12920 (inferior_pid): Use lwpid_of.
12921 (linux_event_pipe): New.
12922 (target_is_async_p): New.
12923 (delete_lwp): New.
12924 (handle_extended_wait): Use lwpid_of.
12925 (add_lwp): Don't set lwpid field.
12926 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12927 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12928 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12929 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12930 first. Adjust to linux_wait_for_event interface changes. Use
12931 lwpid_of.
12932 (linux_detach): Don't delete the main lwp here.
12933 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12934 (status_pending_p): Don't consider explicitly suspended lwps.
12935 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12936 pointer. Add OPTIONS argument. Change return type to int. Use
12937 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12938 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12939 pointer. Add status pointer argument. Return a pid instead of a
12940 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12941 changes. In non-stop mode, don't switch to a random thread.
12942 (linux_wait): Rename to...
12943 (linux_wait_1): ... this. Add target_options argument, and handle
12944 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12945 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12946 clean exit and signal exit code. Don't stop all threads in
12947 non-stop mode. In all-stop mode, only stop all threads when
12948 reporting a stop to GDB. Handle explicit thread stop requests.
12949 (async_file_flush, async_file_mark): New.
12950 (linux_wait): New.
12951 (send_sigstop): Use lwpid_of.
12952 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12953 interface changes. In non-stop mode, don't switch to a random
12954 thread.
12955 (linux_resume_one_lwp): Use lwpid_of.
12956 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12957 (linux_resume_one_thread): ... this. Handle resume_stop. In
12958 non-stop mode, don't look for pending flag in all threads.
12959 (resume_status_pending_p): Don't consider explicitly suspended
12960 threads.
12961 (my_waitpid): Reimplement. Emulate __WALL.
12962 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12963 Use lwpid_of.
12964 (sigchld_handler, linux_supports_non_stop, linux_async)
12965 (linux_start_non_stop): New.
12966 (linux_target_ops): Register linux_supports_non_stop, linux_async
12967 and linux_start_non_stop.
12968 (initialize_low): Install SIGCHLD handler.
12969 * thread-db.c (thread_db_create_event, find_one_thread)
12970 (thread_db_get_tls_address): Use lwpid_of.
12971 * win32-low.c (win32_detach): Adjust to use resume_kind.
12972 (win32_wait): Add `options' argument.
12973 * spu-low.c (spu_resume): Adjust to use resume_kind.
12974 (spu_wait): Add `options' argument.
12975
5b1c542e
PA
129762009-04-01 Pedro Alves <pedro@codesourcery.com>
12977
12978 Decouple target code from remote protocol.
12979
12980 * target.h (enum target_waitkind): New.
12981 (struct target_waitstatus): New.
12982 (struct target_ops) <wait>: Return an unsigned long. Take a
12983 target_waitstatus pointer instead of a char pointer.
12984 (mywait): Likewise.
12985 * target.c (mywait): Change prototype to return an unsigned long.
12986 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12987 * server.h (thread_from_wait, old_thread_from_wait): Delete
12988 declarations.
12989 (prepare_resume_reply): Change prototype to take a
12990 target_waitstatus.
12991 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12992 (last_status, last_ptid): New.
12993 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12994 pid instead of a signal.
12995 (attach_inferior): Remove "status" and "signal" parameters.
12996 Adjust.
12997 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12998 not as an address.
12999 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13000 (handle_v_requests, myresume): Remove "status" and "signal"
13001 parameters. Adjust.
13002 (handle_status): New.
13003 (main): Delete local `status'. Adjust.
13004 * remote-utils.c: Include target.h.
13005 (prepare_resume_reply): Change prototype to take a
13006 target_waitstatus. Adjust.
13007
13008 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13009 interface.
13010 * spu-low.c (spu_wait): Adjust.
13011 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13012 Delete.
13013 (win32_wait): Adjust.
13014
2bd7c093
PA
130152009-04-01 Pedro Alves <pedro@codesourcery.com>
13016
13017 * target.h (struct thread_resume): Delete leave_stopped member.
13018 (struct target_ops): Add a `n' argument to the `resume' callback.
13019 * server.c (start_inferior): Adjust.
13020 (handle_v_cont, myresume): Adjust.
13021 * linux-low.c (check_removed_breakpoint): Adjust to resume
13022 interface change, and to removed leave_stopped field.
13023 (resume_ptr): Delete.
13024 (struct thread_resume_array): New.
13025 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13026 resume interface change.
13027 (linux_continue_one_thread, linux_queue_one_thread)
13028 (resume_status_pending_p): Check if the resume field is NULL
13029 instead of checking the leave_stopped member.
13030 (linux_resume): Adjust to the target resume interface change.
13031 * spu-low.c (spu_resume): Adjust to the target resume interface
13032 change.
13033 * win32-low.c (win32_detach, win32_resume): Ditto.
13034
c35fafde
PA
130352009-04-01 Pedro Alves <pedro@codesourcery.com>
13036
13037 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13038 flag.
13039 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13040 pending.
13041 (linux_continue_one_thread): Only preserve the stepping flag if
13042 there's a pending breakpoint.
13043
0a59d50b
PA
130442009-03-31 Pedro Alves <pedro@codesourcery.com>
13045
13046 * server.c (main): After the inferior having exited, call
13047 remote_close before exiting gdbserver.
13048
f04c6d38
TJB
130492009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13050
13051 Fix size of FPSCR in Power 7 processors.
13052 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13053 (PPC_FEATURE_HAS_DFP): New #define.
13054 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13055 size of the FPSCR.
13056
78e5cee6
PA
130572009-03-23 Pedro Alves <pedro@codesourcery.com>
13058
13059 * server.c (handle_query) Whitespace and formatting.
13060
1b3f6016
PA
130612009-03-22 Pedro Alves <pedro@codesourcery.com>
13062
13063 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13064 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13065 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13066 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13067 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13068 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13069 Makefile.in, configure.ac: Fix whitespace throughout.
13070 * configure: Regenerate.
13071
a07b2135
PA
130722009-03-22 Pedro Alves <pedro@codesourcery.com>
13073
13074 * inferiors.c (find_inferior): Make it safe for the callback
13075 function to delete the currently iterated inferior.
13076
67cc2626
PA
130772009-03-22 Pedro Alves <pedro@codesourcery.com>
13078
13079 * Makefile.in (linuw_low_h): Move higher.
13080 (thread-db.o): Depend on $(linux_low_h).
13081
54a0b537
PA
130822009-03-17 Pedro Alves <pedro@codesourcery.com>
13083
13084 Rename "process" to "lwp" throughout.
13085
13086 * linux-low.c (all_processes): Rename to...
13087 (all_lwps): ... this.
13088 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13089 (add_process): Rename to ...
13090 (add_lwp): ... this. Adjust.
13091 (linux_create_inferior): Adjust.
13092 (linux_attach_lwp): Adjust.
13093 (linux_attach): Adjust.
13094 (linux_kill_one_process): Rename to ...
13095 (linux_kill_one_lwp): ... this. Adjust.
13096 (linux_kill): Adjust.
13097 (linux_detach_one_process): Rename to ...
13098 (linux_detach_one_lwp): ... this. Adjust.
13099 (linux_detach): Adjust.
13100 (check_removed_breakpoint): Adjust.
13101 (status_pending_p): Adjust.
13102 (linux_wait_for_process): Rename to ...
13103 (linux_wait_for_lwp): ... this. Adjust.
13104 (linux_wait_for_event): Adjust.
13105 (send_sigstop): Adjust.
13106 (wait_for_sigstop): Adjust.
13107 (stop_all_processes): Rename to ...
13108 (stop_all_lwps): ... this.
13109 (linux_resume_one_process): Rename to ...
13110 (linux_resume_one_lwp): ... this. Adjust.
13111 (linux_set_resume_request, linux_continue_one_thread)
13112 (linux_queue_one_thread, resume_status_pending_p)
13113 (usr_store_inferior_registers, regsets_store_inferior_registers)
13114 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13115 Adjust.
13116 * linux-low.h (get_process): Rename to ...
13117 (get_lwp): ... this. Adjust.
13118 (get_thread_process): Rename to ...
13119 (get_thread_lwp): ... this. Adjust.
13120 (get_process_thread): Rename to ...
13121 (get_lwp_thread): ... this. Adjust.
13122 (struct process_info): Rename to ...
13123 (struct lwp_info): ... this.
13124 (all_processes): Rename to ...
13125 (all_lwps): ... this.
13126 * proc-service.c (ps_lgetregs): Adjust.
13127 * thread-db.c (thread_db_create_event, find_one_thread)
13128 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13129
0b16c5cf
PA
131302009-03-14 Pedro Alves <pedro@codesourcery.com>
13131
13132 * server.c (handle_query): Handle "qAttached".
13133
32de4b9d
NS
131342009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13135
13136 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13137 GPLv3, update license URL.
13138
2aecd87f
DE
131392009-03-01 Doug Evans <dje@google.com>
13140
93efd302 13141 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
13142 (server_h): Add gdb_signals.h.
13143 (signals.o): Update.
13144 * server.h (target_signal_from_host,target_signal_to_host_p)
13145 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13146
86b1f9c5
PM
131472009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13148
13149 * remote-utils.c (getpkt): Also generate remote-debug
13150 information if noack_mode is set.
13151
4aa995e1
PA
131522009-02-06 Pedro Alves <pedro@codesourcery.com>
13153
13154 * server.c (handle_query): Report qXfer:siginfo:read and
13155 qXfer:siginfo:write as supported and handle them.
13156 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13157 * linux-low.c (linux_xfer_siginfo): New.
13158 (linux_target_ops): Set it.
13159
62709adf
PA
131602009-01-26 Pedro Alves <pedro@codesourcery.com>
13161
13162 * server.c (gdbserver_usage): Mention --remote-debug.
13163 (main): Accept '--remote-debug' switch.
13164
aef93bd7
DE
131652009-01-18 Doug Evans <dje@google.com>
13166
13167 * regcache.c (new_register_cache): No need to check result of xcalloc.
13168 * server.c (handle_search_memory): Back out calls to xmalloc,
13169 result is checked and error is returned to user upon failure.
13170 (handle_query): Ditto. Add more checks for result of malloc.
13171 (handle_v_cont): Check result of malloc, report error back to
13172 user upon failure.
13173 (handle_v_run): Ditto. Call freeargv.
13174 * server.h (freeargv): Declare.
13175 * utils.c (freeargv): New fn.
13176
54363045
DE
131772009-01-15 Doug Evans <dje@google.com>
13178
f626972c
DE
13179 * gdbreplay.c (perror_with_name): Make arg const char *.
13180 * server.h (target_signal_to_name): Make return type const char *.
0842e787 13181 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 13182 * utils.c (perror_with_name): Make arg const char *.
54363045 13183
18aae699
PA
131842009-01-14 Pedro Alves <pedro@codesourcery.com>
13185
13186 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13187 when handling a EXIT_PROCESS_DEBUG_EVENT.
13188
ff703abe
JB
131892009-01-06 Joel Brobecker <brobecker@adacore.com>
13190
13191 * gdbreplay.c (gdbreplay_version): Update copyright year.
13192 * server.c (gdbserver_version): Likewise.
13193
f21cc1a2 131942009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
13195
13196 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 13197 (handle_extended_wait): Improve comment.
0e21c1ec 13198
bca929d3
DE
131992008-12-13 Doug Evans <dje@google.com>
13200
13201 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13202 * server.h (ATTR_MALLOC): New macro.
13203 (xmalloc,xcalloc,xstrdup): Declare.
13204 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13205 * inferiors.c: Ditto.
13206 * linux-low.c: Ditto.
13207 * mem-break.c: Ditto.
13208 * regcache.c: Ditto.
13209 * remote-utils.c: Ditto.
13210 * server.c: Ditto.
13211 * target.c: Ditto.
13212 * win32-low.c: Ditto.
13213
97438e3f
DE
132142008-12-12 Doug Evans <dje@google.com>
13215
896c7fbb
DE
13216 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13217 in debugging printf.
13218
97438e3f
DE
13219 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13220
e3b886f8
DE
132212008-12-09 Doug Evans <dje@google.com>
13222
13223 * linux-low.h (struct process_info): Delete member tid, unused.
13224 * thread-db.c (find_one_thread): Update.
13225 (maybe_attach_thread): Update.
13226
07e059b5
VP
132272008-12-02 Pedro Alves <pedro@codesourcery.com>
13228
889bf7c5
PA
13229 * target.h (struct target_ops): Add qxfer_osdata member.
13230 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13231 and dirent.h.
13232 (linux_qxfer_osdata): New functions.
13233 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13234 callback.
13235 * server.c (handle_query): Handle "qXfer:osdata:read:".
13236 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13237 (buffer_xml_printf): New functions.
13238 * server.h (struct buffer): New.
13239 (buffer_grow_str, buffer_grow_str0): New macros.
13240 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13241 (buffer_xml_printf): Declare.
07e059b5 13242
4cab47ab
DE
132432008-11-24 Doug Evans <dje@google.com>
13244
13245 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13246
f142445f
DJ
132472008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13248
13249 * server.c (handle_v_run): Always use the supplied argument list.
13250
d0107bb6 132512008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 13252
d0107bb6
BW
13253 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13254 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 13255
2c4ad781
TJB
132562008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13257
13258 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13259 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13260 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13261 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13262 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13263 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13264 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13265 XML target descriptions.
13266 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13267 when inferior is running on an ISA 2.05 or later processor. Add
13268 special case to return offset for full 64-bit slot of FPSCR when
13269 in 32-bits.
13270
dfb64f85
DJ
132712008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13272
13273 * Makefile.in (SFILES, clean): Added sparc64 files.
13274 (reg-sparc64.o, reg-sparc64.c): New.
13275 * configure.srv (sparc*-*-linux*): New configuration.
13276 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13277 syscall arguments for SPARC.
13278 (regsets_store_inferior_registers): Likewise.
13279 * linux-sparc-low.c: New file.
13280
66b6e1dd
DE
132812008-10-21 Doug Evans <dje@google.com>
13282
13283 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13284 (READLINE_DIR,READLINE_DEP): Delete.
13285 (INTERNAL_CFLAGS): Update.
13286 (LINTFLAGS): Update.
13287
9b710a42
PA
132882008-10-10 Pedro Alves <pedro@codesourcery.com>
13289
13290 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13291 whole argv from the last run, not just argv[0].
13292
5822d809
PA
132932008-09-08 Pedro Alves <pedro@codesourcery.com>
13294
13295 * regcache.c (new_register_cache): Return NULL if the register
13296 cache size isn't known yet.
13297 (free_register_cache): Avoid dereferencing a NULL regcache.
13298
74aac56f
DJ
132992008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13300
13301 * configure.srv: Merge MIPS and MIPS64.
13302
400b20f5
MR
133032008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13304
13305 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13306
677c5bb1
LM
133072008-08-18 Luis Machado <luisgpm@br.ibm.com>
13308
13309 * Makefile.in: Add required vsx dependencies.
13310
13311 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13312 Declare init_registers_powerpc_vsx32l.
13313 Declare init_registers_powerpc_vsx64l.
13314 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13315 (ppc_arch_setup): Check for VSX in hwcap.
13316 (ppc_fill_vsxregset): New function.
13317 (ppc_store_vsxregset): New function.
13318 Add new VSX entry in regset_info target_regsets.
13319
13320 * configure.srv: Add new VSX dependencies.
13321
a6f3e723
SL
133222008-08-12 Pedro Alves <pedro@codesourcery.com>
13323
13324 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13325 (remote_open): Set or clear transport_is_reliable.
13326 (putpkt_binary): Don't expect acks in noack mode.
13327 (getpkt): Don't send ack/nac in noack mode.
13328 * server.c (handle_general_set): Handle QStartNoAckMode.
13329 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13330 qSupported.
13331 (main): Reset noack_mode on every connection.
13332 * server.h (noack_mode): Declare.
13333
a417dc56
RW
133342008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13335
13336 * Makefile.in (GDBREPLAY_OBS): New variable.
13337 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13338
3221518c
UW
133392008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13340 Daniel Jacobowitz <dan@codesourcery.com>
13341
13342 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13343 (usr_store_inferior_registers): Likewise.
13344 (regsets_store_inferior_registers): Likewise.
13345
ec56be1b
PA
133462008-07-31 Rolf Jansen <rj@surtec.com>
13347 Pedro Alves <pedro@codesourcery.com>
13348
13349 * configure.ac: Check for memmem declaration.
13350 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13351 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13352 (disable_packet_qfThreadInfo): Unconditionally compile.
13353 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13354 * configure, config.in: Regenerate.
13355
2fe5e3ff
DE
133562008-07-28 Doug Kwan <dougkwan@google.com>
13357
13358 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13359 (linux_write_memory): Remove declaration of errno.
13360
836acd6d
UW
133612008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13362
13363 * linux-low.c (handle_extended_wait): Do not use "status"
13364 variable uninitialized.
13365
aeba519e
PA
133662008-07-07 Pedro Alves <pedro@codesourcery.com>
13367
13368 * server.c (handle_v_attach): Inhibit reporting dll changes.
13369
db42f210
PA
133702008-06-27 Pedro Alves <pedro@codesourcery.com>
13371
13372 * remote-utils.c (prepare_resume_reply): If requested, don't
13373 output "thread:TID" in the T stop reply.
13374
13375 * server.c (disable_packet_vCont, disable_packet_Tthread)
13376 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13377 (handle_query): If requested, disable support for qC, qfThreadInfo
13378 and qsThreadInfo.
13379 (handle_v_requests): If requested, disable support for vCont.
13380 (gdbserver_show_disableable): New.
13381 (main): Handle --disable-packet and --disable-packet=LIST.
13382
13383 * server.h (disable_packet_vCont, disable_packet_Tthread)
13384 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13385
8e4c5421
CD
133862008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13387
13388 * server.c (gdbserver_usage): Mention --version.
13389
6e23a804
DJ
133902008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13391
13392 * Makefile.in (gdbreplay.o): New rule.
13393
90aa6a40
JM
133942008-06-06 Joseph Myers <joseph@codesourcery.com>
13395
13396 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13397 message, not gdbserver.
13398
c16158bc 133992008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
13400 Nathan Sidwell <nathan@codesourcery.com>
13401 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
13402
13403 * acinclude.m4: Include ../../config/acx.m4.
13404 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13405 * configure, config.in: Regenerate.
13406 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13407 * server.c (gdbserver_version): Print PKGVERSION.
13408 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13409 (main): Adjust gdbserver_usage calls.
13410 * gdbreplay.c (version, host_name): Add declarations.
13411 (gdbreplay_version, gdbreplay_usage): New.
13412 (main): Accept --version and --help options.
13413
aeb75bf5
DJ
134142008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13415
13416 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13417 (arm_breakpoint_at): Handle Thumb.
13418 (the_low_target): Add comment.
13419
76b233dd
UW
134202008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13421
13422 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13423
08388c79
DE
134242008-05-09 Doug Evans <dje@google.com>
13425
a3c83fae
DE
13426 * server.h (decode_search_memory_packet): Declare.
13427 * remote-utils.c (decode_search_memory_packet): New fn.
13428 * server.c (handle_search_memory_1): New fn.
08388c79
DE
13429 (handle_search_memory): New fn.
13430 (handle_query): Process qSearch:memory packets.
13431
bb9c3d36
UW
134322008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13433
13434 * regcache.c (registers_length): Remove.
13435 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13436 full register packet.
13437 * regcache.h (registers_length): Remove prototype.
13438 * server.h (PBUFSIZ): Define to 16384.
13439
7284e1be
UW
134402008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13441
13442 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13443 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13444 powerpc-64l.o, and powerpc-altivec64l.o.
13445 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13446 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13447 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13448 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13449 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13450 to srv_xmlfiles.
13451
13452 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13453 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13454 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13455 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13456 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13457 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13458 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13459 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13460 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13461 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13462 (clean): Update.
13463
13464 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13465 (init_registers_powerpc_32l): ... this new prototype.
13466 (init_registers_powerpc_32): Remove, replace by ...
13467 (init_registers_powerpc_altivec32l): ... this new prototype.
13468 (init_registers_powerpc_e500): Remove, replace by ...
13469 (init_registers_powerpc_e500l): ... this new prototype.
13470 (init_registers_ppc64): Remove, replace by ...
13471 (init_registers_powerpc_64l): ... this new prototype.
13472 (init_registers_powerpc_64): Remove, replace by ...
13473 (init_registers_powerpc_altivec64l): ... this new prototype.
13474 (ppc_num_regs): Set to 73.
13475 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13476 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13477 (ppc_cannot_store_register): Handle orig_r3 and trap.
13478 (ppc_arch_setup): Update init_registers_... calls.
13479 (ppc_fill_gregset): Handle orig_r3 and trap.
13480
13481 * inferiors.c (clear_inferiors): Reset current_inferior.
13482
fdc59709
PB
134832008-04-23 Paolo Bonzini <bonzini@gnu.org>
13484
889bf7c5
PA
13485 * acinclude.m4: Add override.m4.
13486 * configure: Regenerate.
fdc59709 13487
c9b2f845
UW
134882008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13489
13490 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13491 initial call to init_register_ppc64.
13492
550512b8
UW
134932008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13494
43aaf8b6
PA
13495 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13496 single powerpc*-*-linux* case.
550512b8
UW
13497 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13498
b6430ec3
UW
134992008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13500
13501 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 13502 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
13503 from reg_xmlfiles.
13504 * linux-ppc-low.c: Include <elf.h>.
13505 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13506 (ppc_hwcap): New global variable.
13507 (ppc_regmap): Remove __SPE__ #ifdef sections.
13508 (ppc_regmap_e500): New global variable.
13509 (ppc_cannot_store_register): Update __SPE__ special case.
13510 (ppc_get_hwcap): New function.
13511 (ppc_arch_setup): Use it to determine whether inferior supports
13512 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13513 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13514 Do not access registers if target does not support AltiVec.
13515 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13516 Do not access registers if target does not support SPE.
13517 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13518
52fa2412
UW
135192008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13520
13521 * linux-low.c (disabled_regsets, num_regsets): New.
13522 (use_regsets_p): Delete.
13523 (linux_wait_for_process): Clear disabled_regsets.
13524 (regsets_fetch_inferior_registers): Check and set it.
13525 (regsets_store_inferior_registers): Likewise.
13526 (linux_fetch_registers, linux_store_registers): Do not use
13527 use_regsets_p.
13528 (initialize_low): Allocate disabled_regsets.
13529
e28b3332
DJ
135302008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13531
13532 * Makefile.in (LIBOBJS): New.
13533 (OBS): Use LIBOBJS.
13534 (memmem.o): New rule.
13535 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13536 * configure: Regenerated.
13537
4536995d
UW
135382008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13539
13540 * server.c (handle_query): Never return "unsupported" for
13541 qXfer:features:read queries.
13542
221c031f
UW
135432008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13544
13545 * server.c (get_features_xml): Fix inverted condition.
13546 (handle_query): Always support qXfer:feature:read.
13547
ccd213ac
DJ
135482008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13549
13550 * server.c (wrapper_argv): New.
13551 (start_inferior): Handle wrapper_argv. If set, expect an extra
13552 trap.
13553 (gdbserver_usage): Document --wrapper.
13554 (main): Parse --wrapper.
13555
6fe305f7
UW
135562008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13557
13558 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13559 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13560 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13561 (ppc_set_pc): Likewise.
13562 (ppc_arch_setup): New function.
13563 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13564 of collect_register.
889bf7c5 13565 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13566
5b0a002e
UW
135672008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13568
13569 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13570 instead of linux-ppc64-low.o.
13571 * linux-ppc64-low.c: Remove file.
13572 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13573 (linux-ppc64-low.o): Remove rule.
13574
13575 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13576 (init_registers_powerpc_64): Likewise.
13577 (ppc_regmap): Conditionally define depending on __powerpc64__.
13578 (ppc_cannot_store_register): Do not special-case "fpscr" when
13579 compiled on __powerpc64__.
13580 (ppc_collect_ptrace_register): New function.
13581 (ppc_supply_ptrace_register): New function.
13582 (ppc_breakpoint): Change type to "unsigned int".
13583 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13584 (the_low_target): Conditionally provide initializers for the
889bf7c5 13585 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13586 collect_ptrace_register and supply_ptrace_register members.
13587
9b4b61c8
UW
135882008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13589
13590 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13591 * server.c (gdbserver_xmltarget): Define.
13592 (get_features_xml): Use it to replace "target.xml" and arch_string.
13593
13594 * configure.srv: Remove srv_xmltarget. Add XML files that were
13595 mentioned there to srv_xmlfiles instead. Remove conditional tests
13596 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13597 srv_xmlfiles and srv_regobj to include all possible choices.
13598 * configure.ac (srv_xmltarget): Remove.
13599 (srv_xmlfiles): Do not add "target.xml".
13600 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13601 checks for supplementary target information.
13602 * configure: Regenerate.
13603 * Makefile.in (XML_TARGET): Remove.
13604 (target.xml): Remove rule.
13605 (clean): Do not clean up target.xml.
13606 (.PRECIOUS): Do not mention target.xml.
13607
13608 * target.h (struct target_ops): Remove arch_string member.
13609 * linux-low.c (linux_arch_string): Remove.
13610 (linux_target_ops): Remove arch_string initializer.
13611 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13612 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13613 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13614 * spu-low.c (spu_arch_string): Remove.
13615 (spu_target_ops): Remove arch_string initializer.
13616 * win32-low.c (win32_arch_string): Remove.
13617 (win32_target_ops): Remove arch_string initializer.
13618 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13619 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13620 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13621
ee1a7ae4
UW
136222008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13623
13624 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13625 by collect_ptrace_register and supply_ptrace_register hooks.
13626 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13627 instead of checking for the_low_target.left_pad_xfer.
13628 (usr_store_inferior_registers): Use collect_ptrace_register callback
13629 instead of checking for the_low_target.left_pad_xfer.
13630
13631 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13632 (s390_supply_ptrace_register): Likewise.
13633 (s390_fill_gregset): Call s390_collect_ptrace_register.
13634 (the_low_target): Update.
13635
13636 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13637 (ppc_supply_ptrace_register): Likewise.
13638 (the_low_target): Update.
13639
13640 * linux-i386-low.c (the_low_target): Update.
13641 * linux-x86-64-low.c (the_low_target): Update.
13642
d61ddec4
UW
136432008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13644
13645 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13646 reg-s390.o and reg-s390x.o.
13647
13648 * linux-low.c (new_inferior): New global variable.
13649 (linux_create_inferior, linux_attach): Set it.
13650 (linux_wait_for_process): Call the_low_target.arch_setup after the
13651 target has stopped for the first time.
13652 (initialize_low): Do not call the_low_target.arch_setup.
13653
13654 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13655 (s390_set_pc): Likewise.
13656 (s390_arch_setup): New function.
13657 (the_low_target): Use s390_arch_setup as arch_setup routine.
13658
13659 * regcache.c (realloc_register_cache): New function.
13660 (set_register_cache): Call it for each existing regcache.
13661
d05b4ac3
UW
136622008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13663
13664 * server.h (init_registers): Remove prototype.
13665
13666 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13667 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13668 instead of init_registers ().
13669 * linux-arm-low.c (init_registers_arm): Add prototype.
13670 (init_registers_arm_with_iwmmxt): Likewise.
13671 (the_low_target): Add initializer for arch_setup field.
13672 * linux-cris-low.c (init_registers_cris): Add prototype.
13673 (the_low_target): Add initializer for arch_setup field.
13674 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13675 (the_low_target): Add initializer for arch_setup field.
13676 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13677 (the_low_target): Add initializer for arch_setup field.
13678 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13679 (the_low_target): Add initializer for arch_setup field.
13680 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13681 (the_low_target): Add initializer for arch_setup field.
13682 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13683 (the_low_target): Add initializer for arch_setup field.
13684 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13685 (init_registers_mips64_linux): Likewise.
13686 (the_low_target): Add initializer for arch_setup field.
13687 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13688 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13689 (the_low_target): Add initializer for arch_setup field.
13690 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13691 (init_registers_powerpc_64): Likewise.
13692 (the_low_target): Add initializer for arch_setup field.
13693 * linux-s390-low.c (init_registers_s390): Add prototype.
13694 (init_registers_s390x): Likewise.
13695 (the_low_target): Add initializer for arch_setup field.
13696 * linux-sh-low.c (init_registers_sh): Add prototype.
13697 (the_low_target): Add initializer for arch_setup field.
13698 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13699 (the_low_target): Add initializer for arch_setup field.
13700 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13701 (the_low_target): Add initializer for arch_setup field.
13702
13703 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13704 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13705 instead of init_registers ().
13706 * win32-arm-low.c (init_registers_arm): Add prototype.
13707 (the_low_target): Add initializer for arch_setup field.
13708 * win32-i386-low.c (init_registers_i386): Add prototype.
13709 (the_low_target): Add initializer for arch_setup field.
13710
13711 * spu-low.c (init_registers_spu): Add prototype.
13712 (initialize_low): Call initialie_registers_spu () instead of
13713 initialize_registers ().
13714
fd96d250
PA
137152008-02-19 Pedro Alves <pedro@codesourcery.com>
13716
13717 * server.c (handle_v_requests): When handling the vRun and vAttach
13718 packets, if already debugging a process, don't kill it. Return an
13719 error instead.
13720
d41b6bb4
DJ
137212008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13722
13723 * server.c (handle_query): Correct length check.
13724
5ac588cf
PA
137252008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13726
13727 * win32-low.c (do_initial_child_stuff): Add process handle
13728 parameter. Set current_process_handle and current_process_id from the
13729 parameters. Clear globals.
13730 (win32_create_inferior): Don't set current_process_handle and
13731 current_process_id here. Instead pass them on the call to
13732 do_initial_child_stuff.
13733 (win32_attach): Likewise.
13734 (win32_clear_inferiors): New.
13735 (win32_kill): Don't close the current process handle or the
13736 current thread handle here. Instead call win32_clear_inferiors.
13737 (win32_detach): Don't open a new handle to the process. Call
13738 win32_clear_inferiors.
13739 (win32_join): Don't rely on current_process_handle; open a new
13740 handle using the process id.
13741 (win32_wait): Call win32_clear_inferiors when the inferior process
13742 has exited.
13743
ecd7ecbc
DJ
137442008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13745
13746 * server.c (monitor_show_help): Add "exit".
13747
1525d545
MG
137482008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13749
ecd7ecbc 13750 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
13751 (clean): Add reg-xtensa.c.
13752 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
13753 * configure.srv (xtensa*-*-linux*) New target.
13754 * linux-xtensa-low.c: New.
13755 * xtensa-xtregs.c: New.
1525d545 13756
59a016f0
PA
137572008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13758
13759 * hostio.c: Don't include errno.h.
13760 (errno_to_fileio_errno): Move to hostio-errno.
13761 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13762 error number outputting to the target->hostio_last_error callback.
13763 (hostio_packet_error): Use FILEIO_EINVAL directly.
13764 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13765 calls to hostio_error.
13766 * hostio-errno.c: New.
13767 * server.h (hostio_last_error_from_errno): Declare.
13768 * target.h (target_ops): Add hostio_last_error member.
13769 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13770 as hostio_last_error handler.
889bf7c5 13771 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
13772 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13773 (wince_hostio_last_error): New functions.
13774 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13775 as hostio_last_error handler.
13776 (win32_target_ops) [!_WIN32_WCE]: Register
13777 hostio_last_error_from_errno as hostio_last_error handler.
13778 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13779 (hostio-errno.o): New rule.
13780 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13781 * configure.srv (srv_hostio_err_objs): New variable. Default to
13782 hostio-errno.o.
13783 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13784 * configure: Regenerate.
13785
2d717e4f
DJ
137862008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13787
13788 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13789 (linux_kill, linux_detach): Clean up the process list.
13790 * remote-utils.c (remote_open): Improve port number parsing.
13791 (putpkt_binary, input_interrupt): Only send interrupts if the target
13792 is running.
13793 * server.c (extended_protocol): Make static.
13794 (attached): Define earlier.
13795 (exit_requested, response_needed, program_argv): New variables.
13796 (target_running): New.
13797 (start_inferior): Clear attached here.
13798 (attach_inferior): Set attached here.
13799 (require_running): Define.
13800 (handle_query): Use require_running and target_running. Implement
13801 "monitor exit".
13802 (handle_v_attach, handle_v_run): New.
13803 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13804 (gdbserver_usage): Update.
13805 (main): Redo argument parsing. Handle --debug and --multi. Handle
13806 --attach along with other options or after the port. Save
13807 program_argv. Support no initial program. Resynchronize
13808 communication with GDB after an error. Handle "monitor exit".
13809 Use require_running and target_running. Always allow the extended
13810 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13811 restart in extended mode.
13812 * README: Refer to the GDB manual. Update --attach usage.
13813
7407e2de
AS
138142007-12-20 Andreas Schwab <schwab@suse.de>
13815
13816 * linux-low.c (STACK_SIZE): Define.
13817 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13818 (linux_test_for_tracefork): Likewise.
13819
b65d95c5
DJ
138202007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13821
13822 * linux-low.c (linux_wait_for_event): Update messages. Do not
13823 reinsert auto-delete breakpoints.
13824 * mem-break.c (struct breakpoint): Change return type of handler to
13825 int.
13826 (set_breakpoint_at): Update handler type.
13827 (reinsert_breakpoint_handler): Return 1 instead of calling
13828 delete_breakpoint.
13829 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13830 setting a new one.
13831 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13832 * mem-break.h (set_breakpoint_at): Update handler type.
13833 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13834 * win32-low.c (auto_delete_breakpoint): New.
13835 (get_child_debug_event): Use it.
13836
4e799345
DJ
138372007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13838
13839 * configure.ac: Check for pread and pwrite.
13840 * hostio.c (handle_pread): Fall back to lseek and read.
13841 (handle_pwrite): Fall back to lseek and write.
13842 * config.in, configure: Regenerated.
13843
27524b67
DJ
138442007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13845
13846 * server.c (myresume): Add own_buf argument.
13847 (main): Update calls.
13848
a20d5e98
DJ
138492007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13850
13851 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13852 * remote-utils.c (remote_open): Do not call disable_async_io.
13853 (block_async_io): Delete.
13854 (unblock_async_io): Make static.
13855 (initialize_async_io): New.
13856 * server.c (handle_v_cont): Handle async I/O here.
13857 (myresume): Likewise. Move other common resume tasks here...
13858 (main): ... from here. Call initialize_async_io. Disable async
13859 I/O before the main loop.
13860 * server.h (initialize_async_io): Declare.
13861 (block_async_io, unblock_async_io): Delete prototypes.
13862 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13863
b79d787e
DJ
138642007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13865
13866 * remote-utils.c (readchar): Allow binary data in received messages.
13867
d97903b2
PA
138682007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13869
13870 * win32-low.c (attaching): New global.
13871 (win32_create_inferior): Clear the `attaching' global.
13872 (win32_attach): Set the `attaching' global.
13873 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13874 attaching. Only set a breakpoint at the entry point if not
13875 attaching.
13876
311de423
PA
138772007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13878
13879 * server.c (main): Don't report dll events on the initial
13880 connection on attaches.
13881
6c2d16d2
PA
138822007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13883
13884 * server.c (main): Relax numerical bases supported for the pid of
13885 the --attach command line argument.
13886
5ca906e6
PA
138872007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13888
13889 * win32-low.c (win32_attach): Call OpenProcess before
13890 DebugActiveProcess, not after. Add last error output to error
13891 call.
13892
9c6c8194
PA
138932007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13894
13895 * win32-low.c (win32_get_thread_context)
13896 (win32_set_thread_context): New functions.
13897 (thread_rec): Use win32_get_thread_context.
13898 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13899 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13900 field.
13901
4d5d1aaa
PA
139022007-12-03 Leo Zayas
13903 Pedro Alves <pedro_alves@portugalmail.pt>
13904
13905 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13906 global variables.
13907 (child_add_thread): Minor cleanup.
13908 (child_continue): Resume artificially suspended threads before
13909 calling ContinueDebugEvent.
13910 (suspend_one_thread): New.
13911 (fake_breakpoint_event): New.
13912 (get_child_debug_event): Change return type to int. Check here if
13913 gdb sent an interrupt request. If a soft interrupt was requested,
13914 fake a breakpoint event. Return 0 if there is no event to handle,
13915 and 1 otherwise.
13916 (win32_wait): Don't check here if gdb sent an interrupt request.
13917 Ensure there is a valid event to handle.
13918 (win32_request_interrupt): Add soft interruption method as last
13919 resort.
13920
c436e841
PA
139212007-12-03 Leo Zayas
13922 Pedro Alves <pedro_alves@portugalmail.pt>
13923
13924 * win32-low.h (win32_thread_info): Add descriptions to the
13925 structure members. Replace `suspend_count' counter by a
13926 `suspended' flag.
13927 * win32-low.c (thread_rec): Update condition of when to get the
13928 context from the inferior. Rely on ContextFlags being set if it
13929 has already been retrieved. Only suspend the inferior thread if
13930 we haven't already. Warn if that fails.
13931 (continue_one_thread): s/suspend_count/suspended/. Only call
13932 ResumeThread once. Warn if that fails.
13933
e7b5fa67
PA
139342007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13935
13936 * win32-low.c (win32_wait): Don't read from the inferior when it
13937 has already exited.
13938
a385171d
PA
139392007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13940
13941 * Makefile.in (win32_low_h): New variable.
13942 (win32-low.o): Add dependency on $(win32_low_h).
13943 (win32-arm-low.o, win32-i386-low.o): New rules.
13944
f80c84b3
DJ
139452007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13946
13947 * hostio.c: Correct copyright year.
13948
a6b151f1
DJ
139492007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13950
13951 * Makefile.in (OBS): Add hostio.o.
13952 (hostio.o): New rule.
13953 * server.h (handle_vFile): Declare.
13954 * hostio.c: New file.
13955 * server.c (handle_v_requests): Take packet_len and new_packet_len
13956 for binary packets. Call handle_vFile.
13957 (main): Update call to handle_v_requests.
13958
f9387fc3
DJ
139592007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13960
13961 * linux-low.c: Include <sched.h>.
13962
51c2684e
DJ
139632007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13964
13965 * linux-low.c (linux_tracefork_grandchild): New.
13966 (linux_tracefork_child): Use clone.
13967 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13968
75f83163
JB
139692007-10-31 Joel Brobecker <brobecker@adacore.com>
13970
13971 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13972
da5898ce
DJ
139732007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13974
13975 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13976
24a09b5f
DJ
139772007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13978
13979 * inferiors.c (change_inferior_id): Delete.
13980 (add_pid_to_list, pull_pid_from_list): New.
13981 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13982 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13983 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13984 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13985 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13986 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13987 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13988 (using_threads): Always set to 1.
13989 (handle_extended_wait): New.
13990 (add_process): Do not set TID.
13991 (linux_create_inferior): Set must_set_ptrace_flags.
13992 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13993 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13994 (linux_thread_alive): Rename TID argument to LWPID.
13995 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13996 (linux_wait_for_event): Do not use TID or check using_threads. Update
13997 call to dead_thread_notify. Call handle_extended_wait.
13998 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13999 (send_sigstop): Delete sigstop_sent.
14000 (wait_for_sigstop): Avoid TID.
14001 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14002 (linux_test_for_tracefork): New.
14003 (linux_lookup_signals): Use thread_db_active and
14004 linux_supports_tracefork_flag.
14005 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14006 * linux-low.h (get_process_thread): Avoid TID.
14007 (struct process_ifo): Move thread_known and tid to the end. Remove
14008 sigstop_sent.
14009 (linux_attach_lwp, thread_db_init): Update prototypes.
14010 * server.h (change_inferior_id): Delete prototype.
14011 (add_pid_to_list, pull_pid_from_list): New prototypes.
14012 * thread-db.c (thread_db_use_events): New.
14013 (find_first_thread): Rename to...
14014 (find_one_thread): ...this. Update callers and messages. Do not
14015 call fatal. Check thread_db_use_events. Do not call
14016 change_inferior_id or new_thread_notify.
14017 (maybe_attach_thread): Update. Do not call new_thread_notify.
14018 (thread_db_init): Set thread_db_use_events. Check use_events.
14019 * utils.c (fatal, warning): Correct message prefix.
14020
30ed0a8f
DJ
140212007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14022
14023 * Makefile.in (clean): Remove new files.
14024 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14025 (powerpc-64.o, powerpc-64.c): New rules.
14026 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14027 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14028 with SPE.
14029 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14030 SPE targets.
14031 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14032 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14033 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14034 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14035 (target_regsets): Add AltiVec and SPE register sets.
14036 * configure.ac: Check for AltiVec and SPE.
14037 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14038 (ppc_fill_vrregset, ppc_store_vrregset): New.
14039 (target_regsets): Add AltiVec register set.
14040 * configure: Regenerated.
14041
fd462a61
DJ
140422007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14043
14044 * linux-low.c (O_LARGEFILE): Define.
14045 (linux_read_memory): Use /proc/PID/mem.
14046 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14047 * configure, config.in: Regenerated.
14048
69f223ed
DJ
140492007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14050
14051 * linux-low.c (linux_wait_for_event): Do not pass signals while
14052 single-stepping.
14053
aec18585
PA
140542007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14055
14056 * win32-low.c (create_process): New.
14057 (win32_create_inferior): Use create_process instead of
14058 CreateProcess. If create_process failed retry appending an ".exe"
14059 suffix. Store the GetLastError result immediatelly after
14060 create_process calls and use it on the call to error.
14061
34d86ddd
PA
140622007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14063
14064 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14065
5a0e3bd0
JB
140662007-08-23 Joel Brobecker <brobecker@adacore.com>
14067
14068 * configure.ac: Switch license to GPLv3.
14069
f88c79e6
MS
140702007-08-01 Michael Snyder <msnyder@access-company.com>
14071
14072 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14073
6b3d9b83
PA
140742007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14075
14076 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14077 typedef.
14078 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14079 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14080 CloseToolhelp32Snapshot.
14081 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14082 CloseToolhelp32Snapshot.
14083
c588c53c
MS
140842007-07-27 Michael Snyder <michael.snyder@access-company.com>
14085
14086 * server.c (main): Check for inferior exit before main loop.
14087
aa0403d9
PA
140882007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14089
14090 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14091 instead of on tmp_desc.
14092
255e7678
DJ
140932007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14094 Daniel Jacobowitz <dan@codesourcery.com>
14095
14096 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14097 (add_thread): Minor cleanups.
14098 (clear_inferiors): Move lower in the file. Clear the DLL
14099 list.
14100 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14101 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14102 (xml_escape_text): New.
14103 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14104 for qSupported.
14105 (handle_v_cont): Report errors.
14106 (gdbserver_version): Update.
14107 (main): Correct size of own_buf. Do not report initial DLL events.
14108 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14109 (unloaded_dll, xml_escape_text): New.
14110 * win32-low.c (enum target_waitkind): Update comments.
14111 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14112 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14113 (win32_EnumProcessModules, win32_GetModuleInformation)
14114 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14115 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14116 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14117 (win32_Module32First, win32_Module32Next, load_toolhelp)
14118 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14119 (get_child_debug_event): Handle DLL events.
14120 (win32_wait): Likewise.
14121
0d37add9
DJ
141222007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14123
14124 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14125 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14126
45e2715e
PA
141272007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14128
14129 * win32-low.c (handle_output_debug_string): Ignore event if not
14130 waiting.
14131
c5674cf1
PA
141322007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14133
14134 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14135
2bbe3cc1
DJ
141362007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14137
14138 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14139
ae13219e
DJ
141402007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14141
14142 * inferiors.c (change_inferior_id): Add comment.
14143 * linux-low.c (check_removed_breakpoint): Add an early
14144 prototype. Improve debug output.
14145 (linux_attach): Doc update.
14146 (linux_detach_one_process, linux_detach): Clean up before releasing
14147 each process.
14148 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14149 * linux-low.h (struct process_info): Doc improvement.
14150 * mem-break.c (delete_all_breakpoints): New.
14151 * mem-break.h (delete_all_breakpoints): New prototype.
14152 * thread-db.c (find_first_thread): New.
14153 (thread_db_create_event): Call it instead of
14154 thread_db_find_new_threads. Clean up unused variables.
14155 (maybe_attach_thread): Remove first thread handling.
14156 (thread_db_find_new_threads): Use find_first_thread.
14157 (thread_db_get_tls_address): Likewise.
14158
4105de34
DJ
141592007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14160
14161 * thread-db.c (thread_db_find_new_threads): Add prototype.
14162 (thread_db_create_event): Check for the main thread before adding
14163 a new thread.
14164 (maybe_attach_thread): Only enable event reporting if TID == 0.
14165 (thread_db_get_tls_address): Check for new threads.
14166
2b876972
DJ
141672007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14168
14169 * linux-low.c (linux_create_inferior): Try execv before execvp.
14170 * spu-low.c (spu_create_inferior): Likewise.
14171
7a245884
DJ
141722007-06-13 Mike Frysinger <vapier@gentoo.org>
14173
14174 * linux-low.c (linux_create_inferior): Change execv to execvp.
14175 * spu-low.c (spu_create_inferior): Likewies.
14176
117ce543
DJ
141772007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14178
14179 * Makefile.in (clean): Clean new files instead of deleted ones.
14180 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14181 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14182 rules.
14183 * configure.srv: Specify XML files and new regformats for MIPS and
14184 MIPS64 GNU/Linux.
14185 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14186 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14187 an entry for the restart register.
14188 (mips_cannot_fetch_register, mips_cannot_store_register)
14189 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14190 register names to match the XML descriptions.
14191 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14192 restart register instead of $0.
14193
0e7f50da
UW
141942007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14195 Markus Deuling <deuling@de.ibm.com>
14196
14197 * remote-utils.c (decode_xfer_write): New function.
14198 * server.h (decode_xfer_write): Add prototype.
14199 * server.c (handle_query): Add PACKET_LEN argument. Support
14200 qXfer:spu:read and qXfer:spu:write packets.
14201 (main): Pass packet_len to handle_query.
14202 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14203 * target.h (target_ops): Add qxfer_spu.
14204
374c1d38
UW
142052007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14206
14207 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14208 accessing non-seekable spufs files.
14209
bb63802a
UW
142102007-05-16 Markus Deuling <deuling@de.ibm.com>
14211
889bf7c5 14212 * server.c (handle_query): Add reply for qC packet.
bb63802a 14213
7390519e
PA
142142007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14215 Leo Zayas <lerele@champenstudios@com>
14216
14217 * server.h (check_remote_input_interrupt_request): New function.
14218 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14219 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14220 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14221 (check_remote_input_interrupt_request): New function.
14222 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 14223 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
14224 winapi_GenerateConsoleCtrlEvent): New typedefs.
14225 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14226 to 250 ms.
14227 (win32_wait): Check for remote interrupt request
14228 with check_remote_input_interrupt_request.
14229 (win32_request_interrupt): New function.
14230 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14231
34b34921
PA
142322007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14233
14234 * win32-low.c (debug_registers_changed,
14235 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14236 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14237 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14238 (thread_rec): Get context using the low target.
14239 (child_add_thread): Call thread_added on the low target,
14240 which does the same thing.
14241 (regptr): Delete.
14242 (do_initial_child_stuff): Remove debug registers references.
14243 Set context using the low target. Resume threads after
14244 setting the contexts.
14245 (child_continue): Remove dead variable. Remove debug
14246 registers references.
14247 (child_fetch_inferior_registers): Go through the low target.
14248 (do_child_store_inferior_registers): Remove.
14249 (child_store_inferior_registers): Go through the low target.
14250 (win32_resume): Remove debug registers references.
14251 Set context using the low target.
14252 (handle_exception): Change return type to void. Don't record
14253 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14254 first chance exception.
889bf7c5 14255 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
14256 goto loop. Always return after waiting for debug event.
14257 (win32_wait): Convert to switch statement. Handle spurious
14258 events.
14259
14260 * win32-i386-low.c (debug_registers_changed,
14261 debug_registers_used): New.
14262 (initial_stuff): Rename to ...
14263 (i386_initial_stuff): ... this. Clear debug registers
14264 state variables.
14265 (store_debug_registers): Delete.
14266 (i386_get_thread_context): New.
14267 (load_debug_registers): Delete.
14268 (i386_set_thread_context): New.
14269 (i386_thread_added): New.
14270 (single_step): Rename to ...
14271 (i386_single_step): ... this.
14272 (do_fetch_inferior_registers): Rename to ...
14273 (i386_fetch_inferior_register): ... this.
14274 (i386_store_inferior_register): New.
14275 (the_low_target): Adapt to new interface.
14276
14277 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14278 (arm_get_thread_context): New.
14279 (arm_set_thread_context): New.
14280 (regptr): New.
14281 (do_fetch_inferior_registers): Rename to ...
14282 (arm_fetch_inferior_register): ... this.
14283 (arm_store_inferior_register): New.
14284 (arm_wince_breakpoint): Reimplement as unsigned long.
14285 (arm_wince_breakpoint_len): Define.
14286 (the_low_target): Adapt to new interface.
14287
14288 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14289 load_debug_registers. Add get_thread_context, set_thread_context,
14290 thread_added and store_inferior_register. Rename
14291 fetch_inferior_registers to fetch_inferior_register.
14292 (regptr): Remove declaration.
14293
dd6953e1
PA
142942007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14295
14296 * linux-low.c (linux_detach): Change return type to int. Return 0.
14297 * spu-low.c (spu_detach): Likewise.
14298
444d6139
PA
142992007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14300
14301 * target.h (target_ops): Change return type of detach to int.
14302 Add join.
14303 (join_inferior): New.
14304 * server.c (main): Don't skip detach support on mingw32.
14305 If the inferior doesn't support detaching return error.
14306 Call join_inferior instead of using waitpid.
14307 * linux-low.c (linux_join): New.
14308 (linux_target_op): Add linux_join.
14309 * spu-low.c (spu_join): New.
14310 (spu_target_ops): Add spu_join.
14311 * win32-low.c (win32_detach): Adapt to new interface.
14312 Reopen current_process_handle before detaching. Issue a child
14313 resume before detaching.
14314 (win32_join): New.
14315 (win32_target_op): Add win32_join.
14316
1d5315fe
PA
143172007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14318
14319 * win32-low.c (win32-attach): Fix return value.
14320 * target.h (target_ops): Describe ATTACH return values.
14321
bf914831
PA
143222007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14323
14324 * win32-low.c (GETPROCADDRESS): Define.
14325 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14326 (winapi_DebugSetProcessKillOnExit): Likewise.
14327 (win32_create_inferior): Force usage of ansi CreateProcessA.
14328 (win32_attach): Use GETPROCADDRESS.
14329 (win32_detach): Likewise.
14330
f72f3e60
PA
143312007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14332
14333 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14334
ed50f18f
PA
143352007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14336
14337 * win32-low.c: Commit leftover changes from 2007-03-29.
14338
0c2ead7e
DJ
143392007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14340
14341 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14342 fields short instead of int. Add explicit padding.
14343 (i387_cache_to_fsave): Remove unnecessary casts.
14344 (i387_fsave_to_cache): Doc fix.
14345 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14346
73725ff3
DJ
143472007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14348
14349 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14350 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14351
d99f33d8
PA
143522007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14353
14354 * configure.srv (arm*-*-mingw32ce*): Move near the other
14355 arm targets.
14356
68070c10
PA
143572007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14358
2482afc6 14359 * configure.ac: Add errno checking.
68070c10
PA
14360 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14361 sys/file.h and malloc.h.
14362 (AC_CHECK_DECLS): Add perror.
14363 (srv_mingwce): Handle.
2482afc6 14364 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14365 win32-i386-low.o to srv_tgtobj.
14366 (i[34567]86-*-mingw*): Likewise.
14367 (arm*-*-mingw32ce*): Add case.
14368 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14369 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14370 [__MINGW32CE__] (strerror): New function.
14371 [__MINGW32CE__] (errno): Define to GetLastError.
14372 [__MINGW32CE__] (COUNTOF): New macro.
14373 (remote_open): Remove extra close call.
14374 * mem-break.c (delete_breakpoint_at): New function.
14375 * mem-break.h (delete_breakpoint_at): Declare.
14376 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14377 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14378 [USE_WIN32API] (read, write): Add char* casts.
14379 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14380 * server.h: Include wincecompat.h on Windows CE.
14381 [HAVE_ERRNO_H]: Check.
14382 (perror): Declare if not declared.
14383 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14384 (perror_with_name): Remove errno declaration.
14385 * wincecompat.h: New.
14386 * wincecompat.c: New.
14387 * win32-low.h: New.
14388 * win32-arm-low.c: New.
14389 * win32-i386-low.c: New.
14390 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14391 (OUTMSG2): Make it safe.
14392 (_T): New macro.
14393 (COUNTOF): New macro.
14394 (NUM_REGS): Get it from the low target.
14395 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14396 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14397 (thread_rec): Let low target handle debug registers.
14398 (child_add_thread): Likewise.
14399 (child_init_thread_list): Likewise.
14400 (continue_one_thread): Likewise.
14401 (regptr): New.
14402 (do_child_fetch_inferior_registers): Move to ...
14403 * win32-i386-low.c: ... here, and rename to ...
14404 (do_fetch_inferior_registers): ... this.
889bf7c5 14405 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
14406 Go through the low target.
14407 (do_child_store_inferior_registers): Use regptr.
14408 (strwinerror): New function.
14409 (win32_create_inferior): Handle Windows CE.
14410 Use strwinerror instead of strerror on Windows error
14411 codes. Add program to the error output.
14412 Don't close the main thread handle on Windows CE.
14413 (win32_attach): Use coredll.dll on Windows CE.
14414 (win32_kill): Close current process and current
14415 thread handles.
14416 (win32_detach): Use coredll.dll on Windows CE.
14417 (win32_resume): Let low target handle debug registers, and
14418 step request.
14419 (handle_exception): Add/Remove initial breakpoint. Avoid
14420 non-existant WSTOPSIG on Windows CE.
14421 (win32_read_inferior_memory): Cast to remove warning.
14422 (win32_arch_string): Go through the low target.
14423 (initialize_low): Call set_breakpoint_data with the low
14424 target's breakpoint.
14425 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14426 FOP_REGNUM, mappings): Move to ...
14427 * win32-i386-low.c: ... here.
14428 * win32-low.c (win32_thread_info): Move to ...
14429 * win32-low.h: ... here.
14430 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14431 win32-arm-low.c and wincecompat.c.
14432 (all:): Add $EXEEXT.
14433 (install-only:): Likewise.
14434 (gdbserver:): Likewise.
14435 (gdbreplay:): Likewise.
14436 * config.in: Regenerate.
14437 * configure: Regenerate.
14438
41093d81
PA
144392007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14440
14441 * win32-low.c: Rename typedef thread_info to
14442 win32_thread_info throughout.
14443
544afa54
PA
144442007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14445
14446 * win32-i386-low.c: Rename to ...
14447 * win32-low.c: ... this.
14448 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14449 * Makefile.in: Likewise.
14450
bce7165d
PA
144512007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14452
14453 * remote-utils.c (monitor_output): Constify msg parameter.
14454 * server.h (monitor_output): Likewise.
14455 * win32-i386-low.c (handle_output_debug_string): New.
14456 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14457 handle_output_debug_string.
14458 (get_child_debug_event): Likewise.
14459
506c7aa0
DJ
144602007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14461
14462 * server.c (main): Correct strtoul check.
14463
42c81e2a
DJ
144642007-03-27 Jon Ringle <jon@ringle.org>
14465
14466 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14467
9453113a
DJ
144682007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14469
14470 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14471
64a69107
DJ
144722007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14473
14474 * terminal.h: Check HAVE_SGTTY_H.
14475
144762007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
14477
14478 * remote-utils.c (remote_open): Print out the assigned port number.
14479
c74d0ad8
DJ
144802007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14481
14482 * remote-utils.c (monitor_output): New function.
14483 * server.c (debug_threads): Define here.
14484 (monitor_show_help): New function.
14485 (handle_query): Handle qRcmd.
14486 (main): Do not handle 'd' packet.
14487 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14488 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14489 of debug_threads.
14490
de7c3b4a
PA
144912007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14492
14493 * Makefile.in (EXEEXT): New.
14494 (clean): Use $(EXEEXT).
14495
ef57601b
PA
144962007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14497
14498 * target.h (target_ops): Rename send_signal to request_interrupt,
14499 and remove enum target_signal parameter.
14500 * linux-low.c (linux_request_interrupt): Rename from
14501 linux_send_signal, and always send SIGINT.
14502 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14503 and always send SIGINT.
14504 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14505 of send_signal.
14506 (input_interrupt): Likewise.
14507
820f2bda
PA
145082007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14509
14510 * server.c (get_features_xml): Check if target implemented
14511 arch_string.
14512 * win32-i386-low.c (win32_arch_string): New.
14513 (win32_target_ops): Add win32_arch_string as arch_string member.
14514
ab39bf24
UW
145152007-02-22 Markus Deuling <deuling@de.ibm.com>
14516
14517 * spu-low.c (spu_arch_string): New.
14518 (spu_target_ops): Add spu_arch_string.
14519
61ff6e04
DJ
145202007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14521
14522 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14523 * configure.ac: Do not check for terminal.h.
14524 * configure, config.in: Regenerated.
14525
fb1e4ffc
DJ
145262007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14527
14528 * Makefile.in (OBS): Add $(XML_BUILTIN).
14529 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14530 (clean): Update.
14531 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14532 (arm-with-iwmmxt.c): New.
14533 * config.in, configure: Regenerate.
14534 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14535 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14536 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14537 (arm*-*-linux*): Add iWMMXt and regset support.
14538 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14539 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14540 (arm_store_wmmxregset, target_regsets): New.
14541 * server.c (get_features_xml): Take annex argument. Check builtin
14542 XML documents.
14543 (handle_query): Handle multiple annexes.
14544
0f48aa01
DJ
145452007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14546
14547 * remote-utils.c [USE_WIN32API] (read, write): Define.
14548 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14549 write.
14550
23181151
DJ
145512007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14552
14553 * linux-i386-low.c (the_low_target): Set arch_string.
14554 * linux-x86-64-low.c (the_low_target): Likewise.
14555 * linux-low.c (linux_arch_string): New.
14556 (linux_target_ops): Add it.
14557 * linux-low.h (struct linux_target_ops): Add arch_string.
14558 * server.c (write_qxfer_response): Use const void * for DATA.
14559 (get_features_xml): New.
14560 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14561 * target.h (struct target_ops): Add arch_string method.
14562
9d606399
DJ
145632007-01-03 Denis Pilat <denis.pilat@st.com>
14564 Daniel Jacobowitz <dan@codesourcery.com>
14565
14566 * linux-low.c (linux_kill): Handle being called with no threads.
14567 * win32-i386-low.c (win32_kill): Likewise.
14568 (get_child_debug_event): Clear current_process_handle.
14569
145702006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14571 Daniel Jacobowitz <dan@codesourcery.com>
14572
14573 * remote-utils.c (remote_open): Check the type of specified
14574 serial port devices before opening them.
14575 * server.c (main): Kill the inferior if an error occurs during
14576 the first remote_open.
14577
a5e13d24
DJ
145782006-12-05 Markus Deuling <deuling@de.ibm.com>
14579
14580 * README: Update supported targets.
14581
186947f7
DJ
145822006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14583
14584 * Makefile.in (clean): Remove reg-mips64.c.
14585 (reg-mips64.c, reg-mips64.o): New rules.
14586 * configure.srv: Handle mips64. Include regset support for mips.
14587 * linux-mips-low.c (union mips_register): New.
14588 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14589 (mips_breakpoint, mips_breakpoint_at): Use int.
14590 (mips_collect_register, mips_supply_register)
14591 (mips_collect_register_32bit, mips_supply_register_32bit)
14592 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14593 (mips_store_fpregset, target_regsets): New.
14594 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14595
a13e2c95
UW
145962006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14597
14598 * configure.srv: Add target "spu*-*-*".
14599 * Makefile.in (clean): Remove reg-spu.c.
14600 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14601 * spu-low.c: New file.
14602
cb7283db
DJ
146032006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14604
14605 * configure.ac: Correct td_thr_tls_get_addr test.
14606 * configure: Regenerated.
14607
89be2091
DJ
146082006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14609
14610 * linux-low.c (linux_wait_for_event): Reformat. Use the
14611 pass_signals array.
14612 * remote-utils.c (decode_address_to_semicolon): New.
14613 * server.c (pass_signals, handle_general_set): New.
14614 (handle_query): Mention QPassSignals for qSupported.
14615 (main): Call handle_general_set.
14616 * server.h (pass_signals, decode_address_to_semicolon): New.
14617
000ef4f0
DJ
146182006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14619
14620 * server.c (handle_query): Correct error handling for read_auxv.
14621
b7149293
UW
146222005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14623
14624 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14625 and srv_linux_thread_db to yes.
14626 * linux-s390-low.c (s390_fill_gregset): New function.
14627 (target_regsets): Define data structure.
14628
dae5f5cf
DJ
146292006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14630
14631 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14632 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14633 * config.in, configure: Regenerated.
14634 * inferiors.c (gdb_id_to_thread): New function.
14635 (gdb_id_to_thread_id): Use it.
14636 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14637 * linux-low.h (struct process_info): Add th member.
14638 (thread_db_get_tls_address): New prototype.
14639 * remote-utils.c (decode_address): Make non-static.
14640 * server.c (handle_query): Handle qGetTLSAddr.
14641 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14642 * target.h (struct target_ops): Add get_tls_address.
14643 * thread-db.c (maybe_attach_thread): Save the thread handle.
14644 (thread_db_get_tls_address): New.
14645
32ca6d61
DJ
146462006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14647
14648 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14649 (linux_resume_one_process): Take a siginfo_t *. Update all
14650 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14651 (struct pending_signals): Add a siginfo_t.
14652 (linux_wait_for_process): Always set last_status.
14653 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14654 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14655 * linux-low.h (struct process_info): Add last_status.
14656
5ffff7c1
DJ
146572006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14658
14659 * remote-utils.c (try_rle): New function.
14660 (putpkt_binary): Use it.
14661
8695c747
DJ
146622006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14663
14664 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14665 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14666 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14667 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14668 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14669 point registers.
14670
290fadea
RS
146712006-08-08 Richard Sandiford <richard@codesourcery.com>
14672
14673 * server.c (terminal_fd): New variable.
14674 (old_foreground_pgrp): Likewise.
14675 (restore_old_foreground_pgrp): New function.
14676 (start_inferior): Record the terminal file descriptor in terminal_fd
14677 and its original foreground group in old_foreground_pgrp. Register
14678 restore_old_foreground_pgrp with atexit().
14679
9f2e1e63
DJ
146802006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14681
14682 * server.c (handle_query): Correct qPart to qXfer.
14683
b80864fb
DJ
146842006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14685
14686 * configure.ac: Check for more headers which are missing on
14687 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14688 * configure.srv: Add Cygwin and mingw32.
14689 * remote-utils.c: Don't include headers unconditionally which
14690 are missing on mingw32. Include <winsock.h> for mingw32.
14691 (remote_open): Adjust for mingw32 support. Flush
14692 standard error after writing to it.
14693 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14694 (unblock_async_io, enable_async_io, disable_async_io)
14695 (readchar, getpkt): Update for Winsock support.
14696 (prepare_resume_reply): Expect a protocol signal number.
14697 * server.c: Disable <sys/wait.h> on mingw32.
14698 (start_inferior): Adjust for mingw32 support. Flush
14699 standard error after writing to it.
14700 (attach_inferior): Likewise. Use protocol signal
14701 numbers.
14702 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14703 and names.
14704 * win32-i386-low.c: New file.
14705 * Makefile.in (XM_CLIBS): Set.
14706 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14707 (win32-i386-low.o): New dependency rule.
14708 * linux-low.c (linux_wait): Use target signal numbers.
14709 * target.h (struct target_ops): Doc fix.
14710 * server.h (target_signal_to_name): New prototype.
14711 * gdbreplay.c: Don't include headers unconditionally which
14712 are missing on mingw32. Include <winsock.h> for mingw32.
14713 (remote_close, remote_open): Adjust for Winsock support.
14714 * configure, config.in: Regenerated.
14715
0876f84a
DJ
147162006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14717
14718 * server.c (decode_xfer_read, write_qxfer_response): New.
14719 (handle_query): Take a packet length argument. Handle
14720 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14721 the qSupported response.
14722 (main): Update call to handle_query.
14723
01f9e8fa
DJ
147242006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14725
14726 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14727 (putpkt_binary): Renamed from putpkt and adjusted for binary
14728 data.
14729 (putpkt): New wrapper for putpkt_binary.
14730 (readchar): Don't mask off the high bit.
14731 (decode_X_packet): New function.
14732 * server.c (main): Call putpkt_binary if a handler sets the packet
14733 length. Save the length of the incoming packet. Handle 'X'.
14734 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14735
be2a5f71
DJ
147362006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14737
14738 * server.c (handle_query): Handle qSupported.
14739
ea025f5f
DJ
147402006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14741
14742 * remote-utils.c (all_symbols_looked_up): New variable.
14743 (look_up_one_symbol): Check it.
14744 * server.h (look_up_one_symbol): New declaration.
14745 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14746
9308fc88
DJ
147472006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14748
14749 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 14750 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
14751 (PTRACE_GET_THREAD_AREA): Define.
14752 (ps_get_thread_area): New function.
14753
52fb6437
NS
147542006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14755
14756 * configure.srv (m68k*-*-uclinux*): New target.
14757 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14758 (linux_resume_one_process): Remove extraneous cast.
14759 (linux_read_offsets): New.
14760 (linux_target_op): Add linux_read_offsets on mmuless systems.
14761 * server.c (handle_query): Add qOffsets logic.
14762 * target.h (struct target_ops): Add read_offsets.
14763
21b0f40c
DJ
147642006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14765
14766 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14767 (PTRACE_GET_THREAD_AREA): Define.
14768 (ps_get_thread_area): New function.
14769 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14770 (linux-x86-64-low.o): Update.
14771
0050a760
DJ
147722006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14773
14774 * configure.ac: Remove checks for prfpregset_t.
14775 * gdb_proc_service.h: New file.
14776 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14777 new "gdb_proc_service.h".
14778 * proc-service.c: Likewise.
14779 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14780 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14781 * Makefile.in (gdb_proc_service_h): Updated.
14782 * configure, config.in: Regenerated.
14783
b92a518e
DJ
147842006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14785
14786 * remote-utils.c (prepare_resume_reply): Move declaration
14787 of gdb_id_from_wait to the top of the block.
14788
545587ee
DJ
147892006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14790
14791 * linux-low.c (regsets_store_inferior_registers): Read the regset
14792 from the target before filling it.
14793
9db87ebd
DJ
147942006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14795
14796 * server.c (attach_inferior): Return SIGTRAP for a successful
14797 attach.
14798
dd24457d
DJ
147992006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14800
14801 * Makefile.in (OBS): Add version.o.
14802 (STAGESTUFF): Delete.
14803 (version.o): Add dependencies.
14804 (version.c): Replace rule.
14805 (clean): Remove version.c.
14806 * server.c (gdbserver_version): New.
14807 (gdbserver_usage): Use printf.
14808 (main): Handle --version and --help.
14809 * server.h (version, host_name): Add declarations.
14810
6f0f660e
EZ
148112005-12-23 Eli Zaretskii <eliz@gnu.org>
14812
889bf7c5
PA
14813 * linux-arm-low.c:
14814 * linux-arm-low.c:
14815 * inferiors.c:
14816 * i387-fp.h:
14817 * i387-fp.c:
14818 * gdbreplay.c:
14819 * regcache.c:
14820 * proc-service.c:
14821 * mem-break.h:
14822 * mem-break.c:
14823 * linux-x86-64-low.c:
14824 * linux-sh-low.c:
14825 * linux-s390-low.c:
14826 * linux-ppc64-low.c:
14827 * linux-ppc-low.c:
14828 * linux-mips-low.c:
14829 * linux-m68k-low.c:
14830 * linux-m32r-low.c:
14831 * linux-low.h:
14832 * linux-low.c:
14833 * linux-ia64-low.c:
14834 * linux-i386-low.c:
14835 * linux-crisv32-low.c:
14836 * thread-db.c:
14837 * terminal.h:
14838 * target.h:
14839 * target.c:
14840 * server.h:
14841 * server.c:
14842 * remote-utils.c:
14843 * regcache.h:
14844 * utils.c:
14845 * Makefile.in:
14846 * configure.ac:
6f0f660e
EZ
14847 * gdbserver.1: Add (C) after Copyright. Update the FSF
14848 address.
14849
9d1fb177
DJ
148502005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14851
14852 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14853 (arm_breakpoint_at): Recognize both breakpoints.
14854 (the_low_target): Use the correct breakpoint instruction.
14855
011a70c2
DJ
148562005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14857
14858 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14859 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14860 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14861 (the_low_target): Update.
14862
7fb85e41
AS
148632005-10-25 Andreas Schwab <schwab@suse.de>
14864
14865 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14866
14867 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14868 (ia64_num_regs): Reduce to 462.
14869
3db0444b
DJ
148702005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14871
14872 * acinclude.m4: Correct quoting.
14873 * aclocal.m4: Regenerated.
14874
14875 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14876 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14877 (thread_db_init): Call thread_db_err_str.
14878 * configure.ac: Check for TD_VERSION.
14879 * config.in, configure: Regenerated.
14880
bee0189a
DJ
148812005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14882
14883 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14884
e9d25b98
DJ
148852005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14886
14887 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14888 is not available. Define HAVE_PTRACE_GETREGS if it is.
14889 * config.in, configure: Regenerated.
14890 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14891 * linux-i386-low.c, linux-m68k-low.c: Update to use
14892 HAVE_PTRACE_GETREGS.
14893 * linux-low.c (regsets_fetch_inferior_registers)
14894 (regsets_store_inferior_registers): Only return 0 if we processed
14895 GENERAL_REGS.
14896 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14897 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14898
a06660f7
DJ
148992005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14900
14901 * inferiors.c (struct thread_info): Add gdb_id.
14902 (add_thread): Add gdb_id argument.
14903 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14904 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14905 calls to add_thread.
14906 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14907 * server.c (handle_query): Use thread_to_gdb_id.
14908 (handle_v_cont, main): Use gdb_id_to_thread_id.
14909 * server.h (add_thread): Update prototype.
14910 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14911 prototypes.
14912
5a1f5858
DJ
149132005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14914
14915 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14916 left-padded registers.
14917 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14918 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14919
e122f1f5
SE
149202005-07-01 Steve Ellcey <sje@cup.hp.com>
14921
14922 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14923 * configure: Regenerate.
14924 * config.in: Regenerate.
14925 * server.h (NEED_DECLARATION_STRERROR):
14926 Replace with !HAVE_DECL_STRERROR.
14927
d592fa2f
DJ
149282005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14929
14930 * linux-low.c (linux_wait, linux_send_signal): Don't test
14931 an unsigned long variable for > 0 if it could be MAX_ULONG.
14932 * server.c (myresume): Likewise.
14933 * target.c (set_desired_inferior): Likewise.
14934
ccbd4912
MK
149352005-06-13 Mark Kettenis <kettenis@gnu.org>
14936
14937 * configure.ac: Simplify and improve check for socklen_t.
14938 * configure, config.in: Regenerate.
14939
f450004a
DJ
149402005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14941
14942 * acconfig.h: Remove.
14943 * configure.ac: Add a test for socklen_t. Use three-argument
14944 AC_DEFINE throughout.
14945 * config.in: Regenerated using autoheader 2.59.
14946 * configure: Regenerated.
14947
14948 * gdbreplay.c (socklen_t): Provide a default.
14949 (remote_open): Use socklen_t.
14950 * remote-utils.c (socklen_t): Provide a default.
14951 (remote_open): Use socklen_t.
14952 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14953 unsigned char.
14954
14955 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14956 char for buffers.
14957 * linux-low.c (linux_read_memory, linux_write_memory)
14958 (linux_read_auxv): Likewise.
14959 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14960 (check_mem_write): Likewise.
14961 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14962 Likewise.
14963 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14964 (registers_from_string, register_data): Likewise.
14965 * server.c (handle_query, main): Likewise.
14966 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14967 (decode_M_packet): Likewise.
14968 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14969 * target.h (struct target_ops): Update read_memory, write_memory,
14970 and read_auxv.
14971 (read_inferior_memory, write_inferior_memory): Update.
14972 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14973 to unsigned char *.
14974 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14975 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14976 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14977 linux-s390-low.c, linux-sh-low.c: Update for changes in
14978 read_inferior_memory and the_low_target->breakpoint.
14979
eee84df1
DJ
149802005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14981
14982 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14983 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14984 * configure.srv: Add powerpc64-*-linux*.
14985 * linux-ppc64-low.c: New file.
14986
45b134e5
OF
149872005-05-23 Orjan Friberg <orjanf@axis.com>
14988
14989 * linux-cris-low.c: New file with support for CRIS.
14990 * linux-crisv32-low.c: Ditto for CRISv32.
14991 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14992 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 14993 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
14994 reg-crisv32.o, and reg-crisv32.c to make rules.
14995 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14996 recognized targets.
14997
48d93c75
UW
149982005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14999
15000 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15001 of sizeof (PTRACE_XFER_TYPE).
15002 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15003
e013ee27
OF
150042005-05-12 Orjan Friberg <orjanf@axis.com>
15005
889bf7c5 15006 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
15007 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15008 pointers for hardware watchpoint support.
15009 * linux-low.h (struct linux_target_ops): Ditto.
15010 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15011 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15012 to linux_target_ops.
15013 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15014 reply packet.
15015 * server.c (main): Recognize 'Z' and 'z' packets.
15016
b0ded00b
UW
150172005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15018
15019 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15020 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15021 (the_low_target): Add new members.
15022
8643e2ad
DJ
150232005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15024
15025 * proc-service.c (ps_lgetregs): Search all_processes instead of
15026 all_threads.
15027
fc620387
DJ
150282005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15029
15030 * server.c (start_inferior): Change return type to int.
15031 (attach_inferior): Change sigptr to int *.
15032 (handle_v_cont, handle_v_requests): Change signal to int *.
15033 (main): Change signal to int.
15034
150352005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
15036
15037 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15038 * configure.srv: Add m32r*-*-linux*.
15039 * linux-m32r-low.c: New file.
15040
e0e76420
DJ
150412005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15042
15043 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15044
a1928bad
DJ
150452005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15046
15047 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15048 Take unsigned long arguments for PIDs.
15049 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15050 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15051 (wait_for_sigstop, linux_resume_one_process)
15052 (regsets_fetch_inferior_registers, linux_send_signal)
15053 (linux_read_auxv): Likewise. Update the types of variables holding
15054 PIDs. Update format string specifiers.
15055 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15056 * remote-utils.c (prepare_resume_reply): Likewise.
15057 * server.c (cont_thread, general_thread, step_thread)
15058 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15059 unsigned long.
15060 (handle_query): Update format specifiers.
15061 (handle_v_cont, main): Use strtoul for thread IDs.
15062 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15063 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15064 (general_thread, step_thread, thread_from_wait)
15065 (old_thread_from_wait): Update.
15066 * target.h (struct thread_resume): Use unsigned long for THREAD.
15067 (struct target_ops): Use unsigned long for arguments to attach and
15068 thread_alive.
15069
dcdb98d2
DJ
150702005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15071
15072 * acinclude.m4: Include bfd/bfd.m4 directly.
15073 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15074 <agriffis@toolchain.org>.
15075 * aclocal.m4, configure: Regenerated.
15076
bec39cab
AC
150772005-01-07 Andrew Cagney <cagney@gnu.org>
15078
15079 * configure.ac: Rename configure.in, require autoconf 2.59.
15080 * configure: Re-generate.
15081
434c4c77
DJ
150822004-12-08 Daniel Jacobowitz <dan@debian.org>
15083
15084 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15085 LIBS when finished.
15086 * aclocal.m4: Regenerated.
15087 * configure: Regenerated.
15088
db1d3e1b
AS
150892004-11-21 Andreas Schwab <schwab@suse.de>
15090
15091 * linux-m68k-low.c (m68k_num_gregs): Define.
15092 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15093 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15094 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15095 (m68k_breakpoint_at): New. Add to the_low_target.
15096
15097 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15098 srv_linux_thread_db to yes.
15099
43360365
JB
151002004-10-20 Joel Brobecker <brobecker@gnat.com>
15101
15102 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15103 (ARCH_SET_FS): Likewise.
15104 (ARCH_GET_FS): Likewise.
15105 (ARCH_GET_GS): Likewise.
15106
fd500816
DJ
151072004-10-16 Daniel Jacobowitz <dan@debian.org>
15108
15109 * linux-i386-low.c (ps_get_thread_area): New.
15110 * linux-x86-64-low.c (ps_get_thread_area): New.
15111 * linux-low.c: Include <sys/syscall.h>.
15112 (linux_kill_one_process): Don't kill the first thread here.
15113 (linux_kill): Kill the first thread here.
15114 (kill_lwp): New function.
15115 (send_sigstop, linux_send_signal): Use it.
15116 * proc-service.c: Clean up #ifdefs.
15117 (fpregset_info): Delete.
15118 (ps_lgetregs): Update and enable implementation.
15119 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15120 implementations.
15121 * remote-utils.c (struct sym_cache, symbol_cache): New.
15122 (input_interrupt): Print a clearer message.
15123 (async_io_enabled): New variable.
15124 (enable_async_io, disable_async_io): Use it. Update comments.
15125 (look_up_one_symbol): Use the symbol cache.
15126 * thread-db.c (thread_db_look_up_symbols): New function.
15127 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15128
f6de3c42
DJ
151292004-10-16 Daniel Jacobowitz <dan@debian.org>
15130
15131 * configure.in: Test for -rdynamic.
15132 * configure: Regenerated.
15133 * Makefile (INTERNAL_LDFLAGS): New.
15134 (gdbserver, gdbreplay): Use it.
15135
2c0fc042
AC
151362004-09-02 Andrew Cagney <cagney@gnu.org>
15137
15138 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15139
075b3282
DJ
151402004-03-23 Daniel Jacobowitz <drow@mvista.com>
15141
15142 * linux-low.c (linux_wait): Clear all_processes list also.
15143
fa6a77dc
DJ
151442004-03-12 Daniel Jacobowitz <drow@mvista.com>
15145
15146 * linux-low.c: Include <errno.h>. Remove extern declaration of
15147 errno.
15148
6d782a97
DJ
151492004-03-12 Daniel Jacobowitz <drow@mvista.com>
15150
15151 * gdbreplay.c, server.h, utils.c: Update copyright years.
15152
3a7fb99b
DJ
151532004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15154
15155 * server.c (main): Print child status or termination signal from
15156 variable 'signal', not 'sig'.
15157
c3e735a6
DJ
151582004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15159
15160 * linux-low.c (linux_read_memory): Change return type to
15161 int. Check for and return error from ptrace().
15162 * target.c (read_inferior_memory): Change return type to int. Pass
15163 back return status from the_target->read_memory().
15164 * target.h (struct target_ops): Adapt *read_memory() prototype.
15165 Update comment.
15166 (read_inferior_memory): Adapt prototype.
15167 * server.c (main): Return an error packet if
15168 read_inferior_memory() returns an error.
15169
a59d1c82
DJ
151702004-03-04 Daniel Jacobowitz <drow@mvista.com>
15171
15172 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15173 Unify with other clean targets.
15174
dc3f8883
DJ
151752004-02-29 Daniel Jacobowitz <drow@mvista.com>
15176
15177 * server.c (handle_v_cont): Call set_desired_inferior.
15178
89a208da
DJ
151792004-02-29 Daniel Jacobowitz <drow@mvista.com>
15180
15181 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15182
62ea82f5
DJ
151832004-02-29 Daniel Jacobowitz <drow@mvista.com>
15184
15185 * linux-low.c (linux_wait): Unblock async I/O.
15186 (linux_resume): Block and enable async I/O.
15187 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15188 * server.h (block_async_io, unblock_async_io): Add prototypes.
15189
6910d122
DJ
151902004-02-29 Daniel Jacobowitz <drow@mvista.com>
15191
15192 * remote-utils.c (remote_open): Print a status notice after
15193 opening a TCP port.
15194 * server.c (attach_inferior): Print a status notice after
15195 attaching.
15196
151972004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
15198
15199 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15200
c89dc5d4
DJ
152012004-02-26 Daniel Jacobowitz <drow@mvista.com>
15202
15203 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15204 error packet.
15205 * server.c, target.h: Update copyright years.
15206
4b8dad4a
RM
152072004-02-25 Roland McGrath <roland@redhat.com>
15208
15209 * target.h (struct target_ops): New member `read_auxv'.
15210 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15211 * linux-low.c (linux_read_auxv): New function.
15212 (linux_target_ops): Initialize `read_auxv' member to that.
15213
d7446758
JB
152142004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15215
15216 Committed by Jim Blandy <jimb@redhat.com>.
15217
15218 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 15219 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
15220 instead of GPR_SIZE to distiguish s390 and s390x targets.
15221
5544ad89
DJ
152222004-01-31 Daniel Jacobowitz <drow@mvista.com>
15223
15224 * linux-low.c: Update copyright year.
15225 (check_removed_breakpoint): Clear pending_is_breakpoint.
15226 (linux_set_resume_request, linux_queue_one_thread)
15227 (resume_status_pending_p): New functions.
15228 (linux_continue_one_thread): Use process->resume.
15229 (linux_resume): Only resume threads if there are no pending events.
15230 * linux-low.h (struct process_info): Add resume request
15231 pointer.
15232
2a68b70e
DJ
152332004-01-30 Daniel Jacobowitz <drow@mvista.com>
15234
15235 * regcache.c (new_register_cache): Clear the allocated register
15236 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15237
64386c31
DJ
152382003-10-13 Daniel Jacobowitz <drow@mvista.com>
15239
15240 * linux-low.c (linux_resume): Take a struct thread_resume *
15241 argument.
15242 (linux_wait): Update call.
15243 (resume_ptr): New static variable.
15244 (linux_continue_one_thread): Renamed from
15245 linux_continue_one_process. Use resume_ptr.
15246 (linux_resume): Use linux_continue_one_thread.
15247 * server.c (handle_v_cont, handle_v_requests): New functions.
15248 (myresume): New function.
15249 (main): Handle 'v' case.
15250 * target.h (struct thread_resume): New type.
15251 (struct target_ops): Change argument of "resume" to struct
15252 thread_resume *.
15253 (myresume): Delete macro.
15254
c938e9b0
L
152552003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15256
15257 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15258 (uninstall): Support DESTDIR.
15259
7f313d07
BC
15260Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15261
15262 * configure.srv: Add xscale*linux copy of arm*linux entry.
15263
3b2fc2ea
DJ
152642003-07-24 Daniel Jacobowitz <drow@mvista.com>
15265
15266 * linux-arm-low.c (arm_reinsert_addr): New function.
15267 (the_low_target): Add arm_reinsert_addr.
15268
1c0a559e
MK
152692003-07-08 Mark Kettenis <kettenis@gnu.org>
15270
15271 * mem-break.c: Remove whitespace at end of file.
15272
43d5792c
DJ
152732003-06-28 Daniel Jacobowitz <drow@mvista.com>
15274
15275 * configure.in: Check whether we need to prototype strerror.
15276 * server.h: Optionally prototype strerror.
15277 * gdbreplay.c (perror_with_name): Use strerror.
15278 * linux-low.c (linux_attach_lwp): Use strerror.
15279 * utils.c (perror_with_name): Use strerror.
15280 * config.in, configure: Regenerated.
15281
c8a86edf
DJ
152822003-06-28 Daniel Jacobowitz <drow@mvista.com>
15283
15284 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15285 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15286
73d37363
DJ
152872003-06-20 Daniel Jacobowitz <drow@mvista.com>
15288
15289 * Makefile.in (SFILES): Update.
15290 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15291 low-sun3.c: Remove files.
15292
6ad8ae5c
DJ
152932003-06-17 Daniel Jacobowitz <drow@mvista.com>
15294
15295 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15296 (linux_detach_one_process, linux_detach): New functions.
15297 (linux_target_ops): Add linux_detach.
15298 * server.c (main): Handle 'D' packet.
15299 * target.h (struct target_ops): Add "detach" member.
15300 (detach_inferior): Define.
15301
1581182a
MK
153022003-06-13 Mark Kettenis <kettenis@gnu.org>
15303
15304 From Kelley Cook <kelleycook@wideopenwest.com>:
15305 * configure.srv: Accept i[34567]86 variants.
15306
e5379b03
DJ
153072003-06-05 Daniel Jacobowitz <drow@mvista.com>
15308
15309 * linux-low.c (linux_wait_for_event): Correct comment typos.
15310 (linux_resume_one_process): Call check_removed_breakpoint.
15311 (linux_send_signal): New function.
15312 (linux_target_ops): Add linux_send_signal.
15313 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15314 of kill.
15315 * target.h (struct target_ops): Add send_signal.
15316
2ff29de4
JB
153172003-05-29 Jim Blandy <jimb@redhat.com>
15318
15319 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15320 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15321 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15322 away part of the register's value.
15323
254787d4
DJ
153242003-03-26 Daniel Jacobowitz <drow@mvista.com>
15325
15326 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15327 (linux_wait_for_event, linux_init_signals): Likewise.
15328
94e10508
DJ
153292003-03-17 Daniel Jacobowitz <drow@mvista.com>
15330
15331 * configure.in: Check for stdlib.h.
15332 * configure: Regenerated.
15333 * config.in: Regenerated.
15334
4c0711e0
DJ
153352003-01-04 Andreas Schwab <schwab@suse.de>
15336
15337 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15338
ef66e766
AC
153392003-01-02 Andrew Cagney <ac131313@redhat.com>
15340
15341 * Makefile.in: Remove obsolete code.
15342
a1358604
DJ
153432002-11-20 Daniel Jacobowitz <drow@mvista.com>
15344
15345 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15346 defined(PT_FPR0_HI).
15347
23ce3b1c
DJ
153482002-11-17 Stuart Hughes <seh@zee2.com>
15349
15350 * linux-arm-low.c (arm_num_regs): Increase.
15351 (arm_regmap): Include status register.
15352
153532002-11-17 Daniel Jacobowitz <drow@mvista.com>
15354
15355 * linux-low.c (register_addr): Remove incorrect -1 check.
15356
a9fa9f7d
DJ
153572002-08-29 Daniel Jacobowitz <drow@mvista.com>
15358
15359 * linux-low.c (linux_create_inferior): Call setpgid. Return
15360 the new PID.
15361 (unstopped_p, linux_signal_pid): Remove.
15362 (linux_target_ops): Remove linux_signal_pid.
15363 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15364 global instead of target method.
15365 * target.h (struct target_ops): Remove signal_pid. Update comment
15366 for create_inferior.
15367 * server.c (signal_pid): New variable.
15368 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15369 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15370 (attach_inferior): Set signal_pid.
15371
17574093
DJ
153722002-08-23 Daniel Jacobowitz <drow@mvista.com>
15373
15374 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15375
153762002-08-20 Jim Blandy <jimb@redhat.com>
15377
15378 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15379 default for this.
15380
153812002-08-01 Andrew Cagney <cagney@redhat.com>
15382
15383 * Makefile.in: Make chill references obsolete.
15384
153852002-07-24 Kevin Buettner <kevinb@redhat.com>
15386
15387 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15388 * configure: Regenerate.
15389 * config.in: Regenerate.
15390
153912002-07-09 David O'Brien <obrien@FreeBSD.org>
15392
15393 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15394 (perror_with_name, remote_close, remote_open, expect, play): Static.
15395
153962002-07-04 Michal Ludvig <mludvig@suse.cz>
15397
4b8dad4a 15398 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
15399 byte offsets instead of an array of indexes.
15400 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15401
154022002-06-13 Daniel Jacobowitz <drow@mvista.com>
15403
15404 * regcache.c: Add comment.
15405
154062002-06-11 Daniel Jacobowitz <drow@mvista.com>
15407
15408 * thread-db.c: New file.
15409 * proc-service.c: New file.
15410 * acinclude.m4: New file.
15411 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15412 proc-service.o, and thread-db.o.
15413 (linux-low.o): Add USE_THREAD_DB.
15414 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15415 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15416 * aclocal.m4: Regenerated.
15417 * config.in: Regenerated.
15418 * configure: Regenerated.
15419 * configure.in: Check for proc_service.h, sys/procfs.h,
15420 thread_db.h, and linux/elf.h headrs.
15421 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15422 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15423 Check for -lthread_db and thread support.
15424 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15425 PowerPC, and SuperH.
15426 * i387-fp.c: Constify arguments.
15427 * i387-fp.h: Likewise.
15428 * inferiors.c: (struct thread_info): Renamed from
15429 `struct inferior_info'. Remove PID member. Use generic inferior
15430 list header. All uses updated.
15431 (inferiors, signal_pid): Removed.
15432 (all_threads): New variable.
15433 (get_thread): Define.
15434 (add_inferior_to_list): New function.
15435 (for_each_inferior): New function.
15436 (change_inferior_id): New function.
15437 (add_inferior): Removed.
15438 (remove_inferior): New function.
15439 (add_thread): New function.
15440 (free_one_thread): New function.
15441 (remove_thread): New function.
15442 (clear_inferiors): Use for_each_inferior and free_one_thread.
15443 (find_inferior): New function.
15444 (find_inferior_id): New function.
15445 (inferior_target_data): Update argument type.
15446 (set_inferior_target_data): Likewise.
15447 (inferior_regcache_data): Likewise.
15448 (set_inferior_regcache_data): Likewise.
15449 * linux-low.c (linux_bp_reinsert): Remove.
15450 (all_processes, stopping_threads, using_thrads)
15451 (struct pending_signals, debug_threads, pid_of): New.
15452 (inferior_pid): Replace with macro.
15453 (struct inferior_linux_data): Remove.
15454 (get_stop_pc, add_process): New functions.
15455 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15456 Use add_process and add_thread.
15457 (linux_attach_lwp): New function, based on old linux_attach. Use
15458 add_process and add_thread. Set stop_expected for new threads.
15459 (linux_attach): New function.
15460 (linux_kill_one_process): New function.
15461 (linux_kill): Kill all LWPs.
15462 (linux_thread_alive): Use find_inferior_id.
15463 (check_removed_breakpoints, status_pending_p): New functions.
15464 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15465 Update. Use WNOHANG. Wait for cloned processes also. Update process
15466 struct for the found process.
15467 (linux_wait_for_event): New function.
15468 (linux_wait): Use it. Support LWPs.
15469 (send_sigstop, wait_for_sigstop, stop_all_processes)
15470 (linux_resume_one_process, linux_continue_one_process): New functions.
15471 (linux_resume): Support LWPs.
15472 (REGISTER_RAW_SIZE): Remove.
15473 (fetch_register): Use register_size instead. Call supply_register.
15474 (usr_store_inferior_registers): Likewise. Call collect_register.
15475 Fix recursive case.
15476 (regsets_fetch_inferior_registers): Improve error message.
15477 (regsets_store_inferior_registers): Add debugging.
15478 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15479 (unstopped_p, linux_signal_pid): New functions.
15480 (linux_target_ops): Add linux_signal_pid.
15481 (linux_init_signals): New function.
15482 (initialize_low): Call it. Initialize using_threads.
15483 * regcache.c (inferior_regcache_data): Add valid
15484 flag.
15485 (get_regcache): Fetch registers lazily. Add fetch argument
15486 and update all callers.
15487 (regcache_invalidate_one, regcache_invalidate): New
15488 functions.
15489 (new_register_cache): Renamed from create_register_cache.
15490 Return the new regcache.
15491 (free_register_cache): Change argument to a void *.
15492 (registers_to_string, registers_from_string): Call get_regcache
15493 with fetch flag set.
15494 (register_data): Make static. Pass fetch flag to get_regcache.
15495 (supply_register): Call get_regcache with fetch flag clear.
15496 (collect_register): Call get_regcache with fetch flag set.
15497 (collect_register_as_string): New function.
15498 * regcache.h: Update.
15499 * remote-utils.c (putpkt): Flush after debug output and use
15500 stderr.
15501 Handle input interrupts while waiting for an ACK.
15502 (input_interrupt): Use signal_pid method.
15503 (getpkt): Flush after debug output and use stderr.
15504 (outreg): Use collect_register_as_string.
15505 (new_thread_notify, dead_thread_notify): New functions.
15506 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15507 and general_thread.
15508 (look_up_one_symbol): Flush after debug output.
15509 * server.c (step_thread, server_waiting): New variables.
15510 (start_inferior): Don't use signal_pid. Update call to mywait.
15511 (attach_inferior): Update call to mywait.
15512 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15513 (main): Don't fetch/store registers explicitly. Use
15514 set_desired_inferior. Support proposed ``Hs'' packet. Update
15515 calls to mywait.
15516 * server.h: Update.
15517 (struct inferior_list, struct_inferior_list_entry): New.
15518 * target.c (set_desired_inferior): New.
15519 (write_inferior_memory): Constify.
15520 (mywait): New function.
15521 * target.h: Update.
15522 (struct target_ops): New signal_pid method.
15523 (mywait): Removed macro, added prototype.
15524
15525 * linux-low.h (regset_func): Removed.
15526 (regset_fill_func, regset_store_func): New.
15527 (enum regset_type): New.
15528 (struct regset_info): Add type field. Use new operation types.
15529 (struct linux_target_ops): stop_pc renamed to get_pc.
15530 Add decr_pc_after_break and breakpoint_at.
15531 (get_process, get_thread_proess, get_process_thread)
15532 (strut process_info, all_processes, linux_attach_lwp)
15533 (thread_db_init): New.
15534
15535 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15536 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15537 (the_low_target): Add new members.
15538 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15539 (i386_store_fpxregset): Constify.
15540 (target_regsets): Add new kind identifier.
15541 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15542 (i386_set_pc): Add debugging.
15543 (i386_breakpoint_at): New function.
15544 (the_low_target): Add new members.
15545 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15546 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15547 (mips_breakpoint_at): New.
15548 (the_low_target): Add new members.
15549 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15550 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15551 (the_low_target): Add new members.
15552 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15553 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15554 (the_low_target): Add new members.
15555 * linux-x86-64-low.c (target_regsets): Add new kind
15556 identifier.
15557
155582002-05-15 Daniel Jacobowitz <drow@mvista.com>
15559
15560 From Martin Pool <mbp@samba.org>:
15561 * server.c (gdbserver_usage): New function.
15562 (main): Call it.
15563
155642002-05-14 Daniel Jacobowitz <drow@mvista.com>
15565
15566 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15567 stop_at -> stop_pc.
15568
155692002-05-04 Andrew Cagney <ac131313@redhat.com>
15570
15571 * Makefile.in: Remove obsolete code.
15572
155732002-04-24 Michal Ludvig <mludvig@suse.cz>
15574
15575 * linux-low.c (regsets_fetch_inferior_registers),
15576 (regsets_store_inferior_registers): Removed cast to int from
15577 ptrace() calls.
15578 * regcache.h: Added declaration of struct inferior_info.
15579
155802002-04-20 Daniel Jacobowitz <drow@mvista.com>
15581
15582 * inferiors.c (struct inferior_info): Add regcache_data.
15583 (add_inferior): Call create_register_cache.
15584 (clear_inferiors): Call free_register_cache.
15585 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15586 * regcache.c (struct inferior_regcache_data): New.
15587 (registers): Remove.
15588 (get_regcache): New function.
15589 (create_register_cache, free_register_cache): New functions.
15590 (set_register_cache): Don't initialize the register cache here.
15591 (registers_to_string, registers_from_string, register_data): Call
15592 get_regcache.
15593 * regcache.h: Add prototypes.
15594 * server.h: Likewise.
15595
155962002-04-20 Daniel Jacobowitz <drow@mvista.com>
15597
15598 * mem-break.c: New file.
15599 * mem-break.h: New file.
15600 * Makefile.in: Add mem-break.o rule; update server.h
15601 dependencies.
15602 * inferiors.c (struct inferior_info): Add target_data
15603 member.
15604 (clear_inferiors): Free target_data member if set.
15605 (inferior_target_data, set_inferior_target_data): New functions.
15606 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15607 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15608 * linux-low.c (linux_bp_reinsert): New variable.
15609 (struct inferior_linux_data): New.
15610 (linux_create_inferior): Use set_inferior_target_data.
15611 (linux_attach): Likewise. Call add_inferior.
15612 (linux_wait_for_one_inferior): New function.
15613 (linux_wait): Call it.
15614 (linux_write_memory): Add const.
15615 (initialize_low): Call set_breakpoint_data.
15616 * linux-low.h (struct linux_target_ops): Add breakpoint
15617 handling members.
15618 * server.c (attach_inferior): Remove extra add_inferior
15619 call.
15620 * server.h: Include mem-break.h. Update inferior.c
15621 prototypes.
15622 * target.c (read_inferior_memory)
15623 (write_inferior_memory): New functions.
15624 * target.h (read_inferior_memory)
15625 (write_inferior_memory): Change macros to prototypes.
15626 (struct target_ops): Update comments. Add const to write_memory
15627 definition.
15628
156292002-04-11 Daniel Jacobowitz <drow@mvista.com>
15630
15631 * linux-low.c (usr_store_inferior_registers): Support
15632 registers which are allowed to fail to store.
15633 * linux-low.h (linux_target_ops): Likewise.
15634 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15635 (ppc_cannot_store_register): FPSCR may not be storable.
15636
156372002-04-09 Daniel Jacobowitz <drow@mvista.com>
15638
15639 * server.h: Include <string.h> if HAVE_STRING_H.
15640 * ChangeLog: Correct paths in last ChangeLog entry.
15641
156422002-04-09 Daniel Jacobowitz <drow@mvista.com>
15643
15644 * linux-low.h: Remove obsolete prototypes.
15645 (struct linux_target_ops): New.
15646 (extern the_low_target): New.
15647 * linux-low.c (num_regs, regmap): Remove declarations.
15648 (register_addr): Use the_low_target explicitly.
15649 (fetch_register): Likewise.
15650 (usr_fetch_inferior_registers): Likewise.
15651 (usr_store_inferior_registers): Likewise.
15652 * linux-arm-low.c (num_regs): Remove.
15653 (arm_num_regs): Define.
15654 (arm_regmap): Renamed from regmap, made static.
15655 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15656 made static.
15657 (arm_cannot_store_register): Renamed from cannot_store_register,
15658 made static.
15659 (the_low_target): New.
15660 * linux-i386-low.c (num_regs): Remove.
15661 (i386_num_regs): Define.
15662 (i386_regmap): Renamed from regmap, made static.
15663 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15664 made static.
15665 (i386_cannot_store_register): Renamed from cannot_store_register,
15666 made static.
15667 (the_low_target): New.
15668 * linux-ia64-low.c (num_regs): Remove.
15669 (ia64_num_regs): Define.
15670 (ia64_regmap): Renamed from regmap, made static.
15671 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15672 made static.
15673 (ia64_cannot_store_register): Renamed from cannot_store_register,
15674 made static.
15675 (the_low_target): New.
15676 * linux-m68k-low.c (num_regs): Remove.
15677 (m68k_num_regs): Define.
15678 (m68k_regmap): Renamed from regmap, made static.
15679 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15680 made static.
15681 (m68k_cannot_store_register): Renamed from cannot_store_register,
15682 made static.
15683 (the_low_target): New.
15684 * linux-mips-low.c (num_regs): Remove.
15685 (mips_num_regs): Define.
15686 (mips_regmap): Renamed from regmap, made static.
15687 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15688 made static.
15689 (mips_cannot_store_register): Renamed from cannot_store_register,
15690 made static.
15691 (the_low_target): New.
15692 * linux-ppc-low.c (num_regs): Remove.
15693 (ppc_num_regs): Define.
15694 (ppc_regmap): Renamed from regmap, made static.
15695 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15696 made static.
15697 (ppc_cannot_store_register): Renamed from cannot_store_register,
15698 made static.
15699 (the_low_target): New.
15700 * linux-s390-low.c (num_regs): Remove.
15701 (s390_num_regs): Define.
15702 (s390_regmap): Renamed from regmap, made static.
15703 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15704 made static.
15705 (s390_cannot_store_register): Renamed from cannot_store_register,
15706 made static.
15707 (the_low_target): New.
15708 * linux-sh-low.c (num_regs): Remove.
15709 (sh_num_regs): Define.
15710 (sh_regmap): Renamed from regmap, made static.
15711 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15712 made static.
15713 (sh_cannot_store_register): Renamed from cannot_store_register,
15714 made static.
15715 (the_low_target): New.
15716 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15717 (the_low_target): New.
15718
157192002-04-09 Daniel Jacobowitz <drow@mvista.com>
15720
15721 * Makefile.in: Add stamp-h target.
15722 * configure.in: Create stamp-h.
15723 * configure: Regenerated.
15724
157252002-04-09 Daniel Jacobowitz <drow@mvista.com>
15726
15727 * inferiors.c: New file.
15728 * target.c: New file.
15729 * target.h: New file.
15730 * Makefile.in: Add target.o and inferiors.o. Update
15731 dependencies.
15732 * linux-low.c (inferior_pid): New static variable,
15733 moved from server.c.
15734 (linux_create_inferior): Renamed from create_inferior.
15735 Call add_inferior. Return 0 on success instead of a PID.
15736 (linux_attach): Renamed from myattach.
15737 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15738 (linux_thread_alive): Renamed from mythread_alive.
15739 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15740 child dies.
15741 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15742 (regsets_store_inferior_registers): Correct error message.
15743 Add missing ``return 0''.
15744 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15745 (linux_store_registers): Renamed from store_inferior_registers.
15746 (linux_read_memory): Renamed from read_inferior_memory.
15747 (linux_write_memory): Renamed from write_inferior_memory.
15748 (linux_target_ops): New structure.
15749 (initialize_low): Call set_target_ops ().
15750 * remote-utils.c (unhexify): New function.
15751 (hexify): New function.
15752 (input_interrupt): Send signals to ``signal_pid''.
15753 * server.c (inferior_pid): Remove.
15754 (start_inferior): Update create_inferior call.
15755 (attach_inferior): Call add_inferior.
15756 (handle_query): New function.
15757 (main): Call handle_query for `q' packets.
15758 * server.h: Include "target.h". Remove obsolete prototypes.
15759 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15760
157612002-04-09 Daniel Jacobowitz <drow@mvista.com>
15762
15763 * Makefile.in: Add WARN_CFLAGS. Update configury
15764 dependencies.
15765 * configure.in: Check for <string.h>
15766 * configure: Regenerate.
15767 * config.in: Regenerate.
15768 * gdbreplay.c: Include needed system headers.
15769 (remote_open): Remove strchr prototype.
15770 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15771 * regcache.c (supply_register): Change buf argument to const void *.
15772 (supply_register_by_name): Likewise.
15773 (collect_register): Change buf argument to void *.
15774 (collect_register_by_name): Likewise.
15775 * regcache.h: Add missing prototypes.
15776 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15777 * server.c (handle_query): New function.
15778 (attached): New static variable, moved out of main.
15779 (main): Quiet longjmp clobber warnings.
15780 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15781 * utils.c (error): Remove NORETURN.
15782 (fatal): Likewise.