]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
[GDBserver] Replicate src dir in build dir
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
60d6cfc9
YQ
12017-10-17 Yao Qi <yao.qi@linaro.org>
2
3 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
4 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
5 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
6 (arch-i386.o, arch-amd64.o): Remove rules.
7 (arch/%.o): New rule.
8 Update POSTCOMPILE and COMPILE.pre.
9 * configure.ac: Invoke AC_CONFIG_COMMANDS.
10 * configure: Re-generated.
11 * configure.srv: Replace arch-i386.o with arch/i386.o.
12 Replace arch-amd64.o with arch/amd64.o.
13
5bfda255
YQ
142017-10-16 Yao Qi <yao.qi@linaro.org>
15
16 * configure: Regenerated.
17
9c80ecd6
SM
182017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
19
20 * inferiors.h: (struct inferior_list): Remove.
21 (struct inferior_list_entry); Remove.
22 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
23 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
24 get_first_inferior): Remove.
25 (for_each_inferior, for_each_inferior_with_data, find_inferior,
26 find_inferior_id, find_inferior_in_random): Change signature.
27 * inferiors.c (all_threads): Change type to
28 std::list<thread_info *>.
29 (get_thread): Remove macro.
30 (find_inferior, find_inferior_id): Change signature, implement
31 using find_thread.
32 (find_inferior_in_random): Change signature, implement using
33 find_thread_in_random.
34 (for_each_inferior, for_each_inferior_with_data): Change
35 signature, implement using for_each_thread.
36 (add_inferior_to_list, remove_inferior): Remove.
37 (add_thread, get_first_thread, thread_of_pid,
38 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
39 (get_first_inferior, one_inferior_p, clear_inferior_list):
40 Remove.
41 (clear_inferiors, get_thread_process): Update.
42 * gdbthread.h: Include <list>.
43 (struct thread_info) <entry>: Remove field.
44 <id>: New field.
45 (all_threads): Change type to std::list<thread_info *>.
46 (get_first_inferior): Add doc.
47 (find_thread, for_each_thread, find_thread_in_random): New
48 functions.
49 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
50 * linux-arm-low.c (update_registers_callback): Update.
51 * linux-low.c (second_thread_of_pid_p): Update.
52 (kill_one_lwp_callback, linux_detach_lwp_callback,
53 delete_lwp_callback, status_pending_p_callback, same_lwp,
54 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
55 iterate_over_lwps, not_stopped_callback,
56 resume_stopped_resumed_lwps, count_events_callback,
57 select_singlestep_lwp_callback, select_event_lwp_callback,
58 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
59 suspend_and_send_sigstop_callback, wait_for_sigstop,
60 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
61 lwp_running, linux_set_resume_request, resume_status_pending_p,
62 need_step_over_p, start_step_over, linux_resume_one_thread,
63 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
64 reset_lwp_ptrace_options_callback): Update.
65 * linux-mips-low.c (update_watch_registers_callback): Update.
66 * regcache.c (regcache_invalidate_one, regcache_invalidate):
67 Update.
68 (free_register_cache_thread_one): Remove.
69 (regcache_release): Update.
70 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
71 handle_qxfer_threads_worker): Update.
72 (handle_query): Update, use list iterator.
73 (visit_actioned_threads, handle_pending_status,
74 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
75 clear_pending_status_callback, set_pending_status_callback,
76 find_status_pending_thread_callback, handle_status,
77 process_serial_event): Update.
78 * target.c (thread_search_callback): Update.
79 * thread-db.c (thread_db_get_tls_address): Update.
80 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
81 Update.
82 * win32-i386-low.c (update_debug_registers_callback): Update.
83 * win32-low.c (delete_thread_info, child_delete_thread,
84 continue_one_thread, suspend_one_thread,
85 get_child_debug_event): Adjust.
86
9179355e
SM
872017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
88
89 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
90 * inferiors.h: Include <list>.
91 (struct process_info) <entry>: Remove field.
92 <pid>: New field.
93 (pid_of): Change macro to function.
94 (ptid_of, lwpid_of): Remove macro.
95 (all_processes): Change type to std::list<process_info *>.
96 (ALL_PROCESSES): Remove macro.
97 (for_each_process, find_process): New function.
98 * inferiors.c (all_processes): Change type to
99 std::list<process_info *>.
100 (find_thread_process): Adjust.
101 (add_process): Likewise.
102 (remove_process): Likewise.
103 (find_process_pid): Likewise.
104 (get_first_process): Likewise.
105 (started_inferior_callback): Remove.
106 (have_started_inferiors_p): Adjust.
107 (attached_inferior_callback): Remove.
108 (have_attached_inferiors_p): Adjust.
109 * linux-low.c (check_zombie_leaders): Likewise.
110 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
111 (x86_linux_update_xmltarget): Adjust.
112 * server.c (handle_query): Likewise.
113 (gdb_reattached_process): Remove.
114 (handle_status): Adjust.
115 (kill_inferior_callback): Likewise.
116 (detach_or_kill_inferior): Remove.
117 (print_started_pid): Likewise.
118 (print_attached_pid): Likewise.
119 (detach_or_kill_for_exit): Update.
120 (process_serial_event): Likewise.
121 * linux-arm-low.c (arm_new_fork): Likewise.
122
c9cb8905
SM
1232017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
124
125 * dll.h: Include <list>.
126 (struct dll_info): Add constructor.
127 <entry>: Remove field.
128 (all_dlls): Change type to std::list<dll_info>.
129 * dll.c: Include <algorithm>.
130 (get_dll): Remove macro.
131 (all_dlls): Change type to std::list<dll_info *>.
132 (free_one_dll): Remove.
133 (match_dll): Likewise.
134 (loaded_dll): Adjust.
135 (unloaded_dll): Adjust to all_dlls type change, use
136 std::find_if. Inline code from match_dll.
137 (clear_dlls): Adjust to all_dlls type change.
138 * server.c (emit_dll_description): Remove.
139 (handle_qxfer_libraries): Adjust to all_dlls type change,
140 integrate emit_dll_description's functionality.
141
04ec7890
SM
1422017-10-12 Simon Marchi <simon.marchi@ericsson.com>
143
144 * linux-low.h (struct linux_target_ops) <delete_process>: New
145 field.
146 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
147 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
148 (struct linux_target_ops): Add delete_process callback.
149 * linux-arm-low.c (arm_delete_process): New.
150 (struct linux_target_ops): Add delete_process callback.
151 * linux-bfin-low.c (struct linux_target_ops): Likewise.
152 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
153 * linux-m32r-low.c (struct linux_target_ops): Likewise.
154 * linux-mips-low.c (mips_linux_delete_process): New.
155 (struct linux_target_ops): Add delete_process callback.
156 * linux-ppc-low.c (struct linux_target_ops): Likewise.
157 * linux-s390-low.c (struct linux_target_ops): Likewise.
158 * linux-sh-low.c (struct linux_target_ops): Likewise.
159 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
160 * linux-tile-low.c (struct linux_target_ops): Likewise.
161 * linux-x86-low.c (x86_linux_delete_process): New.
162 (struct linux_target_ops): Add delete_process callback.
163 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
164
466eecee
SM
1652017-10-12 Simon Marchi <simon.marchi@ericsson.com>
166
167 * linux-aarch64-low.c (the_low_target): Add thread delete
168 callback.
169 * linux-arm-low.c (arm_delete_thread): New function.
170 (the_low_target): Add thread delete callback.
171 * linux-bfin-low.c (the_low_target): Likewise.
172 * linux-crisv32-low.c (the_low_target): Likewise.
173 * linux-low.c (delete_lwp): Invoke delete_thread callback if
174 set.
175 * linux-low.h (struct linux_target_ops) <delete_thread>: New
176 field.
177 * linux-m32r-low.c (the_low_target): Add thread delete callback.
178 * linux-mips-low.c (mips_linux_delete_thread): New function.
179 (the_low_target): Add thread delete callback.
180 * linux-ppc-low.c (the_low_target): Likewise.
181 * linux-s390-low.c (the_low_target): Likewise.
182 * linux-sh-low.c (the_low_target): Likewise.
183 * linux-tic6x-low.c (the_low_target): Likewise.
184 * linux-tile-low.c (the_low_target): Likewise.
185 * linux-x86-low.c (the_low_target): Likewise.
186 * linux-xtensa-low.c (the_low_target): Likewise.
187
b79f7801
YZ
1882017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
189
190 * win32-low.c: Include "common-inferior.h".
191
bc3b087d
SDJ
1922017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
193
194 * inferiors.c (set_inferior_cwd): New function.
195 * server.c (handle_general_set): Handle QSetWorkingDir packet.
196 (handle_query): Inform that QSetWorkingDir is supported.
197 * win32-low.c (create_process): Pass the inferior's cwd to
198 CreateProcess.
199
d092c5a2
SDJ
2002017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
201
202 * inferiors.c (current_inferior_cwd): New global variable.
203 (get_inferior_cwd): New function.
204 * inferiors.h (struct process_info) <cwd>: New field.
205
7da0a886
SDJ
2062017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
207
208 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
209 (OBS): Add gdb_tilde_expand.o.
210
289a6840
SM
2112017-10-02 Simon Marchi <simon.marchi@ericsson.com>
212
213 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
214 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
215
256642e8
PA
2162017-09-29 Pedro Alves <palves@redhat.com>
217
218 * ax.c (gdb_parse_agent_expr): Constify.
219 * ax.h (gdb_parse_agent_expr): Constify.
220 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
221 Constify.
222 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
223 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
224 * remote-utils.h (read_ptid): Constify.
225 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
226 (process_point_options, process_serial_event): Constify.
227 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
228 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
229 (cmd_qtbuffer): Constify.
230
5b9ca4d4
PA
2312017-09-29 Pedro Alves <palves@redhat.com>
232
233 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
234 fails.
235
94c207e0
PA
2362017-09-29 Pedro Alves <palves@redhat.com>
237
238 * linux-low.c (handle_extended_wait): Pass parent thread instead
239 of process to thread_db_notice_clone.
240 * linux-low.h (thread_db_notice_clone): Replace parent process
241 parameter with parent thread parameter.
242 * thread-db.c (find_one_thread): Add comment.
243 (thread_db_notice_clone): Replace parent process parameter with
244 parent thread parameter. Temporarily switch to the parent thread.
245
75352e28
SDJ
2462017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
247
248 * gdbthread.h: Include "common-gdbthread.h".
249 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
250 "if" when validating the ptid.
251 * remote-utils.c: Include "gdbthread.h".
252 (prepare_resume_reply): Use "switch_to_thread".
253 * target.c (done_accessing_memory): Likewise.
254
ad339634
AA
2552017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
256
257 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
258 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
259 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
260 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
261 s390x-gs-linux64-ipa.o to ipa_obj.
262 * linux-s390-low.c (HWCAP_S390_GS): New define.
263 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
264 New functions.
265 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
266 (s390_arch_setup): Check for guarded-storage support and choose
267 appropriate tdesc.
268 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
269 init_registers_s390x_gs_linux64.
270 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
271 enum value.
272 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
273 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
274
cc4d742f
SM
2752017-09-22 Simon Marchi <simon.marchi@ericsson.com>
276
277 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
278
f6327dcb
KB
2792017-09-21 Kevin Buettner <kevinb@redhat.com>
280
281 * linux-low.h (struct lwp_info): Add new field, thread_handle.
282 (thread_db_thread_handle): Declare.
283 * linux-low.c (linux_target_ops): Initialize thread_handle.
284 * server.c (handle_qxfer_threads_worker): Add support for
285 "handle" attribute.
286 * target.h (struct target_ops): Add new function pointer,
287 thread_handle.
288 (target_thread_handle): Define.
289 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
290 field in lwp.
291 (thread_db_thread_handle): New function.
292
86299109
KB
2932017-09-21 Kevin Buettner <kevinb@redhat.com>
294
295 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
296 * linux-low.h (thread_db_notice_clone): Declare.
297 * thread-db.c (thread_db_notice_clone): New function.
298
f557a88a
PA
2992017-09-21 Pedro Alves <palves@redhat.com>
300
301 * server.c (gdb_read_memory, handle_status, process_serial_event)
302 (handle_serial_event, handle_target_event): Adjust to
303 set_desired_thread prototype change.
304 * target.c (set_desired_thread): Remove 'use_general' parameter
305 and adjust.
306 * target.h (set_desired_thread): Remove 'use_general' parameter.
307
223ffa71
TT
3082017-09-20 Tom Tromey <tom@tromey.com>
309
310 * target.c (target_terminal::terminal_state): Define.
311 (target_terminal::init): Rename from target_terminal_init.
312 (target_terminal::inferior): Rename from
313 target_terminal_inferior.
314 (target_terminal::ours): Rename from target_terminal_ours.
315 (target_terminal::ours_for_output, target_terminal::info): New.
316
04fd3ba9
SM
3172017-09-16 Simon Marchi <simon.marchi@ericsson.com>
318
319 * server.c (accumulate_file_name_length): Remove.
320 (emit_dll_description): Adjust to std::string change.
321 (handle_qxfer_libraries): Use std::string to hold document.
322
5e187554
SM
3232017-09-16 Simon Marchi <simon.marchi@ericsson.com>
324
325 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
326 return type of xml_escape_text.
327 * server.c (emit_dll_description): Likewise.
328
1526853e
SM
3292017-09-16 Simon Marchi <simon.marchi@ericsson.com>
330
331 * server.c (captured_main): Accept argument for --selftest.
332 Update run_tests call.
333 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
334 when registering selftests.
335
c4dfafab
SDJ
3362017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
337
338 * regcache.c (get_thread_regcache): Update code to use "std::vector"
339 instead of "VEC" for "target_desc.reg_defs".
340 (regcache_cpy): Likewise.
341 (registers_to_string): Likewise.
342 (registers_from_string): Likewise.
343 (find_regno): Likewise.
344 (supply_regblock): Likewise.
345 (regcache_raw_read_unsigned): Likewise.
346 * tdesc.c (init_target_desc): Likewise.
347 (tdesc_create_reg): Likewise.
348 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
349 (struct target_desc) <reg_defs>: Convert to "std::vector".
350 (target_desc): Do not initialize "reg_defs".
351 (~target_desc): Update code to use "std::vector" instead of "VEC"
352 for "target_desc.reg_defs".
353 (operator==): Likewise.
354
124aceb4
SM
3552017-09-15 Simon Marchi <simon.marchi@ericsson.com>
356
357 * inferiors.h (thread_to_gdb_id): Remove.
358 * inferiors.c (thread_to_gdb_id): Remove.
359 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
360 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
361 lynx_store_registers, lynx_read_memory, lynx_write_memory):
362 Likewise.
363 * nto-low.c (nto_fetch_registers, nto_store_registers,
364 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
365
96cde54f
SM
3662017-09-15 Simon Marchi <simon.marchi@ericsson.com>
367
368 * inferiors.h (gdb_id_to_thread_id): Remove.
369 * inferiors.c (gdb_id_to_thread_id): Remove.
370 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
371 removal. Move pid declaration closer to where it's used.
372
e8ca139e
SM
3732017-09-15 Simon Marchi <simon.marchi@ericsson.com>
374
375 * server.c (handle_detach): New function.
376 (process_serial_event): Move code out, call handle_detach.
377
f8a4e119
SM
3782017-09-15 Simon Marchi <simon.marchi@ericsson.com>
379
380 * server.c (require_running): Rename to ...
381 (require_running_or_return): ... this ...
382 (require_running_or_break): ... and this.
383 (handle_query, process_serial_event): Adjust.
384
0eb0a407
SM
3852017-09-15 Simon Marchi <simon.marchi@ericsson.com>
386
387 * linux-low.c (linux_set_resume_request): Remove unused
388 variables.
389
785922a5
SM
3902017-09-15 Simon Marchi <simon.marchi@ericsson.com>
391
392 * server.c (first_thread_of): Remove.
393 (process_serial_event): Replace usage of first_thread_of with
394 find_any_thread_of_pid.
395 * tracepoint.c (same_process_p): Remove.
396 (gdb_agent_about_to_close): Replace usage of same_process_p with
397 find_any_thread_of_pid.
398 * linux-x86-low.c (same_process_callback): Remove.
399 (x86_arch_setup_process_callback): Replace usage of
400 same_process_callback with find_any_thread_of_pid.
401 * thread-db.c (any_thread_of): Remove.
402 (switch_to_process): Replace usage of any_thread_of with
403 find_any_thread_of_pid.
404 * inferiors.c (thread_pid_matches_callback): Remove.
405 (find_thread_process): Adjust to use find_any_thread_of_pid.
406
a059f00c
SDJ
4072017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
408
409 * regcache.c (get_thread_regcache): Guard calls to "memset"
410 with "!VEC_empty".
411
cc397f3a
SDJ
4122017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
413
414 * linux-low.c (handle_extended_wait): Use
415 "allocate_target_description" instead of "XNEW".
416 * linux-x86-low.c (initialize_low_arch): Likewise.
417
22916b07
YQ
4182017-09-05 Yao Qi <yao.qi@linaro.org>
419
420 * configure.srv (srv_i386_regobj): Remove.
421 (srv_amd64_regobj): Remove.
422 (srv_regobj): Set it to "" for x86 non-linux targets.
423 * linux-x86-tdesc.c (i386_linux_read_description):
424 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
425 (init_registers_i386): Remove the declaration.
426 (tdesc_i386): Remove the declaration.
427 (lynx_i386_arch_setup): Call i386_create_target_description.
428 * nto-x86-low.c: Likewise.
429 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
430 [!__x86_64__]: include arch/i386.h.
431 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
432
38602d55
YQ
4332017-09-05 Yao Qi <yao.qi@linaro.org>
434
435 * configure.srv (srv_amd64_linux_xmlfiles): Remove
436 i386/amd64-XXX-linux from it.
437
44b886ff
YQ
4382017-09-05 Yao Qi <yao.qi@linaro.org>
439
440 * configure.srv: Empty srv_amd64_linux_regobj if $development is
441 false.
442 (ipa_amd64_linux_regobj): Remove.
443 (ipa_x32_linux_regobj): Remove.
444
b4570e4b
YQ
4452017-09-05 Yao Qi <yao.qi@linaro.org>
446
447 * Makefile.in (arch-amd64.o): New rule.
448 * configure.srv: Append arch-amd64.o.
449 * linux-amd64-ipa.c: Include common/x86-xstate.h.
450 (get_ipa_tdesc): Call amd64_linux_read_description.
451 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
452 and init_registers_amd64_XXX.
453 * linux-x86-low.c (x86_linux_read_description): Call
454 amd64_linux_read_description.
455 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
456 (initialize_low_arch): Don't call init_registers_x32_XXX and
457 init_registers_amd64_XXX.
458 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
459 and tdesc_amd64_XXX.
460 [__x86_64__] (amd64_tdesc_test): New function.
461 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
462 and init_registers_amd64_XXX.
463 * linux-x86-tdesc.c: Include arch/amd64.h.
464 (xcr0_to_tdesc_idx): New function.
465 (i386_linux_read_description): New function.
466 (amd64_get_ipa_tdesc_idx): New function.
467 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
468 (amd64_get_ipa_tdesc): Declare.
469
d1f28ea2
YQ
4702017-09-05 Yao Qi <yao.qi@linaro.org>
471
472 * configure.srv (srv_i386_linux_xmlfiles): Remove
473 i386/i386-XXX-linux.xml from it.
474
25a93583
YQ
4752017-09-05 Yao Qi <yao.qi@linaro.org>
476
477 * configure.srv: Set srv_i386_linux_regobj empty if $development
478 is false.
479 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
480 initialize_low_tdesc.
481 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
482 with #if initialize_low_tdesc.
483 * linux-x86-tdesc-selftest.c: New file.
484 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
485
5f035c07
YQ
4862017-09-05 Yao Qi <yao.qi@linaro.org>
487
488 * Makefile.in (arch-i386.o): New rule.
489 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
490 (x86_64-*-linux*): Likewise.
491 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
492 include arch/i386.h.
493 (i386_linux_read_description): Remove code and call
494 i386_create_target_description.
495 * tdesc.c (allocate_target_description): New function.
496 * tdesc.h (set_tdesc_architecture): Remove declaration.
497 (set_tdesc_osabi): Likewise.
498
0abe8a89
YQ
4992017-09-05 Yao Qi <yao.qi@linaro.org>
500
501 * linux-x86-tdesc.c: Don't include <inttypes.h>.
502 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
503 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
504 .xmltarget.
505 * server.c (get_features_xml): Call tdesc_get_features_xml.
506 * tdesc.c (set_tdesc_architecture): New function.
507 (set_tdesc_osabi): New function.
508 (tdesc_get_features_xml): New function.
509 (tdesc_create_feature): Add an argument.
510 * tdesc.h (struct target_desc) <features>: New field.
511 <arch, osabi>: New field.
512 (~target_desc): xfree features, arch, and osabi.
513 (target_desc::oerator==): Don't compare .xmltarget.
514 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
515 (set_tdesc_osabi): Likewise.
516 (tdesc_get_features_xml): Likewise.
517
0a188386
YQ
5182017-09-05 Yao Qi <yao.qi@linaro.org>
519
520 * linux-x86-tdesc.c: Include selftest.h.
521 (i386_tdesc_test): New function.
522 (initialize_low_tdesc): Call selftests::register_test.
523 * tdesc.h: Include regdef.h.
524 (target_desc): Override operator == and !=.
525
f49ff000
YQ
5262017-09-05 Yao Qi <yao.qi@linaro.org>
527
528 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
529 (ipa_obj): Likewise.
530 * linux-i386-ipa.c: Include common/x86-xstate.h
531 (get_ipa_tdesc): Call i386_linux_read_description.
532 (initialize_low_tracepoint): Don't call init_registers_XXX
533 functions, call initialize_low_tdesc instead.
534 * linux-x86-low.c (x86_linux_read_description): Call
535 i386_linux_read_description.
536 (initialize_low_arch): Don't call init_registers_i386_XXX
537 functions, call initialize_low_tdesc.
538 * linux-x86-tdesc.c: New file.
539 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
540 (i386_get_ipa_tdesc_idx): Declare.
541 (i386_get_ipa_tdesc): Declare.
542 (initialize_low_tdesc): Declare.
543
2b68ef2f
YQ
5442017-09-05 Yao Qi <yao.qi@linaro.org>
545
546 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
547 instead of 0.
548
f7000548
YQ
5492017-09-05 Yao Qi <yao.qi@linaro.org>
550
551 * Makefile.in (IPA_OBJS): Add vec-ipa.o
552 * regcache.c (get_thread_regcache): Use VEC_length.
553 (init_register_cache): Likewise.
554 (regcache_cpy): Likewise.
555 (registers_to_string): Iterate reg_defs via VEC_iterate.
556 (find_regno): Likewise.
557 (find_register_by_number): Use VEC_index.
558 (register_size): Call find_register_by_number.
559 (register_data): Call find_register_by_number.
560 (supply_regblock): Use VEC_length.
561 (regcache_raw_read_unsigned): Likewise.
562 * tdesc.c (init_target_desc): Iterate reg_defs via
563 VEC_iterate.
564 (default_description): Update initializer.
565 (copy_target_description): Don't update field num_registers.
566 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
567 <num_registers>: Remove.
568
50a421ac
SM
5692017-09-04 Simon Marchi <simon.marchi@ericsson.com>
570
571 * Makefile.in (.SECONDARY): Define target.
572
23fdd69e
SM
5732017-09-03 Simon Marchi <simon.marchi@ericsson.com>
574
575 * linux-low.c (linux_wait_1): Adjust.
576 * server.c (queue_stop_reply_callback): Adjust.
577
0a2dde4a
SDJ
5782017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
579
580 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
581 QEnvironmentUnset and QEnvironmentReset packets.
582 (handle_query): Inform remote that QEnvironmentHexEncoded,
583 QEnvironmentUnset and QEnvironmentReset are supported.
584
6afd337d
SM
5852017-08-25 Simon Marchi <simon.marchi@ericsson.com>
586
587 * inferiors.h (inferior_target_data): Rename to ...
588 (thread_target_data): ... this.
589 (inferior_regcache_data): Rename to ...
590 (thread_regcache_data): ... this.
591 (set_inferior_regcache_data): Rename to ...
592 (set_thread_regcache_data): ... this.
593 * inferiors.c (inferior_target_data): Rename to ...
594 (thread_target_data): ... this.
595 (inferior_regcache_data): Rename to ...
596 (thread_regcache_data): ... this.
597 (set_inferior_regcache_data): Rename to ...
598 (set_thread_regcache_data): ... this.
599 (free_one_thread): Update.
600 * linux-low.h (get_thread_lwp): Update.
601 * regcache.c (get_thread_regcache): Update.
602 (regcache_invalidate_thread): Update.
603 (free_register_cache_thread): Update.
604 * win32-i386-low.c (update_debug_registers_callback): Update.
605 (win32_get_current_dr): Update.
606 * win32-low.c (thread_rec): Update.
607 (delete_thread_info): Update.
608 (continue_one_thread): Update.
609 (suspend_one_thread): Update.
610
a160cc46
SM
6112017-08-24 Simon Marchi <simon.marchi@ericsson.com>
612
613 * inferiors.c (set_inferior_target_data): Remove.
614 * inferiors.h (set_inferior_target_data): Remove.
615
6d580b63
YQ
6162017-08-18 Yao Qi <yao.qi@linaro.org>
617
618 * Makefile.in (OBS): Add selftest.o.
619 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
620 * configure, config.in: Re-generated.
621 * server.c: Include common/sefltest.h.
622 (captured_main): Handle option --selftest.
623
f5a29eb0
YQ
6242017-08-09 Yao Qi <yao.qi@linaro.org>
625
626 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
627 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
628 i386-avx-mpx.o and i386-mmx.o.
629 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
630 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
631 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
632 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
633 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
634 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
635 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
636 i386/amd64-avx-mpx.xml.
637
57757c2f
YQ
6382017-08-09 Yao Qi <yao.qi@linaro.org>
639
640 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
641 and x32-avx-avx512.o.
642 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
643 i386/x32-avx-avx512.xml.
644
229d26fc
SM
6452017-07-26 Simon Marchi <simon.marchi@ericsson.com>
646
647 * tracepoint.h (enum class fast_tpoint_collect_result): New
648 enumeration.
649 (fast_tracepoint_collecting): Change return type to
650 fast_tpoint_collect_result.
651 * tracepoint.c (fast_tracepoint_collecting): Likewise.
652 * linux-low.h: Include tracepoint.h.
653 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
654 fast_tpoint_collect_result.
655 * linux-low.c (handle_tracepoints): Adjust.
656 (linux_fast_tracepoint_collecting): Change return type to
657 fast_tpoint_collect_result.
658 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
659 linux_wait_1, stuck_in_jump_pad_callback,
660 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
661 proceed_one_lwp): Adjust to type change.
662
2e1e43e1
YQ
6632017-07-10 Yao Qi <yao.qi@linaro.org>
664
665 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
666
adc764e7
YQ
6672017-06-29 Yao Qi <yao.qi@linaro.org>
668
669 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
670 Remove.
671 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
672
a206891a
SM
6732017-06-20 Simon Marchi <simon.marchi@ericsson.com>
674
675 * Makefile.in (IPA_OBJS): Sort and format one item per line.
676
9a6c7d9c
SDJ
6772017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
678
679 * linux-low.c (linux_create_inferior): Adjust code to access the
680 environment information via 'gdb_environ' class.
681 * lynx-low.c (lynx_create_inferior): Likewise.
682 * server.c (our_environ): Make it an instance of 'gdb_environ'.
683 (get_environ): Return a pointer to 'our_environ'.
684 (captured_main): Initialize 'our_environ'.
685 * server.h (get_environ): Adjust prototype.
686 * spu-low.c (spu_create_inferior): Adjust code to access the
687 environment information via 'gdb_environ' class.
688
ae3e2ccf
SM
6892017-06-17 Simon Marchi <simon.marchi@ericsson.com>
690
691 * linux-low.c (linux_read_memory, linux_write_memory): Remove
692 usage of "register" keyword.
693
3e019bdc
SM
6942017-06-17 Simon Marchi <simon.marchi@ericsson.com>
695
696 * configure: Re-generate.
697
8465943a
SM
6982017-06-17 Simon Marchi <simon.marchi@ericsson.com>
699
700 * configure: Re-generate.
701
cf0dd6f0
SM
7022017-06-17 Simon Marchi <simon.marchi@ericsson.com>
703
704 * Makefile.in (COMPILE.pre): Add "-x c++".
705
9845682b
SDJ
7062017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
707
708 * fork-child.c: Conditionally include <signal.h>.
709
aefd8b33
SDJ
7102017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
711
712 * server.c (handle_general_set): Handle new packet
713 "QStartupWithShell".
714 (handle_query): Add "QStartupWithShell" to the list of supported
715 packets.
716 (gdbserver_usage): Add help text explaining the
717 new "--startup-with-shell" and "--no-startup-with-shell" CLI
718 options.
719 (captured_main): Recognize and act upon the presence of the new
720 CLI options.
721
2090129c
SDJ
7222017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
723 Pedro Alves <palves@redhat.com>
724
725 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
726 * configure: Regenerate.
727 * configure.srv (srv_linux_obj): Add "fork-child.o" and
728 "fork-inferior.o".
729 (i[34567]86-*-lynxos*): Likewise.
730 (spu*-*-*): Likewise.
731 * fork-child.c: New file.
732 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
733 and "environ.h".
734 (linux_ptrace_fun): New function.
735 (linux_create_inferior): Adjust function prototype to reflect
736 change on "target.h". Adjust function code to use
737 "fork_inferior".
738 (linux_request_interrupt): Delete "signal_pid".
739 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
740 (lynx_ptrace_fun): New function.
741 (lynx_create_inferior): Adjust function prototype to reflect
742 change on "target.h". Adjust function code to use
743 "fork_inferior".
744 * nto-low.c (nto_create_inferior): Adjust function prototype and
745 code to reflect change on "target.h". Update comments.
746 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
747 "common-terminal.h" and "environ.h".
748 (terminal_fd): Moved to fork-child.c.
749 (old_foreground_pgrp): Likewise.
750 (restore_old_foreground_pgrp): Likewise.
751 (last_status): Make it global.
752 (last_ptid): Likewise.
753 (our_environ): New variable.
754 (startup_with_shell): Likewise.
755 (program_name): Likewise.
756 (program_argv): Rename to...
757 (program_args): ...this.
758 (wrapper_argv): New variable.
759 (start_inferior): Delete function.
760 (get_exec_wrapper): New function.
761 (get_exec_file): Likewise.
762 (get_environ): Likewise.
763 (prefork_hook): Likewise.
764 (post_fork_inferior): Likewise.
765 (postfork_hook): Likewise.
766 (postfork_child_hook): Likewise.
767 (handle_v_run): Update code to deal with arguments coming from the
768 remote host. Update calls from "start_inferior" to
769 "create_inferior".
770 (captured_main): Likewise. Initialize environment variable. Call
771 "have_job_control".
772 * server.h (post_fork_inferior): New prototype.
773 (get_environ): Likewise.
774 (last_status): Declare.
775 (last_ptid): Likewise.
776 (signal_pid): Likewise.
777 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
778 (spu_ptrace_fun): New function.
779 (spu_create_inferior): Adjust function prototype to reflect change
780 on "target.h". Adjust function code to use "fork_inferior".
781 * target.c (target_terminal_init): New function.
782 (target_terminal_inferior): Likewise.
783 (target_terminal_ours): Likewise.
784 * target.h: Include <vector>.
785 (struct target_ops) <create_inferior>: Update prototype.
786 (create_inferior): Update macro.
787 * utils.c (gdb_flush_out_err): New function.
788 * win32-low.c (win32_create_inferior): Adjust function prototype
789 and code to reflect change on "target.h".
790
043a4934
SDJ
7912017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
792
793 * inferiors.c (switch_to_thread): New function.
794
15652511
SDJ
7952017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
796
797 * Makefile.in (SFILE): Add "common/job-control.c".
798 (OBS): Add "job-control.o".
799
21ea5acd
SDJ
8002017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
801
802 * Makefile: Remove "@host_makefile_frag@".
803
e13cb306
PA
8042017-05-05 Pedro Alves <palves@redhat.com>
805
806 * configure: Regenerate.
807
c94fee56
SDJ
8082017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
809
810 * configure: Regenerate.
811
a0ff9e1a
SM
8122017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
813
814 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
815 software_single_step change of return type to
816 std::vector<CORE_ADDR>.
817 * linux-low.c (install_software_single_step_breakpoints):
818 Likewise.
819 * linux-low.h (install_software_single_step_breakpoints):
820 Likewise.
821
be628ab8
SDJ
8222017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
823
824 * remote-utils.c: Include "gdb_termios.h" instead of
825 "terminal.h".
826 * terminal.h: Delete file.
827
7c5ded6a
SDJ
8282017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
829
830 * server.c: Include <vector>.
831 <program_argv, wrapper_argv>: Convert to std::vector.
832 (start_inferior): Rewrite function to use C++.
833 (handle_v_run): Likewise. Update code that calculates the argv
834 based on the vRun packet; use C++.
835 (captured_main): Likewise.
836
436252de
SM
8372017-04-06 Simon Marchi <simon.marchi@ericsson.com>
838
839 * server.c (handle_v_cont): Initialize thread_resume::thread
840 with null_ptid.
841
9bf2a700
PA
8422017-04-05 Pedro Alves <palves@redhat.com>
843
844 * configure: Regenerate.
845
a121b7c1
PA
8462017-04-05 Pedro Alves <palves@redhat.com>
847
848 * gdbreplay.c (sync_error): Constify.
849 * linux-x86-low.c (push_opcode): Constify.
850
21c8a587
PA
8512017-04-05 Pedro Alves <palves@redhat.com>
852
853 * win32-low.c (get_child_debug_event)
854 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
855 Report TARGET_WAITKIND_SPURIOUS instead.
856
fb32b4f7
PA
8572017-04-05 Pedro Alves <palves@redhat.com>
858
859 * remote-utils.c (remote_prepare, remote_open): Constify.
860 * remote-utils.h (remote_prepare, remote_open): Constify.
861 * server.c (captured_main): Constify 'port' handling.
862
65dd1e59
SM
8632017-04-04 Simon Marchi <simon.marchi@ericsson.com>
864
865 * Makefile.in (clean): Clear .deps.
866
8fa5b777
SM
8672017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
868
869 * .gitignore: Remove generated files, replace with wildcard.
870 * (clean): Replace removal of generated files with wildcard.
871 (version.c): Replace with...
872 (version-generated.c): ...this.
873 (xml-builtin.c): Replace with...
874 (xml-builtin-generated.c): ...this.
875 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
876 (%.c: *regformats*): Replace with...
877 (%-generated.c: *regformats*): ...this.
878
a12e714b
MF
8792017-03-27 Max Filippov <jcmvbkbc@gmail.com>
880
881 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
882 (xtensa_fill_gregset): Call collect_register_by_name for
883 threadptr register.
884 (xtensa_store_gregset): Call supply_register_by_name for
885 threadptr register.
886
1a09b50a
MF
8872017-03-27 Max Filippov <jcmvbkbc@gmail.com>
888
889 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
890 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
891 (xtensa_store_gregset): Call supply_register for all registers in
892 a0_regnum..a0_regnum + C0_NREGS range.
893
1a01e7c6
SM
8942017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
895
896 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
897 (ax-ipa.o: ax.c): Remove.
898 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
899 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
900 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
901 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
902 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
903
36bc18a8
SM
9042017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
905
906 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
907 (print-utils-ipa.o: ../common/print-utils.c): Remove.
908 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
909 (errors-ipa.o: ../common/errors.c): Remove.
910 (format-ipa.o: ../common/format.c): Remove.
911 (common-utils-ipa.o: ../common/common-utils.c): Remove.
912
a8ebe3d5
SM
9132017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
914
915 * Makefile.in (%-ipa.o: %.c): New rule.
916 (tracepoint-ipa.o: tracepoint.c): Remove.
917 (utils-ipa.o: utils.c): Remove.
918 (remote-utils-ipa.o: remote-utils.c): Remove.
919 (regcache-ipa.o: regcache.c): Remove.
920 (i386-linux-ipa.o: i386-linux.c): Remove.
921 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
922 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
923 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
924 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
925 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
926 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
927 (amd64-linux-ipa.o: amd64-linux.c): Remove.
928 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
929 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
930 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
931 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
932 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
933 (aarch64-ipa.o: aarch64.c): Remove.
934 (s390-linux32-ipa.o: s390-linux32.c): Remove.
935 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
936 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
937 (s390-linux64-ipa.o: s390-linux64.c): Remove.
938 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
939 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
940 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
941 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
942 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
943 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
944 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
945 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
946 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
947 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
948 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
949 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
950 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
951 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
952 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
953 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
954 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
955 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
956 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
957 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
958 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
959 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
960 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
961 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
962 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
963 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
964 (tdesc-ipa.o: tdesc.c): Remove.
965 (x32-linux-ipa.o: x32-linux.c): Remove.
966 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
967 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
968
50cfacb7
SM
9692017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
970
971 * Makefile.in (%.o: ../arch/%.c): New rule.
972 (arm.o: ../arch/arm.c): Remove.
973 (arm-linux.o: ../arch/arm-linux.c): Remove.
974 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
975 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
976
c5a22423
SM
9772017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
978
979 * Makefile.in (%.o: ../nat/%.c): New rule.
980 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
981 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
982 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
983 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
984 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
985 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
986 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
987 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
988 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
989 (linux-personality.o: ../nat/linux-personality.c): Remove.
990 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
991 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
992 (x86-linux.o: ../nat/x86-linux.c): Remove.
993 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
994 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
995
6bda016b
SM
9962017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
997
998 * Makefile.in (%.o: ../common/%.c): New rule.
999 (signals.o: ../common/signals.c): Remove.
1000 (print-utils.o: ../common/print-utils.c): Remove.
1001 (rsp-low.o: ../common/rsp-low.c): Remove.
1002 (common-utils.o: ../common/common-utils.c): Remove.
1003 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1004 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1005 (vec.o: ../common/vec.c): Remove.
1006 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1007 (xml-utils.o: ../common/xml-utils.c): Remove.
1008 (ptid.o: ../common/ptid.c): Remove.
1009 (buffer.o: ../common/buffer.c): Remove.
1010 (format.o: ../common/format.c): Remove.
1011 (filestuff.o: ../common/filestuff.c): Remove.
1012 (agent.o: ../common/agent.c): Remove.
1013 (errors.o: ../common/errors.c): Remove.
1014 (environ.o: ../common/environ.c): Remove.
1015 (common-debug.o: ../common/common-debug.c): Remove.
1016 (cleanups.o: ../common/cleanups.c): Remove.
1017 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1018 (fileio.o: ../common/fileio.c): Remove.
1019 (common-regcache.o: ../common/common-regcache.c): Remove.
1020 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1021 (new-op.o: ../common/new-op.c): Remove.
1022 (btrace-common.o: ../common/btrace-common.c): Remove.
1023
21122961
SM
10242017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1025
1026 * Makefile.in (%.o: ../target/%.c): New rule.
1027 (waitstatus.o: ../target/waitstatus.c): Remove.
1028
c362e621
SM
10292017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1030
1031 * Makefile.in
1032 (%.c: ../regformats/%.dat,
1033 (%.c: ../regformats/arm/%.dat,
1034 (%.c: ../regformats/i386/%.dat,
1035 (%.c: ../regformats/rs6000/%.dat): New rules.
1036 (aarch64.c): Remove.
1037 (reg-arm.c): Remove.
1038 (arm-with-iwmmxt.c): Remove.
1039 (arm-with-vfpv2.c): Remove.
1040 (arm-with-vfpv3.c): Remove.
1041 (arm-with-neon.c): Remove.
1042 (reg-bfin.c): Remove.
1043 (reg-cris.c): Remove.
1044 (reg-crisv32.c): Remove.
1045 (i386.c): Remove.
1046 (i386-linux.c): Remove.
1047 (i386-avx.c): Remove.
1048 (i386-avx-linux.c): Remove.
1049 (i386-avx-avx512.c): Remove.
1050 (i386-avx-avx512-linux.c): Remove.
1051 (i386-mpx.c): Remove.
1052 (i386-mpx-linux.c): Remove.
1053 (i386-avx-mpx-avx512-pku.c): Remove.
1054 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1055 (i386-avx-mpx.c): Remove.
1056 (i386-avx-mpx-linux.c): Remove.
1057 (i386-mmx.c): Remove.
1058 (i386-mmx-linux.c): Remove.
1059 (reg-ia64.c): Remove.
1060 (reg-m32r.c): Remove.
1061 (reg-m68k.c): Remove.
1062 (reg-cf.c): Remove.
1063 (mips-linux.c): Remove.
1064 (mips-dsp-linux.c): Remove.
1065 (mips64-linux.c): Remove.
1066 (mips64-dsp-linux.c): Remove.
1067 (nios2-linux.c): Remove.
1068 (powerpc-32.c): Remove.
1069 (powerpc-32l.c): Remove.
1070 (powerpc-altivec32l.c): Remove.
1071 (powerpc-cell32l.c): Remove.
1072 (powerpc-vsx32l.c): Remove.
1073 (powerpc-isa205-32l.c): Remove.
1074 (powerpc-isa205-altivec32l.c): Remove.
1075 (powerpc-isa205-vsx32l.c): Remove.
1076 (powerpc-e500l.c): Remove.
1077 (powerpc-64l.c): Remove.
1078 (powerpc-altivec64l.c): Remove.
1079 (powerpc-cell64l.c): Remove.
1080 (powerpc-vsx64l.c): Remove.
1081 (powerpc-isa205-64l.c): Remove.
1082 (powerpc-isa205-altivec64l.c): Remove.
1083 (powerpc-isa205-vsx64l.c): Remove.
1084 (s390-linux32.c): Remove.
1085 (s390-linux32v1.c): Remove.
1086 (s390-linux32v2.c): Remove.
1087 (s390-linux64.c): Remove.
1088 (s390-linux64v1.c): Remove.
1089 (s390-linux64v2.c): Remove.
1090 (s390-te-linux64.c): Remove.
1091 (s390-vx-linux64.c): Remove.
1092 (s390-tevx-linux64.c): Remove.
1093 (s390x-linux64.c): Remove.
1094 (s390x-linux64v1.c): Remove.
1095 (s390x-linux64v2.c): Remove.
1096 (s390x-te-linux64.c): Remove.
1097 (s390x-vx-linux64.c): Remove.
1098 (s390x-tevx-linux64.c): Remove.
1099 (tic6x-c64xp-linux.c): Remove.
1100 (tic6x-c64x-linux.c): Remove.
1101 (tic6x-c62x-linux.c): Remove.
1102 (reg-sh.c): Remove.
1103 (reg-sparc64.c): Remove.
1104 (reg-spu.c): Remove.
1105 (amd64.c): Remove.
1106 (amd64-linux.c): Remove.
1107 (amd64-avx.c): Remove.
1108 (amd64-avx-linux.c): Remove.
1109 (amd64-avx-avx512.c): Remove.
1110 (amd64-avx-avx512-linux.c): Remove.
1111 (amd64-mpx.c): Remove.
1112 (amd64-mpx-linux.c): Remove.
1113 (amd64-avx-mpx-avx512-pku.c): Remove.
1114 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1115 (amd64-avx-mpx.c): Remove.
1116 (amd64-avx-mpx-linux.c): Remove.
1117 (x32.c): Remove.
1118 (x32-linux.c): Remove.
1119 (x32-avx.c): Remove.
1120 (x32-avx-linux.c): Remove.
1121 (x32-avx-avx512.c): Remove.
1122 (x32-avx-avx512-linux.c): Remove.
1123 (reg-xtensa.c): Remove.
1124 (reg-tilegx.c): Remove.
1125 (reg-tilegx32.c): Remove.
1126
1672e0d9
SDJ
11272017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1128
1129 * Makefile.in (SFILES): Add "common/environ.c".
1130 (OBJS): Add "common/environ.h".
1131
239b6d10
WT
11322017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1133
1134 * configure.ac: Check if the fs_base and gs_base members of
1135 `struct user_regs_struct' exist.
1136 * config.in: Regenerated.
1137 * configure: Likewise.
1138
694b382c
AT
11392017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1140
1141 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1142 target_read_memory.
1143 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1144 (get_next_pcs_syscall_next_pc): Likewise.
1145
7dc53023
LM
11462016-12-23 Luis Machado <lgustavo@codesourcery.com>
1147
1148 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1149 * nto-x86-low.c: Likewise.
1150
ad02e4fe
SM
11512016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1152
1153 * Makefile.in: Include disable-implicit-rules.mk.
1154
dcb07cfa
PA
11552016-11-23 Pedro Alves <palves@redhat.com>
1156
1157 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1158 (debug_vprintf): Use std::chrono::steady_clock instead of
1159 gettimeofday. Use '.' instead of ':'.
1160 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1161 (get_timestamp): Use std::chrono::steady_clock instead of
1162 gettimeofday.
1163
8629c02c
SM
11642016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1165
1166 * Makefile.in: Fix whitespace formatting.
1167
b593ecca
SM
11682016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1169
1170 * Makefile.in (SFILES, OBS): Flatten list and order
1171 alphabetically.
1172
9986ba08
PA
11732016-11-23 Pedro Alves <palves@redhat.com>
1174
1175 * event-loop.c (handle_file_event): Use warning.
1176 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1177 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1178 Use warning.
1179
4eefa7bc
PA
11802016-11-23 Pedro Alves <palves@redhat.com>
1181
1182 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1183 output.
1184 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1185 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1186 debug_printf and debug_flush for debug output.
1187 * server.c (handle_general_set): Likewise.
1188 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1189 output.
1190
5443506e
SM
11912016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1192
1193 * Makefile.in (.c.o): Replace rule with ...
1194 (%.o: %.c): ... this one.
1195
3b165252
SM
11962016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1197
1198 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1199 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1200 make.
1201 * configure.ac: Remove checks for the make program.
1202 * configure: Re-generate.
1203
0bcda685
PA
12042016-10-28 Pedro Alves <palves@redhat.com>
1205
1206 * Makefile.in (CXX_DIALECT): Get from configure.
1207 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1208 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1209 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1210 * config.in: Regenerate.
1211 * configure: Regenerate.
1212
c3805894
YQ
12132016-10-27 Yao Qi <yao.qi@linaro.org>
1214
1215 * linux-low.c (linux_supports_range_stepping): Return true if
1216 can_software_single_step return true.
1217
89342618
YQ
12182016-10-27 Yao Qi <yao.qi@linaro.org>
1219
1220 * inferiors.c (find_inferior_in_random): New function.
1221 * inferiors.h (find_inferior_in_random): Declare.
1222 * linux-low.c (linux_wait_for_event_filtered): Call
1223 find_inferior_in_random instead of find_inferior.
1224
e3652c84
YQ
12252016-10-27 Yao Qi <yao.qi@linaro.org>
1226
1227 * linux-low.c (linux_wait_1): If single-step breakpoints are
1228 inserted, remove them.
1229
5a04c4cf
PA
12302016-10-26 Pedro Alves <palves@redhat.com>
1231
1232 * linux-low.c (handle_extended_wait): Link parent/child fork
1233 threads.
1234 (linux_wait_1): Unlink them.
1235 (linux_set_resume_request): Ignore resume requests for
1236 already-resumed and unhandled fork child threads.
1237 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1238 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1239 New functions.
1240 (handle_v_requests) <vCont>: Don't call require_running.
1241 * server.h (in_queued_stop_replies): New declaration.
1242
cb93dc7f
YQ
12432016-10-24 Yao Qi <yao.qi@linaro.org>
1244
1245 PR server/20733
1246 * linux-aarch64-low.c (append_insns): Cast the return value to
1247 'uint32_t *'.
1248
a1078bea
YQ
12492016-10-10 Yao Qi <yao.qi@linaro.org>
1250
1251 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1252
1fb77080
SDJ
12532016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1254
1255 * target.c (target_supports_multi_process): New function, moved
1256 from...
1257 * target.h (target_supports_multi_process): ... here. Remove
1258 macro.
1259
39b5a3b9
TT
12602016-10-05 Tom Tromey <tom@tromey.com>
1261
1262 PR remote/20655:
1263 * tracepoint.c (handle_tracepoint_bkpts): Check
1264 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1265
c1d0b70a
YQ
12662016-10-05 Yao Qi <yao.qi@linaro.org>
1267
1268 * configure.srv: Update the path of arm-*.xml files.
1269
0a69eedb
YQ
12702016-10-05 Terry Guo <terry.guo@arm.com>
1271 Yao Qi <yao.qi@linaro.org>
1272
1273 * Makefile.in: Adjust the path of rules.
1274 * configure.srv: Update the path of xml files.
1275 * regformats/arm-with-iwmmxt.dat: Regenerated.
1276 * regformats/arm-with-neon.dat: Likewise.
1277 * regformats/arm-with-vfpv2.dat: Likewise.
1278 * regformats/arm-with-vfpv3.dat Likewise.
1279
17e16485
YQ
12802016-09-30 Yao Qi <yao.qi@linaro.org>
1281
1282 PR gdbserver/20627
1283 * target.c (target_stop_and_wait): Don't call
1284 target_continue_no_signal, use resume_stop instead.
1285
edeeb602
YQ
12862016-09-26 Yao Qi <yao.qi@linaro.org>
1287
1288 * linux-low.c (linux_wait_1): Call debug_exit.
1289
503b1c39
PA
12902016-09-23 Pedro Alves <palves@redhat.com>
1291
1292 * Makefile.in (SFILES): Add common/new-op.c.
1293 (OBS): Add common/new-op.o.
1294 (new-op.o): New rule.
1295
74172ecf
SM
12962016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1297
1298 * .gitinore: Ignore more files.
1299
fc6cda2e
YQ
13002016-09-21 Yao Qi <yao.qi@linaro.org>
1301
1302 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1303 23.
1304
bc1e6c81
SDJ
13052016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1306
1307 * server.c (start_inferior): Call target_mourn_inferior instead of
1308 mourn_inferior; pass ptid_t argument to it.
1309 (resume): Likewise.
1310 (handle_target_event): Likewise.
1311 * target.c (target_mourn_inferior): New function.
1312 * target.h (mourn_inferior): Delete macro.
1313
0e00e962
AA
13142016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1315
1316 * linux-low.c (lwp_is_stepping): New function.
1317
1d8cb77d
CL
13182016-09-06 Carl Love <cel@us.ibm.com>
1319
1320 * server.c (start_inferior): Fixed comment, requested comment change
1321 didn't get updated correctly. Removed reference to ptrace () call as
1322 it is only true on Linux systems.
1323
7313bced
CL
13242016-09-06 Carl Love <cel@us.ibm.com>
1325
1326 * server.c (start_inferior): Do not call
1327 function target_post_create_inferior () if the
1328 inferior process has already exited.
1329
cf6de44d
PA
13302016-09-05 Pedro Alves <palves@redhat.com>
1331
1332 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1333 (COMPILE.pre, CC_LD): Use CXX directly.
1334 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1335 * acinclude.m4: Don't include build-with-cxx.m4.
1336 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1337 * configure: Regenerate.
1338
c1da6748
AT
13392016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1340
1341 PR gdb/19495
1342 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1343 call writing data to own_buf.
1344
f2b9e3df
SDJ
13452016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1346
1347 * target.c (mywait): Call target_wait instead of
1348 the_target->wait.
1349 (target_wait): New function.
1350
049a8570
SDJ
13512016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1352
1353 * server.c (start_inferior): New variable 'ptid'. Replace calls
1354 to the_target->resume by target_continue{,_no_signal}, depending
1355 on the case.
1356 * target.c (target_stop_and_wait): Call target_continue_no_signal
1357 instead of the_target->resume.
1358 (target_continue): New function.
1359
3aa5cfa0
AT
13602016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1361
1362 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1363
754653a7
AZ
13642016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1365
1366 PR server/20491
1367 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1368 ps_prochandle.
1369 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1370 * linux-arm-low.c (ps_get_thread_area): Likewise.
1371 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1372 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1373 * linux-mips-low.c (ps_get_thread_area): Likewise.
1374 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1375 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1376 * linux-x86-low.c (ps_get_thread_area): Likewise.
1377 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1378
ed036b40
PA
13792016-08-19 Pedro Alves <palves@redhat.com>
1380
1381 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1382
c8ef42ee
PA
13832016-08-19 Pedro Alves <palves@redhat.com>
1384
1385 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1386 comment. Use memcpy instead of casting through unsigned long.
1387
9c235a72
PA
13882016-08-19 Pedro Alves <palves@redhat.com>
1389
1390 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1391 allocating around 0x80000000.
1392
201506da
PA
13932016-08-19 Pedro Alves <palves@redhat.com>
1394
1395 PR gdb/20415
1396 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1397 (x32-avx512-linux-ipa.o): New rules.
1398 * configure.ac (x86_64-*-linux*): New x32 check.
1399 * configure.srv (ipa_x32_linux_regobj): New.
1400 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1401 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1402 descriptions.
1403 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1404 descriptions.
1405 * configure: Regenerate.
1406
f348d89a
PA
14072016-08-09 Pedro Alves <palves@redhat.com>
1408
1409 PR gdb/18653
1410 * Makefile.in (OBS): Add signals-state-save-restore.o.
1411 (signals-state-save-restore.o): New rule.
1412 * config.in: Regenerate.
1413 * configure: Regenerate.
1414 * linux-low.c: Include "signals-state-save-restore.h".
1415 (linux_create_inferior): Call
1416 restore_original_signals_state.
1417 * server.c: Include "dispositions-save-restore.h".
1418 (captured_main): Call save_original_signals_state.
1419
1baf5149
PA
14202016-08-05 Pedro Alves <palves@redhat.com>
1421
1422 * configure: Regenerate.
1423
fcd4a73d
YQ
14242016-08-04 Yao Qi <yao.qi@linaro.org>
1425
1426 * linux-low.c (regsets_fetch_inferior_registers): Check
1427 errno is ESRCH or not.
1428
979659d0
YQ
14292016-08-02 Yao Qi <yao.qi@linaro.org>
1430
1431 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1432 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1433 (thread_db_load_search): Update.
1434 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1435 td_ta_set_event and td_ta_event_getmsg.
1436
6598661d
PA
14372016-07-26 Pedro Alves <palves@redhat.com>
1438
1439 PR server/20414
1440 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1441 of unsigned long for 64-bit registers and use uint32_t instead of
1442 unsigned int for 32-bit registers.
1443
9cf12d57
PA
14442016-07-26 Pedro Alves <palves@redhat.com>
1445
1446 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1447 to 'ptrace'.
1448
305450ed
TT
14492016-07-21 Tom Tromey <tom@tromey.com>
1450
1451 * configure: Rebuild.
1452
2583da7c
YQ
14532016-07-21 Yao Qi <yao.qi@linaro.org>
1454
1455 * mem-break.c (find_gdb_breakpoint): Cast bp to
1456 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1457
21536b36
YQ
14582016-07-21 Yao Qi <yao.qi@linaro.org>
1459
1460 * server.c (handle_v_requests): Support s and S actions
1461 if target_supports_software_single_step return true.
1462
8901d193
YQ
14632016-07-21 Yao Qi <yao.qi@linaro.org>
1464
1465 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1466 is resume_step, call maybe_hw_step.
1467 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1468 and unstop them.
1469 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1470 breakpoints or not.
1471 (proceed_one_lwp): If resume request is resume_step, install
1472 reinsert breakpoints and call maybe_hw_step.
1473
0e9a339e
YQ
14742016-07-21 Yao Qi <yao.qi@linaro.org>
1475
1476 * linux-low.c (proceed_one_lwp): Declare.
1477 (linux_resume_one_thread): Remove local variable 'step'.
1478 Lift code enqueue signal. Call proceed_one_lwp instead of
1479 linux_resume_one_lwp.
1480
4281b351
YQ
14812016-07-21 Yao Qi <yao.qi@linaro.org>
1482
1483 * linux-low.c (linux_resume_one_thread): Call
1484 enqueue_pending_signal.
1485
984a2c04
YQ
14862016-07-21 Yao Qi <yao.qi@linaro.org>
1487
1488 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1489 * inferiors.c (do_restore_current_thread_cleanup): New function.
1490 (make_cleanup_restore_current_thread): Likewise.
1491 * linux-low.c (install_software_single_step_breakpoints): Call
1492 make_cleanup_restore_current_thread. Switch current_thread to
1493 thread.
1494
bec903c9
YQ
14952016-07-21 Yao Qi <yao.qi@linaro.org>
1496
1497 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1498 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1499 (clone_one_breakpoint): Likewise.
1500 (delete_reinsert_breakpoints): Change parameter to thread.
1501 Callers updated.
1502 (has_reinsert_breakpoints): Likewise.
1503 (uninsert_reinsert_breakpoints): Likewise.
1504 (reinsert_reinsert_breakpoints): Likewise.
1505 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1506 (delete_reinsert_breakpoints): Likewise.
1507 (reinsert_reinsert_breakpoints): Likewise.
1508 (uninsert_reinsert_breakpoints): Likewise.
1509 (has_reinsert_breakpoints): Likewise.
1510
63c40ec7
YQ
15112016-07-21 Yao Qi <yao.qi@linaro.org>
1512
1513 * inferiors.c (get_thread_process): Make parameter const.
1514 * inferiors.h (get_thread_process): Update declaration.
1515 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1516 Add new parameters child_thread and parent_thread. Callers
1517 updated.
1518 * mem-break.h (clone_all_breakpoints): Update declaration.
1519
9aa76cd0
YQ
15202016-07-21 Yao Qi <yao.qi@linaro.org>
1521
1522 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1523 <command_list, handler>: Remove.
1524 (struct gdb_breakpoint): New.
1525 (struct other_breakpoint): New.
1526 (struct reinsert_breakpoint): New.
1527 (is_gdb_breakpoint): New function.
1528 (any_persistent_commands): Update command_list if
1529 is_gdb_breakpoint returns true.
1530 (set_breakpoint): Create breakpoints according to their types.
1531 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1532 (set_gdb_breakpoint_1): Likewise.
1533 (set_gdb_breakpoint): Likewise.
1534 (clear_breakpoint_conditions): Change parameter type to
1535 'struct gdb_breakpoint *'.
1536 (clear_breakpoint_commands): Likewise.
1537 (clear_breakpoint_conditions_and_commands): Likewise.
1538 (add_condition_to_breakpoint): Likewise.
1539 (add_breakpoint_condition): Likewise.
1540 (add_commands_to_breakpoint): Likewise.
1541 (check_breakpoints): Check other_breakpoint.
1542 (clone_one_breakpoint): Clone breakpopint according to its type.
1543 * mem-break.h (struct gdb_breakpoint): Declare.
1544 (set_gdb_breakpoint): Update declaration.
1545 (clear_breakpoint_conditions_and_commands): Likewise.
1546 (add_breakpoint_condition): Likewise.
1547 (add_breakpoint_commands): Likewise.
1548 * server.c (process_point_options): Change parameter type to
1549 'struct gdb_breakpoint *'.
1550
811f8301
YQ
15512016-07-21 Yao Qi <yao.qi@linaro.org>
1552
1553 * mem-break.c (set_breakpoint_at): Rename it to ...
1554 (set_breakpoint_type_at): ... it.
1555 (set_breakpoint_at): Call set_breakpoint_type_at.
1556 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1557 * mem-break.h (set_breakpoint_at): Update comments.
1558
b1c51e36
CLT
15592016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1560
1561 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1562 to buf parameter.
1563 (nios2_store_gregset): Likewise.
1564
ced2dffb
PA
15652016-07-01 Pedro Alves <palves@redhat.com>
1566 Antoine Tremblay <antoine.tremblay@ericsson.com>
1567
1568 * linux-low.c: Change interface to take the target lwp_info
1569 pointer directly and return void. Handle detaching from a zombie
1570 thread.
1571 (linux_detach_lwp_callback): New function.
1572 (linux_detach): Detach from the leader thread after detaching from
1573 the clone threads.
1574
2ac09a5b
YQ
15752016-06-28 Yao Qi <yao.qi@linaro.org>
1576
1577 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1578 for variable new_offset.
1579 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1580 (aarch64_ftrace_insn_reloc_cb): Likewise.
1581 (aarch64_ftrace_insn_reloc_tb): Likewise.
1582 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1583 PRIx64 instead of PRIx32.
1584
79e7fd4f
YQ
15852016-06-28 Yao Qi <yao.qi@linaro.org>
1586
1587 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1588 (the_low_target): Install arm_get_syscall_trapinfo.
1589
061fc021
YQ
15902016-06-28 Yao Qi <yao.qi@linaro.org>
1591
1592 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1593 function.
1594 (the_low_target): Install aarch64_get_syscall_trapinfo.
1595
4cc32bec
YQ
15962016-06-28 Yao Qi <yao.qi@linaro.org>
1597
1598 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1599 Callers updated.
1600 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1601 Remove parameter sysno.
1602 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1603 sysret.
1604
782c1122
AA
16052016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1606
1607 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1608 (s390_emit_ne_goto): Likewise.
1609 (s390_emit_lt_goto): Likewise.
1610 (s390_emit_le_goto): Likewise.
1611 (s390_emit_gt_goto): Likewise.
1612 (s390_emit_ge_goto): Likewise.
1613 (s390x_emit_eq_goto): Likewise.
1614 (s390x_emit_ne_goto): Likewise.
1615 (s390x_emit_lt_goto): Likewise.
1616 (s390x_emit_le_goto): Likewise.
1617 (s390x_emit_gt_goto): Likewise.
1618 (s390x_emit_ge_goto): Likewise.
1619 (s390_emit_ops_impl): Mark variable static.
1620 (s390x_emit_ops): Likewise.
1621
2e7b624b
YQ
16222016-06-17 Yao Qi <yao.qi@linaro.org>
1623
1624 * linux-low.c (handle_extended_wait): Call
1625 uninsert_reinsert_breakpoints for the parent process. Remove
1626 reinsert breakpoints from the child process. Reinsert them to
1627 the parent process when vfork is done.
1628 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1629 (reinsert_reinsert_breakpoints): New function.
1630 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1631 (reinsert_reinsert_breakpoints): Declare.
1632
8a81c5d7
YQ
16332016-06-17 Yao Qi <yao.qi@linaro.org>
1634
1635 * linux-low.c (handle_extended_wait): If the parent is doing
1636 step-over, remove the reinsert breakpoints from the forked child.
1637
f50bf8e5
YQ
16382016-06-17 Yao Qi <yao.qi@linaro.org>
1639
1640 * linux-low.c (unsuspend_all_lwps): Declare.
1641 (linux_low_filter_event): If thread exited, call finish_step_over.
1642 If step-over is finished, unsuspend other threads.
1643
8376a3cb
YQ
16442016-06-17 Yao Qi <yao.qi@linaro.org>
1645
1646 * linux-low.c (linux_resume_one_lwp_throw): Assert
1647 has_reinsert_breakpoints returns false.
1648 * mem-break.c (delete_disabled_breakpoints): Assert
1649 bp type isn't reinsert_breakpoint.
1650
f79b145d
YQ
16512016-06-17 Yao Qi <yao.qi@linaro.org>
1652
1653 * linux-low.c (maybe_hw_step): New function.
1654 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1655 (finish_step_over): Switch current_thread to lwp temporarily,
1656 and assert has_reinsert_breakpoints returns true.
1657 (proceed_one_lwp): Call maybe_hw_step.
1658 * mem-break.c (has_reinsert_breakpoints): New function.
1659 * mem-break.h (has_reinsert_breakpoints): Declare.
1660
0ae534d2
JT
16612016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1662
1663 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1664
fcdad592
YQ
16652016-05-17 Yao Qi <yao.qi@linaro.org>
1666
1667 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1668 instead of find_inferior.
1669
9e784964
YQ
16702016-05-05 Yao Qi <yao.qi@linaro.org>
1671
1672 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1673 Initialize res to zero.
1674
cf2ebb6e
YQ
16752016-05-05 Yao Qi <yao.qi@linaro.org>
1676
1677 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1678 to uint32_t.
1679
c1aebf87
UW
16802016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1681
1682 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1683 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1684 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1685
35fd2deb 16862016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 1687 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
1688
1689 * tracepoint.c (write_inferior_int8): New function.
1690 (cmd_qtenable_disable): Write enable flag using
1691 write_inferior_int8.
1692
484b3c32
YQ
16932016-04-25 Yao Qi <yao.qi@linaro.org>
1694
1695 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1696 (need_step_over_p): Return zero if the LWP has pending signals
1697 can be delivered on software single step target.
1698
85ba7d86
YQ
16992016-04-25 Yao Qi <yao.qi@linaro.org>
1700
1701 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1702 return instead of error.
1703
3539aa13
YQ
17042016-04-22 Yao Qi <yao.qi@linaro.org>
1705
1706 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1707 to 23.
1708
5b061e98
YQ
17092016-04-22 Yao Qi <yao.qi@linaro.org>
1710
1711 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1712 signal when stepping over breakpoint with software single
1713 step.
1714
3451269c
PA
17152016-04-21 Pedro Alves <palves@redhat.com>
1716
1717 * linux-s390-low.c (s390_collect_ptrace_register)
1718 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1719 add casts.
1720 (s390_check_regset): Use void * instead of gdb_byte *.
1721
a2358508
PA
17222016-04-20 Pedro Alves <palves@redhat.com>
1723
1724 * configure: Renegerate.
1725
6885166d
YQ
17262016-04-20 Yao Qi <yao.qi@linaro.org>
1727
1728 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1729 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1730 number 16.
1731 (arm_store_gregset): Likewise.
1732
2b863f51
WT
17332016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1734
1735 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1736 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1737 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1738 (amd64-avx-mpx-linux.c): New rules.
1739 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1740 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1741 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1742 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1743 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1744 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1745 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1746 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1747 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1748 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1749 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1750 * linux-x86-low.c (x86_linux_read_description): Add case for
1751 X86_XSTATE_AVX_MPX_MASK.
1752 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1753 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1754 init_registers_i386_avx_mpx_linux.
1755 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1756 (initialize_low_tracepoint): Call
1757 init_registers_i386_avx_mpx_linux.
1758 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1759 (initialize_low_tracepoint): Call
1760 init_registers_amd64_avx_mpx_linux.
1761 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1762 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1763 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1764 declarations.
1765
9b30624b
PA
17662016-04-18 Pedro Alves <palves@redhat.com>
1767
1768 * configure: Regenerate.
1769
45e3745e
AT
17702016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1771
1772 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1773 (aarch64_emit_sub): Likewise.
1774
2afc13ff
PA
17752016-04-12 Pedro Alves <palves@redhat.com>
1776
1777 * utils.c (prepare_to_throw_exception): Delete.
1778
6e774b13
SM
17792016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1780
1781 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1782
4dca19f8
MK
17832016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1784
1785 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1786
d0a9981f
MK
17872016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1788
1789 * linux-aarch64-ipa.c: Add <elf.h> include.
1790 * linux-ppc-ipa.c: Add <elf.h> include.
1791 * linux-s390-ipa.c: Add <elf.h> include.
1792
252db07e
MK
17932016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1794
1795 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1796 (get_raw_reg_ptr): Likewise.
1797 (get_trace_state_variable_value_ptr): Likewise.
1798 (set_trace_state_variable_value_ptr): Likewise.
1799 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1800 char *.
1801
14e2b6d9
MK
18022016-03-31 Wei-cheng Wang <cole945@gmail.com>
1803 Marcin Kościelnicki <koriakin@0x04.net>
1804
1805 PR/17221
1806 * linux-ppc-low.c (emit_insns): New function.
1807 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1808 (ppc_emit_prologue): New function.
1809 (ppc_emit_epilogue): New function.
1810 (ppc_emit_add): New function.
1811 (ppc_emit_sub): New function.
1812 (ppc_emit_mul): New function.
1813 (ppc_emit_lsh): New function.
1814 (ppc_emit_rsh_signed): New function.
1815 (ppc_emit_rsh_unsigned): New function.
1816 (ppc_emit_ext): New function.
1817 (ppc_emit_zero_ext): New function.
1818 (ppc_emit_log_not): New function.
1819 (ppc_emit_bit_and): New function.
1820 (ppc_emit_bit_or): New function.
1821 (ppc_emit_bit_xor): New function.
1822 (ppc_emit_bit_not): New function.
1823 (ppc_emit_equal): New function.
1824 (ppc_emit_less_signed): New function.
1825 (ppc_emit_less_unsigned): New function.
1826 (ppc_emit_ref): New function.
1827 (ppc_emit_const): New function.
1828 (ppc_emit_reg): New function.
1829 (ppc_emit_pop): New function.
1830 (ppc_emit_stack_flush): New function.
1831 (ppc_emit_swap): New function.
1832 (ppc_emit_stack_adjust): New function.
1833 (ppc_emit_call): New function.
1834 (ppc_emit_int_call_1): New function.
1835 (ppc_emit_void_call_2): New function.
1836 (ppc_emit_if_goto): New function.
1837 (ppc_emit_goto): New function.
1838 (ppc_emit_eq_goto): New function.
1839 (ppc_emit_ne_goto): New function.
1840 (ppc_emit_lt_goto): New function.
1841 (ppc_emit_le_goto): New function.
1842 (ppc_emit_gt_goto): New function.
1843 (ppc_emit_ge_goto): New function.
1844 (ppc_write_goto_address): New function.
1845 (ppc_emit_ops_impl): New static variable.
1846 (ppc64v1_emit_prologue): New function.
1847 (ppc64v2_emit_prologue): New function.
1848 (ppc64_emit_epilogue): New function.
1849 (ppc64_emit_add): New function.
1850 (ppc64_emit_sub): New function.
1851 (ppc64_emit_mul): New function.
1852 (ppc64_emit_lsh): New function.
1853 (ppc64_emit_rsh_signed): New function.
1854 (ppc64_emit_rsh_unsigned): New function.
1855 (ppc64_emit_ext): New function.
1856 (ppc64_emit_zero_ext): New function.
1857 (ppc64_emit_log_not): New function.
1858 (ppc64_emit_bit_and): New function.
1859 (ppc64_emit_bit_or): New function.
1860 (ppc64_emit_bit_xor): New function.
1861 (ppc64_emit_bit_not): New function.
1862 (ppc64_emit_equal): New function.
1863 (ppc64_emit_less_signed): New function.
1864 (ppc64_emit_less_unsigned): New function.
1865 (ppc64_emit_ref): New function.
1866 (ppc64_emit_const): New function.
1867 (ppc64v1_emit_reg): New function.
1868 (ppc64v2_emit_reg): New function.
1869 (ppc64_emit_pop): New function.
1870 (ppc64_emit_stack_flush): New function.
1871 (ppc64_emit_swap): New function.
1872 (ppc64v1_emit_call): New function.
1873 (ppc64v2_emit_call): New function.
1874 (ppc64v1_emit_int_call_1): New function.
1875 (ppc64v2_emit_int_call_1): New function.
1876 (ppc64v1_emit_void_call_2): New function.
1877 (ppc64v2_emit_void_call_2): New function.
1878 (ppc64_emit_if_goto): New function.
1879 (ppc64_emit_eq_goto): New function.
1880 (ppc64_emit_ne_goto): New function.
1881 (ppc64_emit_lt_goto): New function.
1882 (ppc64_emit_le_goto): New function.
1883 (ppc64_emit_gt_goto): New function.
1884 (ppc64_emit_ge_goto): New function.
1885 (ppc64v1_emit_ops_impl): New static variable.
1886 (ppc64v2_emit_ops_impl): New static variable.
1887 (ppc_emit_ops): New function.
1888 (linux_low_target): Wire in ppc_emit_ops.
1889
a2174ba4
MK
18902016-03-31 Wei-cheng Wang <cole945@gmail.com>
1891 Marcin Kościelnicki <koriakin@0x04.net>
1892
1893 PR/17221
1894 * Makefile.in: Add powerpc-*-ipa.o
1895 * configure.srv: Add ipa_obj for powerpc*-linux.
1896 * linux-ppc-ipa.c: New file.
1897 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1898 includes.
1899 (PPC_FIELD): New macro.
1900 (PPC_SEXT): New macro.
1901 (PPC_OP6): New macro.
1902 (PPC_BO): New macro.
1903 (PPC_LI): New macro.
1904 (PPC_BD): New macro.
1905 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1906 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1907 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1908 (ppc_get_thread_area): New function.
1909 (is_elfv2_inferior): New function.
1910 (gen_ds_form): New function.
1911 (GEN_STD): New macro.
1912 (GEN_STDU): New macro.
1913 (GEN_LD): New macro.
1914 (GEN_LDU): New macro.
1915 (gen_d_form): New function.
1916 (GEN_ADDI): New macro.
1917 (GEN_ADDIS): New macro.
1918 (GEN_LI): New macro.
1919 (GEN_LIS): New macro.
1920 (GEN_ORI): New macro.
1921 (GEN_ORIS): New macro.
1922 (GEN_LWZ): New macro.
1923 (GEN_STW): New macro.
1924 (GEN_STWU): New macro.
1925 (gen_xfx_form): New function.
1926 (GEN_MFSPR): New macro.
1927 (GEN_MTSPR): New macro.
1928 (GEN_MFCR): New macro.
1929 (GEN_MTCR): New macro.
1930 (GEN_SYNC): New macro.
1931 (GEN_LWSYNC): New macro.
1932 (gen_x_form): New function.
1933 (GEN_OR): New macro.
1934 (GEN_MR): New macro.
1935 (GEN_LWARX): New macro.
1936 (GEN_STWCX): New macro.
1937 (GEN_CMPW): New macro.
1938 (gen_md_form): New function.
1939 (GEN_RLDICL): New macro.
1940 (GEN_RLDICR): New macro.
1941 (gen_i_form): New function.
1942 (GEN_B): New macro.
1943 (GEN_BL): New macro.
1944 (gen_b_form): New function.
1945 (GEN_BNE): New macro.
1946 (GEN_LOAD): New macro.
1947 (GEN_STORE): New macro.
1948 (gen_limm): New function.
1949 (gen_atomic_xchg): New function.
1950 (gen_call): New function.
1951 (ppc_relocate_instruction): New function.
1952 (ppc_install_fast_tracepoint_jump_pad): New function.
1953 (ppc_get_min_fast_tracepoint_insn_len): New function.
1954 (ppc_get_ipa_tdesc_idx): New function.
1955 (the_low_target): Wire in the new functions.
1956 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1957 tdescs.
1958 * linux-ppc-tdesc.h: New file.
1959
a13c4696
MK
19602016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1961
1962 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1963 (alloc_jump_pad_buffer): New function.
1964 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1965 (alloc_jump_pad_buffer): New function.
1966 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1967 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1968 (alloc_jump_pad_buffer): New function.
1969 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1970 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1971 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1972 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1973
1cda1512
MK
19742016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1975
1976 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1977 * linux-amd64-ipa.c: Likewise.
1978 * linux-i386-ipa.c: Likewise.
1979 * linux-s390-ipa.c: Likewise.
1980 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1981 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1982 set_trace_state_variable_value_ptr.
1983 (struct ipa_sym_addresses): Likewise.
1984 (symbol_list): Likewise.
1985 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1986 accessing gdb_collect directly.
1987 (gdb_collect_ptr_type): New typedef.
1988 (get_raw_reg_ptr_type): New typedef.
1989 (get_trace_state_variable_value_ptr_type): New typedef.
1990 (set_trace_state_variable_value_ptr_type): New typedef.
1991 (gdb_collect_ptr): New global.
1992 (get_raw_reg_ptr): New global.
1993 (get_trace_state_variable_value_ptr): New global.
1994 (set_trace_state_variable_value_ptr): New global.
1995 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1996 accessing get_raw_reg directly.
1997 (get_get_tsv_func_addr): Likewise for
1998 get_trace_state_variable_value_ptr.
1999 (get_set_tsv_func_addr): Likewise for
2000 set_trace_state_variable_value_ptr.
2001 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2002
72fb5488
SM
20032016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2004
2005 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2006
28170b88
MK
20072016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2008
2009 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2010 packets.
2011 (relocate_instruction): Remove own_buf.
2012 * server.c (own_buf): Make global.
2013 (handle_v_requests): Make global.
2014 * server.h (own_buf): New declaration.
2015 (handle_v_requests): New prototype.
2016
f39e8743
MK
20172016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2018
2019 PR 18377
2020 * linux-s390-low.c (add_insns): New function.
2021 (s390_emit_prologue): New function.
2022 (s390_emit_epilogue): New function.
2023 (s390_emit_add): New function.
2024 (s390_emit_sub): New function.
2025 (s390_emit_mul): New function.
2026 (s390_emit_lsh): New function.
2027 (s390_emit_rsh_signed): New function.
2028 (s390_emit_rsh_unsigned): New function.
2029 (s390_emit_ext): New function.
2030 (s390_emit_log_not): New function.
2031 (s390_emit_bit_and): New function.
2032 (s390_emit_bit_or): New function.
2033 (s390_emit_bit_xor): New function.
2034 (s390_emit_bit_not): New function.
2035 (s390_emit_equal): New function.
2036 (s390_emit_less_signed): New function.
2037 (s390_emit_less_unsigned): New function.
2038 (s390_emit_ref): New function.
2039 (s390_emit_if_goto): New function.
2040 (s390_emit_goto): New function.
2041 (s390_write_goto_address): New function.
2042 (s390_emit_litpool): New function.
2043 (s390_emit_const): New function.
2044 (s390_emit_call): New function.
2045 (s390_emit_reg): New function.
2046 (s390_emit_pop): New function.
2047 (s390_emit_stack_flush): New function.
2048 (s390_emit_zero_ext): New function.
2049 (s390_emit_swap): New function.
2050 (s390_emit_stack_adjust): New function.
2051 (s390_emit_set_r2): New function.
2052 (s390_emit_int_call_1): New function.
2053 (s390_emit_void_call_2): New function.
2054 (s390_emit_eq_goto): New function.
2055 (s390_emit_ne_goto): New function.
2056 (s390_emit_lt_goto): New function.
2057 (s390_emit_le_goto): New function.
2058 (s390_emit_gt_goto): New function.
2059 (s390_emit_ge_goto): New function.
2060 (s390x_emit_prologue): New function.
2061 (s390x_emit_epilogue): New function.
2062 (s390x_emit_add): New function.
2063 (s390x_emit_sub): New function.
2064 (s390x_emit_mul): New function.
2065 (s390x_emit_lsh): New function.
2066 (s390x_emit_rsh_signed): New function.
2067 (s390x_emit_rsh_unsigned): New function.
2068 (s390x_emit_ext): New function.
2069 (s390x_emit_log_not): New function.
2070 (s390x_emit_bit_and): New function.
2071 (s390x_emit_bit_or): New function.
2072 (s390x_emit_bit_xor): New function.
2073 (s390x_emit_bit_not): New function.
2074 (s390x_emit_equal): New function.
2075 (s390x_emit_less_signed): New function.
2076 (s390x_emit_less_unsigned): New function.
2077 (s390x_emit_ref): New function.
2078 (s390x_emit_if_goto): New function.
2079 (s390x_emit_const): New function.
2080 (s390x_emit_call): New function.
2081 (s390x_emit_reg): New function.
2082 (s390x_emit_pop): New function.
2083 (s390x_emit_stack_flush): New function.
2084 (s390x_emit_zero_ext): New function.
2085 (s390x_emit_swap): New function.
2086 (s390x_emit_stack_adjust): New function.
2087 (s390x_emit_int_call_1): New function.
2088 (s390x_emit_void_call_2): New function.
2089 (s390x_emit_eq_goto): New function.
2090 (s390x_emit_ne_goto): New function.
2091 (s390x_emit_lt_goto): New function.
2092 (s390x_emit_le_goto): New function.
2093 (s390x_emit_gt_goto): New function.
2094 (s390x_emit_ge_goto): New function.
2095 (s390_emit_ops): New function.
2096 (struct linux_target_ops): Fill in emit_ops hook.
2097
abd9baf9
MK
20982016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2099
2100 PR 18377
2101 * Makefile.in: Add s390 IPA files.
2102 * configure.srv: Build IPA for s390.
2103 * linux-s390-ipa.c: New file.
2104 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2105 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2106 (tdesc_s390_linux32): Likewise.
2107 (init_registers_s390_linux32v1): Likewise.
2108 (tdesc_s390_linux32v1): Likewise.
2109 (init_registers_s390_linux32v2): Likewise.
2110 (tdesc_s390_linux32v2): Likewise.
2111 (init_registers_s390_linux64): Likewise.
2112 (tdesc_s390_linux64): Likewise.
2113 (init_registers_s390_linux64v1): Likewise.
2114 (tdesc_s390_linux64v1): Likewise.
2115 (init_registers_s390_linux64v2): Likewise.
2116 (tdesc_s390_linux64v2): Likewise.
2117 (init_registers_s390_te_linux64): Likewise.
2118 (tdesc_s390_te_linux64): Likewise.
2119 (init_registers_s390_vx_linux64): Likewise.
2120 (tdesc_s390_vx_linux64): Likewise.
2121 (init_registers_s390_tevx_linux64): Likewise.
2122 (tdesc_s390_tevx_linux64): Likewise.
2123 (init_registers_s390x_linux64): Likewise.
2124 (tdesc_s390x_linux64): Likewise.
2125 (init_registers_s390x_linux64v1): Likewise.
2126 (tdesc_s390x_linux64v1): Likewise.
2127 (init_registers_s390x_linux64v2): Likewise.
2128 (tdesc_s390x_linux64v2): Likewise.
2129 (init_registers_s390x_te_linux64): Likewise.
2130 (tdesc_s390x_te_linux64): Likewise.
2131 (init_registers_s390x_vx_linux64): Likewise.
2132 (tdesc_s390x_vx_linux64): Likewise.
2133 (init_registers_s390x_tevx_linux64): Likewise.
2134 (tdesc_s390x_tevx_linux64): Likewise.
2135 (have_hwcap_s390_vx): New static variable.
2136 (s390_arch_setup): Fill have_hwcap_s390_vx.
2137 (s390_get_thread_area): New function.
2138 (s390_ft_entry_gpr_esa): New const.
2139 (s390_ft_entry_gpr_zarch): New const.
2140 (s390_ft_entry_misc): New const.
2141 (s390_ft_entry_fr): New const.
2142 (s390_ft_entry_vr): New const.
2143 (s390_ft_main_31): New const.
2144 (s390_ft_main_64): New const.
2145 (s390_ft_exit_fr): New const.
2146 (s390_ft_exit_vr): New const.
2147 (s390_ft_exit_misc): New const.
2148 (s390_ft_exit_gpr_esa): New const.
2149 (s390_ft_exit_gpr_zarch): New const.
2150 (append_insns): New function.
2151 (s390_relocate_instruction): New function.
2152 (s390_install_fast_tracepoint_jump_pad): New function.
2153 (s390_get_min_fast_tracepoint_insn_len): New function.
2154 (s390_get_ipa_tdesc_idx): New function.
2155 (struct linux_target_ops): Wire in the above functions.
2156 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2157 * linux-s390-tdesc.h: New file.
2158
a4105d04
MK
21592016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2160
2161 * linux-s390-low.c (s390_supports_tracepoints): New function.
2162 (struct linux_target_ops): Fill supports_tracepoints hook.
2163
35ac8b3e
YQ
21642016-03-18 Yao Qi <yao.qi@linaro.org>
2165
2166 * linux-low.c (lwp_signal_can_be_delivered): New function.
2167 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2168
94610ec4
YQ
21692016-03-18 Yao Qi <yao.qi@linaro.org>
2170
2171 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2172 0 if signal is enqueued. Remove 'signal' from one debugging
2173 message. Move one debugging message to some lines below.
2174 Remove code setting 'signal' to 0.
2175
80aea927
YQ
21762016-03-18 Yao Qi <yao.qi@linaro.org>
2177
2178 * linux-low.c (linux_low_filter_event): Remove redundant
2179 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2180
b04fd3be
MK
21812016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2182
2183 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2184 (struct linux_target_ops): Wire in the above.
2185
c40c8d4b
YQ
21862016-03-03 Yao Qi <yao.qi@linaro.org>
2187
2188 * linux-low.c: Update comments to start_step_over.
2189
0f8288ae
YQ
21902016-03-03 Yao Qi <yao.qi@linaro.org>
2191
2192 PR server/19736
2193 * linux-low.c (handle_extended_wait): Set child suspended
2194 if event_lwp->bp_reinsert isn't zero.
2195
fdbd04a8
YQ
21962016-03-02 Yao Qi <yao.qi@linaro.org>
2197
2198 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2199 enqueue_pending_signal.
2200
6896a8fa
MK
22012016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2202
2203 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2204 is actually loaded.
2205
ab503087
MK
22062016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2207
2208 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2209 (s390_regmap_3264) [!__s390x__]: New global.
2210 (s390_collect_ptrace_register): Skip map entries containing -1.
2211 (s390_supply_ptrace_register): Ditto.
2212 (s390_fill_gprs_high): New function.
2213 (s390_store_gprs_high): New function.
2214 (s390_regsets): Add NT_S390_HIGH_GPRS.
2215 (s390_get_hwcap): Enable on 31-bit.
2216 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2217 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2218 Detect NT_S390_HIGH_GPRS.
2219 (s390_usrregs_info_3264): Enable on 31-bit.
2220 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2221 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2222
ae91f625
MK
22232016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2224
2225 PR gdb/13808
2226 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2227 * configure.srv: Ditto.
2228 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2229 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2230 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2231 (init_registers_amd64_linux): Remove prototype.
2232 (tdesc_amd64_linux): Remove declaration.
2233 (get_ipa_tdesc): New function.
2234 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2235 initialize remaining tdescs.
2236 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2237 (init_registers_i386_linux): Remove prototype.
2238 (tdesc_i386_linux): Remove declaration.
2239 (get_ipa_tdesc): New function.
2240 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2241 initialize remaining tdescs.
2242 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2243 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2244 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2245 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2246 (x86_get_ipa_tdesc_idx): New function.
2247 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2248 * linux-x86-tdesc.h: New file.
2249 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2250 (target_get_ipa_tdesc_idx): New macro.
2251 * tracepoint.c (ipa_tdesc_idx): New macro.
2252 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2253 (symbol_list): Add ipa_tdesc_idx.
2254 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2255 (ipa_tdesc): Remove.
2256 (ipa_tdesc_idx): New variable.
2257 (get_context_regcache): Use get_ipa_tdesc.
2258 (gdb_collect): Ditto.
2259 (gdb_probe): Ditto.
2260 * tracepoint.h (get_ipa_tdesc): New prototype.
2261 (ipa_tdesc): Remove.
2262
e7ad2f14
PA
22632016-02-24 Pedro Alves <palves@redhat.com>
2264
2265 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2266 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2267 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2268 Factor out common code between the USE_SIGTRAP_SIGINFO and
2269 !USE_SIGTRAP_SIGINFO blocks.
2270 (linux_low_filter_event): Call save_stop_reason instead of
2271 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2272 Update comments.
2273 (linux_wait_1): Update comments.
2274
657f9cde
WW
22752016-02-24 Wei-cheng Wang <cole945@gmail.com>
2276
2277 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2278 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2279 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2280 ppc_insert_point, ppc_remove_point.
2281
b00b61e1
MK
22822016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2283
2284 * linux-s390-low.c (s390_supports_z_point_type): New function.
2285 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2286
553cb527
YQ
22872016-02-16 Yao Qi <yao.qi@linaro.org>
2288
2289 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2290 PC. Get pc from regcache_read_pc.
2291
a5652c21
YQ
22922016-02-12 Yao Qi <yao.qi@linaro.org>
2293
2294 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2295 or linux_get_pc_32bit.
2296 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2297
ed443b61
YQ
22982016-02-12 Yao Qi <yao.qi@linaro.org>
2299
2300 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2301 arm_linux_get_next_pcs_fixup.
2302
020ecd38
MK
23032016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2304
2305 * tracepoint.c (x_tracepoint_action_download): Change
2306 write_inferior_data_ptr to write_inferior_data_pointer.
2307 (cmd_qtstart): Likewise.
2308 (write_inferior_data_ptr): Remove.
2309 (download_agent_expr): Change write_inferior_data_ptr to
2310 write_inferior_data_pointer.
2311 (download_tracepoint_1): Likewise.
2312 (download_tracepoint): Likewise.
2313 (download_trace_state_variables): Likewise.
2314
7cae9051
WW
23152016-02-11 Wei-cheng Wang <cole945@gmail.com>
2316 Marcin Kościelnicki <koriakin@0x04.net>
2317
2318 * tracepoint.c (struct tracepoint_action_ops): Remove.
2319 (struct tracepoint_action): Remove ops.
2320 (m_tracepoint_action_download, r_tracepoint_action_download)
2321 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2322 size and offset accordingly.
2323 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2324 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2325 (tracepoint_action_send, tracepoint_action_download): New functions.
2326 Helpers for trace action handlers.
2327 (add_tracepoint_action): Remove setup actions ops.
2328 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2329
9f6a71b4
YQ
23302016-02-10 Yao Qi <yao.qi@linaro.org>
2331
2332 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2333
1e94266c
SM
23342016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2335
2336 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2337 to AC_OUTPUT.
2338 * configure: Regenerate.
2339
8adce034
SM
23402016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2341
2342 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2343 void * to gdb_byte *.
2344 * linux-low.c (siginfo_fixup): Likewise.
2345 (linux_xfer_siginfo): Likewise.
2346 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2347 Likewise.
2348 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2349
93813b37
WT
23502016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2351
2352 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2353 to srv_tgtobj.
2354 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2355 to srv_tgtobj.
2356 * linux-x86-low.c [__x86_64__]: Include
2357 "nat/amd64-linux-siginfo.h".
2358 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2359 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2360 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2361 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2362 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2363 (cpt_si_fd, si_timerid, si_overrun): Move from
2364 nat/amd64-linux-siginfo.c.
2365 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2366
8424cc97
SM
23672016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2368
2369 * server.c (skip_to_semicolon): Remove.
2370 (process_point_options): Use strchrnul instead of
2371 skip_to_semicolon.
2372
4d18591b
YQ
23732016-01-26 Yao Qi <yao.qi@linaro.org>
2374
2375 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2376 * linux-low.c (install_software_single_step_breakpoints): Don't
2377 call regcache_read_pc.
2378 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2379 argument pc.
2380
d8020970
YQ
23812016-01-26 Yao Qi <yao.qi@linaro.org>
2382
2383 * linux-low.c (install_software_single_step_breakpoints): Call
2384 regcache_read_pc instead of get_pc.
2385
8b207339
YQ
23862016-01-26 Yao Qi <yao.qi@linaro.org>
2387
2388 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2389 (unblock_async_io): Rename to ...
2390 (block_unblock_async_io): ... it. New function.
2391 (enable_async_io): Don't install SIGIO handler. Unblock it
2392 instead.
2393 (disable_async_io): Don't ignore SIGIO. Block it instead.
2394 (initialize_async_io): Install SIGIO handler. Don't call
2395 unblock_async_io.
2396
18879fef
YQ
23972016-01-26 Yao Qi <yao.qi@linaro.org>
2398
2399 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2400 first character is '\003', call *the_target->request_interrupt.
2401
a0f8e08a
YQ
24022016-01-25 Yao Qi <yao.qi@linaro.org>
2403
2404 * remote-utils.c (new_thread_notify): Remove.
2405 (dead_thread_notify): Likewise.
2406 * remote-utils.h (new_thread_notify): Remove declaration.
2407 (dead_thread_notify): Likewise.
2408
cc5fd9ab
MK
24092016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2410
2411 * gdb.trace/pending.exp: Fix expected message on continue.
2412
99e8eb11
MK
24132016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2414
2415 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2416 it works properly on big-endian machines where sizeof (CORE_ADDR)
2417 != sizeof (void *).
2418
a994041d
PA
24192016-01-21 Pedro Alves <palves@redhat.com>
2420
2421 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2422 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2423 * configure: Regenerate.
2424
f7a6a40d
YQ
24252016-01-21 Yao Qi <yao.qi@linaro.org>
2426
2427 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2428 is_thumb and set it according to CPSR saved on the stack.
2429 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2430 arm_sigreturn_next_pc.
2431
6f69e520
YQ
24322016-01-18 Yao Qi <yao.qi@linaro.org>
2433
2434 * linux-low.c (linux_set_pc_64bit): New function.
2435 (linux_get_pc_64bit): New function.
2436 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2437 Declare.
2438 * linux-sparc-low.c (debug_threads): Remove declaration.
2439 (sparc_get_pc): Remove.
2440 (the_low_target): Use linux_get_pc_64bit instead of
2441 sparc_get_pc.
2442 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2443 (the_low_target): Use linux_get_pc_64bit and
2444 linux_set_pc_64bit.
2445
276d4552
YQ
24462016-01-18 Yao Qi <yao.qi@linaro.org>
2447
2448 * linux-arm-low.c (debug_threads): Remove declaration.
2449 (arm_get_pc, arm_set_pc): Remove.
2450 (the_low_target): Use linux_get_pc_32bit and
2451 linux_set_pc_32bit.
2452 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2453 (the_low_target): Use linux_get_pc_32bit and
2454 linux_set_pc_32bit.
2455 * linux-cris-low.c (debug_threads): Remove declaration.
2456 (cris_get_pc, cris_set_pc,): Remove.
2457 (the_low_target): Use linux_get_pc_32bit and
2458 linux_set_pc_32bit.
2459 * linux-crisv32-low.c (debug_threads): Remove declaration.
2460 (cris_get_pc, cris_set_pc): Remove.
2461 (the_low_target): Use linux_get_pc_32bit and
2462 linux_set_pc_32bit.
2463 * linux-low.c: Include inttypes.h.
2464 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2465 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2466 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2467 (the_low_target): Use linux_get_pc_32bit and
2468 linux_set_pc_32bit.
2469 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2470 (the_low_target): Use linux_get_pc_32bit and
2471 linux_set_pc_32bit.
2472 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2473 (the_low_target): Use linux_get_pc_32bit and
2474 linux_set_pc_32bit.
2475 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2476 (the_low_target): Use linux_get_pc_32bit and
2477 linux_set_pc_32bit.
2478 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2479 (the_low_target): Use linux_get_pc_32bit and
2480 linux_set_pc_32bit.
2481
eb0edac8
GB
24822016-01-18 Gary Benson <gbenson@redhat.com>
2483
2484 * configure.ac (AC_FUNC_FORK): New check.
2485 * config.in: Regenerate.
2486 * configure: Likewise.
2487
1b451dda
YQ
24882016-01-14 Yao Qi <yao.qi@linaro.org>
2489
2490 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2491 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2492 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2493 arm_get_next_pcs_ctor.
2494
82075af2
JS
24952016-01-12 Josh Stone <jistone@redhat.com>
2496 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2497
2498 * inferiors.h: Include "gdb_vecs.h".
2499 (struct process_info): Add syscalls_to_catch.
2500 * inferiors.c (remove_process): Free syscalls_to_catch.
2501 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2502 syscall_return stops.
2503 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2504 * server.c (handle_general_set): Handle QCatchSyscalls.
2505 (handle_query): Report support for QCatchSyscalls.
2506 * target.h (struct target_ops): Add supports_catch_syscall.
2507 (target_supports_catch_syscall): New macro.
2508 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2509 (struct lwp_info): Add syscall_state.
2510 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2511 Maintain syscall_state and syscalls_to_catch across exec.
2512 (get_syscall_trapinfo): New function, proxy to the_low_target.
2513 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2514 (linux_low_filter_event): Toggle syscall_state entry/return for
2515 syscall traps, and set it ignored for all others.
2516 (gdb_catching_syscalls_p): New function.
2517 (gdb_catch_this_syscall_p): New function.
2518 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2519 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2520 (linux_supports_catch_syscall): New function.
2521 (linux_target_ops): Install it.
2522 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2523 (the_low_target): Install it.
2524
8f13a3ce
MF
25252016-01-12 Mike Frysinger <vapier@gentoo.org>
2526
2527 * acinclude.m4: Include new ../warning.m4 file.
2528 * configure: Regenerated.
2529 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2530
5b3da067
MF
25312016-01-12 Mike Frysinger <vapier@gentoo.org>
2532
2533 * ax.c (is_goto_target): Mark static.
2534 * linux-low.c (register_addr): Likewise.
2535 (linux_fetch_registers, linux_store_registers): Likewise.
2536 * mem-break.c (any_persistent_commands): Fix old prototype.
2537 (add_commands_to_breakpoint): Mark static.
2538 * regcache.c (find_register_by_name): Delete unused func.
2539 * remote-utils.c (hex_or_minus_one): Mark static.
2540 * server.c (monitor_show_help): Mark static.
2541 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2542 handle_v_requests): Likewise.
2543
bc504a31
PA
25442016-01-12 Pedro Alves <palves@redhat.com>
2545
2546 Remove use of the registered trademark symbol throughout.
2547
5a0dd67a
YQ
25482016-01-08 Yao Qi <yao.qi@linaro.org>
2549
2550 * remote-utils.c (getpkt): If c is '\003', call target hook
2551 request_interrupt.
2552
b2ca446f
YQ
25532016-01-06 Yao Qi <yao.qi@linaro.org>
2554
2555 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2556 linux-aarch32-low.c.
2557 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2558 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2559 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2560 (thumb2_breakpoint): Declare.
2561 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2562 linux-aarch32-low.h.
2563 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2564 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2565 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2566
edd88788
JB
25672016-01-01 Joel Brobecker <brobecker@adacore.com>
2568
2569 * gdbreplay.c (gdbreplay_version): Change copyright year in
2570 version message.
2571 * server.c (gdbserver_version): Likewise.
2572
65da7f14
PP
25732015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2574
2575 * server.c (crc32_table): Delete.
2576 (crc32): Use libiberty's xcrc32 function.
2577
4abd5ed2
JB
25782015-12-22 Joel Brobecker <brobecker@adacore.com>
2579
2580 * lynx-low.c (lynx_delete_thread_callback): New function.
2581 (lynx_mourn): Properly delete our process and all of its
2582 threads. Remove call to clear_inferiors.
2583
0e50fe5c
JB
25842015-12-22 Joel Brobecker <brobecker@adacore.com>
2585
2586 * target.c (thread_search_callback): Add check that
2587 the thread_stopped target callback is not NULL before
2588 calling it.
2589
35adc03f
YQ
25902015-12-21 Yao Qi <yao.qi@linaro.org>
2591
2592 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2593 arm breakpoint.
2594
bd2b2909
AT
25952015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2596
2597 * server.c (handle_query): Call target_supports_software_single_step.
2598
7fe5e27e
AT
25992015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2600
2601 * linux-low.c (single_step): New function.
2602 (linux_resume_one_lwp_throw): Call single_step.
2603 (start_step_over): Likewise.
2604
d9311bfa
AT
26052015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2606
2607 * Makefile.in (SFILES): Append arch/arm-linux.c,
2608 arch/arm-get-next-pcs.c.
2609 (arm-linux.o): New rule.
2610 (arm-get-next-pcs.o): New rule.
2611 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2612 arm-linux.o.
2613 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2614 to linux-aarch32-low.c.
2615 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2616 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2617 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2618 (thumb2_breakpoint_len): Likewise.
2619 (arm_is_thumb_mode): Make non-static.
2620 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2621 from linux-aarch32-low.c.
2622 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2623 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2624 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2625 (thumb2_breakpoint_len): Likewise.
2626 (arm_is_thumb_mode): New declaration.
2627 * linux-arm-low.c: Include arch/arm-linux.h
2628 aarch/arm-get-next-pcs.h, sys/syscall.h.
2629 (get_next_pcs_ops): New struct.
2630 (get_next_pcs_addr_bits_remove): New function.
2631 (get_next_pcs_is_thumb): New function.
2632 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2633 (arm_sigreturn_next_pc): Likewise.
2634 (get_next_pcs_syscall_next_pc): Likewise.
2635 (arm_gdbserver_get_next_pcs): Likewise.
2636 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2637 Initialize.
2638 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2639 * server.h: Include gdb_vecs.h.
2640
68ce2059
AT
26412015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2642
2643 * Makefile.in (SFILES): Append common/common-regcache.c.
2644 (OBS): Append common-regcache.o.
2645 (common-regcache.o): New rule.
2646 * regcache.c (init_register_cache): Initialize cache to
2647 REG_UNAVAILABLE.
2648 (regcache_raw_read_unsigned): New function.
2649 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2650 register_status enum.
2651
fa5308bd
AT
26522015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2653
2654 * linux-aarch64-low.c (the_low_targets): Rename
2655 breakpoint_reinsert_addr to get_next_pcs.
2656 * linux-arm-low.c (the_low_targets): Likewise.
2657 * linux-bfin-low.c (the_low_targets): Likewise.
2658 * linux-cris-low.c (the_low_targets): Likewise.
2659 * linux-crisv32-low.c (the_low_targets): Likewise.
2660 * linux-low.c (can_software_single_step): Likewise.
2661 (install_software_single_step_breakpoints): New function.
2662 (start_step_over): Use install_software_single_step_breakpoints.
2663 * linux-low.h: New CORE_ADDR vector.
2664 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2665 get_next_pcs.
2666 * linux-mips-low.c (the_low_targets): Likewise.
2667 * linux-nios2-low.c (the_low_targets): Likewise.
2668 * linux-sparc-low.c (the_low_targets): Likewise.
2669
4a6ed09b
PA
26702015-12-17 Pedro Alves <palves@redhat.com>
2671
2672 * linux-low.c (linux_kill_one_lwp): Remove references to
2673 LinuxThreads.
2674 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2675 to 'kill'.
2676 (linux_init_signals): Delete.
2677 (initialize_low): Adjust.
2678 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2679
7544db95
PA
26802015-12-16 Pedro Alves <palves@redhat.com>
2681
2682 * configure.ac (compiler warning flags): When testing a
2683 -Wno-foo option, check whether -Wfoo works instead.
2684 * configure: Regenerate.
2685
8020350c
DB
26862015-12-11 Don Breazeal <donb@codesourcery.com>
2687
2688 * server.c (process_serial_event): Don't exit from gdbserver
2689 in remote mode if there are still active inferiors.
2690
db91f502
YQ
26912015-12-11 Yao Qi <yao.qi@linaro.org>
2692
2693 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2694 arm_breakpoint_at if the process is 32-bit.
2695
b37a6290
YQ
26962015-12-11 Yao Qi <yao.qi@linaro.org>
2697
2698 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2699 arm breakpoint.
2700
17b1509a
YQ
27012015-12-07 Yao Qi <yao.qi@linaro.org>
2702
2703 * configure.srv: Append arm.o to srv_tgtobj for
2704 aarch64*-*-linux* target.
2705 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2706 from linux-arm-low.c.
2707 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2708 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2709 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2710 (thumb2_breakpoint_len): Likewise.
2711 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2712 (arm_breakpoint_kinds): Likewise.
2713 (arm_breakpoint_kind_from_pc): Likewise.
2714 (arm_sw_breakpoint_from_kind): Likewise.
2715 (arm_breakpoint_kind_from_current_state): Likewise.
2716 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2717 (arm_sw_breakpoint_from_kind): Declare.
2718 (arm_breakpoint_kind_from_current_state): Declare.
2719 (arm_breakpoint_at): Declare.
2720 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2721 arm_sw_breakpoint_from_kind if process is 32-bit.
2722 (aarch64_breakpoint_kind_from_pc): New function.
2723 (aarch64_breakpoint_kind_from_current_state): New function.
2724 (the_low_target): Initialize fields breakpoint_kind_from_pc
2725 and breakpoint_kind_from_current_state.
2726 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2727 linux-aarch32-low.c.
2728 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2729 (arm_breakpoint, arm_breakpoint_len): Likewise.
2730 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2731 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2732 (arm_is_thumb_mode): Likewise.
2733 (arm_breakpoint_at): Likewise.
2734 (arm_breakpoint_kind_from_pc): Likewise.
2735 (arm_sw_breakpoint_from_kind): Likewise.
2736 (arm_breakpoint_kind_from_current_state): Likewise.
2737
2738 Revert:
2739 2015-08-04 Yao Qi <yao.qi@linaro.org>
2740
2741 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2742 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2743 * server.c (extended_protocol): Remove "static".
2744 * server.h (extended_protocol): Declare it.
2745
ece66d65
JS
27462015-12-04 Josh Stone <jistone@redhat.com>
2747
2748 * target.h (struct target_ops) <arch_setup>: Rename to ...
2749 (struct target_ops) <post_create_inferior>: ... this.
2750 (target_arch_setup): Rename to ...
2751 (target_post_create_inferior): ... this, calling post_create_inferior.
2752 * server.c (start_inferior): Update target_arch_setup calls to
2753 target_post_create_inferior.
2754 * linux-low.c (linux_low_ptrace_options): Forward declare.
2755 (linux_arch_setup): Update its comment for general use.
2756 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2757 (struct linux_target_ops): Use linux_post_create_inferior.
2758 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2759 to post_create_inferior.
2760 * nto-low.c (struct nto_target_ops): Likewise.
2761 * spu-low.c (struct spu_target_ops): Likewise.
2762 * win32-low.c (struct win32_target_ops): Likewise.
2763
e58c48b4
AT
27642015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2765
2766 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2767
fbec8956
AT
27682015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2769
2770 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2771 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2772 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2773 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2774 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2775 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2776 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2777 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2778 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2779 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2780 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2781 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2782
9b4c5f87
AT
27832015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2784
2785 * linux-low.c (linux_look_up_symbols): Don't call
2786 linux_supports_traceclone.
2787 * linux-low.h (thread_db_init): Remove use_events argument.
2788 * thread-db.c (thread_db_use_event): Remove global variable.
2789 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2790 (struct thread_db) <td_create_bp>: Remove field.
2791 (thread_db_create_event): Remove function.
2792 (thread_db_enable_reporting): Likewise.
2793 (find_one_thread): Don't check for thread_db_use_events.
2794 (attach_thread): Likewise.
2795 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2796 (try_thread_db_load_1): Don't check for thread_db_use_events.
2797 (thread_db_init): Remove use_events argument and thread events
2798 handling.
2799 (remove_thread_event_breakpoints): Remove function.
2800 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2801
7d00775e
AT
28022015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2803
2804 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2805 New function.
2806 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2807 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2808 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2809 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2810 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2811 Initialize.
2812 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2813 New function.
2814 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2815 * linux-low.c (can_hardware_single_step): Use
2816 supports_hardware_single_step.
2817 (can_software_single_step): New function.
2818 (start_step_over): Call can_software_single_step.
2819 (linux_supports_hardware_single_step): New function.
2820 (struct target_ops) <supports_software_single_step>: Initialize.
2821 * linux-low.h (struct linux_target_ops)
2822 <supports_hardware_single_step>: Initialize.
2823 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2824 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2825 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2826 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2827 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2828 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2829 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2830 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2831 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2832 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2833 Initialize.
2834 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2835 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2836 Initialize.
2837 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2838 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2839 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2840 New function.
2841 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2842 * target.h (struct target_ops): <supports_software_single_step>:
2843 New field.
2844 (target_supports_software_single_step): New macro.
2845
2d97cd35
AT
28462015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2847
2848 * linux-low.c (linux_wait_1): Fix pc advance condition.
2849 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2850 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2851
769ef81f
AT
28522015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2853
2854 * linux-arm-low.c (arm_is_thumb_mode): New function.
2855 (arm_breakpoint_at): Use arm_is_thumb_mode.
2856 (arm_breakpoint_kind_from_current_state): New function.
2857 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2858 Initialize.
2859 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2860 (linux_breakpoint_kind_from_current_state): New function.
2861 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2862 * linux-low.h (struct linux_target_ops)
2863 <breakpoint_kind_from_current_state>: New field.
2864 * target.h (struct target_ops): Likewise.
2865 (target_breakpoint_kind_from_current_state): New macro.
2866
1bebeeca
PA
28672015-11-30 Pedro Alves <palves@redhat.com>
2868
2869 * linux-low.c (linux_resume): Wake up the event loop before
2870 returning.
2871
a67a9fae
PA
28722015-11-30 Pedro Alves <palves@redhat.com>
2873
2874 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2875 check.
2876 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2877 to -1.
2878 * target.c (struct thread_search): New structure.
2879 (thread_search_callback): New function.
2880 (prev_general_thread): New global.
2881 (prepare_to_access_memory, done_accessing_memory): New functions.
2882 * target.h (prepare_to_access_memory, done_accessing_memory):
2883 Replace macros with function declarations.
2884
f2faf941
PA
28852015-11-30 Pedro Alves <palves@redhat.com>
2886
2887 PR 14618
2888 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2889 report TARGET_WAITKIND_NO_RESUMED.
2890 * remote-utils.c (prepare_resume_reply): Handle
2891 TARGET_WAITKIND_NO_RESUMED.
2892 * server.c (report_no_resumed): New global.
2893 (handle_query) <qSupported>: Handle "no-resumed+". Report
2894 "no-resumed+" support.
2895 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2896 return error if the client doesn't support no-resumed events.
2897 (push_stop_notification): New function.
2898 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2899 events if the client supports them.
2900
a681f9c9
PA
29012015-11-30 Pedro Alves <palves@redhat.com>
2902
2903 * linux-low.c (thread_still_has_status_pending_p): Don't check
2904 vCont;t here.
2905 (lwp_resumed): New function.
2906 (status_pending_p_callback): Return early if the LWP is not
2907 supposed to be resumed.
2908
65706a29
PA
29092015-11-30 Pedro Alves <palves@redhat.com>
2910
2911 * linux-low.c (handle_extended_wait): Assert that the LWP's
2912 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2913 thread create events, leave the new child's status pending.
2914 (linux_low_filter_event): If GDB wants to hear about thread exit
2915 events, leave the LWP marked dead and don't delete it.
2916 (linux_wait_for_event_filtered): Don't check for thread exit.
2917 (filter_exit_event): New function.
2918 (linux_wait_1): Use it, when returning an exit event.
2919 (linux_resume_one_lwp_throw): Assert that the LWP's
2920 waitstatus is TARGET_WAITKIND_IGNORE.
2921 * remote-utils.c (prepare_resume_reply): Handle
2922 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2923 * server.c (report_thread_events): New global.
2924 (handle_general_set): Handle QThreadEvents.
2925 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2926 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2927 TARGET_WAITKIND_THREAD_EXITED.
2928 * server.h (report_thread_events): Declare.
2929
56cf4bed
PA
29302015-11-30 Pedro Alves <palves@redhat.com>
2931
2932 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2933 the thread's last_resume_kind was resume_stop.
2934
500c1d85
PA
29352015-11-30 Pedro Alves <palves@redhat.com>
2936
2937 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2938 before returning.
2939
de979965
PA
29402015-11-30 Pedro Alves <palves@redhat.com>
2941
2942 * server.c (handle_v_requests): Handle vCtrlC.
2943
34c65914
PA
29442015-11-30 Pedro Alves <palves@redhat.com>
2945
2946 * gdbthread.h (find_any_thread_of_pid): Declare.
2947 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2948 functions.
2949 * server.c (handle_query): If current_thread is NULL, look for
2950 another thread of the selected process.
2951
79efa585 29522015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 2953 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
2954
2955 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2956 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2957 name in reply.
2958 * target.h (struct target_ops) <thread_name>: New field.
2959 (target_thread_name): New macro.
2960
80d82c19
JB
29612015-11-23 Joel Brobecker <brobecker@adacore.com>
2962
2963 * regcache.h (regcache_invalidate_pid): Add declaration.
2964 * regcache.c (regcache_invalidate_pid): New function, extracted
2965 from regcache_invalidate.
2966 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2967 Add trivial documentation comment.
2968 * lynx-low.c: Use regcache_invalidate_pid instead of
2969 regcache_invalidate.
2970
64da5dd5
JB
29712015-11-23 Joel Brobecker <brobecker@adacore.com>
2972
2973 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2974 and Elf64_auxv_t if the target is Android.
2975
37ce4055
DE
29762015-11-22 Doug Evans <xdje42@gmail.com>
2977
2978 * target.h: #include <sys/types.h>.
2979
06e03fff
PA
29802015-11-19 Pedro Alves <palves@redhat.com>
2981
2982 * linux-low.c (linux_process_qsupported): Change prototype.
2983 Adjust.
2984 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2985 Change prototype.
2986 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2987 and adjust to loop over all features.
2988 * server.c (handle_query) <qSupported>: Adjust to call
2989 target_process_qsupported once, passing it a vector of unprocessed
2990 features.
2991 * target.h (struct target_ops) <process_qsupported>: Change
2992 prototype.
2993 (target_process_qsupported): Adjust.
2994
9a084706
PA
29952015-11-19 Pedro Alves <palves@redhat.com>
2996
2997 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2998 mode.
2999 * configure: Regenerate.
3000
dad44a1f
PA
30012015-11-19 Pedro Alves <palves@redhat.com>
3002
3003 * configure: Regenerate.
3004
231c0592
YQ
30052015-11-19 Yao Qi <yao.qi@linaro.org>
3006
3007 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3008 type to uint32_t.
3009
6c1c9a8b
YQ
30102015-11-19 Yao Qi <yao.qi@linaro.org>
3011
3012 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3013 (struct aarch64_operand): Move enum out.
3014
9caa3311
YQ
30152015-11-19 Yao Qi <yao.qi@linaro.org>
3016
3017 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3018 struct user_fpsimd_state *.
3019 (aarch64_store_fpregset): Likewise.
3020
6a69a054
YQ
30212015-11-19 Yao Qi <yao.qi@linaro.org>
3022
3023 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3024 struct user_pt_regs *.
3025 (aarch64_store_gregset): Likewise.
3026
1798301e
PA
30272015-11-18 Pedro Alves <palves@redhat.com>
3028
3029 * Makefile.in (all_object_files): Add $IPA_OBJS.
3030
ce7715e2
PA
30312015-11-17 Pedro Alves <palves@redhat.com>
3032
3033 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3034 GDB_SIGNAL_0 and gdb_signal_to_string.
3035
c0879059
PA
30362015-11-17 Pedro Alves <palves@redhat.com>
3037
3038 * win32-low.c (handle_output_debug_string): Remove parameter.
3039 (win32_kill): Remove our_status local and adjust call to
3040 handle_output_debug_string.
3041 (get_child_debug_event): Adjust call to
3042 handle_output_debug_string.
3043
1996e237
SM
30442015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3045
3046 * linux-mips-low.c (mips_fill_gregset): Add cast.
3047 (mips_store_gregset): Likewise.
3048 (mips_fill_fpregset): Likewise.
3049 (mips_store_fpregset): Likewise.
3050
cbec665b
SM
30512015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3052
3053 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3054 priv.
3055
eb3e3c67
SM
30562015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3057
3058 * linux-mips-low.c (mips_linux_new_thread): Change type of
3059 watch_type to enum target_hw_bp_type.
3060
171de4b8
SM
30612015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3062
3063 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3064 Change return type to arm_hwbp_type.
3065
04248ead
SM
30662015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3067
3068 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3069 (arm_store_gregset): Likewise.
3070 * linux-arm-low.c (arm_get_hwcap): Likewise.
3071 (arm_read_description): Likewise.
3072
04b3479c
SM
30732015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3074
3075 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3076
2bc84e8a
SM
30772015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3078
3079 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3080 (ppc_fill_vsxregset): Likewise.
3081 (ppc_store_vsxregset): Likewise.
3082 (ppc_fill_vrregset): Likewise.
3083 (ppc_store_vrregset): Likewise.
3084 (ppc_fill_evrregset): Likewise.
3085 (ppc_store_evrregset): Likewise.
3086
e6c5bb05
SM
30872015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3088
3089 * linux-ppc-low.c (ppc_usrregs_info): Remove
3090 forward-declaration.
3091 (ppc_arch_setup): Move lower in file.
3092
7ea45d72
SM
30932015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3094
3095 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3096 (ps_pdwrite): Likewise.
3097
69291610
HW
30982015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3099
3100 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3101 to after assert checks.
3102
b42945fd
SM
31032015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3104
3105 * proc-service.c (ps_pdread): Add/adjust casts.
3106 (ps_pdwrite): Add/adjust casts.
3107
d6f85c84
SM
31082015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3109
3110 * server.c (handle_search_memory_1): Cast return value of
3111 memmem.
3112
f98cd059
SM
31132015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3114
3115 * server.c (write_qxfer_response): Change type of data to
3116 gdb_byte *.
3117
d2412fa5
PA
31182015-10-29 Pedro Alves <palves@redhat.com>
3119
3120 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3121
c17414a2
PA
31222015-10-29 Pedro Alves <palves@redhat.com>
3123
3124 * tracepoint.c (clear_installed_tracepoints): Add casts.
3125
e053fbc4
PA
31262015-10-29 Pedro Alves <palves@redhat.com>
3127
3128 * server.c (handle_v_cont, process_serial_event): Add enum
3129 gdb_signal casts to signal parsing code.
3130
add67df8
PA
31312015-10-29 Pedro Alves <palves@redhat.com>
3132
3133 * linux-low.h (NULL_REGSET): Define.
3134 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3135 * linux-arm-low.c (arm_regsets): Likewise.
3136 * linux-crisv32-low.c (cris_regsets): Likewise.
3137 * linux-m68k-low.c (m68k_regsets): Likewise.
3138 * linux-mips-low.c (mips_regsets): Likewise.
3139 * linux-nios2-low.c (nios2_regsets): Likewise.
3140 * linux-ppc-low.c (ppc_regsets): Likewise.
3141 * linux-s390-low.c (s390_regsets): Likewise.
3142 * linux-sh-low.c (sh_regsets): Likewise.
3143 * linux-sparc-low.c (sparc_regsets): Likewise.
3144 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3145 * linux-tile-low.c (tile_regsets): Likewise.
3146 * linux-x86-low.c (x86_regsets): Likewise.
3147 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3148
50bc912a
PA
31492015-10-29 Pedro Alves <palves@redhat.com>
3150
3151 * linux-low.h (NULL_REGSET): Define.
3152 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3153 * linux-arm-low.c (arm_regsets): Likewise.
3154 * linux-crisv32-low.c (cris_regsets): Likewise.
3155 * linux-m68k-low.c (m68k_regsets): Likewise.
3156 * linux-mips-low.c (mips_regsets): Likewise.
3157 * linux-nios2-low.c (nios2_regsets): Likewise.
3158 * linux-ppc-low.c (ppc_regsets): Likewise.
3159 * linux-s390-low.c (s390_regsets): Likewise.
3160 * linux-sh-low.c (sh_regsets): Likewise.
3161 * linux-sparc-low.c (sparc_regsets): Likewise.
3162 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3163 * linux-tile-low.c (tile_regsets): Likewise.
3164 * linux-x86-low.c (x86_regsets): Likewise.
3165 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3166
682b2546
DE
31672015-10-26 Doug Evans <dje@google.com>
3168
3169 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3170
963843d4
DE
31712015-10-26 Doug Evans <dje@google.com>
3172
3173 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3174
d41401ac
DE
31752015-10-26 Doug Evans <dje@google.com>
3176
3177 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3178 for debug_printf.
3179 (attach_thread, find_new_threads_callback): Ditto.
3180
3db28855
AT
31812015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3182
3183 * mem-break.h (set_breakpoint_data): Remove.
3184
fb78e89c
AT
31852015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3186
3187 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3188 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3189 (initialize_low): Remove set_breakpoint_data call.
3190 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3191 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3192 (initialize_low): Remove set_breakpoint_data call.
3193 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3194 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3195 (initialize_low): Remove set_breakpoint_data call.
3196
2e6ee069
AT
31972015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3198
3199 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3200 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3201 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3202 * target.h (target_breakpoint_kind_from_pc): New macro.
3203
1652a986
AT
32042015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3205
3206 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3207 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3208 the default breakpoint kind.
3209
abeead09
AT
32102015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3211
3212 * linux-arm-low.c (arm_supports_z_point_type): Add software
3213 breakpoint support.
3214
b0b4b501
AT
32152015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3216
3217 * linux-arm-low.c: Refactor breakpoint definitions.
3218 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3219 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3220
8689682c
AT
32212015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3222
3223 * Makefile.in: Add arm.c/o.
3224 * configure.srv: Likewise.
3225 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3226 (arm_breakpoint_kind_from_pc): New function.
3227 (arm_sw_breakpoint_from_kind): Return proper kind.
3228 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3229
27165294
AT
32302015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3231
3232 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3233 removal.
3234 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3235 (struct raw_breakpoint) <size>: Remove.
3236 (struct raw_breakpoint) <kind>: Add.
3237 (bp_size): New function.
3238 (bp_opcode): Likewise.
3239 (find_raw_breakpoint_at): Adjust for kind.
3240 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3241 (remove_memory_breakpoint): Adjust for kind call bp_size.
3242 (set_raw_breakpoint_at): Adjust for kind.
3243 (set_breakpoint): Likewise.
3244 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3245 (delete_raw_breakpoint): Adjust for kind.
3246 (delete_breakpoint): Likewise.
3247 (find_gdb_breakpoint): Likewise.
3248 (set_gdb_breakpoint_1): Likewise.
3249 (set_gdb_breakpoint): Likewise.
3250 (delete_gdb_breakpoint_1): Likewise.
3251 (delete_gdb_breakpoint): Likewise.
3252 (uninsert_raw_breakpoint): Likewise.
3253 (reinsert_raw_breakpoint): Likewise.
3254 (set_breakpoint_data): Remove.
3255 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3256 (check_mem_read): Adjust for kind call bp_size.
3257 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3258 (clone_one_breakpoint): Adjust for kind.
3259 * mem-break.h (set_gdb_breakpoint): Likewise.
3260 (delete_gdb_breakpoint): Likewise.
3261 * server.c (process_serial_event): Likewise.
3262
dd373349
AT
32632015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3264
3265 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3266 (struct linux_target_ops) <breakpoint>: Remove.
3267 (struct linux_target_ops) <breakpoint_len>: Remove.
3268 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3269 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3270 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3271 (arm_sw_breakpoint_from_kind): New function.
3272 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3273 (struct linux_target_ops) <breakpoint>: Remove.
3274 (struct linux_target_ops) <breakpoint_len>: Remove.
3275 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3276 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3277 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3278 (struct linux_target_ops) <breakpoint>: Remove.
3279 (struct linux_target_ops) <breakpoint_len>: Remove.
3280 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3281 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3282 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3283 (struct linux_target_ops) <breakpoint>: Remove.
3284 (struct linux_target_ops) <breakpoint_len>: Remove.
3285 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3286 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3287 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3288 and sw_breakpoint_from_kind to increment the pc.
3289 (linux_breakpoint_kind_from_pc): New function.
3290 (linux_sw_breakpoint_from_kind): New function.
3291 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3292 (initialize_low): Call breakpoint_kind_from_pc and
3293 sw_breakpoint_from_kind to replace breakpoint_data/len.
3294 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3295 New field.
3296 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3297 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3298 (struct linux_target_ops) <breakpoint>: Remove.
3299 (struct linux_target_ops) <breakpoint_len>: Remove.
3300 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3301 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3302 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3303 (struct linux_target_ops) <breakpoint>: Remove.
3304 (struct linux_target_ops) <breakpoint_len>: Remove.
3305 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3306 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3307 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3308 (struct linux_target_ops) <breakpoint>: Remove.
3309 (struct linux_target_ops) <breakpoint_len>: Remove.
3310 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3311 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3312 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3313 (struct linux_target_ops) <breakpoint>: Remove.
3314 (struct linux_target_ops) <breakpoint_len>: Remove.
3315 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3316 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3317 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3318 (struct linux_target_ops) <breakpoint>: Remove.
3319 (struct linux_target_ops) <breakpoint_len>: Remove.
3320 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3321 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3322 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3323 (struct linux_target_ops) <breakpoint>: Remove.
3324 (struct linux_target_ops) <breakpoint_len>: Remove.
3325 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3326 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3327 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3328 (struct linux_target_ops) <breakpoint>: Remove.
3329 (struct linux_target_ops) <breakpoint_len>: Remove.
3330 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3331 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3332 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3333 (struct linux_target_ops) <breakpoint>: Remove.
3334 (struct linux_target_ops) <breakpoint_len>: Remove.
3335 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3336 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3337 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3338 (struct linux_target_ops) <breakpoint>: Remove.
3339 (struct linux_target_ops) <breakpoint_len>: Remove.
3340 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3341 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3342 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3343 * linux-x86-low.c (x86_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-xtensa-low.c (xtensa_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
4cd98a19
AT
33542015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3355
3356 * linux-cris-low.c (cris_get_pc): Remove void arg.
3357
774ee6d2
AR
33582015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3359
3360 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3361 variable name.
3362
833dcd29
AR
33632015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3364
3365 * inferiors.c (thread_pid_matches_callback): New function.
3366 (find_thread_process): New function.
3367 (remove_thread): Reset current_thread.
3368 (remove_process): Assert threads have been removed first.
3369
8d689ee5
YQ
33702015-10-15 Yao Qi <yao.qi@linaro.org>
3371
3372 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3373 if it is 3.
3374 (aarch64_remove_point): Likewise.
3375 * regcache.c (regcache_register_size): New function.
3376
1c2e1515
YQ
33772015-10-12 Yao Qi <yao.qi@linaro.org>
3378
3379 * linux-aarch64-low.c: Update all callers as emit_load_store
3380 is renamed to aarch64_emit_load_store.
3381
e1c587c3
YQ
33822015-10-12 Yao Qi <yao.qi@linaro.org>
3383
3384 * linux-aarch64-low.c: Update all callers of function renaming
3385 from emit_insn to aarch64_emit_insn.
3386
b6542f81
YQ
33872015-10-12 Yao Qi <yao.qi@linaro.org>
3388
3389 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3390 arch/aarch64-insn.h.
3391 (struct aarch64_memory_operand): Likewise.
3392 (ENCODE): Likewise.
3393 (emit_insn): Move to arch/aarch64-insn.c.
3394 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3395 (emit_load_store): Move to arch/aarch64-insn.c.
3396 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3397 (can_encode_int32): Remove.
3398
246994ce
YQ
33992015-10-12 Yao Qi <yao.qi@linaro.org>
3400
3401 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3402 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3403 (aarch64_relocate_instruction): Likewise.
3404 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3405 (struct aarch64_insn_visitor): Likewise.
3406
0badd99f
YQ
34072015-10-12 Yao Qi <yao.qi@linaro.org>
3408
3409 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3410 (struct aarch64_insn_visitor): New.
3411 (struct aarch64_insn_relocation_data): New.
3412 (aarch64_ftrace_insn_reloc_b): New function.
3413 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3414 (aarch64_ftrace_insn_reloc_cb): Likewise.
3415 (aarch64_ftrace_insn_reloc_tb): Likewise.
3416 (aarch64_ftrace_insn_reloc_adr): Likewise.
3417 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3418 (aarch64_ftrace_insn_reloc_others): Likewise.
3419 (visitor): New.
3420 (aarch64_relocate_instruction): Use visitor.
3421
dfaffe9d
YQ
34222015-10-12 Yao Qi <yao.qi@linaro.org>
3423
3424 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3425 int. Add argument buf.
3426 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3427 aarch64_relocate_instruction.
3428
70b439f0
YQ
34292015-10-12 Yao Qi <yao.qi@linaro.org>
3430
3431 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3432 argument insn. Remove local variable insn. Don't call
3433 target_read_uint32.
3434 (aarch64_install_fast_tracepoint_jump_pad): Call
3435 target_read_uint32.
3436
7781c06f
YQ
34372015-09-30 Yao Qi <yao.qi@linaro.org>
3438
3439 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3440 (emit_load_store_pair): Likewise.
3441
9a3c8263
SM
34422015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3443
3444 * dll.c (match_dll): Add cast(s).
3445 (unloaded_dll): Likewise.
3446 * linux-low.c (second_thread_of_pid_p): Likewise.
3447 (delete_lwp_callback): Likewise.
3448 (count_events_callback): Likewise.
3449 (select_event_lwp_callback): Likewise.
3450 (linux_set_resume_request): Likewise.
3451 * server.c (accumulate_file_name_length): Likewise.
3452 (emit_dll_description): Likewise.
3453 (handle_qxfer_threads_worker): Likewise.
3454 (visit_actioned_threads): Likewise.
3455 * thread-db.c (any_thread_of): Likewise.
3456 * tracepoint.c (same_process_p): Likewise.
3457 (match_blocktype): Likewise.
3458 (build_traceframe_info_xml): Likewise.
3459
224c3ddb
SM
34602015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3461
3462 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3463 assignment.
3464 (gdb_unparse_agent_expr): Likewise.
3465 * hostio.c (require_data): Likewise.
3466 (handle_pread): Likewise.
3467 * linux-low.c (disable_regset): Likewise.
3468 (fetch_register): Likewise.
3469 (store_register): Likewise.
3470 (get_dynamic): Likewise.
3471 (linux_qxfer_libraries_svr4): Likewise.
3472 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3473 (set_fast_tracepoint_jump): Likewise.
3474 (uninsert_fast_tracepoint_jumps_at): Likewise.
3475 (reinsert_fast_tracepoint_jumps_at): Likewise.
3476 (validate_inserted_breakpoint): Likewise.
3477 (clone_agent_expr): Likewise.
3478 * regcache.c (init_register_cache): Likewise.
3479 * remote-utils.c (putpkt_binary_1): Likewise.
3480 (decode_M_packet): Likewise.
3481 (decode_X_packet): Likewise.
3482 (look_up_one_symbol): Likewise.
3483 (relocate_instruction): Likewise.
3484 (monitor_output): Likewise.
3485 * server.c (handle_search_memory): Likewise.
3486 (handle_qxfer_exec_file): Likewise.
3487 (handle_qxfer_libraries): Likewise.
3488 (handle_qxfer): Likewise.
3489 (handle_query): Likewise.
3490 (handle_v_cont): Likewise.
3491 (handle_v_run): Likewise.
3492 (captured_main): Likewise.
3493 * target.c (write_inferior_memory): Likewise.
3494 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3495 * tracepoint.c (init_trace_buffer): Likewise.
3496 (add_tracepoint_action): Likewise.
3497 (add_traceframe): Likewise.
3498 (add_traceframe_block): Likewise.
3499 (cmd_qtdpsrc): Likewise.
3500 (cmd_qtdv): Likewise.
3501 (cmd_qtstatus): Likewise.
3502 (response_source): Likewise.
3503 (response_tsv): Likewise.
3504 (cmd_qtnotes): Likewise.
3505 (gdb_collect): Likewise.
3506 (initialize_tracepoint): Likewise.
3507
afbe19f8
PL
35082015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3509
3510 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3511 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3512 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3513 <NOP>: New.
3514 (enum aarch64_condition_codes): New enum.
3515 (w0): New static global.
3516 (fp): Likewise.
3517 (lr): Likewise.
3518 (struct aarch64_memory_operand) <type>: New
3519 MEMORY_OPERAND_POSTINDEX type.
3520 (postindex_memory_operand): New helper function.
3521 (emit_ret): New function.
3522 (emit_load_store_pair): New function, factored out of emit_stp
3523 with support for MEMORY_OPERAND_POSTINDEX.
3524 (emit_stp): Rewrite using emit_load_store_pair.
3525 (emit_ldp): New function.
3526 (emit_load_store): Likewise.
3527 (emit_ldr): Mention post-index instruction in comment.
3528 (emit_ldrh): New function.
3529 (emit_ldrb): New function.
3530 (emit_ldrsw): Mention post-index instruction in comment.
3531 (emit_str): Likewise.
3532 (emit_subs): New function.
3533 (emit_cmp): Likewise.
3534 (emit_and): Likewise.
3535 (emit_orr): Likewise.
3536 (emit_orn): Likewise.
3537 (emit_eor): Likewise.
3538 (emit_mvn): Likewise.
3539 (emit_lslv): Likewise.
3540 (emit_lsrv): Likewise.
3541 (emit_asrv): Likewise.
3542 (emit_mul): Likewise.
3543 (emit_sbfm): Likewise.
3544 (emit_sbfx): Likewise.
3545 (emit_ubfm): Likewise.
3546 (emit_ubfx): Likewise.
3547 (emit_csinc): Likewise.
3548 (emit_cset): Likewise.
3549 (emit_nop): Likewise.
3550 (emit_ops_insns): New helper function.
3551 (emit_pop): Likewise.
3552 (emit_push): Likewise.
3553 (aarch64_emit_prologue): New function.
3554 (aarch64_emit_epilogue): Likewise.
3555 (aarch64_emit_add): Likewise.
3556 (aarch64_emit_sub): Likewise.
3557 (aarch64_emit_mul): Likewise.
3558 (aarch64_emit_lsh): Likewise.
3559 (aarch64_emit_rsh_signed): Likewise.
3560 (aarch64_emit_rsh_unsigned): Likewise.
3561 (aarch64_emit_ext): Likewise.
3562 (aarch64_emit_log_not): Likewise.
3563 (aarch64_emit_bit_and): Likewise.
3564 (aarch64_emit_bit_or): Likewise.
3565 (aarch64_emit_bit_xor): Likewise.
3566 (aarch64_emit_bit_not): Likewise.
3567 (aarch64_emit_equal): Likewise.
3568 (aarch64_emit_less_signed): Likewise.
3569 (aarch64_emit_less_unsigned): Likewise.
3570 (aarch64_emit_ref): Likewise.
3571 (aarch64_emit_if_goto): Likewise.
3572 (aarch64_emit_goto): Likewise.
3573 (aarch64_write_goto_address): Likewise.
3574 (aarch64_emit_const): Likewise.
3575 (aarch64_emit_call): Likewise.
3576 (aarch64_emit_reg): Likewise.
3577 (aarch64_emit_pop): Likewise.
3578 (aarch64_emit_stack_flush): Likewise.
3579 (aarch64_emit_zero_ext): Likewise.
3580 (aarch64_emit_swap): Likewise.
3581 (aarch64_emit_stack_adjust): Likewise.
3582 (aarch64_emit_int_call_1): Likewise.
3583 (aarch64_emit_void_call_2): Likewise.
3584 (aarch64_emit_eq_goto): Likewise.
3585 (aarch64_emit_ne_goto): Likewise.
3586 (aarch64_emit_lt_goto): Likewise.
3587 (aarch64_emit_le_goto): Likewise.
3588 (aarch64_emit_gt_goto): Likewise.
3589 (aarch64_emit_ge_got): Likewise.
3590 (aarch64_emit_ops_impl): New static global variable.
3591 (aarch64_emit_ops): New target function, return
3592 &aarch64_emit_ops_impl.
3593 (struct linux_target_ops): Install it.
3594
bb903df0
PL
35952015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3596
3597 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3598 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3599 aarch64-ipa.o.
3600 * linux-aarch64-ipa.c: New file.
3601 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3602 and endian.h.
3603 (aarch64_get_thread_area): New target method.
3604 (extract_signed_bitfield): New helper function.
3605 (aarch64_decode_ldr_literal): New function.
3606 (enum aarch64_opcodes): New enum.
3607 (struct aarch64_register): New struct.
3608 (struct aarch64_operand): New struct.
3609 (x0): New static global.
3610 (x1): Likewise.
3611 (x2): Likewise.
3612 (x3): Likewise.
3613 (x4): Likewise.
3614 (w2): Likewise.
3615 (ip0): Likewise.
3616 (sp): Likewise.
3617 (xzr): Likewise.
3618 (aarch64_register): New helper function.
3619 (register_operand): Likewise.
3620 (immediate_operand): Likewise.
3621 (struct aarch64_memory_operand): New struct.
3622 (offset_memory_operand): New helper function.
3623 (preindex_memory_operand): Likewise.
3624 (enum aarch64_system_control_registers): New enum.
3625 (ENCODE): New macro.
3626 (emit_insn): New helper function.
3627 (emit_b): New function.
3628 (emit_bcond): Likewise.
3629 (emit_cb): Likewise.
3630 (emit_tb): Likewise.
3631 (emit_blr): Likewise.
3632 (emit_stp): Likewise.
3633 (emit_ldp_q_offset): Likewise.
3634 (emit_stp_q_offset): Likewise.
3635 (emit_load_store): Likewise.
3636 (emit_ldr): Likewise.
3637 (emit_ldrsw): Likewise.
3638 (emit_str): Likewise.
3639 (emit_ldaxr): Likewise.
3640 (emit_stxr): Likewise.
3641 (emit_stlr): Likewise.
3642 (emit_data_processing_reg): Likewise.
3643 (emit_data_processing): Likewise.
3644 (emit_add): Likewise.
3645 (emit_sub): Likewise.
3646 (emit_mov): Likewise.
3647 (emit_movk): Likewise.
3648 (emit_mov_addr): Likewise.
3649 (emit_mrs): Likewise.
3650 (emit_msr): Likewise.
3651 (emit_sevl): Likewise.
3652 (emit_wfe): Likewise.
3653 (append_insns): Likewise.
3654 (can_encode_int32_in): New helper function.
3655 (aarch64_relocate_instruction): New function.
3656 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3657 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3658 (struct linux_target_ops): Install aarch64_get_thread_area,
3659 aarch64_install_fast_tracepoint_jump_pad and
3660 aarch64_get_min_fast_tracepoint_insn_len.
3661
787749ea
PL
36622015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3663
3664 * Makefile.in (aarch64-insn.o): New rule.
3665 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3666
9812b2e6
YQ
36672015-09-21 Yao Qi <yao.qi@linaro.org>
3668
3669 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3670
18fe412b
YQ
36712015-09-21 Yao Qi <yao.qi@linaro.org>
3672
3673 * tracepoint.c (max_jump_pad_size): Remove.
3674
a0cc84cd
YQ
36752015-09-18 Yao Qi <yao.qi@linaro.org>
3676
3677 * linux-aarch64-low.c: Don't include sys/uio.h.
3678 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3679
d78908cf
WW
36802015-09-16 Wei-cheng Wang <cole945@gmail.com>
3681
3682 * tracepoint.c (eval_result_type): Change prototype.
3683 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3684
d57e0d50
PA
36852015-09-15 Pedro Alves <palves@redhat.com>
3686
3687 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3688 Check whether to report exec events instead of checking whether
3689 multiprocess is enabled.
3690
5a676acc
PA
36912015-09-15 Pedro Alves <palves@redhat.com>
3692
3693 PR remote/18965
3694 * remote-utils.c (prepare_resume_reply): Merge
3695 TARGET_WAITKIND_VFORK_DONE switch case with the
3696 TARGET_WAITKIND_FORKED case.
3697
7c5d0fad
YQ
36982015-09-15 Yao Qi <yao.qi@linaro.org>
3699
3700 * server.c (handle_query): Check string comparison using
3701 "else if" instead of "if".
3702
750ce8d1
YQ
37032015-09-15 Yao Qi <yao.qi@linaro.org>
3704
3705 * server.c (vCont_supported): New global variable.
3706 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3707 matches. Append ";vContSupported+" to own_buf.
3708 (handle_v_requests): Append ";s;S" to own_buf if target supports
3709 hardware single step or vCont_supported is false.
3710 (capture_main): Set vCont_supported to zero.
3711
70b90b91
YQ
37122015-09-15 Yao Qi <yao.qi@linaro.org>
3713
3714 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3715 it to ...
3716 (linux_supports_hardware_single_step): ... New function.
3717 (linux_target_ops): Update.
3718 * lynx-low.c (lynx_target_ops): Set field
3719 supports_hardware_single_step to target_can_do_hardware_single_step.
3720 * nto-low.c (nto_target_ops): Likewise.
3721 * spu-low.c (spu_target_ops): Likewise.
3722 * win32-low.c (win32_target_ops): Likewise.
3723 * target.c (target_can_do_hardware_single_step): New function.
3724 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3725 Remove. <supports_hardware_single_step>: New field.
3726 (target_supports_conditional_breakpoints): Remove.
3727 (target_supports_hardware_single_step): New macro.
3728 (target_can_do_hardware_single_step): Declare.
3729 * server.c (handle_query): Use target_supports_hardware_single_step
3730 instead of target_supports_conditional_breakpoints.
3731
ade90bde
YQ
37322015-09-15 Yao Qi <yao.qi@linaro.org>
3733
3734 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3735 function.
3736 (struct linux_target_ops the_low_target): Install
3737 aarch64_linux_siginfo_fixup.
3738
94585166
DB
37392015-09-11 Don Breazeal <donb@codesourcery.com>
3740 Luis Machado <lgustavo@codesourcery.com>
3741
3742 * linux-low.c (linux_mourn): Static declaration.
3743 (linux_arch_setup): Move in front of
3744 handle_extended_wait.
3745 (linux_arch_setup_thread): New function.
3746 (handle_extended_wait): Handle exec events. Call
3747 linux_arch_setup_thread. Make event_lwp argument a
3748 pointer-to-a-pointer.
3749 (check_zombie_leaders): Do not check stopped threads.
3750 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3751 (linux_low_filter_event): Add lwp and thread for exec'ing
3752 non-leader thread if leader thread has been deleted.
3753 Refactor code into linux_arch_setup_thread and call it.
3754 Pass child lwp pointer by reference to handle_extended_wait.
3755 (linux_wait_for_event_filtered): Update comment.
3756 (linux_wait_1): Prevent clobbering exec event status.
3757 (linux_supports_exec_events): New function.
3758 (linux_target_ops) <supports_exec_events>: Initialize new member.
3759 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3760 new member.
3761 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3762 * server.c (report_exec_events): New global variable.
3763 (handle_query): Handle qSupported query for exec-events feature.
3764 (captured_main): Initialize report_exec_events.
3765 * server.h (report_exec_events): Declare new global variable.
3766 * target.h (struct target_ops) <supports_exec_events>: New
3767 member.
3768 (target_supports_exec_events): New macro.
3769 * win32-low.c (win32_target_ops) <supports_exec_events>:
3770 Initialize new member.
3771
0568462b
MM
37722015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3773
3774 * linux-low.c (linux_low_enable_btrace): Remove.
3775 (linux_target_ops): Replace linux_low_enable_btrace with
3776 linux_enable_btrace.
3777
39edd165
YQ
37782015-09-03 Yao Qi <yao.qi@linaro.org>
3779
3780 * linux-aarch64-low.c (aarch64_insert_point): Call
3781 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3782 returns true.
3783
1db33b5a
UW
37842015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3785
3786 * linux-low.c (check_stopped_by_breakpoint): Use
3787 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3788
ab290430
PA
37892015-08-27 Pedro Alves <palves@redhat.com>
3790
3791 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3792
8d749320
SM
37932015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3794
6711b7f8
SM
3795 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3796 the XNEW-family equivalent.
8d749320
SM
3797 (compile_bytecodes): Likewise.
3798 * dll.c (loaded_dll): Likewise.
3799 * event-loop.c (append_callback_event): Likewise.
3800 (create_file_handler): Likewise.
3801 (create_file_event): Likewise.
3802 * hostio.c (handle_open): Likewise.
3803 * inferiors.c (add_thread): Likewise.
3804 (add_process): Likewise.
3805 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3806 * linux-arm-low.c (arm_new_process): Likewise.
3807 (arm_new_thread): Likewise.
3808 * linux-low.c (add_to_pid_list): Likewise.
3809 (linux_add_process): Likewise.
3810 (handle_extended_wait): Likewise.
3811 (add_lwp): Likewise.
3812 (enqueue_one_deferred_signal): Likewise.
3813 (enqueue_pending_signal): Likewise.
3814 (linux_resume_one_lwp_throw): Likewise.
3815 (linux_resume_one_thread): Likewise.
3816 (linux_read_memory): Likewise.
3817 (linux_write_memory): Likewise.
3818 * linux-mips-low.c (mips_linux_new_process): Likewise.
3819 (mips_linux_new_thread): Likewise.
3820 (mips_add_watchpoint): Likewise.
3821 * linux-x86-low.c (initialize_low_arch): Likewise.
3822 * lynx-low.c (lynx_add_process): Likewise.
3823 * mem-break.c (set_raw_breakpoint_at): Likewise.
3824 (set_breakpoint): Likewise.
3825 (add_condition_to_breakpoint): Likewise.
3826 (add_commands_to_breakpoint): Likewise.
3827 (clone_agent_expr): Likewise.
3828 (clone_one_breakpoint): Likewise.
3829 * regcache.c (new_register_cache): Likewise.
3830 * remote-utils.c (look_up_one_symbol): Likewise.
3831 * server.c (queue_stop_reply): Likewise.
3832 (start_inferior): Likewise.
3833 (queue_stop_reply_callback): Likewise.
3834 (handle_target_event): Likewise.
3835 * spu-low.c (fetch_ppc_memory): Likewise.
3836 (store_ppc_memory): Likewise.
3837 * target.c (set_target_ops): Likewise.
3838 * thread-db.c (thread_db_load_search): Likewise.
3839 (try_thread_db_load_1): Likewise.
3840 * tracepoint.c (add_tracepoint): Likewise.
3841 (add_tracepoint_action): Likewise.
3842 (create_trace_state_variable): Likewise.
3843 (cmd_qtdpsrc): Likewise.
3844 (cmd_qtro): Likewise.
3845 (add_while_stepping_state): Likewise.
3846 * win32-low.c (child_add_thread): Likewise.
3847 (get_image_name): Likewise.
3848
ed8b7b42
YQ
38492015-08-25 Yao Qi <yao.qi@linaro.org>
3850
3851 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3852
db3cb7cb
YQ
38532015-08-25 Yao Qi <yao.qi@linaro.org>
3854
3855 * Makefile.in (aarch64-linux.o): New rule.
3856 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3857 srv_tgtobj.
3858 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3859 (aarch64_init_debug_reg_state): Make it extern.
3860 (aarch64_linux_prepare_to_resume): Remove.
3861
f6011a1c
YQ
38622015-08-25 Yao Qi <yao.qi@linaro.org>
3863
3864 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3865 lwp_arch_private_info and ptid_of_lwp.
3866
88e2cf7e
YQ
38672015-08-25 Yao Qi <yao.qi@linaro.org>
3868
3869 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3870 Find proc_info by find_process_pid. All callers updated.
3871
5e35436e
YQ
38722015-08-25 Yao Qi <yao.qi@linaro.org>
3873
3874 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3875 Remove.
3876 (debug_reg_change_callback): Remove.
3877 (aarch64_notify_debug_reg_change): Remove.
3878
4a8a7965
YQ
38792015-08-25 Yao Qi <yao.qi@linaro.org>
3880
3881 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3882 Call current_lwp_ptid.
3883
32a271ee
YQ
38842015-08-25 Yao Qi <yao.qi@linaro.org>
3885
3886 * linux-aarch64-low.c (debug_reg_change_callback): Use
3887 debug_printf.
3888
0d51c8d7
YQ
38892015-08-25 Yao Qi <yao.qi@linaro.org>
3890
3891 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3892
31a43dd5
YQ
38932015-08-25 Yao Qi <yao.qi@linaro.org>
3894
3895 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3896
8ee52567
YQ
38972015-08-25 Yao Qi <yao.qi@linaro.org>
3898
3899 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3900 the code.
3901
ff3f0f45
YQ
39022015-08-25 Yao Qi <yao.qi@linaro.org>
3903
3904 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3905 Remove.
3906 (debug_reg_change_callback): Remove argument entry and add argument
3907 lwp. Remove local variable thread. Don't print thread id in the
3908 debugging output. Don't check whether pid of thread equals to pid.
3909 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3910 iterate_over_lwps instead find_inferior.
3911
3d40fbb5
PA
39122015-08-24 Pedro Alves <palves@redhat.com>
3913
3914 * inferiors.c (get_first_process): New function.
3915 * inferiors.h (get_first_process): New declaration.
3916 * remote-utils.c (read_ptid): Default to the first process in the
3917 list, instead of to the current thread's process.
3918
438e1e42
PA
39192015-08-24 Pedro Alves <palves@redhat.com>
3920
3921 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3922 * event-loop.c: Likewise.
3923 * remote-utils.c: Likewise.
3924 * tracepoint.c: Likewise.
3925
a8c6d4fc
PA
39262015-08-24 Pedro Alves <palves@redhat.com>
3927
3928 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3929 ptid_get_lwp.
3930
99b0bb12
PA
39312015-08-21 Pedro Alves <palves@redhat.com>
3932
3933 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3934 instead of literal 1.
3935
f8904751
PA
39362015-08-21 Pedro Alves <palves@redhat.com>
3937
3938 * tdesc.c (default_description): Explicitly zero-initialize.
3939
465a859e
PA
39402015-08-21 Pedro Alves <palves@redhat.com>
3941
3942 PR gdb/18749
3943 * inferiors.c (remove_thread): Discard any pending stop reply for
3944 this thread.
3945 * server.c (remove_all_on_match_pid): Rename to ...
3946 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3947 instead of a pid.
3948 (discard_queued_stop_replies): Change parameter to a ptid. Now
3949 extern.
3950 (handle_v_kill, kill_inferior_callback, captured_main)
3951 (process_serial_event): Adjust.
3952 * server.h (discard_queued_stop_replies): Declare.
3953
f0db101d
PA
39542015-08-21 Pedro Alves <palves@redhat.com>
3955
3956 * linux-low.c (wait_for_sigstop): Always switch to no thread
3957 selected if the previously current thread dies.
3958 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3959 process instead of the current thread's.
3960 * remote-utils.c (input_interrupt): Don't check if there's no
3961 current thread.
3962 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3963 current thread to the general thread fails, error out.
3964 (handle_qxfer_auxv, handle_qxfer_libraries)
3965 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3966 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3967 (handle_query): Check if there's a thread selected instead of
3968 checking whether there's any thread in the thread list.
3969 (handle_qxfer_threads, handle_qxfer_btrace)
3970 (handle_qxfer_btrace_conf): Don't error out early if there's no
3971 thread in the thread list.
3972 (handle_v_cont, myresume): Don't set the current thread to the
3973 continue thread.
3974 (process_serial_event) <Hg handling>: Also set thread_id if the
3975 previous general thread is still alive.
3976 (process_serial_event) <g/G handling>: If setting the current
3977 thread to the general thread fails, error out.
3978 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3979 thread's lwp instead of the current thread's.
3980 * target.c (set_desired_thread): If the desired thread was not
3981 found, leave the current thread pointing to NULL. Return an int
3982 (boolean) indicating success.
3983 * target.h (set_desired_thread): Change return type to int.
3984
40045d91
MF
39852015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3986
3987 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3988 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3989 #includes.
3990 (ps_get_thread_area): New function.
3991
45face3b
GB
39922015-08-19 Gary Benson <gbenson@redhat.com>
3993
3994 * hostio.c (handle_pread): Do not attempt to read more data
3995 than hostio_reply_with_data can fit in a packet.
3996
16d5f642
JB
39972015-08-18 Joel Brobecker <brobecker@adacore.com>
3998
3999 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4000
a738da3a
MF
40012015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4002
4003 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4004
33ebda9d
PA
40052015-08-06 Pedro Alves <palves@redhat.com>
4006
4007 * tracepoint.c (expr_eval_result): Now an int.
4008
a44892be
PA
40092015-08-06 Pedro Alves <palves@redhat.com>
4010
4011 * gdbthread.h (struct regcache): Forward declare.
4012 (struct thread_info) <regcache_data>: Now a struct regcache
4013 pointer.
4014 * inferiors.c (inferior_regcache_data)
4015 (set_inferior_regcache_data): Now work with struct regcache
4016 pointers.
4017 * inferiors.h (struct regcache): Forward declare.
4018 (inferior_regcache_data, set_inferior_regcache_data): Now work
4019 with struct regcache pointers.
4020 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4021 (free_register_cache_thread): Remove struct regcache pointer
4022 casts.
4023
608a1e46
PA
40242015-08-06 Pedro Alves <palves@redhat.com>
4025
4026 * server.c (captured_main): On error, print the exception message
4027 to stderr, and if run_once is set, throw a quit.
4028
f0ce0d3a
PA
40292015-08-06 Pedro Alves <palves@redhat.com>
4030
4031 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4032 the current thread.
4033
bf47e248
PA
40342015-08-06 Pedro Alves <palves@redhat.com>
4035
4036 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4037 reading beyond the passed in buffer length.
4038
b6b9ffcc
PL
40392015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4040
4041 * tracepoint.c (symbol_list) <required>: Remove.
4042
863d01bd
PA
40432015-08-06 Pedro Alves <palves@redhat.com>
4044
4045 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4046 count if stopping and suspending threads.
4047 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4048 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4049 (linux_detach): Complete an ongoing step-over.
4050 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4051 throughout.
4052 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4053 (linux_wait_1): If passing a signal to the inferior after
4054 finishing a step-over, unsuspend and re-resume all lwps. If we
4055 see a single-step event but the thread should be continuing, don't
4056 pass the trap to gdb.
4057 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4058 internal_error instead of gdb_assert.
4059 (enqueue_pending_signal): New function.
4060 (check_ptrace_stopped_lwp_gone): Add debug output.
4061 (start_step_over): Use internal_error instead of gdb_assert.
4062 (complete_ongoing_step_over): New function.
4063 (linux_resume_one_thread): Don't resume a suspended thread.
4064 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4065 it stepping.
4066
00db26fa
PA
40672015-08-06 Pedro Alves <palves@redhat.com>
4068
4069 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4070 (linux_thread_alive): Use lwp_is_marked_dead.
4071 (extended_event_reported): Delete.
4072 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4073 instead of extended_event_reported.
4074 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4075 as well.
4076 (lwp_is_marked_dead): New function.
4077 (lwp_running): Use lwp_is_marked_dead.
4078 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4079 comment.
4080
ad071a30
PA
40812015-08-06 Pedro Alves <palves@redhat.com>
4082
4083 * linux-low.c (linux_wait_1): Move fork event output out of the
4084 !report_to_gdb check. Pass event_child->waitstatus to
4085 target_waitstatus_to_string instead of ourstatus.
4086
524b57e6
YQ
40872015-08-04 Yao Qi <yao.qi@linaro.org>
4088
4089 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4090 if current_thread is 32 bit.
4091
6085d6f6
YQ
40922015-08-04 Yao Qi <yao.qi@linaro.org>
4093
4094 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4095 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4096 * server.c (extended_protocol): Remove "static".
4097 * server.h (extended_protocol): Declare it.
4098
8a7e4587
YQ
40992015-08-04 Yao Qi <yao.qi@linaro.org>
4100
4101 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4102 both aarch64 and aarch32.
4103 (aarch64_set_pc): Likewise.
4104
3b53ae99
YQ
41052015-08-04 Yao Qi <yao.qi@linaro.org>
4106
4107 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4108 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4109 arm-with-neon.xml to srv_xmlfiles.
4110 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4111 (is_64bit_tdesc): New function.
4112 (aarch64_linux_read_description): New function.
4113 (aarch64_arch_setup): Call aarch64_linux_read_description.
4114 (regs_info): Rename to regs_info_aarch64.
4115 (aarch64_regs_info): Return right regs_info.
4116 (initialize_low_arch): Call initialize_low_arch_aarch32.
4117
bd9e6534
YQ
41182015-08-04 Yao Qi <yao.qi@linaro.org>
4119
4120 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4121 * linux-aarch32-low.c: New file.
4122 * linux-aarch32-low.h: New file.
4123 * linux-arm-low.c (arm_fill_gregset): Move it to
4124 linux-aarch32-low.c.
4125 (arm_store_gregset): Likewise.
4126 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4127 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4128 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4129 (regs_info): Rename to regs_info_arm.
4130 (arm_regs_info): Return regs_info_aarch32 if
4131 have_ptrace_getregset is 1 and target description is
4132 arm_with_neon or arm_with_vfpv3.
4133 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4134 Call initialize_low_arch_aarch32 instead.
4135
ded48a5e
YQ
41362015-08-04 Yao Qi <yao.qi@linaro.org>
4137
4138 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4139 * linux-low.c: ... here.
4140 * linux-low.h (have_ptrace_getregset): Declare it.
4141
96e9210f
PA
41422015-08-04 Pedro Alves <palves@redhat.com>
4143
4144 * thread-db.c (struct thread_db): Use new typedefs.
4145 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4146 CHK calls.
4147 (disable_thread_event_reporting): Cast result of dlsym to
4148 destination function pointer type.
4149 (thread_db_mourn): Use td_ta_delete_ftype.
4150
af60a1ef
SL
41512015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4152
4153 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4154 arch variant.
4155 (CDX_BREAKPOINT): Define for R2.
4156 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4157 (the_low_target): Add comments.
4158
e8b41681
YQ
41592015-07-30 Yao Qi <yao.qi@linaro.org>
4160
4161 * linux-arm-low.c (arm_hwcap): Remove it.
4162 (arm_read_description): New local variable arm_hwcap. Don't
4163 set arm_hwcap to zero.
4164
89abb039
YQ
41652015-07-30 Yao Qi <yao.qi@linaro.org>
4166
4167 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4168 Use regcache->tdesc instead.
4169 (arm_store_wmmxregset): Likewise.
4170 (arm_fill_vfpregset): Likewise.
4171 (arm_store_vfpregset): Likewise.
4172
deca266c
YQ
41732015-07-30 Yao Qi <yao.qi@linaro.org>
4174
4175 * linux-arm-low.c: Include arch/arm.h.
4176 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4177 (arm_store_gregset): Likewise.
4178
aa58a496
SM
41792015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4180
4181 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4182 ptrace's 4th parameter.
4183
50904b25
YQ
41842015-07-27 Yao Qi <yao.qi@linaro.org>
4185
4186 * configure.srv (case aarch64*-*-linux*): Don't set
4187 srv_linux_usrregs.
4188
5826e159
PA
41892015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4190
4191 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4192 sys/ptrace.h.
4193 * linux-arm-low.c: Likewise.
4194 * linux-cris-low.c: Likewise.
4195 * linux-crisv32-low.c: Likewise.
4196 * linux-low.c: Likewise.
4197 * linux-m68k-low.c: Likewise.
4198 * linux-mips-low.c: Likewise.
4199 * linux-nios2-low.c: Likewise.
4200 * linux-s390-low.c: Likewise.
4201 * linux-sparc-low.c: Likewise.
4202 * linux-tic6x-low.c: Likewise.
4203 * linux-tile-low.c: Likewise.
4204 * linux-x86-low.c: Likewise.
4205
54019719
PA
42062015-07-24 Pedro Alves <palves@redhat.com>
4207
4208 * config.in: Regenerate.
4209 * configure: Regenerate.
4210
eb7aa561
PA
42112015-07-24 Pedro Alves <palves@redhat.com>
4212
4213 * acinclude.m4: Include ../ptrace.m4.
4214 * configure.ac: Call GDB_AC_PTRACE.
4215 * config.in, configure: Regenerate.
4216
55d7b841
YQ
42172015-07-24 Yao Qi <yao.qi@linaro.org>
4218
4219 * linux-low.c (linux_create_inferior): Remove setting to
4220 proc->priv->new_inferior.
4221 (linux_attach): Likewise.
4222 (linux_low_filter_event): Likewise.
4223 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4224
c06cbd92
YQ
42252015-07-24 Yao Qi <yao.qi@linaro.org>
4226
4227 * linux-low.c (linux_arch_setup): New function.
4228 (linux_low_filter_event): If proc->tdesc is NULL and
4229 proc->attached is true, call the_low_target.arch_setup.
4230 Otherwise, keep status pending, and return.
4231 (linux_resume_one_lwp_throw): Don't call get_pc if
4232 thread->while_stepping isn't NULL. Don't call
4233 get_thread_regcache if proc->tdesc is NULL.
4234 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4235 (linux_target_ops): Install arch_setup.
4236 * server.c (start_inferior): Call the_target->arch_setup.
4237 * target.h (struct target_ops) <arch_setup>: New field.
4238 (target_arch_setup): New marco.
4239 * lynx-low.c (lynx_target_ops): Update.
4240 * nto-low.c (nto_target_ops): Update.
4241 * spu-low.c (spu_target_ops): Update.
4242 * win32-low.c (win32_target_ops): Update.
4243
5ae3ebba
YQ
42442015-07-24 Yao Qi <yao.qi@linaro.org>
4245
4246 * linux-low.c (linux_add_process): Don't set
4247 proc->priv->new_inferior.
4248 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4249 (linux_attach): Likewise.
4250
eb97750b
YQ
42512015-07-24 Yao Qi <yao.qi@linaro.org>
4252
4253 * server.c (start_inferior): Code refactor.
4254
51aee833
YQ
42552015-07-24 Yao Qi <yao.qi@linaro.org>
4256
4257 * server.c (process_serial_event): Set general_thread.
4258
af1b22f3
YQ
42592015-07-21 Yao Qi <yao.qi@linaro.org>
4260
4261 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4262 aarch64_linux_get_debug_reg_capacity.
4263
554717a3
YQ
42642015-07-17 Yao Qi <yao.qi@linaro.org>
4265
4266 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4267 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4268 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4269 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4270 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4271 (AARCH64_HWP_ALIGNMENT): Likewise.
4272 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4273 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4274 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4275 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4276 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4277 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4278 (struct aarch64_debug_reg_state): Likewise.
4279 (struct arch_lwp_info): Likewise.
4280 (aarch64_align_watchpoint): Likewise.
4281 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4282 (aarch64_watchpoint_length): Likewise.
4283 (aarch64_point_encode_ctrl_reg): Likewise
4284 (aarch64_point_is_aligned): Likewise.
4285 (aarch64_align_watchpoint): Likewise.
4286 (aarch64_linux_set_debug_regs):
4287 (aarch64_dr_state_insert_one_point): Likewise.
4288 (aarch64_dr_state_remove_one_point): Likewise.
4289 (aarch64_handle_breakpoint): Likewise.
4290 (aarch64_handle_aligned_watchpoint): Likewise.
4291 (aarch64_handle_unaligned_watchpoint): Likewise.
4292 (aarch64_handle_watchpoint): Likewise.
4293
c67ca4de
YQ
42942015-07-17 Yao Qi <yao.qi@linaro.org>
4295
4296 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4297 and don't aarch64_get_debug_reg_state. All callers update.
4298 (aarch64_handle_aligned_watchpoint): Likewise.
4299 (aarch64_handle_unaligned_watchpoint): Likewise.
4300 (aarch64_handle_watchpoint): Likewise.
4301 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4302 (aarch64_remove_point): Likewise.
4303
25abf979
YQ
43042015-07-17 Yao Qi <yao.qi@linaro.org>
4305
4306 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4307 debug_printf.
4308 (aarch64_handle_unaligned_watchpoint): Likewise.
4309
db1ff28b
JK
43102015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4311
4312 Revert the previous 3 commits:
4313 Move gdb_regex* to common/
4314 Move linux_find_memory_regions_full & co.
4315 gdbserver build-id attribute generator
4316
700ca40f
JK
43172015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4318 Jan Kratochvil <jan.kratochvil@redhat.com>
4319
4320 gdbserver build-id attribute generator.
4321 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4322 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4323 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4324 (find_phdr): New.
4325 (get_dynamic): Use find_pdhr to traverse program headers.
4326 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4327 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4328 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4329 (get_hex_build_id): New.
4330 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4331 to reply XML document.
4332
9904185c
JK
43332015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4334 Jan Kratochvil <jan.kratochvil@redhat.com>
4335
4336 * target.c: Include target/target-utils.h and fcntl.h.
4337 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4338 (target_fileio_read_stralloc): New functions.
4339
6e5b4429
JK
43402015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4341
4342 * Makefile.in (OBS): Add gdb_regex.o.
4343 (gdb_regex.o): New.
4344 * config.in: Rebuilt.
4345 * configure: Rebuilt.
4346
ddc98fbf
JK
43472015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4348 Jan Kratochvil <jan.kratochvil@redhat.com>
4349
4350 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4351 * Makefile.in (OBS): Add target-utils.o.
4352 (linux-maps.o, target-utils.o): New.
4353 * configure.srv (srv_linux_obj): Add linux-maps.o.
4354
e57bb7a0
PL
43552015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4356
4357 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4358 function, return 1.
4359 (the_low_target): Install it.
4360
586b02a9
PA
43612015-07-14 Pedro Alves <palves@redhat.com>
4362
4363 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4364 Instead, ignore ECHILD, and throw an error for other errnos.
4365
58c1b36c
PA
43662015-07-10 Pedro Alves <palves@redhat.com>
4367
4368 * event-loop.c (struct callback_event) <data>: Change type to
4369 gdb_client_data instance instead of gdb_client_data pointer.
4370 (append_callback_event): Adjust.
4371
421530db
PL
43722015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4373
4374 * linux-aarch64-low.c: Add comments for each linux_target_ops
4375 method. Remove comments already covered in target_ops and
4376 linux_target_ops definitions.
4377 (the_low_target): Add comments for each unimplemented method.
4378
c2d65f38
YQ
43792015-07-09 Yao Qi <yao.qi@linaro.org>
4380
4381 * linux-aarch64-low.c (aarch64_regmap): Remove.
4382 (aarch64_usrregs_info): Remove.
4383 (regs_info): Set field usrregs to NULL.
4384
b20a6524
MM
43852015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4386
4387 * linux-low.c: Include "rsp-low.h"
4388 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4389 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4390 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4391 (handle_btrace_enable_pt): New.
4392 (handle_btrace_general_set): Support "pt".
4393 (handle_btrace_conf_general_set): Support "pt:size".
4394
96c97461
PL
43952015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4396
4397 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4398 Z_PACKET_SW_BP.
4399
37d66942
PL
44002015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4401
4402 * linux-aarch64-low.c: Remove comment about endianness.
4403 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4404 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4405 memcmp.
4406
dc06243f
GB
44072015-06-24 Gary Benson <gbenson@redhat.com>
4408
4409 * linux-i386-ipa.c (stdint.h): Do not include.
4410 * lynx-i386-low.c (stdint.h): Likewise.
4411 * lynx-ppc-low.c (stdint.h): Likewise.
4412 * mem-break.c (stdint.h): Likewise.
4413 * thread-db.c (stdint.h): Likewise.
4414 * tracepoint.c (stdint.h): Likewise.
4415 * win32-low.c (stdint.h): Likewise.
4416
124e13d9
SM
44172015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4418
4419 * server.c (write_qxfer_response): Update call to
4420 remote_escape_output.
4421
909c2cda
JK
44222015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4423 Jan Kratochvil <jan.kratochvil@redhat.com>
4424
4425 Merge multiple hex conversions.
4426 * gdbreplay.c (tohex): Rename to 'fromhex'.
4427 (logchar): Use fromhex.
4428
24c05f46
JK
44292015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4430
4431 * server.c (handle_qxfer_libraries): Set `version' attribute for
4432 <library-list>.
4433
14d2069a
GB
44342015-06-10 Gary Benson <gbenson@redhat.com>
4435
4436 * target.h (struct target_ops) <multifs_open>: New field.
4437 <multifs_unlink>: Likewise.
4438 <multifs_readlink>: Likewise.
4439 * linux-low.c (nat/linux-namespaces.h): New include.
4440 (linux_target_ops): Initialize the_target->multifs_open,
4441 the_target->multifs_unlink and the_target->multifs_readlink.
4442 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4443 * hostio.c (hostio_fs_pid): New static variable.
4444 (hostio_handle_new_gdb_connection): New function.
4445 (handle_setfs): Likewise.
4446 (handle_open): Use the_target->multifs_open as appropriate.
4447 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4448 (handle_readlink): Use the_target->multifs_readlink as
4449 appropriate.
4450 (handle_vFile): Handle vFile:setfs packets.
4451 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4452 after target_handle_new_gdb_connection.
4453
4b8b5e72
GB
44542015-06-10 Gary Benson <gbenson@redhat.com>
4455
4456 * configure.ac (AC_CHECK_FUNCS): Add setns.
4457 * config.in: Regenerate.
4458 * configure: Likewise.
4459 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4460 (linux-namespaces.o): New rule.
4461 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4462
3ac2e371
GB
44632015-06-09 Gary Benson <gbenson@redhat.com>
4464
4465 * hostio.c (handle_open): Process mode argument with
4466 fileio_to_host_mode.
4467
ca9b78ce
YQ
44682015-06-01 Yao Qi <yao.qi@linaro.org>
4469
4470 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4471 * linux-x86-low.c: Likewise.
4472
bfacd19d
DB
44732015-05-28 Don Breazeal <donb@codesourcery.com>
4474
4475 * linux-low.c (handle_extended_wait): Initialize
4476 thread_info.last_resume_kind for new fork children.
4477
452003ef
PA
44782015-05-15 Pedro Alves <palves@redhat.com>
4479
4480 * target.h (target_handle_new_gdb_connection): Rewrite using if
4481 wrapped in do/while.
4482
1041a03c
JB
44832015-05-14 Joel Brobecker <brobecker@adacore.com>
4484
4485 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4486 * configure, config.in: Regenerate.
4487 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4488 Declare typedef.
4489
c269dbdb
DB
44902015-05-12 Don Breazeal <donb@codesourcery.com>
4491
4492 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4493 PTRACE_EVENT_VFORK_DONE.
4494 (linux_low_ptrace_options, extended_event_reported): Add vfork
4495 events.
4496 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4497 and "vforkdone" for RSP 'T' Stop Reply Packet.
4498 * server.h (report_vfork_events): Declare
4499 global variable.
4500
3a8a0396
DB
45012015-05-12 Don Breazeal <donb@codesourcery.com>
4502
4503 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4504 (the_low_target) <new_fork>: Initialize new member.
4505 * linux-arm-low.c (arm_new_fork): New function.
4506 (the_low_target) <new_fork>: Initialize new member.
4507 * linux-low.c (handle_extended_wait): Call new target function
4508 new_fork.
4509 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4510 * linux-mips-low.c (mips_add_watchpoint): New function
4511 extracted from mips_insert_point.
4512 (the_low_target) <new_fork>: Initialize new member.
4513 (mips_linux_new_fork): New function.
4514 (mips_insert_point): Call mips_add_watchpoint.
4515 * linux-x86-low.c (x86_linux_new_fork): New function.
4516 (the_low_target) <new_fork>: Initialize new member.
4517
de0d863e
DB
45182015-05-12 Don Breazeal <donb@codesourcery.com>
4519
4520 * linux-low.c (handle_extended_wait): Implement return value,
4521 rename argument 'event_child' to 'event_lwp', handle
4522 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4523 (linux_low_ptrace_options): New function.
4524 (linux_low_filter_event): Call linux_low_ptrace_options,
4525 use different argument fo linux_enable_event_reporting,
4526 use return value from handle_extended_wait.
4527 (extended_event_reported): New function.
4528 (linux_wait_1): Call extended_event_reported and set
4529 status to report fork events.
4530 (linux_write_memory): Add pid to debug message.
4531 (reset_lwp_ptrace_options_callback): New function.
4532 (linux_handle_new_gdb_connection): New function.
4533 (linux_target_ops): Initialize new structure member.
4534 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4535 * lynx-low.c: Initialize new structure member.
4536 * remote-utils.c (prepare_resume_reply): Implement stop reason
4537 "fork" for "T" stop message.
4538 * server.c (handle_query): Call handle_new_gdb_connection.
4539 * server.h (report_fork_events): Declare global flag.
4540 * target.h (struct target_ops) <handle_new_gdb_connection>:
4541 New member.
4542 (target_handle_new_gdb_connection): New macro.
4543 * win32-low.c: Initialize new structure member.
4544
ddcbc397
DB
45452015-05-12 Don Breazeal <donb@codesourcery.com>
4546
4547 * mem-break.c (APPEND_TO_LIST): Define macro.
4548 (clone_agent_expr): New function.
4549 (clone_one_breakpoint): New function.
4550 (clone_all_breakpoints): New function.
4551 * mem-break.h: Declare new functions.
4552
89245bc0
DB
45532015-05-12 Don Breazeal <donb@codesourcery.com>
4554
4555 * linux-low.c (linux_supports_fork_events): New function.
4556 (linux_supports_vfork_events): New function.
4557 (linux_target_ops): Initialize new structure members.
4558 (initialize_low): Call linux_check_ptrace_features.
4559 * lynx-low.c (lynx_target_ops): Initialize new structure
4560 members.
4561 * server.c (report_fork_events, report_vfork_events):
4562 New global flags.
4563 (handle_query): Add new features to qSupported packet and
4564 response.
4565 (captured_main): Initialize new global variables.
4566 * target.h (struct target_ops) <supports_fork_events>:
4567 New member.
4568 <supports_vfork_events>: New member.
4569 (target_supports_fork_events): New macro.
4570 (target_supports_vfork_events): New macro.
4571 * win32-low.c (win32_target_ops): Initialize new structure
4572 members.
4573
835205d0
GB
45742015-05-12 Gary Benson <gbenson@redhat.com>
4575
4576 * server.c (handle_qxfer_exec_file): Use current process
4577 if annex is empty.
4578
21e94bd9
SL
45792015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4580
4581 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4582 Remove HAVE_PTRACE_GETREGS conditionals.
4583 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4584 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4585
45614f15
YQ
45862015-05-08 Yao Qi <yao.qi@linaro.org>
4587
4588 * linux-low.c (linux_supports_conditional_breakpoints): New
4589 function.
4590 (linux_target_ops): Install new target method.
4591 * lynx-low.c (lynx_target_ops): Install NULL hook for
4592 supports_conditional_breakpoints.
4593 * nto-low.c (nto_target_ops): Likewise.
4594 * spu-low.c (spu_target_ops): Likewise.
4595 * win32-low.c (win32_target_ops): Likewise.
4596 * server.c (handle_query): Check
4597 target_supports_conditional_breakpoints.
4598 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4599 New field.
4600 (target_supports_conditional_breakpoints): New macro.
4601
80ad801e
PA
46022015-05-06 Pedro Alves <palves@redhat.com>
4603
4604 PR server/18081
4605 * server.c (start_inferior): If the process exits, mourn it.
4606
819843c7
GB
46072015-04-21 Gary Benson <gbenson@redhat.com>
4608
4609 * hostio.c (fileio_open_flags_to_host): Factored out to
4610 fileio_to_host_openflags in common/fileio.c. Single use
4611 updated.
4612
a2d5a9d7
MF
46132015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4614
4615 * linux-xtensa-low.c (xtensa_fill_gregset)
4616 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4617 XCHAL_HAVE_LOOP.
4618
deb44829
MF
46192015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4620
4621 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4622 (regs_info): Replace usrregs pointer with NULL.
4623
e57f1de3
GB
46242015-04-17 Gary Benson <gbenson@redhat.com>
4625
4626 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4627 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4628 * server.c (handle_qxfer_exec_file): New function.
4629 (qxfer_packets): Add exec-file entry.
4630 (handle_query): Report qXfer:exec-file:read as supported packet.
4631
62828379
RN
46322015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4633
4634 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4635
b88bb450
GB
46362015-04-09 Gary Benson <gbenson@redhat.com>
4637
4638 * hostio-errno.c (errno_to_fileio_error): Remove function.
4639 Update caller to use remote_fileio_to_fio_error.
4640
c8f4bfdd
YQ
46412015-04-09 Yao Qi <yao.qi@linaro.org>
4642
4643 * linux-low.c (linux_insert_point): Call
4644 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4645 (linux_remove_point): Call remove_memory_breakpoint if type is
4646 raw_bkpt_type_sw.
4647 * linux-x86-low.c (x86_insert_point): Don't call
4648 insert_memory_breakpoint.
4649 (x86_remove_point): Don't call remove_memory_breakpoint.
4650
41f98f02
PA
46512015-04-01 Pedro Alves <palves@redhat.com>
4652 Cleber Rosa <crosa@redhat.com>
4653
4654 * server.c (gdbserver_usage): Reorganize and extend the usage
4655 message.
4656
2bf6fb9d
PA
46572015-03-24 Pedro Alves <palves@redhat.com>
4658
4659 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4660 output. Also dump TRAP_TRACE.
4661 (linux_low_filter_event): In debug output, distinguish a
4662 resume_stop SIGSTOP from a delayed SIGSTOP.
4663
369f6daa
GB
46642015-03-24 Gary Benson <gbenson@redhat.com>
4665
4666 * linux-x86-low.c (x86_linux_new_thread): Moved to
4667 nat/x86-linux.c.
4668 (x86_linux_prepare_to_resume): Likewise.
4669
8e5d4070
GB
46702015-03-24 Gary Benson <gbenson@redhat.com>
4671
4672 * Makefile.in (x86-linux-dregs.o): New rule.
4673 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4674 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4675 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4676 (x86_linux_dr_get): Likewise.
4677 (x86_linux_dr_set): Likewise.
4678 (update_debug_registers_callback): Likewise.
4679 (x86_linux_dr_set_addr): Likewise.
4680 (x86_linux_dr_get_addr): Likewise.
4681 (x86_linux_dr_set_control): Likewise.
4682 (x86_linux_dr_get_control): Likewise.
4683 (x86_linux_dr_get_status): Likewise.
4684 (x86_linux_update_debug_registers): Likewise.
4685
2b95d440
GB
46862015-03-24 Gary Benson <gbenson@redhat.com>
4687
4688 * linux-x86-low.c (x86_linux_update_debug_registers):
4689 New function, factored out from...
4690 (x86_linux_prepare_to_resume): ...this.
4691
14b0bc68
GB
46922015-03-24 Gary Benson <gbenson@redhat.com>
4693
4694 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4695 (x86_linux_dr_set): Likewise.
4696 (update_debug_registers_callback): Likewise.
4697 (x86_linux_dr_set_addr): Likewise.
4698 (x86_linux_dr_get_addr): Likewise.
4699 (x86_linux_dr_set_control): Likewise.
4700 (x86_linux_dr_get_control): Likewise.
4701 (x86_linux_dr_get_status): Likewise.
4702 (x86_linux_prepare_to_resume): Likewise.
4703
5dfe6ca8
GB
47042015-03-24 Gary Benson <gbenson@redhat.com>
4705
4706 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4707 Use perror_with_name. Pass string through gettext.
4708 (x86_linux_dr_set): Likewise.
4709
d33472ad
GB
47102015-03-24 Gary Benson <gbenson@redhat.com>
4711
4712 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4713 (x86_linux_dr_set_addr): ...this.
4714 (x86_dr_low_get_addr): Rename to...
4715 (x86_linux_dr_get_addr): ...this.
4716 (x86_dr_low_set_control): Rename to...
4717 (x86_linux_dr_set_control): ...this.
4718 (x86_dr_low_get_control): Rename to...
4719 (x86_linux_dr_get_control): ...this.
4720 (x86_dr_low_get_status): Rename to...
4721 (x86_linux_dr_get_status): ...this.
4722 (x86_dr_low): Update with new function names.
4723
4b134ca1
GB
47242015-03-24 Gary Benson <gbenson@redhat.com>
4725
4726 * Makefile.in (x86-linux.o): New rule.
4727 * configure.srv: Add x86-linux.o to relevant targets.
4728 * linux-low.c (lwp_set_arch_private_info): New function.
4729 (lwp_arch_private_info): Likewise.
4730 * linux-x86-low.c: Include nat/x86-linux.h.
4731 (arch_lwp_info): Removed structure.
4732 (update_debug_registers_callback):
4733 Use lwp_set_debug_registers_changed.
4734 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4735 and lwp_set_debug_registers_changed.
4736 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4737
34c703da
GB
47382015-03-24 Gary Benson <gbenson@redhat.com>
4739
4740 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4741 * linux-arm-low.c (arm_new_thread): Likewise.
4742 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4743 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4744 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4745 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4746
cff068da
GB
47472015-03-24 Gary Benson <gbenson@redhat.com>
4748
4749 * linux-low.c (ptid_of_lwp): New function.
4750 (lwp_is_stopped): Likewise.
4751 (lwp_stop_reason): Likewise.
4752 * linux-x86-low.c (update_debug_registers_callback):
4753 Use lwp_is_stopped.
4754 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4755 lwp_stop_reason.
4756
b2f7c7e8
GB
47572015-03-24 Gary Benson <gbenson@redhat.com>
4758
4759 * linux-low.h (linux_stop_lwp): Remove declaration.
4760
6d4ee8c6
GB
47612015-03-24 Gary Benson <gbenson@redhat.com>
4762
4763 * linux-low.h: Include nat/linux-nat.h.
4764 * linux-low.c (iterate_over_lwps_args): New structure.
4765 (iterate_over_lwps_filter): New function.
4766 (iterate_over_lwps): Likewise.
4767 * linux-x86-low.c (update_debug_registers_callback):
4768 Update signature to what iterate_over_lwps expects.
4769 Remove PID check that iterate_over_lwps now performs.
4770 (x86_dr_low_set_addr): Use iterate_over_lwps.
4771 (x86_dr_low_set_control): Likewise.
4772
70a0bb6b
GB
47732015-03-24 Gary Benson <gbenson@redhat.com>
4774
4775 * linux-x86-low.c (x86_debug_reg_state): New function.
4776 (x86_linux_prepare_to_resume): Use the above.
4777
7b669087
GB
47782015-03-24 Gary Benson <gbenson@redhat.com>
4779
4780 * linux-low.c (current_lwp_ptid): New function.
4781 * linux-x86-low.c: Include nat/linux-nat.h.
4782 (x86_dr_low_get_addr): Use current_lwp_ptid.
4783 (x86_dr_low_get_control): Likewise.
4784 (x86_dr_low_get_status): Likewise.
4785
eef49a3d
PA
47862015-03-20 Pedro Alves <palves@redhat.com>
4787
4788 * tracepoint.c (cmd_qtstatus): Make "str" const.
4789
b2333d22
PA
47902015-03-20 Pedro Alves <palves@redhat.com>
4791
4792 * server.c (handle_general_set): Make "req_str" const.
4793
23f238d3
PA
47942015-03-19 Pedro Alves <palves@redhat.com>
4795
4796 * linux-low.c (linux_resume_one_lwp): Rename to ...
4797 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4798 instead call perror_with_name.
4799 (check_ptrace_stopped_lwp_gone): New function.
4800 (linux_resume_one_lwp): Reimplement as wrapper around
4801 linux_resume_one_lwp_throw that swallows errors if the LWP is
4802 gone.
4803
91baf43f
PA
48042015-03-19 Pedro Alves <palves@redhat.com>
4805
4806 * linux-low.c (count_events_callback, select_event_lwp_callback):
4807 No longer check whether the thread has resume_stop as last resume
4808 kind.
4809
8bf3b159
PA
48102015-03-19 Pedro Alves <palves@redhat.com>
4811
4812 * linux-low.c (count_events_callback, select_event_lwp_callback):
4813 Use the lwp's status_pending_p field, not the thread's.
4814
b90fc188
PA
48152015-03-19 Pedro Alves <palves@redhat.com>
4816
4817 * linux-low.c (select_event_lwp_callback): Update comments to
4818 no longer mention SIGTRAP.
4819
464b0089
GB
48202015-03-18 Gary Benson <gbenson@redhat.com>
4821
4822 * server.c (handle_query): Do not report vFile:fstat as supported.
4823
aa9e327f
GB
48242015-03-11 Gary Benson <gbenson@redhat.com>
4825
4826 * hostio.c (sys/types.h): New include.
4827 (sys/stat.h): Likewise.
4828 (common-remote-fileio.h): Likewise.
4829 (handle_fstat): New function.
4830 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 4831
791c0056
GB
48322015-03-11 Gary Benson <gbenson@redhat.com>
4833
4834 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4835 struct stat.st_blocks and struct stat.st_blksize.
4836 * configure: Regenerate.
4837 * config.in: Likewise.
4838 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4839 (OBS): Add common-remote-fileio.o.
4840 (common-remote-fileio.o): New rule.
4841
9a9df970
PA
48422015-03-09 Pedro Alves <palves@redhat.com>
4843
4844 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4845 'struct sockaddr' pointer in 'accept' call.
4846
9eb1356e
PA
48472015-03-09 Pedro Alves <palves@redhat.com>
4848
4849 Revert:
4850 2015-03-07 Pedro Alves <palves@redhat.com>
4851 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4852 or <winsock2.h> here. Instead include "gdb_socket.h".
4853 (remote_open): Use union gdb_sockaddr_u.
4854 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4855 or <winsock2.h> here. Instead include "gdb_socket.h".
4856 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4857 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4858 or <sys/un.h>.
4859 (init_named_socket, gdb_agent_helper_thread): Use union
4860 gdb_sockaddr_u.
4861
aac331e4
PA
48622015-03-07 Pedro Alves <palves@redhat.com>
4863
4864 * configure.ac (build_warnings): Move
4865 -Wdeclaration-after-statement to the C-specific set.
4866 * configure: Regenerate.
4867
366c75fc
PA
48682015-03-07 Pedro Alves <palves@redhat.com>
4869
4870 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4871 or <winsock2.h> here. Instead include "gdb_socket.h".
4872 (remote_open): Use union gdb_sockaddr_u.
4873 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4874 or <winsock2.h> here. Instead include "gdb_socket.h".
4875 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4876 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4877 or <sys/un.h>.
4878 (init_named_socket, gdb_agent_helper_thread): Use union
4879 gdb_sockaddr_u.
4880
492d29ea
PA
48812015-03-07 Pedro Alves <palves@redhat.com>
4882
4883 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4884 instead.
4885
60a191ed
YQ
48862015-03-06 Yao Qi <yao.qi@linaro.org>
4887
4888 * linux-aarch64-low.c (aarch64_insert_point): Use
4889 show_debug_regs as a boolean.
4890 (aarch64_remove_point): Likewise.
4891
f5771b1d
PA
48922015-03-05 Pedro Alves <palves@redhat.com>
4893
4894 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4895 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4896 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4897 * nto-low.c (nto_target_ops): Likewise.
4898 * spu-low.c (spu_target_ops): Likewise.
4899 * win32-low.c (win32_target_ops): Likewise.
4900
3e572f71
PA
49012015-03-04 Pedro Alves <palves@redhat.com>
4902
72f4393d 4903 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
4904 Decide whether a breakpoint triggered based on the SIGTRAP's
4905 siginfo.si_code.
72f4393d
L
4906 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4907 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
4908 (linux_low_filter_event): Check for breakpoints before checking
4909 watchpoints.
4910 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4911 siginfo.si_code.
72f4393d
L
4912 (linux_stopped_by_sw_breakpoint)
4913 (linux_supports_stopped_by_sw_breakpoint)
4914 (linux_stopped_by_hw_breakpoint)
4915 (linux_supports_stopped_by_hw_breakpoint): New functions.
4916 (linux_target_ops): Install new target methods.
3e572f71 4917
1ec68e26
PA
49182015-03-04 Pedro Alves <palves@redhat.com>
4919
4920 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4921 * server.c (swbreak_feature, hwbreak_feature): New globals.
4922 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4923 (captured_main): Clear swbreak_feature and hwbreak_feature.
4924 * server.h (swbreak_feature, hwbreak_feature): Declare.
4925 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4926 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4927 supports_stopped_by_hw_breakpoint>: New fields.
4928 (target_supports_stopped_by_sw_breakpoint)
4929 (target_stopped_by_sw_breakpoint)
4930 (target_supports_stopped_by_hw_breakpoint)
4931 (target_stopped_by_hw_breakpoint): Declare.
4932
15c66dd6
PA
49332015-03-04 Pedro Alves <palves@redhat.com>
4934
4935 enum lwp_stop_reason -> enum target_stop_reason
4936 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4937 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4938 (linux_wait_1, stuck_in_jump_pad_callback)
4939 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4940 (linux_stopped_by_watchpoint):
4941 * linux-low.h (enum lwp_stop_reason): Delete.
4942 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4943 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4944
98fc70d6
YQ
49452015-03-04 Yao Qi <yao.qi@linaro.org>
4946
4947 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4948
dd2ac174
GB
49492015-03-03 Gary Benson <gbenson@redhat.com>
4950
4951 * hostio.c (handle_vFile): Fix prefix lengths.
4952
d68e53f4
MM
49532015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4954
4955 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4956 ptr_bits.
4957
bf2d68ab
AA
49582015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4959
4960 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4961 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4962 (clean): Add "rm -f" for above C files.
4963 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4964 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4965 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4966 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4967 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4968 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4969 (init_registers_s390x_vx_linux64)
4970 (init_registers_s390x_tevx_linux64)
4971 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4972 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4973 declarations.
4974 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4975 (s390_store_vxrs_high): New functions.
4976 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4977 NT_S390_VXRS_HIGH.
4978 (s390_arch_setup): Add logic for selecting one of the new target
4979 descriptions. Activate the new vector regsets if applicable.
4980 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4981 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4982 and init_registers_s390x_tevx_linux64.
4983
c966a859
PA
49842015-03-01 Pedro Alves <palves@redhat.com>
4985
4986 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4987 parameter.
4988
4180215b
PA
49892015-02-27 Pedro Alves <palves@redhat.com>
4990
4991 * linux-x86-low.c (u_debugreg_offset): New function.
4992 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4993
749bab01
PA
49942015-02-27 Pedro Alves <palves@redhat.com>
4995
4996 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4997 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4998 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4999 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5000 (ps_lsetfpregs, ps_getpid)
5001 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5002 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5003 (ps_lsetxregs, ps_plog): Declare.
5004
3c14e5a3
PA
50052015-02-27 Pedro Alves <palves@redhat.com>
5006
5007 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5008 IP_AGENT_EXPORT_FUNC.
5009 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5010 IP_AGENT_EXPORT_FUNC.
5011 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5012 (IP_AGENT_EXPORT): Delete.
5013 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5014 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5015 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5016 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5017 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5018 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5019 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5020 (traceframe_read_count, traceframe_write_count)
5021 (traceframes_created, trace_state_variables, get_raw_reg)
5022 (get_trace_state_variable_value, set_trace_state_variable_value)
5023 (ust_loaded, helper_thread_id, cmd_buf): Use
5024 IPA_SYM_EXPORTED_NAME.
5025 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5026 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5027 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5028 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5029 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5030 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5031 EXTERN_C_PUSH/EXTERN_C_POP.
5032 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5033 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5034 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5035 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5036 (traceframe_write_count, traceframe_read_count)
5037 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5038 (about_to_request_buffer_space, get_trace_state_variable_value)
5039 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5040 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5041 EXTERN_C_PUSH/EXTERN_C_POP.
5042 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5043 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5044 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5045 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5046 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5047 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5048 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5049 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5050 Define.
5051 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5052 (IP_AGENT_EXPORT_VAR_DECL): Define.
5053 (tracing): Declare.
5054 (gdb_agent_get_raw_reg): Declare.
5055
fe978cb0
PA
50562015-02-27 Tom Tromey <tromey@redhat.com>
5057 Pedro Alves <palves@redhat.com>
5058
5059 Rename symbols whose names are reserved C++ keywords throughout.
5060
3bc3d82a
PA
50612015-02-27 Pedro Alves <palves@redhat.com>
5062
5063 * Makefile.in (COMPILER): New, get it from autoconf.
5064 (CXX): Get from autoconf instead.
5065 (COMPILE.pre): Use COMPILER.
5066 (CC-LD): Rename to ...
5067 (CC_LD): ... this. Use COMPILER.
5068 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5069 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5070 * acinclude.m4: Include build-with-cxx.m4.
5071 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5072 Disable -Werror by default if building in C++ mode.
5073 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5074 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5075 the C++ compiler. Save/restore CXXFLAGS too.
5076 * configure: Regenerate.
5077
07697489
PA
50782015-02-27 Pedro Alves <palves@redhat.com>
5079
5080 * acinclude.m4: Include libiberty.m4.
5081 * configure.ac: Call libiberty_INIT.
5082 * config.in, configure: Regenerate.
5083
9beb7c4e
PA
50842015-02-26 Pedro Alves <palves@redhat.com>
5085
5086 * linux-low.c (linux_wait_1): When incrementing the PC past a
5087 program breakpoint always use the_low_target.breakpoint_len as
5088 increment, rather than the maximum between that and
5089 the_low_target.decr_pc_after_break.
5090
8090aef2
PA
50912015-02-23 Pedro Alves <palves@redhat.com>
5092
5093 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5094 thread was doing a step-over; always adjust the PC if
5095 we stepped over a permanent breakpoint.
5096 (linux_wait_1): If we stepped over breakpoint that was on top of a
5097 permanent breakpoint, manually advance the PC past it.
5098
bc9540e8
PA
50992015-02-23 Pedro Alves <palves@redhat.com>
5100
5101 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5102 modes.
5103 (x86_fill_gregset, x86_store_gregset): Use it when handling
5104 $orig_eax.
5105
2db9a427
PA
51062015-02-20 Pedro Alves <palves@redhat.com>
5107
5108 * thread-db.c: Include "nat/linux-procfs.h".
5109 (thread_db_init): Skip listing new threads if the kernel supports
5110 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5111
afa8d396
PA
51122015-02-20 Pedro Alves <palves@redhat.com>
5113
5114 * linux-low.c (status_pending_p_callback): Use ptid_match.
5115
c9587f88
AT
51162015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5117
5118 PR breakpoints/16812
5119 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5120 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5121 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5122
b05ec7a5
AT
51232015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5124
5125 PR breakpoints/15956
5126 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5127
d33501a5
MM
51282015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5129
5130 * linux-low.c (linux_low_btrace_conf): Print size.
5131 * server.c (handle_btrace_conf_general_set): New.
5132 (hanle_general_set): Call handle_btrace_conf_general_set.
5133 (handle_query): Report Qbtrace-conf:bts:size as supported.
5134
f4abbc16
MM
51352015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5136
5137 * linux-low.c (linux_low_enable_btrace): Update parameters.
5138 (linux_low_btrace_conf): New.
5139 (linux_target_ops)<to_btrace_conf>: Initialize.
5140 * server.c (current_btrace_conf): New.
5141 (handle_btrace_enable): Rename to ...
5142 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5143 to target_enable_btrace. Update comment. Update users.
5144 (handle_qxfer_btrace_conf): New.
5145 (qxfer_packets): Add btrace-conf entry.
5146 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5147 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5148 (target_ops)<read_btrace_conf>: New.
5149 (target_enable_btrace): Update parameters.
5150 (target_read_btrace_conf): New.
5151
043c3577
MM
51522015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5153
5154 * server.c (handle_btrace_general_set): Remove call to
5155 target_supports_btrace.
5156 (supported_btrace_packets): New.
5157 (handle_query): Call supported_btrace_packets.
5158 * target.h: include btrace-common.h.
5159 (btrace_target_info): Removed.
5160 (supports_btrace, target_supports_btrace): Update parameters.
5161
734b0e4b
MM
51622015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5163
5164 * Makefile.in (SFILES): Add common/btrace-common.c.
5165 (OBS): Add common/btrace-common.o.
5166 (btrace-common.o): Add build rules.
5167 * linux-low: Include btrace-common.h.
5168 (linux_low_read_btrace): Use struct btrace_data. Call
5169 btrace_data_init and btrace_data_fini.
5170
d6c146e9
PA
51712015-02-06 Pedro Alves <palves@redhat.com>
5172
5173 * thread-db.c (find_new_threads_callback): Add debug output.
5174
20ba1ce6
PA
51752015-02-04 Pedro Alves <palves@redhat.com>
5176
5177 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5178 (resume_stopped_resumed_lwps): New function.
5179 (linux_wait_for_event_filtered): Use it.
5180
8cc73a39
SDJ
51812015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5182
5183 * Makefile.in (SFILES): Add linux-personality.c.
5184 (linux-personality.o): New rule.
5185 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5186 list of objects to be built.
5187 * linux-low.c: Include nat/linux-personality.h.
5188 (linux_create_inferior): Remove code to disable address space
5189 randomization (moved to ../nat/linux-personality.c). Create
5190 cleanup to disable address space randomization.
5191
fb23d554
SDJ
51922015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5193
5194 * Makefile.in (posix-strerror.o): New rule.
5195 (mingw-strerror.o): Likewise.
5196 * configure: Regenerated.
5197 * configure.ac: Source file ../common/common.host. Initialize new
5198 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5199
cdf43629
YQ
52002015-01-14 Yao Qi <yao@codesourcery.com>
5201
5202 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5203 (ppc-linux.o): New rule.
5204 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5205 * configure.ac: AC_CHECK_FUNCS(getauxval).
5206 * config.in: Re-generated.
5207 * configure: Re-generated.
5208 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5209 ppc64_64bit_inferior_p
5210
514c5338
YQ
52112015-01-14 Yao Qi <yao@codesourcery.com>
5212
5213 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5214 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5215 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5216 (PT_ORIG_R3, PT_TRAP): Likewise.
5217 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5218 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5219 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5220
3368c1e5
JB
52212015-01-10 Joel Brobecker <brobecker@adacore.com>
5222
5223 * i387-fp.c (i387_cache_to_xsave): In look over
5224 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5225 zmmh_low_space field by use of zmmh_high_space.
5226
582511be
PA
52272015-01-09 Pedro Alves <palves@redhat.com>
5228
5229 * linux-low.c (step_over_bkpt): Move higher up in the file.
5230 (handle_extended_wait): Don't store the stop_pc here.
5231 (get_stop_pc): Adjust comments and rename to ...
5232 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5233 stopped for a software breakpoint or hardware breakpoint.
5234 (thread_still_has_status_pending_p): New function.
5235 (status_pending_p_callback): Use
5236 thread_still_has_status_pending_p. If the event is no longer
5237 interesting, resume the LWP.
5238 (handle_tracepoints): Add assert.
5239 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5240 (wstatus_maybe_breakpoint): New function.
5241 (cancel_breakpoint): Delete function.
5242 (check_stopped_by_watchpoint): New function, factored out from
5243 linux_low_filter_event.
5244 (lp_status_maybe_breakpoint): Delete function.
5245 (linux_low_filter_event): Remove filter_ptid argument.
5246 Leave thread group exits pending here. Store the LWP's stop PC.
5247 Always leave events pending.
5248 (linux_wait_for_event_filtered): Pull all events out of the
5249 kernel, and leave them all pending.
5250 (count_events_callback, select_event_lwp_callback): Consider all
5251 events.
5252 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5253 (select_event_lwp): Only give preference to the stepping LWP in
5254 all-stop mode. Adjust comments.
5255 (ignore_event): New function.
5256 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5257 references to cancel_breakpoints. Adjust to renames. Also give
5258 equal priority to all LWPs that have had events in non-stop mode.
5259 If reporting a software breakpoint event, unadjust the LWP's PC.
5260 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5261 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5262 Adjust.
5263 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5264 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5265 (linux_stopped_by_watchpoint): Adjust.
5266 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5267 * linux-low.h (enum lwp_stop_reason): New.
5268 (struct lwp_info) <stop_pc>: Adjust comment.
5269 <stopped_by_watchpoint>: Delete field.
5270 <stop_reason>: New field.
5271 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5272 * mem-break.c (software_breakpoint_inserted_here)
5273 (hardware_breakpoint_inserted_here): New function.
5274 * mem-break.h (software_breakpoint_inserted_here)
5275 (hardware_breakpoint_inserted_here): Declare.
5276 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5277 (cancel_breakpoints): Delete.
5278 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5279 (upload_fast_traceframes): Remove references to
5280 cancel_breakpoints.
5281
a33e3959
PA
52822015-01-09 Pedro Alves <palves@redhat.com>
5283
5284 * thread-db.c (find_new_threads_callback): Ignore thread if the
5285 kernel thread ID is -1.
5286
8784d563
PA
52872015-01-09 Pedro Alves <palves@redhat.com>
5288
5289 * linux-low.c (linux_attach_fail_reason_string): Move to
5290 nat/linux-ptrace.c, and rename.
5291 (linux_attach_lwp): Update comment.
5292 (attach_proc_task_lwp_callback): New function.
5293 (linux_attach): Adjust to rename and use
5294 linux_proc_attach_tgid_threads.
5295 (linux_attach_fail_reason_string): Delete declaration.
5296
76f2b779
JB
52972015-01-01 Joel Brobecker <brobecker@adacore.com>
5298
5299 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5300 * server.c (gdbserver_version): Likewise.
5301
fafcc06a
SDJ
53022014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5303
5304 * remote-utils.c: Include ctype.h.
5305 (input_interrupt): Explicitly handle the case when the char
5306 received is the NUL byte. Improve the printing of non-ASCII
5307 characters.
5308
beed38b8
JB
53092014-12-16 Joel Brobecker <brobecker@adacore.com>
5310
5311 * linux-low.c (linux_low_filter_event): Update call to
5312 linux_enable_event_reporting following the addition of
5313 a new parameter to that function.
5314
bf330350
CU
53152014-12-16 Catalin Udma <catalin.udma@freescale.com>
5316
5317 PR server/17457
5318 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5319 (AARCH64_FPCR_REGNO): Likewise.
5320 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5321 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5322 (aarch64_store_fpregset): Likewise.
5323
5227d625
JB
53242014-12-15 Joel Brobecker <brobecker@adacore.com>
5325
5326 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5327 Remove FIXME comment about assumption about N.
5328
f93b65a0
JB
53292014-12-13 Joel Brobecker <brobecker@adacore.com>
5330
5331 * configure.ac: If large-file support is disabled in GDBserver,
5332 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5333 * configure: Regenerate.
5334
e5a9158d
AA
53352014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5336
5337 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5338 warning upon ENODATA from ptrace.
5339 * linux-s390-low.c (s390_store_tdb): New.
5340 (s390_regsets): Add regset for NT_S390_TDB.
5341
feea5f36
AA
53422014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5343
5344 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5345 without a fill_function.
5346 * linux-s390-low.c (s390_fill_last_break): Remove.
5347 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5348 (s390_arch_setup): Use regset's size instead of fill_function for
5349 loop end condition.
5350
098dbe61
AA
53512014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5352
5353 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5354 the regset's store function when ptrace returned an error.
5355 * regcache.c (get_thread_regcache): Invalidate register cache
5356 before fetching inferior's registers.
5357
28eef672
AA
53582014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5359
5360 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5361 while-loop as for-loop.
5362 (regsets_store_inferior_registers): Likewise.
5363
bdca27a2
YQ
53642014-11-28 Yao Qi <yao@codesourcery.com>
5365
5366 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5367 * config.in, configure: Re-generate.
5368 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5369 is defined.
5370
9c232dda
YQ
53712014-11-21 Yao Qi <yao@codesourcery.com>
5372
5373 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5374 (AC_CHECK_HEADERS): Remove malloc.h.
5375 * configure: Re-generated.
5376 * config.in: Re-generated.
5377 * server.h: Don't include alloca.h and malloc.h.
5378 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5379 Don't include malloc.h.
5380
43968415
JB
53812014-11-17 Joel Brobecker <brobecker@adacore.com>
5382
5383 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5384 corresponding ERRNO check in same block.
5385
40e91bc7
PA
53862014-11-12 Pedro Alves <palves@redhat.com>
5387
5388 * server.c (cont_thread): Update comment.
5389 (start_inferior, attach_inferior): No longer clear cont_thread.
5390 (handle_v_cont): No longer set cont_thread.
5391 (captured_main): Clear cont_thread each time a GDB connects.
5392
c2c118cf
PA
53932014-11-12 Pedro Alves <palves@redhat.com>
5394
5395 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5396 thread, and don't resume all threads if the Hc thread has exited.
5397
78708b7c
PA
53982014-11-12 Pedro Alves <palves@redhat.com>
5399
5400 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5401 the process group instead of to a specific LWP.
5402
a2abc7de
PA
54032014-10-15 Pedro Alves <palves@redhat.com>
5404
5405 PR server/17487
5406 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5407 parameter.
5408 (arm_set_thread_context): Delete.
5409 (the_low_target): Adjust.
5410 * win32-i386-low.c (debug_registers_changed)
5411 (debug_registers_used): Delete.
5412 (update_debug_registers_callback): New function.
5413 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5414 needing to update their debug registers.
5415 (win32_get_current_dr): New function.
5416 (x86_dr_low_get_addr, x86_dr_low_get_control)
5417 (x86_dr_low_get_status): Fetch the debug register from the thread
5418 record's context.
5419 (i386_initial_stuff): Adjust.
5420 (i386_get_thread_context): Remove current_event parameter. Don't
5421 clear debug_registers_changed nor copy DR values to
5422 debug_reg_state.
5423 (i386_set_thread_context): Delete.
5424 (i386_prepare_to_resume): New function.
5425 (i386_thread_added): Mark the thread as needing to update irs
5426 debug registers.
5427 (the_low_target): Remove i386_set_thread_context and install
5428 i386_prepare_to_resume.
5429 * win32-low.c (win32_get_thread_context): Adjust.
5430 (win32_set_thread_context): Use SetThreadContext
5431 directly.
5432 (win32_prepare_to_resume): New function.
5433 (win32_require_context): New function, factored out from ...
5434 (thread_rec): ... this.
5435 (continue_one_thread): Call win32_prepare_to_resume on each thread
5436 we're about to continue.
5437 (win32_resume): Call win32_prepare_to_resume on the event thread.
5438 * win32-low.h (struct win32_thread_info)
5439 <debug_registers_changed>: New field.
5440 (struct win32_target_ops): Change prototype of set_thread_context,
5441 delete set_thread_context and add prepare_to_resume.
5442 (win32_require_context): New declaration.
5443
a442d071
GB
54442014-10-08 Gary Benson <gbenson@redhat.com>
5445
5446 * server.h: Do not include common-exceptions.h.
5447
6f1947e8
GB
54482014-10-08 Gary Benson <gbenson@redhat.com>
5449
5450 * server.h: Do not include cleanups.h.
5451
63b434a4
JH
54522014-09-30 James Hogan <james.hogan@imgtec.com>
5453
5454 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5455 mips64-dsp-linux.c.
5456
c4d9ceb6
YQ
54572014-09-23 Yao Qi <yao@codesourcery.com>
5458
5459 * linux-low.c (lp_status_maybe_breakpoint): New function.
5460 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5461 (count_events_callback): Likewise.
5462 (select_event_lwp_callback): Likewise.
5463 (cancel_breakpoints_callback): Likewise.
5464
89a5711c
DB
54652014-09-19 Don Breazeal <donb@codesourcery.com>
5466
5467 * linux-low.c (handle_extended_wait): Call
5468 linux_ptrace_get_extended_event.
5469 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5470 linux_is_extended_waitstatus.
5471
bffc0964
JB
54722014-09-16 Joel Brobecker <brobecker@adacore.com>
5473
5474 * Makefile.in (CPPFLAGS): Define.
5475 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5476 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5477
0bfdf32f
GB
54782014-09-16 Gary Benson <gbenson@redhat.com>
5479
5480 * inferiors.h (current_inferior): Renamed as...
5481 (current_thread): New variable. All uses updated.
5482 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5483 (maybe_move_out_of_jump_pad): Likewise.
5484 (cancel_breakpoint): Likewise.
5485 (linux_low_filter_event): Likewise.
5486 (wait_for_sigstop): Likewise.
5487 (linux_resume_one_lwp): Likewise.
5488 (need_step_over_p): Likewise.
5489 (start_step_over): Likewise.
5490 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5491 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5492 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5493 and save_inferior as saved_thread.
5494 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5495 saved_thread.
5496 (regcache_invalidate_thread): Likewise.
5497 * remote-utils.c (prepare_resume_reply): Likewise.
5498 * thread-db.c (thread_db_get_tls_address): Likewise.
5499 (disable_thread_event_reporting): Likewise.
5500 (remove_thread_event_breakpoints): Likewise.
5501 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5502 as saved_thread.
5503 * target.h (set_desired_inferior): Renamed as...
5504 (set_desired_thread): New declaration. All uses updated.
5505 * server.c (myresume): Updated comment to reference thread instead
5506 of inferior.
5507 (handle_serial_event): Likewise.
5508 (handle_target_event): Likewise.
5509
361c8ade
GB
55102014-09-12 Tom Tromey <tromey@redhat.com>
5511 Gary Benson <gbenson@redhat.com>
5512
5513 * regcache.h: Include common-regcache.h.
5514 (regcache_read_pc): Don't declare.
5515 * regcache.c (get_thread_regcache_for_ptid): New function.
5516
bd9269f7
GB
55172014-09-11 Tom Tromey <tromey@redhat.com>
5518 Gary Benson <gbenson@redhat.com>
5519
5520 * symbol.c: New file.
5521 * Makefile.in (SFILES): Add symbol.c.
5522 (OBS): Add symbol.o.
5523
f8c1d06b
GB
55242014-09-11 Gary Benson <gbenson@redhat.com>
5525
5526 * target.c (target_stop_ptid, target_continue_ptid): New
5527 functions.
5528
721ec300
GB
55292014-09-11 Tom Tromey <tromey@redhat.com>
5530 Gary Benson <gbenson@redhat.com>
5531
5532 * target.h: Include target/target.h.
5533 * target.c (target_read_memory, target_read_uint32)
5534 (target_write_memory): New functions.
5535
c5e92cca
GB
55362014-09-11 Gary Benson <gbenson@redhat.com>
5537
5538 * server.h (debug_hw_points): Don't declare.
5539 * server.c (debug_hw_points): Don't define. Replace all uses
5540 with show_debug_regs.
5541 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5542 all uses with show_debug_regs.
5543
2e4bb98a
EBM
55442014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5545
5546 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5547 endianness into account.
5548 (ppc_supply_ptrace_register): Likewise.
5549
ac740bc7
JH
55502014-09-03 James Hogan <james.hogan@imgtec.com>
5551
5552 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5553 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5554
97ea6506
GB
55552014-09-03 Gary Benson <gbenson@redhat.com>
5556
5557 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5558 ALL_DEBUG_ADDRESS_REGISTERS.
5559
df7e5265
GB
55602014-09-02 Gary Benson <gbenson@redhat.com>
5561
5562 * i386-low.h: Renamed as...
5563 * x86-low.h: New file. All type, function and variable name
5564 prefixes changed from "i386_" to "x86_". All references updated.
5565 * i386-low.c: Renamed as...
5566 * x86-low.c: New file. All type, function and variable name
5567 prefixes changed from "i386_" to "x86_". All references updated.
5568
ed859da7
GB
55692014-09-02 Gary Benson <gbenson@redhat.com>
5570
5571 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5572 (x86_linux_new_thread): Likewise.
5573
860789c7
GB
55742014-08-29 Gary Benson <gbenson@redhat.com>
5575
5576 * server.h (setjmp.h): Do not include.
5577 (toplevel): Do not declare.
5578 (common-exceptions.h): Include.
5579 (cleanups.h): Likewise.
5580 * server.c (toplevel): Do not define.
5581 (exit_code): New static global.
5582 (detach_or_kill_for_exit_cleanup): New function.
5583 (main): New function. Original main renamed to...
5584 (captured_main): New function.
5585 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5586
ff55e1b5
GB
55872014-08-29 Gary Benson <gbenson@redhat.com>
5588
5589 * Makefile.in (SFILES): Add common/common-exceptions.c.
5590 (OBS): Add common-exceptions.o.
5591 (common-exceptions.o): New rule.
5592 * utils.c (prepare_to_throw_exception): New function.
5593
e9bcb658
GB
55942014-08-29 Gary Benson <gbenson@redhat.com>
5595
5596 * config.in: Regenerate.
5597 * configure: Likewise.
5598
e3180625
GB
55992014-08-29 Gary Benson <gbenson@redhat.com>
5600
5601 * Makefile.in (SFILES): Add common/cleanups.c.
5602 (OBS): cleanups.o.
5603 (cleanups.o): New rule.
5604
e3d6ba5d
GB
56052014-08-29 Gary Benson <gbenson@redhat.com>
5606
5607 * utils.c (internal_vwarning): New function.
5608
7096e886
GB
56092014-08-28 Gary Benson <gbenson@redhat.com>
5610
5611 * utils.h (fatal): Remove declaration.
5612 * utils.c (fatal): Remove function.
5613
14ce3192
GB
56142014-08-28 Gary Benson <gbenson@redhat.com>
5615
5616 * tracepoint.c (gdb_agent_init): Replace fatal with
5617 perror_with_name.
5618 (initialize_tracepoint): Likewise.
5619
50278d59
GB
56202014-08-28 Gary Benson <gbenson@redhat.com>
5621
5622 * remote-utils.c (remote_prepare): Replace fatal with error.
5623
aa96c426
GB
56242014-08-28 Gary Benson <gbenson@redhat.com>
5625
5626 * linux-low.c (linux_async): Replace fatal with warning.
5627 Tidy up and return.
5628 (linux_start_non_stop): Return -1 if linux_async failed.
5629
f7160e97
GB
56302014-08-28 Gary Benson <gbenson@redhat.com>
5631
5632 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5633 gdb_assert.
5634 (i386_dr_low_get_addr): Remove vague comment.
5635 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5636 gdb_assert.
5637
38e08fca
GB
56382014-08-28 Gary Benson <gbenson@redhat.com>
5639
5640 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5641 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5642 internal_error.
5643 (linux_resume_one_lwp): Likewise.
5644 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5645 gdb_assert.
5646 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5647 with internal_error.
5648 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5649 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5650 (find_register_by_name): Replace fatal with internal_error.
5651 (find_regno): Likewise.
5652 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5653 * thread-db.c (thread_db_create_event): Likewise.
5654 (thread_db_load_search): Likewise.
5655 (try_thread_db_load_1): Likewise.
5656 * tracepoint.c (get_jump_space_head): Replace fatal with
5657 internal_error.
5658 (claim_trampoline_space): Likewise.
5659 (have_fast_tracepoint_trampoline_buffer): Likewise.
5660 (cmd_qtstart): Likewise.
5661 (stop_tracing): Likewise.
5662 (fast_tracepoint_collecting): Likewise.
5663 (target_malloc): Likewise.
5664 (download_tracepoint): Likewise.
5665 (download_trace_state_variables): Replace check with gdb_assert.
5666 (upload_fast_traceframes): Replace fatal with internal_error.
5667
34abf635
GB
56682014-08-19 Tom Tromey <tromey@redhat.com>
5669 Gary Benson <gbenson@redhat.com>
5670
5671 * Makefile.in (SFILES): Add common/common-debug.c.
5672 (OBS): Add common-debug.o.
5673 (common-debug.o): New rule.
5674 * debug.h (debug_printf): Don't declare.
5675 * debug.c (debug_printf): Renamed and rewritten as...
5676 (debug_vprintf): New function.
5677
f6e94d78
GB
56782014-08-19 Gary Benson <gbenson@redhat.com>
5679
5680 * utils.h: Do not include print-utils.h.
5681
9239eeab
GB
56822014-08-19 Tom Tromey <tromey@redhat.com>
5683 Gary Benson <gbenson@redhat.com>
5684
5685 * server.h: Add static assertion.
5686 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5687
ef87c8bb
GB
56882014-08-19 Tom Tromey <tromey@redhat.com>
5689 Gary Benson <gbenson@redhat.com>
5690
5691 * Makefile.in (SFILES): Add common/errors.c.
5692 (OBS): Add errors.o.
5693 (IPA_OBS): Add errors-ipa.o.
5694 (errors.o): New rule.
5695 (errors-ipa.o): Likewise.
5696 * utils.h (perror_with_name, error, warning): Don't declare.
5697 * utils.c (warning): Renamed and rewritten as...
5698 (vwarning): New function.
5699 (error): Renamed and rewritten as...
5700 (verror): New function.
5701 (internal_error): Renamed and rewritten as...
5702 (internal_verror): New function.
5703
bb974a24
GB
57042014-08-07 Gary Benson <gbenson@redhat.com>
5705
5706 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5707 * configure: Regenerate.
5708 * config.in: Likewise.
5709 * server.h: Do not include errno.h.
5710 * event-loop.c: Likewise.
5711 * hostio-errno.c: Likewise.
5712 * linux-low.c: Likewise.
5713 * remote-utils.c: Likewise.
5714 * spu-low.c: Likewise.
5715 * utils.c: Likewise.
5716 * gdbreplay.c: Unconditionally include errno.h.
5717
6d3d12eb
GB
57182014-08-07 Gary Benson <gbenson@redhat.com>
5719
5720 * server.h: Do not include string.h.
5721 * event-loop.c: Likewise.
5722 * linux-low.c: Likewise.
5723 * regcache.c: Likewise.
5724 * remote-utils.c: Likewise.
5725 * spu-low.c: Likewise.
5726 * utils.c: Likewise.
5727
dccbb609
GB
57282014-08-07 Gary Benson <gbenson@redhat.com>
5729
5730 * server.h: Do not include gdb_assert.h.
5731
e76df0d0
GB
57322014-08-07 Gary Benson <gbenson@redhat.com>
5733
5734 * server.h: Do not include common-utils.h.
5735
4cb9c816
GB
57362014-08-07 Gary Benson <gbenson@redhat.com>
5737
5738 * server.h: Do not include ptid.h.
5739 * notif.h: Likewise.
5740
3995eeee
GB
57412014-08-07 Gary Benson <gbenson@redhat.com>
5742
5743 * server.h: Do not include gdb_locale.h.
5744
cb9f1a9b
GB
57452014-08-07 Gary Benson <gbenson@redhat.com>
5746
5747 * server.h: Do not include gdb/signals.h.
5748 * win32-low.c: Likewise.
5749
a5fceff8
GB
57502014-08-07 Gary Benson <gbenson@redhat.com>
5751
5752 * server.h: Do not include pathmax.h.
5753
b9391142
GB
57542014-08-07 Gary Benson <gbenson@redhat.com>
5755
5756 * server.h: Do not include libiberty.h.
5757 * linux-bfin-low.c: Likewise.
5758
0e443c87
GB
57592014-08-07 Gary Benson <gbenson@redhat.com>
5760
5761 * server.h: Do not include ansidecl.h.
5762
8ebb3f56
GB
57632014-08-07 Gary Benson <gbenson@redhat.com>
5764
5765 * linux-x86-low.c: Do not include stddef.h.
5766 * lynx-ppc-low.c: Likewise.
5767 * tracepoint.c: Likewise.
5768
8980bdf6
GB
57692014-08-07 Gary Benson <gbenson@redhat.com>
5770
5771 * server.h: Do not include stdarg.h.
5772 * nto-low.c: Likewise.
5773
d7096f71
GB
57742014-08-07 Gary Benson <gbenson@redhat.com>
5775
5776 * server.h: Do not include stdlib.h.
5777 * inferiors.c: Likewise.
5778 * linux-low.c: Likewise.
5779 * regcache.c: Likewise.
5780 * spu-low.c: Likewise.
5781 * tracepoint.c: Likewise.
5782 * utils.c: Likewise.
5783
d02f550d
GB
57842014-08-07 Gary Benson <gbenson@redhat.com>
5785
5786 * server.h: Do not include stdio.h.
5787 * linux-low.c: Likewise.
5788 * remote-utils.c: Likewise.
5789 * spu-low.c: Likewise.
5790 * utils.c: Likewise.
5791 * wincecompat.c: Likewise.
5792
87f6c4e3
GB
57932014-08-06 Gary Benson <gbenson@redhat.com>
5794
5795 * regcache.c (init_register_cache): Move conditionals inside if.
5796
7089dca4
GB
57972014-08-06 Gary Benson <gbenson@redhat.com>
5798
5799 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5800
462f517e
GB
58012014-07-31 Gary Benson <gbenson@redhat.com>
5802
5803 * ax.h: Do not include server.h.
5804 * gdbthread.h: Likewise.
5805 * lynx-low.h: Likewise.
5806 * notif.h: Likewise.
5807
976411d6
GB
58082014-07-30 Gary Benson <gbenson@redhat.com>
5809
5810 * server.h: Include common-defs.h.
5811 Do not include config.h or build-gnulib-gdbserver/config.h.
5812
d41f6d8e
GB
58132014-07-30 Gary Benson <gbenson@redhat.com>
5814
5815 * hostio-errno.c: Move server.h to top of includes list.
5816 * inferiors.c: Likewise.
5817 * linux-x86-low.c: Likewise.
5818 * notif.c: Include server.h.
5819
314c6a35
TT
58202014-07-24 Tom Tromey <tromey@redhat.com>
5821 Gary Benson <gbenson@redhat.com>
5822
5823 * server.h (CORE_ADDR): Now unsigned.
5824
69ff6be5
PA
58252014-07-16 Pedro Alves <palves@redhat.com>
5826
5827 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5828
ce9e3fe7
PA
58292014-07-15 Pedro Alves <palves@redhat.com>
5830
5831 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5832 copy.
5833
e76126e8
PA
58342014-07-11 Pedro Alves <palves@redhat.com>
5835
5836 * linux-low.c (kill_wait_lwp): New function, based on
5837 kill_one_lwp_callback, but use my_waitpid directly.
5838 (kill_one_lwp_callback, linux_kill): Use it.
5839
8e9db26e
PA
58402014-06-23 Pedro Alves <palves@redhat.com>
5841
5842 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5843 before setting DR0..DR3.
5844
698b3e08
GB
58452014-06-20 Gary Benson <gbenson@redhat.com>
5846
5847 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5848 * configure: Regenerated.
5849 * config.in: Likewise.
5850
125f8a3d
GB
58512014-06-20 Gary Benson <gbenson@redhat.com>
5852
5853 * Makefile.in (SFILES): Update locations for files moved
5854 from common to nat.
5855 (object file files): Reordered.
5856
42995dbd
GB
58572014-06-20 Gary Benson <gbenson@redhat.com>
5858
5859 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5860 (i386_dr_low_set_addr): Likewise.
5861 (i386_dr_low_get_addr): Likewise.
5862 (i386_dr_low_can_set_control): Likewise.
5863 (i386_dr_low_set_control): Likewise.
5864 (i386_dr_low_get_control): Likewise.
5865 (i386_dr_low_get_status): Likewise.
5866 (i386_get_debug_register_length): Likewise.
5867 * linux-x86-low.c (i386_dr_low_set_addr):
5868 Changed signature. Made static.
5869 (i386_dr_low_get_addr): Likewise.
5870 (i386_dr_low_set_control): Likewise.
5871 (i386_dr_low_get_control): Likewise.
5872 (i386_dr_low_get_status): Likewise.
5873 (i386_dr_low): New global variable.
5874 * win32-i386-low.c (i386_dr_low_set_addr):
5875 Changed signature. Made static.
5876 (i386_dr_low_get_addr): Likewise.
5877 (i386_dr_low_set_control): Likewise.
5878 (i386_dr_low_get_control): Likewise.
5879 (i386_dr_low_get_status): Likewise.
5880 (i386_dr_low): New global variable.
5881
e1d2394b
MS
58822014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5883
5884 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5885 * Makefile.in (AR, AR_FLAGS): Define.
5886 * configure: Regenerate.
5887
3a8ee006
GB
58882014-06-19 Gary Benson <gbenson@redhat.com>
5889
5890 * Makefile.in (i386-dregs.o): New rule.
5891 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5892 * i386-low.c (target.h): Remove include.
5893 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5894 (DR_CONTROL_SHIFT): Likewise.
5895 (DR_CONTROL_SIZE): Likewise.
5896 (DR_RW_EXECUTE): Likewise.
5897 (DR_RW_WRITE): Likewise.
5898 (DR_RW_READ): Likewise.
5899 (DR_RW_IORW): Likewise.
5900 (DR_LEN_1): Likewise.
5901 (DR_LEN_2): Likewise.
5902 (DR_LEN_4): Likewise.
5903 (DR_LEN_8): Likewise.
5904 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5905 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5906 (DR_ENABLE_SIZE): Likewise.
5907 (DR_LOCAL_SLOWDOWN): Likewise.
5908 (DR_GLOBAL_SLOWDOWN): Likewise.
5909 (DR_CONTROL_RESERVED): Likewise.
5910 (I386_DR_CONTROL_MASK): Likewise.
5911 (I386_DR_VACANT): Likewise.
5912 (I386_DR_LOCAL_ENABLE): Likewise.
5913 (I386_DR_GLOBAL_ENABLE): Likewise.
5914 (I386_DR_DISABLE): Likewise.
5915 (I386_DR_SET_RW_LEN): Likewise.
5916 (I386_DR_GET_RW_LEN): Likewise.
5917 (I386_DR_WATCH_HIT): Likewise.
5918 (i386_wp_op_t): Likewise.
5919 (i386_show_dr): Likewise.
5920 (i386_length_and_rw_bits): Likewise.
5921 (i386_insert_aligned_watchpoint): Likewise.
5922 (i386_remove_aligned_watchpoint): Likewise.
5923 (i386_handle_nonaligned_watchpoint): Likewise.
5924 i386_update_inferior_debug_regs(): Likewise.
5925 (i386_dr_insert_watchpoint): Likewise.
5926 (i386_dr_remove_watchpoint): Likewise.
5927 (i386_dr_region_ok_for_watchpoint): Likewise.
5928 (i386_dr_stopped_data_address): Likewise.
5929 (i386_dr_stopped_by_watchpoint): Likewise.
5930
8f26655c
GB
59312014-06-19 Gary Benson <gbenson@redhat.com>
5932
5933 * i386-low.c (i386_dr_show): Renamed to
5934 i386_show_dr and made static. All uses updated.
5935 (i386_dr_length_and_rw_bits): Renamed to
5936 i386_length_and_rw_bits and made static.
5937 All uses updated.
5938 (i386_dr_insert_aligned_watchpoint): Renamed to
5939 i386_insert_aligned_watchpoint and made static.
5940 All uses updated.
5941 (i386_dr_remove_aligned_watchpoint): Renamed to
5942 i386_remove_aligned_watchpoint and made static.
5943 All uses updated.
5944 (i386_dr_update_inferior_debug_regs): Renamed to
5945 i386_update_inferior_debug_regs and made static.
5946 All uses updated.
5947
b9228891
GB
59482014-06-18 Gary Benson <gbenson@redhat.com>
5949
5171def3
GB
5950 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5951 (i386_dr_low_can_set_control): Likewise.
5952 (i386_get_debug_register_length): Likewise.
5953 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5954 (i386_dr_low_can_set_control): Likewise.
5955 (i386_get_debug_register_length): Likewise.
5956
59572014-06-17 Gary Benson <gbenson@redhat.com>
5958
b9228891
GB
5959 * i386-low.h (i386-dregs.h): New include.
5960 (DR_FIRSTADDR): Now in i386-dregs.h.
5961 (DR_LASTADDR): Likewise.
5962 (DR_NADDR): Likewise.
5963 (DR_STATUS): Likewise.
5964 (DR_CONTROL): Likewise.
5965 (i386_debug_reg_state): Likewise.
5966 (i386_dr_insert_watchpoint): Likewise.
5967 (i386_dr_remove_watchpoint): Likewise.
5968 (i386_dr_region_ok_for_watchpoint): Likewise.
5969 (i386_dr_stopped_data_address): Likewise.
5970 (i386_dr_stopped_by_watchpoint): Likewise.
5971 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5972
4be83cc2
GB
59732014-06-18 Gary Benson <gbenson@redhat.com>
5974
5975 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5976 i386_dr_insert_watchpoint.
5977 (i386_low_remove_watchpoint): Renamed to
5978 i386_dr_remove_watchpoint.
5979 (i386_low_region_ok_for_watchpoint): Renamed to
5980 i386_dr_region_ok_for_watchpoint.
5981 (i386_low_stopped_data_address): Renamed to
5982 i386_dr_stopped_data_address.
5983 (i386_low_stopped_by_watchpoint): Renamed to
5984 i386_dr_stopped_by_watchpoint.
5985 * i386-low.c (i386_show_dr): Renamed to
5986 i386_dr_show and made nonstatic. All uses updated.
5987 (i386_length_and_rw_bits): Renamed to
5988 i386_dr_length_and_rw_bits and made nonstatic.
5989 All uses updated.
5990 (i386_insert_aligned_watchpoint): Renamed to
5991 i386_dr_insert_aligned_watchpoint and made nonstatic.
5992 All uses updated.
5993 (i386_remove_aligned_watchpoint): Renamed to
5994 i386_dr_remove_aligned_watchpoint and made nonstatic.
5995 All uses updated.
5996 (i386_update_inferior_debug_regs): Renamed to
5997 i386_dr_update_inferior_debug_regs and made nonstatic.
5998 All uses updated.
5999 (i386_low_insert_watchpoint): Renamed to
6000 i386_dr_insert_watchpoint. All uses updated.
6001 (i386_low_remove_watchpoint): Renamed to
6002 i386_dr_remove_watchpoint. All uses updated.
6003 (i386_low_region_ok_for_watchpoint): Renamed to
6004 i386_dr_region_ok_for_watchpoint. All uses updated.
6005 (i386_low_stopped_data_address): Renamed to
6006 i386_dr_stopped_data_address. All uses updated.
6007 (i386_low_stopped_by_watchpoint): Renamed to
6008 i386_dr_stopped_by_watchpoint. All uses updated.
6009
131aa0d4
GB
60102014-06-18 Gary Benson <gbenson@redhat.com>
6011
6012 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6013 (i386_dr_low_can_set_control): Likewise.
6014 (i386_insert_aligned_watchpoint): New check.
6015
d9305f7f
GB
60162014-06-18 Gary Benson <gbenson@redhat.com>
6017
6018 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6019 Renamed to state.
6020
e927c9fc
GB
60212014-06-18 Gary Benson <gbenson@redhat.com>
6022
6023 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6024 instead of fatal and error.
6025 (i386_handle_nonaligned_watchpoint): Likewise.
6026
1b6d4134
GB
60272014-06-18 Gary Benson <gbenson@redhat.com>
6028
6029 * i386-low.c (i386_get_debug_register_length): New macro.
6030 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6031 (i386_show_dr): Use debug_printf instead of fprintf. Use
6032 phex to format values.
6033
6e62758f
GB
60342014-06-18 Gary Benson <gbenson@redhat.com>
6035
6036 * i386-low.h: Comment changes.
6037 * i386-low.c: Likewise.
6038
fc6e2f03
GB
60392014-06-18 Gary Benson <gbenson@redhat.com>
6040
6041 * i386-low.c: Whitespace changes.
6042
f9d1eeed
TT
60432014-06-12 Tom Tromey <tromey@redhat.com>
6044
6045 * utils.c (freeargv): Remove.
6046
0b04e523
TT
60472014-06-12 Tom Tromey <tromey@redhat.com>
6048
6049 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6050 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6051 (parse_debug_format_options): Likewise.
6052 (gdbserver_usage): Likewise.
6053 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6054 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6055 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6056 against libiberty.
6057 ($(LIBGNU)): Depend on libiberty.
6058 (all-lib): Recurse into all subdirs.
6059 (install-only): Invoke "install" target in subdirs.
6060 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6061 targets.
6062 * configure: Rebuild.
6063 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6064 for vasprintf, vsnprintf, or gettimeofday.
6065 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6066 srv_tgtobj.
6067
270c9937
JB
60682014-06-05 Joel Brobecker <brobecker@adacore.com>
6069
6070 * development.sh: Delete.
6071 * Makefile.in (config.status): Adjust dependency on development.sh.
6072 * configure.ac: Adjust development.sh source call.
6073 * configure: Regenerate.
6074
0a261ed8
PA
60752014-06-02 Pedro Alves <palves@redhat.com>
6076
6077 * ax.c (gdb_free_agent_expr): New function.
6078 * ax.h (gdb_free_agent_expr): New declaration.
6079 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6080 list.
6081 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6082 static.
6083 (clear_breakpoint_conditions_and_commands): New function.
6084 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6085 (clear_breakpoint_conditions_and_commands): New declaration.
6086
e9dae05e
RR
60872014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6088
6089 * linux-aarch64-low.c (asm/ptrace.h): Include.
6090
5876f503
JK
60912014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6092
6093 Fix TLS access for -static -pthread.
6094 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6095 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6096 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6097
802e8e6d
PA
60982014-05-20 Pedro Alves <palves@redhat.com>
6099
6100 * linux-aarch64-low.c (aarch64_insert_point)
6101 (aarch64_remove_point): No longer check whether the type is
6102 supported here. Adjust to new interface.
6103 (the_low_target): Install aarch64_supports_z_point_type as
6104 supports_z_point_type method.
6105 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6106 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6107 instead of a Z packet char. Adjust.
6108 (arm_supports_z_point_type): New function.
6109 (arm_insert_point, arm_remove_point): Adjust to new interface.
6110 (the_low_target): Install arm_supports_z_point_type.
6111 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6112 (cris_insert_point, cris_remove_point): Adjust to new interface.
6113 Don't check whether the type is supported here.
6114 (the_low_target): Install cris_supports_z_point_type.
6115 * linux-low.c (linux_supports_z_point_type): New function.
6116 (linux_insert_point, linux_remove_point): Adjust to new interface.
6117 * linux-low.h (struct linux_target_ops) <insert_point,
6118 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6119 raw_breakpoint pointer parameter.
6120 <supports_z_point_type>: New method.
6121 * linux-mips-low.c (mips_supports_z_point_type): New function.
6122 (mips_insert_point, mips_remove_point): Adjust to new interface.
6123 Use mips_supports_z_point_type.
6124 (the_low_target): Install mips_supports_z_point_type.
6125 * linux-ppc-low.c (the_low_target): Install NULL as
6126 supports_z_point_type method.
6127 * linux-s390-low.c (the_low_target): Install NULL as
6128 supports_z_point_type method.
6129 * linux-sparc-low.c (the_low_target): Install NULL as
6130 supports_z_point_type method.
6131 * linux-x86-low.c (x86_supports_z_point_type): New function.
6132 (x86_insert_point): Adjust to new insert_point interface. Use
6133 insert_memory_breakpoint. Adjust to new
6134 i386_low_insert_watchpoint interface.
6135 (x86_remove_point): Adjust to remove_point interface. Use
6136 remove_memory_breakpoint. Adjust to new
6137 i386_low_remove_watchpoint interface.
6138 (the_low_target): Install x86_supports_z_point_type.
6139 * lynx-low.c (lynx_target_ops): Install NULL as
6140 supports_z_point_type callback.
6141 * nto-low.c (nto_supports_z_point_type): New.
6142 (nto_insert_point, nto_remove_point): Adjust to new interface.
6143 (nto_target_ops): Install nto_supports_z_point_type.
6144 * mem-break.c: Adjust intro comment.
6145 (struct raw_breakpoint) <raw_type, size>: New fields.
6146 <inserted>: Update comment.
6147 <shlib_disabled>: Delete field.
6148 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6149 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6150 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6151 (raw_bkpt_type_to_target_hw_bp_type): New function.
6152 (find_enabled_raw_code_breakpoint_at): New function.
6153 (find_raw_breakpoint_at): New type and size parameters. Use them.
6154 (insert_memory_breakpoint): New function, based off
6155 set_raw_breakpoint_at.
6156 (remove_memory_breakpoint): New function.
6157 (set_raw_breakpoint_at): Reimplement.
6158 (set_breakpoint): New, based on set_breakpoint_at.
6159 (set_breakpoint_at): Reimplement.
6160 (delete_raw_breakpoint): Go through the_target->remove_point
6161 instead of assuming memory breakpoints.
6162 (find_gdb_breakpoint_at): Delete.
6163 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6164 (find_gdb_breakpoint): New function.
6165 (set_gdb_breakpoint_at): Delete.
6166 (z_type_supported): New function.
6167 (set_gdb_breakpoint_1): New function, loosely based off
6168 set_gdb_breakpoint_at.
6169 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6170 (delete_gdb_breakpoint_at): Delete.
6171 (delete_gdb_breakpoint_1): New function, loosely based off
6172 delete_gdb_breakpoint_at.
6173 (delete_gdb_breakpoint): New function.
6174 (clear_gdb_breakpoint_conditions): Rename to ...
6175 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6176 breakpoint.
6177 (add_condition_to_breakpoint): Make static.
6178 (add_breakpoint_condition): Take a struct breakpoint pointer
6179 instead of an address. Adjust.
6180 (gdb_condition_true_at_breakpoint): Rename to ...
6181 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6182 z_type parameter.
6183 (gdb_condition_true_at_breakpoint): Reimplement.
6184 (add_breakpoint_commands): Take a struct breakpoint pointer
6185 instead of an address. Adjust.
6186 (gdb_no_commands_at_breakpoint): Rename to ...
6187 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6188 parameter. Return true if no breakpoint was found. Change debug
6189 output.
6190 (gdb_no_commands_at_breakpoint): Reimplement.
6191 (run_breakpoint_commands): Rename to ...
6192 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6193 and change return type to boolean.
6194 (run_breakpoint_commands): New function.
6195 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6196 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6197 breakpoint. Go through the_target->remove_point instead of
6198 assuming memory breakpoint.
6199 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6200 software and hardware breakpoints.
6201 (reinsert_raw_breakpoint): Go through the_target->insert_point
6202 instead of assuming memory breakpoint.
6203 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6204 software and hardware breakpoints.
6205 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6206 Check both software and hardware breakpoints.
6207 (validate_inserted_breakpoint): Assert the breakpoint is a
6208 software breakpoint. Set the inserted flag to -1 instead of
6209 setting shlib_disabled.
6210 (delete_disabled_breakpoints): Adjust.
6211 (validate_breakpoints): Only validate software breakpoints.
6212 Adjust to inserted flag change.
6213 (check_mem_read, check_mem_write): Skip breakpoint types other
6214 than software breakpoints. Adjust to inserted flag change.
6215 * mem-break.h (enum raw_bkpt_type): New enum.
6216 (raw_breakpoint, struct process_info): Forward declare.
6217 (Z_packet_to_target_hw_bp_type): Delete declaration.
6218 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6219 (set_gdb_breakpoint, delete_gdb_breakpoint)
6220 (clear_breakpoint_conditions): New declarations.
6221 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6222 (breakpoint_inserted_here): Update comment.
6223 (add_breakpoint_condition, add_breakpoint_commands): Replace
6224 address parameter with a breakpoint pointer parameter.
6225 (gdb_breakpoint_here): Update comment.
6226 (delete_gdb_breakpoint_at): Delete.
6227 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6228 * server.c (process_point_options): Take a struct breakpoint
6229 pointer instead of an address. Adjust.
6230 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6231 delete_gdb_breakpoint.
6232 * spu-low.c (spu_target_ops): Install NULL as
6233 supports_z_point_type method.
6234 * target.h: Include mem-break.h.
6235 (struct target_ops) <prepare_to_access_memory>: Update comment.
6236 <supports_z_point_type>: New field.
6237 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6238 instead of a char. Also take a raw breakpoint pointer.
6239 * win32-arm-low.c (the_low_target): Install NULL as
6240 supports_z_point_type.
6241 * win32-i386-low.c (i386_supports_z_point_type): New function.
6242 (i386_insert_point, i386_remove_point): Adjust to new interface.
6243 (the_low_target): Install i386_supports_z_point_type.
6244 * win32-low.c (win32_supports_z_point_type): New function.
6245 (win32_insert_point, win32_remove_point): Adjust to new interface.
6246 (win32_target_ops): Install win32_supports_z_point_type.
6247 * win32-low.h (struct win32_target_ops):
6248 <supports_z_point_type>: New method.
6249 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6250 instead of a char. Also take a raw breakpoint pointer.
6251
932539e3
PA
62522014-05-20 Pedro Alves <palves@redhat.com>
6253
6254 * mem-break.h: Include break-common.h.
6255 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6256 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6257 (Z_packet_to_target_hw_bp_type): New declaration.
6258 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6259 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6260 (Z_PACKET_ACCESS_WP): Delete macros.
6261 (Z_packet_to_hw_type): Delete function.
6262 * i386-low.h: Don't include break-common.h here.
6263 (Z_packet_to_hw_type): Delete declaration.
6264 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6265 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6266 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6267 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6268 * linux-aarch64-low.c: Don't include break-common.h here.
6269 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6270 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6271 (Z_packet_to_target_hw_bp_type): Delete function.
6272 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6273 function.
6274 (mips_insert_point, mips_remove_point): Use
6275 Z_packet_to_target_hw_bp_type.
6276
4ff0d3d8
PA
62772014-05-20 Pedro Alves <palves@redhat.com>
6278
6279 * linux-aarch64-low.c: Include break-common.h.
6280 (enum target_point_type): Delete.
6281 (Z_packet_to_point_type): Rename to ...
6282 (Z_packet_to_target_hw_bp_type): ... this, and return a
6283 target_hw_bp_type instead.
6284 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6285 instead of an enum target_point_type.
6286 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6287 breakpoint type.
6288 (aarch64_dr_state_insert_one_point)
6289 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6290 (aarch64_handle_aligned_watchpoint)
6291 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6292 Take an enum target_hw_bp_type instead of an enum
6293 target_point_type.
6294 (aarch64_supports_z_point_type): New function.
6295 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6296 use Z_packet_to_target_hw_bp_type.
6297
786dc519
JB
62982014-05-20 Joel Brobecker <brobecker@adacore.com>
6299
6300 * configure.ac: Only use -Werror by default when DEVELOPMENT
6301 is true.
6302 * configure: Regenerate.
6303
9e0aa64f
JK
63042014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6305
6306 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6307 * linux-x86-low.c (X86_64_USER_REGS): New.
6308 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6309
2b577b92
YQ
63102014-04-28 Yao Qi <yao@codesourcery.com>
6311
6312 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6313 name.
6314
94611da2
PA
63152014-04-25 Pedro Alves <palves@redhat.com>
6316
6317 PR server/16255
6318 * linux-low.c (linux_attach_fail_reason_string): New function.
6319 (linux_attach_lwp): Delete.
6320 (linux_attach_lwp_1): Rename to ...
6321 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6322 argument. Remove "initial" parameter. Return int instead of
6323 void. Don't error or warn here.
6324 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6325 failure to attach to the tgid. Call warning when failing to
6326 attach to an lwp.
6327 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6328 argument. Remove "initial" parameter. Return int instead of
6329 void. Don't error or warn here.
6330 (linux_attach_fail_reason_string): New declaration.
6331 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6332 interface change. Use linux_attach_fail_reason_string.
6333
01f9f808
MS
63342014-04-24 Michael Sturm <michael.sturm@mintel.com>
6335 Walfred Tedeschi <walfred.tedeschi@intel.com>
6336
6337 * Makefile.in: Added rules to handle new files
6338 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6339 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6340 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6341 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6342 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6343 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6344 x32-avx512-linux.o.
6345 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6346 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6347 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6348 i386/x32-avx512.xml.
6349 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6350 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6351 i386/x32-avx512-linux.xml.
6352 * i387-fp.c (num_avx512_k_registers): New constant for number
6353 of K registers.
6354 (num_avx512_zmmh_low_registers): New constant for number of
6355 lower ZMM registers (0-15).
6356 (num_avx512_zmmh_high_registers): New constant for number of
6357 higher ZMM registers (16-31).
6358 (num_avx512_ymmh_registers): New contant for number of higher
6359 YMM registers (ymm16-31 added by avx521 on x86_64).
6360 (num_avx512_xmm_registers): New constant for number of higher
6361 XMM registers (xmm16-31 added by AVX512 on x86_64).
6362 (struct i387_xsave): Add space for AVX512 registers.
6363 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6364 Add code to handle AVX512 registers.
6365 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6366 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6367 prototypei from generated file.
6368 (tdesc_amd64_avx512_linux): Likewise.
6369 (init_registers_x32_avx512_linux): Likewise.
6370 (tdesc_x32_avx512_linux): Likewise.
6371 (init_registers_i386_avx512_linux): Likewise.
6372 (tdesc_i386_avx512_linux): Likewise.
6373 (x86_64_regmap): Add AVX512 registers.
6374 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6375 mask.
6376 (initialize_low_arch): Add code to initialize AVX512 registers.
6377
51aa91f9
PA
63782014-04-23 Pedro Alves <palves@redhat.com>
6379
6380 * mem-break.c (find_gdb_breakpoint_at): Make static.
6381 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6382
a4165e94
PA
63832014-04-23 Pedro Alves <palves@redhat.com>
6384
6385 * i386-low.c: Don't include break-common.h here.
6386 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6387 prototype to take target_hw_bp_type as argument instead of a Z
6388 packet char.
6389 * i386-low.h: Include break-common.h here.
6390 (Z_packet_to_hw_type): Declare.
6391 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6392 prototypes.
6393 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6394 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6395 (x86_remove_point): Convert the packet number to a
6396 target_hw_bp_type before calling i386_low_remove_watchpoint.
6397 * win32-i386-low.c (i386_insert_point): Convert the packet number
6398 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6399 (i386_remove_point): Convert the packet number to a
6400 target_hw_bp_type before calling i386_low_remove_watchpoint.
6401
b8acf843
PA
64022014-04-23 Pedro Alves <palves@redhat.com>
6403
6404 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6405
d708bcd1
PA
64062014-04-10 Pedro Alves <palves@redhat.com>
6407
6408 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6409 Check if the condition or command is NULL before checking if the
6410 breakpoint is known. On success, return true.
6411 * mem-break.h (add_breakpoint_condition): Document return.
6412 (add_breakpoint_commands): Add describing comment.
6413 * server.c (skip_to_semicolon): New function.
6414 (process_point_options): Use it.
6415
2eec7d5b
PA
64162014-04-09 Pedro Alves <palves@redhat.com>
6417
6418 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6419 to lwpid_of.
6420
fa96cb38
PA
64212014-02-27 Pedro Alves <palves@redhat.com>
6422
6423 PR 12702
6424 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6425 macros.
6426 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6427 output.
6428 (last_thread_of_process_p): Take a PID argument instead of a
6429 thread pointer.
6430 (linux_wait_for_lwp): Delete.
6431 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6432 functions.
6433 (linux_low_filter_event): New function, party factored out from
6434 linux_wait_for_event.
6435 (linux_wait_for_event): Rename to ...
6436 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6437 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6438 sigsuspend. Check for zombie leaders.
6439 (linux_wait_for_event): Reimplement as wrapper around
6440 linux_wait_for_event_filtered.
6441 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6442 a normal or signal exit is seen, it's the whole process exiting.
6443 (wait_for_sigstop): No longer a for_each_inferior callback.
6444 Rewrite on top of linux_wait_for_event_filtered.
6445 (stop_all_lwps): Call wait_for_sigstop directly.
6446 * server.c (resume, handle_target_event): Handle
6447 TARGET_WAITKIND_NO_RESUMED.
6448
d763de10
JB
64492014-02-26 Joel Brobecker <brobecker@adacore.com>
6450
6451 * win32-low.c (psapi_get_dll_name,
6452 * win32_CreateToolhelp32Snapshot): Delete.
6453 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6454 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6455 Delete.
6456 (handle_load_dll): Add function description.
6457 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6458
850a0f76
JB
64592014-02-26 Joel Brobecker <brobecker@adacore.com>
6460
6461 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6462 Add comment.
6463 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6464 base address when calling win32_add_one_solib.
6465 (handle_load_dll): Delete local variable load_addr.
6466 Remove 0x1000 offset applied to DLL base address when calling
6467 win32_add_one_solib.
6468 (handle_unload_dll): Add comment.
6469
f25b3fc3
JB
64702014-02-26 Joel Brobecker <brobecker@adacore.com>
6471
6472 * win32-low.c (win32_add_all_dlls): Renames
6473 win32_ensure_ntdll_loaded. Rewrite function documentation.
6474 Adjust implementation to always load all DLLs.
6475 Add 0x1000 offset to DLL base address when calling
6476 win32_add_one_solib.
6477 (child_initialization_done): New static global.
6478 (do_initial_child_stuff): Set child_initialization_done to
6479 zero during child initialization, and 1 after. Replace call
6480 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6481 Add comment.
6482 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6483 (handle_unload_dll): Add function documentation.
6484 (get_child_debug_event): Ignore load and unload DLL events
6485 during child initialization.
6486
d86d4aaf
DE
64872014-02-20 Doug Evans <dje@google.com>
6488
3bc32da3 6489 Remove global all_lwps.
d86d4aaf
DE
6490 * inferiors.h (ptid_of): Move here from linux-low.h.
6491 (pid_of, lwpid_of): Ditto.
6492 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6493 parameter is a struct thread_info * now.
6494 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6495 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6496 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6497 directly.
6498 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6499 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6500 * linux-arm-low.c (update_registers_callback): Update, "entry"
6501 parameter is a struct thread_info * now.
6502 Fetch lwpid from current_inferior directly.
6503 (arm_insert_point): Pass &all_threads to find_inferior instead of
6504 &all_lwps.
6505 (arm_remove_point): Ditto.
6506 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6507 (arm_prepare_to_resume): Fetch pid from thread.
6508 (arm_read_description): Fetch lwpid from current_inferior directly.
6509 * linux-low.c (all_lwps): Delete.
6510 (delete_lwp): Delete call to remove_inferior.
6511 (handle_extended_wait): Fetch lwpid from thread.
6512 (add_lwp): Don't set lwp->entry.id. Remove call to
6513 add_inferior_to_list.
6514 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6515 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6516 (kill_one_lwp_callback): Ditto.
6517 (linux_kill): Don't dereference NULL pointer.
6518 Fetch ptid,lwpid from thread.
6519 (get_detach_signal): Fetch ptid from thread.
6520 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6521 Simplify call to regcache_invalidate_thread.
6522 (delete_lwp_callback): Update, "entry" parameter is a
6523 struct thread_info * now. Fetch pid from thread.
6524 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6525 (status_pending_p_callback): Update, "entry" parameter is a
6526 struct thread_info * now. Fetch ptid from thread.
6527 (find_lwp_pid): Update, "entry" parameter is a
6528 struct thread_info * now.
6529 (linux_wait_for_lwp): Fetch pid from thread.
6530 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6531 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6532 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6533 (dequeue_one_deferred_signal): Ditto.
6534 (cancel_breakpoint): Fetch ptid from current_inferior.
6535 (linux_wait_for_event): Pass &all_threads to find_inferior,
6536 not &all_lwps. Fetch ptid, lwpid from thread.
6537 (count_events_callback): Update, "entry" parameter is a
6538 struct thread_info * now.
6539 (select_singlestep_lwp_callback): Ditto.
6540 (select_event_lwp_callback): Ditto.
6541 (cancel_breakpoints_callback): Ditto.
6542 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6543 not &all_lwps.
6544 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6545 (unsuspend_one_lwp): Update, "entry" parameter is a
6546 struct thread_info * now.
6547 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6548 not &all_lwps.
6549 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6550 Fetch lwpid from thread, not lwp.
6551 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6552 Pass &all_threads to find_inferior, not &all_lwps.
6553 (send_sigstop): Fetch lwpid from thread, not lwp.
6554 (send_sigstop_callback): Update, "entry" parameter is a
6555 struct thread_info * now.
6556 (suspend_and_send_sigstop_callback): Ditto.
6557 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6558 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6559 struct thread_info * now.
6560 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6561 from thread, lwp.
6562 (lwp_running): Update, "entry" parameter is a
6563 struct thread_info * now.
6564 (stop_all_lwps): Fetch ptid from thread.
6565 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6566 (linux_resume_one_lwp): Fetch lwpid from thread.
6567 (linux_set_resume_request): Update, "entry" parameter is a
6568 struct thread_info * now. Fetch pid, lwpid from thread.
6569 (resume_status_pending_p): Update, "entry" parameter is a
6570 struct thread_info * now.
6571 (need_step_over_p): Ditto. Fetch lwpid from thread.
6572 (start_step_over): Fetch lwpid from thread.
6573 (linux_resume_one_thread): Update, "entry" parameter is a
6574 struct thread_info * now. Fetch lwpid from thread.
6575 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6576 (proceed_one_lwp): Update, "entry" parameter is a
6577 struct thread_info * now. Fetch lwpid from thread.
6578 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6579 struct thread_info * now.
6580 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6581 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6582 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6583 directly.
6584 (regsets_store_inferior_registers): Ditto.
6585 (fetch_register, store_register): Ditto.
6586 (linux_read_memory, linux_write_memory): Ditto.
6587 (linux_request_interrupt): Ditto.
6588 (linux_read_auxv): Ditto.
6589 (linux_xfer_siginfo): Ditto.
6590 (linux_qxfer_spu): Ditto.
6591 (linux_qxfer_libraries_svr4): Ditto.
6592 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6593 moved to inferiors.h.
6594 (get_lwp): Delete.
6595 (get_thread_lwp): Update.
6596 (struct lwp_info): Delete member "entry". Simplify comment for
6597 member "thread".
6598 (all_lwps): Delete.
6599 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6600 current_inferior directly.
6601 (update_watch_registers_callback): Update, "entry" parameter is a
6602 struct thread_info * now. Fetch pid from thread.
6603 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6604 (mips_insert_point): Fetch lwpid from current_inferior.
6605 Pass &all_threads to find_inferior, not &all_lwps.
6606 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6607 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6608 directly.
6609 (mips_stopped_data_address): Ditto.
6610 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6611 directly.
6612 * linux-tile-low.c (tile_arch_setup): Ditto.
6613 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6614 (update_debug_registers_callback): Update, "entry" parameter is a
6615 struct thread_info * now. Fetch pid from thread.
6616 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6617 Pass &all_threads to find_inferior, not &all_lwps.
6618 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6619 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6620 Pass &all_threads to find_inferior, not &all_lwps.
6621 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6622 (i386_dr_low_get_status): Ditto.
6623 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6624 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6625 (x86_linux_read_description): Ditto.
6626 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6627
3b8361aa
DE
66282014-02-20 Doug Evans <dje@google.com>
6629
6630 * inferiors.c (get_first_inferior): Fix buglet.
6631
f7667f0d
DE
66322014-02-19 Doug Evans <dje@google.com>
6633
6634 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6635 * inferiors.c (add_thread): Change result type to struct thread_info *.
6636 All callers updated.
6637 (add_lwp): Call add_thread here instead of in callers.
6638 All callers updated.
6639 * linux-low.h (get_lwp_thread): Rewrite.
6640 (struct lwp_info): New member "thread".
6641
b3312d80
DE
66422014-02-19 Doug Evans <dje@google.com>
6643
6644 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6645 All callers updated.
6646
ecc6f45c
DE
66472014-02-19 Doug Evans <dje@google.com>
6648
6649 * inferiors.c (add_thread): Fix whitespace.
6650
649ebbca
DE
66512014-02-19 Doug Evans <dje@google.com>
6652
6653 * dll.c (clear_dlls): Replace accessing list implemention details
6654 with API function.
6655 * gdbthread.h (get_first_thread): Declare.
6656 * inferiors.c (for_each_inferior_with_data): New function.
6657 (get_first_thread): New function.
6658 (find_thread_ptid): Simplify.
6659 (get_first_inferior): New function.
6660 (clear_list): Delete.
6661 (one_inferior_p): New function.
6662 (clear_inferior_list): New function.
6663 (clear_inferiors): Update.
6664 * inferiors.h (for_each_inferior_with_data): Declare.
6665 (clear_inferior_list): Declare.
6666 (one_inferior_p): Declare.
6667 (get_first_inferior): Declare.
6668 * linux-low.c (linux_wait_for_event): Replace accessing list
6669 implemention details with API function.
6670 * server.c (target_running): Ditto.
6671 (accumulate_file_name_length): New function.
6672 (emit_dll_description): New function.
6673 (handle_qxfer_libraries): Replace accessing list implemention
6674 details with API function.
6675 (handle_qxfer_threads_worker): New function.
6676 (handle_qxfer_threads_proper): Replace accessing list implemention
6677 details with API function.
6678 (handle_query): Ditto.
6679 (visit_actioned_threads_callback_ftype): New typedef.
6680 (visit_actioned_threads_data): New struct.
6681 (visit_actioned_threads): Rewrite to be find_inferior callback.
6682 (resume): Call find_inferior.
6683 (handle_status): Replace accessing list implemention
6684 details with API function.
6685 (process_serial_event): Replace accessing list implemention details
6686 with API function.
6687 * target.c (set_desired_inferior): Replace accessing list implemention
6688 details with API function.
6689 * tracepoint.c (same_process_p): New function.
6690 (gdb_agent_about_to_close): Replace accessing list implemention
6691 details with API function.
6692 * win32-low.c (child_delete_thread): Replace accessing list
6693 implemention details with API function.
6694 (match_dll_by_basename): New function.
6695 (dll_is_loaded_by_basename): New function.
6696 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6697 details call to dll_is_loaded_by_basename.
6698
80894984
DE
66992014-02-19 Doug Evans <dje@google.com>
6700
6701 * dll.h (struct dll_info): Add comment.
6702 * gdbthread.h (struct thread_info): Add comment.
6703 (current_ptid): Simplify.
6704 * inferiors.c (add_process): Update.
6705 (remove_process): Update.
6706 * inferiors.h (struct process_info): Rename member "head" to "entry".
6707 * linux-low.c (delete_lwp): Update.
6708 (add_lwp): Update.
6709 (last_thread_of_process_p): Update.
6710 (kill_one_lwp_callback, linux_kill): Update.
6711 (status_pending_p_callback): Update.
6712 (wait_for_sigstop): Update. Simplify read of ptid.
6713 (start_step_over): Update.
6714 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6715 (get_lwp_thread): Update.
6716 (struct lwp_info): Rename member "head" to "entry".
6717 * regcache.h (inferior_list_entry): Delete.
6718 * server.c (kill_inferior_callback): Update.
6719 (detach_or_kill_inferior_callback): Update.
6720 (print_started_pid): Update.
6721 (print_attached_pid): Update.
6722 (process_serial_event): Simplify read of ptid.
6723 * thread-db.c (thread_db_create_event): Update.
6724 (thread_db_get_tls_address): Update.
6725 * win32-low.c (current_inferior_ptid): Simplify.
6726
46917d26
TT
67272014-02-19 Tom Tromey <tromey@redhat.com>
6728
6729 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6730 argument.
6731 (target_supports_btrace): Update.
6732
0759a81e
YQ
67332014-02-14 Yao Qi <yao@codesourcery.com>
6734
6735 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6736 (rsp-low-ipa.o): New target.
6737
a7191e8b
TT
67382014-02-12 Tom Tromey <tromey@redhat.com>
6739
6740 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6741 convert_ascii_to_int.
6742 * regcache.c (registers_to_string): Likewise.
6743 * remote-utils.c (decode_M_packet): Likewise.
6744 * server.c (process_serial_event): Likewise.
6745
ff0e980e
TT
67462014-02-12 Tom Tromey <tromey@redhat.com>
6747
6748 * server.c (handle_query, handle_v_run): Use hex2bin, not
6749 unhexify.
6750 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6751
e9371aff
TT
67522014-02-12 Tom Tromey <tromey@redhat.com>
6753
6754 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6755 convert_int_to_ascii.
6756 * regcache.c (registers_to_string, collect_register_as_string):
6757 Likewise.
6758 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6759 Likewise.
6760 * server.c (process_serial_event): Likewise.
6761 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6762 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6763
971dc0b8
TT
67642014-02-12 Tom Tromey <tromey@redhat.com>
6765
6766 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6767 bin2hex, not hexify.
6768 * tracepoint.c (cmd_qtstatus): Likewise.
6769
0a822afb
TT
67702014-02-12 Tom Tromey <tromey@redhat.com>
6771
6772 * remote-utils.c (monitor_output): Pass explicit length to
6773 hexify.
6774
9c3d6531
TT
67752014-02-12 Tom Tromey <tromey@redhat.com>
6776
6777 * tracepoint.c: Include rsp-low.h.
6778 * server.c: Include rsp-low.h.
6779 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6780 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6781 declare.
6782 * remote-utils.c: Include rsp-low.h.
6783 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6784 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6785 (convert_int_to_ascii, convert_ascii_to_int): Move to
6786 common/rsp-low.c.
6787 * regcache.c: Include rsp-low.h.
6788 * ax.c: Include rsp-low.h.
6789 * Makefile.in (SFILES): Add common/rsp-low.c.
6790 (OBS): Add rsp-low.o.
6791 (rsp-low.o): New target.
6792
01fd3ea5
TT
67932014-02-12 Tom Tromey <tromey@redhat.com>
6794
6795 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6796 Include print-utils.h.
6797 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6798 (plongest, thirty_two, phex_nz): Remove.
6799 * Makefile.in (SFILES): Add common/print-utils.c.
6800 (OBS): Add print-utils.o.
6801 (print-utils-ipa.o): New target.
6802 (print-utils.o): New target.
6803 (IPA_OBJS): Add print-utils-ipa.o.
6804
e99dc820
TT
68052014-02-06 Tom Tromey <tromey@redhat.com>
6806
6807 * Makefile.in (SFILES): Fix indentation.
6808
ee1e2d4f
DE
68092014-02-05 Doug Evans <dje@google.com>
6810
6811 * linux-low.c (linux_wait_for_event): Improve comment.
6812 (linux_wait_1): Keep current_inferior in sync with event_child.
6813
f5a02773
DE
68142014-01-22 Doug Evans <dje@google.com>
6815
6816 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6817
87ce2a04
DE
68182014-01-22 Doug Evans <dje@google.com>
6819
6820 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6821 * configure: Regenerate.
6822 * config.in: Regenerate.
6823 * Makefile.in (SFILES): Add debug.c.
6824 (OBS): Add debug.o.
6825 * debug.c: New file.
6826 * debug.h: New file.
6827 * linux-aarch64-low.c (*): Update all debugging printfs to use
6828 debug_printf instead of fprintf.
6829 * linux-arm-low.c (*): Ditto.
6830 * linux-cris-low.c (*): Ditto.
6831 * linux-crisv32-low.c (*): Ditto.
6832 * linux-m32r-low.c (*): Ditto.
6833 * linux-sparc-low.c (*): Ditto.
6834 * linux-x86.c (*): Ditto.
6835 * linux-low.c (*): Ditto.
6836 (linux_wait_1): Add calls to debug_enter, debug_exit.
6837 (linux_wait): Remove redundant debugging printf.
6838 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6839 (linux_resume, unstop_all_lwps): Ditto.
6840 * mem-break.c (*): Update all debugging printfs to use
6841 debug_printf instead of fprintf.
6842 * remote-utils.c (*): Ditto.
6843 * thread-db.c (*): Ditto.
6844 * server.c #include <ctype.h>, "gdb_vecs.h".
6845 (debug_threads): Moved to debug.c.
6846 (*): Update all debugging printfs to use debug_printf instead of
6847 fprintf.
6848 (start_inferior): Replace call to fflush with call to debug_flush.
6849 (monitor_show_help): Mention set debug-format.
6850 (parse_debug_format_options): New function.
6851 (handle_monitor_command): Handle "monitor set debug-format".
6852 (gdbserver_usage): Mention --debug-format.
6853 (main): Parse --debug-format.
6854 * server.h (debug_threads): Declaration moved to debug.h.
6855 #include "debug.h".
6856 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6857 trace_debug_1 that uses debug_printf.
6858 (tracepoint_look_up_symbols): Update all debugging printfs to use
6859 debug_printf instead of fprintf.
6860
e671835b
BS
68612014-01-20 Baruch Siach <baruch@tkos.co.il>
6862
6863 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6864 sys/ptrace.h.
6865
b5737fa9
PA
68662014-01-17 Pedro Alves <palves@redhat.com>
6867
ea38d2a9 6868 PR build/16445
c7faa97a
PA
6869 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6870 defined after including gdb_proc_service.h.
b5737fa9 6871
40ed484e
DE
68722014-01-16 Doug Evans <dje@google.com>
6873
6874 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6875 (match_dll): Use it.
6876
969c39fb
MM
68772014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6878
6879 * target.h (target_ops) <read_btrace>: Change parameters and
6880 return type to allow error reporting.
6881 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6882 trace reading errors on.
6883 * linux-low.c (linux_low_read_btrace): Pass trace reading
6884 errors on.
6885 (linux_low_disable_btrace): New.
6886
ab7f45ba
DE
68872014-01-15 Doug Evans <dje@google.com>
6888
6889 * inferiors.c (thread_id_to_gdb_id): Delete.
6890 * inferiors.h (thread_id_to_gdb_id): Delete.
6891
66af0f44
EZ
68922014-01-13 Eli Zaretskii <eliz@gnu.org>
6893
6894 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6895 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6896 versions.
6897
9939e131
PA
68982014-01-08 Pedro Alves <palves@redhat.com>
6899
6900 * server.c (handle_status): Don't discard previous queued stop
6901 replies or thread's pending status here.
6902 (main) <disconnection>: Do it here instead.
6903
b7ea362b
PA
69042014-01-08 Pedro Alves <palves@redhat.com>
6905
6906 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6907 * server.c (visit_actioned_threads, handle_pending_status): New
6908 function.
6909 (handle_v_cont): Factor out parts to ...
6910 (resume): ... this new function. If in all-stop, and a thread
6911 being resumed has a pending status, report it without actually
6912 resuming.
6913 (myresume): Adjust to use the new 'resume' function.
6914 (clear_pending_status_callback, set_pending_status_callback)
6915 (find_status_pending_thread_callback): New functions.
6916 (handle_status): Handle the case of multiple threads having
6917 interesting statuses to report. Report threads' real last signal
6918 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6919 with an interesting thread to report the status for, instead of
6920 always reporting the status of the first thread.
6921
28498c42
JB
69222014-01-01 Joel Brobecker <brobecker@adacore.com>
6923
6924 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6925 * gdbreplay.c (gdbreplay_version): Likewise.
6926
f45c82da
YZ
69272013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6928
6929 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6930 iov.iov_len with the real length in use.
6931
379a5e2d
JB
69322013-12-13 Joel Brobecker <brobecker@adacore.com>
6933
6934 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6935 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6936 for all targets that use win32-low.c.
6937 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6938 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6939
4210d83e
PA
69402013-12-13 Pedro Alves <palves@redhat.com>
6941
6942 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6943 if equal to TARGET_WAITKIND_LOADED.
6944 * win32-low.c (cached_status): New static global.
6945 (win32_wait): Add declaration.
6946 (do_initial_child_stuff): Flush all initial pending debug events
6947 up to the initial breakpoint.
6948 (win32_wait): If CACHED_STATUS was set, return that instead
6949 of doing a real wait. Remove the code resuming the execution
6950 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6951 during the initial phase. Also remove the code changing
6952 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6953 TARGET_WAITKIND_STOPPED.
6954
e7f0d979
YQ
69552013-12-11 Yao Qi <yao@codesourcery.com>
6956
6957 * notif.c (handle_notif_ack): Return 0 if no notification
6958 matches.
6959
ebcf782c
DE
69602013-11-20 Doug Evans <dje@google.com>
6961
6962 * linux-low.c (linux_set_resume_request): Fix comment.
6963
20ad9378
DE
69642013-11-20 Doug Evans <dje@google.com>
6965
6966 * linux-low.c (resume_status_pending_p): Tweak comment.
6967
a196ebeb
WT
69682013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6969
6970 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6971 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6972 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6973 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6974 (srv_amd64_regobj): Add amd64-mpx.o.
6975 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6976 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6977 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6978 * i387-fp.c (num_pl_bnd_register) Added constant.
6979 (num_pl_bnd_cfg_registers) Added constant.
6980 (struct i387_xsave) Added reserved area and MPX fields.
6981 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6982 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6983 function.
6984 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6985 (init_registers_amd64_mpx_linux): Declare new function.
6986 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6987 (x86_64_regmap): Add MPX registers.
6988 (x86_linux_read_description): Add MPX case.
6989 (initialize_low_arch): Initialize MPX targets.
6990
0080a2f6
TT
69912013-11-18 Tom Tromey <tromey@redhat.com>
6992
6993 * configure: Rebuild.
6994 * configure.ac: Don't check for stdlib.h.
6995 * gdbreplay.c: Unconditionally include stdlib.h.
6996
2978b111
TT
69972013-11-18 Tom Tromey <tromey@redhat.com>
6998
6999 * config.in: Rebuild.
7000 * configure: Rebuild.
7001 * configure.ac: Don't use AC_HEADER_DIRENT.
7002
a3d08894
TT
70032013-11-18 Tom Tromey <tromey@redhat.com>
7004
7005 * server.h: Don't check HAVE_STRING_H.
7006 * gdbreplay.c: Don't check HAVE_STRING_H.
7007 * configure: Rebuild.
7008
0a5dd17d
TT
70092013-11-18 Tom Tromey <tromey@redhat.com>
7010
7011 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7012 LIBGNU.
7013
1bd2f0ba
TT
70142013-11-08 Tom Tromey <tromey@redhat.com>
7015
7016 * configure, config.in: Rebuild.
7017 * configure.ac: Remove unused configury.
7018
3266f10b
TT
70192013-11-08 Tom Tromey <tromey@redhat.com>
7020
7021 * acinclude.m4: Include common.m4, codeset.m4.
7022 * configure, config.in: Rebuild.
7023 * configure.ac: Use GDB_AC_COMMON.
7024
6682d959
AA
70252013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7026
7027 * linux-s390-low.c (HWCAP_S390_TE): New define.
7028 (s390_arch_setup): Consider the TE field in the HWCAP for
7029 determining 'have_regset_tdb'.
7030
fd0a4d76
SDJ
70312013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7032
7033 PR gdb/16014
7034 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7035 call to sizeof.
7036
1a3d890b
PA
70372013-10-02 Pedro Alves <palves@redhat.com>
7038
7039 * server.c (process_serial_event): Don't output "GDBserver
7040 exiting" if GDB is connected through stdio.
7041 * target.c (mywait): Likewise, be silent if GDB is connected
7042 through stdio.
7043
97ad4581
JB
70442013-10-01 Joel Brobecker <brobecker@adacore.com>
7045
7046 * lynx-low.c (lynx_add_threads_after_attach): New function.
7047 (lynx_attach): Remove call to add_thread. Add call to
7048 lynx_add_threads_after_attach instead.
7049
5b4e221c
MF
70502013-09-28 Mike Frysinger <vapier@gentoo.org>
7051
7052 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7053 * config.in, configure: Regenerated.
7054
ee47b2f8
YQ
70552013-09-18 Yao Qi <yao@codesourcery.com>
7056
7057 PR server/15959
7058 * server.c (start_inferior): Clear 'resume_info'.
7059
d6707650 70602013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7061
d6707650
JW
7062 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7063 for each register.
7064
9243dd0e 70652013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7066
9243dd0e
JW
7067 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7068 linux-tile-low.o to srv_tgtobj.
7069
c623a6ef
WN
70702013-09-16 Will Newton <will.newton@linaro.org>
7071
7072 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7073 out regs.
7074
fb71d39e
PA
70752013-09-06 Pedro Alves <palves@redhat.com>
7076
7077 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7078 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7079 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7080 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7081 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7082 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7083
8e7e9910
PA
70842013-09-06 Pedro Alves <palves@redhat.com>
7085
7086 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7087 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7088
7c3a12ca
PA
70892013-09-06 Pedro Alves <palves@redhat.com>
7090
7091 * linux-amd64-ipa.c: Include tracepoint.h.
7092 * linux-i386-ipa.c: Include tracepoint.h.
7093
8eb3d7b6
RW
70942013-09-06 Ricard Wanderlof <ricardw@axis.com>
7095
7096 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7097 (ps_get_thread_area): New function.
7098
eddddb9d
RW
70992013-09-06 Ricard Wanderlof <ricardw@axis.com>
7100
7101 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7102 (initialize_low_arch): Call init_registers_crisv32 rather than
7103 init_register_crisv32.
7104
533b0600
PA
71052013-09-05 Pedro Alves <palves@redhat.com>
7106
7107 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7108 to ...
7109 * hostio.h: ... this new file.
7110 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7111 win32-low.c: Include hostio.h.
7112
0ce3d3b5
PA
71132013-09-05 Pedro Alves <palves@redhat.com>
7114
7115 * server.h (gdb_client_data, handler_func, callback_handler_func)
7116 (delete_file_handler, add_file_handler, append_callback_event)
7117 (delete_callback_event, start_event_loop, initialize_event_loop):
7118 Move to event-loop.h and include it.
7119 * event-loop.h: New file.
7120
799cdc37
PA
71212013-09-05 Pedro Alves <palves@redhat.com>
7122
7123 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7124 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7125 (loaded_dll, unloaded_dll): Move to ...
7126 * dll.h: ... this new file.
7127 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7128
6a6bbd9d
PA
71292013-09-05 Pedro Alves <palves@redhat.com>
7130
7131 * server.h (current_process, get_thread_process, all_processes)
7132 (add_inferior_to_list, for_each_inferior, current_inferior)
7133 (remove_inferior, add_process, remove_process, find_process_pid)
7134 (have_started_inferiors_p, have_attached_inferiors_p)
7135 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7136 (clear_inferiors, find_inferior, find_inferior_id)
7137 (inferior_target_data, set_inferior_target_data)
7138 (inferior_regcache_data, set_inferior_regcache_data): Move to
7139 inferiors.h, and include it.
7140 * inferiors.h: New file.
7141
f699aaba
PA
71422013-09-05 Pedro Alves <palves@redhat.com>
7143
7144 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7145 Move ...
72f4393d 7146 * ax.h: ... here.
f699aaba 7147
c144c7a0
PA
71482013-09-05 Pedro Alves <palves@redhat.com>
7149
7150 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7151 tracepoint.h.
7152 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7153 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7154 (handle_tracepoint_general_set, handle_tracepoint_query)
7155 (tracepoint_finished_step, tracepoint_was_hit)
7156 (release_while_stepping_state_list, current_traceframe)
7157 (in_readonly_region, traceframe_read_mem)
7158 (fetch_traceframe_registers, traceframe_read_sdata)
7159 (traceframe_read_info, struct fast_tpoint_collect_status)
7160 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7161 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7162 (supply_fast_tracepoint_registers)
7163 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7164 (ipa_tdesc, claim_trampoline_space)
7165 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7166 (agent_mem_read, agent_get_trace_state_variable_value)
7167 (agent_set_trace_state_variable_value, agent_tsv_read)
7168 (agent_mem_read_string, get_raw_reg_func_addr)
7169 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7170 * tracepoint.h: ... this new file.
7171
ff42e6ab
PA
71722013-09-05 Pedro Alves <palves@redhat.com>
7173
7174 * server.h (perror_with_name, error, fatal, warning, paddress)
7175 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7176 include it.
7177 * utils.h: New file.
7178
541af0f4
PA
71792013-09-05 Pedro Alves <palves@redhat.com>
7180
7181 * server.h (remote_debug, noack_mode, transport_is_reliable)
7182 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7183 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7184 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7185 (write_enn, initialize_async_io, enable_async_io)
7186 (disable_async_io, check_remote_input_interrupt_request)
7187 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7188 (dead_thread_notify, prepare_resume_reply)
7189 (decode_address_to_semicolon, decode_address, decode_m_packet)
7190 (decode_M_packet, decode_X_packet, decode_xfer_write)
7191 (decode_search_memory_packet, unhexify, hexify)
7192 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7193 (look_up_one_symbol, relocate_instruction)
7194 (monitor_output): Move to remote-utils.h, and include it.
7195 * remote-utils.h: New file.
7196
eebdf26b
PA
71972013-09-05 Pedro Alves <palves@redhat.com>
7198
7199 * server.h (_): Delete.
7200
3aafd2ff
PA
72012013-09-02 Pedro Alves <palves@redhat.com>
7202
7203 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7204 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7205 allocated.
7206 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7207
cee83bcb
PM
72082013-09-02 Pierre Muller <muller@sourceware.org>
7209
7210 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7211 or WriteProcessMemory complete successfully and handle
7212 ERROR_PARTIAL_COPY error.
7213
9a13b2fa
PA
72142013-09-02 Pedro Alves <palves@redhat.com>
7215
7216 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7217 error instead of EIO.
7218
602e3198
JK
72192013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7220
7221 PR server/15604
7222 * linux-low.c: Include filestuff.h.
7223 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7224 * lynx-low.c: Include filestuff.h.
7225 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7226 * server.c: Include filestuff.h.
7227 (main): Call notice_open_fds.
7228 * spu-low.c: Include filestuff.h.
7229 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7230
96d7229d
LM
72312013-08-22 Luis Machado <lgustavo@codesourcery.com>
7232
7233 * Makefile.in: Explain why ../target and ../nat are not
7234 listed as include file search paths.
7235 (linux-waitpid.o): New object file rule.
7236 * configure.srv (srv_native_linux_obj): New variable.
7237 Replace all occurrences of linux native object files with
7238 $srv_native_linux_obj.
7239 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7240 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7241 (linux_enable_event_reporting): Remove declaration.
7242 (my_waitpid): Moved to common/linux-waitpid.c.
7243 (linux_wait_for_event): Pass ptid when calling
7244 linux_enable_event_reporting.
7245 (linux_supports_tracefork_flag): Remove.
7246 (linux_enable_event_reporting): Likewise.
7247 (linux_tracefork_grandchild): Remove.
7248 (STACK_SIZE): Moved to common/linux-ptrace.c.
7249 (linux_tracefork_child): Remove.
7250 (linux_test_for_tracefork): Remove.
7251 (linux_look_up_symbols): Call linux_supports_traceclone.
7252 (initialize_low): Remove call to linux_test_for_tracefork.
7253 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7254 common/linux-ptrace.h.
7255 (PTRACE_TYPE_ARG4): Likewise.
7256 Include linux-ptrace.h.
7257
32940073
PA
72582013-08-21 Pedro Alves <palves@redhat.com>
7259
7260 * config.in: Renegerate.
7261
33b60d58 72622013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 7263
33b60d58
LM
7264 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7265 (SFILES): Remove $(srcdir)/common/target-common.c and
7266 add $(srcdir)/target/waitstatus.c.
7267 (OBS): Remove target-common.o and add waitstatus.o.
7268 (server_h): Remove $(srcdir)/../common/target-common.h and
7269 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7270 and $(srcdir)/../target/waitstatus.h.
7271 (target-common.o): Remove.
7272 (waitstatus.o): New target object file.
7273 * target.h: Do not include target-common.h and
7274 include target/resume.h, target/wait.h and
7275 target/waitstatus.h.
7276
b8e1b30e
LM
72772013-08-13 Luis Machado <lgustavo@codesourcery.com>
7278
7279 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7280 to PTRACE_TYPE_ARG3.
7281 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7282 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7283 PTRACE_TYPE_ARG4.
7284 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7285 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7286
7a60ad40
YQ
72872013-07-27 Jie Zhang <jie@codesourcery.com>
7288 Daniel Jacobowitz <dan@codesourcery.com>
7289 Yao Qi <yao@codesourcery.com>
7290
7291 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7292 (mips-linux-watch.o): New rule.
7293 (mips_linux_watch_h): New variable.
7294 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7295 srv_tgtobj.
7296 * linux-mips-low.c: Include mips-linux-watch.h.
7297 (struct arch_process_info, struct arch_lwp_info): New.
7298 (update_watch_registers_callback): New function.
7299 (mips_linux_new_process, mips_linux_new_thread) New functions.
7300 (mips_linux_prepare_to_resume, mips_insert_point): New
7301 functions.
7302 (mips_remove_point, mips_stopped_by_watchpoint): New
7303 functions.
7304 (rsp_bp_type_to_target_hw_bp_type): New function.
7305 (mips_stopped_data_address): New function.
7306 (the_low_target): Add watchpoint support functions.
7307
de6f69ad
YQ
73082013-07-27 Yao Qi <yao@codesourcery.com>
7309
7310 * i386-low.c: Include break-common.h.
7311 (enum target_hw_bp_type): Remove.
7312
3360c0bf
LM
73132013-07-24 Luis Machado <lgustavo@codesourcery.com>
7314
7315 * Makefile.in (SFILES): /common/target-common.c.
7316 (OBS): Add target-common.o.
7317 (server_h): Add $(srcdir)/../common/target-common.h.
7318 (target-common.o): New target.
7319 * server.c (queue_stop_reply_callback): Free
7320 status string after use.
7321 * target.c (target_waitstatus_to_string): Remove.
7322 * target.h: Include target-common.h.
7323 (resume_kind): Likewise.
7324 (target_waitkind): Likewise.
7325 (target_waitstatus): Likewise.
7326 (TARGET_WNOHANG): Likewise.
7327
bd885420
YQ
73282013-07-04 Yao Qi <yao@codesourcery.com>
7329
7330 * Makefile.in (host_alias): Use @host_noncanonical@.
7331 (target_alias): Use @target_noncanonical@.
7332 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7333 ACX_NONCANONICAL_HOST.
7334 * configure: Regenerated.
7335
7336 Revert:
7337 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7338
7339 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7340 * configure: Rebuild.
7341 * Makefile.in (version_host, version_target): Get from configure.
7342 (version.c): Use $(version_host) and $(version_target).
7343
17ef446e
PA
73442013-07-03 Pedro Alves <palves@redhat.com>
7345
7346 * Makefile.in (config.status): Depend on development.sh.
7347 * acinclude.m4: Include libmcheck.m4.
7348 * configure: Regenerate.
7349
7a9a7487
MG
73502013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7351
7352 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7353 attribute inside the parentheses.
7354 (winapi_DebugSetProcessKillOnExit): Ditto.
7355 (winapi_DebugBreakProcess): Ditto.
7356 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7357
49b64de6
MG
73582013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7359
7360 * notif.h (notif_event): Add a dummy member to avoid compiler
7361 errors.
7362
d5749ee7
PA
73632013-07-01 Pedro Alves <palves@redhat.com>
7364
7365 * hostio.c (HOSTIO_PATH_MAX): Define.
7366 (require_filename, handle_open, handle_unlink, handle_readlink):
7367 Use it.
7368
d8d2a3ee
PA
73692013-07-01 Pedro Alves <palves@redhat.com>
7370
7371 * server.h: Include "pathmax.h".
7372 * linux-low.c: Don't include sys/param.h.
7373 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7374 MAXPATHLEN.
7375 * win32-low.c: Don't include sys/param.h.
7376 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7377
bc7dea8d
PA
73782013-07-01 Pedro Alves <palves@redhat.com>
7379
7380 * event-loop.c: Don't check HAVE_UNISTD_H before including
7381 <unistd.h>.
7382 * gdbreplay.c: Likewise.
7383 * remote-utils.c: Likewise.
7384 * server.c: Likewise.
7385 * configure.ac: Don't check for unistd.h.
7386 * configure: Regenerate.
7387
d6c2da54
TT
73882013-06-28 Tom Tromey <tromey@redhat.com>
7389
7390 * Makefile.in (version.c): Use version.in, not
7391 common/version.in.
7392
257b6bec
MG
73932013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7394
7395 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7396 * configure: Rebuild.
7397 * Makefile.in (version_host, version_target): Get from configure.
7398 (version.c): Use $(version_host) and $(version_target).
7399
86ebe149
DK
74002013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7401
7402 Fix trace-status to output user name without trailing colon.
7403 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7404
f30aa5af
DK
74052013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7406
7407 Fix trace-status to output proper start-time and stop-time.
7408 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7409 output start time and stop time in hex as gdb expects.
7410
28a93511
YQ
74112013-06-26 Pedro Alves <pedro@codesourcery.com>
7412
7413 * tracepoint.c (build_traceframe_info_xml): Output trace state
7414 variables present in the trace buffer.
7415
01208463
TT
74162013-06-24 Tom Tromey <tromey@redhat.com>
7417
7418 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7419 create-version.sh.
7420 (version.o): Remove.
7421 * gdbreplay.c: Include version.h.
7422 (version, host_name): Don't declare.
7423 * server.h: Include version.h.
7424 (version, host_name): Don't declare.
7425
760256f9
PA
74262013-06-12 Pedro Alves <palves@redhat.com>
7427
7428 * linux-x86-low.c (linux_is_elf64): Delete global.
7429 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7430 with local linux_pid_exe_is_elf_64_file use.
7431
030031ee
PA
74322013-06-11 Pedro Alves <palves@redhat.com>
7433
7434 * linux-low.c (regset_disabled, disable_regset): New functions.
7435 (regsets_fetch_inferior_registers)
7436 (regsets_store_inferior_registers): Use them.
7437 (initialize_regsets_info); Don't allocate the disabled_regsets
7438 array here.
7439 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7440 comment.
7441
5da6eb0a
PA
74422013-06-11 Pedro Alves <palves@redhat.com>
7443
7444 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7445 xmalloc.
7446
7e5aaa09
PA
74472013-06-11 Pedro Alves <palves@redhat.com>
7448
7449 * linux-x86-low.c (initialize_low_arch): Call
7450 init_registers_x32_avx_linux.
7451
d878444c
JK
74522013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7453
7454 Fix compatibility with Android Bionic.
7455 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7456 it is not empty.
7457
3aee8918
PA
74582013-06-07 Pedro Alves <palves@redhat.com>
7459
5f2b57b5 7460 PR server/14823
3aee8918
PA
7461 * Makefile.in (OBS): Add tdesc.o.
7462 (IPA_OBJS): Add tdesc-ipa.o.
7463 (tdesc-ipa.o): New rule.
7464 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7465 interface.
7466 * linux-low.c (new_inferior): Delete.
7467 (disabled_regsets, num_regsets): Delete.
7468 (linux_add_process): Adjust to set the new per-process
7469 new_inferior flag.
7470 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7471 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7472 was a stop. When calling arch_setup, switch the current inferior
7473 to the thread that got an event.
7474 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7475 (regsets_fetch_inferior_registers)
7476 (regsets_store_inferior_registers): New regsets_info parameter.
7477 Adjust to use it.
7478 (linux_register_in_regsets): New regs_info parameter. Adjust to
7479 use it.
7480 (register_addr, fetch_register, store_register): New usrregs_info
7481 parameter. Adjust to use it.
7482 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7483 parameter regs_info. Adjust to use it.
7484 (linux_fetch_registers): Get the current inferior's regs_info, and
7485 adjust to use it.
7486 (linux_store_registers): Ditto.
7487 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7488 (initialize_low): Don't initialize the target_regsets here. Call
7489 initialize_low_arch.
7490 * linux-low.h (target_regsets): Delete declaration.
7491 (struct regsets_info): New.
7492 (struct usrregs_info): New.
7493 (struct regs_info): New.
7494 (struct process_info_private) <new_inferior>: New field.
7495 (struct linux_target_ops): Delete the num_regs, regmap, and
7496 regset_bitmap fields. New field regs_info.
7497 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7498 * i387-fp.c (num_xmm_registers): Delete.
7499 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7500 calls to new interface.
7501 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7502 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7503 Infer the number of xmm registers from the regcache's target
7504 description.
7505 * i387-fp.h (num_xmm_registers): Delete.
7506 * inferiors.c (add_thread): Don't install the thread's regcache
7507 here.
7508 * proc-service.c (gregset_info): Fetch the current inferior's
7509 regs_info. Adjust to use it.
7510 * regcache.c: Include tdesc.h.
7511 (register_bytes, reg_defs, num_registers)
7512 (gdbserver_expedite_regs): Delete.
7513 (get_thread_regcache): If the thread doesn't have a regcache yet,
7514 create one, instead of aborting gdbserver.
7515 (regcache_invalidate_one): Rename to ...
7516 (regcache_invalidate_thread): ... this.
7517 (regcache_invalidate_one): New.
7518 (regcache_invalidate): Only invalidate registers of the current
7519 process.
7520 (init_register_cache): Add target_desc parameter, and use it.
7521 (new_register_cache): Ditto. Assert the target description has a
7522 non zero registers_size.
7523 (regcache_cpy): Add assertions. Adjust.
7524 (realloc_register_cache, set_register_cache): Delete.
7525 (registers_to_string, registers_from_string): Adjust.
7526 (find_register_by_name, find_regno, find_register_by_number)
7527 (register_cache_size): Add target_desc parameter, and use it.
7528 (free_register_cache_thread, free_register_cache_thread_one)
7529 (regcache_release, register_cache_size): New.
7530 (register_size): Add target_desc parameter, and use it.
7531 (register_data, supply_register, supply_register_zeroed)
7532 (supply_regblock, supply_register_by_name, collect_register)
7533 (collect_register_as_string, collect_register_by_name): Adjust.
7534 * regcache.h (struct target_desc): Forward declare.
7535 (struct regcache) <tdesc>: New field.
7536 (init_register_cache, new_register_cache): Add target_desc
7537 parameter.
7538 (regcache_invalidate_thread): Declare.
7539 (regcache_invalidate_one): Delete declaration.
7540 (regcache_release): Declare.
7541 (find_register_by_number, register_cache_size, register_size)
7542 (find_regno): Add target_desc parameter.
7543 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7544 declarations.
7545 * remote-utils.c: Include tdesc.h.
7546 (outreg, prepare_resume_reply): Adjust.
7547 * server.c: Include tdesc.h.
7548 (gdbserver_xmltarget): Delete declaration.
7549 (get_features_xml, process_serial_event): Adjust.
7550 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7551 declare.
7552 (struct process_info) <tdesc>: New field.
7553 (ipa_tdesc): Declare.
7554 * tdesc.c: New file.
7555 * tdesc.h: New file.
7556 * tracepoint.c: Include tdesc.h.
7557 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7558 (get_context_regcache): Adjust to pass ipa_tdesc down.
7559 (do_action_at_tracepoint): Adjust to get the register cache size
7560 from the context regcache's description.
7561 (traceframe_walk_blocks): Adjust to get the register cache size
7562 from the current trace frame's description.
7563 (traceframe_get_pc): Adjust to get current trace frame's
7564 description and pass it down.
7565 (gdb_collect): Adjust to get the register cache size from the
7566 IPA's description.
7567 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7568 (gdbserver_xmltarget): Delete.
7569 (initialize_low_tracepoint): Set the ipa's target description.
7570 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7571 (initialize_low_tracepoint): Set the ipa's target description.
7572 * linux-x86-low.c: Include tdesc.h.
7573 [__x86_64__] (is_64bit_tdesc): New.
7574 (ps_get_thread_area, x86_get_thread_area): Use it.
7575 (i386_cannot_store_register): Rename to ...
7576 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7577 (i386_cannot_fetch_register): Rename to ...
7578 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7579 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7580 to new interface.
7581 (target_regsets): Rename to ...
7582 (x86_regsets): ... this.
7583 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7584 interface.
7585 (x86_siginfo_fixup): Use is_64bit_tdesc.
7586 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7587 (tdesc_x32_avx_linux, tdesc_x32_linux)
7588 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7589 Declare.
7590 (x86_linux_update_xmltarget): Delete.
7591 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7592 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7593 (AMD64_LINUX_USER64_CS): New.
7594 (x86_linux_read_description): New, based on
7595 x86_linux_update_xmltarget.
7596 (same_process_callback): New.
7597 (x86_arch_setup_process_callback): New.
7598 (x86_linux_update_xmltarget): New.
7599 (x86_regsets_info): New.
7600 (amd64_linux_regs_info): New.
7601 (i386_linux_usrregs_info): New.
7602 (i386_linux_regs_info): New.
7603 (x86_linux_regs_info): New.
7604 (x86_arch_setup): Reimplement.
7605 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7606 (x86_emit_ops): Ditto.
7607 (the_low_target): Adjust. Install x86_linux_regs_info,
7608 x86_cannot_fetch_register, and x86_cannot_store_register.
7609 (initialize_low_arch): New.
7610 * linux-ia64-low.c (tdesc_ia64): Declare.
7611 (ia64_fetch_register): Adjust.
7612 (ia64_usrregs_info, regs_info): New globals.
7613 (ia64_regs_info): New function.
7614 (the_low_target): Adjust.
7615 (initialize_low_arch): New function.
7616 * linux-sparc-low.c (tdesc_sparc64): Declare.
7617 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7618 Adjust.
7619 (sparc_arch_setup): New function.
7620 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7621 (the_low_target): Adjust.
7622 (initialize_low_arch): New function.
7623 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7624 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7625 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7626 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7627 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7628 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7629 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7630 (tdesc_powerpc_isa205_vsx64l): Declare.
7631 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7632 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7633 (ppc_set_pc, ppc_get_hwcap): Adjust.
7634 (ppc_usrregs_info): Forward declare.
7635 (!__powerpc64__) ppc_regmap_adjusted: New global.
7636 (ppc_arch_setup): Adjust to the current process'es target
7637 description.
7638 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7639 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7640 (ppc_store_evrregset): Adjust.
7641 (target_regsets): Rename to ...
7642 (ppc_regsets): ... this, and make static.
7643 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7644 (ppc_regs_info): New function.
7645 (the_low_target): Adjust.
7646 (initialize_low_arch): New function.
7647 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7648 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7649 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7650 (tdesc_s390x_linux64v2): Declare.
7651 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7652 (s390_fill_gregset, s390_store_last_break): Adjust.
7653 (target_regsets): Rename to ...
7654 (s390_regsets): ... this, and make static.
7655 (s390_get_pc, s390_set_pc): Adjust.
7656 (s390_get_hwcap): New target_desc parameter, and use it.
7657 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7658 (s390_arch_setup): Adjust to set the current process'es target
7659 description. Don't adjust the regmap.
7660 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7661 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7662 (regs_info_3264): New globals.
7663 (s390_regs_info): New function.
7664 (the_low_target): Adjust.
7665 (initialize_low_arch): New function.
7666 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7667 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7668 [__mips64] (init_registers_mips_linux)
7669 (init_registers_mips_dsp_linux): Delete defines.
7670 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7671 (have_dsp): New global.
7672 (mips_read_description): New, based on mips_arch_setup.
7673 (mips_arch_setup): Reimplement.
7674 (get_usrregs_info): New function.
7675 (mips_cannot_fetch_register, mips_cannot_store_register)
7676 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7677 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7678 (target_regsets): Rename to ...
7679 (mips_regsets): ... this, and make static.
7680 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7681 (dsp_regs_info, regs_info): New globals.
7682 (mips_regs_info): New function.
7683 (the_low_target): Adjust.
7684 (initialize_low_arch): New function.
7685 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7686 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7687 Declare.
7688 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7689 (arm_read_description): New, with bits factored from
7690 arm_arch_setup.
7691 (arm_arch_setup): Reimplement.
7692 (target_regsets): Rename to ...
7693 (arm_regsets): ... this, and make static.
7694 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7695 (arm_regs_info): New function.
7696 (the_low_target): Adjust.
7697 (initialize_low_arch): New function.
7698 * linux-m68k-low.c (tdesc_m68k): Declare.
7699 (target_regsets): Rename to ...
7700 (m68k_regsets): ... this, and make static.
7701 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7702 (m68k_regs_info): New function.
7703 (m68k_arch_setup): New function.
7704 (the_low_target): Adjust.
7705 (initialize_low_arch): New function.
7706 * linux-sh-low.c (tdesc_sharch): Declare.
7707 (target_regsets): Rename to ...
7708 (sh_regsets): ... this, and make static.
7709 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7710 (sh_regs_info, sh_arch_setup): New functions.
7711 (the_low_target): Adjust.
7712 (initialize_low_arch): New function.
7713 * linux-bfin-low.c (tdesc_bfin): Declare.
7714 (bfin_arch_setup): New function.
7715 (bfin_usrregs_info, regs_info): New globals.
7716 (bfin_regs_info): New function.
7717 (the_low_target): Adjust.
7718 (initialize_low_arch): New function.
7719 * linux-cris-low.c (tdesc_cris): Declare.
7720 (cris_arch_setup): New function.
7721 (cris_usrregs_info, regs_info): New globals.
7722 (cris_regs_info): New function.
7723 (the_low_target): Adjust.
7724 (initialize_low_arch): New function.
7725 * linux-cris-low.c (tdesc_crisv32): Declare.
7726 (cris_arch_setup): New function.
7727 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7728 (cris_regs_info): New function.
7729 (the_low_target): Adjust.
7730 (initialize_low_arch): New function.
7731 * linux-m32r-low.c (tdesc_m32r): Declare.
7732 (m32r_arch_setup): New function.
7733 (m32r_usrregs_info, regs_info): New globals.
7734 (m32r_regs_info): Adjust.
7735 (initialize_low_arch): New function.
7736 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7737 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7738 (tic6x_usrregs_info): Forward declare.
7739 (tic6x_read_description): New function, based on ...
7740 (tic6x_arch_setup): ... this. Reimplement.
7741 (target_regsets): Rename to ...
7742 (tic6x_regsets): ... this, and make static.
7743 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7744 (tic6x_regs_info): New function.
7745 (the_low_target): Adjust.
7746 (initialize_low_arch): New function.
7747 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7748 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7749 (target_regsets): Rename to ...
7750 (xtensa_regsets): ... this, and make static.
7751 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7752 globals.
7753 (xtensa_arch_setup, xtensa_regs_info): New functions.
7754 (the_low_target): Adjust.
7755 (initialize_low_arch): New function.
7756 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7757 (nios2_arch_setup): Set the current process'es tdesc.
7758 (target_regsets): Rename to ...
7759 (nios2_regsets): ... this.
7760 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7761 (nios2_regs_info): New function.
7762 (the_low_target): Adjust.
7763 (initialize_low_arch): New function.
a261b8f5
PA
7764 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7765 (aarch64_arch_setup): Set the current process'es tdesc.
7766 (target_regsets): Rename to ...
7767 (aarch64_regsets): ... this.
7768 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7769 (aarch64_regs_info): New function.
7770 (the_low_target): Adjust.
7771 (initialize_low_arch): New function.
3aee8918
PA
7772 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7773 globals.
7774 (target_regsets): Rename to ...
7775 (tile_regsets): ... this.
7776 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7777 (tile_regs_info): New function.
7778 (tile_arch_setup): Set the current process'es tdesc.
7779 (the_low_target): Adjust.
7780 (initialize_low_arch): New function.
7781 * spu-low.c (tdesc_spu): Declare.
7782 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7783 * win32-arm-low.c (tdesc_arm): Declare.
7784 (arm_arch_setup): New function.
7785 (the_low_target): Install arm_arch_setup instead of
7786 init_registers_arm.
7787 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7788 (init_windows_x86): Rename to ...
7789 (i386_arch_setup): ... this. Set `win32_tdesc'.
7790 (the_low_target): Adjust.
7791 * win32-low.c (win32_tdesc): New global.
7792 (child_add_thread): Don't create the thread cache here.
7793 (do_initial_child_stuff): Set the new process'es tdesc.
7794 * win32-low.h (struct target_desc): Forward declare.
7795 (win32_tdesc): Declare.
7796 * lynx-i386-low.c (tdesc_i386): Declare global.
7797 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7798 * lynx-low.c (lynx_tdesc): New global.
7799 (lynx_add_process): Set the new process'es tdesc.
7800 * lynx-low.h (struct target_desc): Forward declare.
7801 (lynx_tdesc): Declare global.
7802 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7803 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7804 * nto-low.c (nto_tdesc): New global.
7805 (do_attach): Set the new process'es tdesc.
7806 * nto-low.h (struct target_desc): Forward declare.
7807 (nto_tdesc): Declare.
7808 * nto-x86-low.c (tdesc_i386): Declare.
7809 (nto_x86_arch_setup): Set `nto_tdesc'.
7810
b1fbec62
GB
78112013-06-04 Gary Benson <gbenson@redhat.com>
7812
7813 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7814 to qSupported response when appropriate.
7815 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7816 with nonzero-length annex.
7817 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7818 arguments supplied in annex.
7819
d1ec4ce7
DE
78202013-05-31 Doug Evans <dje@google.com>
7821
ac44adcb 7822 PR server/15594
d1ec4ce7
DE
7823 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7824 64 bits in 64-cross-32 environment.
7825
9b25f2d3
PA
78262013-05-28 Pedro Alves <palves@redhat.com>
7827
7828 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7829 (aarch64-without-fpu.c): Delete rule.
7830 * configure.srv (aarch64*-*-linux*): Remove references to
7831 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7832 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7833 declaration.
7834
6740dc9c
PA
78352013-05-24 Pedro Alves <palves@redhat.com>
7836
7837 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7838 instead of strchr/decode_address. Error if the range isn't split
7839 with a ','. Don't assume there's be a ':' in the action.
7840
c2d6af84
PA
78412013-05-23 Yao Qi <yao@codesourcery.com>
7842 Pedro Alves <palves@redhat.com>
7843
7844 * linux-low.c (lwp_in_step_range): New function.
7845 (linux_wait_1): If the thread was range stepping and stopped
7846 outside the stepping range, report the stop to GDB. Otherwise,
7847 continue stepping. Add range stepping debug output.
7848 (linux_set_resume_request): Copy the step range from the resume
7849 request to the lwp.
7850 (linux_supports_range_stepping): New.
7851 (linux_target_ops) <supports_range_stepping>: Set to
7852 linux_supports_range_stepping.
7853 * linux-low.h (struct linux_target_ops)
7854 <supports_range_stepping>: New field.
7855 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7856 * linux-x86-low.c (x86_supports_range_stepping): New.
7857 (the_low_target) <supports_range_stepping>: Set to
7858 x86_supports_range_stepping.
7859 * server.c (handle_v_cont): Handle 'r' action.
7860 (handle_v_requests): Append ";r" if the target supports range
7861 stepping.
7862 * target.h (struct thread_resume) <step_range_start,
7863 step_range_end>: New fields.
7864 (struct target_ops) <supports_range_stepping>:
7865 New field.
7866 (target_supports_range_stepping): New macro.
7867
58794e1a
JB
78682013-05-17 Joel Brobecker <brobecker@adacore.com>
7869
7870 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7871 confusion in comment.
7872
d631c5a7
JB
78732013-05-17 Joel Brobecker <brobecker@adacore.com>
7874
7875 * lynx-low.c (struct process_info_private): New type.
7876 (lynx_add_process): New function.
7877 (lynx_create_inferior, lynx_attach): Replace calls to
7878 add_process by calls to lynx_add_process.
7879 (lynx_resume): If PTID is null, then try using
7880 current_process()->private->last_wait_event_ptid.
7881 Add comments.
7882 (lynx_clear_inferiors): Delete. The contents of that function
7883 has been inlined in lynx_mourn;
7884 (lynx_wait_1): Save the ptid in the process's private data.
7885 (lynx_mourn): Free the process' private data. Replace call
7886 to lynx_clear_inferiors by call to clear_inferiors.
7887
96f7a20f
YQ
78882013-05-17 Yao Qi <yao@codesourcery.com>
7889
7890 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7891 the right place.
7892
db0dfaa0
LM
78932013-05-16 Luis Machado <lgustavo@codesourcery.com>
7894
7895 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7896 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7897 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7898 PT_TEXT_END_ADDR guards. Update comments.
7899 (linux_target_op) <read_offsets>: Conditionally define to
7900 linux_read_offsets if the target is UCLIBC and if it defines
7901 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7902
68f5f838
SL
79032013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7904 Andrew Jenner <andrew@codesourcery.com>
7905
7906 * Makefile.in (SFILES): Add linux-nios2-low.c.
7907 (clean): Add action to delete nios2-linux.c.
7908 (nios2-linux.c): New rule.
7909 * configure.srv: Add nios2*-*-linux*.
7910 * linux-nios2-low.c: New.
7911
1ebff1fd
HAQ
79122013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7913
7914 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7915
f6150862
HZ
79162013-04-25 Hui Zhu <hui@codesourcery.com>
7917
7918 PR gdb/15186
f6150862
HZ
7919 * ax.c (ax_printf): Add fflush.
7920
614c279d
TT
79212013-04-22 Tom Tromey <tromey@redhat.com>
7922
7923 * Makefile.in (SFILES): Add filestuff.c.
7924 (OBS): Add filestuff.o.
7925 (filestuff.o): New target.
7926 * config.in, configure: Rebuild.
7927 * configure.ac: Check for fdwalk, pipe2.
7928
7d4e5717
PA
79292013-04-17 Pedro Alves <palves@redhat.com>
7930
7931 * configure.ac (USE_THREAD_DB): Delete variable.
7932 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7933 Don't AC_SUBST USE_THREAD_DB.
7934 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7935 * config.in, configure: Regenerate.
7936
d5c93e41
PA
79372013-04-16 Pedro Alves <palves@redhat.com>
7938
7939 * linux-low.h (struct lwp_info) <thread_known>: Move under
7940 the USE_THREAD_DB #ifdef.
7941
04f5fe89
PA
79422013-04-16 Pedro Alves <palves@redhat.com>
7943
7944 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7945 (linux-low.o): Delete rule.
7946 * linux-low.h: Always include "gdb_thread_db.h" instead of
7947 conditionally including thread_db.h.
7948 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7949 HAVE_THREAD_DB_H.
7950
480b27bf
JK
79512013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7952
7953 * Makefile.in (install-only): Fix make install regression.
7954
43662968
JK
79552013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7956
7957 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7958 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7959 installation.
7960 * gdbserver.1: Remove.
7961
3e74e146
PA
79622013-03-22 Pedro Alves <palves@redhat.com>
7963
7964 * linux-low.c (handle_extended_wait): Don't call
7965 linux_enable_event_reporting.
7966
a8347a2a
TT
79672013-03-15 Tony Theodore <tonyt@logyst.com>
7968
7969 PR build/9098:
7970 * Makefile.in (SHELL): Use @SHELL@.
7971
eeb56fa7
SDJ
79722013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7973
7974 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7975 compiler warning.
7976
4fa7e2ff
JB
79772013-03-13 Joel Brobecker <brobecker@adacore.com>
7978
7979 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7980 Remove extraneous NULL element.
7981
8ddb1965
YQ
79822013-03-13 Yao Qi <yao@codesourcery.com>
7983
7984 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7985 'V' block in trace frame.
7986
9accd112
MM
79872013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7988
7989 * target.h (struct target_ops): Add btrace ops.
7990 (target_supports_btrace): New macro.
7991 (target_enable_btrace): New macro.
7992 (target_disable_btrace): New macro.
7993 (target_read_btrace): New macro.
7994 * gdbthread.h (struct thread_info): Add btrace field.
7995 * server.c: Include btrace-common.h.
7996 (handle_btrace_general_set): New function.
7997 (handle_btrace_enable): New function.
7998 (handle_btrace_disable): New function.
7999 (handle_general_set): Call handle_btrace_general_set.
8000 (handle_qxfer_btrace): New function.
8001 (struct qxfer qxfer_packets[]): Add btrace entry.
8002 * inferiors.c (remove_thread): Disable btrace.
8003 * linux-low: Include linux-btrace.h.
8004 (linux_low_enable_btrace): New function.
8005 (linux_low_read_btrace): New function.
8006 (linux_target_ops): Add btrace ops.
8007 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8008 Add srv_linux_btrace=yes.
8009 (x86_64-*-linux*): Add linux-btrace.o.
8010 Add srv_linux_btrace=yes.
8011 * configure.ac: Define HAVE_LINUX_BTRACE.
8012 * config.in: Regenerated.
8013 * configure: Regenerated.
8014
5cc22e4c
MM
80152013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8016
8017 * server.c (handle_qxfer): Preserve error message if -3 is
8018 returned.
8019 (qxfer): Document the -3 return value.
8020
7c97f91e
MM
80212013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8022
8023 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8024 (linux_btrace_h): New variable.
8025 (linux-btrace.o): New rule.
8026
be9a119c 80272013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
8028 Hafiz Abid Qadeer <abidh@codesourcery.com>
8029
8030 * tracepoint.c (trace_buffer_size): New global.
8031 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8032 (init_trace_buffer): Change to one-argument function. Allocate
8033 trace buffer memory.
8034 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8035 handle QTBuffer:size packet.
8036 (cmd_bigqtbuffer_size): New function.
8037 (initialize_tracepoint): Call init_trace_buffer with
8038 DEFAULT_TRACE_BUFFER_SIZE.
8039 * server.c (handle_query): Add QTBuffer:size in the
8040 supported packets.
8041
e64f7499
YQ
80422013-03-07 Yao Qi <yao@codesourcery.com>
8043
8044 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8045 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8046 of -1.
8047 (cmd_qtsp): Adjust condition. Do post increment.
8048 Set cur_action and cur_step_action back to 0.
8049
f0ae6fc3
PA
80502013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8051
8052 PR server/15236
8053 * linux-low.c (linux_write_memory): Return early success if LEN is
8054 zero.
8055
b5b0b0af
CV
80562013-03-05 Corinna Vinschen <vinschen@redhat.de>
8057
334ad4a8 8058 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 8059
589bc927
TT
80602013-02-28 Tom Tromey <tromey@redhat.com>
8061
8062 * configure.ac: Invoke AC_SYS_LARGEFILE.
8063 * configure, config.in: Rebuild.
8064
dfe07582
CV
80652013-02-28 Corinna Vinschen <vinschen@redhat.com>
8066
8067 * win32-low.c: Throughout, fix format strings and casts of
8068 printf-like functions to avoid type related warnings on all
8069 platforms.
8070 (get_child_debug_event): Print dwDebugEventCode as hex since
8071 that's how it's usually documented.
8072
736cd585
YQ
80732013-02-28 Yao Qi <yao@codesourcery.com>
8074
8075 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8076 pulongest.
8077
e1f58301
JW
80782013-02-27 Jiong Wang <jiwang@tilera.com>
8079
8080 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8081 (reg-tilegx32.c): New rule.
8082 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8083 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8084 different register info initializer according to elf class.
8085 (init_registers_tilgx32): New function. The tilegx32 register info
8086 initializer.
8087 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8088 (tile_store_gregset): Likewise.
8089
d171ca78
YQ
80902013-02-27 Yao Qi <yao@codesourcery.com>
8091
8092 * server.c (process_point_options): Print debug message when
8093 debug_threads is true.
8094
282bbdf3
YQ
80952013-02-26 Yao Qi <yao@codesourcery.com>
8096
8097 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8098
aca22551
PA
80992013-02-19 Pedro Alves <palves@redhat.com>
8100 Kai Tietz <ktietz@redhat.com>
8101
8102 PR gdb/15161
8103
8104 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8105 instead of strtoul to extract address from packet.
8106 (process_serial_event) <'z'>: Likewise.
8107
4f3cee1c
YQ
81082013-02-18 Yao Qi <yao@codesourcery.com>
8109
8110 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8111
8e1d55a3
PA
81122013-02-14 Pedro Alves <palves@redhat.com>
8113
8114 Plug memory leak.
8115
8116 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8117 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8118
458820da
PA
81192013-02-14 Pedro Alves <palves@redhat.com>
8120
8121 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8122
baea0dae
PA
81232013-02-14 Pedro Alves <palves@redhat.com>
8124
8125 * tracepoint.c (save_string): Delete.
8126 (add_tracepoint_action): Use savestring instead of save_string.
8127
0b1afbb3
PA
81282013-02-12 Pedro Alves <palves@redhat.com>
8129
8130 * linux-xtensa-low.c: Ditto.
8131 * xtensa-xtregs.c: Ditto.
8132
8a4ac37e
PA
81332013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8134
8135 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8136 thread_db.
8137
148de6bb
MS
81382013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8139
8140 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8141 aarch64_num_wp_regs and aarch64_num_bp_regs to
8142 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8143
55fac6e0
MS
81442013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8145
8146 * linux-aarch64-low.c (ps_get_thread_area): Replace
8147 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8148
176eb98c
MS
81492013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8150 Marcus Shawcroft <marcus.shawcroft@arm.com>
8151 Nigel Stephens <nigel.stephens@arm.com>
8152 Yufeng Zhang <yufeng.zhang@arm.com>
8153
8154 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8155 (aarch64.c, aarch64-without-fpu.c): New targets.
8156 * configure.srv (aarch64*-*-linux*): New.
8157 * linux-aarch64-low.c: New file.
8158
56f7af9c
MS
81592013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8160
43aaf8b6 8161 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
8162 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8163 (dequeue_one_deferred_signal, linux_resume_one_thread)
8164 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8165 (linux_tracefork_grandchild, linux_test_for_tracefork)
8166 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8167 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8168 where the argument is 0.
8169
60f662b0
YQ
81702013-01-25 Yao Qi <yao@codesourcery.com>
8171
8172 * event-loop.c: Include "queue.h".
8173 (gdb_event_p): New typedef.
8174 (struct gdb_event) <next_event>: Remove.
8175 (event_queue): Change to QUEUE(gdb_event_p).
8176 (async_queue_event): Remove.
8177 (gdb_event_xfree): New.
8178 (initialize_event_loop): New.
8179 (process_event): Use API from QUEUE.
8180 (wait_for_event): Likewise.
8181 * server.c (main): Call initialize_event_loop.
8182 * server.h (initialize_event_loop): Declare.
8183
5ae4861a
YQ
81842013-01-18 Yao Qi <yao@codesourcery.com>
8185
8186 * ax.h (struct eval_agent_expr_context): New.
8187 (gdb_eval_agent_expr): Update declaration.
8188 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8189 TFRAME. Add new argument CTX.
8190 * server.h (struct eval_agent_expr_context): Declare.
8191 (agent_mem_read, agent_tsv_read): Update declaration.
8192 (agent_mem_read_string): Likewise.
8193 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8194 (add_traceframe_block): Add new argument TPOINT.
8195 Increase TPOINT->traceframe_usage.
8196 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8197 eval_tracepoint_agent_expr.
8198 (condition_true_at_tracepoint): Likewise.
8199 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8200 (agent_mem_read_string, agent_tsv_read): Likewise.
8201
85e00e85
YQ
82022013-01-16 Yao Qi <yao@codesourcery.com>
8203
8204 * linux-low.c (linux_resume_one_lwp): Don't check
8205 'lwp->bp_reinsert != 0'.
8206
4039cf45
JB
82072013-01-07 Joel Brobecker <brobecker@adacore.com>
8208 Pedro Alves <palves@redhat.com>
8209
8210 * lynx-low.c (ptrace_request_to_str): Define a temporary
8211 macro and use it to simplify this function's implementation.
8212
9044dee2
JB
82132013-01-07 Joel Brobecker <brobecker@adacore.com>
8214
8215 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8216 sets errno.
8217
e6352c8f
JB
82182013-01-07 Joel Brobecker <brobecker@adacore.com>
8219
8220 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8221
50681a27
JB
82222013-01-07 Joel Brobecker <brobecker@adacore.com>
8223
8224 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8225
3f6e77ef
JB
82262013-01-07 Joel Brobecker <brobecker@adacore.com>
8227
8228 * lynx-low.c (lynx_resume): Use the resume_info parameter
8229 to determine the ptid for the lynx_ptrace call, unless
8230 it is equal to minus_one_ptid, in which case we use the
8231 ptid of the current_inferior.
8232 (lynx_wait_1): After having received a thread create/exit
8233 event, resume the inferior's execution using the signaling
8234 thread's ptid, rather than the old ptid.
8235
7fda33ae
JB
82362013-01-07 Joel Brobecker <brobecker@adacore.com>
8237
8238 * lynx-low.c (lynx_resume): Delete variable ret.
8239
b9786c74
JB
82402013-01-01 Joel Brobecker <brobecker@adacore.com>
8241
8242 * gdbreplay.c (gdbreplay_version): Update copyright year.
8243 * server.c (gdbserver_version): Likewise.
8244
8b93d60f
JB
82452012-12-17 Joel Brobecker <brobecker@adacore.com>
8246
8247 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8248 new thread.
8249
037335a7
JB
82502012-12-17 Joel Brobecker <brobecker@adacore.com>
8251
8252 * lynx-low.c (ptrace_request_to_str): Add handling for
8253 PTRACE_GETTRACESIG.
8254
52d4cbd8
JB
82552012-12-17 Joel Brobecker <brobecker@adacore.com>
8256
8257 * lynx-low.c (lynx_attach): Delete variable new_process.
8258
ab8f6ca9
JB
82592012-12-17 Joel Brobecker <brobecker@adacore.com>
8260
8261 * lynx-low.c (lynx_create_inferior): Delete variable
8262 new_process.
8263
78cbc024
JB
82642012-12-17 Joel Brobecker <brobecker@adacore.com>
8265
8266 * lynx-low.c (ptrace_request_to_str): Do not handle
8267 PTRACE_GETTHREADLIST if this macro does not exist.
8268
14a00470
YQ
82692012-12-15 Yao Qi <yao@codesourcery.com>
8270
8271 * Makefile.in (OBS): Add notif.o.
8272 * notif.c, notif.h: New.
8273 * server.c: Include "notif.h".
8274 (struct vstop_notif) <next>: Remove.
8275 <base>: New field.
8276 (queue_stop_reply): Update.
8277 (push_event, send_next_stop_reply): Remove.
8278 (discard_queued_stop_replies): Update.
8279 (notif_stop): New variable.
8280 (handle_v_stopped): Remove.
8281 (handle_v_requests): Don't call handle_v_stopped. Call
8282 handle_ack_notif instead.
8283 (queue_stop_reply_callback): Call notif_event_enque instead
8284 of queue_stop_reply.
8285 (handle_status): Don't call send_next_stop_reply, call
8286 notif_write_event instead.
8287 (kill_inferior_callback): Likewise.
8288 (detach_or_kill_inferior_callback): Likewise.
8289 (main): Call initialize_notif.
8290 (process_serial_event): Call QUEUE_is_empty.
8291 (handle_target_event): Call notif_push instead of push event.
8292 * server.h (push_event): Remove declaration.
8293
61c125b9
TT
82942012-12-10 Tom Tromey <tromey@redhat.com>
8295
8296 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8297 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8298 macros.
8299 (.c.o): Rewrite.
8300 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8301 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8302 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8303 (amd64-linux-ipa.o, ax.o): Rewrite.
8304 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8305 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8306 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8307 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8308 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8309 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8310 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8311 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8312 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8313 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8314 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8315 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8316 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8317 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8318 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8319 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8320 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8321 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8322 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8323 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8324 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8325 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8326 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8327 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8328 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8329 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8330 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8331 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8332 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8333 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8334 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8335 (reg-tilegx.o): Remove.
8336 (all_object_files): New macro.
8337 Include .deps files.
8338 * aclocal.m4, configure: Rebuild.
8339 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8340 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8341 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8342
e90e9ad9
TT
83432012-12-05 Tom Tromey <tromey@redhat.com>
8344
8345 PR gdb/14917:
8346 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8347
02d403bf 83482012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8349
8350 * configure.ac: Check for linux/perf_event.h.
8351 * config.in: Regenerated.
8352 * configure: Regenerated.
8353
0270a750
PA
83542012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8355
8356 * hostio.c (handle_readlink): Decrease buffer size
8357 parameter passed to readlink by one byte.
8358
8c29b58e
YQ
83592012-11-26 Yao Qi <yao@codesourcery.com>
8360
8361 * configure.ac (build_warnings): Append '-Wempty-body'.
8362 * configure: Regenerated.
8363 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8364 body.
8365
8bdce1ff
PM
83662012-11-15 Pierre Muller <muller@sourceware.org>
8367
8368 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8369 * config.in: Regenerate.
8370 * configure: Regenerate.
8371 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8372 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8373 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8374 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8375 header.
8376 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8377 instead of <sys/wait.h> header.
8378 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8379
02d403bf 83802012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
8381
8382 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8383 (various make rules): Remove -DGDBSERVER
8384
fbd5db48
YQ
83852012-11-09 Yao Qi <yao@codesourcery.com>
8386
8387 * spu-low.c (current_ptid): Move it to ..
8388 * gdbthread.h: ... here. New.
8389 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8390 * server.c (myresume, process_serial_event): Likewise.
8391 * thread-db.c (thread_db_find_new_threads): Likewise.
8392 * tracepoint.c (run_inferior_command): Likewise.
8393
b3dc46ff
AB
83942012-10-01 Andrew Burgess <aburgess@broadcom.com>
8395
8396 * server.c (handle_search_memory_1): Include access length in
8397 warning message.
8398
07c04788
HPN
83992012-09-05 Michael Brandt <michael.brandt@axis.com>
8400
8401 * linux-crisv32-low.c: Fix compile errors.
8402
918d227b
YQ
84032012-09-04 Yao Qi <yao@codesourcery.com>
8404
8405 * tracepoint.c (cmd_qtsv): Adjust debug message.
8406 Don't check CUR_TPOINT.
8407
18c1b81a
YQ
84082012-08-28 Yao Qi <yao@codesourcery.com>
8409
8410 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8411 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8412 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8413 Remove declarations of xmalloc, xreallloc, xstrdup and
8414 freeargv.
8415 * Makefile.in (libiberty_h): New.
8416 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8417 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8418
dc82f37b
YQ
84192012-08-23 Yao Qi <yao@codesourcery.com>
8420
8421 * server.h: Remove declaration of 'xsnprintf'.
8422
406b1477
KS
84232012-08-22 Keith Seitz <keiths@redhat.com>
8424
8425 * server.h: Include build-gnulib-gbserver/config.h.
8426 * gdbreplay.c: Likewise.
8427
e6712ff1
DE
84282012-08-08 Doug Evans <dje@google.com>
8429
8430 * Makefile.in (SFILES): Add gdb_vecs.c.
8431 (OBS): Add gdb_vecs.o.
8432 (gdb_vecs_h, host_defs_h): New variables.
8433 (thread-db.o): Add $(gdb_vecs_h) dependency.
8434 (gdb_vecs.o): New rule.
8435 * thread-db.c: #include "gdb_vecs.h".
8436 (thread_db_load_search): Use a vector to iterate over path elements.
8437 Handle text appearing after "$pdir".
8438
8439 * configure.ac: Add check for strstr.
8440 * config.in: Regenerate.
8441 * configure: Regenerate.
8442
7c3270ae
UW
84432012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8444
8445 * hostio.c (handle_pread): If pread fails, fall back to attempting
8446 lseek/read.
8447 (handle_pwrite): Likewise for pwrite.
8448
b62e2b27
UW
84492012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8450
8451 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8452 between unsupported TYPE and unimplementable ADDR/LEN combination.
8453 (arm_insert_point): Act on new return value.
8454
78a99e91
PA
84552012-07-31 Pedro Alves <palves@redhat.com>
8456
8457 * server.c (process_point_options): Only skip tokens if we find
8458 one that is unrecognized. Don't treat 'X' specially while
8459 skipping unrecognized tokens.
8460
fcf303ab
UW
84612012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8462
8463 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8464 to 4-byte-align HW breakpoint addresses for Thumb.
8465
7255706c
YQ
84662012-07-27 Yao Qi <yao@codesourcery.com>
8467
8468 PR remote/14161.
8469
8470 * server.h: Declare gdb_agent_about_to_close.
8471 * target.c (kill_inferior): Include "agent.h".
8472 New. Send command 'kill'.
8473 * target.h (kill_inferior): Removed macro.
8474 * tracepoint.c (gdb_agent_about_to_close): New.
8475 (gdb_agent_helper_thread): Handle command 'close'.
8476 Wait endlessly until the inferior stops.
8477 Install gdb_agent_remove_socket to atexit hook.
8478 (agent_socket_name): New static variable.
8479 (gdb_agent_socket_init): Replace local variable 'name' with
8480 'agent_socket_name'.
8481 (gdb_agent_remove_socket): New.
8482
5a3f286f
YQ
84832012-07-27 Yao Qi <yao@codesourcery.com>
8484
8485 * server.c (process_point_options): Stop at 'X' when parsing.
8486
961bd387
ME
84872012-07-19 Michael Eager <eager@eagercon.com>
8488
a261b8f5 8489 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
8490 to hw_execute.
8491 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8492 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8493 hardware breakpoint.
8494
aa7c7447
JK
84952012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8496
8497 * gdbserver/linux-low.c (initialize_low): Call
8498 linux_ptrace_init_warnings.
8499
7f216e7c
DE
85002012-07-02 Doug Evans <dje@google.com>
8501
8502 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8503 pointer to int.
8504
d3ce09f5
SS
85052012-07-02 Stan Shebs <stan@codesourcery.com>
8506
8507 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8508 (ax.o): Add it to build rule.
8509 (ax-ipa.o): Ditto.
8510 (OBS): Add format.o.
8511 (IPA_OBS): Add format.o.
8512 * server.c (handle_query): Claim support for breakpoint commands.
8513 (process_point_options): Add command case.
8514 (process_serial_event): Leave running if there are printfs in
8515 effect.
8516 * mem-break.h (any_persistent_commands): Declare.
8517 (add_breakpoint_commands): Declare.
8518 (gdb_no_commands_at_breakpoint): Declare.
8519 (run_breakpoint_commands): Declare.
8520 * mem-break.c (struct point_command_list): New struct.
8521 (struct breakpoint): New field command_list.
8522 (any_persistent_commands): New function.
8523 (add_commands_to_breakpoint): New function.
8524 (add_breakpoint_commands): New function.
8525 (gdb_no_commands_at_breakpoint): New function.
8526 (run_breakpoint_commands): New function.
8527 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8528 locally.
8529 * ax.c: Include format.h.
8530 (ax_printf): New function.
8531 (gdb_eval_agent_expr): Add printf opcode.
8532
2f8f6aed
YQ
85332012-06-13 Yao Qi <yao@codesourcery.com>
8534
8535 * server.c (start_inferior): Remove duplicated writes to fields
8536 'last_resume_kind' and 'last_status' of 'current_inferior'.
8537
0c9070b3
YQ
85382012-06-12 Yao Qi <yao@codesourcery.com>
8539 Pedro Alves <palves@redhat.com>
8540
8541 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8542 comment.
8543 * server.c (handle_v_cont): Extend comment.
8544
c52daf70
YQ
85452012-06-11 Yao Qi <yao@codesourcery.com>
8546
8547 * linux-low.c (linux_attach): Add 'static'.
8548
d38bbb0a
YQ
85492012-06-06 Yao Qi <yao@codesourcery.com>
8550
8551 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8552
89dc0afd
JK
85532012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8554
8555 Fix gcc -flto compilation warning.
8556 * server.c (main): Make variable multi_mode and attach volatile.
8557
75f62ce7
TJB
85582012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8559
8560 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8561 if the platform doesn't know about it.
8562
65f479b6
PA
85632012-05-30 Jeff Kenton <jkenton@tilera.com>
8564
8565 * Makefile.in (SFILES): Add linux-tile-low.c.
8566 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8567 * configure.srv: Handle tilegx-*-linux*.
8568 * linux-tile-low.c: New file.
8569
0c5bf5a9
JK
85702012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8571
8572 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8573
a493e3e2
PA
85742012-05-24 Pedro Alves <palves@redhat.com>
8575
8576 PR gdb/7205
8577
43aaf8b6 8578 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8579
2ea28649
PA
85802012-05-24 Pedro Alves <palves@redhat.com>
8581
8582 PR gdb/7205
8583
8584 Replace target_signal with gdb_signal throughout.
8585
8d409d16
MR
85862012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8587
8588 * linux-low.c (linux_store_registers): Avoid the copying sequence
8589 when no data has been retrieved by ptrace.
8590
23512c01
MGD
85912012-05-22 Will Deacon <will.deacon@arm.com>
8592
8593 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8594 Include asm/ptrace.h.
8595 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8596 already defined.
8597
4934b29e
MR
85982012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8599
8600 * linux-low.c (linux_store_registers): Don't re-retrieve data
8601 with ptrace that has already been obtained from /proc. Always
8602 copy any data retrieved with ptrace to the buffer supplied.
8603
bde24c0a
PA
86042012-05-11 Yao Qi <yao@codesourcery.com>
8605 Pedro Alves <palves@redhat.com>
8606
8607 * linux-low.c (enum stopping_threads_kind): New.
8608 (stopping_threads): Change type to `enum stopping_threads_kind'.
8609 (handle_extended_wait): If stopping and suspending threads, leave
8610 the new_lwp suspended too.
8611 (linux_wait_for_event): Adjust.
8612 (stop_all_lwps): Set `stopping_threads' to
8613 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8614 whether we're suspending threads or just stopping them. Assert no
8615 recursion happens.
8616
623b6bdf
YQ
86172012-04-29 Yao Qi <yao@codesourcery.com>
8618
8619 * server.h: Move some code to ...
8620 * gdbthread.h: ... here. New.
8621 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8622 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8623 (nto-low.o, win32-low.o): Likewise.
8624 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8625 * regcache.c, remote-utils.c, server.c: Likewise.
8626 * target.c, tracepoint.c, win32-low.c: Likewise.
8627
f15f9948
TJB
86282012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8629
8630 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8631 (PTRACE_ARG4_TYPE): Likewise.
8632 (PTRACE_XFER_TYPE): Likewise.
8633 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8634 ptrace to PTRACE_ARG3_TYPE.
8635 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8636 (PTRACE_ARG4_TYPE): Likewise.
8637 (PTRACE_XFER_TYPE): Likewise.
8638 (linux_detach_one_lwp): Cast fourth argument of
8639 ptrace to long then PTRACE_ARG4_TYPE.
8640 (regsets_fetch_inferior_registers): Cast third argument of
8641 ptrace to long then PTRACE_ARG3_TYPE.
8642 (regsets_store_inferior_registers): Likewise.
8643
38ea300a
PA
86442012-04-20 Pedro Alves <palves@redhat.com>
8645
8646 * configure: Regenerate.
8647
c971b7fa
PA
86482012-04-19 Pedro Alves <palves@redhat.com>
8649
43aaf8b6 8650 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 8651 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
8652 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8653 (all, install-only, uninstall, clean-info, all-lib, clean): No
8654 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8655 (maintainer-clean realclean distclean): Use subdir_do.
8656 (subdir_do): New.
8657 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 8658 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
8659 * acinclude.m4: Include acx_configure_dir.m4.
8660 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8661 calls. Call AC_PROG_RANLIB. Configure gnulib using
8662 ACX_CONFIGURE_DIR.
8663 (GNULIB): New.
8664 (GNULIB_STDINT_H): Adjust.
8665 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8666 * gdbreplay.c: Include build-gnulib/config.h.
8667 * server.h: Likewise.
8668 * aclocal.m4: Regenerate.
8669 * config.in: Regenerate.
8670 * configure: Regenerate.
c971b7fa 8671
809277f8
PA
86722012-04-19 Pedro Alves <palves@redhat.com>
8673
8674 * Makefile.in (LIBGNU, INCGNU): Adjust.
8675 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8676 (all, install-only, uninstall, clean-info, all-lib, clean)
8677 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8678 * configure.ac: Adjust AC_OUTPUT output.
8679 * aclocal.m4: Regenerate.
8680 * configure: Regenerate.
8681
fd9bb8b8
PA
86822012-04-19 Pedro Alves <palves@redhat.com>
8683
8684 * Makefile.in (generated_files): New.
8685 (server_h): Remove the explicit dependency on config.h, and depend
8686 on $generated_files.
8687
1c298c66
PA
86882012-04-19 Pedro Alves <palves@redhat.com>
8689
8690 * Makefile.in (INCGNU): Add -Ignulib.
8691
57c4b50b
PA
86922012-04-19 Pedro Alves <palves@redhat.com>
8693
8694 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8695 (INCGNU): ... this, and spell out -I here.
8696 (GNULIB_LIB): Rename to ...
8697 (LIBGNU): ... this.
8698 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8699
1030e047
PA
87002012-04-19 Pedro Alves <palves@redhat.com>
8701
8702 * config.in: Regenerate.
8703
447d4319
PA
87042012-04-19 Pedro Alves <palves@redhat.com>
8705
8706 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8707 * server.h (memmem): Remove declaration.
8708 * config.in: Regenerate.
8709 * configure: Regenerate.
8710
aad9eab9
YQ
87112012-04-19 Yao Qi <yao@codesourcery.com>
8712
8713 * Makefile.in (SFILES): Add common/vec.c.
8714 (OBS): Add vec.o.
8715 (vec.o): New rule.
8716
3e10640f
YQ
87172012-04-19 Yao Qi <yao@codesourcery.com>
8718
8719 * remote-utils.c (prepare_resume_reply): Replace with macro
8720 target_core_of_thread.
8721 * server.c (handle_qxfer_threads_proper): Likewise.
8722 * target.h (traget_core_of_thread): New macro.
8723
71622373
PA
87242012-04-18 Pedro Alves <palves@redhat.com>
8725
8726 * aclocal.m4: Regenerate.
8727 * configure: Regenerate.
8728
80d26939
YQ
87292012-04-16 Yao Qi <yao@codesourcery.com>
8730
8731 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8732 duplicated on address.
8733
42476b70
YQ
87342012-04-16 Yao Qi <yao@codesourcery.com>
8735
8736 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8737 (struct tracepoint_action_ops) <send>: New field.
8738 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8739 (agent_expr_send, x_tracepoint_action_send): New.
8740 (l_tracepoint_action_send): New.
8741 (cmd_qtdp): Download and install tracepoint
8742 according to `use_agent'.
8743 (run_inferior_command): Add one more parameter `len'.
8744 Update callers.
8745 (tracepoint_send_agent): New.
8746 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8747
7bc83639
YQ
87482012-04-16 Yao Qi <yao@codesourcery.com>
8749
8750 * tracepoint.c (download_tracepoints): Moved to ...
8751 (cmd_qtstart): ... here.
8752
5f18041e
YQ
87532012-04-14 Yao Qi <yao@codesourcery.com>
8754
8755 * tracepoint.c: Include inttypes.h.
8756 (struct collect_memory_action): Use sized types.
8757 (struct tracepoint): Likewise.
8758 (cmd_qtdp, stop_tracing): Update print specifiers.
8759 (cmd_qtp, response_tracepoint): Likewise.
8760 (collect_data_at_tracepoint): Likewise.
8761 (collect_data_at_step): Likewise.
8762
55a8c076
YQ
87632012-04-14 Yao Qi <yao@codesourcery.com>
8764
8765 Import gnulib module inttypes.
8766 * aclocal.m4, config.in, configure: Regenerated.
8767
dc750257
YQ
87682012-04-14 Yao Qi <yao@codesourcery.com>
8769
8770 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8771 Makefile and config.status at last.
8772
0ab5faf9
YQ
87732012-04-13 Yao Qi <yao@codesourcery.com>
8774
8775 * tracepoint.c: Include stdint.h unconditionally.
8776
18f5fd81
TJB
87772012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8778
8779 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8780 on BFD_HAVE_SYS_PROCFS_TYPE.
8781 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8782 * configure: Regenerate.
8783 * config.in: Likewise.
8784
4d47af5c
L
87852012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8786
8787 * Makefile.in (clean): Also remove x32.c x32-linux.c
8788 x32-avx.c x32-avx-linux.c.
8789 (x32.o): New target.
8790 (x32.c): Likewise.
8791 (x32-linux.o): Likewise.
8792 (x32-linux.c): Likewise.
8793 (x32-avx.o): Likewise.
8794 (x32-avx.c): Likewise.
8795 (x32-avx-linux.o): Likewise.
8796 (x32-avx-linux.c): Likewise.
8797
8798 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8799 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8800 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8801 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8802 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8803 i386/x32-avx-linux.xml.
8804
8805 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8806 (init_registers_x32_avx_linux): Likwise.
8807 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8808 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8809
ecedbe58
PA
88102012-04-13 Pedro Alves <palves@redhat.com>
8811
8812 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8813 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8814 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8815 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8816 the sub-make.
8817
c92b5177
L
88182012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8819
8820 * linux-x86-low.c (compat_x32_clock_t): New.
8821 (compat_x32_siginfo_t): Likewise.
8822 (compat_x32_siginfo_from_siginfo): Likewise.
8823 (siginfo_from_compat_x32_siginfo): Likewise.
8824 (linux_is_elf64): Likewise.
8825 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8826 and siginfo_from_compat_x32_siginfo for x32.
8827 (x86_arch_setup): Set linux_is_elf64.
8828
214d508e
L
88292012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8830
8831 PR gdb/13969
8832 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8833 e_machine field.
8834 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8835 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8836 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8837 compatible with process.
8838
c9a1864a
YQ
88392012-04-12 Yao Qi <yao@codesourcery.com>
8840
8841 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8842 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8843 (install-only, install-info, clean): Handle sub dir gnulib.
8844 (all-lib, am--refresh): New targets.
8845 (memmem.o): Remove target.
8846 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8847 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8848 (AC_REPLACE_FUNCS): Remove memmem.
8849 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8850 (AC_OUTPUT): Generate Makefile in gnulib/.
8851 * aclocal.m4, config.in, configure: Regenerated.
8852
367ba2c2
MR
88532012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8854
8855 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8856
9d236627
PA
88572012-04-05 Pedro Alves <palves@redhat.com>
8858
8859 -Werror=strict-aliasing
8860
8861 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8862 pointer.
8863
111217b3
PA
88642012-04-04 Pedro Alves <palves@redhat.com>
8865
8866 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8867 (sparc_store_gregset_from_stack, sparc_store_gregset)
8868 (sparc_breakpoint_at): Fix formatting.
8869
8365dcf5
TJB
88702012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8871
8872 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8873 are available.
8874 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8875 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8876 * config.in: Regenerate.
8877 * configure: Likewise.
8878
689cc2ae
PA
88792012-03-29 Pedro Alves <palves@redhat.com>
8880
8881 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8882 Correct ptrace arguments.
8883
c14dfd32
PA
88842012-03-28 Pedro Alves <palves@redhat.com>
8885
8886 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8887 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8888 (IA64_FR1_REGNUM): New defines.
8889 (ia64_fetch_register): New.
8890 (the_low_target): Install it.
8891 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8892 field.
8893 * linux-low.c (linux_fetch_registers): Try the
8894 the_low_target.fetch_register hook first.
8895
8896 * linux-arm-low.c (the_low_target): Adjust.
8897 * linux-bfin-low.c (the_low_target): Adjust.
8898 * linux-cris-low.c (the_low_target): Adjust.
8899 * linux-crisv32-low.c (the_low_target): Adjust.
8900 * linux-m32r-low.c (the_low_target): Adjust.
8901 * linux-m68k-low.c (the_low_target): Adjust.
8902 * linux-mips-low.c (the_low_target): Adjust.
8903 * linux-ppc-low.c (the_low_target): Adjust.
8904 * linux-s390-low.c (the_low_target): Adjust.
8905 * linux-sh-low.c (the_low_target): Adjust.
8906 * linux-sparc-low.c (the_low_target): Adjust.
8907 * linux-tic6x-low.c (the_low_target): Adjust.
8908 * linux-x86-low.c (the_low_target): Adjust.
8909 * linux-xtensa-low.c (the_low_target): Adjust.
8910
63c88e13
PA
89112012-03-26 Pedro Alves <palves@redhat.com>
8912
8913 * server.c (handle_qxfer_libraries): Don't bail early if
8914 the_target->qxfer_libraries_svr4 is not NULL.
8915
fb723180
PA
89162012-03-26 Pedro Alves <palves@redhat.com>
8917
8918 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8919
0afae3cf
PA
89202012-03-23 Pedro Alves <palves@redhat.com>
8921
8922 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8923 "library-list-svr4" element's start tag when the the DSO list is
8924 empty.
8925
485f1ee4
PA
89262012-03-23 Pedro Alves <palves@redhat.com>
8927
8928 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8929 a variable whose type size is the same as the inferior's pointer
8930 size.
8931
a5362b9a
TS
89322012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8933
8934 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8935 struct siginfo.
8936 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8937 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8938 * linux-low.h: Include <signal.h>.
8939 (struct siginfo): Remove forward declaration.
8940 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8941 struct siginfo.
8942
d226c142
MF
89432012-03-21 Mike Frysinger <vapier@gentoo.org>
8944
8945 * .gitignore: Ignore more files.
8946
122f36ef
PA
89472012-03-19 Pedro Alves <palves@redhat.com>
8948 Jan Kratochvil <jan.kratochvil@redhat.com>
8949
8950 * server.c (cont_thread, general_thread): Add describing comments.
8951 (start_inferior): Clear `cont_thread'.
8952 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8953 of a process.
8954
fc3e5175
YQ
89552012-03-15 Yao Qi <yao@codesourcery.com>
8956
8957 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8958 handling to ...
8959 (cmd_qtdp): ... here.
8960
8d0d92cd
YQ
89612012-03-15 Yao Qi <yao@codesourcery.com>
8962
8963 * tracepoint.c (struct tracepoint_action_ops): New.
8964 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8965 (m_tracepoint_action_download): New.
8966 (r_tracepoint_action_download): New.
8967 (x_tracepoint_action_download): New.
8968 (l_tracepoint_action_download): New.
8969 (add_tracepoint_action): Install `action->ops' according type.
8970 (download_tracepoint_1): Move code `download' function pointer
8971 of various tracepoint_action_ops.
8972
87b0bb13
JK
89732012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8974
8975 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8976 linux_ptrace_attach_warnings.
8977
5f572dec
JK
89782012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8979
8980 * Makefile.in (linux-ptrace.o): New.
8981 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8982 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8983 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8984 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8985 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8986 of these targets.
8987 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8988
f4647387
YQ
89892012-03-08 Yao Qi <yao@codesourcery.com>
8990 Pedro Alves <palves@redhat.com>
8991
8992 Fix PR server/13392.
8993 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8994 offset of JMP insn.
8995 * tracepoint.c (remove_tracepoint): New.
8996 (cmd_qtdp): Call remove_tracepoint when failed to install.
8997
9b224c5e
PA
89982012-03-07 Pedro Alves <palves@redhat.com>
8999
9000 * linux-low.c (get_detach_signal): New.
9001 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9002 Pass on pending signals to PTRACE_DETACH. Check the result of the
9003 ptrace call.
9004 * server.c (program_signals, program_signals_p): New.
9005 (handle_general_set): Handle QProgramSignals.
9006 * server.h (program_signals, program_signals_p): Declare.
9007
e237a7e2
JK
90082012-03-05 Pedro Alves <palves@redhat.com>
9009 Jan Kratochvil <jan.kratochvil@redhat.com>
9010
9011 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9012 New comment why.
9013
5808517f
YQ
90142012-03-03 Yao Qi <yao@codesourcery.com>
9015
9016 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9017 agent_look_up_symbols.
9018
58b4daa5
YQ
90192012-03-03 Yao Qi <yao@codesourcery.com>
9020
9021 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9022 (linux-x86-low.o): Likewise.
9023 * server.h: Remove in_process_agent_loaded.
9024 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9025 common/agent.c.
9026 Update callers.
9027
8ffcbaaf
YQ
90282012-03-03 Yao Qi <yao@codesourcery.com>
9029
9030 * tracepoint.c (gdb_agent_capability): New global.
9031 (in_process_agent_loaded_ust): Renamed to
9032 `in_process_agent_supports_ust'.
9033 Update callers.
9034 (in_process_agent_supports_ust): Call agent_capability_check.
9035 (clear_installed_tracepoints): Assert that agent supports
9036 agent.
9037
d1feda86
YQ
90382012-03-03 Yao Qi <yao@codesourcery.com>
9039
9040 * linux-low.c (linux_supports_agent): New.
9041 (linux_target_ops): Initialize field `supports_agent' with
9042 linux_supports_agent.
9043 * target.h (struct target_ops) <supports_agent>: New.
9044 (target_supports_agent): New macro.
9045 * server.c (handle_general_set): Handle packet 'QAgent'.
9046 (handle_query): Send `QAgent+'.
9047 * Makefile.in (server.o): Depends on agent.h.
9048
2fa291ac
YQ
90492012-03-03 Yao Qi <yao@codesourcery.com>
9050
9051 * Makefile.in (OBS): Add agent.o.
9052 Add new rule for agent.o.
9053 Track dependence of tracepoint.c on agent.h.
9054 * tracepoint.c (run_inferior_command_1):
9055 (run_inferior_command): Call agent_run_command.
9056 (gdb_ust_connect_sync_socket): Deleted. Move it to
9057 common/agent.c.
9058 (resume_thread, stop_thread): Likewise.
9059 (gdb_ust_socket_init): Renamed to ...
9060 (gdb_agent_socket_init): ... New.
9061 (gdb_ust_thread): Renamed to ...
9062 (gdb_agent_helper_thread): ... New.
9063 (gdb_ust_init): Move some code to ...
9064 (gdb_agent_init): ... here. New.
9065 [HAVE_UST]: Call gdb_ust_init.
9066 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9067 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9068 * config.in, configure: Regenerated.
9069
05044653
PA
90702012-03-02 Pedro Alves <palves@redhat.com>
9071
9072 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9073 * linux-low.c (struct simple_pid_list): New.
9074 (stopped_pids): New a struct simple_pid_list pointer.
9075 (add_to_pid_list, pull_pid_from_list): New.
9076 (handle_extended_wait): Don't assume the first signal new children
9077 report is SIGSTOP. Adjust call to pull_pid_from_list.
9078 (linux_wait_for_lwp): Adjust.
9079
8d00225b
YQ
90802012-03-02 Yao Qi <yao@codesourcery.com>
9081
9082 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9083 debug log.
9084
19560ba5
YQ
90852012-03-02 Yao Qi <yao@codesourcery.com>
9086
9087 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9088 `stop_pc' and `tpoint'. Update caller.
9089
1faeff08
MR
90902012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9091
9092 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9093 * linux-low.c (use_linux_regsets): New macro.
9094 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9095 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9096 (linux_register_in_regsets): New function.
9097 (usr_fetch_inferior_registers): Skip registers covered by
9098 regsets.
9099 (usr_store_inferior_registers): Likewise.
9100 (usr_fetch_inferior_registers): New macro.
9101 (usr_store_inferior_registers): Likewise.
9102 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9103 (linux_store_registers): Likewise.
9104 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9105 prototype.
9106 (init_registers_mips64_dsp_linux): Likewise.
9107 (init_registers_mips_linux): New macro.
9108 (init_registers_mips_dsp_linux): Likewise.
9109 (mips_dsp_num_regs): Likewise.
9110 (DSP_BASE, DSP_CONTROL): New fallback macros.
9111 (mips_base_regs): New macro.
9112 (mips_regmap): Use it. Fix the size.
9113 (mips_dsp_regmap): New variable.
9114 (mips_dsp_regset_bitmap): Likewise.
9115 (mips_arch_setup): New function.
9116 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9117 than mips_regmap.
9118 (mips_cannot_store_register): Likewise.
9119 (the_low_target): Update .arch_setup, .num_regs and .regmap
9120 initializers. Add .regset_bitmap initializer.
9121 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9122 initializer.
9123 * linux-bfin-low.c (the_low_target): Likewise.
9124 * linux-cris-low.c (the_low_target): Likewise.
9125 * linux-crisv32-low.c (the_low_target): Likewise.
9126 * linux-ia64-low.c (the_low_target): Likewise.
9127 * linux-m32r-low.c (the_low_target): Likewise.
9128 * linux-m68k-low.c (the_low_target): Likewise.
9129 * linux-ppc-low.c (the_low_target): Likewise.
9130 * linux-s390-low.c (the_low_target): Likewise.
9131 * linux-sh-low.c (the_low_target): Likewise.
9132 * linux-sparc-low.c (the_low_target): Likewise.
9133 * linux-tic6x-low.c (the_low_target): Likewise.
9134 * linux-x86-low.c (the_low_target): Likewise.
9135 * linux-xtensa-low.c (the_low_target): Likewise.
9136 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9137 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9138 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9139 srv_xmlfiles.
9140 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9141 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9142
c03e6ccc
YQ
91432012-02-29 Yao Qi <yao@codesourcery.com>
9144 Pedro Alves <palves@redhat.com>
9145
9146 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9147 `step_over_finished' is true.
9148
644cebc9
PA
91492012-02-27 Pedro Alves <palves@redhat.com>
9150
9151 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9152 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9153
c14d7ab2
PA
91542012-02-27 Pedro Alves <palves@redhat.com>
9155
9156 PR server/9684
9157 * linux-low.c (pid_is_stopped): New.
9158 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9159
412c89dd
LM
91602012-02-25 Luis Machado <lgustavo@codesourcery.com>
9161
9162 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9163 of conditions.
9164
b745defe
MR
91652012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9166
9167 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9168
9f3a5c85
LM
91692012-02-24 Luis Machado <lgustavo@codesourcery>
9170
9171 * server.c (handle_query): Advertise support for target-side
9172 breakpoint condition evaluation.
9173 (process_point_options): New function.
9174 (process_serial_event): When inserting a breakpoint, check for
9175 a target-side condition that should be evaluated.
9176
9177 * mem-break.c: Include regcache.h and ax.h.
9178 (point_cond_list_t): New data structure.
9179 (breakpoint) <cond_list>: New field.
9180 (find_gdb_breakpoint_at): Make non-static.
9181 (delete_gdb_breakpoint_at): Clear any target-side
9182 conditions.
9183 (clear_gdb_breakpoint_conditions): New function.
9184 (add_condition_to_breakpoint): Likewise.
9185 (add_breakpoint_condition): Likewise.
9186 (gdb_condition_true_at_breakpoint): Likewise.
9187 (gdb_breakpoint_here): Return result directly instead
9188 of going through a local variable.
9189
9190 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9191 (clear_gdb_breakpoint_conditions): Likewise.
9192 (add_breakpoint_condition): Likewise.
9193 (gdb_condition_true_at_breakpoint): Likewise.
9194
9195 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9196 (need_step_over_p): Take target-side breakpoint condition into
9197 consideration.
9198
5e1dc496
LM
91992012-02-24 Luis Machado <lgustavo@codesourcery>
9200
9201 * server.h: Include tracepoint.h.
9202 (agent_mem_read, agent_get_trace_state_variable_value,
9203 agent_set_trace_state_variable_value,
9204 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9205 get_set_tsv_func_addr): New prototypes.
9206
9207 * ax.h: New include file.
9208 * ax.c: New source file.
9209
9210 * tracepoint.c: Include ax.h.
9211 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9212 agent_expr, eval_result_type): Move to ax.h.
9213 (parse_agent_expr): Rename to ...
9214 (gdb_parse_agent_expr): ... this, make it non-static and move
9215 to ax.h.
9216 (unparse_agent_expr) Rename to ...
9217 (gdb_unparse_agent_expr): ... this, make it non-static and move
9218 to ax.h.
9219 (eval_agent_expr): Rename to ...
9220 (eval_tracepoint_agent_expr): ... this.
9221 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9222 forward declarations.
9223 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9224 (agent_get_trace_state_variable_value): New function.
9225 (agent_set_trace_state_variable_value): New function.
9226 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9227 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9228 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9229 (condition_true_at_tracepoint): Likewise.
9230 (parse_agent_expr): Rename to ...
9231 (gdb_parse_agent_expr): ... this and move to ax.c.
9232 (unparse_agent_expr): Rename to ...
9233 (gdb_unparse_agent_expr): ... this and move to ax.c.
9234 (gdb_agent_op_name): Move to ax.c.
9235 (eval_agent_expr): Rename to ...
9236 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9237 and move to ax.c.
9238 (eval_tracepoint_agent_expr): New function.
9239 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 9240 non-static.
5e1dc496
LM
9241 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9242 ax.c.
9243 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9244 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9245 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9246 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9247 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9248 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9249 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9250 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9251 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9252 (compile_bytecodes): Remove forward declaration.
9253 (is_goto_target): Move to ax.c.
9254 (compile_bytecodes): Move to ax.c and call
9255 agent_get_trace_state_variable_value (...) and
9256 agent_set_trace_state_variable_value (...).
9257
9258 * Makefile.in: Update ax.c and IPA dependencies.
9259
277e4e52
PA
92602012-02-24 Pedro Alves <palves@redhat.com>
9261
9262 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9263 (cmd_bigqtbuffer_circular): ... this. Only handle
9264 'QTBuffer:circular:'.
9265 (handle_tracepoint_general_set): Adjust.
9266
bf4c19f7
YQ
92672012-02-16 Yao Qi <yao@codesourcery.com>
9268
9269 * inferiors.c: Move code to ...
9270 * dll.c: .... here. New.
9271 * server.h: Declare clear_dlls.
9272 * Makefile.in (SFILES): Add dll.c.
9273 (OBS): Add dll.o
9274 (dll.o): New rule.
9275
d73f2619
YQ
92762012-02-11 Yao Qi <yao@codesourcery.com>
9277
9278 * server.c: (handle_monitor_command): Add a new parameter
9279 `own_buf'.
9280 (handle_query): Update caller.
9281
f8255c2a
JB
92822012-02-09 Joel Brobecker <brobecker@adacore.com>
9283
9284 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9285 * configure, config.in: Regenerate.
9286 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9287 is not defined.
9288
da84f473
PA
92892012-02-02 Pedro Alves <palves@redhat.com>
9290
9291 Try SIGKILL first, then PTRACE_KILL.
9292 * linux-low.c (linux_kill_one_lwp): New.
9293 (linux_kill_one_lwp): Rename to ...
9294 (kill_one_lwp_callback): ... this. Use the new
9295 linux_kill_one_lwp.
9296
e886a173
PA
92972012-02-02 Pedro Alves <palves@redhat.com>
9298
9299 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9300 inferior.
9301
be07f1a2
PA
93022012-01-27 Pedro Alves <palves@redhat.com>
9303
9304 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9305 (elf_64_file_p): Make static.
9306 (linux_pid_exe_is_elf_64_file): New.
9307 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9308 Delete declarations.
9309 (linux_pid_exe_is_elf_64_file): Declare.
9310 * linux-x86-low.c (x86_arch_setup): Use
9311 linux_pid_exe_is_elf_64_file.
9312
d8301ad1
JK
93132012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9314
9315 * linux-low.c (linux_wait_for_event_1): Rename to ...
9316 (linux_wait_for_event): ... here and merge it with former
9317 linux_wait_for_event - new variable wait_ptid, use it.
9318 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9319
01b17894
PA
93202012-01-23 Pedro Alves <palves@redhat.com>
9321
9322 * server.c (main): Avoid yet another case of infinite loop while
9323 detaching/killing after a longjmp.
9324
e825046f
JK
93252012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9326
9327 Code cleanup.
9328 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9329
b9e7b9c3
UW
93302012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9331
9332 * hostio.c (handle_readlink): New function.
9333 (handle_vFile): Call it to handle "vFile:readlink" packets.
9334
901f9912
UW
93352012-01-20 Pedro Alves <palves@redhat.com>
9336 Ulrich Weigand <ulrich.weigand@linaro.org>
9337
9338 * server.c (handle_v_requests): Only support vAttach and vRun to
9339 start multiple processes when in extended protocol mode.
9340
fc1ab1a0
PA
93412012-01-17 Pedro Alves <palves@redhat.com>
9342
9343 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9344 memalign plus mprotect to allocate the scratch buffer.
9345
7d5d4e98
PA
93462012-01-13 Pedro Alves <palves@redhat.com>
9347
9348 * server.c (attach_inferior): Clear `cont_thread'.
9349
f128d5e9
PA
93502012-01-13 Pedro Alves <palves@redhat.com>
9351
9352 * server.c (main): Avoid infinite loop while detaching/killing
9353 after a longjmp.
9354
06db92f0
DE
93552012-01-09 Doug Evans <dje@google.com>
9356
9357 * server.c (start_inferior): Set last_ptid in --wrapper case.
9358
32d92999
YQ
93592012-01-06 Yao Qi <yao@codesourcery.com>
9360
9361 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9362 defined.
9363 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9364
5e0a92a9
YQ
93652012-01-04 Yao Qi <yao@codesourcery.com>
9366
9367 * tracepoint.c (cmd_qtdp): Print debug message
9368 for static tracepoint.
9369
ae639e8c
YQ
93702012-01-04 Yao Qi <yao@codesourcery.com>
9371
9372 * tracepoint.c (trace_vdebug): Differentiate debug message
9373 between gdbserver and IPA.
9374
f72429c5
YQ
93752012-01-03 Yao Qi <yao@codesourcery.com>
9376
9377 * tracepoint.c (tracepoint_was_hit): Don't collect for
9378 static tracepoint.
9379
12c3e59c
JB
93802012-01-02 Joel Brobecker <brobecker@adacore.com>
9381
9382 * terminal.h: Reformat copyright header.
9383
67827812
JB
93842012-01-02 Joel Brobecker <brobecker@adacore.com>
9385
9386 * server.c (gdbserver_version): Update copyright year.
9387 * gdbreplay.c (gdbreplay_version): Likewise.
9388
3e52c33d
JK
93892011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9390
9391 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9392
9393 Revert:
9394 2011-12-18 Hui Zhu <teawater@gmail.com>
9395 * linux-low.c (linux_create_inferior): Save return value to ret.
9396
66f1260e
HZ
93972011-12-18 Hui Zhu <teawater@gmail.com>
9398
9399 * linux-low.c (linux_create_inferior): Save return value to ret.
9400
e77616d7
DE
94012011-12-16 Doug Evans <dje@google.com>
9402
e7b06c57
DE
9403 * linux-low.c (linux_create_inferior): If stdio connection,
9404 redirect stdin from /dev/null, stdout to stderr.
9405 * remote-utils.c (remote_is_stdio): New static global.
9406 (remote_connection_is_stdio): New function.
9407 (remote_prepare): Handle stdio connection.
9408 (remote_open): Ditto.
9409 (remote_close): Don't close stdin for stdio connections.
9410 (read_prim,write_prim): New functions. Replace all calls to
9411 read/write to these.
9412 * server.c (main): Watch for "-" argument. Move call to
9413 remote_prepare before start_inferior.
9414 * server.h (STDIO_CONNECTION_NAME): New macro.
9415 (remote_connection_is_stdio): Declare.
9416
e77616d7
DE
9417 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9418 in debugging output.
9419
82067193
YQ
94202011-12-15 Yao Qi <yao@codesourcery.com>
9421
9422 * tracepoint.c: Include sys/syscall.h.
9423 (gdb_ust_thread): Remove preprocessor conditional.
9424
82bfbe7e
PA
94252011-12-14 Pedro Alves <pedro@codesourcery.com>
9426
9427 * linux-low.c (linux_detach_one_lwp): Call
9428 the_low_target.prepare_to_resume before detaching.
9429
712c6575
YQ
94302011-12-14 Yao Qi <yao@codesourcery.com>
9431
9432 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9433 of write.
9434
d54d1edf
YQ
94352011-12-14 Yao Qi <yao@codesourcery.com>
9436
9437 * i386-low.c (i386_low_stopped_data_address): Initialize local
9438 variable `control'.
9439
6210a125
PA
94402011-12-13 Pedro Alves <pedro@codesourcery.com>
9441
9442 PR remote/13492
9443
9444 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9445 DR_CONTROL unless necessary. Extend comments.
9446 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9447 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9448
2ece8244
YQ
94492011-12-13 Yao Qi <yao@codesourcery.com>
9450
9451 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9452 macros.
9453 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9454
784867a5
JK
94552011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9456
9457 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9458 Print new debug message for such case.
9459
6bf36717
JK
94602011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9461
9462 Fix overlapping memcpy.
9463 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9464 the read_inferior_memory transfer.
9465 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9466 write_inferior_memory transfer.
9467 (set_fast_tracepoint_jump): New variable buf. Use it for the
9468 read_inferior_memory and write_inferior_memory transfers.
9469 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9470 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9471 Use it for the write_inferior_memory transfer.
9472 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9473 buffers.
9474
50275556
MR
94752011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9476
9477 * linux-low.c (fetch_register, store_register): Make code
9478 consistent, fix formatting.
9479
7325beb4
MR
94802011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9481
9482 * linux-low.c (usr_store_inferior_registers): Factor out code
9483 to handle individual registers into...
9484 (store_register): ... this new function.
9485
c642a434
UW
94862011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9487
9488 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9489 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9490 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9491 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9492 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9493 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9494 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9495 (srv_xmlfiles): Add new XML files.
9496
9497 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9498 and <sys/uio.h>.
9499 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9500 (init_registers_s390_linux32v1): Add prototype.
9501 (init_registers_s390_linux32v2): Likewise.
9502 (init_registers_s390_linux64v1): Likewise.
9503 (init_registers_s390_linux64v2): Likewise.
9504 (init_registers_s390x_linux64v1): Likewise.
9505 (init_registers_s390x_linux64v2): Likewise.
9506 (s390_num_regs): Increment to 52.
9507 (s390_regmap): Add orig_r2 register.
9508 (s390_num_regs_3264): Increment to 68.
9509 (s390_regmap_3264): Add orig_r2 register.
9510 (s390_collect_ptrace_register): Handle orig_r2 register.
9511 (s390_supply_ptrace_register): Likewise.
9512 (s390_fill_last_break): New function.
9513 (s390_store_last_break): Likewise.
9514 (s390_fill_system_call): New function.
9515 (s390_store_system_call): Likewise.
9516 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9517 register sets.
9518 (s390_check_regset): New function.
9519 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9520 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9521 Update target_regsets for available register sets.
9522
2268b414
JK
95232011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9524 Jan Kratochvil <jan.kratochvil@redhat.com>
9525
9526 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9527 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9528 New.
9529 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9530 * linux-low.h (struct process_info_private): New member r_debug.
9531 * server.c (handle_qxfer_libraries): Call
9532 the_target->qxfer_libraries_svr4.
9533 (handle_qxfer_libraries_svr4): New function.
9534 (qxfer_packets): New entry "libraries-svr4".
9535 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9536 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9537 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9538 PACKET_qXfer_libraries_svr4.
9539
d6db1fab
UW
95402011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9541
9542 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9543 PSW address/mask between 8-byte and 16-byte formats.
9544 (s390_supply_ptrace_register): Likewise.
9545 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9546 basic addressing mode bit.
9547
242f5f1c
SS
95482011-11-24 Stan Shebs <stan@codesourcery.com>
9549
9550 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9551
f196051f
SS
95522011-11-17 Stan Shebs <stan@codesourcery.com>
9553
9554 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9555 (tracing_start_time): New global.
9556 (tracing_stop_time): New global.
9557 (tracing_user_name): New global.
9558 (tracing_notes): New global.
9559 (tracing_stop_note): New global.
9560 (cmd_qtstart): Set traceframe_usage, start_time.
9561 (stop_tracing): Set stop_time.
9562 (cmd_qtstatus): Report additional status.
9563 (cmd_qtp): New function.
9564 (handle_tracepoint_query): Call it.
9565 (cmd_qtnotes): New function.
9566 (handle_tracepoint_general_set): Call it.
9567 (get_timestamp): Rename from tsv_get_timestamp.
9568
405f8e94
SS
95692011-11-14 Stan Shebs <stan@codesourcery.com>
9570 Kwok Cheung Yeung <kcy@codesourcery.com>
9571
9572 * linux-x86-low.c (small_jump_insn): New.
9573 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9574 trampoline and error message, build a trampoline and issue a small
9575 jump instruction to it.
9576 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9577 trampoline and error message.
9578 (x86_get_min_fast_tracepoint_insn_len): New.
9579 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9580 * linux-low.h (struct linux_target_ops): Add arguments to
9581 install_fast_tracepoint_jump_pad operation, add new operation.
9582 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9583 arguments.
9584 (linux_get_min_fast_tracepoint_insn_len): New function.
9585 (linux_target_op): Add new operation.
9586 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9587 (gdb_trampoline_buffer_end): Ditto.
9588 (gdb_trampoline_buffer_error): Ditto.
9589 (struct ipa_sym_addresses): Add fields for new IPA variables.
9590 (symbol_list): Add entries for new IPA variables.
9591 (struct tracepoint): Add fields to hold the address range of the
9592 trampoline used by the tracepoint.
9593 (trampoline_buffer_head): New static variable.
9594 (trampoline_buffer_tail): Ditto.
9595 (claim_trampoline_space): New function.
9596 (have_fast_tracepoint_trampoline_buffer): New function.
9597 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9598 structure.
9599 (install_fast_tracepoint): Ditto, also add error buffer argument.
9600 (cmd_qtminftpilen): New function.
9601 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9602 (fast_tracepoint_from_trampoline_address): New function.
9603 (fast_tracepoint_collecting): Handle trampoline as part of jump
9604 pad space.
9605 (set_trampoline_buffer_space): New function.
9606 (initialize_tracepoint): Initialize new IPA variables.
9607 * target.h (struct target_ops): Add arguments to
9608 install_fast_tracepoint_jump_pad operation, add new
9609 get_min_fast_tracepoint_insn_len operation.
9610 (target_get_min_fast_tracepoint_insn_len): New.
9611 (install_fast_tracepoint_jump_pad): Add arguments.
9612 * server.h (IPA_BUFSIZ): Define.
9613 * linux-i386-ipa.c: Include extra header files.
9614 (initialize_fast_tracepoint_trampoline_buffer): New function.
9615 (initialize_low_tracepoint): Call it.
9616 * server.h (set_trampoline_buffer_space): Declare.
9617 (claim_trampoline_space): Ditto.
9618 (have_fast_tracepoint_trampoline_buffer): Ditto.
9619
1e4d1764
YQ
96202011-11-14 Yao Qi <yao@codesourcery.com>
9621
9622 * server.c (handle_query): Handle InstallInTrace for qSupported.
9623 * tracepoint.c (add_tracepoint): Sort list.
9624 (install_tracepoint, download_tracepoint): New.
9625 (cmd_qtdp): Call them to install and download tracepoints.
9626 (sort_tracepoints): Removed.
9627 (cmd_qtstart): Update.
9628
5c73ff4e
YQ
96292011-11-14 Yao Qi <yao@codesourcery.com>
9630
9631 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9632 * mem-break.h: Declare.
9633 * tracepoint.c (cmd_qtstart): Move some code to ...
9634 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9635 New.
9636 (download_tracepoints): Move some code to ...
9637 (download_tracepoint_1): ... here. New.
9638
86a30030
YQ
96392011-11-08 Yao Qi <yao@codesourcery.com>
9640
9641 * remote-utils.c (relocate_instruction): A comment fix.
9642
8d26e50c
JB
96432011-11-07 Joel Brobecker <brobecker@adacore.com>
9644
9645 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9646 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9647 dr_status_mirror and dr_control_mirror from debug_reg_state.
9648 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9649 (i386_initial_stuff): Remove use of deleted globals.
9650 (i386_get_thread_context, i386_set_thread_context,
9651 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9652 from debug_reg_state.
9653
a59306a3
YQ
96542011-11-05 Yao Qi <yao@codesourcery.com>
9655
9656 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9657 address as TPOINT's.
9658
3065dfb6
SS
96592011-11-02 Stan Shebs <stan@codesourcery.com>
9660
9661 * tracepoint.c (agent_mem_read_string): New function.
9662 (eval_agent_expr): Call it for tracenz.
9663 * server.c (handle_query): Report support for tracenz.
9664
fd0d8c7c
YQ
96652011-11-02 Yao Qi <yao@codesourcery.com>
9666
9667 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9668
609086b1
YQ
96692011-11-02 Yao Qi <yao@codesourcery.com>
9670
9671 * target.h: Fix a typo in comment.
9672
b9fd1791
PA
96732011-10-31 Pedro Alves <pedro@codesourcery.com>
9674
9675 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9676 clobber the breakpoints' shadows with fast tracepoint jumps.
9677 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9678 * target.c (write_inferior_memory): Also pass MYADDR down to
9679 check_mem_write.
9680
03583c20
UW
96812011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9682
9683 * configure.ac: Check support for personality routine.
9684 * configure: Regenerate.
9685 * config.in: Likewise.
9686 * linux-low.c: Include <sys/personality.h>.
9687 Define ADDR_NO_RANDOMIZE if necessary.
9688 (linux_create_inferior): Disable address space randomization when
9689 forking inferior, if requested.
9690 (linux_supports_disable_randomization): New function.
9691 (linux_target_ops): Install it.
9692 * server.h (disable_randomization): Declare.
9693 * server.c (disable_randomization): New global variable.
9694 (handle_general_set): Handle QDisableRandomization.
9695 (handle_query): Likewise for qSupported.
9696 (main): Support --disable-randomization and --no-disable-randomization
9697 command line arguments.
9698 * target.h (struct target_ops): Add supports_disable_randomization.
9699 (target_supports_disable_randomization): New macro.
9700
723b724b
MF
97012011-09-29 Mike Frysinger <vapier@gentoo.org>
9702
9703 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9704 ifdef check.
9705 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9706 [!PT_GETDSBT] (target_loadmap): New definition.
9707 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9708 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9709 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9710 and PT_GETDSBT to LINUX_LOADMAP.
9711 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9712 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9713
55329a5c 97142011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
9715
9716 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9717 (arm_linux_hwbp_cap): New static variable.
9718 (arm_linux_get_hwbp_cap): Replace by ...
9719 (arm_linux_init_hwbp_cap): ... this new function.
9720 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9721 (arm_linux_get_hw_watchpoint_count): Likewise.
9722 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9723 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9724 (arm_prepare_to_resume): Use perror_with_name instead of error.
9725
55329a5c 97262011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
9727
9728 * linux-arm-low.c: Include <signal.h>.
9729 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9730 (struct arm_linux_hwbp_cap): New data type.
9731 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9732 (struct arm_linux_hw_breakpoint): New data type.
9733 (MAX_BPTS, MAX_WPTS): Define.
9734 (struct arch_process_info, struct arch_lwp_info): New data types.
9735 (arm_linux_get_hwbp_cap): New function.
9736 (arm_linux_get_hw_breakpoint_count): Likewise.
9737 (arm_linux_get_hw_watchpoint_count): Likewise.
9738 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9739 (arm_hwbp_control_initialize): Likewise.
9740 (arm_hwbp_control_is_enabled): Likewise.
9741 (arm_hwbp_control_is_initialized): Likewise.
9742 (arm_hwbp_control_disable): Likewise.
9743 (arm_linux_hw_breakpoint_equal): Likewise.
9744 (arm_linux_hw_point_initialize): Likewise.
9745 (struct update_registers_data): New data structure.
9746 (update_registers_callback: New function.
9747 (arm_insert_point): Likewise.
9748 (arm_remove_point): Likewise.
9749 (arm_stopped_by_watchpoint): Likewise.
9750 (arm_stopped_data_address): Likewise.
9751 (arm_new_process): Likewise.
9752 (arm_new_thread): Likewise.
9753 (arm_prepare_to_resume): Likewise.
9754 (the_low_target): Register arm_insert_point, arm_remove_point,
9755 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9756 arm_new_thread, and arm_prepare_to_resume.
9757
6b9801d4
SS
97582011-09-15 Stan Shebs <stan@codesourcery.com>
9759
9760 * server.h (struct emit_ops): Add compare-goto fields.
9761 * tracepoint.c (gdb_agent_op_sizes): New table.
9762 (emit_eq_goto): New function.
9763 (emit_ne_goto): New function.
9764 (emit_lt_goto): New function.
9765 (emit_le_goto): New function.
9766 (emit_gt_goto): New function.
9767 (emit_ge_goto): New function.
9768 (is_goto_target): New function.
9769 (compile_bytecodes): Recognize special cases of compare-goto
9770 combinations and call specialized emitters for them.
9771 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9772 (amd64_emit_ne_goto): New function.
9773 (amd64_emit_lt_goto): New function.
9774 (amd64_emit_le_goto): New function.
9775 (amd64_emit_gt_goto): New function.
9776 (amd64_emit_ge_goto): New function.
9777 (amd64_emit_ops): Add the new functions.
9778 (i386_emit_eq_goto): New function.
9779 (i386_emit_ne_goto): New function.
9780 (i386_emit_lt_goto): New function.
9781 (i386_emit_le_goto): New function.
9782 (i386_emit_gt_goto): New function.
9783 (i386_emit_ge_goto): New function.
9784 (i386_emit_ops): Add the new functions.
9785
bf15cbda
SS
97862011-09-08 Stan Shebs <stan@codesourcery.com>
9787
9788 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9789 (i386_emit_epilogue): Restore %ebx.
9790
943ca1dd
JZ
97912011-08-31 Jie Zhang <jzhang918@gmail.com>
9792
9793 * server.c (step_thread): Remove definition.
9794 (process_serial_event): Don't handle Hs.
9795 * server.h (step_thread): Remove declaration.
9796 * target.c (set_desired_inferior): Remove use of step_thread.
9797
e3deef73
LM
97982011-08-24 Luis Machado <lgustavo@codesourcery.com>
9799
9800 * linux-low.c: Include linux-procfs.h.
9801 (linux_attach_lwp_1): Update comments.
9802 (linux_attach): Scan for existing threads when attaching to a
9803 process that is the tgid.
9804 * Makefile.in: Update dependencies.
9805
13da1c97
LM
98062011-08-24 Luis Machado <lgustavo@codesourcery.com>
9807
9808 * configure.srv: Add linux-procfs.o dependencies.
9809
881127c9
YQ
98102011-08-14 Yao Qi <yao@codesourcery.com>
9811
9812 * target.h (struct target_ops): Fix indent.
9813 * win32-low.c (win32_target_ops): Fix comment.
9814
58dbd541
YQ
98152011-08-14 Andrew Jenner <andrew@codesourcery.com>
9816 Yao Qi <yao@codesourcery.com>
9817
9818 * Makefile.in (clean): Remove tic6x-*.c files.
9819 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9820 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9821 (tic6x-c64xp-linux.c): Likewise.
9822 * configure.srv: Add support for tic6x-*-uclinux.
9823 * linux-tic6x-low.c: New.
9824 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9825
78d85199
YQ
98262011-08-14 Andrew Stubbs <ams@codesourcery.com>
9827 Yao Qi <yao@codesourcery.com>
9828
9829 * target.h (struct target_ops): Add read_loadmap.
9830 * linux-low.c (struct target_loadseg): New type.
9831 (struct target_loadmap): New type.
9832 (linux_read_loadmap): New function.
9833 (linux_target_ops): Add linux_read_loadmap.
9834 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
9835 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9836 to NULL.
78d85199 9837
a959a88d
EZ
98382011-08-05 Eli Zaretskii <eliz@gnu.org>
9839
9840 * win32-low.c: Include <stdint.h>.
9841
1ced966e
PA
98422011-07-22 Pedro Alves <pedro@codesourcery.com>
9843
9844 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9845 to the inferior here.
9846 (i386_remove_aligned_watchpoint): Ditto.
9847 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9848 fit part of the watchpoint in the debug registers.
9849 (i386_update_inferior_debug_regs): New.
9850 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9851 registers, and only update the inferior on success.
9852 (i386_low_remove_watchpoint): Ditto.
9853
d26e3629
KY
98542011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9855
9856 * linux-low.c (compare_ints, unique, list_threads, show_process,
9857 linux_core_of_thread): Delete.
9858 (linux_target_ops): Change linux_core_of_thread to
9859 linux_common_core_of_thread.
9860 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9861 * utils.c (malloc_failure): Change type of argument.
9862 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9863 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9864 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9865 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9866 (IPA_OBJS): Add common-utils-ipa.o.
9867 (ptid_h, linux_osdata_h): New macros.
9868 (server_h): Add common/common-utils.h, common/xml-utils.h,
9869 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9870 common/ptid.h.
9871 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9872 ptid.o, buffer.o): New rules.
9873 (linux-low.o): Add common/linux-osdata.h as a dependency.
9874 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9875 * configure.ac: Add AC_HEADER_DIRENT check.
9876 * config.in: Regenerate.
9877 * configure: Regenerate.
9878 * remote-utils.c (xml_escape_text): Delete.
9879 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9880 buffer_xml_printf): Move to common/buffer.c.
9881 * server.c (main): Remove call to initialize_inferiors.
9882 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9883 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9884 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9885 internal_error, gdb_assert, gdb_assert_fail): Delete.
9886 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9887 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9888 common/buffer.h.
9889 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9890 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9891 initialize_inferiors): Delete.
9892
2275a1a7
PA
98932011-07-20 Pedro Alves <pedro@codesourcery.com>
9894
9895 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9896 symbol error.
9897
0a5b1e09
PA
98982011-05-31 Pedro Alves <pedro@codesourcery.com>
9899
9900 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9901 assertion.
9902 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9903
6938fd34
YQ
99042011-05-26 Yao Qi <yao@codesourcery.com>
9905
9906 * Makefile.in (thread-db.o): Track dependence to
9907 common/gdb_thread_db.h.
9908 * thread-db.c: include gdb_thread_db.h from right place.
9909
b481f9e0
TT
99102011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9911
9912 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9913 __FILE__ and __LINE__ to internal_error.
9914
98a5dd13
DE
99152011-05-13 Doug Evans <dje@google.com>
9916
9917 * thread-db.c (try_thread_db_load_from_sdir): New function.
9918 (try_thread_db_load_from_dir): New function.
9919 (thread_db_load_search): Handle $sdir, ignore $pdir.
9920 Remove trying of system directories if search of
9921 libthread-db-search-path fails, that is now done via $sdir.
9922
d248b706
KY
99232011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9924
9925 * server.c (handle_query): Add EnableDisableTracepoints to the list
9926 of supported features.
43aaf8b6 9927 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 9928 tracepoints.
43aaf8b6
PA
9929 (cmd_qtenable_disable): New.
9930 (cmd_qtstart): Install tracepoints even if disabled.
9931 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9932 receiving a QTEnable or QTDisable packet.
9933 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9934 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9935 tracepoints.
9936 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 9937
84e578fb
DE
99382011-05-10 Doug Evans <dje@google.com>
9939
9940 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9941
71f55dd8
DE
99422011-05-04 Doug Evans <dje@google.com>
9943
9944 * linux-low.c (linux_join): Skip process lookup.
9945 * spu-low.c (spu_join): Ditto.
9946 * server.c (join_inferiors_callback): Delete.
9947 (process_serial_event): For 'D' packet (detach) call join_inferior
9948 directly.
9949
4d393d60
JM
99502011-05-04 Joseph Myers <joseph@codesourcery.com>
9951
9952 * README: Don't mention xscale*-*-linux*.
9953 * configure.srv (xscale*-*-linux*): Don't handle target.
9954
b00ad6ff
NF
99552011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9956
9957 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9958 casting pointers.
9959 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9960 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9961 (i386_emit_void_call_2): Likewise.
9962
af96c192
YQ
99632011-04-26 Yao Qi <yao@codesourcery.com>
9964
43aaf8b6
PA
9965 * linux-low.c: Move common macros to linux-ptrace.h.
9966 Include linux-ptrace.h.
af96c192
YQ
9967 * Makefile.in (linux_ptrace_h): New.
9968 (linux-low.o): Depends on linux-ptrace.h.
9969
03f2bd59
JK
99702011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9971
9972 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9973 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9974 (remote_prepare): New function with most of the TCP code from ...
9975 (remote_open): ... here. Detect PORT here unconditionally. Move also
9976 setting transport_is_reliable.
9977 * server.c (run_once): New variable.
9978 (gdbserver_usage): Document it.
9979 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9980 the first run if RUN_ONCE.
9981 * server.h (run_once, remote_prepare): New declarations.
9982
7a9dd1b2
TT
99832011-04-19 Tom Tromey <tromey@redhat.com>
9984
9985 * win32-low.c (handle_load_dll): Remove duplicate "the".
9986
81239425
PM
99872011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9988
9989 Remove support for old Cygwin 1.5 versions.
9990 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9991 function to avoid warning.
9992 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9993 warning.
9994
9e0627f1
PM
99952011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9996
9997 * gdbserver/server.h (Macro _): Define it if not available.
9998
588eebee
MS
99992011-03-14 Michael Snyder <msnyder@vmware.com>
10000
348af9f7 10001 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 10002
43f70d4c
JB
100032011-03-10 Joel Brobecker <brobecker@adacore.com>
10004
10005 * Makefile.in (maintainer-clean realclean distclean): Remove
10006 "make ... subdir_do" command.
10007
348af9f7
MS
100082011-03-10 Michael Snyder <msnyder@vmware.com>
10009
10010 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10011
10012 * server.c (handle_v_run): Free alloced buffer on early return.
10013
e637a4f5
YQ
100142011-03-09 Yao Qi <yao@codesourcery.com>
10015
10016 Revert:
10017 2011-03-04 Yao Qi <yao@codesourcery.com>
10018
10019 * Makefile.in: Remove GNU make feature --directory.
10020
10021 2011-03-05 Yao Qi <yao@codesourcery.com>
10022
10023 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10024 (subdir_do): New make target. Copied from gdb/Makefile.
10025 (maintainer-clean, realclean, distclean, clean): Call corresponding
10026 make targets in common/Makefile.
10027
10028 2011-02-11 Yao Qi <yao@codesourcery.com>
10029
10030 * configure.ac: Call AC_PROG_RANLIB.
10031 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10032 * configure: Regenerate.
10033
e6edda56
JK
100342011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10035
10036 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10037
e5141119
JB
100382011-03-06 Yao Qi <yao@codesourcery.com>
10039
10040 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10041
64794aa4
JB
100422011-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
7a762829
YQ
100492011-03-04 Yao Qi <yao@codesourcery.com>
10050
10051 * Makefile.in: Remove GNU make feature --directory.
10052
348af9f7
MS
100532011-03-04 Michael Snyder <msnyder@vmware.com>
10054
10055 * server.c (queue_stop_reply): Call xmalloc not malloc.
10056
100572011-03-02 Michael Snyder <msnyder@vmware.com>
10058
10059 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10060
9f72fee2
MS
100612011-02-28 Michael Snyder <msnyder@vmware.com>
10062
588eebee
MS
10063 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10064 (cmd_qtframe): Ditto.
10065 (cmd_qtbuffer): Ditto.
10066 (cmd_bigqtbuffer): Ditto.
10067
9f72fee2
MS
10068 * utils.c (decimal2str): Initialize 'width' to nine, then
10069 don't mess with it.
10070
8040bd49
UW
100712011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10072
10073 * hostio.c (require_data): Free *data, not data.
10074
7e52cbd0
JK
100752011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10076
10077 * hostio.c (require_data): Use free, not xfree.
10078
9130f83e
MS
100792011-02-27 Michael Snyder <msnyder@vmware.com>
10080
4b812f4e
MS
10081 * server.c (handle_query): Discard unused value.
10082
9130f83e
MS
10083 * hostio.c (require_data): Free malloc memory before returning
10084 error.
10085
69d37113
MS
100862011-02-26 Michael Snyder <msnyder@vmware.com>
10087
10088 * linux-low.c (list_threads): Call closedir for dirent.
10089
35f5825a
MS
100902011-02-27 Michael Snyder <msnyder@vmware.com>
10091
2a589cef
MS
10092 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10093 a case statement falls through.
10094
0adea5f7
MS
10095 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10096
35f5825a
MS
10097 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10098 in comparison.
10099
238f1c74
MS
101002011-02-26 Michael Snyder <msnyder@vmware.com>
10101
10102 * utils.c (decimal2str): Eliminate dead code and dead param.
10103 (pulongest): Drop dead param from call to decimal2str.
10104 (plongest): Ditto.
10105
633ff500
JB
101062011-02-24 Joel Brobecker <brobecker@adacore.com>
10107
10108 Revert the following patch (not approved yet):
10109 2011-02-21 Hui Zhu <teawater@gmail.com>
10110 * tracepoint.c (tp_printf): New function.
10111 (eval_agent_expr): Handle gdb_agent_op_printf.
10112
f9c6ff72
HZ
101132011-02-21 Hui Zhu <teawater@gmail.com>
10114
10115 * tracepoint.c (tp_printf): New function.
10116 (eval_agent_expr): Handle gdb_agent_op_printf.
10117
94d5e490
TT
101182011-02-18 Tom Tromey <tromey@redhat.com>
10119
10120 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10121 (tracepoint.o): Likewise.
10122 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10123 (gdb_agent_op_names): Likewise.
10124
c7f96d2b
TT
101252011-02-18 Tom Tromey <tromey@redhat.com>
10126
10127 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10128 gdb_agent_op_rot>: New constants.
10129 (gdb_agent_op_names): Add pick and roll.
10130 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10131 cases.
10132
0feedb2c
JK
101332011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10134
10135 * aclocal.m4: Regenerated with aclocal-1.11.1.
10136
b3b9301e
PA
101372011-02-14 Pedro Alves <pedro@codesourcery.com>
10138
10139 * server.c (handle_qxfer_traceframe_info): New.
10140 (qxfer_packets): Register "traceframe-info".
10141 (handle_query): Report support for qXfer:traceframe-info:read+.
10142 * tracepoint.c (match_blocktype): New.
10143 (traceframe_find_block_type): Rename to ...
10144 (traceframe_walk_blocks): ... this. Add callback filter argument,
10145 and use it.
10146 (traceframe_find_block_type): New, reimplemented on top of
10147 traceframe_walk_blocks.
10148 (build_traceframe_info_xml): New.
10149 (traceframe_read_info): New.
10150 * server.h (traceframe_read_info): Declare.
10151
4f3e6fb7
YQ
101522011-02-11 Yao Qi <yao@codesourcery.com>
10153
10154 * configure.ac: Call AC_PROG_RANLIB.
10155 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10156 * configure: Regenerate.
10157
764880b7
PA
101582011-02-07 Pedro Alves <pedro@codesourcery.com>
10159
10160 * server.c (gdb_read_memory): Change return semantics to allow
10161 partial transfers.
10162 (handle_search_memory_1): Adjust.
10163 (process_serial_event) <'m' packet>: Handle partial transfers.
10164 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10165
1c79eb8a
PA
101662011-01-28 Pedro Alves <pedro@codesourcery.com>
10167
10168 * regcache.c (init_register_cache): Initialize
10169 regcache->register_status.
10170 (free_register_cache): Release regcache->register_status.
10171 (regcache_cpy): Copy register_status.
10172 (registers_to_string): Print 'x's for unavailable registers.
10173 (supply_register): Mark the register's status valid or
10174 unavailable, depending on whether a buffer was passed in or not.
10175 (supply_register_zeroed): New.
10176 (supply_regblock): Mark the registers' status valid or
10177 unavailable, depending on whether a buffer was passed in or not.
10178 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10179 (struct regcache): New `register_status' field.
10180 (supply_register_zeroed): Declare.
10181 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10182 supply_register_zeroed, rather than passing a NULL buffer to
10183 supply_register.
10184 * tracepoint.c (fetch_traceframe_registers): Update comment.
10185
85724a0e
PA
101862011-01-28 Pedro Alves <pedro@codesourcery.com>
10187
10188 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10189 buffer explicit.
10190
d08aafef
PA
101912011-01-25 Pedro Alves <pedro@codesourcery.com>
10192
10193 * server.h (decode_xfer_write): Change prototype.
10194 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10195 and don't extract the annex here.
10196 * server.c (decode_xfer_read): Remove `annex' parameter,
10197 and don't extract the annex here.
10198 (decode_xfer): New.
10199 (struct qxfer): New.
10200 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10201 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10202 (handle_qxfer_statictrace): New functions, abstracted out from
10203 handle_query, and made to use the struct qxfer interface.
10204 (handle_threads_qxfer_proper): Rename to ...
10205 (handle_qxfer_threads_proper): ... this.
10206 (handle_threads_qxfer): Rename to ...
10207 (handle_qxfer_threads): ... this. Adjust.
10208 (qxfer_packets): New array.
10209 (handle_qxfer): New function.
10210 (handle_query): Use handle_qxfer.
10211
493e2a69
MS
102122011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10213
10214 * gdbreplay.c: Shorten lines of >= 80 columns.
10215 * linux-low.c: Ditto.
10216 * linux-ppc-low.c: Ditto.
10217 * linux-s390-low.c: Ditto.
10218 * linux-sparc-low.c: Ditto.
10219 * linux-x86-low.c: Ditto.
10220 * linux-xtensa-low.c: Ditto.
10221 * mem-break.c: Ditto.
10222 * nto-low.c: Ditto.
10223 * regcache.h: Ditto.
10224 * remote-utils.c: Ditto.
10225 * server.c: Ditto.
10226 * server.h: Ditto.
10227 * thread-db.c: Ditto.
10228 * tracepoint.c: Ditto.
10229 * utils.c: Ditto.
10230 * win32-low.h: Ditto.
10231
44944448
JB
102322011-01-05 Joel Brobecker <brobecker@adacore.com>
10233
10234 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10235 update.
10236
71ce852c
JB
102372011-01-01 Joel Brobecker <brobecker@adacore.com>
10238
10239 * server.c (gdbserver_version): Update copyright year in version
10240 output.
10241 * gdbreplay.c (gdbreplay_version): Ditto.
10242
eb826dc6
MF
102432010-12-29 Jie Zhang <jie.zhang@analog.com>
10244
10245 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10246 * linux-bfin-low.c: New file.
10247 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10248 PT_DATA_ADDR for BFIN targets.
10249 * Makefile.in (SFILES): Add linux-bfin-low.c.
10250 (clean): Remove reg-bfin.c.
10251 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10252 * README: Mention supported Blackfin targets.
10253
39ab222a
MF
102542010-12-23 Mike Frysinger <vapier@gentoo.org>
10255
10256 * .gitignore: New file.
10257
a1f2ce7d
MF
102582010-11-16 Mike Frysinger <vapier@gentoo.org>
10259
10260 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10261
f474844c
JZ
102622010-10-22 Jie Zhang <jie@codesourcery.com>
10263
10264 * Makefile.in: Add FLAGS_TO_PASS variable.
10265 (install): Remove dependency of install-only and recursively
10266 invoke make for install-only.
10267
f1048712
DE
102682010-10-04 Doug Evans <dje@google.com>
10269
10270 * Makefile.in (uninstall): Use $(DESTDIR).
10271
b53a1623
PA
102722010-09-24 Pedro Alves <pedro@codesourcery.com>
10273
e6ee044d
PA
10274 PR gdb/11842
10275
b53a1623
PA
10276 * linux-x86-low.c (compat_siginfo_from_siginfo)
10277 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10278 si_code is < 0. Check for si_code == SI_TIMER before checking for
10279 si_code < 0.
10280
fa1bd1e4
JB
102812010-09-13 Joel Brobecker <brobecker@adacore.com>
10282
10283 * lynx-i386-low.c: New file.
10284 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10285
47fac8f8
JB
102862010-09-13 Joel Brobecker <brobecker@adacore.com>
10287
10288 * lynx-low.c (ptrace_request_to_str): Remove handling for
10289 request values that have been removed in LynxOS 5.x.
10290
1adfc54d
JB
102912010-09-13 Joel Brobecker <brobecker@adacore.com>
10292
10293 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10294 <ptrace.h>
10295
c2a66c29
NS
102962010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10297
10298 * configure.ac: Add --enable-inprocess-agent option.
10299 * configure: Rebuilt.
10300
32fcada3
YQ
103012010-09-06 Yao Qi <yao@codesourcery.com>
10302
10303 * linux-low.c (linux_kill): Remove unused variable.
10304 (linux_stabilize_threads): Likewise.
10305 * server.c (start_inferior): Likewise.
10306 (queue_stop_reply_callback): Likewise.
10307 * tracepoint.c (do_action_at_tracepoint): Likewise.
10308
0cccb683
YQ
103092010-09-06 Yao Qi <yao@codesourcery.com>
10310
10311 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10312 on return.
10313
423ec54c
JK
103142010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10315
10316 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10317
12ac6819
PA
103182010-09-06 Pedro Alves <pedro@codesourcery.com>
10319
10320 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10321 "$(IPA_DEPFILES)".
10322
8ed54b31
JB
103232010-09-01 Joel Brobecker <brobecker@adacore.com>
10324
10325 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10326 gdbserver/lynx-ppc-low.c: New files.
10327 * Makefile.in (lynx_low_h): New variable.
10328 (lynx-low.o, lynx-ppc-low.o): New rules.
10329 * configure.ac: On LynxOS, link with -lnetinet.
10330 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10331 * configure: regenerate.
10332
bb0116a4
JB
103332010-09-01 Joel Brobecker <brobecker@adacore.com>
10334
10335 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10336 * configure.ac: Add check for vasprintf and vsnprintf.
10337 * configure, config.in: Regenerate.
10338 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10339
a778ab81 103402010-09-01 Joel Brobecker <brobecker@adacore.com>
10341
10342 * gdbreplay.c: Move include of alloca.h up, next to include of
10343 malloc.h.
10344 * server.h: Add include of malloc.h.
10345 * mem-break.c: Remove include of malloc.h.
10346 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10347
8b034a19 103482010-09-01 Joel Brobecker <brobecker@adacore.com>
10349
10350 * Makefile.in (memmem.o): Build with -Wno-error.
10351
103522010-09-01 Joel Brobecker <brobecker@adacore.com>
10353
10354 * utils.c (xsnprintf): Make non-static.
10355 * server.h: Add xsnprintf declaration.
10356 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10357 replace calls to snprintf by calls to xsnprintf throughout.
10358
103592010-09-01 Joel Brobecker <brobecker@adacore.com>
10360
10361 * configure.ac: Add configure check for alloca.
10362 * configure, config.in: Regenerate.
10363 * server.h: Include alloca.h if it exists.
10364 * gdbreplay.c: Include alloca.h if it exists.
10365
1a981360
PA
103662010-08-28 Pedro Alves <pedro@codesourcery.com>
10367
10368 * linux-low.c (__SIGRTMIN): Define if not already defined.
10369 (linux_create_inferior): Check for __ANDROID__ rather than
10370 __SIGRTMIN.
10371 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10372 are already deferred.
10373 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10374 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10375 stopped and already has a pending signal to report.
10376 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10377 a pending signal to report or is moving out of a jump pad.
10378 (linux_init_signals): Check for __ANDROID__ rather than
10379 __SIGRTMIN.
10380
b4d51a55
PA
103812010-08-28 Pedro Alves <pedro@codesourcery.com>
10382
10383 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10384 debug_threads check. Avoid a linear search when not doing debug
10385 output.
10386
ec48365d
PA
103872010-08-27 Pedro Alves <pedro@codesourcery.com>
10388
10389 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10390 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10391 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10392 (process_event): Change local fd's type to gdb_fildes_t.
10393 (create_file_handler): Adjust prototype.
10394 (delete_file_handler): Adjust prototype.
10395 (handle_file_event): Adjust prototype. Use pfildes.
10396 (create_file_event): Adjsut prototype.
10397 * remote-utils.c (remote_desc, listen_desc): Change type to
10398 gdb_fildes_t.
10399 * server.h: New gdb_fildes_t typedef.
10400 [USE_WIN32API]: Include winsock2.h.
10401 (delete_file_handler, add_file_handler): Adjust prototypes.
10402 (pfildes): Declare.
10403 * utils.c (pfildes): New.
10404
854d88f0
PA
104052010-08-27 Pedro Alves <pedro@codesourcery.com>
10406
10407 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10408 * configure: Regenerate.
10409
0146f85b
PA
104102010-08-27 Pedro Alves <pedro@codesourcery.com>
10411
10412 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10413 (linux_done_accessing_memory): ... this.
10414 (linux_target_ops): Adjust.
10415 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10416 * nto-low.c (nto_target_ops): Adjust comment.
10417 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10418 * spu-low.c (spu_target_ops): Adjust comment.
10419 * target.h (target_ops): Rename unprepare_to_access_memory field
10420 to done_accessing_memory.
10421 (unprepare_to_access_memory): Rename to ...
10422 (done_accessing_memory): ... this.
10423
90d74c30
PA
104242010-08-26 Pedro Alves <pedro@codesourcery.com>
10425
10426 * linux-low.c (linux_prepare_to_access_memory): New.
10427 (linux_unprepare_to_access_memory): New.
10428 (linux_target_ops): Install them.
10429 * server.c (read_memory): Rename to ...
10430 (gdb_read_memory): ... this. Use
10431 prepare_to_access_memory/prepare_to_access_memory.
10432 (write_memory): Rename to ...
10433 (gdb_write_memory): ... this. Use
10434 prepare_to_access_memory/prepare_to_access_memory.
10435 (handle_search_memory_1): Adjust.
10436 (process_serial_event): Adjust.
10437 * target.h (struct target_ops): New fields
10438 prepare_to_access_memory and unprepare_to_access_memory.
10439 (prepare_to_access_memory, unprepare_to_access_memory): New.
10440 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10441 prepare_to_access_memory/prepare_to_access_memory.
10442 * nto-low.c (nto_target_ops): Adjust.
10443 * spu-low.c (spu_target_ops): Adjust.
10444 * win32-low.c (win32_target_ops): Adjust.
10445
fd467969
PA
104462010-08-26 Pedro Alves <pedro@codesourcery.com>
10447
10448 * Makefile.in (WARN_CFLAGS): Get it from configure.
10449 (WERROR_CFLAGS): New.
10450 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10451 * configure.ac: Introduce --enable-werror, which adds -Werror to
10452 the compiler command line. Enabled by default. Disable with
10453 --disable-werror. Add -Wdeclaration-after-statement
10454 Wpointer-arith and -Wformat-nonliteral to warning flags.
10455 * configure: Regenerate.
10456
331e2f5f
PA
104572010-08-26 Pedro Alves <pedro@codesourcery.com>
10458
10459 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10460
e581f2b4
PA
104612010-08-26 Pedro Alves <pedro@codesourcery.com>
10462
10463 * gdbreplay.c (remote_error): New.
10464 (gdbchar): New.
10465 (expect): Use gdbchar. Check for error reading from GDB.
10466 Clarify sync error output.
10467 (play): Check for errors writing to GDB.
10468 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10469 * remote-utils.c (getpkt): Check for errors writing to the remote
10470 descriptor.
10471
3c11dd79
PA
104722010-08-25 Pedro Alves <pedro@codesourcery.com>
10473
10474 * linux-low.c (linux_wait_1): Move non-debugging code out of
10475 `debug_threads' control.
10476
d20a8ad9
PA
104772010-08-25 Pedro Alves <pedro@codesourcery.com>
10478
10479 * linux-low.c (linux_wait_1): Don't set last_status here.
10480 * server.c (push_event, queue_stop_reply_callback): Assert we're
10481 not pushing a TARGET_WAITKIND_IGNORE event.
10482 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10483 (myresume, handle_target_event): Set the thread's last_resume_kind
10484 and last_status from the target returned status.
10485
964e4306
PA
104862010-08-25 Pedro Alves <pedro@codesourcery.com>
10487
10488 PR threads/10729
10489
10490 * linux-x86-low.c (update_debug_registers_callback): New.
10491 (i386_dr_low_set_addr): Use it.
10492 (i386_dr_low_get_addr): New.
10493 (i386_dr_low_set_control): Use update_debug_registers_callback.
10494 (i386_dr_low_get_control): New.
10495 (i386_dr_low_get_status): Adjust.
10496 * linux-low.c (linux_stop_lwp): New.
10497 * linux-low.h (linux_stop_lwp): Declare.
10498
10499 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10500 argument instead of a i386_debug_reg_state.
10501 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10502 a i386_debug_reg_state.
10503 (i386_insert_aligned_watchpoint): Adjust.
10504 (i386_remove_aligned_watchpoint): Adjust.
10505 (i386_low_stopped_data_address): Read the debug registers from the
10506 inferior instead of from the mirrors.
10507 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10508 (i386_dr_low_get_addr): Declare.
10509 (i386_dr_low_get_control): Declare.
10510 (i386_dr_low_get_status): Change prototype.
10511
10512 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10513 (i386_dr_low_get_addr): New.
10514 (i386_dr_low_get_control): New.
10515 (i386_dr_low_get_status): Adjust prototype. Return
10516 dr_status_mirror.
10517 (i386_initial_stuff): Clear dr_status_mirror and
10518 dr_control_mirror.
10519 (i386_get_thread_context): Adjust.
10520 (i386_set_thread_context): Adjust.
10521 (i386_thread_added): Adjust.
10522
5f21a75b
PA
105232010-08-24 Pedro Alves <pedro@codesourcery.com>
10524
10525 * linux-low.h (linux_thread_area): Delete declaration.
10526
3e4c1235
TS
105272010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10528
10529 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10530 after its termination.
10531
1971b033
PA
105322010-08-09 Pedro Alves <pedro@codesourcery.com>
10533
10534 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10535 (gdb_wants_all_stopped): Delete.
10536 (linux_wait_1): Don't call them.
10537 * server.c (handle_v_cont): Tag all threads as want-stopped.
10538 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10539 stopped as "client-wants-stopped".
10540
310444ac
PA
105412010-07-31 Pedro Alves <pedro@codesourcery.com>
10542
10543 * Makefile.in (signals_h): New.
10544 (server_h): Depend on it.
10545 (server.o): Don't depend on $(signals_def).
10546 (signals.o): Depend on $(signals_def).
10547
a19cae16
JK
105482010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10549
10550 * Makefile.in (signals_def): New.
10551 (server_h): Append include/gdb/signals.h and signals_def.
10552 (server.o): Append signals_def.
10553
30d50328
JK
105542010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10555
10556 * server.c (handle_target_event): Use target_signal_to_host for
10557 resume_info.sig initialization.
10558 * target.h (struct thread_resume) <sig>: New comment.
10559
5c3216e2
OS
105602010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10561
c6f46ca0
OS
10562 * server.c (handle_query): strcpy() the returned string from paddress()
10563 instead of sprintf().
5c3216e2
OS
10564 * utils.c (paddress): Return phex_nz().
10565
6bd31874
JB
105662010-07-07 Joel Brobecker <brobecker@adacore.com>
10567
10568 * server.c (handle_v_cont): Call mourn_inferior if process
10569 just exited.
10570 (myresume): Likewise.
10571
0fb4aa4b
PA
105722010-07-01 Pedro Alves <pedro@codesourcery.com>
10573
10574 Static tracepoints, and integration with UST.
10575
10576 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10577 * mem-break.c (uninsert_all_breakpoints)
10578 (reinsert_all_breakpoints): New.
10579 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10580 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10581 (gdb_agent_ust_loaded, helper_thread_id)
10582 (gdb_agent_helper_thread_id): New macros.
10583 (struct ipa_sym_addresses): Add addr_ust_loaded,
10584 addr_helper_thread_id, addr_cmd_buf.
10585 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10586 (in_process_agent_loaded_ust): New.
10587 (write_e_ust_not_loaded): New.
10588 (maybe_write_ipa_ust_not_loaded): New.
10589 (struct collect_static_trace_data_action): New.
10590 (enum tracepoint_type) <static_tracepoint>: New.
10591 (struct tracepoint) <handle>: Mention static tracepoints.
10592 (struct static_tracepoint_ctx): New.
10593 (CMD_BUF_SIZE): New.
10594 (add_tracepoint_action): Handle static tracepoint actions.
10595 (unprobe_marker_at): New.
10596 (clear_installed_tracepoints): Handle static tracepoints.
10597 (cmd_qtdp): Handle static tracepoints.
10598 (probe_marker_at): New.
10599 (cmd_qtstart): Handle static tracepoints.
10600 (response_tracepoint): Handle static tracepoints.
10601 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10602 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10603 (get_context_regcache): Handle static tracepoints.
10604 (do_action_at_tracepoint): Handle static tracepoint actions.
10605 (traceframe_find_block_type): Handle static trace data blocks.
10606 (traceframe_read_sdata): New.
10607 (download_tracepoints): Download static tracepoint actions.
10608 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10609 (GDB_PROBE_NAME): New.
10610 (ust_ops): New.
10611 (GET_UST_SYM): New.
10612 (USTF): New.
10613 (dlsym_ust): New.
10614 (ust_marker_to_static_tracepoint): New.
10615 (gdb_probe): New.
10616 (collect_ust_data_at_tracepoint): New.
10617 (gdb_ust_probe): New.
10618 (UNIX_PATH_MAX, SOCK_DIR): New.
10619 (gdb_ust_connect_sync_socket): New.
10620 (resume_thread, stop_thread): New.
10621 (run_inferior_command): New.
10622 (init_named_socket): New.
10623 (gdb_ust_socket_init): New.
10624 (cstr_to_hexstr): New.
10625 (next_st): New.
10626 (first_marker, next_marker): New.
10627 (response_ust_marker): New.
10628 (cmd_qtfstm, cmd_qtsstm): New.
10629 (unprobe_marker_at, probe_marker_at): New.
10630 (cmd_qtstmat, gdb_ust_thread): New.
10631 (gdb_ust_init): New.
10632 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10633 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10634 (ST_REGENTRY): New.
10635 (x86_64_st_collect_regmap): New.
10636 (X86_64_NUM_ST_COLLECT_GREGS): New.
10637 (AMD64_RIP_REGNUM): New.
10638 (supply_static_tracepoint_registers): New.
10639 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10640 (ST_REGENTRY): New.
10641 (i386_st_collect_regmap): New.
10642 (i386_NUM_ST_COLLECT_GREGS): New.
10643 (supply_static_tracepoint_registers): New.
10644 * server.c (handle_query): Handle qXfer:statictrace:read.
10645 <qSupported>: Report support for StaticTracepoints, and
10646 qXfer:statictrace:read features.
10647 * server.h (traceframe_read_sdata)
10648 (supply_static_tracepoint_registers): Declare.
10649 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10650 (unpack_varlen_hex): Include in IPA build.
10651 * Makefile.in (ustlibs, ustinc): New.
10652 (IPA_OBJS): Add remote-utils-ipa.o.
10653 ($(IPA_LIB)): Link -ldl and -lpthread.
10654 (UST_CFLAGS): New.
10655 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10656 * config.in, configure: Regenerate.
10657
9e4344e5
PA
106582010-06-20 Ian Lance Taylor <iant@google.com>
10659 Pedro Alves <pedro@codesourcery.com>
10660
10661 * linux-x86-low.c (always_true): Delete.
10662 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10663 trying to fool the compiler with always_true.
10664
c6beb2cb
PA
106652010-06-20 Pedro Alves <pedro@codesourcery.com>
10666
10667 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10668 conditions in gdbserver.
10669
d2ed6730
UW
106702010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10671
10672 * spu-low.c (spu_read_memory): Wrap around local store limit.
10673 (spu_write_memory): Likewise.
10674
4e29fb54
PA
106752010-06-15 Pedro Alves <pedro@codesourcery.com>
10676
10677 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10678 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10679 LONGEST uses.
10680 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10681 uses.
10682 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10683 uses with LONGEST uses.
10684
6a271cae
PA
106852010-06-14 Stan Shebs <stan@codesourcery.com>
10686 Pedro Alves <pedro@codesourcery.com>
10687
10688 Bytecode compiler.
10689
10690 * linux-x86-low.c: Include limits.h.
10691 (add_insns): New.
10692 (always_true): New.
10693 (EMIT_ASM): New.
10694 (EMIT_ASM32): New.
10695 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10696 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10697 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10698 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10699 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10700 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10701 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10702 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10703 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10704 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10705 (amd64_emit_void_call_2): New.
10706 (amd64_emit_ops): New.
10707 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10708 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10709 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10710 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10711 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10712 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10713 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10714 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10715 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10716 (i386_emit_stack_adjust, i386_emit_int_call_1)
10717 (i386_emit_void_call_2): New.
10718 (i386_emit_ops): New.
10719 (x86_emit_ops): New.
10720 (the_low_target): Install x86_emit_ops.
10721 * server.h (struct emit_ops): New.
10722 (get_raw_reg_func_addr): Declare.
10723 (current_insn_ptr, emit_error): Declare.
10724 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10725 (set_trace_state_variable_value): New defines.
10726 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10727 addr_get_trace_state_variable_value and
10728 addr_set_trace_state_variable_value.
10729 (symbol_list): New fields for get_raw_reg,
10730 get_trace_state_variable_value and set_trace_state_variable_value.
10731 (condfn): New typedef.
10732 (struct tracepoint): New field `compiled_cond'.
10733 (do_action_at_tracepoint): Clear compiled_cond.
10734 (get_trace_state_variable_value, set_trace_state_variable_value):
10735 Export in the IPA.
10736 (condition_true_at_tracepoint): If there's a compiled condition,
10737 run that.
10738 (current_insn_ptr, emit_error): New globals.
10739 (struct bytecode_address): New.
10740 (get_raw_reg_func_addr): New.
10741 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10742 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10743 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10744 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10745 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10746 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10747 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10748 (compile_tracepoint_condition, compile_bytecodes): New.
10749 * target.h (emit_ops): Forward declare.
10750 (struct target_ops): New field emit_ops.
10751 (target_emit_ops): New.
10752 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10753 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10754 * linux-low.c (linux_emit_ops): New.
10755 (linux_target_ops): Install it.
10756 * linux-low.h (struct linux_target_ops): New field emit_ops.
10757
92b72907
UW
107582010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10759
10760 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10761 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10762
fa593d66
PA
107632010-06-01 Pedro Alves <pedro@codesourcery.com>
10764 Stan Shebs <stan@codesourcery.com>
10765
10766 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10767 (all): Depend on $(extra_libraries).
10768 (install-only): Install the IPA.
10769 (IPA_OBJS, IPA_LIB): New.
10770 (clean): Remove the IPA lib.
10771 (IPAGENT_CFLAGS): New.
10772 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10773 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10774 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10775 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10776 * configure.ac: Check for atomic builtins support in the compiler.
10777 (IPA_DEPFILES, extra_libraries): Define.
10778 * configure.srv (ipa_obj): Add description.
10779 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10780 (i[34567]86-*-linux*): Set ipa_obj.
10781 (x86_64-*-linux*): Set ipa_obj.
10782 * linux-low.c (stabilizing_threads): New.
10783 (supports_fast_tracepoints): New.
10784 (linux_detach): Stabilize threads before detaching.
10785 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10786 the lwp is either not stabilizing, or is moving out of a jump pad.
10787 (linux_fast_tracepoint_collecting): New.
10788 (maybe_move_out_of_jump_pad): New.
10789 (enqueue_one_deferred_signal): New.
10790 (dequeue_one_deferred_signal): New.
10791 (linux_wait_for_event_1): If moving out of a jump pad, defer
10792 pending signals to later.
10793 (linux_stabilize_threads): New.
10794 (linux_wait_1): Check if threads need moving out of jump pads, and
10795 do it if so.
10796 (stuck_in_jump_pad_callback): New.
10797 (move_out_of_jump_pad_callback): New.
10798 (lwp_running): New.
10799 (linux_resume_one_lwp): Handle moving out of jump pads.
10800 (linux_set_resume_request): Dequeue deferred signals.
10801 (need_step_over_p): Also step over fast tracepoint jumps.
10802 (start_step_over): Also uninsert fast tracepoint jumps.
10803 (finish_step_over): Also reinsert fast tracepoint jumps.
10804 (linux_install_fast_tracepoint_jump): New.
10805 (linux_target_ops): Install linux_stabilize_threads and
10806 linux_install_fast_tracepoint_jump_pad.
10807 * linux-low.h (linux_target_ops) <get_thread_area,
10808 install_fast_tracepoint_jump_pad>: New fields.
10809 (struct lwp_info) <collecting_fast_tracepoint,
10810 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10811 (linux_get_thread_area): Declare.
10812 * linux-x86-low.c (jump_insn): New.
10813 (x86_get_thread_area): New.
10814 (append_insns): New.
10815 (push_opcode): New.
10816 (amd64_install_fast_tracepoint_jump_pad): New.
10817 (i386_install_fast_tracepoint_jump_pad): New.
10818 (x86_install_fast_tracepoint_jump_pad): New.
10819 (the_low_target): Install x86_get_thread_area and
10820 x86_install_fast_tracepoint_jump_pad.
10821 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10822 (struct fast_tracepoint_jump): New.
10823 (fast_tracepoint_jump_insn): New.
10824 (fast_tracepoint_jump_shadow): New.
10825 (find_fast_tracepoint_jump_at): New.
10826 (fast_tracepoint_jump_here): New.
10827 (delete_fast_tracepoint_jump): New.
10828 (set_fast_tracepoint_jump): New.
10829 (uninsert_fast_tracepoint_jumps_at): New.
10830 (reinsert_fast_tracepoint_jumps_at): New.
10831 (set_breakpoint_at): Use write_inferior_memory.
10832 (uninsert_raw_breakpoint): Use write_inferior_memory.
10833 (check_mem_read): Mask out fast tracepoint jumps.
10834 (check_mem_write): Mask out fast tracepoint jumps.
10835 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10836 (set_fast_tracepoint_jump): Declare.
10837 (delete_fast_tracepoint_jump)
10838 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10839 (reinsert_fast_tracepoint_jumps_at): Declare.
10840 * regcache.c: Don't compile many functions when building the
10841 in-process agent library.
10842 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10843 the register buffer in the heap.
10844 (free_register_cache): If the register buffer isn't owned by the
10845 regcache, don't free it.
10846 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10847 pre-existing register caches.
10848 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10849 type.
10850 (convert_ascii_to_int): : Constify `from' parameter type.
10851 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10852 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10853 the needed buffer in-place.
10854 (relocate_instruction): New.
10855 * server.c (handle_query) <qSymbols>: If the target supports
10856 tracepoints, give it a chance of looking up symbols. Report
10857 support for fast tracepoints.
10858 (handle_status): Stabilize threads.
10859 (process_serial_event): Adjust.
10860 * server.h (struct fast_tracepoint_jump): Forward declare.
10861 (struct process_info) <fast_tracepoint_jumps>: New field.
10862 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10863 (decode_X_packet, decode_M_packet): Adjust.
10864 (relocate_instruction): Declare.
10865 (in_process_agent_loaded): Declare.
10866 (tracepoint_look_up_symbols): Declare.
10867 (struct fast_tpoint_collect_status): Declare.
10868 (fast_tracepoint_collecting): Declare.
10869 (force_unlock_trace_buffer): Declare.
10870 (handle_tracepoint_bkpts): Declare.
10871 (initialize_low_tracepoint)
10872 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10873 * target.h (struct target_ops) <stabilize_threads,
10874 install_fast_tracepoint_jump_pad>: New fields.
10875 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10876 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10877 [HAVE_STDINT_H]: Include stdint.h.
10878 (trace_debug_1): Rename to ...
10879 (trace_vdebug): ... this.
10880 (trace_debug): Rename to ...
10881 (trace_debug_1): ... this. Add `level' parameter.
10882 (trace_debug): New.
10883 (ATTR_USED, ATTR_NOINLINE): New.
10884 (IP_AGENT_EXPORT): New.
10885 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10886 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10887 (about_to_request_buffer_space, trace_buffer_is_full)
10888 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10889 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10890 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10891 (traceframe_write_count, traceframes_created)
10892 (trace_state_variables)
10893 New renaming defines.
10894 (struct ipa_sym_addresses): New.
10895 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10896 (symbol_list): New.
10897 (ipa_sym_addrs): New.
10898 (all_tracepoint_symbols_looked_up): New.
10899 (in_process_agent_loaded): New.
10900 (write_e_ipa_not_loaded): New.
10901 (maybe_write_ipa_not_loaded): New.
10902 (tracepoint_look_up_symbols): New.
10903 (debug_threads) [IN_PROCESS_AGENT]: New.
10904 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10905 (UNKNOWN_SIDE_EFFECTS): New.
10906 (stop_tracing): New.
10907 (flush_trace_buffer): New.
10908 (stop_tracing_bkpt): New.
10909 (flush_trace_buffer_bkpt): New.
10910 (read_inferior_integer): New.
10911 (read_inferior_uinteger): New.
10912 (read_inferior_data_pointer): New.
10913 (write_inferior_data_pointer): New.
10914 (write_inferior_integer): New.
10915 (write_inferior_uinteger): New.
10916 (struct collect_static_trace_data_action): Delete.
10917 (enum tracepoint_type): New.
10918 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
10919 <actions_str, step_actions, step_actions_str>: Only include in
10920 GDBserver.
fa593d66
PA
10921 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10922 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10923 (tracepoints): Use IP_AGENT_EXPORT.
10924 (last_tracepoint): Don't include in the IPA.
10925 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10926 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10927 (alloced_trace_state_variables): New.
10928 (trace_state_variables): Use IP_AGENT_EXPORT.
10929 (traceframe_t): Delete unused variable.
10930 (circular_trace_buffer): Don't include in the IPA.
10931 (trace_buffer_start): Delete.
10932 (struct trace_buffer_control): New.
10933 (trace_buffer_free): Delete.
10934 (struct ipa_trace_buffer_control): New.
10935 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10936 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10937 New.
10938 (trace_buffer_ctrl): New.
10939 (TRACE_BUFFER_CTRL_CURR): New.
10940 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10941 Reimplement as macros.
10942 (trace_buffer_wrap): Delete.
10943 (traceframe_write_count, traceframe_read_count)
10944 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10945 (struct tracepoint_hit_ctx) <type>: New field.
10946 (struct fast_tracepoint_ctx): New.
10947 (memory_barrier): New.
10948 (cmpxchg): New.
10949 (record_tracepoint_error): Update atomically in the IPA.
10950 (clear_inferior_trace_buffer): New.
10951 (about_to_request_buffer_space): New.
10952 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10953 updating the same buffer.
10954 (add_tracepoint): Default the tracepoint's type to trap
10955 tracepoint, and orig_size to -1.
10956 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10957 internal variables.
10958 (create_trace_state_variable): New parameter `gdb'. Handle it.
10959 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10960 (cmd_qtdp): Handle fast tracepoints.
10961 (cmd_qtdv): Adjust.
10962 (max_jump_pad_size): New.
10963 (gdb_jump_pad_head): New.
10964 (get_jump_space_head): New.
10965 (claim_jump_space): New.
10966 (sort_tracepoints): New.
10967 (MAX_JUMP_SIZE): New.
10968 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10969 IPA.
10970 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10971 support. Upload fast traceframes, and delete internal IPA
10972 breakpoints.
10973 (stop_tracing_handler): New.
10974 (flush_trace_buffer_handler): New.
10975 (cmd_qtstop): Upload fast tracepoints.
10976 (response_tracepoint): Handle fast tracepoints.
10977 (tracepoint_finished_step): Upload fast traceframes. Set the
10978 tracepoint hit context's tracepoint type.
10979 (handle_tracepoint_bkpts): New.
10980 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10981 type. Add comment about fast tracepoints.
10982 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10983 non-existing action_str field.
10984 (get_context_regcache): Handle fast tracepoints.
10985 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10986 to the regcache.
10987 (fast_tracepoint_from_jump_pad_address): New.
10988 (fast_tracepoint_from_ipa_tpoint_address): New.
10989 (collecting_t): New.
10990 (force_unlock_trace_buffer): New.
10991 (fast_tracepoint_collecting): New.
10992 (collecting): New.
10993 (gdb_collect): New.
10994 (write_inferior_data_ptr): New.
10995 (target_tp_heap): New.
10996 (target_malloc): New.
10997 (download_agent_expr): New.
10998 (UALIGN): New.
10999 (download_tracepoints): New.
11000 (download_trace_state_variables): New.
11001 (upload_fast_traceframes): New.
11002 (IPA_FIRST_TRACEFRAME): New.
11003 (IPA_NEXT_TRACEFRAME_1): New.
11004 (IPA_NEXT_TRACEFRAME): New.
11005 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11006 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11007 (gdb_jump_pad_buffer_end): New.
11008 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11009 (initialize_tracepoint): Adjust.
11010 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11011 buffer. Initialize the low module.
11012 * utils.c (PREFIX, TOOLNAME): New.
11013 (malloc_failure): Use PREFIX.
11014 (error): In the IPA, an error causes an exit.
11015 (fatal, warning): Use PREFIX.
11016 (internal_error): Use TOOLNAME.
11017 (NUMCELLS): Increase to 10.
11018 * configure, config.in: Regenerate.
11019
d149dd1d
PA
110202010-06-01 Pedro Alves <pedro@codesourcery.com>
11021
11022 * server.c (handle_query) <qSupported>: Do two passes over the
11023 qSupported string to avoid nesting strtok.
11024
f6528abd
JK
110252010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11026
11027 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11028 (CDEPS): New.
11029 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11030 -Wl,--dynamic-list.
11031 * configure: Regenerate.
11032 * proc-service.list: New.
11033
ca2a87a0
JK
110342010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11035
11036 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11037 New comment.
11038
363a6e9f
OS
110392010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11040
11041 * gdbreplay.c (remote_open): Check error return from socket() call by
11042 its equality to -1 not by it being negative.
11043 * remote-utils.c (remote_open): Likewise.
11044
d23b6cb1
PA
110452010-05-23 Pedro Alves <pedro@codesourcery.com>
11046
11047 * config.h: Regenerate.
11048
28d3cf85
MK
110492010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11050
11051 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11052 doesn't provide PTRACE_GET_THREAD_AREA.
11053
fea36a59
MK
110542010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11055
11056 * linux-m68k-low.c: Include <asm/ptrace.h>
11057 (ps_get_thread_area): Implement.
11058
24b066ba
DE
110592010-05-03 Doug Evans <dje@google.com>
11060
11061 * event-loop.c (struct callback_event): New struct.
11062 (callback_list): New global.
11063 (append_callback_event, delete_callback_event): New functions.
11064 (process_callback): New function.
11065 (start_event_loop): Call it.
11066 * remote-utils.c (NOT_SCHEDULED): Define.
11067 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11068 moved out of readchar.
11069 (readchar): Rewrite. Call reschedule before returning.
11070 (reset_readchar): New function.
11071 (remote_close): Call it.
11072 (process_remaining, reschedule): New functions.
11073 * server.h (callback_handler_func): New typedef.
11074 (append_callback_event, delete_callback_event): Declare.
11075
9836d6ea
PA
110762010-05-03 Pedro Alves <pedro@codesourcery.com>
11077
11078 * proc-service.c (ps_pglobal_lookup): Use
11079 thread_db_look_up_one_symbol.
11080 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11081 parameter. Use it instead of all_symbols_looked_up.
11082 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11083 field.
11084 (all_symbols_looked_up): Don't declare.
11085 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11086 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11087 field.
11088 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11089 Set all_symbols_looked_up here.
11090 (thread_db_look_up_one_symbol): New.
11091 (thread_db_get_tls_address): Adjust.
11092 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11093 thread_db object on the heap, and tentatively set it in the
11094 process structure.
11095 (thread_db_init): Don't set all_symbols_looked_up here.
11096 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11097
7984d532
PA
110982010-05-03 Pedro Alves <pedro@codesourcery.com>
11099
11100 * linux-low.c (linux_kill, linux_detach): Adjust.
11101 (status_pending_p_callback): Remove redundant statement. Check
11102 for !TARGET_WAITIKIND_IGNORE, instead of
11103 TARGET_WAITKIND_STOPPED.
11104 (handle_tracepoints): Make sure LWP is locked. Adjust.
11105 (linux_wait_for_event_1): Adjust.
11106 (linux_cancel_breakpoints): New.
11107 (unsuspend_one_lwp): New.
11108 (unsuspend_all_lwps): New.
11109 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11110 (send_sigstop_callback): Change return type to int, add new
11111 `except' parameter and handle it.
11112 (suspend_and_send_sigstop_callback): New.
11113 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11114 pass them down. If SUSPEND, also increment the lwp's suspend
11115 count.
11116 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11117 (need_step_over_p): Don't consider suspended LWPs.
11118 (start_step_over): Adjust.
11119 (proceed_one_lwp): Change return type to int, add new `except'
11120 parameter and handle it.
11121 (unsuspend_and_proceed_one_lwp): New.
11122 (proceed_all_lwps): Use find_inferior instead of
11123 for_each_inferior.
11124 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11125 also decrement the suspend count of LWPs. Pass `except' down,
11126 instead of hacking its suspend count.
11127 (linux_pause_all): Add `freeze' parameter. Adjust.
11128 (linux_unpause_all): New.
11129 (linux_target_ops): Install linux_unpause_all.
11130 * server.c (handle_status): Adjust.
11131 * target.h (struct target_ops): New fields `unpause_all' and
11132 `cancel_breakpoints'. Add new parameter to `pause_all'.
11133 (pause_all): Add new `freeze' parameter.
11134 (unpause_all): New.
11135 (cancel_breakpoints): New.
11136 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11137 cancel breakpoints.
11138 (cmd_qtstart): Pause threads.
11139 (stop_tracing): Pause threads, and cancel breakpoints.
11140 * win32-low.c (win32_target_ops): Adjust.
11141
e471f25b
PA
111422010-05-03 Pedro Alves <pedro@codesourcery.com>
11143
11144 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11145 the inferior right away from here...
11146 (linux_wait_1): ... to here, and adjust to check the thread's
11147 last_resume_kind instead of the lwp's step or stop_expected flags.
11148
1915ef4f
PA
111492010-05-02 Pedro Alves <pedro@codesourcery.com>
11150
11151 * README: Use consistent `GDB' and `GDBserver' spellings.
11152
f9e39928
PA
111532010-05-02 Pedro Alves <pedro@codesourcery.com>
11154
11155 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11156 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11157 (linux_detach_one_lwp): Assume the lwp is stopped.
11158 (any_thread_of): Delete.
11159 (linux_detach): Stop all lwps here. Don't blindly delete all
11160 breakpoints.
11161 (delete_lwp_callback): New.
11162 (linux_mourn): Delete all lwps of the process that is gone.
11163 (linux_wait_1): Don't delete the last lwp of the process here.
11164 * mem-break.h (mark_breakpoints_out): Declare.
11165 * mem-break.c (mark_breakpoints_out): New.
11166 (free_all_breakpoints): Use it.
11167 * server.c (handle_target_event): If the process is gone, mark
11168 breakpoints out.
11169 * thread-db.c (struct thread_db) <create_bp>: New field.
11170 (thread_db_enable_reporting): Fix prototype. Store a thread event
11171 breakpoint reference in the thread_db struct.
11172 (thread_db_load_search): Clear the thread_db object.
11173 (try_thread_db_load_1): Ditto.
11174 (switch_to_process): New.
11175 (disable_thread_event_reporting): Use it.
11176 (remove_thread_event_breakpoints): New.
11177 (thread_db_detach, thread_db_mourn): Use it.
11178
1e7fc18c
PA
111792010-05-01 Pedro Alves <pedro@codesourcery.com>
11180
11181 * linux-low.c (linux_enable_event_reporting): New.
11182 (linux_wait_for_event_1, handle_extended_wait): Use it.
11183
02fc4de7
PA
111842010-04-30 Pedro Alves <pedro@codesourcery.com>
11185
11186 * linux-low.c (linux_kill_one_lwp, linux_kill)
11187 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11188 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11189 SIGSTOP even if the LWP is stopped.
11190 (send_sigstop_callback): New.
11191 (stop_all_lwps): Use send_sigstop_callback instead.
11192 (linux_resume_one_thread): Adjust.
11193 (proceed_one_lwp): Still proceed an LWP that the client has
11194 requested to stop, if we haven't reported it as stopped yet. Make
11195 sure that LWPs the client want stopped, have a pending SIGSTOP.
11196
bc3b5632
DE
111972010-04-26 Doug Evans <dje@google.com>
11198
ae1ada35
DE
11199 * server.c (handle_general_set): Make static.
11200
bc3b5632
DE
11201 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11202 Print received char after testing for error/eof instead of before.
11203 (input_interrupt): Tweak comment.
11204
65730243
DE
112052010-04-23 Doug Evans <dje@google.com>
11206
11207 * server.c (start_inferior): Print inferior argv if --debug.
11208
a8ae7dc0
AR
112092010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11210
11211 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11212 * nto-x86-low.c: Include server.h
11213
1c07cc19
PM
112142010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11215
11216 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11217 be consistent with other sources of this directory.
11218 (init_registers_amd64): Correct name of source file of this function
11219 in the comment.
11220
e0a61e09
PM
112212010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11222
11223 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11224 64-bit executables.
11225
54709339
PM
112262010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11227
11228 * win32-i386-low.c: Add 64-bit support.
11229 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11230 (init_registers_amd64): Declare.
11231 (mappings): Add 64-bit version of array.
11232 (init_windows_x86): New function.
11233 (the_low_target): Change init_arch field to init_windows_x86.
11234
e8f0053d
PM
112352010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11236
11237 * win32-low.c: Adapt to support also 64-bit architecture.
11238 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11239 (get_image_name): Use SIZE_T type for local variable `done'.
11240 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11241 (toolhelp_get_dll_name): Idem.
11242 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11243 Use uintptr_t typecast to avoid warning.
11244 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11245 (handle_exception): Use phex_nz to avoid warning.
11246 (win32_wait): Remove unused local variable `process'.
11247
c481e77e
PM
112482010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11249
11250 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11251 `amd64-avx.o'.
11252
12ea4b69
PM
112532010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11254
11255 * configure.ac: Use `ws2_32' library for srv_mingw.
11256 * configure: Regenerate.
11257 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11258 * remote-utils.c: Likewise.
11259
f6d1620c
L
112602010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11261
11262 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11263 if __x86_64__ is defined.
11264
8e642873
PM
112652010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11266
11267 * configure: Regenerate.
11268
711e434b
PM
112692010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11270
11271 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11272 * target.h (target_ops): New get_tib_address field.
11273 * win32-low.h (win32_thread_info): Add thread_local_base field.
11274 * win32-low.c (child_add_thread): Add tlb argument.
11275 Set thread_local_base field to TLB.
11276 (get_child_debug_event): Adapt to child_add_thread change.
11277 (win32_get_tib_address): New function.
11278 (win32_target_ops): Set get_tib_address field to
11279 win32_get_tib_address.
11280 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11281
505106cd
PA
112822010-04-12 Pedro Alves <pedro@codesourcery.com>
11283
505106cd
PA
11284 * linux-low.c (linux_mourn): Also remove the process.
11285 * server.c (handle_target_event): Don't remove the process here.
11286 * nto-low.c (nto_mourn): New.
11287 (nto_target_ops): Install it.
11288 * spu-low.c (spu_mourn): New.
11289 (spu_target_ops): Install it.
11290 * win32-low.c (win32_mourn): New.
11291 (win32_target_ops): Install it.
11292
e8470a06
PA
112932010-04-12 Pedro Alves <pedro@codesourcery.com>
11294
11295 * server.h (buffer_xml_printf): Remove redundant `;'.
11296
45ba0d02
PA
112972010-04-12 Pedro Alves <pedro@codesourcery.com>
11298
11299 * regcache.c (set_register_cache): Invalidate regcaches before
11300 changing the register cache layout.
11301 (regcache_invalidate_one): Allow a NULL regcache.
11302 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11303 regcaches before changing the register cache layout or the target
11304 regsets.
11305
59e04013
L
113062010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11307
11308 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11309 variable warning on Linux/x86-64.
11310
8336d594
PA
113112010-04-11 Pedro Alves <pedro@codesourcery.com>
11312
11313 GDBserver disconnected tracing support.
11314
11315 * linux-low.c (linux_remove_process): Delete.
11316 (add_lwp): Don't set last_resume_kind here.
11317 (linux_kill): Use `mourn'.
11318 (linux_detach): Use `thread_db_detach', and `mourn'.
11319 (linux_mourn): New.
11320 (linux_attach_lwp_1): Adjust comment.
11321 (linux_attach): last_resume_kind moved the thread_info; adjust.
11322 (status_pending_p_callback): Adjust.
11323 (linux_wait_for_event_1): Adjust.
11324 (count_events_callback, select_singlestep_lwp_callback)
11325 (select_event_lwp_callback, cancel_breakpoints_callback)
11326 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11327 (proceed_one_lwp): Adjust.
11328 (linux_async): Add debug output.
11329 (linux_thread_stopped): New.
11330 (linux_pause_all): New.
11331 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11332 linux_pause_all.
11333 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11334 (thread_db_free): Delete declaration.
11335 (thread_db_detach, thread_db_mourn): Declare.
11336 * thread-db.c (thread_db_init): Use thread_db_mourn.
11337 (thread_db_free): Delete, split in two.
11338 (disable_thread_event_reporting): New.
11339 (thread_db_detach): New.
11340 (thread_db_mourn): New.
11341
11342 * server.h (struct thread_info) <last_resume_kind>: New field.
11343 <attached>: Add comment.
11344 <gdb_detached>: New field.
11345 (handler_func): Change return type to int.
11346 (handle_serial_event, handle_target_event): Ditto.
11347 (gdb_connected): Declare.
11348 (tracing): Delete.
11349 (disconnected_tracing): Declare.
11350 (stop_tracing): Declare.
11351
11352 * server.c (handle_query) <qSupported>: Report support for
11353 disconnected tracing.
11354 (queue_stop_reply_callback): Account for running threads.
11355 (gdb_wants_thread_stopped): New.
11356 (gdb_wants_all_threads_stopped): New.
11357 (gdb_reattached_process): New.
11358 (handle_status): Clear the `gdb_detached' flag of all processes.
11359 In all-stop, stop all threads.
11360 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11361 (process_serial_event): If the remote connection breaks, or if an
11362 exit was forced with "monitor exit", force an event loop exit.
11363 Handle disconnected tracing on detach.
11364 (handle_serial_event): Adjust.
11365 (handle_target_event): If GDB isn't connected, forward events back
11366 to the inferior, unless the last process exited, in which case,
11367 exit gdbserver. Adjust interface.
11368
11369 * remote-utils.c (remote_open): Don't block in accept. Instead
11370 register an event loop source on the listen socket file
11371 descriptor. Refactor bits into ...
11372 (listen_desc): ... this new global.
11373 (gdb_connected): ... this new function.
11374 (enable_async_notification): ... this new function.
11375 (handle_accept_event): ... this new function.
11376 (remote_close): Clear remote_desc.
11377
11378 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11379
11380 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11381 New fields.
11382 (mourn_inferior): Define.
11383 (target_process_qsupported): Avoid the dangling else problem.
11384 (thread_stopped): Define.
11385 (pause_all): Define.
11386 (target_waitstatus_to_string): Declare.
11387 * target.c (target_waitstatus_to_string): New.
11388
11389 * tracepoint.c (tracing): Make extern.
11390 (disconnected_tracing): New.
11391 (stop_tracing): Make extern. Handle tracing stops due to GDB
11392 disconnecting.
11393 (cmd_qtdisconnected): New.
11394 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11395 (handle_tracepoint_general_set): Handle QTDisconnected.
11396
11397 * event-loop.c (event_handler_func): Change return type to int.
11398 (process_event): Bail out if the event handler wants the event
11399 loop to stop.
11400 (handle_file_event): Ditto.
11401 (start_event_loop): Bail out if the event handler wants the event
11402 loop to stop.
11403
11404 * nto-low.c (nto_target_ops): Adjust.
11405 * spu-low.c (spu_wait): Don't remove the process here.
11406 (spu_target_ops): Adjust.
11407 * win32-low.c (win32_wait): Don't remove the process here.
11408 (win32_target_ops): Adjust.
11409
5d267c4c
PA
114102010-04-11 Pedro Alves <pedro@codesourcery.com>
11411
11412 * regcache.c (realloc_register_cache): Invalidate inferior's
11413 regcache before recreating it.
11414
623ccd72
PA
114152010-04-09 Pedro Alves <pedro@codesourcery.com>
11416
11417 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11418
219f2f23
PA
114192010-04-09 Stan Shebs <stan@codesourcery.com>
11420 Pedro Alves <pedro@codesourcery.com>
11421
11422 * server.h (LONGEST): New.
11423 (struct thread_info) <while_stepping>: New field.
11424 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11425 Declare.
11426 (initialize_tracepoint, handle_tracepoint_general_set)
11427 (handle_tracepoint_query, tracepoint_finished_step)
11428 (tracepoint_was_hit, release_while_stepping_state_list):
11429 (current_traceframe): Declare.
11430 * server.c (handle_general_set): Handle tracepoint packets.
11431 (read_memory): New.
11432 (write_memory): New.
11433 (handle_search_memory_1): Use read_memory.
11434 (handle_query): Report support for conditional tracepoints, trace
11435 state variables, and tracepoint sources. Handle tracepoint
11436 queries.
11437 (main): Initialize the tracepoints module.
11438 (process_serial_event): Handle traceframe reads/writes.
11439
11440 * linux-low.c (handle_tracepoints): New.
11441 (linux_wait_1): Call it.
11442 (linux_resume_one_lwp): Handle while-stepping.
11443 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11444 (linux_target_ops): Install them.
11445 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11446 New field.
11447 * linux-x86-low.c (x86_supports_tracepoints): New.
11448 (the_low_target). Install it.
11449
11450 * mem-break.h (delete_breakpoint): Declare.
11451 * mem-break.c (delete_breakpoint): Make external.
11452
11453 * target.h (struct target_ops): Add `supports_tracepoints',
11454 `read_pc', and `write_pc' fields.
11455 (target_supports_tracepoints): Define.
11456 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11457 (phex_nz): New.
11458
11459 * regcache.h (struct regcache) <registers_owned>: New field.
11460 (init_register_cache, regcache_cpy): Declare.
11461 (regcache_read_pc, regcache_write_pc): Declare.
11462 (register_cache_size): Declare.
11463 (supply_regblock): Declare.
11464 * regcache.c (init_register_cache): New.
11465 (new_register_cache): Use it.
11466 (regcache_cpy): New.
11467 (register_cache_size): New.
11468 (supply_regblock): New.
11469 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 11470
219f2f23
PA
11471 * tracepoint.c: New.
11472
11473 * Makefile.in (OBS): Add tracepoint.o.
11474 (tracepoint.o): New rule.
11475
3a13a53b
L
114762010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11477
11478 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11479 (i386-mmx.o): New.
11480 (i386-mmx.c): Likewise.
11481 (i386-mmx-linux.o): Likewise.
11482 (i386-mmx-linux.c): Likewise.
11483
11484 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11485 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11486 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11487 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11488
11489 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11490 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11491 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11492
1570b33e
L
114932010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11494
11495 * Makefile.in (clean): Updated.
11496 (i386-avx.o): New.
11497 (i386-avx.c): Likewise.
11498 (i386-avx-linux.o): Likewise.
11499 (i386-avx-linux.c): Likewise.
11500 (amd64-avx.o): Likewise.
11501 (amd64-avx.c): Likewise.
11502 (amd64-avx-linux.o): Likewise.
11503 (amd64-avx-linux.c): Likewise.
11504
11505 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11506 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11507 (srv_amd64_regobj): Add amd64-avx.o.
11508 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11509 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11510 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11511 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11512 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11513 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11514 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11515
11516 * i387-fp.c: Include "i386-xstate.h".
11517 (i387_xsave): New.
11518 (i387_cache_to_xsave): Likewise.
11519 (i387_xsave_to_cache): Likewise.
11520 (x86_xcr0): Likewise.
11521
11522 * i387-fp.h (i387_cache_to_xsave): Likewise.
11523 (i387_xsave_to_cache): Likewise.
11524 (x86_xcr0): Likewise.
11525
11526 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11527 * linux-crisv32-low.c (target_regsets): Likewise.
11528 * linux-m68k-low.c (target_regsets): Likewise.
11529 * linux-mips-low.c (target_regsets): Likewise.
11530 * linux-ppc-low.c (target_regsets): Likewise.
11531 * linux-s390-low.c (target_regsets): Likewise.
11532 * linux-sh-low.c (target_regsets): Likewise.
11533 * linux-sparc-low.c (target_regsets): Likewise.
11534 * linux-xtensa-low.c (target_regsets): Likewise.
11535
11536 * linux-low.c: Include <sys/uio.h>.
11537 (regsets_fetch_inferior_registers): Support nt_type.
11538 (regsets_store_inferior_registers): Likewise.
11539 (linux_process_qsupported): New.
11540 (linux_target_ops): Add linux_process_qsupported.
11541
11542 * linux-low.h (regset_info): Add nt_type.
11543 (linux_target_ops): Add process_qsupported.
11544
11545 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11546 and <sys/uio.h>.
11547 (init_registers_i386_avx_linux): New.
11548 (init_registers_amd64_avx_linux): Likewise.
11549 (xmltarget_i386_linux_no_xml): Likewise.
11550 (xmltarget_amd64_linux_no_xml): Likewise.
11551 (PTRACE_GETREGSET): Likewise.
11552 (PTRACE_SETREGSET): Likewise.
11553 (x86_fill_xstateregset): Likewise.
11554 (x86_store_xstateregset): Likewise.
11555 (use_xml): Likewise.
11556 (x86_linux_update_xmltarget): Likewise.
11557 (x86_linux_process_qsupported): Likewise.
11558 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11559 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11560 init_registers_i386_linux here. Call
11561 x86_linux_update_xmltarget.
11562 (the_low_target): Add x86_linux_process_qsupported.
11563
11564 * server.c (handle_query): Call target_process_qsupported.
11565
11566 * target.h (target_ops): Add process_qsupported.
11567 (target_process_qsupported): New.
11568
fc7238bb
PA
115692010-04-03 Pedro Alves <pedro@codesourcery.com>
11570
11571 * inferiors.c (add_thread): Set last_status kind to
11572 TARGET_WAITKIND_IGNORE.
11573 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11574 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11575 (linux_wait_1): Move `thread' local definition to block that uses
11576 it. Don't NULL initialize `event_child'.
11577 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11578 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11579 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11580
bdabb078
PA
115812010-04-01 Pedro Alves <pedro@codesourcery.com>
11582
11583 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11584 an extended waitstatus, or by a watchpoint.
11585 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11586 thread was stepping or has been stopped by a watchpoint.
11587
d3bbe7a0
PA
115882010-04-01 Pedro Alves <pedro@codesourcery.com>
11589
11590 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11591 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11592 of another, then delete the previous, and validate all
11593 breakpoints.
11594 (validate_inserted_breakpoint): New.
11595 (delete_disabled_breakpoints): New.
11596 (validate_breakpoints): New.
11597 (check_mem_read): Validate breakpoints before trusting their
11598 shadow. Delete disabled breakpoints.
11599 (check_mem_write): Validate breakpoints before trusting they
11600 should be inserted. Delete disabled breakpoints.
11601 * mem-break.h (validate_breakpoints):
11602 * server.c (handle_query): Validate breakpoints when we see a
11603 qSymbol query.
11604
8b07ae33
PA
116052010-04-01 Pedro Alves <pedro@codesourcery.com>
11606
11607 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11608 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11609 if we could tell there's a GDB breakpoint at stop_pc.
11610 (need_step_over_p): Don't do a step over if we find a GDB
11611 breakpoint at the resume PC.
11612
11613 * mem-break.c (struct raw_breakpoint): New.
11614 (enum bkpt_type): New type `gdb_breakpoint'.
11615 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11616 fields. New field `raw'.
11617 (find_raw_breakpoint_at): New.
11618 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11619 breakpoint instead.
11620 (set_breakpoint_at): Adjust.
11621 (delete_raw_breakpoint): New.
11622 (release_breakpoint): New.
11623 (delete_breakpoint): Rename to...
11624 (delete_breakpoint_1): ... this. Add proc parameter. Use
11625 release_breakpoint. Return ENOENT.
11626 (delete_breakpoint): Reimplement.
11627 (find_breakpoint_at): Delete.
11628 (find_gdb_breakpoint_at): New.
11629 (delete_breakpoint_at): Delete.
11630 (set_gdb_breakpoint_at): New.
11631 (delete_gdb_breakpoint_at): New.
11632 (gdb_breakpoint_here): New.
11633 (set_reinsert_breakpoint): Use release_breakpoint.
11634 (uninsert_breakpoint): Rename to ...
11635 (uninsert_raw_breakpoint): ... this.
11636 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11637 (reinsert_raw_breakpoint): Change parameter type to
11638 raw_breakpoint.
11639 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11640 instead.
11641 (check_breakpoints): Adjust. Use release_breakpoint.
11642 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11643 (breakpoint_inserted_here): Ditto.
11644 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11645 Don't trust the breakpoint's shadow if it is not inserted.
11646 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11647 (delete_all_breakpoints): Adjust.
11648 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11649 use delete_breakpoint_1.
11650
11651 * mem-break.h (breakpoints_supported): Delete declaration.
11652 (set_gdb_breakpoint_at): Declare.
11653 (gdb_breakpoint_here): Declare.
11654 (delete_breakpoint_at): Delete.
11655 (delete_gdb_breakpoint_at): Declare.
11656
11657 * server.h (struct raw_breakpoint): Forward declare.
11658 (struct process_info): New field `raw_breakpoints'.
11659
11660 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11661 breakpoints.
11662
6bf5e0ba
PA
116632010-03-24 Pedro Alves <pedro@codesourcery.com>
11664
11665 * linux-low.c (status_pending_p_callback): Fix comment.
11666 (linux_wait_for_event_1): Move most of the internal breakpoint
11667 handling from here...
11668 (linux_wait_1): ... to here.
11669 (count_events_callback): New.
11670 (select_singlestep_lwp_callback): New.
11671 (select_event_lwp_callback): New.
11672 (cancel_breakpoints_callback): New.
11673 (select_event_lwp): New.
11674 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11675 priority to all LWPs that have had events that should be reported
11676 to the client. Cancel breakpoints when about to reporting the
11677 event to the client, not while stopping lwps. No longer cancel
11678 finished single-steps here.
11679 (cancel_finished_single_step): Delete.
11680 (cancel_finished_single_steps): Delete.
11681
414a389f
PA
116822010-03-24 Pedro Alves <pedro@codesourcery.com>
11683
11684 * mem-break.c (enum bkpt_type): New.
11685 (struct breakpoint): New field `type'.
11686 (set_breakpoint_at): Change return type to struct breakpoint
11687 pointer. Set type to `other_breakpoint' by default.
11688 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11689 in the breakpoint list.
11690 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11691 (reinsert_breakpoint): Rename to ...
11692 (reinsert_raw_breakpoint): ... this.
11693 (reinsert_breakpoints_at): Adjust.
11694 * mem-break.h (struct breakpoint): Declare.
11695 (set_breakpoint_at): Change return type to struct breakpoint
11696 pointer.
11697
2280c721
PA
116982010-03-24 Pedro Alves <pedro@codesourcery.com>
11699
11700 * server.c (handle_query): Assign, not compare.
11701
d50171e4
PA
117022010-03-24 Pedro Alves <pedro@codesourcery.com>
11703
11704 Teach linux gdbserver to step-over-breakpoints.
11705
11706 * linux-low.c (can_hardware_single_step): New.
11707 (supports_breakpoints): New.
11708 (handle_extended_wait): If stopping threads, read the stop pc of
11709 the new cloned LWP.
11710 (get_pc): New.
11711 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11712 low target doesn't support retrieving the PC.
11713 (add_lwp): Set last_resume_kind to resume_continue.
11714 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11715 (linux_attach): Don't clear stop_expected. Set the lwp's
11716 last_resume_kind to resume_stop.
11717 (linux_detach_one_lwp): Don't check for removed breakpoints.
11718 (check_removed_breakpoint): Delete.
11719 (status_pending_p): Rename to ...
11720 (status_pending_p_callback): ... this. Don't check for removed
11721 breakpoints. Don't consider threads that are stopped from GDB's
11722 perspective.
11723 (linux_wait_for_lwp): Always read the stop_pc here.
11724 (cancel_breakpoint): New.
11725 (step_over_bkpt): New global.
11726 (linux_wait_for_event_1): Implement stepping over breakpoints.
11727 (gdb_wants_lwp_stopped): New.
11728 (gdb_wants_all_stopped): New.
11729 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11730 single-step traps here. Store the thread's last reported target
11731 wait status.
11732 (send_sigstop): Don't clear stop_expected. Always set it,
11733 instead.
11734 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11735 (cancel_finished_single_step): New.
11736 (cancel_finished_single_steps): New.
11737 (wait_for_sigstop): Don't cancel finished single-step traps here.
11738 (linux_resume_one_lwp): Don't check for removed breakpoints.
11739 Don't set `step' on non-hardware step archs.
11740 (linux_set_resume_request): Ignore resume_stop requests if already
11741 stopping or stopped. Set the lwp's last_resume_kind.
11742 (resume_status_pending_p): Don't check for removed breakpoints.
11743 (need_step_over_p): New.
11744 (start_step_over): New.
11745 (finish_step_over): New.
11746 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11747 requests. Clear the thread's last reported target waitstatus.
11748 Don't use the `suspended' flag. Don't consider pending breakpoints.
11749 (linux_resume): Start a step-over if necessary.
11750 (proceed_one_lwp): New.
11751 (proceed_all_lwps): New.
11752 (unstop_all_lwps): New.
11753 * linux-low.h (struct lwp_info): Rewrite comment for the
11754 `suspended' flag. Add the `stop_pc' field. Delete the
11755 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11756 Add `'last_resume_kind' and `need_step_over' fields.
11757 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11758 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11759 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11760 (set_raw_breakpoint_at): New.
11761 (set_breakpoint_at): Rewrite to use it.
11762 (reinsert_breakpoint_handler): Delete.
11763 (set_reinsert_breakpoint): New.
11764 (reinsert_breakpoint_by_bp): Delete.
11765 (delete_reinsert_breakpoints): New.
11766 (uninsert_breakpoint): Rewrite.
11767 (uninsert_breakpoints_at): New.
11768 (reinsert_breakpoint): Rewrite.
11769 (reinsert_breakpoints_at): New.
11770 (check_breakpoints): Rewrite.
11771 (breakpoint_here): New.
11772 (breakpoint_inserted_here): New.
11773 (check_mem_read): Adjust.
11774 * mem-break.h (breakpoints_supported, breakpoint_here)
11775 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11776 (reinsert_breakpoint_by_bp): Delete declaration.
11777 (delete_reinsert_breakpoints): Declare.
11778 (reinsert_breakpoint): Delete declaration.
11779 (reinsert_breakpoints_at): Declare.
11780 (uninsert_breakpoint): Delete declaration.
11781 (uninsert_breakpoints_at): Declare.
11782 (check_breakpoints): Adjust prototype.
11783 * server.h: Adjust include order.
11784 (struct thread_info): Declare here. Add a `last_status' field.
11785
30ba68cb
MS
117862010-03-23 Michael Snyder <msnyder@vmware.com>
11787
11788 * server.c (crc32): New function.
11789 (handle_query): Add handling for 'qCRC:' request.
11790
b9a881c2
PA
117912010-03-23 Pedro Alves <pedro@codesourcery.com>
11792
11793 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11794 lwp had been stopped by a watchpoint.
11795
e92d13d5
PA
117962010-03-16 Pedro Alves <pedro@codesourcery.com>
11797
11798 * server.h (internal_error): Declare.
11799 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11800 * utils.c (internal_error): New function.
11801
64daa791
AS
118022010-03-15 Andreas Schwab <schwab@redhat.com>
11803
11804 * configure.srv: Fix typo setting srv_regobj.
11805
f52cd8cd
PA
118062010-03-15 Pedro Alves <pedro@codesourcery.com>
11807
11808 * linux-low.c (fetch_register): Avoid passing a non string literal
11809 format to `error'.
11810 (usr_store_inferior_registers): Ditto.
11811
93ae6fdc
PA
118122010-03-14 Pedro Alves <pedro@codesourcery.com>
11813
11814 * linux-low.c (linux_write_memory): Bail out early if peeking
11815 memory failed.
11816
c3adc08c
PA
118172010-03-14 Pedro Alves <pedro@codesourcery.com>
11818
11819 * linux-low.h (struct lwp_info): New fields
11820 `stopped_by_watchpoint' and `stopped_data_address'.
11821 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11822 here, and cache them in the lwp object.
11823 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11824 directly.
11825 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11826 field.
11827 (linux_stopped_by_watchpoint): Rewrite.
11828 (linux_stopped_data_address): Rewrite.
11829
bce522a2
PA
118302010-03-06 Simo Melenius <simo.melenius@iki.fi>
11831
11832 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11833 switching the current inferior, not before.
11834
90884b2b
L
118352010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11836
11837 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11838 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11839 i386-linux.c and amd64-linux.c.
11840 (reg-i386.o): Removed.
11841 (reg-i386.c): Likewise.
11842 (reg-i386-linux.o): Likewise.
11843 (reg-i386-linux.c): Likewise.
11844 (reg-x86-64.o): Likewise.
11845 (reg-x86-64.c): Likewise.
11846 (reg-x86-64-linux.o): Likewise.
11847 (reg-x86-64-linux.c): Likewise.
11848 (i386.o): New.
11849 (i386.c): Likewise.
11850 (i386-linux.o): Likewise.
11851 (i386-linux.c): Likewise.
11852 (amd64.o): Likewise.
11853 (amd64.c): Likewise.
11854 (amd64-linux.o): Likewise.
11855 (amd64-linux.c): Likewise.
11856
11857 * configure.srv (srv_i386_regobj): New.
11858 (srv_i386_linux_regobj): Likewise.
11859 (srv_amd64_regobj): Likewise.
11860 (srv_amd64_linux_regobj): Likewise.
11861 (srv_i386_32bit_xmlfiles): Likewise.
11862 (srv_i386_64bit_xmlfiles): Likewise.
11863 (srv_i386_xmlfiles): Likewise.
11864 (srv_amd64_xmlfiles): Likewise.
11865 (srv_i386_linux_xmlfiles): Likewise.
11866 (srv_amd64_linux_xmlfiles): Likewise.
11867 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11868 srv_xmlfiles to $srv_i386_xmlfiles.
11869 (i[34567]86-*-mingw32ce*): Likewise.
11870 (i[34567]86-*-mingw*): Likewise.
11871 (i[34567]86-*-nto*): Likewise.
11872 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11873 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11874 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11875 (x86_64-*-linux*): Likewise.
11876
11877 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11878 (init_registers_amd64_linux): New.
11879 (x86_arch_setup): Replace init_registers_x86_64_linux with
11880 init_registers_amd64_linux.
11881
193f13e6
MK
118822010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11883
11884 * configure.ac: Check for libdl. If it is not available link against
11885 static libthread_db.
11886 * configure: Regenerate.
11887
85d721b8
PA
118882010-02-22 Pedro Alves <pedro@codesourcery.com>
11889
11890 PR9605
11891
11892 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11893 handing a read watchpoint.
11894 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11895
6076632b
DE
118962010-02-12 Doug Evans <dje@google.com>
11897
11898 * linux-low.c (linux_supports_tracefork_flag): Document.
11899 (linux_look_up_symbols): Add comment.
11900
3327ccf7
L
119012010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11902
11903 * regcache.c (supply_register): Clear regcache if buf is NULL.
11904
0718675c 119052010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 11906 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
11907
11908 * inferiors.c (find_inferior): Add function documentation.
11909 (unloaded_dll): Handle the case where the unloaded dll has not
11910 been previously registered in the dll list.
11911
177321bd
DJ
119122010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11913
11914 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11915 (thumb2_breakpoint): New.
11916 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11917
2b009048
DJ
119182010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11919
11920 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11921 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11922 breakpoints.
11923
3be029c7
PA
119242010-01-21 Pedro Alves <pedro@codesourcery.com>
11925
11926 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11927
18f5de3b
JK
119282010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11929
11930 * linux-s390-low.c (s390_collect_ptrace_register)
11931 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11932
3743bb4f
DE
119332010-01-21 Doug Evans <dje@google.com>
11934
14ce3065
DE
11935 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11936 (PTRACE_ARG4_TYPE): New macro.
11937 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11938 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11939 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11940 (usr_store_inferior_registers): Ditto.
11941 (linux_read_memory, linux_write_memory): Ditto.
11942 (linux_test_for_tracefork): Ditto.
11943
3743bb4f
DE
11944 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11945 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11946
8b315be5
PA
119472010-01-21 Pedro Alves <pedro@codesourcery.com>
11948
11949 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11950 target.
11951
85492558
PA
119522010-01-21 Pedro Alves <pedro@codesourcery.com>
11953
11954 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11955 prototype to take a regcache. Adjust.
11956
442ea881
PA
119572010-01-20 Pedro Alves <pedro@codesourcery.com>
11958
11959 * regcache.h (struct thread_info): Forward declare.
11960 (struct regcache): New.
11961 (new_register_cache): Adjust prototype.
11962 (get_thread_regcache): Declare.
11963 (free_register_cache): Adjust prototype.
11964 (registers_to_string, registers_from_string): Ditto.
11965 (supply_register, supply_register_by_name, collect_register)
11966 (collect_register_as_string, collect_register_by_name): Ditto.
11967 * regcache.c (struct inferior_regcache_data): Delete.
11968 (get_regcache): Rename to ...
11969 (get_thread_regcache): ... this. Adjust. Switch inferior before
11970 fetching registers.
11971 (regcache_invalidate_one): Adjust.
11972 (regcache_invalidate): Fix prototype.
11973 (new_register_cache): Return the new register cache.
11974 (free_register_cache): Change prototype.
11975 (realloc_register_cache): Adjust.
11976 (registers_to_string): Change prototype to take a regcache. Adjust.
11977 (registers_from_string): Ditto.
11978 (register_data): Ditto.
11979 (supply_register): Ditto.
11980 (supply_register_by_name): Ditto.
11981 (collect_register): Ditto.
11982 (collect_register_as_string): Ditto.
11983 (collect_register_by_name): Ditto.
11984 * server.c (process_serial_event): Adjust.
11985 * linux-low.h (regset_fill_func, regset_store_func): Change
11986 prototype.
11987 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11988 Change prototype.
11989 * linux-low.c (get_stop_pc): Adjust.
11990 (check_removed_breakpoint): Adjust.
11991 (linux_wait_for_event): Adjust.
11992 (linux_resume_one_lwp): Adjust.
11993 (fetch_register): Add regcache parameter. Adjust.
11994 (usr_store_inferior_registers): Ditto.
11995 (regsets_fetch_inferior_registers): Ditto.
11996 (regsets_store_inferior_registers): Ditto.
11997 (linux_fetch_registers, linux_store_registers): Ditto.
11998 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11999 regcache. Adjust.
43aaf8b6
PA
12000 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12001 Ditto.
442ea881
PA
12002 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12003 prototype to take a regcache.
12004 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12005 * remote-utils.c (convert_ascii_to_int, outreg)
12006 (prepare_resume_reply): Change prototype to take a regcache.
12007 Adjust.
12008 * target.h (struct target_ops) <fetch_registers, store_registers>:
12009 Change prototype to take a regcache.
12010 (fetch_inferior_registers, store_inferior_registers): Change
12011 prototype to take a regcache. Adjust.
12012 * proc-service.c (ps_lgetregs): Adjust.
12013 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12014 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12015 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12016 take a regcache. Adjust.
12017 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12018 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12019 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12020 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12021 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12022 (cris_cannot_fetch_register):
12023 (cris_breakpoint_at): Change prototype to take a regcache.
12024 Adjust.
12025 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12026 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12027 to take a regcache. Adjust.
12028 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12029 Adjust.
12030 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12031 take a regcache. Adjust.
12032 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12033 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12034 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12035 * linux-mips-low.c (mips_get_pc):
12036 (mips_set_pc): Change prototype to take a regcache. Adjust.
12037 (mips_reinsert_addr): Adjust.
12038 (mips_collect_register): Change prototype to take a regcache.
12039 Adjust.
12040 (mips_supply_register):
12041 (mips_collect_register_32bit, mips_supply_register_32bit)
12042 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12043 (mips_store_fpregset): Ditto.
43aaf8b6
PA
12044 * linux-ppc-low.c (ppc_supply_ptrace_register)
12045 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
12046 (parse_spufs_run): Adjust.
12047 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12048 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12049 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12050 take a regcache. Adjust.
12051 * linux-s390-low.c (s390_collect_ptrace_register)
12052 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12053 (s390_set_pc): Change prototype to take a regcache. Adjust.
12054 (s390_arch_setup): Adjust.
12055 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12056 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12057 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12058 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12059 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12060 regcache. Adjust.
12061 (sparc_breakpoint_at): Adjust.
12062 * linux-xtensa-low.c (xtensa_fill_gregset):
12063 (xtensa_store_gregset):
12064 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12065 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12066 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12067 prototype to take a regcache. Adjust.
12068 * win32-arm-low.c (arm_fetch_inferior_register)
12069 (arm_store_inferior_register): Change prototype to take a
12070 regcache. Adjust.
12071 * win32-i386-low.c (i386_fetch_inferior_register)
12072 (i386_store_inferior_register): Change prototype to take a
12073 regcache. Adjust.
12074 * win32-low.c (child_fetch_inferior_registers)
12075 (child_store_inferior_registers): Change prototype to take a
12076 regcache. Adjust.
12077 (win32_wait): Adjust.
12078 (win32_fetch_inferior_registers): Change prototype to take a
12079 regcache. Adjust.
12080 (win32_store_inferior_registers): Adjust.
12081 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12082 store_inferior_register>: Change prototype to take a regcache.
12083
60c3d7b0
DE
120842010-01-20 Doug Evans <dje@google.com>
12085
12086 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12087 #ifdef.
12088 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 12089 (W_STOPCODE): Provide definition if missing.
60c3d7b0 12090
dc146f7c
VP
120912010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12092
12093 * linux-low.c (linux_core_of_thread): New.
12094 (compare_ints, show_process, list_threads): New.
12095 (linux_qxfer_osdata): Report threads and cores.
12096 (linux_target_op): Register linux_core_of_thread.
12097 * remote-utils.c (prepare_resume_reply): Report the core.
12098 (buffer_xml_printf): Support %d specifier.
12099 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12100 New.
12101 (handle_query): Handle qXfer:threads. Announce availability
12102 thereof.
12103 * target.h (struct target_ops): New field core_of_thread.
12104
7803799a
UW
121052010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12106
12107 * Makefile.in (clean): Remove new generated files.
12108 (reg-s390.o, reg-s390.c): Remove rules.
12109 (reg-s390x.o, reg-s390x.c): Likewise.
12110 (s390-linux32.o, s390-linux32.c): Add rules.
12111 (s390-linux64.o, s390-linux64.c): Likewise.
12112 (s390x-linux64.o, s390x-linux64.c): Likewise.
12113 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12114 * linux-s390-low.c: Include <elf.h>.
12115 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12116 (init_registers_s390): Remove prototype.
12117 (init_registers_s390x): Likewise.
12118 (init_registers_s390_linux32): Add prototype.
12119 (init_registers_s390_linux64): Likewise.
12120 (init_registers_s390x_linux64): Likewise.
12121 (s390_num_regs_3264): New define.
12122 (s390_regmap_3264): New global variable.
12123 (s390_cannot_fetch_register): Remove obsolete check.
12124 (s390_cannot_store_register): Likewise.
12125 (s390_collect_ptrace_register): Handle upper/lower register halves.
12126 (s390_supply_ptrace_register): Likewise.
12127 (s390_fill_gregset): Update to register number changes.
12128 (s390_get_hwcap): New routine.
12129 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12130 Install appropriate regmap and register set.
12131
6e7ffa39
JB
121322010-01-01 Joel Brobecker <brobecker@adacore.com>
12133
12134 * server.c (gdbserver_version): Update copyright year to 2010.
12135 * gdbreplay.c (gdbreplay_version): Likewise.
12136
957f3f49
DE
121372009-12-28 Doug Evans <dje@google.com>
12138
12139 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12140 elf/external.h. Include <elf.h> instead but only if necessary.
12141
ca5c370d
PA
121422009-12-28 Pedro Alves <pedro@codesourcery.com>
12143
12144 * linux-low.c (linux_remove_process): Remove `detaching'
12145 parameter. Don't release/detach from thread_db here.
12146 (linux_kill): Release/detach from thread_db here, ...
12147 (linux_detach): ... and here, before actually detaching.
12148 (linux_wait_1): ... and here, when a process exits.
12149 * thread-db.c (any_thread_of): New.
12150 (thread_db_free): Switch the current inferior to a thread of the
12151 passed in process.
12152
4ee62156
DE
121532009-12-21 Doug Evans <dje@google.com>
12154
d90e6a88
DE
12155 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12156
c5f62d5f
DE
12157 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12158 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12159 warning ifndef __NR_tkill. Move setting of errno there too.
12160 Delete unnecessary resetting of errno after syscall.
12161 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12162
10e86dd7
DE
12163 * configure.ac: Check for dladdr.
12164 * config.in: Regenerate.
12165 * configure: Regenerate.
12166 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12167 (try_thread_db_load): Update.
12168
4ee62156
DE
12169 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12170
00f515da
DE
121712009-12-18 Doug Evans <dje@google.com>
12172
e9464885
DE
12173 * event-loop.c: Include unistd.h if it exists.
12174
07d4f67e
DE
12175 * linux-low.c (my_waitpid): Move definition away from being in
12176 between linux_tracefork_child/linux_test_for_tracefork.
12177
00f515da
DE
12178 * gdb_proc_service.h (psaddr_t): Fix type.
12179 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12180 signature to match glibc.
12181
1de1badb
DE
121822009-12-16 Doug Evans <dje@google.com>
12183
12184 * linux-low.c (linux_read_memory): Fix argument to read.
12185
aeeb81d1
PA
121862009-11-26 Pedro Alves <pedro@codesourcery.com>
12187
12188 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12189 events, don't leave current_inferior pointing at null.
12190
10357975
PA
121912009-11-26 Pedro Alves <pedro@codesourcery.com>
12192
12193 * win32-low.c (LOG): Delete.
12194 (OUTMSG): Output to stderr.
12195 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12196 on compile time LOG macro.
12197 (win32_wait): Fix debug output.
12198
cf6e3471
PA
121992009-11-26 Pedro Alves <pedro@codesourcery.com>
12200
12201 * win32-low.c (win32_add_one_solib): If the dll name is
12202 "ntdll.dll", prepend the system directory to the dll path.
12203
0c85e18e
MK
122042009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12205
12206 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12207
9ac544ce 122082009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 12209 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
12210
12211 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12212 * configure.ac: Check for __mcoldfire__ and set
12213 gdb_cv_m68k_is_coldfire.
12214 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12215 reg-cf.o and reg-m68k.o.
12216 * configure: Regenerated.
12217
fd7dd3e6
PA
122182009-11-16 Pedro Alves <pedro@codesourcery.com>
12219
12220 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12221 Pass it to thread_db_free.
12222 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12223 proper `detaching' argument to linux_remove_process.
12224 * linux-low.h (thread_db_free): Add `detaching' parameter.
12225 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12226 to thread_db_free.
12227 (thread_db_free): Add `detaching' parameter. Only
12228 call td_ta_clear_event if detaching from process.
12229
75aa492e
MK
122302009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12231
12232 * thread-db.c (thread_db_free): Fix typo.
12233
21e1bee4
PP
122342009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12235
12236 PR gdb/10838
12237 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12238
8838b45e
NS
122392009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12240
12241 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12242 with an i686 compiler.
12243 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12244 needed.
12245 * configure: Rebuilt.
12246
8a35fb51
SL
122472009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12248
12249 PR gdb/10783
12250
12251 * server.c (handle_search_memory_1): Correct read_addr initialization
12252 in loop for searching subsequent chunks.
12253
96f15937
PP
122542009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12255
12256 * configure.ac: New --with-libthread-db option.
12257 * thread-db.c: Allow direct dependence on libthread_db.
12258 (thread_db_free): Adjust.
12259 * config.in: Regenerate.
12260 * configure: Likewise.
889bf7c5 12261
5f7d1694
PP
122622009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12263
12264 PR gdb/10757
12265 * thread-db.c (attach_thread): New function.
12266 (maybe_attach_thread): Return success/failure.
12267 (find_new_threads_callback): Adjust.
889bf7c5
PA
12268 (thread_db_find_new_threads): Loop until no new threads.
12269
88e3b899
PA
122702009-10-13 Pedro Alves <pedro@codesourcery.com>
12271
12272 * proc-service.c (ps_lgetregs): Formatting.
12273
cdbfd419
PP
122742009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12275
12276 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12277 * configure.ac: Adjust.
12278 * linux-low.h (struct process_info_private): Move members to struct
12279 thread_db.
12280 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12281 * linux-low.c (linux_remove_process): Adjust.
12282 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12283 * server.c (handle_query): Move code ...
12284 (handle_monitor_command): ... here. New function.
12285 * target.h (struct target_ops): New member.
12286 * thread-db.c (struct thread_db): New.
12287 (libthread_db_search_path): New variable.
12288 (thread_db_create_event, thread_db_enable_reporting)
12289 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12290 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12291 (try_thread_db_load_1, dladdr_to_soname): New functions.
12292 (try_thread_db_load, thread_db_load_search): New functions.
12293 (thread_db_init): Search for libthread_db.
12294 (thread_db_free): New function.
12295 (thread_db_handle_monitor_command): Likewise.
12296 * config.in: Regenerate.
12297 * configure: Regenerate.
889bf7c5 12298
4168d2d6
UW
122992009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12300
12301 * spu-low.c (spu_kill): Wait for inferior to terminate.
12302 Call clear_inferiors.
12303 (spu_detach): Call clear_inferiors.
12304
81ecdfbb
RW
123052009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12306
12307 * aclocal.m4: Regenerate.
12308 * config.in: Likewise.
12309 * configure: Likewise.
12310
0b9ff2c0
UW
123112009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12312
12313 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12314 (parse_spufs_run): New function.
12315 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12316 (ppc_breakpoint_at): Handle SPU breakpoints.
12317
efcbbd14
UW
123182009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12319
12320 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12321 (SPUFS_MAGIC): Define.
12322 (spu_enumerate_spu_ids): New function.
12323 (linux_qxfer_spu): New function.
12324 (linux_target_ops): Install linux_qxfer_spu.
12325
f4d9bade
UW
123262009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12327
12328 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12329 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12330 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12331 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12332 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12333 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12334 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12335 (init_registers_powerpc_cell32l): Add prototype.
12336 (init_registers_powerpc_cell64l): Likewise.
12337 (ppc_arch_setup): Detect Cell/B.E. architecture.
12338
96e946ca
RW
123392009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12340
12341 * Makefile.in (datarootdir): New variable.
12342
58d6951d
DJ
123432009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12344
12345 * linux-low.c (linux_write_memory): Update debugging output.
12346 * Makefile.in (clean): Add new descriptions.
12347 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12348 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12349 * configure.srv: Add new files for arm*-*-linux*.
12350 * linux-arm-low.c: Add new declarations.
12351 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12352 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12353 (HWCAP_VFPv3D16): New.
12354 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12355 instead of __IWMMXT__.
12356 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12357 (arm_arch_setup): New.
12358 (target_regsets): Remove #ifdef. Add VFP regset.
12359 (the_low_target): Use arm_arch_setup.
12360
12b42a12
DJ
123612009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12362
12363 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12364 the main thread again.
12365
ac8c974e
AR
123662009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12367
12368 Adding Neutrino gdbserver.
12369 * configure: Regenerated.
12370 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12371 * configure.srv (i[34567]86-*-nto*): New target.
12372 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12373 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12374 (nto_comctrl) [__QNX__]: New function.
12375 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12376
4424e0c3 123772009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
12378
12379 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12380 srv_tgtobj.
12381
912cf4ba
PA
123822009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12383 Pedro Alves <pedro@codesourcery.com>
12384
12385 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12386 don't support CONTEXT_EXTENDED_REGISTERS.
12387 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12388 (the_low_target): Install them.
12389 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12390 failing with ERROR_PIPE_NOT_CONNECTED.
12391
aa5ca48f
DE
123922009-06-30 Doug Evans <dje@google.com>
12393 Pierre Muller <muller@ics.u-strasbg.fr>
12394
12395 Add h/w watchpoint support to x86-linux, win32-i386.
12396 * Makefile.in (SFILES): Add i386-low.c
12397 (i386_low_h): Define.
12398 (i386-low.o): Add dependencies.
12399 (linux-x86-low.o): Add i386-low.h dependency.
12400 (win32-i386-low.o): Ditto.
12401 * i386-low.c: New file.
12402 * i386-low.h: New file.
12403 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12404 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12405 * linux-low.c (linux_add_process): Initialize arch_private.
12406 (linux_remove_process): Free arch_private.
12407 (add_lwp): Initialize arch_private.
12408 (delete_lwp): Free arch_private.
12409 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12410 provided.
12411 * linux-low.h (process_info_private): New member arch_private.
12412 (lwp_info): New member arch_private.
12413 (linux_target_ops): New members new_process, new_thread,
12414 prepare_to_resume.
12415 (ptid_of): New macro.
12416 * linux-x86-low.c: Include stddef.h, i386-low.h.
12417 (arch_process_info): New struct.
12418 (arch_lwp_info): New struct.
12419 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12420 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12421 (i386_dr_low_get_status): New function.
12422 (x86_insert_point, x86_remove_point): New functions.
12423 (x86_stopped_by_watchpoint): New function.
12424 (x86_stopped_data_address): New function.
12425 (x86_linux_new_process, x86_linux_new_thread): New functions.
12426 (x86_linux_prepare_to_resume): New function.
12427 (the_low_target): Add entries for insert_point, remove_point,
12428 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12429 prepare_to_resume.
12430 * server.c (debug_hw_points): New global.
12431 (monitor_show_help): Document set debug-hw-points.
12432 (handle_query): Process "set debug-hw-points".
12433 * server.h (debug_hw_points): Declare.
12434 (paddress): Declare.
12435 * utils.c (NUMCELLS, CELLSIZE): New macros.
12436 (get_sell, xsnprintf, paddress): New functions.
12437 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12438 remove_point, stopped_by_watchpoint, stopped_data_address.
12439 * win32-i386-low.c: Include i386-low.h.
12440 (debug_reg_state): Replaces dr.
12441 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12442 (i386_dr_low_get_status): New function.
12443 (i386_insert_point, i386_remove_point): New functions.
12444 (i386_stopped_by_watchpoint): New function.
12445 (i386_stopped_data_address): New function.
12446 (i386_initial_stuff): Update.
12447 (get_thread_context,set_thread_context,i386_thread_added): Update.
12448 (the_low_target): Add entries for insert_point,
12449 remove_point, stopped_by_watchpoint, stopped_data_address.
12450 * win32-low.c (win32_insert_watchpoint): New function.
12451 (win32_remove_watchpoint): New function.
12452 (win32_stopped_by_watchpoint): New function.
12453 (win32_stopped_data_address): New function.
12454 (win32_target_ops): Add entries for insert_watchpoint,
12455 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12456 * win32-low.h (win32_target_ops): New members insert_point,
12457 remove_point, stopped_by_watchpoint, stopped_data_address.
12458
d993e290
PA
124592009-06-25 Pedro Alves <pedro@codesourcery.com>
12460
12461 * server.c (process_serial_event): Re-return unsupported, not
12462 error, if the type isn't recognized. Re-allow supporting only
12463 insert or remove packets. Also call require_running for
12464 breakpoints. Add missing break statement to default case. Tidy.
12465 * target.h (struct target_ops): Rename insert_watchpoint to
12466 insert_point, and remove_watchpoint to remove_point.
12467
12468 * linux-low.h (struct linux_target_ops): Likewise.
12469 * linux-low.c (linux_insert_watchpoint): Rename to ...
12470 (linux_insert_point): ... this. Adjust.
12471 (linux_remove_watchpoint): Rename to ...
12472 (linux_remove_point): ... this. Adjust.
12473 (linux_target_ops): Adjust.
12474 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12475 (cris_insert_point): ... this.
12476 (cris_remove_watchpoint): Rename to ...
12477 (cris_remove_point): ... this.
12478 (the_low_target): Adjust.
12479
0f54c268
PM
124802009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12481
12482 * server.c (handle_v_kill): Pass signal_pid to
12483 kill_inferior if multi_process is zero.
12484
c6314022
AR
124852009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12486
12487 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12488 * target.h (target_ops): Comment for *_watchpoint to make it clear
12489 the functions can get types '0' and '1'.
12490
4463ce24
AR
124912009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12492
12493 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12494 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12495 * regcache.c (get_regcache): Likewise.
12496 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12497 * win32-low.c (child_fetch_inferior_registers): Remove check for
12498 regno 0.
12499
cf8fd78b
PA
125002009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12501 Pedro Alves <pedro@codesourcery.com>
12502
12503 * target.h (struct target_ops) <supports_multi_process>: New
12504 callback.
12505 (target_supports_multi_process): New.
12506 * server.c (handle_query): Even if GDB reports support, only
12507 enable multi-process if the target also supports it. Report
12508 multi-process support only if the target backend supports it.
12509 * linux-low.c (linux_supports_multi_process): New function.
12510 (linux_target_ops): Install it as target_supports_multi_process
12511 callback.
12512
47c0c975
DE
125132009-05-24 Doug Evans <dje@google.com>
12514
e09875d4
DE
12515 Global renaming of find_thread_pid to find_thread_ptid.
12516 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12517 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12518 All callers updated.
12519
e27d73f6
DE
12520 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12521 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12522 directly.
12523
47c0c975
DE
12524 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12525 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12526 (linux_resume_one_lwp): Ditto.
12527
2acc282a
DE
125282009-05-23 Doug Evans <dje@google.com>
12529
12530 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12531 from struct inferior_list_entry * to struct lwp_info *.
12532 All callers updated.
12533
9f1036c1
DE
125342009-05-13 Doug Evans <dje@google.com>
12535
12536 * linux-x86-low.c: Don't include assert.h.
12537 (x86_siginfo_fixup): Use fatal, not assert.
12538 (x86_arch_setup): Fix comment.
12539
d0722149
DE
125402009-05-12 Doug Evans <dje@google.com>
12541
12542 Biarch support for i386/amd64 gdbserver.
12543 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12544 Add linux-x86-low.c.
12545 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12546 (linux-x86-low.o): Add.
12547 * linux-x86-64-low.c: Delete.
12548 * linux-i386-low.c: Delete.
12549 * linux-x86-low.c: New file.
12550 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12551 linux-x86-low.o.
12552 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12553 linux-x86-low.o.
12554 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12555 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12556 (linux_child_pid_to_exec_file): New function.
12557 (elf_64_header_p, elf_64_file_p): New functions.
12558 (siginfo_fixup): New function.
12559 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12560 give target a chance to convert layout.
12561 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12562 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12563
fdeb2a12
DE
125642009-05-07 Doug Evans <dje@google.com>
12565
12566 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12567 (regsets_store_inferior_registers): Ditto.
12568
a6dbe5df
PA
125692009-05-06 Pedro Alves <pedro@codesourcery.com>
12570
12571 PR server/10048
12572
12573 * linux-low.c (must_set_ptrace_flags): Delete.
12574 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12575 of the global.
12576 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12577 `lwp->must_set_ptrace_flags' instead.
ba42693b 12578 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12579 (linux_wait_1): ... not here.
12580
5091eb23
DE
125812009-04-30 Doug Evans <dje@google.com>
12582
9f767825
DE
12583 * inferiors.c (started_inferior_callback): New function.
12584 (attached_inferior_callback): New function.
12585 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12586 * server.c (print_started_pid, print_attached_pid): New functions.
12587 (detach_or_kill_for_exit): New function.
12588 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12589 * server.h (have_started_inferiors_p): Declare.
12590 (have_attached_inferiors_p): Declare.
12591
5091eb23
DE
12592 * inferiors.c (remove_process): Fix memory leak, free process.
12593 * linux-low.c (linux_remove_process): New function.
12594 (linux_kill): Call it instead of remove_process.
12595 (linux_detach, linux_wait_1): Ditto.
12596
155c8968
PA
125972009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12598
12599 * configure.srv: Add x86 Windows CE target.
12600
7fe519cb
UW
126012009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12602
12603 * inferiors.c (get_thread_process): Make global.
12604 * server.h (get_thread_process): Add prototype.
12605 * thread-db.c (find_one_thread): Use get_thread_process
12606 instead of current_process.
12607 (thread_db_get_tls_address): Do not crash if called when
12608 thread layer is not yet initialized.
12609
5472f405
UW
126102009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12611
12612 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12613 * spu-low.c (current_tid): Rename to ...
12614 (current_ptid): ... this.
12615 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12616 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12617 ptid_get_lwp (current_ptid) instead of current_tid.
12618 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12619 instead of current_tid. Use find_process_pid to verify pid
12620 argument is valid. Pass proper argument to remove_process.
12621 (spu_thread_alive): Compare current_ptid instead of current_tid.
12622 (spu_resume): Likewise.
12623
55ac2b99
PA
126242009-04-02 Pedro Alves <pedro@codesourcery.com>
12625
12626 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12627 variable.
12628
95954743
PA
126292009-04-01 Pedro Alves <pedro@codesourcery.com>
12630
12631 Implement the multiprocess extensions, and add linux multiprocess
12632 support.
12633
12634 * server.h (ULONGEST): Declare.
12635 (struct ptid, ptid_t): New.
12636 (minus_one_ptid, null_ptid): Declare.
12637 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12638 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12639 (struct inferior_list_entry): Change `id' type from unsigned from
12640 to ptid_t.
12641 (struct sym_cache, struct breakpoint, struct
12642 process_info_private): Forward declare.
12643 (struct process_info): Declare.
12644 (current_process): Declare.
12645 (all_processes): Declare.
12646 (initialize_inferiors): Declare.
12647 (add_thread): Adjust to use ptid_t.
12648 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12649 (add_process, remove_process, find_thread_pid): Declare.
12650 (find_inferior_id): Adjust to use ptid_t.
12651 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12652 (multi_process): Declare.
12653 (push_event): Adjust to use ptid_t.
12654 (read_ptid, write_ptid): Declare.
12655 (prepare_resume_reply): Adjust to use ptid_t.
12656 (clear_symbol_cache): Declare.
12657 * inferiors.c (all_processes): New.
12658 (null_ptid, minus_one_ptid): New.
12659 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12660 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12661 (add_thread): Change unsigned long to ptid. Remove gdb_id
12662 parameter. Adjust.
12663 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12664 (gdb_id_to_thread): Rename to ...
12665 (find_thread_pid): ... this. Change unsigned long to ptid.
12666 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12667 (loaded_dll, pull_pid_from_list): Adjust.
12668 (add_process, remove_process, find_process_pid)
12669 (get_thread_process, current_process, initialize_inferiors): New.
12670 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12671 (struct target_waitstatus) <related_pid>: Ditto.
12672 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12673 return type to int.
12674 (struct target_ops) <join>: Add `pid' argument.
12675 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12676 (struct target_ops) <wait>: Add `ptid' field. Change return type
12677 to ptid.
12678 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12679 (mywait): Add `ptid' argument. Change return type to ptid_t.
12680 (target_pid_to_str): Declare.
12681 * target.c (set_desired_inferior): Adjust to use ptids.
12682 (mywait): Add new `ptid' argument. Adjust.
12683 (target_pid_to_str): New.
12684 * mem-break.h (free_all_breakpoints): Declare.
12685 * mem-break.c (breakpoints): Delelete.
12686 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12687 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12688 to use per-process breakpoint list.
12689 (free_all_breakpoints): New.
12690 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12691 (symbol_cache, all_symbols_looked_up): Delete.
12692 (hexchars): New.
12693 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12694 read_ptid): New.
12695 (prepare_resume_reply): Change ptid argument's type from unsigned
12696 long to ptid_t. Adjust. Implement W;process and X;process.
12697 (free_sym_cache, clear_symbol_cache): New.
12698 (look_up_one_symbol): Adjust to per-process symbol cache. *
12699 * server.c (cont_thread, general_thread, step_thread): Change type
12700 to ptid_t.
12701 (attached): Delete.
12702 (multi_process): New.
12703 (last_ptid): Change type to ptid_t.
12704 (struct vstop_notif) <ptid>: Change type to ptid_t.
12705 (queue_stop_reply, push_event): Change `ptid' argument's type to
12706 ptid_t.
12707 (discard_queued_stop_replies): Add `pid' argument.
12708 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12709 changes. Don't reference the `attached' global.
12710 (attach_inferior): Adjust to mywait interface changes.
12711 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12712 features. Handle and report "multiprocess+". Handle
12713 "qAttached:PID".
12714 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12715 changes.
12716 (handle_v_kill): New.
12717 (handle_v_stopped): Adjust to use target_pid_to_str.
12718 (handle_v_requests): Allow multiple attaches and runs when
12719 multiprocess extensions are in effect. Handle "vKill".
12720 (myresume): Adjust to use ptids.
12721 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12722 (handle_status): Adjust to discard_queued_stop_replies interface
12723 change.
12724 (first_thread_of, kill_inferior_callback)
12725 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12726 (main): Call initialize_inferiors. Adjust to use ptids, killing
12727 and detaching from all inferiors. Handle multiprocess packet
12728 variants.
12729 * linux-low.h: Include gdb_proc_service.h.
12730 (struct process_info_private): New.
12731 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12732 <lwpid_of>: Use ptid_get_lwp.
12733 (get_lwp_thread): Adjust.
12734 (struct lwp_info): Add `dead' member.
12735 (find_lwp_pid): Declare.
12736 * linux-low.c (thread_db_active): Delete.
12737 (new_inferior): Adjust comment.
12738 (inferior_pid): Delete.
12739 (linux_add_process): New.
12740 (handle_extended_wait): Adjust.
12741 (add_lwp): Change unsigned long to ptid.
12742 (linux_create_inferior): Add process to processes table. Adjust
12743 to use ptids. Don't set new_inferior here.
12744 (linux_attach_lwp): Rename to ...
12745 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12746 it. Adjust to use ptids.
12747 (linux_attach_lwp): New.
12748 (linux_attach): Add process to processes table. Don't set
12749 new_inferior here.
12750 (struct counter): New.
12751 (second_thread_of_pid_p, last_thread_of_process_p): New.
12752 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12753 multiple processes.
12754 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12755 processes. Remove process from process table.
12756 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12757 to multiple processes.
12758 (any_thread_of): New.
12759 (linux_detach): Add `pid' argument, and handle it. Remove process
12760 from processes table.
12761 (linux_join): Add `pid' argument. Handle it.
12762 (linux_thread_alive): Change unsighed long argument to ptid_t.
12763 Consider dead lwps as not being alive.
12764 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12765 threads we're not interested in.
12766 (same_lwp, find_lwp_pid): New.
12767 (linux_wait_for_lwp): Change `pid' argument's type from int to
12768 ptid_t. Adjust.
12769 (linux_wait_for_event): Rename to ...
12770 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12771 from int to ptid_t. Adjust.
12772 (linux_wait_for_event): New.
12773 (linux_wait_1): Add `ptid' argument. Change return type to
12774 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12775 that exit from the process table.
12776 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12777 Adjust.
12778 (mark_lwp_dead): New.
12779 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12780 stopping all threads, mark its main lwp as dead.
12781 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12782 ptids.
12783 (fetch_register, usr_store_inferior_registers)
12784 (regsets_fetch_inferior_registers)
12785 (regsets_store_inferior_registers, linux_read_memory)
12786 (linux_write_memory): Inline `inferior_pid'.
12787 (linux_look_up_symbols): Adjust to use per-process
12788 `thread_db_active'.
12789 (linux_request_interrupt): Adjust to use ptids.
12790 (linux_read_auxv): Inline `inferior_pid'.
12791 (initialize_low): Don't reference thread_db_active.
12792 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12793 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12794 (ps_getpid): Return the pid of the current inferior.
12795 * thread-db.c (proc_handle, thread_agent): Delete.
12796 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12797 per-process data.
12798 (find_one_thread): Change argument type to ptid_t. Adjust to
12799 per-process data.
12800 (maybe_attach_thread): Adjust to per-process data and ptids.
12801 (thread_db_find_new_threads): Ditto.
12802 (thread_db_init): Ditto.
12803 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12804 processes table. Adjust to use ptids.
12805 (spu_kill, spu_detach): Adjust interface. Remove process from
12806 processes table.
12807 (spu_join, spu_thread_alive): Adjust interface.
12808 (spu_wait): Adjust interface. Remove process from processes
12809 table. Adjust to use ptids.
12810 * win32-low.c (current_inferior_tid): Delete.
12811 (current_inferior_ptid): New.
12812 (debug_event_ptid): New.
12813 (thread_rec): Take a ptid. Adjust.
12814 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12815 (child_delete_thread): Ditto.
12816 (do_initial_child_stuff): Add `attached' argument. Add process to
12817 processes table.
12818 (child_fetch_inferior_registers, child_store_inferior_registers):
12819 Adjust.
12820 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12821 (win32_attach): Pass 1 to do_initial_child_stuff.
12822 (win32_kill): Adjust interface. Remove process from processes
12823 table.
12824 (win32_detach): Ditto.
12825 (win32_join): Adjust interface.
12826 (win32_thread_alive): Take a ptid.
12827 (win32_resume): Adjust to use ptids.
12828 (get_child_debug_event): Ditto.
12829 (win32_wait): Adjust interface. Remove exiting process from
12830 processes table.
12831
bd99dc85
PA
128322009-04-01 Pedro Alves <pedro@codesourcery.com>
12833
12834 Non-stop mode support.
12835
12836 * server.h (non_stop): Declare.
12837 (gdb_client_data, handler_func): Declare.
12838 (delete_file_handler, add_file_handler, start_event_loop):
12839 Declare.
12840 (handle_serial_event, handle_target_event, push_event)
12841 (putpkt_notif): Declare.
12842 * target.h (enum resume_kind): New.
12843 (struct thread_resume): Replace `step' field by `kind' field.
12844 (TARGET_WNOHANG): Define.
12845 (struct target_ops) <wait>: Add `options' argument.
12846 <supports_non_stop, async, start_non_stop>: New fields.
12847 (target_supports_non_stop, target_async): New.
12848 (start_non_stop): Declare.
12849 (mywait): Add `options' argument.
12850 * target.c (mywait): Add `options' argument. Print child exit
12851 notifications here.
12852 (start_non_stop): New.
12853 * server.c (non_stop, own_buf, mem_buf): New globals.
12854 (struct vstop_notif): New.
12855 (notif_queue): New global.
12856 (queue_stop_reply, push_event, discard_queued_stop_replies)
12857 (send_next_stop_reply): New.
12858 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12859 interface changes.
12860 (attach_inferior): In non-stop mode, don't wait for the target
12861 here.
12862 (handle_general_set): Handle QNonStop.
12863 (handle_query): When handling qC, return the current general
12864 thread, instead of the first thread of the list.
12865 (handle_query): If the backend supports non-stop mode, include
12866 QNonStop+ in the qSupported query response.
12867 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12868 and non-stop mode.
12869 (handle_v_attach, handle_v_run): Handle non-stop mode.
12870 (handle_v_stopped): New.
12871 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12872 (myresume): Adjust to use resume_kind. Handle non-stop.
12873 (queue_stop_reply_callback): New.
12874 (handle_status): Handle non-stop mode.
12875 (main): Clear non_stop flag on reconnection. Use the event-loop.
12876 Refactor serial protocol handling from here ...
12877 (process_serial_event): ... to this new function. When GDB
12878 selects any thread, select one here. In non-stop mode, wait until
12879 GDB acks all pending events before exiting.
12880 (handle_serial_event, handle_target_event): New.
12881 * remote-utils.c (remote_open): Install remote_desc in the event
12882 loop.
12883 (remote_close): Remove remote_desc from the event loop.
12884 (putpkt_binary): Rename to...
12885 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12886 (putpkt_binary): New as wrapper around putpkt_binary_1.
12887 (putpkt_notif): New.
12888 (prepare_resume_reply): In non-stop mode, don't change the
12889 general_thread.
12890 * event-loop.c: New.
12891 * Makefile.in (OBJ): Add event-loop.o.
12892 (event-loop.o): New rule.
12893
12894 * linux-low.h (pid_of): Moved here.
12895 (lwpid_of): New.
12896 (get_lwp_thread): Use lwpid_of.
12897 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12898 * linux-low.c (pid_of): Delete.
12899 (inferior_pid): Use lwpid_of.
12900 (linux_event_pipe): New.
12901 (target_is_async_p): New.
12902 (delete_lwp): New.
12903 (handle_extended_wait): Use lwpid_of.
12904 (add_lwp): Don't set lwpid field.
12905 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12906 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12907 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12908 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12909 first. Adjust to linux_wait_for_event interface changes. Use
12910 lwpid_of.
12911 (linux_detach): Don't delete the main lwp here.
12912 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12913 (status_pending_p): Don't consider explicitly suspended lwps.
12914 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12915 pointer. Add OPTIONS argument. Change return type to int. Use
12916 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12917 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12918 pointer. Add status pointer argument. Return a pid instead of a
12919 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12920 changes. In non-stop mode, don't switch to a random thread.
12921 (linux_wait): Rename to...
12922 (linux_wait_1): ... this. Add target_options argument, and handle
12923 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12924 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12925 clean exit and signal exit code. Don't stop all threads in
12926 non-stop mode. In all-stop mode, only stop all threads when
12927 reporting a stop to GDB. Handle explicit thread stop requests.
12928 (async_file_flush, async_file_mark): New.
12929 (linux_wait): New.
12930 (send_sigstop): Use lwpid_of.
12931 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12932 interface changes. In non-stop mode, don't switch to a random
12933 thread.
12934 (linux_resume_one_lwp): Use lwpid_of.
12935 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12936 (linux_resume_one_thread): ... this. Handle resume_stop. In
12937 non-stop mode, don't look for pending flag in all threads.
12938 (resume_status_pending_p): Don't consider explicitly suspended
12939 threads.
12940 (my_waitpid): Reimplement. Emulate __WALL.
12941 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12942 Use lwpid_of.
12943 (sigchld_handler, linux_supports_non_stop, linux_async)
12944 (linux_start_non_stop): New.
12945 (linux_target_ops): Register linux_supports_non_stop, linux_async
12946 and linux_start_non_stop.
12947 (initialize_low): Install SIGCHLD handler.
12948 * thread-db.c (thread_db_create_event, find_one_thread)
12949 (thread_db_get_tls_address): Use lwpid_of.
12950 * win32-low.c (win32_detach): Adjust to use resume_kind.
12951 (win32_wait): Add `options' argument.
12952 * spu-low.c (spu_resume): Adjust to use resume_kind.
12953 (spu_wait): Add `options' argument.
12954
5b1c542e
PA
129552009-04-01 Pedro Alves <pedro@codesourcery.com>
12956
12957 Decouple target code from remote protocol.
12958
12959 * target.h (enum target_waitkind): New.
12960 (struct target_waitstatus): New.
12961 (struct target_ops) <wait>: Return an unsigned long. Take a
12962 target_waitstatus pointer instead of a char pointer.
12963 (mywait): Likewise.
12964 * target.c (mywait): Change prototype to return an unsigned long.
12965 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12966 * server.h (thread_from_wait, old_thread_from_wait): Delete
12967 declarations.
12968 (prepare_resume_reply): Change prototype to take a
12969 target_waitstatus.
12970 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12971 (last_status, last_ptid): New.
12972 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12973 pid instead of a signal.
12974 (attach_inferior): Remove "status" and "signal" parameters.
12975 Adjust.
12976 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12977 not as an address.
12978 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12979 (handle_v_requests, myresume): Remove "status" and "signal"
12980 parameters. Adjust.
12981 (handle_status): New.
12982 (main): Delete local `status'. Adjust.
12983 * remote-utils.c: Include target.h.
12984 (prepare_resume_reply): Change prototype to take a
12985 target_waitstatus. Adjust.
12986
12987 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12988 interface.
12989 * spu-low.c (spu_wait): Adjust.
12990 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12991 Delete.
12992 (win32_wait): Adjust.
12993
2bd7c093
PA
129942009-04-01 Pedro Alves <pedro@codesourcery.com>
12995
12996 * target.h (struct thread_resume): Delete leave_stopped member.
12997 (struct target_ops): Add a `n' argument to the `resume' callback.
12998 * server.c (start_inferior): Adjust.
12999 (handle_v_cont, myresume): Adjust.
13000 * linux-low.c (check_removed_breakpoint): Adjust to resume
13001 interface change, and to removed leave_stopped field.
13002 (resume_ptr): Delete.
13003 (struct thread_resume_array): New.
13004 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13005 resume interface change.
13006 (linux_continue_one_thread, linux_queue_one_thread)
13007 (resume_status_pending_p): Check if the resume field is NULL
13008 instead of checking the leave_stopped member.
13009 (linux_resume): Adjust to the target resume interface change.
13010 * spu-low.c (spu_resume): Adjust to the target resume interface
13011 change.
13012 * win32-low.c (win32_detach, win32_resume): Ditto.
13013
c35fafde
PA
130142009-04-01 Pedro Alves <pedro@codesourcery.com>
13015
13016 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13017 flag.
13018 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13019 pending.
13020 (linux_continue_one_thread): Only preserve the stepping flag if
13021 there's a pending breakpoint.
13022
0a59d50b
PA
130232009-03-31 Pedro Alves <pedro@codesourcery.com>
13024
13025 * server.c (main): After the inferior having exited, call
13026 remote_close before exiting gdbserver.
13027
f04c6d38
TJB
130282009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13029
13030 Fix size of FPSCR in Power 7 processors.
13031 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13032 (PPC_FEATURE_HAS_DFP): New #define.
13033 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13034 size of the FPSCR.
13035
78e5cee6
PA
130362009-03-23 Pedro Alves <pedro@codesourcery.com>
13037
13038 * server.c (handle_query) Whitespace and formatting.
13039
1b3f6016
PA
130402009-03-22 Pedro Alves <pedro@codesourcery.com>
13041
13042 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13043 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13044 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13045 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13046 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13047 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13048 Makefile.in, configure.ac: Fix whitespace throughout.
13049 * configure: Regenerate.
13050
a07b2135
PA
130512009-03-22 Pedro Alves <pedro@codesourcery.com>
13052
13053 * inferiors.c (find_inferior): Make it safe for the callback
13054 function to delete the currently iterated inferior.
13055
67cc2626
PA
130562009-03-22 Pedro Alves <pedro@codesourcery.com>
13057
13058 * Makefile.in (linuw_low_h): Move higher.
13059 (thread-db.o): Depend on $(linux_low_h).
13060
54a0b537
PA
130612009-03-17 Pedro Alves <pedro@codesourcery.com>
13062
13063 Rename "process" to "lwp" throughout.
13064
13065 * linux-low.c (all_processes): Rename to...
13066 (all_lwps): ... this.
13067 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13068 (add_process): Rename to ...
13069 (add_lwp): ... this. Adjust.
13070 (linux_create_inferior): Adjust.
13071 (linux_attach_lwp): Adjust.
13072 (linux_attach): Adjust.
13073 (linux_kill_one_process): Rename to ...
13074 (linux_kill_one_lwp): ... this. Adjust.
13075 (linux_kill): Adjust.
13076 (linux_detach_one_process): Rename to ...
13077 (linux_detach_one_lwp): ... this. Adjust.
13078 (linux_detach): Adjust.
13079 (check_removed_breakpoint): Adjust.
13080 (status_pending_p): Adjust.
13081 (linux_wait_for_process): Rename to ...
13082 (linux_wait_for_lwp): ... this. Adjust.
13083 (linux_wait_for_event): Adjust.
13084 (send_sigstop): Adjust.
13085 (wait_for_sigstop): Adjust.
13086 (stop_all_processes): Rename to ...
13087 (stop_all_lwps): ... this.
13088 (linux_resume_one_process): Rename to ...
13089 (linux_resume_one_lwp): ... this. Adjust.
13090 (linux_set_resume_request, linux_continue_one_thread)
13091 (linux_queue_one_thread, resume_status_pending_p)
13092 (usr_store_inferior_registers, regsets_store_inferior_registers)
13093 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13094 Adjust.
13095 * linux-low.h (get_process): Rename to ...
13096 (get_lwp): ... this. Adjust.
13097 (get_thread_process): Rename to ...
13098 (get_thread_lwp): ... this. Adjust.
13099 (get_process_thread): Rename to ...
13100 (get_lwp_thread): ... this. Adjust.
13101 (struct process_info): Rename to ...
13102 (struct lwp_info): ... this.
13103 (all_processes): Rename to ...
13104 (all_lwps): ... this.
13105 * proc-service.c (ps_lgetregs): Adjust.
13106 * thread-db.c (thread_db_create_event, find_one_thread)
13107 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13108
0b16c5cf
PA
131092009-03-14 Pedro Alves <pedro@codesourcery.com>
13110
13111 * server.c (handle_query): Handle "qAttached".
13112
32de4b9d
NS
131132009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13114
13115 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13116 GPLv3, update license URL.
13117
2aecd87f
DE
131182009-03-01 Doug Evans <dje@google.com>
13119
93efd302 13120 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
13121 (server_h): Add gdb_signals.h.
13122 (signals.o): Update.
13123 * server.h (target_signal_from_host,target_signal_to_host_p)
13124 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13125
86b1f9c5
PM
131262009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13127
13128 * remote-utils.c (getpkt): Also generate remote-debug
13129 information if noack_mode is set.
13130
4aa995e1
PA
131312009-02-06 Pedro Alves <pedro@codesourcery.com>
13132
13133 * server.c (handle_query): Report qXfer:siginfo:read and
13134 qXfer:siginfo:write as supported and handle them.
13135 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13136 * linux-low.c (linux_xfer_siginfo): New.
13137 (linux_target_ops): Set it.
13138
62709adf
PA
131392009-01-26 Pedro Alves <pedro@codesourcery.com>
13140
13141 * server.c (gdbserver_usage): Mention --remote-debug.
13142 (main): Accept '--remote-debug' switch.
13143
aef93bd7
DE
131442009-01-18 Doug Evans <dje@google.com>
13145
13146 * regcache.c (new_register_cache): No need to check result of xcalloc.
13147 * server.c (handle_search_memory): Back out calls to xmalloc,
13148 result is checked and error is returned to user upon failure.
13149 (handle_query): Ditto. Add more checks for result of malloc.
13150 (handle_v_cont): Check result of malloc, report error back to
13151 user upon failure.
13152 (handle_v_run): Ditto. Call freeargv.
13153 * server.h (freeargv): Declare.
13154 * utils.c (freeargv): New fn.
13155
54363045
DE
131562009-01-15 Doug Evans <dje@google.com>
13157
f626972c
DE
13158 * gdbreplay.c (perror_with_name): Make arg const char *.
13159 * server.h (target_signal_to_name): Make return type const char *.
0842e787 13160 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 13161 * utils.c (perror_with_name): Make arg const char *.
54363045 13162
18aae699
PA
131632009-01-14 Pedro Alves <pedro@codesourcery.com>
13164
13165 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13166 when handling a EXIT_PROCESS_DEBUG_EVENT.
13167
ff703abe
JB
131682009-01-06 Joel Brobecker <brobecker@adacore.com>
13169
13170 * gdbreplay.c (gdbreplay_version): Update copyright year.
13171 * server.c (gdbserver_version): Likewise.
13172
f21cc1a2 131732009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
13174
13175 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 13176 (handle_extended_wait): Improve comment.
0e21c1ec 13177
bca929d3
DE
131782008-12-13 Doug Evans <dje@google.com>
13179
13180 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13181 * server.h (ATTR_MALLOC): New macro.
13182 (xmalloc,xcalloc,xstrdup): Declare.
13183 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13184 * inferiors.c: Ditto.
13185 * linux-low.c: Ditto.
13186 * mem-break.c: Ditto.
13187 * regcache.c: Ditto.
13188 * remote-utils.c: Ditto.
13189 * server.c: Ditto.
13190 * target.c: Ditto.
13191 * win32-low.c: Ditto.
13192
97438e3f
DE
131932008-12-12 Doug Evans <dje@google.com>
13194
896c7fbb
DE
13195 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13196 in debugging printf.
13197
97438e3f
DE
13198 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13199
e3b886f8
DE
132002008-12-09 Doug Evans <dje@google.com>
13201
13202 * linux-low.h (struct process_info): Delete member tid, unused.
13203 * thread-db.c (find_one_thread): Update.
13204 (maybe_attach_thread): Update.
13205
07e059b5
VP
132062008-12-02 Pedro Alves <pedro@codesourcery.com>
13207
889bf7c5
PA
13208 * target.h (struct target_ops): Add qxfer_osdata member.
13209 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13210 and dirent.h.
13211 (linux_qxfer_osdata): New functions.
13212 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13213 callback.
13214 * server.c (handle_query): Handle "qXfer:osdata:read:".
13215 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13216 (buffer_xml_printf): New functions.
13217 * server.h (struct buffer): New.
13218 (buffer_grow_str, buffer_grow_str0): New macros.
13219 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13220 (buffer_xml_printf): Declare.
07e059b5 13221
4cab47ab
DE
132222008-11-24 Doug Evans <dje@google.com>
13223
13224 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13225
f142445f
DJ
132262008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13227
13228 * server.c (handle_v_run): Always use the supplied argument list.
13229
d0107bb6 132302008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 13231
d0107bb6
BW
13232 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13233 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 13234
2c4ad781
TJB
132352008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13236
13237 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13238 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13239 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13240 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13241 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13242 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13243 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13244 XML target descriptions.
13245 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13246 when inferior is running on an ISA 2.05 or later processor. Add
13247 special case to return offset for full 64-bit slot of FPSCR when
13248 in 32-bits.
13249
dfb64f85
DJ
132502008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13251
13252 * Makefile.in (SFILES, clean): Added sparc64 files.
13253 (reg-sparc64.o, reg-sparc64.c): New.
13254 * configure.srv (sparc*-*-linux*): New configuration.
13255 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13256 syscall arguments for SPARC.
13257 (regsets_store_inferior_registers): Likewise.
13258 * linux-sparc-low.c: New file.
13259
66b6e1dd
DE
132602008-10-21 Doug Evans <dje@google.com>
13261
13262 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13263 (READLINE_DIR,READLINE_DEP): Delete.
13264 (INTERNAL_CFLAGS): Update.
13265 (LINTFLAGS): Update.
13266
9b710a42
PA
132672008-10-10 Pedro Alves <pedro@codesourcery.com>
13268
13269 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13270 whole argv from the last run, not just argv[0].
13271
5822d809
PA
132722008-09-08 Pedro Alves <pedro@codesourcery.com>
13273
13274 * regcache.c (new_register_cache): Return NULL if the register
13275 cache size isn't known yet.
13276 (free_register_cache): Avoid dereferencing a NULL regcache.
13277
74aac56f
DJ
132782008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13279
13280 * configure.srv: Merge MIPS and MIPS64.
13281
400b20f5
MR
132822008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13283
13284 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13285
677c5bb1
LM
132862008-08-18 Luis Machado <luisgpm@br.ibm.com>
13287
13288 * Makefile.in: Add required vsx dependencies.
13289
13290 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13291 Declare init_registers_powerpc_vsx32l.
13292 Declare init_registers_powerpc_vsx64l.
13293 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13294 (ppc_arch_setup): Check for VSX in hwcap.
13295 (ppc_fill_vsxregset): New function.
13296 (ppc_store_vsxregset): New function.
13297 Add new VSX entry in regset_info target_regsets.
13298
13299 * configure.srv: Add new VSX dependencies.
13300
a6f3e723
SL
133012008-08-12 Pedro Alves <pedro@codesourcery.com>
13302
13303 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13304 (remote_open): Set or clear transport_is_reliable.
13305 (putpkt_binary): Don't expect acks in noack mode.
13306 (getpkt): Don't send ack/nac in noack mode.
13307 * server.c (handle_general_set): Handle QStartNoAckMode.
13308 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13309 qSupported.
13310 (main): Reset noack_mode on every connection.
13311 * server.h (noack_mode): Declare.
13312
a417dc56
RW
133132008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13314
13315 * Makefile.in (GDBREPLAY_OBS): New variable.
13316 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13317
3221518c
UW
133182008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13319 Daniel Jacobowitz <dan@codesourcery.com>
13320
13321 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13322 (usr_store_inferior_registers): Likewise.
13323 (regsets_store_inferior_registers): Likewise.
13324
ec56be1b
PA
133252008-07-31 Rolf Jansen <rj@surtec.com>
13326 Pedro Alves <pedro@codesourcery.com>
13327
13328 * configure.ac: Check for memmem declaration.
13329 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13330 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13331 (disable_packet_qfThreadInfo): Unconditionally compile.
13332 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13333 * configure, config.in: Regenerate.
13334
2fe5e3ff
DE
133352008-07-28 Doug Kwan <dougkwan@google.com>
13336
13337 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13338 (linux_write_memory): Remove declaration of errno.
13339
836acd6d
UW
133402008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13341
13342 * linux-low.c (handle_extended_wait): Do not use "status"
13343 variable uninitialized.
13344
aeba519e
PA
133452008-07-07 Pedro Alves <pedro@codesourcery.com>
13346
13347 * server.c (handle_v_attach): Inhibit reporting dll changes.
13348
db42f210
PA
133492008-06-27 Pedro Alves <pedro@codesourcery.com>
13350
13351 * remote-utils.c (prepare_resume_reply): If requested, don't
13352 output "thread:TID" in the T stop reply.
13353
13354 * server.c (disable_packet_vCont, disable_packet_Tthread)
13355 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13356 (handle_query): If requested, disable support for qC, qfThreadInfo
13357 and qsThreadInfo.
13358 (handle_v_requests): If requested, disable support for vCont.
13359 (gdbserver_show_disableable): New.
13360 (main): Handle --disable-packet and --disable-packet=LIST.
13361
13362 * server.h (disable_packet_vCont, disable_packet_Tthread)
13363 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13364
8e4c5421
CD
133652008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13366
13367 * server.c (gdbserver_usage): Mention --version.
13368
6e23a804
DJ
133692008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13370
13371 * Makefile.in (gdbreplay.o): New rule.
13372
90aa6a40
JM
133732008-06-06 Joseph Myers <joseph@codesourcery.com>
13374
13375 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13376 message, not gdbserver.
13377
c16158bc 133782008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
13379 Nathan Sidwell <nathan@codesourcery.com>
13380 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
13381
13382 * acinclude.m4: Include ../../config/acx.m4.
13383 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13384 * configure, config.in: Regenerate.
13385 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13386 * server.c (gdbserver_version): Print PKGVERSION.
13387 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13388 (main): Adjust gdbserver_usage calls.
13389 * gdbreplay.c (version, host_name): Add declarations.
13390 (gdbreplay_version, gdbreplay_usage): New.
13391 (main): Accept --version and --help options.
13392
aeb75bf5
DJ
133932008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13394
13395 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13396 (arm_breakpoint_at): Handle Thumb.
13397 (the_low_target): Add comment.
13398
76b233dd
UW
133992008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13400
13401 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13402
08388c79
DE
134032008-05-09 Doug Evans <dje@google.com>
13404
a3c83fae
DE
13405 * server.h (decode_search_memory_packet): Declare.
13406 * remote-utils.c (decode_search_memory_packet): New fn.
13407 * server.c (handle_search_memory_1): New fn.
08388c79
DE
13408 (handle_search_memory): New fn.
13409 (handle_query): Process qSearch:memory packets.
13410
bb9c3d36
UW
134112008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13412
13413 * regcache.c (registers_length): Remove.
13414 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13415 full register packet.
13416 * regcache.h (registers_length): Remove prototype.
13417 * server.h (PBUFSIZ): Define to 16384.
13418
7284e1be
UW
134192008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13420
13421 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13422 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13423 powerpc-64l.o, and powerpc-altivec64l.o.
13424 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13425 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13426 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13427 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13428 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13429 to srv_xmlfiles.
13430
13431 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13432 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13433 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13434 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13435 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13436 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13437 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13438 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13439 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13440 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13441 (clean): Update.
13442
13443 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13444 (init_registers_powerpc_32l): ... this new prototype.
13445 (init_registers_powerpc_32): Remove, replace by ...
13446 (init_registers_powerpc_altivec32l): ... this new prototype.
13447 (init_registers_powerpc_e500): Remove, replace by ...
13448 (init_registers_powerpc_e500l): ... this new prototype.
13449 (init_registers_ppc64): Remove, replace by ...
13450 (init_registers_powerpc_64l): ... this new prototype.
13451 (init_registers_powerpc_64): Remove, replace by ...
13452 (init_registers_powerpc_altivec64l): ... this new prototype.
13453 (ppc_num_regs): Set to 73.
13454 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13455 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13456 (ppc_cannot_store_register): Handle orig_r3 and trap.
13457 (ppc_arch_setup): Update init_registers_... calls.
13458 (ppc_fill_gregset): Handle orig_r3 and trap.
13459
13460 * inferiors.c (clear_inferiors): Reset current_inferior.
13461
fdc59709
PB
134622008-04-23 Paolo Bonzini <bonzini@gnu.org>
13463
889bf7c5
PA
13464 * acinclude.m4: Add override.m4.
13465 * configure: Regenerate.
fdc59709 13466
c9b2f845
UW
134672008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13468
13469 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13470 initial call to init_register_ppc64.
13471
550512b8
UW
134722008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13473
43aaf8b6
PA
13474 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13475 single powerpc*-*-linux* case.
550512b8
UW
13476 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13477
b6430ec3
UW
134782008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13479
13480 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 13481 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
13482 from reg_xmlfiles.
13483 * linux-ppc-low.c: Include <elf.h>.
13484 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13485 (ppc_hwcap): New global variable.
13486 (ppc_regmap): Remove __SPE__ #ifdef sections.
13487 (ppc_regmap_e500): New global variable.
13488 (ppc_cannot_store_register): Update __SPE__ special case.
13489 (ppc_get_hwcap): New function.
13490 (ppc_arch_setup): Use it to determine whether inferior supports
13491 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13492 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13493 Do not access registers if target does not support AltiVec.
13494 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13495 Do not access registers if target does not support SPE.
13496 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13497
52fa2412
UW
134982008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13499
13500 * linux-low.c (disabled_regsets, num_regsets): New.
13501 (use_regsets_p): Delete.
13502 (linux_wait_for_process): Clear disabled_regsets.
13503 (regsets_fetch_inferior_registers): Check and set it.
13504 (regsets_store_inferior_registers): Likewise.
13505 (linux_fetch_registers, linux_store_registers): Do not use
13506 use_regsets_p.
13507 (initialize_low): Allocate disabled_regsets.
13508
e28b3332
DJ
135092008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13510
13511 * Makefile.in (LIBOBJS): New.
13512 (OBS): Use LIBOBJS.
13513 (memmem.o): New rule.
13514 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13515 * configure: Regenerated.
13516
4536995d
UW
135172008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13518
13519 * server.c (handle_query): Never return "unsupported" for
13520 qXfer:features:read queries.
13521
221c031f
UW
135222008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13523
13524 * server.c (get_features_xml): Fix inverted condition.
13525 (handle_query): Always support qXfer:feature:read.
13526
ccd213ac
DJ
135272008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13528
13529 * server.c (wrapper_argv): New.
13530 (start_inferior): Handle wrapper_argv. If set, expect an extra
13531 trap.
13532 (gdbserver_usage): Document --wrapper.
13533 (main): Parse --wrapper.
13534
6fe305f7
UW
135352008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13536
13537 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13538 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13539 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13540 (ppc_set_pc): Likewise.
13541 (ppc_arch_setup): New function.
13542 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13543 of collect_register.
889bf7c5 13544 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13545
5b0a002e
UW
135462008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13547
13548 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13549 instead of linux-ppc64-low.o.
13550 * linux-ppc64-low.c: Remove file.
13551 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13552 (linux-ppc64-low.o): Remove rule.
13553
13554 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13555 (init_registers_powerpc_64): Likewise.
13556 (ppc_regmap): Conditionally define depending on __powerpc64__.
13557 (ppc_cannot_store_register): Do not special-case "fpscr" when
13558 compiled on __powerpc64__.
13559 (ppc_collect_ptrace_register): New function.
13560 (ppc_supply_ptrace_register): New function.
13561 (ppc_breakpoint): Change type to "unsigned int".
13562 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13563 (the_low_target): Conditionally provide initializers for the
889bf7c5 13564 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13565 collect_ptrace_register and supply_ptrace_register members.
13566
9b4b61c8
UW
135672008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13568
13569 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13570 * server.c (gdbserver_xmltarget): Define.
13571 (get_features_xml): Use it to replace "target.xml" and arch_string.
13572
13573 * configure.srv: Remove srv_xmltarget. Add XML files that were
13574 mentioned there to srv_xmlfiles instead. Remove conditional tests
13575 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13576 srv_xmlfiles and srv_regobj to include all possible choices.
13577 * configure.ac (srv_xmltarget): Remove.
13578 (srv_xmlfiles): Do not add "target.xml".
13579 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13580 checks for supplementary target information.
13581 * configure: Regenerate.
13582 * Makefile.in (XML_TARGET): Remove.
13583 (target.xml): Remove rule.
13584 (clean): Do not clean up target.xml.
13585 (.PRECIOUS): Do not mention target.xml.
13586
13587 * target.h (struct target_ops): Remove arch_string member.
13588 * linux-low.c (linux_arch_string): Remove.
13589 (linux_target_ops): Remove arch_string initializer.
13590 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13591 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13592 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13593 * spu-low.c (spu_arch_string): Remove.
13594 (spu_target_ops): Remove arch_string initializer.
13595 * win32-low.c (win32_arch_string): Remove.
13596 (win32_target_ops): Remove arch_string initializer.
13597 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13598 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13599 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13600
ee1a7ae4
UW
136012008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13602
13603 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13604 by collect_ptrace_register and supply_ptrace_register hooks.
13605 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13606 instead of checking for the_low_target.left_pad_xfer.
13607 (usr_store_inferior_registers): Use collect_ptrace_register callback
13608 instead of checking for the_low_target.left_pad_xfer.
13609
13610 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13611 (s390_supply_ptrace_register): Likewise.
13612 (s390_fill_gregset): Call s390_collect_ptrace_register.
13613 (the_low_target): Update.
13614
13615 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13616 (ppc_supply_ptrace_register): Likewise.
13617 (the_low_target): Update.
13618
13619 * linux-i386-low.c (the_low_target): Update.
13620 * linux-x86-64-low.c (the_low_target): Update.
13621
d61ddec4
UW
136222008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13623
13624 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13625 reg-s390.o and reg-s390x.o.
13626
13627 * linux-low.c (new_inferior): New global variable.
13628 (linux_create_inferior, linux_attach): Set it.
13629 (linux_wait_for_process): Call the_low_target.arch_setup after the
13630 target has stopped for the first time.
13631 (initialize_low): Do not call the_low_target.arch_setup.
13632
13633 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13634 (s390_set_pc): Likewise.
13635 (s390_arch_setup): New function.
13636 (the_low_target): Use s390_arch_setup as arch_setup routine.
13637
13638 * regcache.c (realloc_register_cache): New function.
13639 (set_register_cache): Call it for each existing regcache.
13640
d05b4ac3
UW
136412008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13642
13643 * server.h (init_registers): Remove prototype.
13644
13645 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13646 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13647 instead of init_registers ().
13648 * linux-arm-low.c (init_registers_arm): Add prototype.
13649 (init_registers_arm_with_iwmmxt): Likewise.
13650 (the_low_target): Add initializer for arch_setup field.
13651 * linux-cris-low.c (init_registers_cris): Add prototype.
13652 (the_low_target): Add initializer for arch_setup field.
13653 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13654 (the_low_target): Add initializer for arch_setup field.
13655 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13656 (the_low_target): Add initializer for arch_setup field.
13657 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13658 (the_low_target): Add initializer for arch_setup field.
13659 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13660 (the_low_target): Add initializer for arch_setup field.
13661 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13662 (the_low_target): Add initializer for arch_setup field.
13663 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13664 (init_registers_mips64_linux): Likewise.
13665 (the_low_target): Add initializer for arch_setup field.
13666 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13667 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13668 (the_low_target): Add initializer for arch_setup field.
13669 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13670 (init_registers_powerpc_64): Likewise.
13671 (the_low_target): Add initializer for arch_setup field.
13672 * linux-s390-low.c (init_registers_s390): Add prototype.
13673 (init_registers_s390x): Likewise.
13674 (the_low_target): Add initializer for arch_setup field.
13675 * linux-sh-low.c (init_registers_sh): Add prototype.
13676 (the_low_target): Add initializer for arch_setup field.
13677 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13678 (the_low_target): Add initializer for arch_setup field.
13679 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13680 (the_low_target): Add initializer for arch_setup field.
13681
13682 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13683 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13684 instead of init_registers ().
13685 * win32-arm-low.c (init_registers_arm): Add prototype.
13686 (the_low_target): Add initializer for arch_setup field.
13687 * win32-i386-low.c (init_registers_i386): Add prototype.
13688 (the_low_target): Add initializer for arch_setup field.
13689
13690 * spu-low.c (init_registers_spu): Add prototype.
13691 (initialize_low): Call initialie_registers_spu () instead of
13692 initialize_registers ().
13693
fd96d250
PA
136942008-02-19 Pedro Alves <pedro@codesourcery.com>
13695
13696 * server.c (handle_v_requests): When handling the vRun and vAttach
13697 packets, if already debugging a process, don't kill it. Return an
13698 error instead.
13699
d41b6bb4
DJ
137002008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13701
13702 * server.c (handle_query): Correct length check.
13703
5ac588cf
PA
137042008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13705
13706 * win32-low.c (do_initial_child_stuff): Add process handle
13707 parameter. Set current_process_handle and current_process_id from the
13708 parameters. Clear globals.
13709 (win32_create_inferior): Don't set current_process_handle and
13710 current_process_id here. Instead pass them on the call to
13711 do_initial_child_stuff.
13712 (win32_attach): Likewise.
13713 (win32_clear_inferiors): New.
13714 (win32_kill): Don't close the current process handle or the
13715 current thread handle here. Instead call win32_clear_inferiors.
13716 (win32_detach): Don't open a new handle to the process. Call
13717 win32_clear_inferiors.
13718 (win32_join): Don't rely on current_process_handle; open a new
13719 handle using the process id.
13720 (win32_wait): Call win32_clear_inferiors when the inferior process
13721 has exited.
13722
ecd7ecbc
DJ
137232008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13724
13725 * server.c (monitor_show_help): Add "exit".
13726
1525d545
MG
137272008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13728
ecd7ecbc 13729 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
13730 (clean): Add reg-xtensa.c.
13731 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
13732 * configure.srv (xtensa*-*-linux*) New target.
13733 * linux-xtensa-low.c: New.
13734 * xtensa-xtregs.c: New.
1525d545 13735
59a016f0
PA
137362008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13737
13738 * hostio.c: Don't include errno.h.
13739 (errno_to_fileio_errno): Move to hostio-errno.
13740 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13741 error number outputting to the target->hostio_last_error callback.
13742 (hostio_packet_error): Use FILEIO_EINVAL directly.
13743 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13744 calls to hostio_error.
13745 * hostio-errno.c: New.
13746 * server.h (hostio_last_error_from_errno): Declare.
13747 * target.h (target_ops): Add hostio_last_error member.
13748 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13749 as hostio_last_error handler.
889bf7c5 13750 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
13751 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13752 (wince_hostio_last_error): New functions.
13753 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13754 as hostio_last_error handler.
13755 (win32_target_ops) [!_WIN32_WCE]: Register
13756 hostio_last_error_from_errno as hostio_last_error handler.
13757 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13758 (hostio-errno.o): New rule.
13759 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13760 * configure.srv (srv_hostio_err_objs): New variable. Default to
13761 hostio-errno.o.
13762 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13763 * configure: Regenerate.
13764
2d717e4f
DJ
137652008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13766
13767 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13768 (linux_kill, linux_detach): Clean up the process list.
13769 * remote-utils.c (remote_open): Improve port number parsing.
13770 (putpkt_binary, input_interrupt): Only send interrupts if the target
13771 is running.
13772 * server.c (extended_protocol): Make static.
13773 (attached): Define earlier.
13774 (exit_requested, response_needed, program_argv): New variables.
13775 (target_running): New.
13776 (start_inferior): Clear attached here.
13777 (attach_inferior): Set attached here.
13778 (require_running): Define.
13779 (handle_query): Use require_running and target_running. Implement
13780 "monitor exit".
13781 (handle_v_attach, handle_v_run): New.
13782 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13783 (gdbserver_usage): Update.
13784 (main): Redo argument parsing. Handle --debug and --multi. Handle
13785 --attach along with other options or after the port. Save
13786 program_argv. Support no initial program. Resynchronize
13787 communication with GDB after an error. Handle "monitor exit".
13788 Use require_running and target_running. Always allow the extended
13789 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13790 restart in extended mode.
13791 * README: Refer to the GDB manual. Update --attach usage.
13792
7407e2de
AS
137932007-12-20 Andreas Schwab <schwab@suse.de>
13794
13795 * linux-low.c (STACK_SIZE): Define.
13796 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13797 (linux_test_for_tracefork): Likewise.
13798
b65d95c5
DJ
137992007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13800
13801 * linux-low.c (linux_wait_for_event): Update messages. Do not
13802 reinsert auto-delete breakpoints.
13803 * mem-break.c (struct breakpoint): Change return type of handler to
13804 int.
13805 (set_breakpoint_at): Update handler type.
13806 (reinsert_breakpoint_handler): Return 1 instead of calling
13807 delete_breakpoint.
13808 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13809 setting a new one.
13810 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13811 * mem-break.h (set_breakpoint_at): Update handler type.
13812 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13813 * win32-low.c (auto_delete_breakpoint): New.
13814 (get_child_debug_event): Use it.
13815
4e799345
DJ
138162007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13817
13818 * configure.ac: Check for pread and pwrite.
13819 * hostio.c (handle_pread): Fall back to lseek and read.
13820 (handle_pwrite): Fall back to lseek and write.
13821 * config.in, configure: Regenerated.
13822
27524b67
DJ
138232007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13824
13825 * server.c (myresume): Add own_buf argument.
13826 (main): Update calls.
13827
a20d5e98
DJ
138282007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13829
13830 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13831 * remote-utils.c (remote_open): Do not call disable_async_io.
13832 (block_async_io): Delete.
13833 (unblock_async_io): Make static.
13834 (initialize_async_io): New.
13835 * server.c (handle_v_cont): Handle async I/O here.
13836 (myresume): Likewise. Move other common resume tasks here...
13837 (main): ... from here. Call initialize_async_io. Disable async
13838 I/O before the main loop.
13839 * server.h (initialize_async_io): Declare.
13840 (block_async_io, unblock_async_io): Delete prototypes.
13841 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13842
b79d787e
DJ
138432007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13844
13845 * remote-utils.c (readchar): Allow binary data in received messages.
13846
d97903b2
PA
138472007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13848
13849 * win32-low.c (attaching): New global.
13850 (win32_create_inferior): Clear the `attaching' global.
13851 (win32_attach): Set the `attaching' global.
13852 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13853 attaching. Only set a breakpoint at the entry point if not
13854 attaching.
13855
311de423
PA
138562007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13857
13858 * server.c (main): Don't report dll events on the initial
13859 connection on attaches.
13860
6c2d16d2
PA
138612007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13862
13863 * server.c (main): Relax numerical bases supported for the pid of
13864 the --attach command line argument.
13865
5ca906e6
PA
138662007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13867
13868 * win32-low.c (win32_attach): Call OpenProcess before
13869 DebugActiveProcess, not after. Add last error output to error
13870 call.
13871
9c6c8194
PA
138722007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13873
13874 * win32-low.c (win32_get_thread_context)
13875 (win32_set_thread_context): New functions.
13876 (thread_rec): Use win32_get_thread_context.
13877 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13878 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13879 field.
13880
4d5d1aaa
PA
138812007-12-03 Leo Zayas
13882 Pedro Alves <pedro_alves@portugalmail.pt>
13883
13884 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13885 global variables.
13886 (child_add_thread): Minor cleanup.
13887 (child_continue): Resume artificially suspended threads before
13888 calling ContinueDebugEvent.
13889 (suspend_one_thread): New.
13890 (fake_breakpoint_event): New.
13891 (get_child_debug_event): Change return type to int. Check here if
13892 gdb sent an interrupt request. If a soft interrupt was requested,
13893 fake a breakpoint event. Return 0 if there is no event to handle,
13894 and 1 otherwise.
13895 (win32_wait): Don't check here if gdb sent an interrupt request.
13896 Ensure there is a valid event to handle.
13897 (win32_request_interrupt): Add soft interruption method as last
13898 resort.
13899
c436e841
PA
139002007-12-03 Leo Zayas
13901 Pedro Alves <pedro_alves@portugalmail.pt>
13902
13903 * win32-low.h (win32_thread_info): Add descriptions to the
13904 structure members. Replace `suspend_count' counter by a
13905 `suspended' flag.
13906 * win32-low.c (thread_rec): Update condition of when to get the
13907 context from the inferior. Rely on ContextFlags being set if it
13908 has already been retrieved. Only suspend the inferior thread if
13909 we haven't already. Warn if that fails.
13910 (continue_one_thread): s/suspend_count/suspended/. Only call
13911 ResumeThread once. Warn if that fails.
13912
e7b5fa67
PA
139132007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13914
13915 * win32-low.c (win32_wait): Don't read from the inferior when it
13916 has already exited.
13917
a385171d
PA
139182007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13919
13920 * Makefile.in (win32_low_h): New variable.
13921 (win32-low.o): Add dependency on $(win32_low_h).
13922 (win32-arm-low.o, win32-i386-low.o): New rules.
13923
f80c84b3
DJ
139242007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13925
13926 * hostio.c: Correct copyright year.
13927
a6b151f1
DJ
139282007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13929
13930 * Makefile.in (OBS): Add hostio.o.
13931 (hostio.o): New rule.
13932 * server.h (handle_vFile): Declare.
13933 * hostio.c: New file.
13934 * server.c (handle_v_requests): Take packet_len and new_packet_len
13935 for binary packets. Call handle_vFile.
13936 (main): Update call to handle_v_requests.
13937
f9387fc3
DJ
139382007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13939
13940 * linux-low.c: Include <sched.h>.
13941
51c2684e
DJ
139422007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13943
13944 * linux-low.c (linux_tracefork_grandchild): New.
13945 (linux_tracefork_child): Use clone.
13946 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13947
75f83163
JB
139482007-10-31 Joel Brobecker <brobecker@adacore.com>
13949
13950 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13951
da5898ce
DJ
139522007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13953
13954 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13955
24a09b5f
DJ
139562007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13957
13958 * inferiors.c (change_inferior_id): Delete.
13959 (add_pid_to_list, pull_pid_from_list): New.
13960 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13961 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13962 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13963 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13964 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13965 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13966 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13967 (using_threads): Always set to 1.
13968 (handle_extended_wait): New.
13969 (add_process): Do not set TID.
13970 (linux_create_inferior): Set must_set_ptrace_flags.
13971 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13972 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13973 (linux_thread_alive): Rename TID argument to LWPID.
13974 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13975 (linux_wait_for_event): Do not use TID or check using_threads. Update
13976 call to dead_thread_notify. Call handle_extended_wait.
13977 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13978 (send_sigstop): Delete sigstop_sent.
13979 (wait_for_sigstop): Avoid TID.
13980 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13981 (linux_test_for_tracefork): New.
13982 (linux_lookup_signals): Use thread_db_active and
13983 linux_supports_tracefork_flag.
13984 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13985 * linux-low.h (get_process_thread): Avoid TID.
13986 (struct process_ifo): Move thread_known and tid to the end. Remove
13987 sigstop_sent.
13988 (linux_attach_lwp, thread_db_init): Update prototypes.
13989 * server.h (change_inferior_id): Delete prototype.
13990 (add_pid_to_list, pull_pid_from_list): New prototypes.
13991 * thread-db.c (thread_db_use_events): New.
13992 (find_first_thread): Rename to...
13993 (find_one_thread): ...this. Update callers and messages. Do not
13994 call fatal. Check thread_db_use_events. Do not call
13995 change_inferior_id or new_thread_notify.
13996 (maybe_attach_thread): Update. Do not call new_thread_notify.
13997 (thread_db_init): Set thread_db_use_events. Check use_events.
13998 * utils.c (fatal, warning): Correct message prefix.
13999
30ed0a8f
DJ
140002007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14001
14002 * Makefile.in (clean): Remove new files.
14003 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14004 (powerpc-64.o, powerpc-64.c): New rules.
14005 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14006 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14007 with SPE.
14008 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14009 SPE targets.
14010 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14011 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14012 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14013 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14014 (target_regsets): Add AltiVec and SPE register sets.
14015 * configure.ac: Check for AltiVec and SPE.
14016 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14017 (ppc_fill_vrregset, ppc_store_vrregset): New.
14018 (target_regsets): Add AltiVec register set.
14019 * configure: Regenerated.
14020
fd462a61
DJ
140212007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14022
14023 * linux-low.c (O_LARGEFILE): Define.
14024 (linux_read_memory): Use /proc/PID/mem.
14025 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14026 * configure, config.in: Regenerated.
14027
69f223ed
DJ
140282007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14029
14030 * linux-low.c (linux_wait_for_event): Do not pass signals while
14031 single-stepping.
14032
aec18585
PA
140332007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14034
14035 * win32-low.c (create_process): New.
14036 (win32_create_inferior): Use create_process instead of
14037 CreateProcess. If create_process failed retry appending an ".exe"
14038 suffix. Store the GetLastError result immediatelly after
14039 create_process calls and use it on the call to error.
14040
34d86ddd
PA
140412007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14042
14043 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14044
5a0e3bd0
JB
140452007-08-23 Joel Brobecker <brobecker@adacore.com>
14046
14047 * configure.ac: Switch license to GPLv3.
14048
f88c79e6
MS
140492007-08-01 Michael Snyder <msnyder@access-company.com>
14050
14051 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14052
6b3d9b83
PA
140532007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14054
14055 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14056 typedef.
14057 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14058 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14059 CloseToolhelp32Snapshot.
14060 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14061 CloseToolhelp32Snapshot.
14062
c588c53c
MS
140632007-07-27 Michael Snyder <michael.snyder@access-company.com>
14064
14065 * server.c (main): Check for inferior exit before main loop.
14066
aa0403d9
PA
140672007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14068
14069 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14070 instead of on tmp_desc.
14071
255e7678
DJ
140722007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14073 Daniel Jacobowitz <dan@codesourcery.com>
14074
14075 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14076 (add_thread): Minor cleanups.
14077 (clear_inferiors): Move lower in the file. Clear the DLL
14078 list.
14079 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14080 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14081 (xml_escape_text): New.
14082 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14083 for qSupported.
14084 (handle_v_cont): Report errors.
14085 (gdbserver_version): Update.
14086 (main): Correct size of own_buf. Do not report initial DLL events.
14087 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14088 (unloaded_dll, xml_escape_text): New.
14089 * win32-low.c (enum target_waitkind): Update comments.
14090 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14091 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14092 (win32_EnumProcessModules, win32_GetModuleInformation)
14093 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14094 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14095 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14096 (win32_Module32First, win32_Module32Next, load_toolhelp)
14097 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14098 (get_child_debug_event): Handle DLL events.
14099 (win32_wait): Likewise.
14100
0d37add9
DJ
141012007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14102
14103 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14104 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14105
45e2715e
PA
141062007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14107
14108 * win32-low.c (handle_output_debug_string): Ignore event if not
14109 waiting.
14110
c5674cf1
PA
141112007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14112
14113 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14114
2bbe3cc1
DJ
141152007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14116
14117 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14118
ae13219e
DJ
141192007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14120
14121 * inferiors.c (change_inferior_id): Add comment.
14122 * linux-low.c (check_removed_breakpoint): Add an early
14123 prototype. Improve debug output.
14124 (linux_attach): Doc update.
14125 (linux_detach_one_process, linux_detach): Clean up before releasing
14126 each process.
14127 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14128 * linux-low.h (struct process_info): Doc improvement.
14129 * mem-break.c (delete_all_breakpoints): New.
14130 * mem-break.h (delete_all_breakpoints): New prototype.
14131 * thread-db.c (find_first_thread): New.
14132 (thread_db_create_event): Call it instead of
14133 thread_db_find_new_threads. Clean up unused variables.
14134 (maybe_attach_thread): Remove first thread handling.
14135 (thread_db_find_new_threads): Use find_first_thread.
14136 (thread_db_get_tls_address): Likewise.
14137
4105de34
DJ
141382007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14139
14140 * thread-db.c (thread_db_find_new_threads): Add prototype.
14141 (thread_db_create_event): Check for the main thread before adding
14142 a new thread.
14143 (maybe_attach_thread): Only enable event reporting if TID == 0.
14144 (thread_db_get_tls_address): Check for new threads.
14145
2b876972
DJ
141462007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14147
14148 * linux-low.c (linux_create_inferior): Try execv before execvp.
14149 * spu-low.c (spu_create_inferior): Likewise.
14150
7a245884
DJ
141512007-06-13 Mike Frysinger <vapier@gentoo.org>
14152
14153 * linux-low.c (linux_create_inferior): Change execv to execvp.
14154 * spu-low.c (spu_create_inferior): Likewies.
14155
117ce543
DJ
141562007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14157
14158 * Makefile.in (clean): Clean new files instead of deleted ones.
14159 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14160 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14161 rules.
14162 * configure.srv: Specify XML files and new regformats for MIPS and
14163 MIPS64 GNU/Linux.
14164 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14165 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14166 an entry for the restart register.
14167 (mips_cannot_fetch_register, mips_cannot_store_register)
14168 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14169 register names to match the XML descriptions.
14170 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14171 restart register instead of $0.
14172
0e7f50da
UW
141732007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14174 Markus Deuling <deuling@de.ibm.com>
14175
14176 * remote-utils.c (decode_xfer_write): New function.
14177 * server.h (decode_xfer_write): Add prototype.
14178 * server.c (handle_query): Add PACKET_LEN argument. Support
14179 qXfer:spu:read and qXfer:spu:write packets.
14180 (main): Pass packet_len to handle_query.
14181 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14182 * target.h (target_ops): Add qxfer_spu.
14183
374c1d38
UW
141842007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14185
14186 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14187 accessing non-seekable spufs files.
14188
bb63802a
UW
141892007-05-16 Markus Deuling <deuling@de.ibm.com>
14190
889bf7c5 14191 * server.c (handle_query): Add reply for qC packet.
bb63802a 14192
7390519e
PA
141932007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14194 Leo Zayas <lerele@champenstudios@com>
14195
14196 * server.h (check_remote_input_interrupt_request): New function.
14197 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14198 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14199 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14200 (check_remote_input_interrupt_request): New function.
14201 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 14202 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
14203 winapi_GenerateConsoleCtrlEvent): New typedefs.
14204 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14205 to 250 ms.
14206 (win32_wait): Check for remote interrupt request
14207 with check_remote_input_interrupt_request.
14208 (win32_request_interrupt): New function.
14209 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14210
34b34921
PA
142112007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14212
14213 * win32-low.c (debug_registers_changed,
14214 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14215 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14216 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14217 (thread_rec): Get context using the low target.
14218 (child_add_thread): Call thread_added on the low target,
14219 which does the same thing.
14220 (regptr): Delete.
14221 (do_initial_child_stuff): Remove debug registers references.
14222 Set context using the low target. Resume threads after
14223 setting the contexts.
14224 (child_continue): Remove dead variable. Remove debug
14225 registers references.
14226 (child_fetch_inferior_registers): Go through the low target.
14227 (do_child_store_inferior_registers): Remove.
14228 (child_store_inferior_registers): Go through the low target.
14229 (win32_resume): Remove debug registers references.
14230 Set context using the low target.
14231 (handle_exception): Change return type to void. Don't record
14232 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14233 first chance exception.
889bf7c5 14234 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
14235 goto loop. Always return after waiting for debug event.
14236 (win32_wait): Convert to switch statement. Handle spurious
14237 events.
14238
14239 * win32-i386-low.c (debug_registers_changed,
14240 debug_registers_used): New.
14241 (initial_stuff): Rename to ...
14242 (i386_initial_stuff): ... this. Clear debug registers
14243 state variables.
14244 (store_debug_registers): Delete.
14245 (i386_get_thread_context): New.
14246 (load_debug_registers): Delete.
14247 (i386_set_thread_context): New.
14248 (i386_thread_added): New.
14249 (single_step): Rename to ...
14250 (i386_single_step): ... this.
14251 (do_fetch_inferior_registers): Rename to ...
14252 (i386_fetch_inferior_register): ... this.
14253 (i386_store_inferior_register): New.
14254 (the_low_target): Adapt to new interface.
14255
14256 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14257 (arm_get_thread_context): New.
14258 (arm_set_thread_context): New.
14259 (regptr): New.
14260 (do_fetch_inferior_registers): Rename to ...
14261 (arm_fetch_inferior_register): ... this.
14262 (arm_store_inferior_register): New.
14263 (arm_wince_breakpoint): Reimplement as unsigned long.
14264 (arm_wince_breakpoint_len): Define.
14265 (the_low_target): Adapt to new interface.
14266
14267 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14268 load_debug_registers. Add get_thread_context, set_thread_context,
14269 thread_added and store_inferior_register. Rename
14270 fetch_inferior_registers to fetch_inferior_register.
14271 (regptr): Remove declaration.
14272
dd6953e1
PA
142732007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14274
14275 * linux-low.c (linux_detach): Change return type to int. Return 0.
14276 * spu-low.c (spu_detach): Likewise.
14277
444d6139
PA
142782007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14279
14280 * target.h (target_ops): Change return type of detach to int.
14281 Add join.
14282 (join_inferior): New.
14283 * server.c (main): Don't skip detach support on mingw32.
14284 If the inferior doesn't support detaching return error.
14285 Call join_inferior instead of using waitpid.
14286 * linux-low.c (linux_join): New.
14287 (linux_target_op): Add linux_join.
14288 * spu-low.c (spu_join): New.
14289 (spu_target_ops): Add spu_join.
14290 * win32-low.c (win32_detach): Adapt to new interface.
14291 Reopen current_process_handle before detaching. Issue a child
14292 resume before detaching.
14293 (win32_join): New.
14294 (win32_target_op): Add win32_join.
14295
1d5315fe
PA
142962007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14297
14298 * win32-low.c (win32-attach): Fix return value.
14299 * target.h (target_ops): Describe ATTACH return values.
14300
bf914831
PA
143012007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14302
14303 * win32-low.c (GETPROCADDRESS): Define.
14304 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14305 (winapi_DebugSetProcessKillOnExit): Likewise.
14306 (win32_create_inferior): Force usage of ansi CreateProcessA.
14307 (win32_attach): Use GETPROCADDRESS.
14308 (win32_detach): Likewise.
14309
f72f3e60
PA
143102007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14311
14312 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14313
ed50f18f
PA
143142007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14315
14316 * win32-low.c: Commit leftover changes from 2007-03-29.
14317
0c2ead7e
DJ
143182007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14319
14320 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14321 fields short instead of int. Add explicit padding.
14322 (i387_cache_to_fsave): Remove unnecessary casts.
14323 (i387_fsave_to_cache): Doc fix.
14324 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14325
73725ff3
DJ
143262007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14327
14328 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14329 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14330
d99f33d8
PA
143312007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14332
14333 * configure.srv (arm*-*-mingw32ce*): Move near the other
14334 arm targets.
14335
68070c10
PA
143362007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14337
2482afc6 14338 * configure.ac: Add errno checking.
68070c10
PA
14339 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14340 sys/file.h and malloc.h.
14341 (AC_CHECK_DECLS): Add perror.
14342 (srv_mingwce): Handle.
2482afc6 14343 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14344 win32-i386-low.o to srv_tgtobj.
14345 (i[34567]86-*-mingw*): Likewise.
14346 (arm*-*-mingw32ce*): Add case.
14347 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14348 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14349 [__MINGW32CE__] (strerror): New function.
14350 [__MINGW32CE__] (errno): Define to GetLastError.
14351 [__MINGW32CE__] (COUNTOF): New macro.
14352 (remote_open): Remove extra close call.
14353 * mem-break.c (delete_breakpoint_at): New function.
14354 * mem-break.h (delete_breakpoint_at): Declare.
14355 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14356 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14357 [USE_WIN32API] (read, write): Add char* casts.
14358 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14359 * server.h: Include wincecompat.h on Windows CE.
14360 [HAVE_ERRNO_H]: Check.
14361 (perror): Declare if not declared.
14362 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14363 (perror_with_name): Remove errno declaration.
14364 * wincecompat.h: New.
14365 * wincecompat.c: New.
14366 * win32-low.h: New.
14367 * win32-arm-low.c: New.
14368 * win32-i386-low.c: New.
14369 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14370 (OUTMSG2): Make it safe.
14371 (_T): New macro.
14372 (COUNTOF): New macro.
14373 (NUM_REGS): Get it from the low target.
14374 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14375 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14376 (thread_rec): Let low target handle debug registers.
14377 (child_add_thread): Likewise.
14378 (child_init_thread_list): Likewise.
14379 (continue_one_thread): Likewise.
14380 (regptr): New.
14381 (do_child_fetch_inferior_registers): Move to ...
14382 * win32-i386-low.c: ... here, and rename to ...
14383 (do_fetch_inferior_registers): ... this.
889bf7c5 14384 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
14385 Go through the low target.
14386 (do_child_store_inferior_registers): Use regptr.
14387 (strwinerror): New function.
14388 (win32_create_inferior): Handle Windows CE.
14389 Use strwinerror instead of strerror on Windows error
14390 codes. Add program to the error output.
14391 Don't close the main thread handle on Windows CE.
14392 (win32_attach): Use coredll.dll on Windows CE.
14393 (win32_kill): Close current process and current
14394 thread handles.
14395 (win32_detach): Use coredll.dll on Windows CE.
14396 (win32_resume): Let low target handle debug registers, and
14397 step request.
14398 (handle_exception): Add/Remove initial breakpoint. Avoid
14399 non-existant WSTOPSIG on Windows CE.
14400 (win32_read_inferior_memory): Cast to remove warning.
14401 (win32_arch_string): Go through the low target.
14402 (initialize_low): Call set_breakpoint_data with the low
14403 target's breakpoint.
14404 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14405 FOP_REGNUM, mappings): Move to ...
14406 * win32-i386-low.c: ... here.
14407 * win32-low.c (win32_thread_info): Move to ...
14408 * win32-low.h: ... here.
14409 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14410 win32-arm-low.c and wincecompat.c.
14411 (all:): Add $EXEEXT.
14412 (install-only:): Likewise.
14413 (gdbserver:): Likewise.
14414 (gdbreplay:): Likewise.
14415 * config.in: Regenerate.
14416 * configure: Regenerate.
14417
41093d81
PA
144182007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14419
14420 * win32-low.c: Rename typedef thread_info to
14421 win32_thread_info throughout.
14422
544afa54
PA
144232007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14424
14425 * win32-i386-low.c: Rename to ...
14426 * win32-low.c: ... this.
14427 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14428 * Makefile.in: Likewise.
14429
bce7165d
PA
144302007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14431
14432 * remote-utils.c (monitor_output): Constify msg parameter.
14433 * server.h (monitor_output): Likewise.
14434 * win32-i386-low.c (handle_output_debug_string): New.
14435 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14436 handle_output_debug_string.
14437 (get_child_debug_event): Likewise.
14438
506c7aa0
DJ
144392007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14440
14441 * server.c (main): Correct strtoul check.
14442
42c81e2a
DJ
144432007-03-27 Jon Ringle <jon@ringle.org>
14444
14445 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14446
9453113a
DJ
144472007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14448
14449 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14450
64a69107
DJ
144512007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14452
14453 * terminal.h: Check HAVE_SGTTY_H.
14454
144552007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
14456
14457 * remote-utils.c (remote_open): Print out the assigned port number.
14458
c74d0ad8
DJ
144592007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14460
14461 * remote-utils.c (monitor_output): New function.
14462 * server.c (debug_threads): Define here.
14463 (monitor_show_help): New function.
14464 (handle_query): Handle qRcmd.
14465 (main): Do not handle 'd' packet.
14466 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14467 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14468 of debug_threads.
14469
de7c3b4a
PA
144702007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14471
14472 * Makefile.in (EXEEXT): New.
14473 (clean): Use $(EXEEXT).
14474
ef57601b
PA
144752007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14476
14477 * target.h (target_ops): Rename send_signal to request_interrupt,
14478 and remove enum target_signal parameter.
14479 * linux-low.c (linux_request_interrupt): Rename from
14480 linux_send_signal, and always send SIGINT.
14481 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14482 and always send SIGINT.
14483 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14484 of send_signal.
14485 (input_interrupt): Likewise.
14486
820f2bda
PA
144872007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14488
14489 * server.c (get_features_xml): Check if target implemented
14490 arch_string.
14491 * win32-i386-low.c (win32_arch_string): New.
14492 (win32_target_ops): Add win32_arch_string as arch_string member.
14493
ab39bf24
UW
144942007-02-22 Markus Deuling <deuling@de.ibm.com>
14495
14496 * spu-low.c (spu_arch_string): New.
14497 (spu_target_ops): Add spu_arch_string.
14498
61ff6e04
DJ
144992007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14500
14501 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14502 * configure.ac: Do not check for terminal.h.
14503 * configure, config.in: Regenerated.
14504
fb1e4ffc
DJ
145052007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14506
14507 * Makefile.in (OBS): Add $(XML_BUILTIN).
14508 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14509 (clean): Update.
14510 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14511 (arm-with-iwmmxt.c): New.
14512 * config.in, configure: Regenerate.
14513 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14514 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14515 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14516 (arm*-*-linux*): Add iWMMXt and regset support.
14517 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14518 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14519 (arm_store_wmmxregset, target_regsets): New.
14520 * server.c (get_features_xml): Take annex argument. Check builtin
14521 XML documents.
14522 (handle_query): Handle multiple annexes.
14523
0f48aa01
DJ
145242007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14525
14526 * remote-utils.c [USE_WIN32API] (read, write): Define.
14527 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14528 write.
14529
23181151
DJ
145302007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14531
14532 * linux-i386-low.c (the_low_target): Set arch_string.
14533 * linux-x86-64-low.c (the_low_target): Likewise.
14534 * linux-low.c (linux_arch_string): New.
14535 (linux_target_ops): Add it.
14536 * linux-low.h (struct linux_target_ops): Add arch_string.
14537 * server.c (write_qxfer_response): Use const void * for DATA.
14538 (get_features_xml): New.
14539 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14540 * target.h (struct target_ops): Add arch_string method.
14541
9d606399
DJ
145422007-01-03 Denis Pilat <denis.pilat@st.com>
14543 Daniel Jacobowitz <dan@codesourcery.com>
14544
14545 * linux-low.c (linux_kill): Handle being called with no threads.
14546 * win32-i386-low.c (win32_kill): Likewise.
14547 (get_child_debug_event): Clear current_process_handle.
14548
145492006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14550 Daniel Jacobowitz <dan@codesourcery.com>
14551
14552 * remote-utils.c (remote_open): Check the type of specified
14553 serial port devices before opening them.
14554 * server.c (main): Kill the inferior if an error occurs during
14555 the first remote_open.
14556
a5e13d24
DJ
145572006-12-05 Markus Deuling <deuling@de.ibm.com>
14558
14559 * README: Update supported targets.
14560
186947f7
DJ
145612006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14562
14563 * Makefile.in (clean): Remove reg-mips64.c.
14564 (reg-mips64.c, reg-mips64.o): New rules.
14565 * configure.srv: Handle mips64. Include regset support for mips.
14566 * linux-mips-low.c (union mips_register): New.
14567 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14568 (mips_breakpoint, mips_breakpoint_at): Use int.
14569 (mips_collect_register, mips_supply_register)
14570 (mips_collect_register_32bit, mips_supply_register_32bit)
14571 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14572 (mips_store_fpregset, target_regsets): New.
14573 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14574
a13e2c95
UW
145752006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14576
14577 * configure.srv: Add target "spu*-*-*".
14578 * Makefile.in (clean): Remove reg-spu.c.
14579 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14580 * spu-low.c: New file.
14581
cb7283db
DJ
145822006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14583
14584 * configure.ac: Correct td_thr_tls_get_addr test.
14585 * configure: Regenerated.
14586
89be2091
DJ
145872006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14588
14589 * linux-low.c (linux_wait_for_event): Reformat. Use the
14590 pass_signals array.
14591 * remote-utils.c (decode_address_to_semicolon): New.
14592 * server.c (pass_signals, handle_general_set): New.
14593 (handle_query): Mention QPassSignals for qSupported.
14594 (main): Call handle_general_set.
14595 * server.h (pass_signals, decode_address_to_semicolon): New.
14596
000ef4f0
DJ
145972006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14598
14599 * server.c (handle_query): Correct error handling for read_auxv.
14600
b7149293
UW
146012005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14602
14603 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14604 and srv_linux_thread_db to yes.
14605 * linux-s390-low.c (s390_fill_gregset): New function.
14606 (target_regsets): Define data structure.
14607
dae5f5cf
DJ
146082006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14609
14610 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14611 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14612 * config.in, configure: Regenerated.
14613 * inferiors.c (gdb_id_to_thread): New function.
14614 (gdb_id_to_thread_id): Use it.
14615 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14616 * linux-low.h (struct process_info): Add th member.
14617 (thread_db_get_tls_address): New prototype.
14618 * remote-utils.c (decode_address): Make non-static.
14619 * server.c (handle_query): Handle qGetTLSAddr.
14620 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14621 * target.h (struct target_ops): Add get_tls_address.
14622 * thread-db.c (maybe_attach_thread): Save the thread handle.
14623 (thread_db_get_tls_address): New.
14624
32ca6d61
DJ
146252006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14626
14627 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14628 (linux_resume_one_process): Take a siginfo_t *. Update all
14629 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14630 (struct pending_signals): Add a siginfo_t.
14631 (linux_wait_for_process): Always set last_status.
14632 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14633 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14634 * linux-low.h (struct process_info): Add last_status.
14635
5ffff7c1
DJ
146362006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14637
14638 * remote-utils.c (try_rle): New function.
14639 (putpkt_binary): Use it.
14640
8695c747
DJ
146412006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14642
14643 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14644 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14645 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14646 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14647 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14648 point registers.
14649
290fadea
RS
146502006-08-08 Richard Sandiford <richard@codesourcery.com>
14651
14652 * server.c (terminal_fd): New variable.
14653 (old_foreground_pgrp): Likewise.
14654 (restore_old_foreground_pgrp): New function.
14655 (start_inferior): Record the terminal file descriptor in terminal_fd
14656 and its original foreground group in old_foreground_pgrp. Register
14657 restore_old_foreground_pgrp with atexit().
14658
9f2e1e63
DJ
146592006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14660
14661 * server.c (handle_query): Correct qPart to qXfer.
14662
b80864fb
DJ
146632006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14664
14665 * configure.ac: Check for more headers which are missing on
14666 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14667 * configure.srv: Add Cygwin and mingw32.
14668 * remote-utils.c: Don't include headers unconditionally which
14669 are missing on mingw32. Include <winsock.h> for mingw32.
14670 (remote_open): Adjust for mingw32 support. Flush
14671 standard error after writing to it.
14672 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14673 (unblock_async_io, enable_async_io, disable_async_io)
14674 (readchar, getpkt): Update for Winsock support.
14675 (prepare_resume_reply): Expect a protocol signal number.
14676 * server.c: Disable <sys/wait.h> on mingw32.
14677 (start_inferior): Adjust for mingw32 support. Flush
14678 standard error after writing to it.
14679 (attach_inferior): Likewise. Use protocol signal
14680 numbers.
14681 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14682 and names.
14683 * win32-i386-low.c: New file.
14684 * Makefile.in (XM_CLIBS): Set.
14685 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14686 (win32-i386-low.o): New dependency rule.
14687 * linux-low.c (linux_wait): Use target signal numbers.
14688 * target.h (struct target_ops): Doc fix.
14689 * server.h (target_signal_to_name): New prototype.
14690 * gdbreplay.c: Don't include headers unconditionally which
14691 are missing on mingw32. Include <winsock.h> for mingw32.
14692 (remote_close, remote_open): Adjust for Winsock support.
14693 * configure, config.in: Regenerated.
14694
0876f84a
DJ
146952006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14696
14697 * server.c (decode_xfer_read, write_qxfer_response): New.
14698 (handle_query): Take a packet length argument. Handle
14699 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14700 the qSupported response.
14701 (main): Update call to handle_query.
14702
01f9e8fa
DJ
147032006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14704
14705 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14706 (putpkt_binary): Renamed from putpkt and adjusted for binary
14707 data.
14708 (putpkt): New wrapper for putpkt_binary.
14709 (readchar): Don't mask off the high bit.
14710 (decode_X_packet): New function.
14711 * server.c (main): Call putpkt_binary if a handler sets the packet
14712 length. Save the length of the incoming packet. Handle 'X'.
14713 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14714
be2a5f71
DJ
147152006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14716
14717 * server.c (handle_query): Handle qSupported.
14718
ea025f5f
DJ
147192006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14720
14721 * remote-utils.c (all_symbols_looked_up): New variable.
14722 (look_up_one_symbol): Check it.
14723 * server.h (look_up_one_symbol): New declaration.
14724 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14725
9308fc88
DJ
147262006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14727
14728 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 14729 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
14730 (PTRACE_GET_THREAD_AREA): Define.
14731 (ps_get_thread_area): New function.
14732
52fb6437
NS
147332006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14734
14735 * configure.srv (m68k*-*-uclinux*): New target.
14736 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14737 (linux_resume_one_process): Remove extraneous cast.
14738 (linux_read_offsets): New.
14739 (linux_target_op): Add linux_read_offsets on mmuless systems.
14740 * server.c (handle_query): Add qOffsets logic.
14741 * target.h (struct target_ops): Add read_offsets.
14742
21b0f40c
DJ
147432006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14744
14745 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14746 (PTRACE_GET_THREAD_AREA): Define.
14747 (ps_get_thread_area): New function.
14748 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14749 (linux-x86-64-low.o): Update.
14750
0050a760
DJ
147512006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14752
14753 * configure.ac: Remove checks for prfpregset_t.
14754 * gdb_proc_service.h: New file.
14755 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14756 new "gdb_proc_service.h".
14757 * proc-service.c: Likewise.
14758 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14759 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14760 * Makefile.in (gdb_proc_service_h): Updated.
14761 * configure, config.in: Regenerated.
14762
b92a518e
DJ
147632006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14764
14765 * remote-utils.c (prepare_resume_reply): Move declaration
14766 of gdb_id_from_wait to the top of the block.
14767
545587ee
DJ
147682006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14769
14770 * linux-low.c (regsets_store_inferior_registers): Read the regset
14771 from the target before filling it.
14772
9db87ebd
DJ
147732006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14774
14775 * server.c (attach_inferior): Return SIGTRAP for a successful
14776 attach.
14777
dd24457d
DJ
147782006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14779
14780 * Makefile.in (OBS): Add version.o.
14781 (STAGESTUFF): Delete.
14782 (version.o): Add dependencies.
14783 (version.c): Replace rule.
14784 (clean): Remove version.c.
14785 * server.c (gdbserver_version): New.
14786 (gdbserver_usage): Use printf.
14787 (main): Handle --version and --help.
14788 * server.h (version, host_name): Add declarations.
14789
6f0f660e
EZ
147902005-12-23 Eli Zaretskii <eliz@gnu.org>
14791
889bf7c5
PA
14792 * linux-arm-low.c:
14793 * linux-arm-low.c:
14794 * inferiors.c:
14795 * i387-fp.h:
14796 * i387-fp.c:
14797 * gdbreplay.c:
14798 * regcache.c:
14799 * proc-service.c:
14800 * mem-break.h:
14801 * mem-break.c:
14802 * linux-x86-64-low.c:
14803 * linux-sh-low.c:
14804 * linux-s390-low.c:
14805 * linux-ppc64-low.c:
14806 * linux-ppc-low.c:
14807 * linux-mips-low.c:
14808 * linux-m68k-low.c:
14809 * linux-m32r-low.c:
14810 * linux-low.h:
14811 * linux-low.c:
14812 * linux-ia64-low.c:
14813 * linux-i386-low.c:
14814 * linux-crisv32-low.c:
14815 * thread-db.c:
14816 * terminal.h:
14817 * target.h:
14818 * target.c:
14819 * server.h:
14820 * server.c:
14821 * remote-utils.c:
14822 * regcache.h:
14823 * utils.c:
14824 * Makefile.in:
14825 * configure.ac:
6f0f660e
EZ
14826 * gdbserver.1: Add (C) after Copyright. Update the FSF
14827 address.
14828
9d1fb177
DJ
148292005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14830
14831 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14832 (arm_breakpoint_at): Recognize both breakpoints.
14833 (the_low_target): Use the correct breakpoint instruction.
14834
011a70c2
DJ
148352005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14836
14837 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14838 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14839 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14840 (the_low_target): Update.
14841
7fb85e41
AS
148422005-10-25 Andreas Schwab <schwab@suse.de>
14843
14844 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14845
14846 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14847 (ia64_num_regs): Reduce to 462.
14848
3db0444b
DJ
148492005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14850
14851 * acinclude.m4: Correct quoting.
14852 * aclocal.m4: Regenerated.
14853
14854 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14855 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14856 (thread_db_init): Call thread_db_err_str.
14857 * configure.ac: Check for TD_VERSION.
14858 * config.in, configure: Regenerated.
14859
bee0189a
DJ
148602005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14861
14862 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14863
e9d25b98
DJ
148642005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14865
14866 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14867 is not available. Define HAVE_PTRACE_GETREGS if it is.
14868 * config.in, configure: Regenerated.
14869 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14870 * linux-i386-low.c, linux-m68k-low.c: Update to use
14871 HAVE_PTRACE_GETREGS.
14872 * linux-low.c (regsets_fetch_inferior_registers)
14873 (regsets_store_inferior_registers): Only return 0 if we processed
14874 GENERAL_REGS.
14875 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14876 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14877
a06660f7
DJ
148782005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14879
14880 * inferiors.c (struct thread_info): Add gdb_id.
14881 (add_thread): Add gdb_id argument.
14882 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14883 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14884 calls to add_thread.
14885 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14886 * server.c (handle_query): Use thread_to_gdb_id.
14887 (handle_v_cont, main): Use gdb_id_to_thread_id.
14888 * server.h (add_thread): Update prototype.
14889 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14890 prototypes.
14891
5a1f5858
DJ
148922005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14893
14894 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14895 left-padded registers.
14896 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14897 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14898
e122f1f5
SE
148992005-07-01 Steve Ellcey <sje@cup.hp.com>
14900
14901 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14902 * configure: Regenerate.
14903 * config.in: Regenerate.
14904 * server.h (NEED_DECLARATION_STRERROR):
14905 Replace with !HAVE_DECL_STRERROR.
14906
d592fa2f
DJ
149072005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14908
14909 * linux-low.c (linux_wait, linux_send_signal): Don't test
14910 an unsigned long variable for > 0 if it could be MAX_ULONG.
14911 * server.c (myresume): Likewise.
14912 * target.c (set_desired_inferior): Likewise.
14913
ccbd4912
MK
149142005-06-13 Mark Kettenis <kettenis@gnu.org>
14915
14916 * configure.ac: Simplify and improve check for socklen_t.
14917 * configure, config.in: Regenerate.
14918
f450004a
DJ
149192005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14920
14921 * acconfig.h: Remove.
14922 * configure.ac: Add a test for socklen_t. Use three-argument
14923 AC_DEFINE throughout.
14924 * config.in: Regenerated using autoheader 2.59.
14925 * configure: Regenerated.
14926
14927 * gdbreplay.c (socklen_t): Provide a default.
14928 (remote_open): Use socklen_t.
14929 * remote-utils.c (socklen_t): Provide a default.
14930 (remote_open): Use socklen_t.
14931 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14932 unsigned char.
14933
14934 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14935 char for buffers.
14936 * linux-low.c (linux_read_memory, linux_write_memory)
14937 (linux_read_auxv): Likewise.
14938 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14939 (check_mem_write): Likewise.
14940 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14941 Likewise.
14942 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14943 (registers_from_string, register_data): Likewise.
14944 * server.c (handle_query, main): Likewise.
14945 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14946 (decode_M_packet): Likewise.
14947 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14948 * target.h (struct target_ops): Update read_memory, write_memory,
14949 and read_auxv.
14950 (read_inferior_memory, write_inferior_memory): Update.
14951 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14952 to unsigned char *.
14953 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14954 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14955 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14956 linux-s390-low.c, linux-sh-low.c: Update for changes in
14957 read_inferior_memory and the_low_target->breakpoint.
14958
eee84df1
DJ
149592005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14960
14961 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14962 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14963 * configure.srv: Add powerpc64-*-linux*.
14964 * linux-ppc64-low.c: New file.
14965
45b134e5
OF
149662005-05-23 Orjan Friberg <orjanf@axis.com>
14967
14968 * linux-cris-low.c: New file with support for CRIS.
14969 * linux-crisv32-low.c: Ditto for CRISv32.
14970 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14971 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 14972 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
14973 reg-crisv32.o, and reg-crisv32.c to make rules.
14974 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14975 recognized targets.
14976
48d93c75
UW
149772005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14978
14979 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14980 of sizeof (PTRACE_XFER_TYPE).
14981 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14982
e013ee27
OF
149832005-05-12 Orjan Friberg <orjanf@axis.com>
14984
889bf7c5 14985 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
14986 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14987 pointers for hardware watchpoint support.
14988 * linux-low.h (struct linux_target_ops): Ditto.
14989 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14990 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14991 to linux_target_ops.
14992 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14993 reply packet.
14994 * server.c (main): Recognize 'Z' and 'z' packets.
14995
b0ded00b
UW
149962005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14997
14998 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14999 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15000 (the_low_target): Add new members.
15001
8643e2ad
DJ
150022005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15003
15004 * proc-service.c (ps_lgetregs): Search all_processes instead of
15005 all_threads.
15006
fc620387
DJ
150072005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15008
15009 * server.c (start_inferior): Change return type to int.
15010 (attach_inferior): Change sigptr to int *.
15011 (handle_v_cont, handle_v_requests): Change signal to int *.
15012 (main): Change signal to int.
15013
150142005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
15015
15016 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15017 * configure.srv: Add m32r*-*-linux*.
15018 * linux-m32r-low.c: New file.
15019
e0e76420
DJ
150202005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15021
15022 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15023
a1928bad
DJ
150242005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15025
15026 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15027 Take unsigned long arguments for PIDs.
15028 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15029 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15030 (wait_for_sigstop, linux_resume_one_process)
15031 (regsets_fetch_inferior_registers, linux_send_signal)
15032 (linux_read_auxv): Likewise. Update the types of variables holding
15033 PIDs. Update format string specifiers.
15034 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15035 * remote-utils.c (prepare_resume_reply): Likewise.
15036 * server.c (cont_thread, general_thread, step_thread)
15037 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15038 unsigned long.
15039 (handle_query): Update format specifiers.
15040 (handle_v_cont, main): Use strtoul for thread IDs.
15041 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15042 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15043 (general_thread, step_thread, thread_from_wait)
15044 (old_thread_from_wait): Update.
15045 * target.h (struct thread_resume): Use unsigned long for THREAD.
15046 (struct target_ops): Use unsigned long for arguments to attach and
15047 thread_alive.
15048
dcdb98d2
DJ
150492005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15050
15051 * acinclude.m4: Include bfd/bfd.m4 directly.
15052 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15053 <agriffis@toolchain.org>.
15054 * aclocal.m4, configure: Regenerated.
15055
bec39cab
AC
150562005-01-07 Andrew Cagney <cagney@gnu.org>
15057
15058 * configure.ac: Rename configure.in, require autoconf 2.59.
15059 * configure: Re-generate.
15060
434c4c77
DJ
150612004-12-08 Daniel Jacobowitz <dan@debian.org>
15062
15063 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15064 LIBS when finished.
15065 * aclocal.m4: Regenerated.
15066 * configure: Regenerated.
15067
db1d3e1b
AS
150682004-11-21 Andreas Schwab <schwab@suse.de>
15069
15070 * linux-m68k-low.c (m68k_num_gregs): Define.
15071 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15072 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15073 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15074 (m68k_breakpoint_at): New. Add to the_low_target.
15075
15076 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15077 srv_linux_thread_db to yes.
15078
43360365
JB
150792004-10-20 Joel Brobecker <brobecker@gnat.com>
15080
15081 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15082 (ARCH_SET_FS): Likewise.
15083 (ARCH_GET_FS): Likewise.
15084 (ARCH_GET_GS): Likewise.
15085
fd500816
DJ
150862004-10-16 Daniel Jacobowitz <dan@debian.org>
15087
15088 * linux-i386-low.c (ps_get_thread_area): New.
15089 * linux-x86-64-low.c (ps_get_thread_area): New.
15090 * linux-low.c: Include <sys/syscall.h>.
15091 (linux_kill_one_process): Don't kill the first thread here.
15092 (linux_kill): Kill the first thread here.
15093 (kill_lwp): New function.
15094 (send_sigstop, linux_send_signal): Use it.
15095 * proc-service.c: Clean up #ifdefs.
15096 (fpregset_info): Delete.
15097 (ps_lgetregs): Update and enable implementation.
15098 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15099 implementations.
15100 * remote-utils.c (struct sym_cache, symbol_cache): New.
15101 (input_interrupt): Print a clearer message.
15102 (async_io_enabled): New variable.
15103 (enable_async_io, disable_async_io): Use it. Update comments.
15104 (look_up_one_symbol): Use the symbol cache.
15105 * thread-db.c (thread_db_look_up_symbols): New function.
15106 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15107
f6de3c42
DJ
151082004-10-16 Daniel Jacobowitz <dan@debian.org>
15109
15110 * configure.in: Test for -rdynamic.
15111 * configure: Regenerated.
15112 * Makefile (INTERNAL_LDFLAGS): New.
15113 (gdbserver, gdbreplay): Use it.
15114
2c0fc042
AC
151152004-09-02 Andrew Cagney <cagney@gnu.org>
15116
15117 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15118
075b3282
DJ
151192004-03-23 Daniel Jacobowitz <drow@mvista.com>
15120
15121 * linux-low.c (linux_wait): Clear all_processes list also.
15122
fa6a77dc
DJ
151232004-03-12 Daniel Jacobowitz <drow@mvista.com>
15124
15125 * linux-low.c: Include <errno.h>. Remove extern declaration of
15126 errno.
15127
6d782a97
DJ
151282004-03-12 Daniel Jacobowitz <drow@mvista.com>
15129
15130 * gdbreplay.c, server.h, utils.c: Update copyright years.
15131
3a7fb99b
DJ
151322004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15133
15134 * server.c (main): Print child status or termination signal from
15135 variable 'signal', not 'sig'.
15136
c3e735a6
DJ
151372004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15138
15139 * linux-low.c (linux_read_memory): Change return type to
15140 int. Check for and return error from ptrace().
15141 * target.c (read_inferior_memory): Change return type to int. Pass
15142 back return status from the_target->read_memory().
15143 * target.h (struct target_ops): Adapt *read_memory() prototype.
15144 Update comment.
15145 (read_inferior_memory): Adapt prototype.
15146 * server.c (main): Return an error packet if
15147 read_inferior_memory() returns an error.
15148
a59d1c82
DJ
151492004-03-04 Daniel Jacobowitz <drow@mvista.com>
15150
15151 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15152 Unify with other clean targets.
15153
dc3f8883
DJ
151542004-02-29 Daniel Jacobowitz <drow@mvista.com>
15155
15156 * server.c (handle_v_cont): Call set_desired_inferior.
15157
89a208da
DJ
151582004-02-29 Daniel Jacobowitz <drow@mvista.com>
15159
15160 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15161
62ea82f5
DJ
151622004-02-29 Daniel Jacobowitz <drow@mvista.com>
15163
15164 * linux-low.c (linux_wait): Unblock async I/O.
15165 (linux_resume): Block and enable async I/O.
15166 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15167 * server.h (block_async_io, unblock_async_io): Add prototypes.
15168
6910d122
DJ
151692004-02-29 Daniel Jacobowitz <drow@mvista.com>
15170
15171 * remote-utils.c (remote_open): Print a status notice after
15172 opening a TCP port.
15173 * server.c (attach_inferior): Print a status notice after
15174 attaching.
15175
151762004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
15177
15178 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15179
c89dc5d4
DJ
151802004-02-26 Daniel Jacobowitz <drow@mvista.com>
15181
15182 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15183 error packet.
15184 * server.c, target.h: Update copyright years.
15185
4b8dad4a
RM
151862004-02-25 Roland McGrath <roland@redhat.com>
15187
15188 * target.h (struct target_ops): New member `read_auxv'.
15189 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15190 * linux-low.c (linux_read_auxv): New function.
15191 (linux_target_ops): Initialize `read_auxv' member to that.
15192
d7446758
JB
151932004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15194
15195 Committed by Jim Blandy <jimb@redhat.com>.
15196
15197 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 15198 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
15199 instead of GPR_SIZE to distiguish s390 and s390x targets.
15200
5544ad89
DJ
152012004-01-31 Daniel Jacobowitz <drow@mvista.com>
15202
15203 * linux-low.c: Update copyright year.
15204 (check_removed_breakpoint): Clear pending_is_breakpoint.
15205 (linux_set_resume_request, linux_queue_one_thread)
15206 (resume_status_pending_p): New functions.
15207 (linux_continue_one_thread): Use process->resume.
15208 (linux_resume): Only resume threads if there are no pending events.
15209 * linux-low.h (struct process_info): Add resume request
15210 pointer.
15211
2a68b70e
DJ
152122004-01-30 Daniel Jacobowitz <drow@mvista.com>
15213
15214 * regcache.c (new_register_cache): Clear the allocated register
15215 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15216
64386c31
DJ
152172003-10-13 Daniel Jacobowitz <drow@mvista.com>
15218
15219 * linux-low.c (linux_resume): Take a struct thread_resume *
15220 argument.
15221 (linux_wait): Update call.
15222 (resume_ptr): New static variable.
15223 (linux_continue_one_thread): Renamed from
15224 linux_continue_one_process. Use resume_ptr.
15225 (linux_resume): Use linux_continue_one_thread.
15226 * server.c (handle_v_cont, handle_v_requests): New functions.
15227 (myresume): New function.
15228 (main): Handle 'v' case.
15229 * target.h (struct thread_resume): New type.
15230 (struct target_ops): Change argument of "resume" to struct
15231 thread_resume *.
15232 (myresume): Delete macro.
15233
c938e9b0
L
152342003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15235
15236 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15237 (uninstall): Support DESTDIR.
15238
7f313d07
BC
15239Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15240
15241 * configure.srv: Add xscale*linux copy of arm*linux entry.
15242
3b2fc2ea
DJ
152432003-07-24 Daniel Jacobowitz <drow@mvista.com>
15244
15245 * linux-arm-low.c (arm_reinsert_addr): New function.
15246 (the_low_target): Add arm_reinsert_addr.
15247
1c0a559e
MK
152482003-07-08 Mark Kettenis <kettenis@gnu.org>
15249
15250 * mem-break.c: Remove whitespace at end of file.
15251
43d5792c
DJ
152522003-06-28 Daniel Jacobowitz <drow@mvista.com>
15253
15254 * configure.in: Check whether we need to prototype strerror.
15255 * server.h: Optionally prototype strerror.
15256 * gdbreplay.c (perror_with_name): Use strerror.
15257 * linux-low.c (linux_attach_lwp): Use strerror.
15258 * utils.c (perror_with_name): Use strerror.
15259 * config.in, configure: Regenerated.
15260
c8a86edf
DJ
152612003-06-28 Daniel Jacobowitz <drow@mvista.com>
15262
15263 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15264 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15265
73d37363
DJ
152662003-06-20 Daniel Jacobowitz <drow@mvista.com>
15267
15268 * Makefile.in (SFILES): Update.
15269 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15270 low-sun3.c: Remove files.
15271
6ad8ae5c
DJ
152722003-06-17 Daniel Jacobowitz <drow@mvista.com>
15273
15274 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15275 (linux_detach_one_process, linux_detach): New functions.
15276 (linux_target_ops): Add linux_detach.
15277 * server.c (main): Handle 'D' packet.
15278 * target.h (struct target_ops): Add "detach" member.
15279 (detach_inferior): Define.
15280
1581182a
MK
152812003-06-13 Mark Kettenis <kettenis@gnu.org>
15282
15283 From Kelley Cook <kelleycook@wideopenwest.com>:
15284 * configure.srv: Accept i[34567]86 variants.
15285
e5379b03
DJ
152862003-06-05 Daniel Jacobowitz <drow@mvista.com>
15287
15288 * linux-low.c (linux_wait_for_event): Correct comment typos.
15289 (linux_resume_one_process): Call check_removed_breakpoint.
15290 (linux_send_signal): New function.
15291 (linux_target_ops): Add linux_send_signal.
15292 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15293 of kill.
15294 * target.h (struct target_ops): Add send_signal.
15295
2ff29de4
JB
152962003-05-29 Jim Blandy <jimb@redhat.com>
15297
15298 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15299 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15300 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15301 away part of the register's value.
15302
254787d4
DJ
153032003-03-26 Daniel Jacobowitz <drow@mvista.com>
15304
15305 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15306 (linux_wait_for_event, linux_init_signals): Likewise.
15307
94e10508
DJ
153082003-03-17 Daniel Jacobowitz <drow@mvista.com>
15309
15310 * configure.in: Check for stdlib.h.
15311 * configure: Regenerated.
15312 * config.in: Regenerated.
15313
4c0711e0
DJ
153142003-01-04 Andreas Schwab <schwab@suse.de>
15315
15316 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15317
ef66e766
AC
153182003-01-02 Andrew Cagney <ac131313@redhat.com>
15319
15320 * Makefile.in: Remove obsolete code.
15321
a1358604
DJ
153222002-11-20 Daniel Jacobowitz <drow@mvista.com>
15323
15324 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15325 defined(PT_FPR0_HI).
15326
23ce3b1c
DJ
153272002-11-17 Stuart Hughes <seh@zee2.com>
15328
15329 * linux-arm-low.c (arm_num_regs): Increase.
15330 (arm_regmap): Include status register.
15331
153322002-11-17 Daniel Jacobowitz <drow@mvista.com>
15333
15334 * linux-low.c (register_addr): Remove incorrect -1 check.
15335
a9fa9f7d
DJ
153362002-08-29 Daniel Jacobowitz <drow@mvista.com>
15337
15338 * linux-low.c (linux_create_inferior): Call setpgid. Return
15339 the new PID.
15340 (unstopped_p, linux_signal_pid): Remove.
15341 (linux_target_ops): Remove linux_signal_pid.
15342 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15343 global instead of target method.
15344 * target.h (struct target_ops): Remove signal_pid. Update comment
15345 for create_inferior.
15346 * server.c (signal_pid): New variable.
15347 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15348 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15349 (attach_inferior): Set signal_pid.
15350
17574093
DJ
153512002-08-23 Daniel Jacobowitz <drow@mvista.com>
15352
15353 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15354
153552002-08-20 Jim Blandy <jimb@redhat.com>
15356
15357 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15358 default for this.
15359
153602002-08-01 Andrew Cagney <cagney@redhat.com>
15361
15362 * Makefile.in: Make chill references obsolete.
15363
153642002-07-24 Kevin Buettner <kevinb@redhat.com>
15365
15366 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15367 * configure: Regenerate.
15368 * config.in: Regenerate.
15369
153702002-07-09 David O'Brien <obrien@FreeBSD.org>
15371
15372 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15373 (perror_with_name, remote_close, remote_open, expect, play): Static.
15374
153752002-07-04 Michal Ludvig <mludvig@suse.cz>
15376
4b8dad4a 15377 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
15378 byte offsets instead of an array of indexes.
15379 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15380
153812002-06-13 Daniel Jacobowitz <drow@mvista.com>
15382
15383 * regcache.c: Add comment.
15384
153852002-06-11 Daniel Jacobowitz <drow@mvista.com>
15386
15387 * thread-db.c: New file.
15388 * proc-service.c: New file.
15389 * acinclude.m4: New file.
15390 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15391 proc-service.o, and thread-db.o.
15392 (linux-low.o): Add USE_THREAD_DB.
15393 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15394 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15395 * aclocal.m4: Regenerated.
15396 * config.in: Regenerated.
15397 * configure: Regenerated.
15398 * configure.in: Check for proc_service.h, sys/procfs.h,
15399 thread_db.h, and linux/elf.h headrs.
15400 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15401 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15402 Check for -lthread_db and thread support.
15403 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15404 PowerPC, and SuperH.
15405 * i387-fp.c: Constify arguments.
15406 * i387-fp.h: Likewise.
15407 * inferiors.c: (struct thread_info): Renamed from
15408 `struct inferior_info'. Remove PID member. Use generic inferior
15409 list header. All uses updated.
15410 (inferiors, signal_pid): Removed.
15411 (all_threads): New variable.
15412 (get_thread): Define.
15413 (add_inferior_to_list): New function.
15414 (for_each_inferior): New function.
15415 (change_inferior_id): New function.
15416 (add_inferior): Removed.
15417 (remove_inferior): New function.
15418 (add_thread): New function.
15419 (free_one_thread): New function.
15420 (remove_thread): New function.
15421 (clear_inferiors): Use for_each_inferior and free_one_thread.
15422 (find_inferior): New function.
15423 (find_inferior_id): New function.
15424 (inferior_target_data): Update argument type.
15425 (set_inferior_target_data): Likewise.
15426 (inferior_regcache_data): Likewise.
15427 (set_inferior_regcache_data): Likewise.
15428 * linux-low.c (linux_bp_reinsert): Remove.
15429 (all_processes, stopping_threads, using_thrads)
15430 (struct pending_signals, debug_threads, pid_of): New.
15431 (inferior_pid): Replace with macro.
15432 (struct inferior_linux_data): Remove.
15433 (get_stop_pc, add_process): New functions.
15434 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15435 Use add_process and add_thread.
15436 (linux_attach_lwp): New function, based on old linux_attach. Use
15437 add_process and add_thread. Set stop_expected for new threads.
15438 (linux_attach): New function.
15439 (linux_kill_one_process): New function.
15440 (linux_kill): Kill all LWPs.
15441 (linux_thread_alive): Use find_inferior_id.
15442 (check_removed_breakpoints, status_pending_p): New functions.
15443 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15444 Update. Use WNOHANG. Wait for cloned processes also. Update process
15445 struct for the found process.
15446 (linux_wait_for_event): New function.
15447 (linux_wait): Use it. Support LWPs.
15448 (send_sigstop, wait_for_sigstop, stop_all_processes)
15449 (linux_resume_one_process, linux_continue_one_process): New functions.
15450 (linux_resume): Support LWPs.
15451 (REGISTER_RAW_SIZE): Remove.
15452 (fetch_register): Use register_size instead. Call supply_register.
15453 (usr_store_inferior_registers): Likewise. Call collect_register.
15454 Fix recursive case.
15455 (regsets_fetch_inferior_registers): Improve error message.
15456 (regsets_store_inferior_registers): Add debugging.
15457 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15458 (unstopped_p, linux_signal_pid): New functions.
15459 (linux_target_ops): Add linux_signal_pid.
15460 (linux_init_signals): New function.
15461 (initialize_low): Call it. Initialize using_threads.
15462 * regcache.c (inferior_regcache_data): Add valid
15463 flag.
15464 (get_regcache): Fetch registers lazily. Add fetch argument
15465 and update all callers.
15466 (regcache_invalidate_one, regcache_invalidate): New
15467 functions.
15468 (new_register_cache): Renamed from create_register_cache.
15469 Return the new regcache.
15470 (free_register_cache): Change argument to a void *.
15471 (registers_to_string, registers_from_string): Call get_regcache
15472 with fetch flag set.
15473 (register_data): Make static. Pass fetch flag to get_regcache.
15474 (supply_register): Call get_regcache with fetch flag clear.
15475 (collect_register): Call get_regcache with fetch flag set.
15476 (collect_register_as_string): New function.
15477 * regcache.h: Update.
15478 * remote-utils.c (putpkt): Flush after debug output and use
15479 stderr.
15480 Handle input interrupts while waiting for an ACK.
15481 (input_interrupt): Use signal_pid method.
15482 (getpkt): Flush after debug output and use stderr.
15483 (outreg): Use collect_register_as_string.
15484 (new_thread_notify, dead_thread_notify): New functions.
15485 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15486 and general_thread.
15487 (look_up_one_symbol): Flush after debug output.
15488 * server.c (step_thread, server_waiting): New variables.
15489 (start_inferior): Don't use signal_pid. Update call to mywait.
15490 (attach_inferior): Update call to mywait.
15491 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15492 (main): Don't fetch/store registers explicitly. Use
15493 set_desired_inferior. Support proposed ``Hs'' packet. Update
15494 calls to mywait.
15495 * server.h: Update.
15496 (struct inferior_list, struct_inferior_list_entry): New.
15497 * target.c (set_desired_inferior): New.
15498 (write_inferior_memory): Constify.
15499 (mywait): New function.
15500 * target.h: Update.
15501 (struct target_ops): New signal_pid method.
15502 (mywait): Removed macro, added prototype.
15503
15504 * linux-low.h (regset_func): Removed.
15505 (regset_fill_func, regset_store_func): New.
15506 (enum regset_type): New.
15507 (struct regset_info): Add type field. Use new operation types.
15508 (struct linux_target_ops): stop_pc renamed to get_pc.
15509 Add decr_pc_after_break and breakpoint_at.
15510 (get_process, get_thread_proess, get_process_thread)
15511 (strut process_info, all_processes, linux_attach_lwp)
15512 (thread_db_init): New.
15513
15514 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15515 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15516 (the_low_target): Add new members.
15517 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15518 (i386_store_fpxregset): Constify.
15519 (target_regsets): Add new kind identifier.
15520 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15521 (i386_set_pc): Add debugging.
15522 (i386_breakpoint_at): New function.
15523 (the_low_target): Add new members.
15524 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15525 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15526 (mips_breakpoint_at): New.
15527 (the_low_target): Add new members.
15528 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15529 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15530 (the_low_target): Add new members.
15531 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15532 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15533 (the_low_target): Add new members.
15534 * linux-x86-64-low.c (target_regsets): Add new kind
15535 identifier.
15536
155372002-05-15 Daniel Jacobowitz <drow@mvista.com>
15538
15539 From Martin Pool <mbp@samba.org>:
15540 * server.c (gdbserver_usage): New function.
15541 (main): Call it.
15542
155432002-05-14 Daniel Jacobowitz <drow@mvista.com>
15544
15545 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15546 stop_at -> stop_pc.
15547
155482002-05-04 Andrew Cagney <ac131313@redhat.com>
15549
15550 * Makefile.in: Remove obsolete code.
15551
155522002-04-24 Michal Ludvig <mludvig@suse.cz>
15553
15554 * linux-low.c (regsets_fetch_inferior_registers),
15555 (regsets_store_inferior_registers): Removed cast to int from
15556 ptrace() calls.
15557 * regcache.h: Added declaration of struct inferior_info.
15558
155592002-04-20 Daniel Jacobowitz <drow@mvista.com>
15560
15561 * inferiors.c (struct inferior_info): Add regcache_data.
15562 (add_inferior): Call create_register_cache.
15563 (clear_inferiors): Call free_register_cache.
15564 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15565 * regcache.c (struct inferior_regcache_data): New.
15566 (registers): Remove.
15567 (get_regcache): New function.
15568 (create_register_cache, free_register_cache): New functions.
15569 (set_register_cache): Don't initialize the register cache here.
15570 (registers_to_string, registers_from_string, register_data): Call
15571 get_regcache.
15572 * regcache.h: Add prototypes.
15573 * server.h: Likewise.
15574
155752002-04-20 Daniel Jacobowitz <drow@mvista.com>
15576
15577 * mem-break.c: New file.
15578 * mem-break.h: New file.
15579 * Makefile.in: Add mem-break.o rule; update server.h
15580 dependencies.
15581 * inferiors.c (struct inferior_info): Add target_data
15582 member.
15583 (clear_inferiors): Free target_data member if set.
15584 (inferior_target_data, set_inferior_target_data): New functions.
15585 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15586 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15587 * linux-low.c (linux_bp_reinsert): New variable.
15588 (struct inferior_linux_data): New.
15589 (linux_create_inferior): Use set_inferior_target_data.
15590 (linux_attach): Likewise. Call add_inferior.
15591 (linux_wait_for_one_inferior): New function.
15592 (linux_wait): Call it.
15593 (linux_write_memory): Add const.
15594 (initialize_low): Call set_breakpoint_data.
15595 * linux-low.h (struct linux_target_ops): Add breakpoint
15596 handling members.
15597 * server.c (attach_inferior): Remove extra add_inferior
15598 call.
15599 * server.h: Include mem-break.h. Update inferior.c
15600 prototypes.
15601 * target.c (read_inferior_memory)
15602 (write_inferior_memory): New functions.
15603 * target.h (read_inferior_memory)
15604 (write_inferior_memory): Change macros to prototypes.
15605 (struct target_ops): Update comments. Add const to write_memory
15606 definition.
15607
156082002-04-11 Daniel Jacobowitz <drow@mvista.com>
15609
15610 * linux-low.c (usr_store_inferior_registers): Support
15611 registers which are allowed to fail to store.
15612 * linux-low.h (linux_target_ops): Likewise.
15613 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15614 (ppc_cannot_store_register): FPSCR may not be storable.
15615
156162002-04-09 Daniel Jacobowitz <drow@mvista.com>
15617
15618 * server.h: Include <string.h> if HAVE_STRING_H.
15619 * ChangeLog: Correct paths in last ChangeLog entry.
15620
156212002-04-09 Daniel Jacobowitz <drow@mvista.com>
15622
15623 * linux-low.h: Remove obsolete prototypes.
15624 (struct linux_target_ops): New.
15625 (extern the_low_target): New.
15626 * linux-low.c (num_regs, regmap): Remove declarations.
15627 (register_addr): Use the_low_target explicitly.
15628 (fetch_register): Likewise.
15629 (usr_fetch_inferior_registers): Likewise.
15630 (usr_store_inferior_registers): Likewise.
15631 * linux-arm-low.c (num_regs): Remove.
15632 (arm_num_regs): Define.
15633 (arm_regmap): Renamed from regmap, made static.
15634 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15635 made static.
15636 (arm_cannot_store_register): Renamed from cannot_store_register,
15637 made static.
15638 (the_low_target): New.
15639 * linux-i386-low.c (num_regs): Remove.
15640 (i386_num_regs): Define.
15641 (i386_regmap): Renamed from regmap, made static.
15642 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15643 made static.
15644 (i386_cannot_store_register): Renamed from cannot_store_register,
15645 made static.
15646 (the_low_target): New.
15647 * linux-ia64-low.c (num_regs): Remove.
15648 (ia64_num_regs): Define.
15649 (ia64_regmap): Renamed from regmap, made static.
15650 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15651 made static.
15652 (ia64_cannot_store_register): Renamed from cannot_store_register,
15653 made static.
15654 (the_low_target): New.
15655 * linux-m68k-low.c (num_regs): Remove.
15656 (m68k_num_regs): Define.
15657 (m68k_regmap): Renamed from regmap, made static.
15658 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15659 made static.
15660 (m68k_cannot_store_register): Renamed from cannot_store_register,
15661 made static.
15662 (the_low_target): New.
15663 * linux-mips-low.c (num_regs): Remove.
15664 (mips_num_regs): Define.
15665 (mips_regmap): Renamed from regmap, made static.
15666 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15667 made static.
15668 (mips_cannot_store_register): Renamed from cannot_store_register,
15669 made static.
15670 (the_low_target): New.
15671 * linux-ppc-low.c (num_regs): Remove.
15672 (ppc_num_regs): Define.
15673 (ppc_regmap): Renamed from regmap, made static.
15674 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15675 made static.
15676 (ppc_cannot_store_register): Renamed from cannot_store_register,
15677 made static.
15678 (the_low_target): New.
15679 * linux-s390-low.c (num_regs): Remove.
15680 (s390_num_regs): Define.
15681 (s390_regmap): Renamed from regmap, made static.
15682 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15683 made static.
15684 (s390_cannot_store_register): Renamed from cannot_store_register,
15685 made static.
15686 (the_low_target): New.
15687 * linux-sh-low.c (num_regs): Remove.
15688 (sh_num_regs): Define.
15689 (sh_regmap): Renamed from regmap, made static.
15690 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15691 made static.
15692 (sh_cannot_store_register): Renamed from cannot_store_register,
15693 made static.
15694 (the_low_target): New.
15695 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15696 (the_low_target): New.
15697
156982002-04-09 Daniel Jacobowitz <drow@mvista.com>
15699
15700 * Makefile.in: Add stamp-h target.
15701 * configure.in: Create stamp-h.
15702 * configure: Regenerated.
15703
157042002-04-09 Daniel Jacobowitz <drow@mvista.com>
15705
15706 * inferiors.c: New file.
15707 * target.c: New file.
15708 * target.h: New file.
15709 * Makefile.in: Add target.o and inferiors.o. Update
15710 dependencies.
15711 * linux-low.c (inferior_pid): New static variable,
15712 moved from server.c.
15713 (linux_create_inferior): Renamed from create_inferior.
15714 Call add_inferior. Return 0 on success instead of a PID.
15715 (linux_attach): Renamed from myattach.
15716 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15717 (linux_thread_alive): Renamed from mythread_alive.
15718 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15719 child dies.
15720 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15721 (regsets_store_inferior_registers): Correct error message.
15722 Add missing ``return 0''.
15723 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15724 (linux_store_registers): Renamed from store_inferior_registers.
15725 (linux_read_memory): Renamed from read_inferior_memory.
15726 (linux_write_memory): Renamed from write_inferior_memory.
15727 (linux_target_ops): New structure.
15728 (initialize_low): Call set_target_ops ().
15729 * remote-utils.c (unhexify): New function.
15730 (hexify): New function.
15731 (input_interrupt): Send signals to ``signal_pid''.
15732 * server.c (inferior_pid): Remove.
15733 (start_inferior): Update create_inferior call.
15734 (attach_inferior): Call add_inferior.
15735 (handle_query): New function.
15736 (main): Call handle_query for `q' packets.
15737 * server.h: Include "target.h". Remove obsolete prototypes.
15738 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15739
157402002-04-09 Daniel Jacobowitz <drow@mvista.com>
15741
15742 * Makefile.in: Add WARN_CFLAGS. Update configury
15743 dependencies.
15744 * configure.in: Check for <string.h>
15745 * configure: Regenerate.
15746 * config.in: Regenerate.
15747 * gdbreplay.c: Include needed system headers.
15748 (remote_open): Remove strchr prototype.
15749 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15750 * regcache.c (supply_register): Change buf argument to const void *.
15751 (supply_register_by_name): Likewise.
15752 (collect_register): Change buf argument to void *.
15753 (collect_register_by_name): Likewise.
15754 * regcache.h: Add missing prototypes.
15755 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15756 * server.c (handle_query): New function.
15757 (attached): New static variable, moved out of main.
15758 (main): Quiet longjmp clobber warnings.
15759 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15760 * utils.c (error): Remove NORETURN.
15761 (fatal): Likewise.